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.

740 lines
33 KiB

  1. /*/****************************************************************************
  2. * name: def.h
  3. *
  4. * description: This file contains all the software definitions related to the
  5. * internal structure of CADDI. As CADDI is coded partly in C
  6. * and in ASM the permitted definitions are simple #define .
  7. *
  8. * designed: Bart Simpson
  9. * last modified: $Author: abouchar $, $Date: 94/07/28 16:41:06 $
  10. *
  11. * version: $Id: DEF.H 1.39 94/07/28 16:41:06 abouchar Exp $
  12. *
  13. ******************************************************************************/
  14. /*** 31 characters MAXIMUM per name ***/
  15. /******************************************************************************
  16. RC structure definition (each group represent a dword multiple)
  17. ****** The RC size MUST BE a multiple of dword ******
  18. */
  19. #define RC_FLAG_ENDPOINT_M 0x00000001
  20. #define RC_FLAG_ENDPOINT_A 0
  21. #define RC_FLAG_PATTMODE_M 0x00000002
  22. #define RC_FLAG_PATTMODE_A 1
  23. #define RC_FLAG_LSMODE_M 0x00000004
  24. #define RC_FLAG_LSMODE_A 2
  25. #define RC_FLAG_TRANSPMODE_M 0x00000008
  26. #define RC_FLAG_TRANSPMODE_A 3
  27. #define RC_FLAG_TRIVMODE_M 0x00000010
  28. #define RC_FLAG_TRIVMODE_A 4
  29. #define RC_FLAG_MULTICLIP_M 0x00000020
  30. #define RC_FLAG_MULTICLIP_A 5
  31. #define RC_FLAG_VIEWMODE_M 0x00000040
  32. #define RC_FLAG_VIEWMODE_A 6
  33. #define RC_FLAG_ZMODE_M 0x00000080
  34. #define RC_FLAG_ZMODE_A 7
  35. #define RC_FLAG_2D32_M 0x00000100
  36. #define RC_FLAG_2D32_A 8
  37. #define RC_FLAG_ITOPTIMIZE_M 0x00000200
  38. #define RC_FLAG_ITOPTIMIZE_A 9
  39. #define RC_FLAG_WOPTIMIZE_M 0x00000400
  40. #define RC_FLAG_WOPTIMIZE_A 10
  41. #define RC_FLAG_OUTLINE_M 0x00000800
  42. #define RC_FLAG_OUTLINE_A 11
  43. #define RC_FLAG_ASYNCHRONOUSSWAP_M 0x00001000
  44. #define RC_FLAG_ASYNCHRONOUSSWAP_A 12
  45. #define RC_FLAG_NONORMALFLIP_M 0x00002000
  46. #define RC_FLAG_NONORMALFLIP_A 13
  47. #define RC_Flag 0
  48. #define RC_Flag_S LONG_S
  49. #define RC_BcDisplayMode (RC_Flag + LONG_S)
  50. #define RC_BcDisplayMode_S CHAR_S
  51. #define RC_BcDrawMode (RC_BcDisplayMode + CHAR_S)
  52. #define RC_BcDrawMode_S CHAR_S
  53. #define RC_DB_BcDrawMode (RC_BcDrawMode + CHAR_S)
  54. #define RC_DB_BcDrawMode_S CHAR_S
  55. #define RC_Clip3DPlanes (RC_DB_BcDrawMode + CHAR_S)
  56. #define RC_Clip3DPlanes_S CHAR_S
  57. #define RC_3DClipcodeMask (RC_Clip3DPlanes + CHAR_S)
  58. #define RC_3DClipcodeMask_S CHAR_S
  59. #define RC_BgColor (RC_3DClipcodeMask + CHAR_S)
  60. #define RC_BgColor_S LONG_S
  61. #define RC_ClipList (RC_BgColor + LONG_S)
  62. #define RC_ClipList_S LONG_S
  63. #define RC_Screen_ClipList (RC_ClipList + LONG_S)
  64. #define RC_Screen_ClipList_S LONG_S
  65. #define RC_OffScreen_ClipList (RC_Screen_ClipList + LONG_S)
  66. #define RC_OffScreen_ClipList_S LONG_S
  67. #define RC_FgColor (RC_OffScreen_ClipList + LONG_S)
  68. #define RC_FgColor_S LONG_S
  69. #define RC_FillPatt (RC_FgColor + LONG_S)
  70. #define RC_FillPatt_S (4 * LONG_S)
  71. #define RC_LineStyle (RC_FillPatt + (4 * LONG_S))
  72. #define RC_LineStyle_S LONG_S
  73. #define RC_LSDB (RC_LineStyle + LONG_S)
  74. #define RC_LSDB_S LONG_S
  75. #define RC_LSKB (RC_LSDB + LONG_S)
  76. #define RC_LSKB_S LONG_S
  77. #define RC_LogicOp (RC_LSKB + LONG_S)
  78. #define RC_LogicOp_S LONG_S
  79. #define RC_OptData (RC_LogicOp + LONG_S)
  80. #define RC_OptData_S SHORT_S
  81. #define RC_OptDataMask (RC_OptData + SHORT_S)
  82. #define RC_OptDataMask_S SHORT_S
  83. #define RC_SurfEmission (RC_OptDataMask + SHORT_S)
  84. #define RC_SurfEmission_S COLOR3_S
  85. #define RC_SurfAmbient (RC_SurfEmission + COLOR3_S)
  86. #define RC_SurfAmbient_S COLOR3_S
  87. #define RC_SurfDiffuse (RC_SurfAmbient + COLOR3_S)
  88. #define RC_SurfDiffuse_S COLOR3_S
  89. #define RC_SurfSpecular (RC_SurfDiffuse + COLOR3_S)
  90. #define RC_SurfSpecular_S COLOR3_S
  91. #define RC_SurfSpecExp (RC_SurfSpecular + COLOR3_S)
  92. #define RC_SurfSpecExp_S IFLOAT_S
  93. #define RC_ViewVector (RC_SurfSpecExp + IFLOAT_S)
  94. #define RC_ViewVector_S NORM3_S
  95. #define RC_ViewPosition (RC_ViewVector + NORM3_S)
  96. #define RC_ViewPosition_S POINT3_S
  97. #define RC_ViewportYmin (RC_ViewPosition + POINT3_S)
  98. #define RC_ViewportYmin_S SHORT_S
  99. #define RC_ViewportXmin (RC_ViewportYmin + SHORT_S)
  100. #define RC_ViewportXmin_S SHORT_S
  101. #define RC_ViewportXmax (RC_ViewportXmin + SHORT_S)
  102. #define RC_ViewportXmax_S SHORT_S
  103. #define RC_ViewportYmax (RC_ViewportXmax + SHORT_S)
  104. #define RC_ViewportYmax_S SHORT_S
  105. #define RC_WindowYmin (RC_ViewportYmax + SHORT_S)
  106. #define RC_WindowYmin_S LONG_S
  107. #define RC_WindowXmin (RC_WindowYmin + LONG_S)
  108. #define RC_WindowXmin_S LONG_S
  109. #define RC_WindowYmax (RC_WindowXmin + LONG_S)
  110. #define RC_WindowYmax_S LONG_S
  111. #define RC_WindowXmax (RC_WindowYmax + LONG_S)
  112. #define RC_WindowXmax_S LONG_S
  113. #define RC_MW (RC_WindowXmax + LONG_S)
  114. #define RC_MW_S MATRIX4_S
  115. #define RC_WV (RC_MW + MATRIX4_S)
  116. #define RC_WV_S MATRIX4_S
  117. #define RC_VS (RC_WV + MATRIX4_S)
  118. #define RC_VS_S MATRIX4_S
  119. #define RC_Composite (RC_VS + MATRIX4_S)
  120. #define RC_Composite_S MATRIX4_S
  121. #define RC_InvTpose (RC_Composite + MATRIX4_S)
  122. #define RC_InvTpose_S MATRIX4_S
  123. #define RC_ClearColor (RC_InvTpose + MATRIX4_S)
  124. #define RC_ClearColor_S LONG_S
  125. #define RC_PlaneWrMask (RC_ClearColor + LONG_S)
  126. #define RC_PlaneWrMask_S LONG_S
  127. #define RC_FgColorRGB24 (RC_PlaneWrMask + LONG_S)
  128. #define RC_FgColorRGB24_S LONG_S
  129. #define RC_BgColorRGB24 (RC_FgColorRGB24 + LONG_S)
  130. #define RC_BgColorRGB24_S LONG_S
  131. #define RC_ClearColorRGB24 (RC_BgColorRGB24 + LONG_S)
  132. #define RC_ClearColorRGB24_S LONG_S
  133. #define RC_FaceRenderMode (RC_ClearColorRGB24 + LONG_S)
  134. #define RC_FaceRenderMode_S CHAR_S
  135. #define RC_LineRenderMode (RC_FaceRenderMode + CHAR_S)
  136. #define RC_LineRenderMode_S CHAR_S
  137. #define RC_Translucidity (RC_LineRenderMode + CHAR_S)
  138. #define RC_Translucidity_S CHAR_S
  139. #define RC_Free1 (RC_Translucidity + CHAR_S)
  140. #define RC_Free1_S CHAR_S
  141. #define RC_LineStyleOffset (RC_Free1 + CHAR_S)
  142. #define RC_LineStyleOffset_S LONG_S
  143. #define RC_Free2 (RC_LineStyleOffset + CHAR_S)
  144. #define RC_Free2_S (2*LONG_S)
  145. #define RC_PlaneWrMask24 (RC_Free2 + (2*LONG_S))
  146. #define RC_PlaneWrMask24_S LONG_S
  147. #define RC_ZFunction (RC_PlaneWrMask24 + LONG_S)
  148. #define RC_ZFunction_S LONG_S
  149. #define RC_2DScaleX (RC_ZFunction + LONG_S)
  150. #define RC_2DScaleX_S LONG_S
  151. #define RC_2DScaleY (RC_2DScaleX + LONG_S)
  152. #define RC_2DScaleY_S LONG_S
  153. #define RC_ClearDepth (RC_2DScaleY + LONG_S)
  154. #define RC_ClearDepth_S LONG_S
  155. #define RC_BoundingBoxXY (RC_ClearDepth + LONG_S)
  156. #define RC_BoundingBoxXY_S RECT_S
  157. #define RC_S (RC_BoundingBoxXY + RECT_S)
  158. /******************************************************************************
  159. SystemConfig structure definition
  160. */
  161. #define SYSCONF_PWidth 0
  162. #define SYSCONF_PWidth_S CHAR_S
  163. #define SYSCONF_ScreenWidth (SYSCONF_PWidth + CHAR_S)
  164. #define SYSCONF_ScreenWidth_S SHORT_S
  165. #define SYSCONF_ScreenHeight (SYSCONF_ScreenWidth + SHORT_S)
  166. #define SYSCONF_ScreenHeight_S SHORT_S
  167. #define SYSCONF_ZBufferFlag (SYSCONF_ScreenHeight + SHORT_S)
  168. #define SYSCONF_ZBufferFlag_S CHAR_S
  169. #define SYSCONF_ZinDRAMFlag (SYSCONF_ZBufferFlag + CHAR_S)
  170. #define SYSCONF_ZinDRAMFlag_S CHAR_S
  171. #define SYSCONF_ZBufferHwAddr (SYSCONF_ZinDRAMFlag + CHAR_S)
  172. #define SYSCONF_ZBufferHwAddr_S LONG_S
  173. #define SYSCONF_FBM (SYSCONF_ZBufferHwAddr + LONG_S)
  174. #define SYSCONF_FBM_S CHAR_S
  175. #define SYSCONF_DBWinXOffset (SYSCONF_FBM + CHAR_S)
  176. #define SYSCONF_DBWinXOffset_S SHORT_S
  177. #define SYSCONF_DBWinYOffset (SYSCONF_DBWinXOffset + SHORT_S)
  178. #define SYSCONF_DBWinYOffset_S SHORT_S
  179. #define SYSCONF_ZTagFlag (SYSCONF_DBWinYOffset + SHORT_S)
  180. #define SYSCONF_ZTagFlag_S CHAR_S
  181. #define SYSCONF_LUTMode (SYSCONF_ZTagFlag + CHAR_S)
  182. #define SYSCONF_LUTMode_S CHAR_S
  183. #define SYSCONF_565Mode (SYSCONF_LUTMode + CHAR_S)
  184. #define SYSCONF_565Mode_S CHAR_S
  185. #define SYSCONF_DB_SideSide (SYSCONF_565Mode + CHAR_S)
  186. #define SYSCONF_DB_SideSide_S CHAR_S
  187. #define SYSCONF_DB_FrontBack (SYSCONF_DB_SideSide + CHAR_S)
  188. #define SYSCONF_DB_FrontBack_S CHAR_S
  189. #define SYSCONF_DST0 (SYSCONF_DB_FrontBack + CHAR_S)
  190. #define SYSCONF_DST0_S LONG_S
  191. #define SYSCONF_DST1 (SYSCONF_DST0 + LONG_S)
  192. #define SYSCONF_DST1_S LONG_S
  193. #define SYSCONF_DACType (SYSCONF_DST1 + LONG_S)
  194. #define SYSCONF_DACType_S LONG_S
  195. #define SYSCONF_YDSTORG (SYSCONF_DACType + LONG_S)
  196. #define SYSCONF_YDSTORG_S LONG_S
  197. #define SYSCONF_DB_YDSTORG (SYSCONF_YDSTORG + LONG_S)
  198. #define SYSCONF_DB_YDSTORG_S LONG_S
  199. #define SYSCONF_S (SYSCONF_DB_YDSTORG + LONG_S)
  200. /******************************************************************************
  201. InitBuffer structure definition
  202. (BINDING used it to communicate with CaddiInit and MGASysInit)
  203. */
  204. #ifndef WINDOWS_NT
  205. #define INITBUF_PWidth 0
  206. #define INITBUF_PWidth_S CHAR_S
  207. #define INITBUF_ScreenWidth (INITBUF_PWidth + CHAR_S)
  208. #define INITBUF_ScreenWidth_S SHORT_S
  209. #define INITBUF_ScreenHeight (INITBUF_ScreenWidth + SHORT_S)
  210. #define INITBUF_ScreenHeight_S SHORT_S
  211. #define INITBUF_MgaOffset (INITBUF_ScreenHeight + SHORT_S)
  212. #define INITBUF_MgaOffset_S LONG_S
  213. #define INITBUF_MgaSegment (INITBUF_MgaOffset + LONG_S)
  214. #define INITBUF_MgaSegment_S SHORT_S
  215. #define INITBUF_ZBufferFlag (INITBUF_MgaSegment + SHORT_S)
  216. #define INITBUF_ZBufferFlag_S CHAR_S
  217. #define INITBUF_ZinDRAMFlag (INITBUF_ZBufferFlag + CHAR_S)
  218. #define INITBUF_ZinDRAMFlag_S CHAR_S
  219. #define INITBUF_ZBufferHwAddr (INITBUF_ZinDRAMFlag + CHAR_S)
  220. #define INITBUF_ZBufferHwAddr_S LONG_S
  221. #define INITBUF_FBM (INITBUF_ZBufferHwAddr + LONG_S)
  222. #define INITBUF_FBM_S CHAR_S
  223. #define INITBUF_16 (INITBUF_FBM + CHAR_S)
  224. #define INITBUF_16_S CHAR_S
  225. #define INITBUF_ZTagFlag (INITBUF_16 + CHAR_S)
  226. #define INITBUF_ZTagFlag_S CHAR_S
  227. #define INITBUF_DMAEnable (INITBUF_ZTagFlag + INITBUF_ZTagFlag_S)
  228. #define INITBUF_DMAEnable_S CHAR_S
  229. #define INITBUF_DMAChannel (INITBUF_DMAEnable + INITBUF_DMAEnable_S)
  230. #define INITBUF_DMAChannel_S CHAR_S
  231. #define INITBUF_DMAType (INITBUF_DMAChannel + INITBUF_DMAChannel_S)
  232. #define INITBUF_DMAType_S CHAR_S
  233. #define INITBUF_DMAXferWidth (INITBUF_DMAType + INITBUF_DMAType_S)
  234. #define INITBUF_DMAXferWidth_S CHAR_S
  235. #define INITBUF_LUTMode (INITBUF_DMAXferWidth + INITBUF_DMAXferWidth_S)
  236. #define INITBUF_LUTMode_S CHAR_S
  237. #define INITBUF_565Mode (INITBUF_LUTMode + INITBUF_LUTMode_S)
  238. #define INITBUF_565Mode_S CHAR_S
  239. #define INITBUF_DB_SideSide (INITBUF_565Mode + INITBUF_565Mode_S)
  240. #define INITBUF_DB_SideSide_S CHAR_S
  241. #define INITBUF_DB_FrontBack (INITBUF_DB_SideSide + INITBUF_DB_SideSide_S)
  242. #define INITBUF_DB_FrontBack_S CHAR_S
  243. #define INITBUF_DST0 (INITBUF_DB_FrontBack + INITBUF_DB_FrontBack_S)
  244. #define INITBUF_DST0_S LONG_S
  245. #define INITBUF_DST1 (INITBUF_DST0 + INITBUF_DST0_S)
  246. #define INITBUF_DST1_S LONG_S
  247. #define INITBUF_DACType (INITBUF_DST1 + INITBUF_DST1_S)
  248. #define INITBUF_DACType_S LONG_S
  249. #define INITBUF_YDSTORG (INITBUF_DACType + INITBUF_DACType_S)
  250. #define INITBUF_YDSTORG_S LONG_S
  251. #define INITBUF_DB_YDSTORG (INITBUF_YDSTORG + INITBUF_YDSTORG_S)
  252. #define INITBUF_DB_YDSTORG_S LONG_S
  253. #define INITBUF_ChipSet (INITBUF_DB_YDSTORG + INITBUF_DB_YDSTORG_S)
  254. #define INITBUF_ChipSet_S CHAR_S
  255. #define INITBUF_DubicPresent (INITBUF_ChipSet + INITBUF_ChipSet_S)
  256. #define INITBUF_DubicPresent_S CHAR_S
  257. #define INITBUF_S (INITBUF_DubicPresent + INITBUF_DubicPresent_S)
  258. #else /* #ifndef WINDOWS_NT */
  259. // On Windows NT, we want to align every field properly.
  260. #define INITBUF_PWidth 0 // 0
  261. #define INITBUF_PWidth_S CHAR_S
  262. #define INITBUF_ScreenWidth (INITBUF_PWidth + CHAR_S + CHAR_S) // 2
  263. #define INITBUF_ScreenWidth_S SHORT_S
  264. #define INITBUF_ScreenHeight (INITBUF_ScreenWidth + SHORT_S) // 4
  265. #define INITBUF_ScreenHeight_S SHORT_S
  266. #define INITBUF_MgaOffset (INITBUF_ScreenHeight + SHORT_S + SHORT_S)
  267. // 8
  268. #define INITBUF_MgaOffset_S UINTPTR_S
  269. #define INITBUF_MgaSegment (INITBUF_MgaOffset + UINTPTR_S) // 12 or 16
  270. #define INITBUF_MgaSegment_S SHORT_S
  271. #define INITBUF_ZBufferFlag (INITBUF_MgaSegment + SHORT_S) // 14 or 18
  272. #define INITBUF_ZBufferFlag_S CHAR_S
  273. #define INITBUF_ZinDRAMFlag (INITBUF_ZBufferFlag + CHAR_S) // 15 or 19
  274. #define INITBUF_ZinDRAMFlag_S CHAR_S
  275. #define INITBUF_ZBufferHwAddr (INITBUF_ZinDRAMFlag + CHAR_S) // 16 or 20
  276. #define INITBUF_ZBufferHwAddr_S LONG_S
  277. #define INITBUF_FBM (INITBUF_ZBufferHwAddr + LONG_S) // 20 or 24
  278. #define INITBUF_FBM_S CHAR_S
  279. #define INITBUF_16 (INITBUF_FBM + CHAR_S) // 21 or 25
  280. #define INITBUF_16_S CHAR_S
  281. #define INITBUF_ZTagFlag (INITBUF_16 + CHAR_S) // 22 or 26
  282. #define INITBUF_ZTagFlag_S CHAR_S
  283. #define INITBUF_DMAEnable (INITBUF_ZTagFlag + INITBUF_ZTagFlag_S)
  284. // 23 or 27
  285. #define INITBUF_DMAEnable_S CHAR_S
  286. #define INITBUF_DMAChannel (INITBUF_DMAEnable + INITBUF_DMAEnable_S)
  287. // 24 or 28
  288. #define INITBUF_DMAChannel_S CHAR_S
  289. #define INITBUF_DMAType (INITBUF_DMAChannel + INITBUF_DMAChannel_S)
  290. // 25 or 29
  291. #define INITBUF_DMAType_S CHAR_S
  292. #define INITBUF_DMAXferWidth (INITBUF_DMAType + INITBUF_DMAType_S)
  293. // 26 or 30
  294. #define INITBUF_DMAXferWidth_S CHAR_S
  295. #define INITBUF_LUTMode (INITBUF_DMAXferWidth + INITBUF_DMAXferWidth_S)
  296. // 27 or 31
  297. #define INITBUF_LUTMode_S CHAR_S
  298. #define INITBUF_565Mode (INITBUF_LUTMode + INITBUF_LUTMode_S)
  299. // 28 or 32
  300. #define INITBUF_565Mode_S CHAR_S
  301. #define INITBUF_DB_SideSide (INITBUF_565Mode + INITBUF_565Mode_S)
  302. // 29 or 33
  303. #define INITBUF_DB_SideSide_S CHAR_S
  304. #define INITBUF_DB_FrontBack (INITBUF_DB_SideSide + INITBUF_DB_SideSide_S)
  305. // 30 or 34
  306. #define INITBUF_DB_FrontBack_S CHAR_S
  307. #define INITBUF_DST0 (INITBUF_DB_FrontBack + INITBUF_DB_FrontBack_S + CHAR_S)
  308. // 32 or 35
  309. #define INITBUF_DST0_S LONG_S
  310. #define INITBUF_DST1 (INITBUF_DST0 + INITBUF_DST0_S) // 36 or 40
  311. #define INITBUF_DST1_S LONG_S
  312. #define INITBUF_DACType (INITBUF_DST1 + INITBUF_DST1_S) // 40 or 44
  313. #define INITBUF_DACType_S LONG_S
  314. #define INITBUF_YDSTORG (INITBUF_DACType + INITBUF_DACType_S)
  315. // 44 or 48
  316. #define INITBUF_YDSTORG_S LONG_S
  317. #define INITBUF_DB_YDSTORG (INITBUF_YDSTORG + INITBUF_YDSTORG_S)
  318. // 48 or 52
  319. #define INITBUF_DB_YDSTORG_S LONG_S
  320. #define INITBUF_ChipSet (INITBUF_DB_YDSTORG + INITBUF_DB_YDSTORG_S)
  321. // 52 or 56
  322. #define INITBUF_ChipSet_S CHAR_S
  323. #define INITBUF_DubicPresent (INITBUF_ChipSet + INITBUF_ChipSet_S)
  324. // 53 or 57
  325. #define INITBUF_DubicPresent_S CHAR_S
  326. #define INITBUF_S (INITBUF_DubicPresent + INITBUF_DubicPresent_S + SHORT_S)
  327. // 56 or 60 must include padding on a dword address!
  328. #endif /* #ifndef WINDOWS_NT */
  329. /******************************************************************************
  330. CurrentENVSystem definitions
  331. */
  332. #define ENVSystemID_CADDI 0
  333. #define ENVSystemID_BINDING 1
  334. #define ENVSystem_LAST 0
  335. #define ENVSystem_TITAN 1
  336. /******************************************************************************
  337. CurrentEnvOpcode definitions
  338. */
  339. #define ENVOPC_BLITMEMSC_PLAN 0x0000ffff /* binding use -1 opcode */
  340. #define ENVOPC_BLITMEMSC_POLY 0x0001ffff /* binding use -1 opcode */
  341. #define ENVOPC_BLITSCSC_PLAN 0x0002ffff /* binding use -1 opcode */
  342. #define ENVOPC_BLITSCSC_POLY 0x0003ffff /* binding use -1 opcode */
  343. #define ENVOPC_BLITSCMEM_PLAN 0x0004ffff /* binding use -1 opcode */
  344. #define ENVOPC_BLITSCMEM_POLY 0x0005ffff /* binding use -1 opcode */
  345. #define ENVOPC_BLITMEMSC_EXP 0x0006ffff /* binding use -1 opcode */
  346. #define ENVOPC_BLITMEMSC_DITHER 0x0007ffff /* binding use -1 opcode */
  347. #define ENVOPC_RPQUAD_GOURAUD (RENDERPOLYQUAD + (0x0 * 65536))
  348. #define ENVOPC_RPQUAD_FLAT (RENDERPOLYQUAD + (0x1 * 65536))
  349. #define ENVOPC_RPQUAD_WIREFRAMENZ (RENDERPOLYQUAD + (0x2 * 65536))
  350. #define ENVOPC_RPQUAD_WIREFRAMEZ (RENDERPOLYQUAD + (0x3 * 65536))
  351. #define ENVOPC_RPQUAD_SOLID_GENERAL (RENDERPOLYQUAD + (0x4 * 65536))
  352. #define ENVOPC_RPQUAD_S_GEN_CONTOUR (RENDERPOLYQUAD + (0x5 * 65536))
  353. #define ENVOPC_RPQUAD_WFRAME_HIDDEN (RENDERPOLYQUAD + (0x6 * 65536))
  354. #define ENVOPC_RPTRIANGLE_GOURAUD (RENDERPOLYTRIANGLE + (0x0 * 65536))
  355. #define ENVOPC_RPTRIANGLE_FLAT (RENDERPOLYTRIANGLE + (0x1 * 65536))
  356. #define ENVOPC_RPTRIANGLE_WIREFRAMENZ (RENDERPOLYTRIANGLE + (0x2 * 65536))
  357. #define ENVOPC_RPTRIANGLE_WIREFRAMEZ (RENDERPOLYTRIANGLE + (0x3 * 65536))
  358. #define ENVOPC_RPTRIANGLE_SOLID_GENERAL (RENDERPOLYTRIANGLE + (0x4 * 65536))
  359. #define ENVOPC_RPTRIANGLE_S_GEN_CONTOUR (RENDERPOLYTRIANGLE + (0x5 * 65536))
  360. #define ENVOPC_RPTRIANGLE_WFRAME_HIDDEN (RENDERPOLYTRIANGLE + (0x6 * 65536))
  361. #define ENVOPC_SPANLINE (SPANLINE + (0x0 * 65536))
  362. #define ENVOPC_R3DPLINE_SURFDIFF (RENDERPOLYLINE + (0x0 * 65536))
  363. #define ENVOPC_TRI_GOURAUD (TRIANGLE + (0x0 * 65536))
  364. #define ENVOPC_TRI_FLAT (TRIANGLE + (0x1 * 65536))
  365. /******************************************************************************
  366. Clear Work Space definitions
  367. */
  368. #define CLEARWS_DWGCTL_ZI 0
  369. #define CLEARWS_DWGCTL_ZI_S LONG_S
  370. #define CLEARWS_DWGCTL_I (CLEARWS_DWGCTL_ZI + LONG_S)
  371. #define CLEARWS_DWGCTL_I_S LONG_S
  372. #define CLEARWS_DWGCTL_Z (CLEARWS_DWGCTL_I + LONG_S)
  373. #define CLEARWS_DWGCTL_Z_S LONG_S
  374. #define CLEARWS_S (CLEARWS_DWGCTL_Z + LONG_S)
  375. /******************************************************************************
  376. LSKB light structure definitions
  377. */
  378. #define LSKB_NullType 0
  379. #define LSKB_NullType_S LONG_S
  380. #define LSKB_Null_S (LSKB_NullType + LONG_S)
  381. #define LSKB_AmbK1 0
  382. #define LSKB_AmbK1_S COLOR3_S
  383. #define LSKB_Amb_S (LSKB_AmbK1 + COLOR3_S)
  384. #define LSKB_DirType 0
  385. #define LSKB_DirType_S LONG_S
  386. #define LSKB_DirVector (LSKB_DirType + LONG_S)
  387. #define LSKB_DirVector_S NORM3_S
  388. #define LSKB_DirK2 (LSKB_DirVector + NORM3_S)
  389. #define LSKB_DirK2_S COLOR3_S
  390. #define LSKB_DirSpecFlag (LSKB_DirK2 + COLOR3_S)
  391. #define LSKB_DirSpecFlag_S LONG_S
  392. #define LSKB_DirK4 (LSKB_DirSpecFlag + LONG_S)
  393. #define LSKB_DirK4_S NORM3_S
  394. #define LSKB_DirSpecExp (LSKB_DirK4 + NORM3_S)
  395. #define LSKB_DirSpecExp_S IFLOAT_S
  396. #define LSKB_DirK3 (LSKB_DirSpecExp + IFLOAT_S)
  397. #define LSKB_DirK3_S COLOR3_S
  398. #define LSKB_Dir_S (LSKB_DirK3 + COLOR3_S)
  399. #define LSKB_PosType 0
  400. #define LSKB_PosType_S LONG_S
  401. #define LSKB_PosPosition (LSKB_PosType + LONG_S)
  402. #define LSKB_PosPosition_S POINT3_S
  403. #define LSKB_PosLA2 (LSKB_PosPosition + POINT3_S)
  404. #define LSKB_PosLA2_S NFLOAT_S
  405. #define LSKB_PosLA1 (LSKB_PosLA2 + NFLOAT_S)
  406. #define LSKB_PosLA1_S NFLOAT_S
  407. #define LSKB_PosK2 (LSKB_PosLA1 + NFLOAT_S)
  408. #define LSKB_PosK2_S COLOR3_S
  409. #define LSKB_PosSpecExp (LSKB_PosK2 + COLOR3_S)
  410. #define LSKB_PosSpecExp_S IFLOAT_S
  411. #define LSKB_PosK3 (LSKB_PosSpecExp + IFLOAT_S)
  412. #define LSKB_PosK3_S COLOR3_S
  413. #define LSKB_PosSpecFlag (LSKB_PosK3 + COLOR3_S)
  414. #define LSKB_PosSpecFlag_S LONG_S
  415. #define LSKB_Pos_S (LSKB_PosSpecFlag + LONG_S)
  416. #define LSKB_SpotType 0
  417. #define LSKB_SpotType_S LONG_S
  418. #define LSKB_SpotPosition (LSKB_SpotType + LONG_S)
  419. #define LSKB_SpotPosition_S POINT3_S
  420. #define LSKB_SpotLA2 (LSKB_SpotPosition + POINT3_S)
  421. #define LSKB_SpotLA2_S NFLOAT_S
  422. #define LSKB_SpotLA1 (LSKB_SpotLA2 + NFLOAT_S)
  423. #define LSKB_SpotLA1_S NFLOAT_S
  424. #define LSKB_SpotK2 (LSKB_SpotLA1 + NFLOAT_S)
  425. #define LSKB_SpotK2_S COLOR3_S
  426. #define LSKB_SpotSpecExp (LSKB_SpotK2 + COLOR3_S)
  427. #define LSKB_SpotSpecExp_S IFLOAT_S
  428. #define LSKB_SpotK3 (LSKB_SpotSpecExp + IFLOAT_S)
  429. #define LSKB_SpotK3_S COLOR3_S
  430. #define LSKB_SpotSpecFlag (LSKB_SpotK3 + COLOR3_S)
  431. #define LSKB_SpotSpecFlag_S LONG_S
  432. #define LSKB_SpotVector (LSKB_SpotSpecFlag + LONG_S)
  433. #define LSKB_SpotVector_S NORM3_S
  434. #define LSKB_SpotK6 (LSKB_SpotVector + NORM3_S)
  435. #define LSKB_SpotK6_S COLOR3_S
  436. #define LSKB_SpotK5 (LSKB_SpotK6 + COLOR3_S)
  437. #define LSKB_SpotK5_S COLOR3_S
  438. #define LSKB_SpotConeExp (LSKB_SpotK5 + COLOR3_S)
  439. #define LSKB_SpotConeExp_S IFLOAT_S
  440. #define LSKB_Spot_S (LSKB_SpotConeExp + IFLOAT_S)
  441. /******************************************************************************
  442. LightWS structure definition
  443. */
  444. #define LIGHTWS_VV_OK_M 0x00000001
  445. #define LIGHTWS_VV_OK_A 0
  446. #define LIGHTWS_Flags 0
  447. #define LIGHTWS_Flags_S LONG_S
  448. #define LIGHTWS_LSV (LIGHTWS_Flags + LONG_S)
  449. #define LIGHTWS_LSV_S NORM3_S
  450. #define LIGHTWS_MOD_LSV (LIGHTWS_LSV + NORM3_S)
  451. #define LIGHTWS_MOD_LSV_S FLOAT_S
  452. #define LIGHTWS_VV (LIGHTWS_MOD_LSV + FLOAT_S)
  453. #define LIGHTWS_VV_S NORM3_S
  454. #define LIGHTWS_TmpRGBDiffuse (LIGHTWS_VV + NORM3_S)
  455. #define LIGHTWS_TmpRGBDiffuse_S COLOR3_S
  456. #define LIGHTWS_TmpRGBSpecular (LIGHTWS_TmpRGBDiffuse + COLOR3_S)
  457. #define LIGHTWS_TmpRGBSpecular_S COLOR3_S
  458. #define LIGHTWS_Tmp (LIGHTWS_TmpRGBSpecular + COLOR3_S)
  459. #define LIGHTWS_Tmp_S FLOAT_S
  460. #define LIGHTWS_C (LIGHTWS_Tmp + FLOAT_S)
  461. #define LIGHTWS_C_S FLOAT_S
  462. #define LIGHTWS_S (LIGHTWS_C + FLOAT_S)
  463. /******************************************************************************
  464. Vertex Cache structure definition
  465. */
  466. #define VERTEXCACHE_NWorld_INV_M 0x00000001 /*** Need to be bit 0 ***/
  467. #define VERTEXCACHE_NWorld_INV_A 0 /*** Need to be bit 0 ***/
  468. #define VERTEXCACHE_PWORLD_OK_M 0x00000002
  469. #define VERTEXCACHE_PWORLD_OK_A 1
  470. #define VERTEXCACHE_SCoord_OK_M 0x00000004
  471. #define VERTEXCACHE_SCoord_OK_A 2
  472. #define VERTEXCACHE_Clipcode_OK_M 0x00000008
  473. #define VERTEXCACHE_Clipcode_OK_A 3
  474. /*** NOTE: SCoord and RGB MUST be in that order ***/
  475. #define VERTEXCACHE_PWorld 0
  476. #define VERTEXCACHE_PWorld_S POINT3_S
  477. #define VERTEXCACHE_NWorld (VERTEXCACHE_PWorld + POINT3_S)
  478. #define VERTEXCACHE_NWorld_S NORM3_S
  479. #define VERTEXCACHE_SCoord (VERTEXCACHE_NWorld + NORM3_S)
  480. #define VERTEXCACHE_SCoord_S ((2*LONG_S)+FLOAT_S)
  481. #define VERTEXCACHE_RGB (VERTEXCACHE_SCoord + ((2*LONG_S)+FLOAT_S))
  482. #define VERTEXCACHE_RGB_S COLOR3_S
  483. #define VERTEXCACHE_Flags (VERTEXCACHE_RGB + COLOR3_S)
  484. #define VERTEXCACHE_Flags_S LONG_S
  485. #define VERTEXCACHE_VCoord (VERTEXCACHE_Flags + LONG_S)
  486. #define VERTEXCACHE_VCoord_S (4 * FLOAT_S)
  487. #define VERTEXCACHE_PClipcode (VERTEXCACHE_VCoord + (4 * FLOAT_S))
  488. #define VERTEXCACHE_PClipcode_S CHAR_S
  489. #define VERTEXCACHE_Clipcode (VERTEXCACHE_PClipcode + CHAR_S)
  490. #define VERTEXCACHE_Clipcode_S (CHAR_S + (2*CHAR_S)) /*** PAD up to a DWORD ***/
  491. #define VERTEXCACHE_Color (VERTEXCACHE_Clipcode + (CHAR_S + (2*CHAR_S)))
  492. #define VERTEXCACHE_Color_S COLOR3_S
  493. #define VERTEXCACHE_S (VERTEXCACHE_Color + COLOR3_S)
  494. /******************************************************************************
  495. Info fields about hardware configuration returned byAGetMGAConfiguration()
  496. */
  497. #define Info_Dac_M 0x0000000f
  498. #define Info_Dac_A 0
  499. #define Info_Dac_BT481 0x0 /*** Masquer pour conserver DACTYPE ***/
  500. #define Info_Dac_BT482 0x4
  501. #define Info_Dac_ATT 0x8
  502. #define Info_Dac_ATT2050 0xa
  503. #define Info_Dac_Sierra 0xc
  504. #define Info_Dac_ViewPoint 0x1
  505. #define Info_Dac_BT484 0x2
  506. #define Info_Dac_BT485 0x6
  507. #define Info_Dac_Chameleon 0x3
  508. #define Info_Dac_PX2085 0x7
  509. #define Info_Dac_TVP3026 0x9
  510. /******************************************************************************
  511. Video Buffer used to intialise the VIDEO related hardware
  512. */
  513. #ifndef WINDOWS_NT
  514. #define VIDEOBUF_ALW 0
  515. #define VIDEOBUF_ALW_S CHAR_S
  516. #define VIDEOBUF_Interlace (VIDEOBUF_ALW + CHAR_S)
  517. #define VIDEOBUF_Interlace_S CHAR_S
  518. #define VIDEOBUF_VideoDelay (VIDEOBUF_Interlace + CHAR_S)
  519. #define VIDEOBUF_VideoDelay_S CHAR_S
  520. #define VIDEOBUF_VsyncPol (VIDEOBUF_VideoDelay + CHAR_S)
  521. #define VIDEOBUF_VsyncPol_S CHAR_S
  522. #define VIDEOBUF_HsyncPol (VIDEOBUF_VsyncPol + CHAR_S)
  523. #define VIDEOBUF_HsyncPol_S CHAR_S
  524. #define VIDEOBUF_HsyncDelay (VIDEOBUF_HsyncPol + CHAR_S)
  525. #define VIDEOBUF_HsyncDelay_S CHAR_S
  526. #define VIDEOBUF_Srate (VIDEOBUF_HsyncDelay + CHAR_S)
  527. #define VIDEOBUF_Srate_S CHAR_S
  528. #define VIDEOBUF_LaserScl (VIDEOBUF_Srate + CHAR_S)
  529. #define VIDEOBUF_LaserScl_S CHAR_S
  530. #define VIDEOBUF_OvsColor (VIDEOBUF_LaserScl + CHAR_S)
  531. #define VIDEOBUF_OvsColor_S LONG_S
  532. #define VIDEOBUF_Pedestal (VIDEOBUF_OvsColor + LONG_S)
  533. #define VIDEOBUF_Pedestal_S CHAR_S
  534. #define VIDEOBUF_LvidInitFlag VIDEOBUF_Pedestal /*** Bit 7 de Pedestal ***/
  535. #define VIDEOBUF_DBWinXOffset (VIDEOBUF_Pedestal + CHAR_S)
  536. #define VIDEOBUF_DBWinXOffset_S SHORT_S
  537. #define VIDEOBUF_DBWinYOffset (VIDEOBUF_DBWinXOffset + SHORT_S)
  538. #define VIDEOBUF_DBWinYOffset_S SHORT_S
  539. #define VIDEOBUF_PCLK (VIDEOBUF_DBWinYOffset + SHORT_S)
  540. #define VIDEOBUF_PCLK_S LONG_S
  541. #define VIDEOBUF_CRTC (VIDEOBUF_PCLK + LONG_S)
  542. #define VIDEOBUF_CRTC_S (CHAR_S * 29)
  543. #define VIDEOBUF_S (VIDEOBUF_CRTC + (CHAR_S * 29))
  544. #else /* #ifndef WINDOWS_NT */
  545. // On Windows NT, we want to align every field properly.
  546. #define VIDEOBUF_ALW 0 // 0
  547. #define VIDEOBUF_ALW_S CHAR_S
  548. #define VIDEOBUF_Interlace (VIDEOBUF_ALW + CHAR_S) // 1
  549. #define VIDEOBUF_Interlace_S CHAR_S
  550. #define VIDEOBUF_VideoDelay (VIDEOBUF_Interlace + CHAR_S) // 2
  551. #define VIDEOBUF_VideoDelay_S CHAR_S
  552. #define VIDEOBUF_VsyncPol (VIDEOBUF_VideoDelay + CHAR_S) // 3
  553. #define VIDEOBUF_VsyncPol_S CHAR_S
  554. #define VIDEOBUF_HsyncPol (VIDEOBUF_VsyncPol + CHAR_S) // 4
  555. #define VIDEOBUF_HsyncPol_S CHAR_S
  556. #define VIDEOBUF_HsyncDelay (VIDEOBUF_HsyncPol + CHAR_S) // 5
  557. #define VIDEOBUF_HsyncDelay_S CHAR_S
  558. #define VIDEOBUF_Srate (VIDEOBUF_HsyncDelay + CHAR_S) // 6
  559. #define VIDEOBUF_Srate_S CHAR_S
  560. #define VIDEOBUF_LaserScl (VIDEOBUF_Srate + CHAR_S) // 7
  561. #define VIDEOBUF_LaserScl_S CHAR_S
  562. #define VIDEOBUF_OvsColor (VIDEOBUF_LaserScl + CHAR_S) // 8
  563. #define VIDEOBUF_OvsColor_S LONG_S
  564. #define VIDEOBUF_Pedestal (VIDEOBUF_OvsColor + LONG_S) // 12
  565. #define VIDEOBUF_Pedestal_S CHAR_S
  566. #define VIDEOBUF_LvidInitFlag VIDEOBUF_Pedestal /*** Bit 7 de Pedestal ***/
  567. // 12
  568. #define VIDEOBUF_DBWinXOffset (VIDEOBUF_Pedestal + CHAR_S+CHAR_S) // 14
  569. #define VIDEOBUF_DBWinXOffset_S SHORT_S
  570. #define VIDEOBUF_DBWinYOffset (VIDEOBUF_DBWinXOffset + SHORT_S) // 16
  571. #define VIDEOBUF_DBWinYOffset_S SHORT_S
  572. #define VIDEOBUF_PCLK (VIDEOBUF_DBWinYOffset + SHORT_S + SHORT_S)
  573. // 20
  574. #define VIDEOBUF_PCLK_S LONG_S
  575. #define VIDEOBUF_CRTC (VIDEOBUF_PCLK + LONG_S) // 24
  576. #define VIDEOBUF_CRTC_S (CHAR_S * 29)
  577. #define VIDEOBUF_S (VIDEOBUF_CRTC + (CHAR_S * 29) + (CHAR_S * 3))
  578. // 56 must include padding on a dword address!
  579. #endif /* #ifndef WINDOWS_NT */
  580. /******************************************************************************
  581. Masks for setting the planes in the 3D clipcode
  582. coordinate: W X Y Z
  583. plane: x + - + - + -
  584. bit number: 7 5 4 3 2 1 0
  585. inside the plane -> 0
  586. outside the plane -> 1
  587. bits 6 is don't care.
  588. !!!! bit 7 indicate that the point has a negative W. In that case
  589. the other bits will be set in the 4D clipping function prior
  590. to enter the REAL world (x,y,z) clipping section.
  591. */
  592. #define CLIPCODE_WNEG_M 0x080
  593. #define CLIPCODE_WNEG_A 7
  594. #define CLIPCODE_XPLUS_M 0x020
  595. #define CLIPCODE_XPLUS_A 5
  596. #define CLIPCODE_XMINUS_M 0x010
  597. #define CLIPCODE_XMINUS_A 4
  598. #define CLIPCODE_YPLUS_M 0x008
  599. #define CLIPCODE_YPLUS_A 3
  600. #define CLIPCODE_YMINUS_M 0x004
  601. #define CLIPCODE_YMINUS_A 2
  602. #define CLIPCODE_ZPLUS_M 0x002
  603. #define CLIPCODE_ZPLUS_A 1
  604. #define CLIPCODE_ZMINUS_M 0x001
  605. #define CLIPCODE_ZMINUS_A 0
  606. /******************************************************************************
  607. Masks for setting the planes in the 3D pseudo clipcode
  608. coordinate: X Y Z
  609. bit number: 2 1 0
  610. inside -> 0
  611. outside -> 1
  612. */
  613. #define PCLIPCODE_X_M 0x04
  614. #define PCLIPCODE_X_A 2
  615. #define PCLIPCODE_Y_M 0x02
  616. #define PCLIPCODE_Y_A 1
  617. #define PCLIPCODE_Z_M 0x01
  618. #define PCLIPCODE_Z_A 0
  619. /*****************************************************************************/