Types
From MSX Game Library
You can use standard C types but MSXgl provide some shortcut that help to write short code and makes data size and sign explicit (which is so important for creating efficient code).
MSXgl's types can be found in core.h.
Type | Desc. | SDCC equivalent |
---|---|---|
bool | Boolean (8 bits) | unsigned char |
i8 | 8 bits signed integer | signed char |
u8 | 8 bits unsigned integer | unsigned char |
i16 | 16 bits signed integer | signed short |
u16 | 16 bits unsigned integer | unsigned short |
i32 | 32 bits signed integer | signed long |
u32 | 32 bits unsigned integer | unsigned long |
i64 | 64 bits signed integer | signed long long |
u64 | 64 bits unsigned integer | unsigned long long |
f32 | 32 bits float (IEEE 754) | float |
c8 | 8 bits character (ASCII, UTF-8) | unsigned char |
c16 | 16 bits character (UTF-16, JIS, etc.) | unsigned short |
ptr | Pointer | void* |
callback | Callback default signature | void (*)(void) |
Related consant:
#define NULL 0 // Pointer "NULL" value #define TRUE 1 // Value for "TRUE" boolean #define FALSE 0 // Value for "FALSE" boolean
See also:
- Page about usage of boolean in MSXgl.
- SDCC documentation