Difference between revisions of "Types"
From MSX Game Library
(Created page with "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...") |
(No difference)
|
Revision as of 01:30, 5 January 2024
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) |
See also:
- Page about usage of boolean in MSXgl.
- SDCC documentation