
#var BITMAP_HDR_SIZE D(4)
#var LCD_MEM D(((void*)0x4C00))
#var LCD_SIZE D(3840)
#var A_REVERSE D(0)
#var A_NORMAL D(1)
#var A_XOR D(2)
#var A_SHADED D(3)
#var A_REPLACE D(4)
#var A_OR D(5)
#var A_AND D(6)
#var A_THICK1 D(7)
#var A_SHADE_V D(8)
#var A_SHADE_H D(9)
#var A_SHADE_NS D(10)
#var A_SHADE_PS D(11)

#var BITMAP typedef struct{unsigned short NumRows,NumCols;unsigned char Data[];}BITMAP;
#var FALSE D(0)
#var TRUE D(1)

#var B_NORMAL D(16)
#var B_ROUNDED D(32)
#var B_DOUBLE D(64)
#var B_CUT D(128)

#var F_4x6 D(0)
#var F_6x8 D(1)
#var F_8x10 D(2)

#var ICON typedef struct{unsigned short i[16];}ICON;
#var LCD_BUFFER typedef char LCD_BUFFER[LCD_SIZE];
#var MULTI_LINE typedef struct{unsigned char Count;struct{unsigned char Attr,x0,y0,x1,y1;}Data[];}MULTI_LINE;
#var pICON typedef unsigned short*pICON;
#var SCR_COORDS typedef unsigned char SCR_COORDS;
#var SCR_RECT typedef union{struct{unsigned char x0,y0,x1,y1;}xy;unsigned long l;}SCR_RECT;
#var SCR_STATE typedef struct{void*ScrAddr;unsigned char XMax,YMax;short CurFont,CurAttr,CurX,CurY;SCR_RECT CurClip;}SCR_STATE;
#var WIN_COORDS typedef short WIN_COORDS;
#var WIN_RECT typedef struct{short x0,y0,x1,y1;}WIN_RECT;
#var ScrRect D(((SCR_RECT*const)(_rom_call_addr(2F))))
#var BitmapGet D(_rom_call(void,(const SCR_RECT*,void*),185))
#var BitmapInit D(_rom_call(void,(const SCR_RECT*,void*),186))
#var BitmapPut D(_rom_call(void,(short,short,const void*,const SCR_RECT*,short),187))
#var BitmapSize D(_rom_call(unsigned short,(const SCR_RECT*),188))
#var ClrScr D(_rom_call(void,(void),19E))
#var ClearScreen D(ClrScr)
#var DisplayOff() D((pokeIO_bclr(0x600015,0)))
#var DisplayOn() D((pokeIO_bset(0x600015,0)))
#var DrawChar D(_rom_call(void,(short,short,char,short),1A4))
#var DrawClipChar D(_rom_call(void,(short,short,short,const SCR_RECT*,short),191))
#var DrawClipEllipse D(_rom_call(void,(short,short,short,short,const SCR_RECT*,short),192))
#var DrawClipLine D(_rom_call(void,(const WIN_RECT*,const SCR_RECT*,short),193))
#var DrawClipPix D(_rom_call(void,(short,short),194))
#var DrawClipRect D(_rom_call(void,(const WIN_RECT*,const SCR_RECT*,short),195))
#var DrawFkey D(_rom_call(void,(short,short,short,short),1A5))
#var DrawIcon D(_rom_call(void,(short,short,const void*,short),1A6))
#var DrawLine D(_rom_call(void,(short,short,short,short,short),1A7))
#var DrawMultiLines D(_rom_call(void,(short,short,const void*),196))
#var DrawPix D(_rom_call(void,(short,short,short),1A8))
#var DrawStr D(_rom_call(void,(short,short,const char*,short),1A9))
#var DrawStrXY D(DrawStr)
#var DrawStrWidth D(_rom_call(short,(const char*,short),197))
#var DrawTo D(_rom_call(void,(short,short),19C))
#var FillLines2 D(_rom_call(void,(const WIN_RECT*,const WIN_RECT*,const SCR_RECT*,short),199))
#var FillTriangle D(_rom_call(void,(short,short,short,short,short,short,const SCR_RECT*,short),198))
#var FontCharWidth D(_rom_call(short,(short),190))
#var FontGetSys D(_rom_call(unsigned char,(void),18E))
#var FontSetSys D(_rom_call(unsigned char,(short),18F))
#var GetPix D(_rom_call(short,(short,short),19F))
#var LCD_restore(b) D(((void)(_rom_call(void,(),26A)(LCD_MEM,(const void*)(b),(long)LCD_SIZE))))
#var LCD_save(b) D(((void)(_rom_call(void,(),26A)((void*)(b),LCD_MEM,(long)LCD_SIZE))))
#var LineTo D(_rom_call(void,(short,short),19C))
#var MakeWinRect D(_rom_call(WIN_RECT*,(short,short,short,short),2C))
#var MoveTo D(_rom_call(void,(short,short),19D))
#var PortRestore D(_rom_call(void,(void),1A3))
#var PortSet D(_rom_call(void,(void*,short,short),1A2))
#var QScrRectOverlap D(_rom_call(short,(const SCR_RECT*,const SCR_RECT*),18D))
#var RestoreScrState D(_rom_call(void,(const void*),1A1))
#var SaveScrState D(_rom_call(void,(void*),1A0))
#var ScrRectFill D(_rom_call(void,(const SCR_RECT*,const SCR_RECT*,short),189))
#var ScrRectOverlap D(_rom_call(short,(const SCR_RECT*,const SCR_RECT*,SCR_RECT*),18A))
#var ScrRectScroll D(_rom_call(void,(const SCR_RECT*,const SCR_RECT*,short,short),18B))
#var ScrRectShift D(_rom_call(void,(const SCR_RECT*,const SCR_RECT*,short,short),18C))
#var ScrToHome D(_rom_call(SCR_RECT*,(SCR_RECT*),2E))
#var ScrToWin D(_rom_call(WIN_RECT*,(const SCR_RECT*),2D))
#var SetCurAttr D(_rom_call(short,(short),19A))
#var SetCurClip D(_rom_call(void,(const SCR_RECT*),19B))
