4 by Maciej 'YTM/Elysium' Witkowiak
8 apart from initializing data, structures below can be used to
9 speed up access to data and let cc65 to generate better code
10 e.g. if you have menu defined as TopMenu and you want to change the number of
12 ((struct menu*)&TopMenu)->number=newNumber;
13 This will be translated into single lda/sta pair
19 typedef void (*void_func) (void);
21 struct s_date { /* system date & time */
30 struct tr_se { /* track and sector */
35 struct fileheader { /* header block (like fileHeader) */
42 unsigned load_address;
44 unsigned exec_address;
53 struct f_date { /* date in filedesctiptor */
61 struct filehandle { /* filehandle in directory sectors */
62 char dostype; /* or in dirEntryBuf */
72 #else /* #ifdef __GEOS_CBM__ */
74 struct f_date { /* date in filedesctiptor */
82 struct filehandle { /* filehandle in directory sectors */
83 unsigned name_len:4; /* or in dirEntryBuf */
95 struct f_date mod_date;
96 struct tr_se dir_head;
99 #endif /* #ifdef __GEOS_CBM__ */
101 struct pixel { /* describes point */
106 struct fontdesc { /* describes font */
114 struct window { /* describes screen region */
121 struct VLIR_info { /* VLIR information */
122 char curRecord; /* currently only used in VLIR */
123 char usedRecords; /* as system info (curRecord is mainly of your interest */
128 struct process { /* process info, declare table of that type */
129 unsigned pointer; /* (like: struct process proctab[2]=... */
130 unsigned jiffies; /* last entry HAVE TO BE {0,0} */
133 struct iconpic { /* icon/encoded bitmap description */
134 char *pic_ptr; /* ptr to a photo scrap (or encoded bitmap) */
135 char x; /* position in cards (*8 pixels) */
137 char width; /* in cards */
138 char heigth; /* in lines (pixels) */
141 struct icondef { /* icon definition for DoIcons */
142 char *pic_ptr; /* ptr to a photo scrap (or encoded bitmap) */
143 char x; /* position in cards (*8 pixels) */
145 char width; /* of icon (in cards) */
146 char heigth; /* of icon in lines (pixels) */
147 unsigned proc_ptr; /* pointer to function handling that icon */
151 char number; /* number of declared icons */
152 struct pixel mousepos; /* position of mouse after DoIcons */
153 struct icondef tab[]; /* table of size declared by icontab.number */
159 void *rest; /* may be ptr to function, or ptr to struct menu (submenu) */
165 struct menuitem items[];
168 struct inittab { /* use struct inittab mytab[n] for initram */
169 unsigned ptr; /* ptr to 1st byte */
170 char number; /* number of following bytes */
171 char values[]; /* actual string of bytes */