Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

873 lines
38 KiB

  1. /*/****************************************************************************
  2. * name: caddi.h
  3. *
  4. * description: This file contains all the definitions related to the CADDI
  5. * interface as specified in CADDI 1.10. As CADDI is coded partly
  6. * in C and in ASM the permitted definitions are simple #define.
  7. *
  8. * designed:
  9. * last modified: $Author: unknown $, $Date: 94/11/24 11:51:39 $
  10. *
  11. * version: $Id: CADDI.H 1.19 94/11/24 11:51:39 unknown Exp $
  12. *
  13. ******************************************************************************/
  14. /******************************************************************************
  15. This file only contains #defines in order to be use by C ans ASM programs.
  16. (for ASM a simple script translates #define in EQU). The format is
  17. "structure_name"_"field_name" there is also a ..._S definition for each.
  18. NOTE: _S is given in bytes
  19. 31 CHARACTERS MAXIMUM for a name
  20. As our convention defines a type name in upper case and a field name in lower
  21. case (with first letter of names in upper case) this will be respected here.
  22. Ex. in C typedef struct { float Type, COLOR3 AmbientCol} AMBIENT_LIGHT;
  23. #define AMBIENT_LIGHT_Type 0
  24. #define AMBIENT_LIGHT_Type_S FLOAT_S
  25. #define AMBIENT_LIGHT_AmbientCol (AMBIENT_LIGHT_Type + FLOAT_S)
  26. #define AMBIENT_LIGHT_AmbientCol_S COLOR3_S
  27. #define AMBIENT_LIGHT_S (AMBIENT_LIGHT_AmbientCol + COLOR3_S)
  28. ******************************************************************************/
  29. /******************************************************************************
  30. CADDI data structures definitions as per CADDI specification 1.10
  31. */
  32. // also in defbind.h
  33. #define CHAR_S 1
  34. #define SHORT_S 2
  35. #define LONG_S 4
  36. #define FLOAT_S 4
  37. #define UINTPTR_S (sizeof(UINT_PTR))
  38. #define RECT_Left 0
  39. #define RECT_Left_S LONG_S
  40. #define RECT_Top (RECT_Left + LONG_S)
  41. #define RECT_Top_S LONG_S
  42. #define RECT_Right (RECT_Top + LONG_S)
  43. #define RECT_Right_S LONG_S
  44. #define RECT_Bottom (RECT_Right + LONG_S)
  45. #define RECT_Bottom_S LONG_S
  46. #define RECT_S (RECT_Bottom + LONG_S)
  47. #define IPOINT2_Packed_xy 0
  48. #define IPOINT2_Packed_xy_S LONG_S
  49. #define IPOINT2_S (IPOINT2_Packed_xy + LONG_S)
  50. #define IPOINT2_32_X 0
  51. #define IPOINT2_32_X_S LONG_S
  52. #define IPOINT2_32_Y (IPOINT2_32_X + LONG_S)
  53. #define IPOINT2_32_Y_S LONG_S
  54. #define IPOINT2_32_S (IPOINT2_32_Y + LONG_S)
  55. #define NFLOAT_S FLOAT_S
  56. #define IFLOAT_S FLOAT_S
  57. #define MATRIX4_M 0
  58. #define MATRIX4_M_S (16 * FLOAT_S)
  59. #define MATRIX4_M11 MATRIX4_M
  60. #define MATRIX4_M12 (MATRIX4_M11 + FLOAT_S)
  61. #define MATRIX4_M13 (MATRIX4_M12 + FLOAT_S)
  62. #define MATRIX4_M14 (MATRIX4_M13 + FLOAT_S)
  63. #define MATRIX4_M21 (MATRIX4_M14 + FLOAT_S)
  64. #define MATRIX4_M22 (MATRIX4_M21 + FLOAT_S)
  65. #define MATRIX4_M23 (MATRIX4_M22 + FLOAT_S)
  66. #define MATRIX4_M24 (MATRIX4_M23 + FLOAT_S)
  67. #define MATRIX4_M31 (MATRIX4_M24 + FLOAT_S)
  68. #define MATRIX4_M32 (MATRIX4_M31 + FLOAT_S)
  69. #define MATRIX4_M33 (MATRIX4_M32 + FLOAT_S)
  70. #define MATRIX4_M34 (MATRIX4_M33 + FLOAT_S)
  71. #define MATRIX4_M41 (MATRIX4_M34 + FLOAT_S)
  72. #define MATRIX4_M42 (MATRIX4_M41 + FLOAT_S)
  73. #define MATRIX4_M43 (MATRIX4_M42 + FLOAT_S)
  74. #define MATRIX4_M44 (MATRIX4_M43 + FLOAT_S)
  75. #define MATRIX4_S (MATRIX4_M + (16 * FLOAT_S))
  76. #define POINT3_X 0
  77. #define POINT3_X_S FLOAT_S
  78. #define POINT3_Y (POINT3_X + FLOAT_S)
  79. #define POINT3_Y_S FLOAT_S
  80. #define POINT3_Z (POINT3_Y + FLOAT_S)
  81. #define POINT3_Z_S FLOAT_S
  82. #define POINT3_S (POINT3_Z + FLOAT_S)
  83. #define NORM3_X 0
  84. #define NORM3_X_S NFLOAT_S
  85. #define NORM3_Y (NORM3_X + NFLOAT_S)
  86. #define NORM3_Y_S NFLOAT_S
  87. #define NORM3_Z (NORM3_Y + NFLOAT_S)
  88. #define NORM3_Z_S NFLOAT_S
  89. #define NORM3_S (NORM3_Z + NFLOAT_S)
  90. #define COLOR3_Red 0
  91. #define COLOR3_Red_S NFLOAT_S
  92. #define COLOR3_Green (COLOR3_Red + NFLOAT_S)
  93. #define COLOR3_Green_S NFLOAT_S
  94. #define COLOR3_Blue (COLOR3_Green + NFLOAT_S)
  95. #define COLOR3_Blue_S NFLOAT_S
  96. #define COLOR3_S (COLOR3_Blue + NFLOAT_S)
  97. #define COLORI_Index 0
  98. #define COLORI_Index_S LONG_S
  99. #define COLORI_Reserved1 (COLORI_Index + LONG_S)
  100. #define COLORI_Reserved1_S LONG_S
  101. #define COLORI_Reserved2 (COLORI_Reserved1 + LONG_S)
  102. #define COLORI_Reserved2_S LONG_S
  103. #define COLORI_S (COLORI_Reserved2 + LONG_S)
  104. #define CLIPLIST_Count 0
  105. #define CLIPLIST_Count_S LONG_S
  106. #define CLIPLIST_Reserved0 (CLIPLIST_Count + LONG_S)
  107. #define CLIPLIST_Reserved0_S LONG_S
  108. #define CLIPLIST_Reserved1 (CLIPLIST_Reserved0 + LONG_S)
  109. #define CLIPLIST_Reserved1_S LONG_S
  110. #define CLIPLIST_Reserved2 (CLIPLIST_Reserved1 + LONG_S)
  111. #define CLIPLIST_Reserved2_S LONG_S
  112. #define CLIPLIST_Rects (CLIPLIST_Reserved2 + LONG_S)
  113. #define CLIPLIST_Rects_S RECT_S
  114. #define CLIPLIST_Bounds_S RECT_S
  115. #define CLIPLIST_S (CLIPLIST_Rects + RECT_S + RECT_S)
  116. #define NULL_LIGHT_Type 0
  117. #define NULL_LIGHT_Type_S FLOAT_S
  118. #define NULL_LIGHT_S (NULL_LIGHT_Type + FLOAT_S)
  119. #define AMBIENT_LIGHT_Type 0
  120. #define AMBIENT_LIGHT_Type_S FLOAT_S
  121. #define AMBIENT_LIGHT_AmbientCol (AMBIENT_LIGHT_Type + FLOAT_S)
  122. #define AMBIENT_LIGHT_AmbientCol_S COLOR3_S
  123. #define AMBIENT_LIGHT_S (AMBIENT_LIGHT_AmbientCol + COLOR3_S)
  124. #define DIRECTIONAL_LIGHT_Type 0
  125. #define DIRECTIONAL_LIGHT_Type_S FLOAT_S
  126. #define DIRECTIONAL_LIGHT_DiffuseCol (DIRECTIONAL_LIGHT_Type + FLOAT_S)
  127. #define DIRECTIONAL_LIGHT_DiffuseCol_S COLOR3_S
  128. #define DIRECTIONAL_LIGHT_SpecularCol (DIRECTIONAL_LIGHT_DiffuseCol + COLOR3_S)
  129. #define DIRECTIONAL_LIGHT_SpecularCol_S COLOR3_S
  130. #define DIRECTIONAL_LIGHT_Direction (DIRECTIONAL_LIGHT_SpecularCol + COLOR3_S)
  131. #define DIRECTIONAL_LIGHT_Direction_S NORM3_S
  132. #define DIRECTIONAL_LIGHT_S (DIRECTIONAL_LIGHT_Direction + NORM3_S)
  133. #define POSITIONAL_LIGHT_Type 0
  134. #define POSITIONAL_LIGHT_Type_S FLOAT_S
  135. #define POSITIONAL_LIGHT_DiffuseCol (POSITIONAL_LIGHT_Type + FLOAT_S)
  136. #define POSITIONAL_LIGHT_DiffuseCol_S COLOR3_S
  137. #define POSITIONAL_LIGHT_SpecularCol (POSITIONAL_LIGHT_DiffuseCol + COLOR3_S)
  138. #define POSITIONAL_LIGHT_SpecularCol_S COLOR3_S
  139. #define POSITIONAL_LIGHT_Position (POSITIONAL_LIGHT_SpecularCol + COLOR3_S)
  140. #define POSITIONAL_LIGHT_Position_S POINT3_S
  141. #define POSITIONAL_LIGHT_AttGlobal (POSITIONAL_LIGHT_Position + POINT3_S)
  142. #define POSITIONAL_LIGHT_AttGlobal_S NFLOAT_S
  143. #define POSITIONAL_LIGHT_AttDist (POSITIONAL_LIGHT_AttGlobal + NFLOAT_S)
  144. #define POSITIONAL_LIGHT_AttDist_S NFLOAT_S
  145. #define POSITIONAL_LIGHT_S (POSITIONAL_LIGHT_AttDist + NFLOAT_S)
  146. #define SPOT_LIGHT_Type 0
  147. #define SPOT_LIGHT_Type_S FLOAT_S
  148. #define SPOT_LIGHT_DiffuseCol (SPOT_LIGHT_Type + FLOAT_S)
  149. #define SPOT_LIGHT_DiffuseCol_S COLOR3_S
  150. #define SPOT_LIGHT_SpecularCol (SPOT_LIGHT_DiffuseCol + COLOR3_S)
  151. #define SPOT_LIGHT_SpecularCol_S COLOR3_S
  152. #define SPOT_LIGHT_Position (SPOT_LIGHT_SpecularCol + COLOR3_S)
  153. #define SPOT_LIGHT_Position_S POINT3_S
  154. #define SPOT_LIGHT_Direction (SPOT_LIGHT_Position + POINT3_S)
  155. #define SPOT_LIGHT_Direction_S NORM3_S
  156. #define SPOT_LIGHT_AttGlobal (SPOT_LIGHT_Direction + NORM3_S)
  157. #define SPOT_LIGHT_AttGlobal_S NFLOAT_S
  158. #define SPOT_LIGHT_AttDist (SPOT_LIGHT_AttGlobal + NFLOAT_S)
  159. #define SPOT_LIGHT_AttDist_S NFLOAT_S
  160. #define SPOT_LIGHT_ConeExp (SPOT_LIGHT_AttDist + NFLOAT_S)
  161. #define SPOT_LIGHT_ConeExp_S IFLOAT_S
  162. #define SPOT_LIGHT_CosMaxIAngle (SPOT_LIGHT_ConeExp + IFLOAT_S)
  163. #define SPOT_LIGHT_CosMaxIAngle_S NFLOAT_S
  164. #define SPOT_LIGHT_CosAttIAngle (SPOT_LIGHT_CosMaxIAngle + NFLOAT_S)
  165. #define SPOT_LIGHT_CosAttIAngle_S NFLOAT_S
  166. #define SPOT_LIGHT_S (SPOT_LIGHT_CosAttIAngle + NFLOAT_S)
  167. /*****************************************************************************/
  168. /******************************************************************************
  169. CADDI opcodes definitions as per CADDI specification 1.10
  170. */
  171. /*** CADDI General Opcodes ***/
  172. #define CLEAR 0x0004
  173. #define DONE 0x0001
  174. #define INITRC 0x0E00
  175. #define NOOP 0x0501
  176. #define SETBUFFERCONFIGURATION 0x0300
  177. #define SETBGCOLOR 0x1800
  178. #define SETCLIPLIST 0x0500
  179. #define SETENDPOINT 0x1700
  180. #define SETFGCOLOR 0x0402
  181. #define SETFILLPATTERN 0x1600
  182. #define SETLINESTYLE 0x0502
  183. #define SETLOGICOP 0x0800
  184. #define SETTRANSPARENCY 0x1400
  185. #define SETTRIVIALIN 0x1300
  186. #define SYNC 0x0301
  187. #define SETOUTLINE 0x1900
  188. #define SETPLANEMASK 0x0900
  189. #define SETASYNCHROUNOUSSWAP 0x1a00
  190. #define SETLINESTYLEOFFSET 0x0600
  191. /*** CADDI Screen Opcodes ***/
  192. #define RENDERSCPOLYLINE 0x0304
  193. #define RENDERSCPOLYGON 0x0404
  194. #define SPANLINE 0x0204
  195. /*** CADDI 2D Opcodes ***/
  196. #define RENDER2DMULTIPOLYLINE 0x0602
  197. #define RENDER2DMULTIPOLYLINE32 0x0a02
  198. #define RENDER2DPOLYGON 0x0302
  199. #define RENDER2DPOLYGON32 0x0902
  200. #define SET2DVIEWPORT 0x0002
  201. #define SET2DWINDOW 0x0102
  202. #define SET2DWINDOW32 0x0702
  203. /*** CADDI 3D Opcodes ***/
  204. #define CHANGEMATRIX 0x0000
  205. #define RENDERPOLYLINE 0x0103
  206. #define RENDERPOLYQUAD 0x0203
  207. #define SETCLIP3D 0x0400
  208. #define SETLIGHTSOURCES 0x0700
  209. #define SETRENDERDATA 0x1000
  210. #define SETRENDERMODE 0x0A00
  211. #define SETSURFACEATTR 0x1100
  212. #define SETVIEWER 0x0B00
  213. #define SETZBUFFER 0x0c00
  214. #define TRIANGLE 0x0503
  215. #define RENDERPOLYTRIANGLE 0x0303
  216. /*****************************************************************************/
  217. /******************************************************************************
  218. CADDI opcodes structure definitions as per CADDI specification 1.10
  219. */
  220. #define CLEAR_Opcode 0
  221. #define CLEAR_Opcode_S SHORT_S
  222. #define CLEAR_ClearMode (CLEAR_Opcode + SHORT_S)
  223. #define CLEAR_ClearMode_S SHORT_S
  224. #define CLEAR_RcId (CLEAR_ClearMode + SHORT_S)
  225. #define CLEAR_RcId_S LONG_S
  226. #define CLEAR_ClearColor (CLEAR_RcId + LONG_S)
  227. #define CLEAR_ClearColor_S COLOR3_S
  228. #define CLEAR_ClearDepth (CLEAR_ClearColor + COLOR3_S)
  229. #define CLEAR_ClearDepth_S NFLOAT_S
  230. #define CLEAR_S (CLEAR_ClearDepth + NFLOAT_S)
  231. #define DONE_Opcode 0
  232. #define DONE_Opcode_S SHORT_S
  233. #define DONE_Null (DONE_Opcode + SHORT_S)
  234. #define DONE_Null_S CHAR_S
  235. #define DONE_Reserved (DONE_Null + CHAR_S)
  236. #define DONE_Reserved_S CHAR_S
  237. #define DONE_S (DONE_Reserved + CHAR_S)
  238. #define INITRC_Opcode 0
  239. #define INITRC_Opcode_S SHORT_S
  240. #define INITRC_Null (INITRC_Opcode + SHORT_S)
  241. #define INITRC_Null_S SHORT_S
  242. #define INITRC_RcId (INITRC_Null + SHORT_S)
  243. #define INITRC_RcId_S LONG_S
  244. #define INITRC_S (INITRC_RcId + LONG_S)
  245. #define NOOP_Opcode 0
  246. #define NOOP_Opcode_S SHORT_S
  247. #define NOOP_Len (NOOP_Opcode + SHORT_S)
  248. #define NOOP_Len_S SHORT_S
  249. #define NOOP_RcId (NOOP_Len + SHORT_S)
  250. #define NOOP_RcId_S LONG_S
  251. #define NOOP_Data (NOOP_RcId + LONG_S)
  252. #define NOOP_Data_S LONG_S
  253. #define SETBUFFERCONF_Opcode 0
  254. #define SETBUFFERCONF_Opcode_S SHORT_S
  255. #define SETBUFFERCONF_BcDisplayMode (SETBUFFERCONF_Opcode + SHORT_S)
  256. #define SETBUFFERCONF_BcDisplayMode_S CHAR_S
  257. #define SETBUFFERCONF_BcDrawMode (SETBUFFERCONF_BcDisplayMode + CHAR_S)
  258. #define SETBUFFERCONF_BcDrawMode_S CHAR_S
  259. #define SETBUFFERCONF_RcId (SETBUFFERCONF_BcDrawMode + CHAR_S)
  260. #define SETBUFFERCONF_RcId_S LONG_S
  261. #define SETBUFFERCONF_S (SETBUFFERCONF_RcId + LONG_S)
  262. #define SETBGCOLOR_Opcode 0
  263. #define SETBGCOLOR_Opcode_S SHORT_S
  264. #define SETBGCOLOR_Null (SETBGCOLOR_Opcode + SHORT_S)
  265. #define SETBGCOLOR_Null_S SHORT_S
  266. #define SETBGCOLOR_RcId (SETBGCOLOR_Null + SHORT_S)
  267. #define SETBGCOLOR_RcId_S LONG_S
  268. #define SETBGCOLOR_BgColor (SETBGCOLOR_RcId + LONG_S)
  269. #define SETBGCOLOR_BgColor_S COLOR3_S
  270. #define SETBGCOLOR_S (SETBGCOLOR_BgColor + COLOR3_S)
  271. #define SETCLIPLIST_Opcode 0
  272. #define SETCLIPLIST_Opcode_S SHORT_S
  273. #define SETCLIPLIST_LenClipList (SETCLIPLIST_Opcode + SHORT_S)
  274. #define SETCLIPLIST_LenClipList_S SHORT_S
  275. #define SETCLIPLIST_RcId (SETCLIPLIST_LenClipList + SHORT_S)
  276. #define SETCLIPLIST_RcId_S LONG_S
  277. #define SETCLIPLIST_DestId (SETCLIPLIST_RcId + LONG_S)
  278. #define SETCLIPLIST_DestId_S LONG_S
  279. #define SETCLIPLIST_ClipList (SETCLIPLIST_DestId + LONG_S)
  280. #define SETENDPOINT_Opcode 0
  281. #define SETENDPOINT_Opcode_S SHORT_S
  282. #define SETENDPOINT_EndPoint (SETENDPOINT_Opcode + SHORT_S)
  283. #define SETENDPOINT_EndPoint_S SHORT_S
  284. #define SETENDPOINT_RcId (SETENDPOINT_EndPoint + SHORT_S)
  285. #define SETENDPOINT_RcId_S LONG_S
  286. #define SETENDPOINT_S (SETENDPOINT_RcId + LONG_S)
  287. #define SETFGCOLOR_Opcode 0
  288. #define SETFGCOLOR_Opcode_S SHORT_S
  289. #define SETFGCOLOR_Null (SETFGCOLOR_Opcode + SHORT_S)
  290. #define SETFGCOLOR_Null_S SHORT_S
  291. #define SETFGCOLOR_RcId (SETFGCOLOR_Null + SHORT_S)
  292. #define SETFGCOLOR_RcId_S LONG_S
  293. #define SETFGCOLOR_FgColor (SETFGCOLOR_RcId + LONG_S)
  294. #define SETFGCOLOR_FgColor_S COLOR3_S
  295. #define SETFGCOLOR_S (SETFGCOLOR_FgColor + COLOR3_S)
  296. #define SETFILLPATTERN_Opcode 0
  297. #define SETFILLPATTERN_Opcode_S SHORT_S
  298. #define SETFILLPATTERN_PattMode (SETFILLPATTERN_Opcode + SHORT_S)
  299. #define SETFILLPATTERN_PattMode_S SHORT_S
  300. #define SETFILLPATTERN_RcId (SETFILLPATTERN_PattMode + SHORT_S)
  301. #define SETFILLPATTERN_RcId_S LONG_S
  302. #define SETFILLPATTERN_FillPatt (SETFILLPATTERN_RcId + LONG_S)
  303. #define SETFILLPATTERN_FillPatt_S (8 * CHAR_S)
  304. #define SETFILLPATTERN_S (SETFILLPATTERN_FillPatt + (8 * CHAR_S))
  305. #define SETLINESTYLE_Opcode 0
  306. #define SETLINESTYLE_Opcode_S SHORT_S
  307. #define SETLINESTYLE_LSMode (SETLINESTYLE_Opcode + SHORT_S)
  308. #define SETLINESTYLE_LSMode_S SHORT_S
  309. #define SETLINESTYLE_RcId (SETLINESTYLE_LSMode + SHORT_S)
  310. #define SETLINESTYLE_RcId_S LONG_S
  311. #define SETLINESTYLE_LineStyle (SETLINESTYLE_RcId + LONG_S)
  312. #define SETLINESTYLE_LineStyle_S LONG_S
  313. #define SETLINESTYLE_S (SETLINESTYLE_LineStyle + LONG_S)
  314. #define SETLOGICOP_Opcode 0
  315. #define SETLOGICOP_Opcode_S SHORT_S
  316. #define SETLOGICOP_LogicOp (SETLOGICOP_Opcode + SHORT_S)
  317. #define SETLOGICOP_LogicOp_S SHORT_S
  318. #define SETLOGICOP_RcId (SETLOGICOP_LogicOp + SHORT_S)
  319. #define SETLOGICOP_RcId_S LONG_S
  320. #define SETLOGICOP_S (SETLOGICOP_RcId + LONG_S)
  321. #define SETTRANSPARENCY_Opcode 0
  322. #define SETTRANSPARENCY_Opcode_S SHORT_S
  323. #define SETTRANSPARENCY_TranspMode (SETTRANSPARENCY_Opcode + SHORT_S)
  324. #define SETTRANSPARENCY_TranspMode_S SHORT_S
  325. #define SETTRANSPARENCY_RcId (SETTRANSPARENCY_TranspMode + SHORT_S)
  326. #define SETTRANSPARENCY_RcId_S LONG_S
  327. #define SETTRANSPARENCY_S (SETTRANSPARENCY_RcId + LONG_S)
  328. #define SETTRIVIALIN_Opcode 0
  329. #define SETTRIVIALIN_Opcode_S SHORT_S
  330. #define SETTRIVIALIN_TrivMode (SETTRIVIALIN_Opcode + SHORT_S)
  331. #define SETTRIVIALIN_TrivMode_S SHORT_S
  332. #define SETTRIVIALIN_RcId (SETTRIVIALIN_TrivMode + SHORT_S)
  333. #define SETTRIVIALIN_RcId_S LONG_S
  334. #define SETTRIVIALIN_S (SETTRIVIALIN_RcId + LONG_S)
  335. #define SYNC_Opcode 0
  336. #define SYNC_Opcode_S SHORT_S
  337. #define SYNC_Null (SYNC_Opcode + SHORT_S)
  338. #define SYNC_Null_S CHAR_S
  339. #define SYNC_Reserved (SYNC_Null + CHAR_S)
  340. #define SYNC_Reserved_S CHAR_S
  341. #define SYNC_RcId (SYNC_Reserved + CHAR_S)
  342. #define SYNC_RcId_S LONG_S
  343. #define SYNC_S (SYNC_RcId + LONG_S)
  344. #define RENDERSCPOLYLINE_Opcode 0
  345. #define RENDERSCPOLYLINE_Opcode_S SHORT_S
  346. #define RENDERSCPOLYLINE_Npts (RENDERSCPOLYLINE_Opcode + SHORT_S)
  347. #define RENDERSCPOLYLINE_Npts_S SHORT_S
  348. #define RENDERSCPOLYLINE_RcId (RENDERSCPOLYLINE_Npts + SHORT_S)
  349. #define RENDERSCPOLYLINE_RcId_S LONG_S
  350. #define RENDERSCPOLYLINE_Points (RENDERSCPOLYLINE_RcId + LONG_S)
  351. #define RENDERSCPOLYLINE_Points_S IPOINT2_S
  352. #define RENDERSCPOLYGON_Opcode 0
  353. #define RENDERSCPOLYGON_Opcode_S SHORT_S
  354. #define RENDERSCPOLYGON_Npts (RENDERSCPOLYGON_Opcode + SHORT_S)
  355. #define RENDERSCPOLYGON_Npts_S SHORT_S
  356. #define RENDERSCPOLYGON_RcId (RENDERSCPOLYGON_Npts + SHORT_S)
  357. #define RENDERSCPOLYGON_RcId_S LONG_S
  358. #define RENDERSCPOLYGON_Points (RENDERSCPOLYGON_RcId + LONG_S)
  359. #define RENDERSCPOLYGON_Points_S IPOINT2_S
  360. #define RENDER2DMPOLYLINE_Opcode 0
  361. #define RENDER2DMPOLYLINE_Opcode_S SHORT_S
  362. #define RENDER2DMPOLYLINE_Npts (RENDER2DMPOLYLINE_Opcode + SHORT_S)
  363. #define RENDER2DMPOLYLINE_Npts_S SHORT_S
  364. #define RENDER2DMPOLYLINE_RcId (RENDER2DMPOLYLINE_Npts + SHORT_S)
  365. #define RENDER2DMPOLYLINE_RcId_S LONG_S
  366. #define RENDER2DMPOLYLINE_Data (RENDER2DMPOLYLINE_RcId + LONG_S)
  367. #define RENDER2DMPOLYLINE_Data_S LONG_S
  368. #define RENDER2DMPOLYLINE32_Opcode 0
  369. #define RENDER2DMPOLYLINE32_Opcode_S SHORT_S
  370. #define RENDER2DMPOLYLINE32_Npts (RENDER2DMPOLYLINE32_Opcode + SHORT_S)
  371. #define RENDER2DMPOLYLINE32_Npts_S SHORT_S
  372. #define RENDER2DMPOLYLINE32_RcId (RENDER2DMPOLYLINE32_Npts + SHORT_S)
  373. #define RENDER2DMPOLYLINE32_RcId_S LONG_S
  374. #define RENDER2DMPOLYLINE32_Data (RENDER2DMPOLYLINE32_RcId + LONG_S)
  375. #define RENDER2DMPOLYLINE32_Data_S LONG_S
  376. #define RENDER2DPOLYGON_Opcode 0
  377. #define RENDER2DPOLYGON_Opcode_S SHORT_S
  378. #define RENDER2DPOLYGON_Npts (RENDER2DPOLYGON_Opcode + SHORT_S)
  379. #define RENDER2DPOLYGON_Npts_S SHORT_S
  380. #define RENDER2DPOLYGON_RcId (RENDER2DPOLYGON_Npts + SHORT_S)
  381. #define RENDER2DPOLYGON_RcId_S LONG_S
  382. #define RENDER2DPOLYGON_Points (RENDER2DPOLYGON_RcId + LONG_S)
  383. #define RENDER2DPOLYGON_Points_S IPOINT2_S
  384. #define RENDER2DPOLYGON32_Opcode 0
  385. #define RENDER2DPOLYGON32_Opcode_S SHORT_S
  386. #define RENDER2DPOLYGON32_Npts (RENDER2DPOLYGON32_Opcode + SHORT_S)
  387. #define RENDER2DPOLYGON32_Npts_S SHORT_S
  388. #define RENDER2DPOLYGON32_RcId (RENDER2DPOLYGON32_Npts + SHORT_S)
  389. #define RENDER2DPOLYGON32_RcId_S LONG_S
  390. #define RENDER2DPOLYGON32_Points (RENDER2DPOLYGON32_RcId + LONG_S)
  391. #define RENDER2DPOLYGON32_Points_S IPOINT2_32_S
  392. #define SET2DVIEWPORT_Opcode 0
  393. #define SET2DVIEWPORT_Opcode_S SHORT_S
  394. #define SET2DVIEWPORT_Null (SET2DVIEWPORT_Opcode + SHORT_S)
  395. #define SET2DVIEWPORT_Null_S SHORT_S
  396. #define SET2DVIEWPORT_RcId (SET2DVIEWPORT_Null + SHORT_S)
  397. #define SET2DVIEWPORT_RcId_S LONG_S
  398. #define SET2DVIEWPORT_Corner1 (SET2DVIEWPORT_RcId + LONG_S)
  399. #define SET2DVIEWPORT_Corner1_S IPOINT2_S
  400. #define SET2DVIEWPORT_Corner2 (SET2DVIEWPORT_Corner1 + IPOINT2_S)
  401. #define SET2DVIEWPORT_Corner2_S IPOINT2_S
  402. #define SET2DVIEWPORT_S (SET2DVIEWPORT_Corner2 + IPOINT2_S)
  403. #define SET2DWINDOW_Opcode 0
  404. #define SET2DWINDOW_Opcode_S SHORT_S
  405. #define SET2DWINDOW_Null (SET2DWINDOW_Opcode + SHORT_S)
  406. #define SET2DWINDOW_Null_S SHORT_S
  407. #define SET2DWINDOW_RcId (SET2DWINDOW_Null + SHORT_S)
  408. #define SET2DWINDOW_RcId_S LONG_S
  409. #define SET2DWINDOW_Corner1 (SET2DWINDOW_RcId + LONG_S)
  410. #define SET2DWINDOW_Corner1_S IPOINT2_S
  411. #define SET2DWINDOW_Corner2 (SET2DWINDOW_Corner1 + IPOINT2_S)
  412. #define SET2DWINDOW_Corner2_S IPOINT2_S
  413. #define SET2DWINDOW_S (SET2DWINDOW_Corner2 + IPOINT2_S)
  414. #define SET2DWINDOW32_Opcode 0
  415. #define SET2DWINDOW32_Opcode_S SHORT_S
  416. #define SET2DWINDOW32_Null (SET2DWINDOW32_Opcode + SHORT_S)
  417. #define SET2DWINDOW32_Null_S SHORT_S
  418. #define SET2DWINDOW32_RcId (SET2DWINDOW32_Null + SHORT_S)
  419. #define SET2DWINDOW32_RcId_S LONG_S
  420. #define SET2DWINDOW32_Corner1 (SET2DWINDOW32_RcId + LONG_S)
  421. #define SET2DWINDOW32_Corner1_S IPOINT2_32_S
  422. #define SET2DWINDOW32_Corner2 (SET2DWINDOW32_Corner1 + IPOINT2_32_S)
  423. #define SET2DWINDOW32_Corner2_S IPOINT2_32_S
  424. #define SET2DWINDOW32_S (SET2DWINDOW32_Corner2 + IPOINT2_32_S)
  425. #define CHANGEMATRIX_Opcode 0
  426. #define CHANGEMATRIX_Opcode_S SHORT_S
  427. #define CHANGEMATRIX_MatrixNo (CHANGEMATRIX_Opcode + SHORT_S)
  428. #define CHANGEMATRIX_MatrixNo_S SHORT_S
  429. #define CHANGEMATRIX_RcId (CHANGEMATRIX_MatrixNo + SHORT_S)
  430. #define CHANGEMATRIX_RcId_S LONG_S
  431. #define CHANGEMATRIX_Operation (CHANGEMATRIX_RcId + LONG_S)
  432. #define CHANGEMATRIX_Operation_S SHORT_S
  433. #define CHANGEMATRIX_Mode (CHANGEMATRIX_Operation + SHORT_S)
  434. #define CHANGEMATRIX_Mode_S SHORT_S
  435. #define CHANGEMATRIX_Source (CHANGEMATRIX_Mode + SHORT_S)
  436. #define CHANGEMATRIX_Source_S MATRIX4_S
  437. #define CHANGEMATRIX_S (CHANGEMATRIX_Source + MATRIX4_S)
  438. #define RENDERPOLYLINE_Opcode 0
  439. #define RENDERPOLYLINE_Opcode_S SHORT_S
  440. #define RENDERPOLYLINE_LenVertexList (RENDERPOLYLINE_Opcode + SHORT_S)
  441. #define RENDERPOLYLINE_LenVertexList_S SHORT_S
  442. #define RENDERPOLYLINE_RcId (RENDERPOLYLINE_LenVertexList + SHORT_S)
  443. #define RENDERPOLYLINE_RcId_S LONG_S
  444. #define RENDERPOLYLINE_VertexList (RENDERPOLYLINE_RcId + LONG_S)
  445. #define RENDERPOLYQUAD_Opcode 0
  446. #define RENDERPOLYQUAD_Opcode_S SHORT_S
  447. #define RENDERPOLYQUAD_LenTileList (RENDERPOLYQUAD_Opcode + SHORT_S)
  448. #define RENDERPOLYQUAD_LenTileList_S SHORT_S
  449. #define RENDERPOLYQUAD_RcId (RENDERPOLYQUAD_LenTileList + SHORT_S)
  450. #define RENDERPOLYQUAD_RcId_S LONG_S
  451. #define RENDERPOLYQUAD_TileList (RENDERPOLYQUAD_RcId + LONG_S)
  452. #define SETCLIP3D_Opcode 0
  453. #define SETCLIP3D_Opcode_S SHORT_S
  454. #define SETCLIP3D_Clip3DPlanes (SETCLIP3D_Opcode + SHORT_S)
  455. #define SETCLIP3D_Clip3DPlanes_S SHORT_S
  456. #define SETCLIP3D_RcId (SETCLIP3D_Clip3DPlanes + SHORT_S)
  457. #define SETCLIP3D_RcId_S LONG_S
  458. #define SETCLIP3D_S (SETCLIP3D_RcId + LONG_S)
  459. #define SETLIGHTSOURCES_Opcode 0
  460. #define SETLIGHTSOURCES_Opcode_S SHORT_S
  461. #define SETLIGHTSOURCES_LenLSDB (SETLIGHTSOURCES_Opcode + SHORT_S)
  462. #define SETLIGHTSOURCES_LenLSDB_S SHORT_S
  463. #define SETLIGHTSOURCES_RcId (SETLIGHTSOURCES_LenLSDB + SHORT_S)
  464. #define SETLIGHTSOURCES_RcId_S LONG_S
  465. #define SETLIGHTSOURCES_LSDBId (SETLIGHTSOURCES_RcId + LONG_S)
  466. #define SETLIGHTSOURCES_LSDBId_S LONG_S
  467. #define SETLIGHTSOURCES_LSDB (SETLIGHTSOURCES_LSDBId + LONG_S)
  468. #define SETLIGHTSOURCES_LSDB_S FLOAT_S
  469. #define SETRENDERDATA_Opcode 0
  470. #define SETRENDERDATA_Opcode_S SHORT_S
  471. #define SETRENDERDATA_Null (SETRENDERDATA_Opcode + SHORT_S)
  472. #define SETRENDERDATA_Null_S SHORT_S
  473. #define SETRENDERDATA_RcId (SETRENDERDATA_Null + SHORT_S)
  474. #define SETRENDERDATA_RcId_S LONG_S
  475. #define SETRENDERDATA_OptData (SETRENDERDATA_RcId + LONG_S)
  476. #define SETRENDERDATA_OptData_S LONG_S
  477. #define SETRENDERDATA_Reserved0 (SETRENDERDATA_OptData + LONG_S)
  478. #define SETRENDERDATA_Reserved0_S NORM3_S
  479. #define SETRENDERDATA_Reserved1 (SETRENDERDATA_Reserved0 + NORM3_S)
  480. #define SETRENDERDATA_Reserved1_S COLOR3_S
  481. #define SETRENDERDATA_Reserved2 (SETRENDERDATA_Reserved1 + COLOR3_S)
  482. #define SETRENDERDATA_Reserved2_S NORM3_S
  483. #define SETRENDERDATA_S (SETRENDERDATA_Reserved2 + NORM3_S)
  484. #define SETRENDERMODE_Opcode 0
  485. #define SETRENDERMODE_Opcode_S SHORT_S
  486. #define SETRENDERMODE_RenderMode (SETRENDERMODE_Opcode + SHORT_S)
  487. #define SETRENDERMODE_RenderMode_S SHORT_S
  488. #define SETRENDERMODE_RcId (SETRENDERMODE_RenderMode + SHORT_S)
  489. #define SETRENDERMODE_RcId_S LONG_S
  490. #define SETRENDERMODE_S (SETRENDERMODE_RcId + LONG_S)
  491. #define SETSURFACEATTR_Opcode 0
  492. #define SETSURFACEATTR_Opcode_S SHORT_S
  493. #define SETSURFACEATTR_Translucidity (SETSURFACEATTR_Opcode + SHORT_S)
  494. #define SETSURFACEATTR_Translucidity_S CHAR_S
  495. #define SETSURFACEATTR_Null (SETSURFACEATTR_Translucidity + CHAR_S)
  496. #define SETSURFACEATTR_Null_S CHAR_S
  497. #define SETSURFACEATTR_RcId (SETSURFACEATTR_Null + CHAR_S)
  498. #define SETSURFACEATTR_RcId_S LONG_S
  499. #define SETSURFACEATTR_SurfEmission (SETSURFACEATTR_RcId + LONG_S)
  500. #define SETSURFACEATTR_SurfEmission_S COLOR3_S
  501. #define SETSURFACEATTR_SurfAmbient (SETSURFACEATTR_SurfEmission + COLOR3_S)
  502. #define SETSURFACEATTR_SurfAmbient_S COLOR3_S
  503. #define SETSURFACEATTR_SurfDiffuse (SETSURFACEATTR_SurfAmbient + COLOR3_S)
  504. #define SETSURFACEATTR_SurfDiffuse_S COLOR3_S
  505. #define SETSURFACEATTR_SurfSpecular (SETSURFACEATTR_SurfDiffuse + COLOR3_S)
  506. #define SETSURFACEATTR_SurfSpecular_S COLOR3_S
  507. #define SETSURFACEATTR_SurfSpecExp (SETSURFACEATTR_SurfSpecular + COLOR3_S)
  508. #define SETSURFACEATTR_SurfSpecExp_S IFLOAT_S
  509. #define SETSURFACEATTR_S (SETSURFACEATTR_SurfSpecExp + IFLOAT_S)
  510. #define SETVIEWER_Opcode 0
  511. #define SETVIEWER_Opcode_S SHORT_S
  512. #define SETVIEWER_ViewMode (SETVIEWER_Opcode + SHORT_S)
  513. #define SETVIEWER_ViewMode_S SHORT_S
  514. #define SETVIEWER_RcId (SETVIEWER_ViewMode + SHORT_S)
  515. #define SETVIEWER_RcId_S LONG_S
  516. #define SETVIEWER_ViewerPosition (SETVIEWER_RcId + LONG_S)
  517. #define SETVIEWER_ViewerPosition_S POINT3_S
  518. #define SETVIEWER_ViewerDirection (SETVIEWER_ViewerPosition + POINT3_S)
  519. #define SETVIEWER_ViewerDirection_S NORM3_S
  520. #define SETVIEWER_S (SETVIEWER_ViewerDirection + NORM3_S)
  521. #define SETZBUFFER_Opcode 0
  522. #define SETZBUFFER_Opcode_S SHORT_S
  523. #define SETZBUFFER_ZMode (SETZBUFFER_Opcode + SHORT_S)
  524. #define SETZBUFFER_ZMode_S SHORT_S
  525. #define SETZBUFFER_RcId (SETZBUFFER_ZMode + SHORT_S)
  526. #define SETZBUFFER_RcId_S LONG_S
  527. #define SETZBUFFER_ZFunction (SETZBUFFER_RcId + LONG_S)
  528. #define SETZBUFFER_ZFunction_S LONG_S
  529. #define SETZBUFFER_S (SETZBUFFER_ZFunction + LONG_S)
  530. #define SETOUTLINE_Opcode 0
  531. #define SETOUTLINE_Opcode_S SHORT_S
  532. #define SETOUTLINE_Outline (SETOUTLINE_Opcode + SHORT_S)
  533. #define SETOUTLINE_Outline_S SHORT_S
  534. #define SETOUTLINE_RcId (SETOUTLINE_Outline + SHORT_S)
  535. #define SETOUTLINE_RcId_S LONG_S
  536. #define SETOUTLINE_S (SETOUTLINE_RcId + LONG_S)
  537. #define SPANLINE_Opcode 0
  538. #define SPANLINE_Opcode_S SHORT_S
  539. #define SPANLINE_Null (SPANLINE_Opcode + SHORT_S)
  540. #define SPANLINE_Null_S SHORT_S
  541. #define SPANLINE_RcId (SPANLINE_Null + SHORT_S)
  542. #define SPANLINE_RcId_S LONG_S
  543. #define SPANLINE_YPosition (SPANLINE_RcId + LONG_S)
  544. #define SPANLINE_YPosition_S LONG_S
  545. #define SPANLINE_XLeft (SPANLINE_YPosition + LONG_S)
  546. #define SPANLINE_XLeft_S LONG_S
  547. #define SPANLINE_XRight (SPANLINE_XLeft + LONG_S)
  548. #define SPANLINE_XRight_S LONG_S
  549. #define SPANLINE_ZLeft (SPANLINE_XRight + LONG_S)
  550. #define SPANLINE_ZLeft_S LONG_S
  551. #define SPANLINE_ZRight (SPANLINE_ZLeft + LONG_S)
  552. #define SPANLINE_ZRight_S LONG_S
  553. #define SPANLINE_RGBLeft (SPANLINE_ZRight + LONG_S)
  554. #define SPANLINE_RGBLeft_S COLOR3_S
  555. #define SPANLINE_RGBRight (SPANLINE_RGBLeft + COLOR3_S)
  556. #define SPANLINE_RGBRight_S COLOR3_S
  557. #define SPANLINE_S (SPANLINE_RGBRight + COLOR3_S)
  558. #define TRIANGLE_Opcode 0
  559. #define TRIANGLE_Opcode_S SHORT_S
  560. #define TRIANGLE_Null (TRIANGLE_Opcode + SHORT_S)
  561. #define TRIANGLE_Null_S SHORT_S
  562. #define TRIANGLE_RcId (TRIANGLE_Null + SHORT_S)
  563. #define TRIANGLE_RcId_S LONG_S
  564. #define TRIANGLE_Vertex0_XYZ (TRIANGLE_RcId + LONG_S)
  565. #define TRIANGLE_Vertex0_XYZ_S POINT3_S
  566. #define TRIANGLE_Vertex0_RGB (TRIANGLE_Vertex0_XYZ + POINT3_S)
  567. #define TRIANGLE_Vertex0_RGB_S COLOR3_S
  568. #define TRIANGLE_Vertex1_XYZ (TRIANGLE_Vertex0_RGB + COLOR3_S)
  569. #define TRIANGLE_Vertex1_XYZ_S POINT3_S
  570. #define TRIANGLE_Vertex1_RGB (TRIANGLE_Vertex1_XYZ + POINT3_S)
  571. #define TRIANGLE_Vertex1_RGB_S COLOR3_S
  572. #define TRIANGLE_Vertex2_XYZ (TRIANGLE_Vertex1_RGB + COLOR3_S)
  573. #define TRIANGLE_Vertex2_XYZ_S POINT3_S
  574. #define TRIANGLE_Vertex2_RGB (TRIANGLE_Vertex2_XYZ + POINT3_S)
  575. #define TRIANGLE_Vertex2_RGB_S COLOR3_S
  576. #define TRIANGLE_S (TRIANGLE_Vertex2_RGB + COLOR3_S)
  577. #define RENDERPOLYTRI_Opcode 0
  578. #define RENDERPOLYTRI_Opcode_S SHORT_S
  579. #define RENDERPOLYTRI_LenTileList (RENDERPOLYTRI_Opcode + SHORT_S)
  580. #define RENDERPOLYTRI_LenTileList_S SHORT_S
  581. #define RENDERPOLYTRI_RcId (RENDERPOLYTRI_LenTileList + SHORT_S)
  582. #define RENDERPOLYTRI_RcId_S LONG_S
  583. #define RENDERPOLYTRI_TileList (RENDERPOLYTRI_RcId + LONG_S)
  584. #define SETPLANEMASK_Opcode 0
  585. #define SETPLANEMASK_Opcode_S SHORT_S
  586. #define SETPLANEMASK_Mode (SETPLANEMASK_Opcode + SHORT_S)
  587. #define SETPLANEMASK_Mode_S SHORT_S
  588. #define SETPLANEMASK_RcId (SETPLANEMASK_Mode + SHORT_S)
  589. #define SETPLANEMASK_RcId_S LONG_S
  590. #define SETPLANEMASK_PlaneMask (SETPLANEMASK_RcId + LONG_S)
  591. #define SETPLANEMASK_PlaneMask_S LONG_S
  592. #define SETPLANEMASK_S (SETPLANEMASK_PlaneMask + LONG_S)
  593. #define SETASYNCHRONOUSSWAP_Opcode 0
  594. #define SETASYNCHRONOUSSWAP_Opcode_S SHORT_S
  595. #define SETASYNCHRONOUSSWAP_Mode (SETASYNCHRONOUSSWAP_Opcode + SHORT_S)
  596. #define SETASYNCHRONOUSSWAP_Mode_S SHORT_S
  597. #define SETASYNCHRONOUSSWAP_RcId (SETASYNCHRONOUSSWAP_Mode + SHORT_S)
  598. #define SETASYNCHRONOUSSWAP_RcId_S LONG_S
  599. #define SETASYNCHRONOUSSWAP_S (SETASYNCHRONOUSSWAP_RcId + LONG_S)
  600. #define SETLINESTYLEOFFSET_Opcode 0
  601. #define SETLINESTYLEOFFSET_Opcode_S SHORT_S
  602. #define SETLINESTYLEOFFSET_Offset (SETLINESTYLEOFFSET_Opcode + SHORT_S)
  603. #define SETLINESTYLEOFFSET_Offset_S SHORT_S
  604. #define SETLINESTYLEOFFSET_RcId (SETLINESTYLEOFFSET_Offset + SHORT_S)
  605. #define SETLINESTYLEOFFSET_RcId_S LONG_S
  606. #define SETLINESTYLEOFFSET_S (SETLINESTYLEOFFSET_RcId + LONG_S)
  607. /*****************************************************************************/
  608. /******************************************************************************
  609. CADDI miscellaneous definitions as per CADDI specification 1.10
  610. */
  611. /*** Light type definitions FLOAT ***/
  612. #define NULL_LIGHT_TYPE 0.0
  613. #define AMBIENT_LIGHT_TYPE 1.0
  614. #define DIRECTIONAL_LIGHT_TYPE 2.0
  615. #define POSITIONAL_LIGHT_TYPE 3.0
  616. #define SPOT_LIGHT_TYPE 4.0
  617. /*** Clear defines ***/
  618. #define DISPLAY_AND_Z_MODE 0x0
  619. #define DISPLAY_ONLY_MODE 0x1
  620. #define Z_ONLY_MODE 0x2
  621. #define Z_NEAR 0.0
  622. #define Z_FAR 1.0
  623. /*** SetBufferConfiguration defines ***/
  624. #define TC_FULL_DEPTH_MODE 0
  625. #define TC_BUF_A_MODE 1
  626. #define TC_BUF_B_MODE 2
  627. /*** SetEndPoint defines **/
  628. #define ENDPOINT_DISABLE 0
  629. #define ENDPOINT_ENABLE 1
  630. /*** SetFillPattern defines ***/
  631. #define PATTERN_DISABLE 0
  632. #define PATTERN_ENABLE 1
  633. /*** SetLineStyle defines ***/
  634. #define LINESTYLE_DISABLE 0
  635. #define LINESTYLE_ENABLE 1
  636. /*** SetLogicOp defines ***/
  637. #define ROP_CLEAR 0x0
  638. #define ROP_NOR 0x1
  639. #define ROP_ANDINVERTED 0x2
  640. #define ROP_REPLACEINVERTED 0x3
  641. #define ROP_ANDREVERSE 0x4
  642. #define ROP_INVERT 0x5
  643. #define ROP_XOR 0x6
  644. #define ROP_NAND 0x7
  645. #define ROP_AND 0x8
  646. #define ROP_EQUIV 0x9
  647. #define ROP_NOOP 0xa
  648. #define ROP_ORINVERTED 0xb
  649. #define ROP_REPLACE 0xc
  650. #define ROP_ORREVERSE 0xd
  651. #define ROP_OR 0xe
  652. #define ROP_SET 0xf
  653. /*** SetTransparency defines ***/
  654. #define TRANSPARENCY_DISABLE 0
  655. #define TRANSPARENCY_ENABLE 1
  656. /*** SetTrivialIn defines ***/
  657. #define TRIVIALIN_DISABLE 0
  658. #define TRIVIALIN_ENABLE 1
  659. /*** Sync defines ***/
  660. #define SYNC_SPECIAL_RC -1
  661. /*** RenderScPolygon and Render2DPloygon defines ***/
  662. #define POLYGON_IS_TRIANGLE 3
  663. #define POLYGON_IS_QUAD 4
  664. /*** ChangeMatrix defines ***/
  665. #define MW_MATRIX 0
  666. #define WV_MATRIX 1
  667. #define VS_MATRIX 2
  668. #define REPLACE_MATRIX 0
  669. /*** SetClip3D defines ***/
  670. #define CLIP_LEFT 0x01
  671. #define CLIP_TOP 0x02
  672. #define CLIP_RIGHT 0x04
  673. #define CLIP_BOTTOM 0x08
  674. #define CLIP_FRONT 0x10
  675. #define CLIP_BACK 0x20
  676. #define CLIP_ALL 0x3f
  677. /*** SetRenderData defines ***/
  678. #define OptData_SPECIFIED_A 0
  679. #define OptData_SPECIFIED_M 0x0000ffff
  680. #define VERTEX_NORMAL_SPECIFIED 0x00000001
  681. #define VERTEX_COLOR_SPECIFIED 0x00000002
  682. #define FACE_NORMAL_SPECIFIED 0x00000100
  683. #define FACE_COLOR_SPECIFIED 0x00000200
  684. #define OptData_MASK_A 16
  685. #define OptData_MASK_M 0xffff0000
  686. #define VERTEX_NORMAL_MASK 0x00010000
  687. #define VERTEX_COLOR_MASK 0x00020000
  688. #define FACE_NORMAL_MASK 0x01000000
  689. #define FACE_COLOR_MASK 0x02000000
  690. /*** SetRenderMode defines ***/
  691. #define RenderMode_FACE_A 0
  692. #define RenderMode_FACE_M 0x00ff
  693. #define WIREFRAME_MODE 0
  694. #define CONTOUR_MODE 6
  695. #define HIDDEN_LINE_MODE 7
  696. #define FLAT_MODE 8
  697. #define GOURAUD_MODE 9
  698. #define SOLID_GENERAL_MODE 10
  699. #define WIREFRAME_GENERAL_MODE 11
  700. #define SOLID_GENERAL_CONTOUR_MODE 12
  701. #define WIREFRAME_HIDDEN_MODE 13
  702. #define FAST_CONTOUR_MODE 14
  703. #define RenderMode_LINE_A 8
  704. #define RenderMode_LINE_M 0xff00
  705. /*** SetViewer defines ***/
  706. #define INFINITE_VIEWER 0
  707. #define LOCAL_VIEWER 1
  708. /*** SetZBuffer defines ***/
  709. #define ZBUFFER_DISABLE 0
  710. #define ZBUFFER_ENABLE 1
  711. #define ZBUFFER_LT_FUNC 0
  712. #define ZBUFFER_LTE_FUNC 1
  713. /*** DMA related defines ***/
  714. #define DMA_DISABLE 0
  715. #define DMA_ENABLE 1
  716. #define DMA_TYPE_ISA 0
  717. #define DMA_TYPE_B 1
  718. #define DMA_TYPE_C 2
  719. #define DMA_WIDTH_16 0
  720. #define DMA_WIDTH_32 1
  721. /*** SetOutline defines ***/
  722. #define OUTLINE_DISABLE 0
  723. #define OUTLINE_ENABLE 1
  724. /*** SetPlaneMask defines ***/
  725. #define SETPLANEMASK_REPLACE 0
  726. #define SETPLANEMASK_AND 1
  727. /*****************************************************************************/
  728.