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 f_date { /* date in filedesctiptor */
29 struct s_date { /* system date & time */
38 struct tr_se { /* track and sector */
43 struct fileheader { /* header block (like fileHeader) */
50 unsigned load_address;
52 unsigned exec_address;
59 struct filehandle { /* filehandle in directory sectors */
60 char dostype; /* or in dirEntryBuf */
70 struct pixel { /* describes point */
75 struct fontdesc { /* describes font */
83 struct window { /* describes screen region */
90 struct VLIR_info { /* VLIR information */
91 char curRecord; /* currently only used in VLIR */
92 char usedRecords; /* as system info (curRecord is mainly of your interest */
97 struct process { /* process info, declare table of that type */
98 unsigned pointer; /* (like: struct process proctab[2]=... */
99 unsigned jiffies; /* last entry HAVE TO BE {0,0} */
103 struct iconpic { /* icon/encoded bitmap description */
104 char *pic_ptr; /* ptr to a photo scrap (or encoded bitmap) */
105 char x; /* position in cards (*8 pixels) */
107 char width; /* in cards */
108 char heigth; /* in lines (pixels) */
111 struct icondef { /* icon definition for DoIcons */
112 char *pic_ptr; /* ptr to a photo scrap (or encoded bitmap) */
113 char x; /* position in cards (*8 pixels) */
115 char width; /* of icon (in cards) */
116 char heigth; /* of icon in lines (pixels) */
117 unsigned proc_ptr; /* pointer to function handling that icon */
121 char number; /* number of declared icons */
122 struct pixel mousepos; /* position of mouse after DoIcons */
123 struct icondef tab[]; /* table of size declared by icontab.number */
130 void *rest; /* may be ptr to function, or ptr to struct menu (submenu) */
136 struct menuitem items[];
139 struct inittab { /* use struct inittab mytab[n] for initram */
140 unsigned ptr; /* ptr to 1st byte */
141 char number; /* number of following bytes */
142 char values[]; /* actual string of bytes */