home *** CD-ROM | disk | FTP | other *** search
-
- #ifndef __dl_gfx_h
- #define __dl_gfx_h
- #ifdef __cplusplus
- extern "C" {
- #endif
- #define plot_SOLIDBOTH 0x00
- #define plot_SOLIDEXFINAL 0x08
- #define plot_DOTTEDBOTH 0x10
- #define plot_DOTTEDEXFINAL 0x18
- #define plot_SOLIDEXINIT 0x20
- #define plot_SOLIDEXBOTH 0x28
- #define plot_DOTTEDEXINIT 0x30
- #define plot_DOTTEDEXBOTH 0x38
- #define plot_POINT 0x40
- #define plot_HHORZLINEFILLNB 0x48
- #define plot_TRIANGLEFILL 0x50
- #define plot_HORIZLINEFILLB 0x58
- #define plot_RECTANGLEFILL 0x60
- #define plot_HORIZLINEFILLF 0x68
- #define plot_PARALLELFILL 0x70
- #define plot_HORIZLINEFILLNF 0x78
- #define plot_FLOODTOBACK 0x80
- #define plot_FLOODTOFORE 0x88
- #define plot_CIRCLE 0x90
- #define plot_CIRCLEFILL 0x98
- #define plot_CIRCLEARC 0xA0
- #define plot_SEGMENT 0xA8
- #define plot_SECTOR 0xB0
- #define plot_BLOCK 0xB8
- #define plot_ELLIPSE 0xC0
- #define plot_ELLIPSEFILL 0xC8
- #define plot_GRAPHICSCHAR 0xD0
- #define plot_SPRITE 0xE8
- #define plot_MOVECURSORREL 0
- #define plot_DRAWRELFORE 1
- #define plot_DRAWRELINVERSE 2
- #define plot_DRAWRELBACK 3
- #define plot_MOVECURSORABS 4
- #define plot_DRAWABSFORE 5
- #define plot_DRAWABSINVERSE 6
- #define plot_DRAWABSBACK 7
- #define plot_BMOVEREL 0
- #define plot_BMOVERECTREL 1
- #define plot_BCOPYRECTREL 2
- #define plot_BMOVEABS 4
- #define plot_BMOVERECTABS 5
- #define plot_BCOPYRECTABS 6
- extern void GFX_Plot(int plotcode, int x, int y);
- #define GFX_Move(x, y) GFX_Plot(plot_SOLIDBOTH + plot_MOVECURSORABS, x, y)
- #define GFX_MoveBy(x, y) GFX_Plot(plot_SOLIDBOTH + plot_MOVECURSORREL, x, y)
- #define GFX_PlotPoint(x, y) GFX_Plot(plot_POINT + plot_DRAWABSFORE, x, y)
- #define GFX_PlotPointBy(x, y) GFX_Plot(plot_POINT + plot_DRAWRELFORE, x, y)
- #define GFX_Draw(x, y) GFX_Plot(plot_SOLIDBOTH + plot_DRAWABSFORE, x, y)
- #define GFX_DrawBy(x, y) GFX_Plot(plot_SOLIDBOTH + plot_DRAWRELFORE, x, y)
- extern void GFX_Rectangle(int x, int y, int w, int h);
- #define GFX_RectangleFill(x, y, w, h) \
- { \
- GFX_Move(x, y); \
- GFX_Plot(plot_RECTANGLEFILL + plot_DRAWRELFORE, w, h); \
- }
- #define GFX_Circle(x, y, r) \
- { \
- GFX_Move(x, y); \
- GFX_Plot(plot_CIRCLE + plot_DRAWRELFORE, (r), 0); \
- }
- #define GFX_CircleFill(x, y, r) \
- { \
- GFX_Move(x, y); \
- GFX_Plot(plot_CIRCLEFILL + plot_DRAWRELFORE, (r), 0); \
- }
- extern void GFX_CLG(void);
- extern void GFX_VDU(char ch);
- #define VDU(C) GFX_VDU(C)
- #define GFX_GCOL(A,C) {GFX_VDU(18); GFX_VDU(A); GFX_VDU(C);}
- #define GFX_Mode(M) {GFX_VDU(22); GFX_VDU(M);}
- #define GFX_SetOrigin(x,y) {short a=(x),b=(y); GFX_VDU(29); \
- GFX_VDU(a & 0xff); GFX_VDU((a>>8) & 0xff); \
- GFX_VDU(b & 0xff); GFX_VDU((b>>8) & 0xff);}
- extern void GFX_Write0(char *string);
- extern void GFX_WriteN(char *string, int numchars);
- extern void GFX_Wait(void);
- #ifdef __cplusplus
- }
- #endif
- #endif
-