]> git.sur5r.net Git - cc65/blob - include/geos/gstruct.h
Changes from Maciej
[cc65] / include / geos / gstruct.h
1 /*
2   GEOS structs
3
4   ported to small C on 25-27.10.1999
5   by Maciej 'YTM/Elysium' Witkowiak
6 */
7
8 #ifndef _GSTRUCT_H
9 #define _GSTRUCT_H
10
11 struct f_date {                 /* date in filedesctiptor */
12         char f_year;
13         char f_month;
14         char f_day;
15         char f_hour;
16         char f_minute;
17 };
18
19 struct s_date {                 /* system date & time */
20         char s_year;
21         char s_month;
22         char s_day;
23         char s_hour;
24         char s_minutes;
25         char s_seconds;
26 };
27
28 struct tr_se {                  /* track and sector */
29         char track;
30         char sector;
31 };
32
33 struct fileheader {             /* header block (like fileHeader) */
34         struct tr_se n_block;
35         char icon_desc[3];
36         char icon_pic[63];
37         char dostype;
38         char type;
39         char structure;
40         int load_address;
41         int end_address;
42         int exec_address;
43         char class_name[19];
44         char column_flag;
45         char author[64];
46         char note[95];
47 };
48
49 struct filehandle {             /* filehandle in directory sectors */
50         char dostype;           /* or in dirEntryBuf               */
51         struct tr_se n_block;
52         char name[16];
53         struct tr_se header;
54         char structure;
55         char type;
56         struct f_date date;
57         int size;
58 };
59
60 struct pixel {                  /* describes point              */
61         int x;
62         char y;
63 };
64
65 struct fontdesc {               /* describes font               */
66         char baseline;
67         char width;
68         char height;
69         char *index_tbl;
70         char *data_ptr;
71 };
72
73 struct window {                 /* describes screen region      */
74         char top;
75         char bot;
76         int left;
77         int right;
78 };
79
80 struct VLIR_info {              /* VLIR information             */
81         char curRecord;         /* currently only used in VLIR  */
82         char usedRecords;       /* as system info (curRecord is mainly of your interest */
83         char fileWritten;
84         int fileSize;
85 };
86
87 struct process {                /* process info, declare table of that type */
88         int pointer;            /* (like: struct process proctab[2]=...    */
89         int jiffies;            /* last entry HAVE TO BE {0,0}              */
90 };
91
92
93 struct iconpic {                /* icon/encoded bitmap description          */
94         char *pic_ptr;          /* ptr to a photo scrap (or encoded bitmap) */
95         char x;                 /* position in cards (*8 pixels)            */
96         char y;
97         char width;             /* in cards                                 */
98         char heigth;            /* in lines (pixels)                        */
99 };
100
101 struct icondef {                /* icon definition for DoIcons              */
102         char *pic_ptr;          /* ptr to a photo scrap (or encoded bitmap) */
103         char x;                 /* position in cards (*8 pixels)            */
104         char y;
105         char width;             /* of icon (in cards)                       */
106         char heigth;            /* of icon in lines (pixels)                */
107         int proc_ptr;           /* pointer to function handling that icon   */
108 };
109
110 struct icontab {
111         char number;            /* number of declared icons                 */
112         struct pixel mousepos;  /* position of mouse after DoIcons          */
113         struct icondef tab[];   /* table of size declared by icontab.number */
114 };
115
116 /*
117    structures below might be used to speed up access to own menus
118    e.g. if you have menu defined as TopMenu and you want to change the number of
119    menu items use:
120     ((struct menu*)&TopMenu)->number=newNumber;
121    This will allow cc65 to emit better code.
122 */
123
124 struct menuitem {
125         char *name;
126         char type;
127         int rest;               /* may be ptr to function, or if submenu ptr to struct menu */
128 };
129
130 struct menu {
131         struct window size;
132         char number;
133         struct menuitem items[];
134 };
135
136 struct inittab {                /* use struct inittab mytab[n] for initram              */
137         int ptr;                /* ptr to 1st byte                                      */
138         char number;            /* number of following bytes                            */
139         char values[];          /* warning - in table size of this is same for all!     */
140 };
141
142 #endif