4 ported to small C on 25-27.10.1999
5 by Maciej 'YTM/Elysium' Witkowiak
9 apart from initializing data, structures below can be used to
10 speed up access to data and let cc65 to generate better code
11 e.g. if you have menu defined as TopMenu and you want to change the number of
13 ((struct menu*)&TopMenu)->number=newNumber;
14 This will translate into single lda/sta pair
20 typedef void (*void_func) (void);
22 struct f_date { /* date in filedesctiptor */
30 struct s_date { /* system date & time */
39 struct tr_se { /* track and sector */
44 struct fileheader { /* header block (like fileHeader) */
51 unsigned load_address;
53 unsigned exec_address;
60 struct filehandle { /* filehandle in directory sectors */
61 char dostype; /* or in dirEntryBuf */
71 struct pixel { /* describes point */
76 struct fontdesc { /* describes font */
84 struct window { /* describes screen region */
91 struct VLIR_info { /* VLIR information */
92 char curRecord; /* currently only used in VLIR */
93 char usedRecords; /* as system info (curRecord is mainly of your interest */
98 struct process { /* process info, declare table of that type */
99 unsigned pointer; /* (like: struct process proctab[2]=... */
100 unsigned jiffies; /* last entry HAVE TO BE {0,0} */
104 struct iconpic { /* icon/encoded bitmap description */
105 char *pic_ptr; /* ptr to a photo scrap (or encoded bitmap) */
106 char x; /* position in cards (*8 pixels) */
108 char width; /* in cards */
109 char heigth; /* in lines (pixels) */
112 struct icondef { /* icon definition for DoIcons */
113 char *pic_ptr; /* ptr to a photo scrap (or encoded bitmap) */
114 char x; /* position in cards (*8 pixels) */
116 char width; /* of icon (in cards) */
117 char heigth; /* of icon in lines (pixels) */
118 unsigned proc_ptr; /* pointer to function handling that icon */
122 char number; /* number of declared icons */
123 struct pixel mousepos; /* position of mouse after DoIcons */
124 struct icondef tab[]; /* table of size declared by icontab.number */
131 void *rest; /* may be ptr to function, or ptr to struct menu (submenu) */
137 struct menuitem items[];
140 struct inittab { /* use struct inittab mytab[n] for initram */
141 unsigned ptr; /* ptr to 1st byte */
142 char number; /* number of following bytes */
143 char values[]; /* actual string of bytes */