]> git.sur5r.net Git - cc65/blob - include/ace.h
Added a missing -O configuration.
[cc65] / include / ace.h
1 /*****************************************************************************/
2 /*                                                                           */
3 /*                                   ace.h                                   */
4 /*                                                                           */
5 /*                      ACE system-specific definitions                      */
6 /*                                                                           */
7 /*                                                                           */
8 /*                                                                           */
9 /* (C) 1998-2015, Ullrich von Bassewitz                                      */
10 /*                Roemerstrasse 52                                           */
11 /*                D-70794 Filderstadt                                        */
12 /* EMail:         uz@cc65.org                                                */
13 /*                                                                           */
14 /*                                                                           */
15 /* This software is provided 'as-is', without any expressed or implied       */
16 /* warranty.  In no event will the authors be held liable for any damages    */
17 /* arising from the use of this software.                                    */
18 /*                                                                           */
19 /* Permission is granted to anyone to use this software for any purpose,     */
20 /* including commercial applications, and to alter it and redistribute it    */
21 /* freely, subject to the following restrictions:                            */
22 /*                                                                           */
23 /* 1. The origin of this software must not be misrepresented; you must not   */
24 /*    claim that you wrote the original software. If you use this software   */
25 /*    in a product, an acknowledgment in the product documentation would be  */
26 /*    appreciated but is not required.                                       */
27 /* 2. Altered source versions must be plainly marked as such, and must not   */
28 /*    be misrepresented as being the original software.                      */
29 /* 3. This notice may not be removed or altered from any source              */
30 /*    distribution.                                                          */
31 /*                                                                           */
32 /*****************************************************************************/
33
34
35
36 #ifndef _ACE_H
37 #define _ACE_H
38
39
40
41 /* Check for errors */
42 #if !defined(__ACE__)
43 #  error This module may only be used when compiling for the ACE os!
44 #endif
45
46
47
48 #ifndef _STDDEF_H
49 #include <stddef.h>
50 #endif
51
52
53
54 struct aceDirentBuf {
55     unsigned long   ad_size;            /* Size in bytes */
56     unsigned char   ad_date [8];        /* YY:YY:MM:DD:HH:MM:SS:TW */
57     char            ad_type [4];        /* File type as ASCIIZ string */
58     unsigned char   ad_flags;           /* File flags */
59     unsigned char   ad_usage;           /* More flags */
60     unsigned char   ad_namelen;         /* Length of name */
61     char            ad_name [17];       /* Name itself, ASCIIZ */
62 };
63
64 int __cdecl__ aceDirOpen (char* dir);
65 int __cdecl__ aceDirClose (int handle);
66 int __cdecl__ aceDirRead (int handle, struct aceDirentBuf* buf);
67
68 /* Type of an ACE key. Key in low byte, shift mask in high byte */
69 typedef unsigned int aceKey;
70
71 /* #defines for the shift mask returned by aceConGetKey */
72 #define aceSH_KEY               0x00FF  /* Mask key itself */
73 #define aceSH_MASK              0xFF00  /* Mask shift mask */
74 #define aceSH_EXT               0x2000  /* Extended key */
75 #define aceSH_CAPS              0x1000  /* Caps lock key */
76 #define aceSH_ALT               0x0800  /* Alternate key */
77 #define aceSH_CTRL              0x0400  /* Ctrl key */
78 #define aceSH_CBM               0x0200  /* Commodore key */
79 #define aceSH_SHIFT             0x0100  /* Shift key */
80
81 /* #defines for the options in aceConSetOpt/aceConGetOpt */
82 #define aceOP_PUTMASK           1       /* Console put mask */
83 #define aceOP_CHARCOLOR         2       /* Character color */
84 #define aceOP_CHARATTR          3       /* Character attribute */
85 #define aceOP_FILLCOLOR         4       /* Fill color */
86 #define aceOP_FILLATTR          5       /* Fill attribute */
87 #define aceOP_CRSCOLOR          6       /* Cursor color */
88 #define aceOP_CRSWRAP           7       /* Force cursor wrap */
89 #define aceOP_SHSCROLL          8       /* Shift keys for scrolling */
90 #define aceOP_MOUSCALE          9       /* Mouse scaling */
91 #define aceOP_RPTDELAY          10      /* Key repeat delay */
92 #define aceOP_RPTRATE           11      /* Key repeat rate */
93
94 /* Console functions */
95 void __cdecl__ aceConWrite (char* buf, size_t count);
96 void __cdecl__ aceConPutLit (int c);
97 void __cdecl__ aceConPos (unsigned x, unsigned y);
98 void __cdecl__ aceConGetPos (unsigned* x, unsigned* y);
99 unsigned aceConGetX (void);
100 unsigned aceConGetY (void);
101 char __cdecl__* aceConInput (char* buf, unsigned initial);
102 int aceConStopKey (void);
103 aceKey aceConGetKey (void);
104 int __cdecl__ aceConKeyAvail (aceKey* key);
105 void __cdecl__ aceConKeyMat (char* matrix);
106 void __cdecl__ aceConSetOpt (unsigned char opt, unsigned char val);
107 int __cdecl__ aceConGetOpt (unsigned char opt);
108
109 /* Misc stuff */
110 int __cdecl__ aceMiscIoPeek (unsigned addr);
111 void __cdecl__ aceMiscIoPoke (unsigned addr, unsigned char val);
112
113
114
115 /* End of ace.h */
116 #endif
117
118
119