home *** CD-ROM | disk | FTP | other *** search
/ RISC DISC 2 / RISC_DISC_2.iso / pd_share / program / code / desklib / DeskLib / !DeskLib / h / GFX < prev    next >
Encoding:
Text File  |  1995-09-02  |  2.6 KB  |  87 lines

  1.  
  2. #ifndef __dl_gfx_h
  3. #define __dl_gfx_h
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. #define plot_SOLIDBOTH 0x00
  8. #define plot_SOLIDEXFINAL 0x08
  9. #define plot_DOTTEDBOTH 0x10
  10. #define plot_DOTTEDEXFINAL 0x18
  11. #define plot_SOLIDEXINIT 0x20
  12. #define plot_SOLIDEXBOTH 0x28
  13. #define plot_DOTTEDEXINIT 0x30
  14. #define plot_DOTTEDEXBOTH 0x38
  15. #define plot_POINT 0x40
  16. #define plot_HHORZLINEFILLNB 0x48
  17. #define plot_TRIANGLEFILL 0x50
  18. #define plot_HORIZLINEFILLB 0x58
  19. #define plot_RECTANGLEFILL 0x60
  20. #define plot_HORIZLINEFILLF 0x68
  21. #define plot_PARALLELFILL 0x70
  22. #define plot_HORIZLINEFILLNF 0x78
  23. #define plot_FLOODTOBACK 0x80
  24. #define plot_FLOODTOFORE 0x88
  25. #define plot_CIRCLE 0x90
  26. #define plot_CIRCLEFILL 0x98
  27. #define plot_CIRCLEARC 0xA0
  28. #define plot_SEGMENT 0xA8
  29. #define plot_SECTOR 0xB0
  30. #define plot_BLOCK 0xB8
  31. #define plot_ELLIPSE 0xC0
  32. #define plot_ELLIPSEFILL 0xC8
  33. #define plot_GRAPHICSCHAR 0xD0
  34. #define plot_SPRITE 0xE8
  35. #define plot_MOVECURSORREL 0
  36. #define plot_DRAWRELFORE 1
  37. #define plot_DRAWRELINVERSE 2
  38. #define plot_DRAWRELBACK 3
  39. #define plot_MOVECURSORABS 4
  40. #define plot_DRAWABSFORE 5
  41. #define plot_DRAWABSINVERSE 6
  42. #define plot_DRAWABSBACK 7
  43. #define plot_BMOVEREL 0
  44. #define plot_BMOVERECTREL 1
  45. #define plot_BCOPYRECTREL 2
  46. #define plot_BMOVEABS 4
  47. #define plot_BMOVERECTABS 5
  48. #define plot_BCOPYRECTABS 6
  49. extern void GFX_Plot(int plotcode, int x, int y);
  50. #define GFX_Move(x, y) GFX_Plot(plot_SOLIDBOTH + plot_MOVECURSORABS, x, y)
  51. #define GFX_MoveBy(x, y) GFX_Plot(plot_SOLIDBOTH + plot_MOVECURSORREL, x, y)
  52. #define GFX_PlotPoint(x, y) GFX_Plot(plot_POINT + plot_DRAWABSFORE, x, y)
  53. #define GFX_PlotPointBy(x, y) GFX_Plot(plot_POINT + plot_DRAWRELFORE, x, y)
  54. #define GFX_Draw(x, y) GFX_Plot(plot_SOLIDBOTH + plot_DRAWABSFORE, x, y)
  55. #define GFX_DrawBy(x, y) GFX_Plot(plot_SOLIDBOTH + plot_DRAWRELFORE, x, y)
  56. extern void GFX_Rectangle(int x, int y, int w, int h);
  57. #define GFX_RectangleFill(x, y, w, h) \
  58. { \
  59. GFX_Move(x, y); \
  60. GFX_Plot(plot_RECTANGLEFILL + plot_DRAWRELFORE, w, h); \
  61. }
  62. #define GFX_Circle(x, y, r) \
  63. { \
  64. GFX_Move(x, y); \
  65. GFX_Plot(plot_CIRCLE + plot_DRAWRELFORE, (r), 0); \
  66. }
  67. #define GFX_CircleFill(x, y, r) \
  68. { \
  69. GFX_Move(x, y); \
  70. GFX_Plot(plot_CIRCLEFILL + plot_DRAWRELFORE, (r), 0); \
  71. }
  72. extern void GFX_CLG(void);
  73. extern void GFX_VDU(char ch);
  74. #define VDU(C) GFX_VDU(C)
  75. #define GFX_GCOL(A,C) {GFX_VDU(18); GFX_VDU(A); GFX_VDU(C);}
  76. #define GFX_Mode(M) {GFX_VDU(22); GFX_VDU(M);}
  77. #define GFX_SetOrigin(x,y) {short a=(x),b=(y); GFX_VDU(29); \
  78. GFX_VDU(a & 0xff); GFX_VDU((a>>8) & 0xff); \
  79. GFX_VDU(b & 0xff); GFX_VDU((b>>8) & 0xff);}
  80. extern void GFX_Write0(char *string);
  81. extern void GFX_WriteN(char *string, int numchars);
  82. extern void GFX_Wait(void);
  83. #ifdef __cplusplus
  84. }
  85. #endif
  86. #endif
  87.