1 #ifndef __GRAPH
2 #define __GRAPH
3 
4 #include <default.h>
5 
6 /* Begin Auto-Generated Part */
7 #define BITMAP_HDR_SIZE 4
8 #define LCD_MEM ((void*)0x4C00)
9 #define LCD_SIZE 3840
10 #ifndef __HAVE_Bool
11 #define __HAVE_Bool
12 enum Bool{FALSE,TRUE};
13 #endif
14 #ifndef __HAVE_WIN_COORDS
15 #define __HAVE_WIN_COORDS
16 typedef short WIN_COORDS;
17 #endif
18 #ifndef __HAVE_WIN_RECT
19 #define __HAVE_WIN_RECT
20 typedef struct{short x0,y0,x1,y1;}WIN_RECT;
21 #endif
22 #ifndef __HAVE_Attrs
23 #define __HAVE_Attrs
24 enum Attrs{A_REVERSE,A_NORMAL,A_XOR,A_SHADED,A_REPLACE,A_OR,A_AND,A_THICK1,A_SHADE_V,A_SHADE_H,A_SHADE_NS,A_SHADE_PS};
25 #endif
26 #ifndef __HAVE_BITMAP
27 #define __HAVE_BITMAP
28 typedef struct{unsigned short NumRows,NumCols;unsigned char Data[];}BITMAP;
29 #endif
30 #ifndef __HAVE_BoxAttrs
31 #define __HAVE_BoxAttrs
32 enum BoxAttrs{B_NORMAL=0x10,B_ROUNDED=0x20,B_DOUBLE=0x40,B_CUT=0x80};
33 #endif
34 #ifndef __HAVE_Fonts
35 #define __HAVE_Fonts
36 enum Fonts{F_4x6,F_6x8,F_8x10};
37 #endif
38 #ifndef __HAVE_ICON
39 #define __HAVE_ICON
40 typedef struct{unsigned short i[16];}ICON;
41 #endif
42 typedef char LCD_BUFFER[LCD_SIZE];
43 typedef struct{unsigned char Count;struct{signed char Attr,x0,y0,x1,y1;}Data[];}MULTI_LINE;
44 #ifndef __HAVE_pICON
45 #define __HAVE_pICON
46 typedef unsigned short*pICON;
47 #endif
48 #ifndef __HAVE_SCR_COORDS
49 #define __HAVE_SCR_COORDS
50 typedef unsigned char SCR_COORDS;
51 #endif
52 #ifndef __HAVE_SCR_RECT
53 #define __HAVE_SCR_RECT
54 typedef union{struct{unsigned char x0,y0,x1,y1;}xy;unsigned long l;}SCR_RECT;
55 #endif
56 #ifndef __HAVE_SCR_STATE
57 #define __HAVE_SCR_STATE
58 typedef struct{void*ScrAddr;unsigned char XMax,YMax;short CurFont,CurAttr,CurX,CurY;SCR_RECT CurClip;}SCR_STATE;
59 #endif
60 #define ScrRect ((SCR_RECT*const)(_rom_call_addr(2F)))
61 #define BitmapGet _rom_call(void,(const SCR_RECT*,void*),185)
62 #define BitmapInit _rom_call(void,(const SCR_RECT*,void*),186)
63 #define BitmapPut _rom_call(void,(short,short,const void*,const SCR_RECT*,short),187)
64 #define BitmapSize _rom_call(unsigned short,(const SCR_RECT*),188)
65 #define ClrScr _rom_call(void,(void),19E)
66 #define ClearScreen ClrScr
67 #define DisplayOff() (pokeIO_bclr(0x600015,0))
68 #define DisplayOn() (pokeIO_bset(0x600015,0))
69 #define DrawChar _rom_call(void,(short,short,char,short),1A4)
70 #define DrawClipChar _rom_call(void,(short,short,short,const SCR_RECT*,short),191)
71 #define DrawClipEllipse _rom_call(void,(short,short,short,short,const SCR_RECT*,short),192)
72 #define DrawClipLine _rom_call(void,(const WIN_RECT*,const SCR_RECT*,short),193)
73 #define DrawClipPix _rom_call(void,(short,short),194)
74 #define DrawClipRect _rom_call(void,(const WIN_RECT*,const SCR_RECT*,short),195)
75 #define DrawFkey _rom_call(void,(short,short,short,short),1A5)
76 #define DrawIcon _rom_call(void,(short,short,const void*,short),1A6)
77 #define DrawLine _rom_call(void,(short,short,short,short,short),1A7)
78 #define DrawMultiLines _rom_call(void,(short,short,const void*),196)
79 #define DrawPix _rom_call(void,(short,short,short),1A8)
80 #define DrawStr _rom_call(void,(short,short,const char*,short),1A9)
81 #define DrawStrXY DrawStr
82 #define DrawStrWidth _rom_call(short,(const char*,short),197)
83 #define FillLines2 _rom_call(void,(const WIN_RECT*,const WIN_RECT*,const SCR_RECT*,short),199)
84 #define FillTriangle _rom_call(void,(short,short,short,short,short,short,const SCR_RECT*,short),198)
85 #define FontCharWidth _rom_call(short,(short),190)
86 #define FontGetSys _rom_call(unsigned char,(void),18E)
87 #define FontSetSys _rom_call(unsigned char,(short),18F)
88 #define GetPix _rom_call(short,(short,short),19F)
89 #define LCD_restore(b) ((void)(_rom_call(void,(),26A)(LCD_MEM,(const void*)(b),(long)LCD_SIZE)))
90 #define LCD_save(b) ((void)(_rom_call(void,(),26A)((void*)(b),LCD_MEM,(long)LCD_SIZE)))
91 #define LineTo _rom_call(void,(short,short),19C)
92 #define DrawTo LineTo
93 #define MakeWinRect _rom_call(WIN_RECT*,(short,short,short,short),2C)
94 #define MoveTo _rom_call(void,(short,short),19D)
95 #define PortRestore _rom_call(void,(void),1A3)
96 #define PortSet _rom_call(void,(void*,short,short),1A2)
97 #define QScrRectOverlap _rom_call(short,(const SCR_RECT*,const SCR_RECT*),18D)
98 #define RestoreScrState _rom_call(void,(const void*),1A1)
99 #define SaveScrState _rom_call(void,(void*),1A0)
100 #define ScrRectFill _rom_call(void,(const SCR_RECT*,const SCR_RECT*,short),189)
101 #define ScrRectOverlap _rom_call(short,(const SCR_RECT*,const SCR_RECT*,SCR_RECT*),18A)
102 #define ScrRectScroll _rom_call(void,(const SCR_RECT*,const SCR_RECT*,short,short),18B)
103 #define ScrRectShift _rom_call(void,(const SCR_RECT*,const SCR_RECT*,short,short),18C)
104 #define ScrToHome _rom_call(SCR_RECT*,(SCR_RECT*),2E)
105 #define ScrToWin _rom_call(WIN_RECT*,(const SCR_RECT*),2D)
106 #define SetCurAttr _rom_call(short,(short),19A)
107 #define SetCurClip _rom_call(void,(const SCR_RECT*),19B)
108 #if MIN_AMS>=200
109 #define CalcBitmapSize _rom_call(unsigned short,(BITMAP*),3EF)
110 #define ClientToScr _rom_call(void,(const SCR_RECT*,const SCR_RECT*,SCR_RECT*),42C)
111 #define DrawStrWidthP _rom_call(unsigned short,(const char*,short,short),3EE)
112 #define MakeScrRect _rom_call(SCR_RECT*,(short,short,short,short,SCR_RECT*),42D)
113 #endif
114 /* End Auto-Generated Part */
115 
116 #define ScreenClear ClrScr
117 
118 #endif
119