Skip to content

Instantly share code, notes, and snippets.

@roccodev
Created June 18, 2024 23:25
Show Gist options
  • Save roccodev/bc74a80117f637bab9bed154ff46020f to your computer and use it in GitHub Desktop.
Save roccodev/bc74a80117f637bab9bed154ff46020f to your computer and use it in GitHub Desktop.
using Row;
u32 string_ofs @ 0xc;
struct Crt {
// "CRT\0"
char magic[4];
u32 row_count;
u32 base;
padding[base - 12];
Row rows[row_count];
};
enum Anchor : u32 {
Left,
Center,
Right,
Right2
};
struct Column {
bool border;
padding[3];
u32 size;
Anchor text_anchor;
s32 str_ofs;
if (str_ofs != -1) char text[] @ str_ofs + string_ofs;
};
struct Row {
// Distance to previous row?
float distance;
bool empty;
padding[3];
// In XC2, loads IMG_image@%02d if non-zero
// (used for logos)
u32 image_id;
padding[4];
Column columns[3];
};
Crt crt @ 0x0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment