32 lines
990 B
C
32 lines
990 B
C
|
// Copyright © 2017 Project Golan, all rights reserved.
|
||
|
#ifndef m_types_h
|
||
|
#define m_types_h
|
||
|
|
||
|
#include <stdbool.h>
|
||
|
#include <stdint.h>
|
||
|
#include <stddef.h>
|
||
|
#include <stdfix.h>
|
||
|
#undef fixed
|
||
|
|
||
|
#define M_countof(a) (sizeof(a) / sizeof(*a))
|
||
|
|
||
|
// Types ---------------------------------------------------------------------|
|
||
|
|
||
|
typedef short accum fixed; // Fixed
|
||
|
typedef long fract lfrac; // Long Fractional
|
||
|
typedef size_t msize; // Machine Size
|
||
|
typedef ptrdiff_t mpdif; // Machine Pointer Difference
|
||
|
typedef uint8_t mbyte; // Machine Byte
|
||
|
typedef uint16_t hword; // Half Word
|
||
|
typedef uint32_t mword; // Machine Word
|
||
|
typedef uint64_t dword; // Double Word
|
||
|
typedef uint96_t tword; // Triple Word
|
||
|
typedef int8_t chara; // Character
|
||
|
typedef int16_t int16; // Integer (16 bits)
|
||
|
typedef int32_t integ; // Integer (Machine)
|
||
|
typedef int64_t int64; // Integer (64 bits)
|
||
|
typedef int96_t int96; // Integer (96 bits)
|
||
|
typedef unsigned M_texid; // Texture ID
|
||
|
|
||
|
#endif
|