home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #5 / Amiga Plus CD - 2000 - No. 5.iso / Tools / Dev / FPSE_src / system / amiga / plugin / gpu / poly2.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-01-01  |  1.9 KB  |  116 lines

  1. #ifndef POLY2_H
  2. #define POLY2_H
  3.  
  4. typedef struct {
  5. #ifdef MSB_FIRST
  6.     UINT8 code,b,g,r;
  7. #else
  8.     UINT8 r,g,b,code;
  9. #endif
  10. } COLOR;
  11.  
  12. typedef struct {
  13.     INT32 r,g,b;
  14. } LCOLOR;
  15.  
  16. typedef struct {
  17.     INT32 x, u, v;
  18.     LCOLOR c;
  19. } EDGE;
  20.  
  21. typedef struct {
  22. #ifdef MSB_FIRST
  23.     INT16 y,x;
  24. #else
  25.     INT16 x,y;
  26. #endif
  27. } POINT_F; /* flat point */
  28.  
  29. typedef struct {
  30.     COLOR c;
  31. #ifdef MSB_FIRST
  32.     INT16 y,x;
  33. #else
  34.     INT16 x,y;
  35. #endif
  36. } POINT_G; /* glow point */
  37.  
  38. typedef struct {
  39. #ifdef MSB_FIRST
  40.     INT16  y,x;
  41.     UINT16 pad;
  42.     UINT8  v,u;
  43. #else
  44.     INT16  x,y;
  45.     UINT8  u,v;
  46.     UINT16 pad;
  47. #endif
  48. } POINT_FT; /* flat textured point */
  49.  
  50. typedef struct {
  51.      COLOR  c;
  52. #ifdef MSB_FIRST
  53.      INT16  y,x;
  54.      UINT16 pad;
  55.      UINT8  v,u;
  56. #else
  57.      INT16  x,y;
  58.      UINT8  u,v;
  59.      UINT16 pad;
  60. #endif
  61. } POINT_GT; /* grow textured point */
  62.  
  63. #include "prim2.h"
  64.  
  65. // Poly function sizes
  66. #define NbF3        4
  67. #define NbF4        5
  68. #define NbFT3       7
  69. #define NbFT4       9
  70. #define NbG3        6
  71. #define NbG4        8
  72. #define NbGT3       9
  73. #define NbGT4       12
  74.  
  75. // Line functions sizes
  76. #define NbF2        3
  77. #define NbG2        4
  78.  
  79. // Sprite functions sizes
  80. #define NbSPRT      4
  81. #define NbSPRTx     3
  82.  
  83. // Fill functions sizes
  84. #define NbFILL      3
  85. #define NbTILEx     2
  86.  
  87. int gpu_polyF3(PolyF3 *prim);
  88. int gpu_polyF4(PolyF4 *prim);
  89. int gpu_polyG3(PolyG3 *prim);
  90. int gpu_polyG4(PolyG4 *prim);
  91. int gpu_polyFT3(PolyFT3 *prim);
  92. int gpu_polyFT4(PolyFT4 *prim);
  93. int gpu_polyGT3(PolyGT3 *prim);
  94. int gpu_polyGT4(PolyGT4 *prim);
  95.  
  96. int gpu_lineF2(LineF2 *prim);
  97. int gpu_lineF(LineF3 *prim);
  98. int gpu_lineG2(LineG2 *prim);
  99. int gpu_lineG(LineG3 *prim);
  100.  
  101. int gpu_sprt(Sprt *prim);
  102. int gpu_sprt8(Sprt *prim);
  103. int gpu_sprt16(Sprt *prim);
  104.  
  105. int gpu_tile(Tile *prim);
  106. int gpu_tile1(Tile1 *prim);
  107. int gpu_tile8(Tile8 *prim);
  108. int gpu_tile16(Tile16 *prim);
  109.  
  110. int gpu_fill(Fill *prim);
  111.  
  112. void DrawInit(void);
  113.  
  114. void move(int x0,int y0,int x1,int y1,int w,int h);
  115.  
  116. #endif