qasm.inc 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436
  1. ;
  2. ; qasm.inc
  3. ;
  4. ; Include file for asm routines.
  5. ;
  6. ;
  7. ; !!! note that this file must match the corresponding C structures at all
  8. ; times !!!
  9. ;
  10. ; set to 0 to skip all asm code
  11. id386 equ 1
  12. ; !!! must be kept the same as in d_iface.h !!!
  13. TRANSPARENT_COLOR equ 255
  14. ifndef GLQUAKE
  15. externdef _d_zistepu:dword
  16. externdef _d_pzbuffer:dword
  17. externdef _d_zistepv:dword
  18. externdef _d_zrowbytes:dword
  19. externdef _d_ziorigin:dword
  20. externdef _r_turb_s:dword
  21. externdef _r_turb_t:dword
  22. externdef _r_turb_pdest:dword
  23. externdef _r_turb_spancount:dword
  24. externdef _r_turb_turb:dword
  25. externdef _r_turb_pbase:dword
  26. externdef _r_turb_sstep:dword
  27. externdef _r_turb_tstep:dword
  28. externdef _r_bmodelactive:dword
  29. externdef _d_sdivzstepu:dword
  30. externdef _d_tdivzstepu:dword
  31. externdef _d_sdivzstepv:dword
  32. externdef _d_tdivzstepv:dword
  33. externdef _d_sdivzorigin:dword
  34. externdef _d_tdivzorigin:dword
  35. externdef _sadjust:dword
  36. externdef _tadjust:dword
  37. externdef _bbextents:dword
  38. externdef _bbextentt:dword
  39. externdef _cacheblock:dword
  40. externdef _d_viewbuffer:dword
  41. externdef _cachewidth:dword
  42. externdef _d_pzbuffer:dword
  43. externdef _d_zrowbytes:dword
  44. externdef _d_zwidth:dword
  45. externdef _d_scantable:dword
  46. externdef _r_lightptr:dword
  47. externdef _r_numvblocks:dword
  48. externdef _prowdestbase:dword
  49. externdef _pbasesource:dword
  50. externdef _r_lightwidth:dword
  51. externdef _lightright:dword
  52. externdef _lightrightstep:dword
  53. externdef _lightdeltastep:dword
  54. externdef _lightdelta:dword
  55. externdef _lightright:dword
  56. externdef _lightdelta:dword
  57. externdef _sourcetstep:dword
  58. externdef _surfrowbytes:dword
  59. externdef _lightrightstep:dword
  60. externdef _lightdeltastep:dword
  61. externdef _r_sourcemax:dword
  62. externdef _r_stepback:dword
  63. externdef _colormap:dword
  64. externdef _blocksize:dword
  65. externdef _sourcesstep:dword
  66. externdef _lightleft:dword
  67. externdef _blockdivshift:dword
  68. externdef _blockdivmask:dword
  69. externdef _lightleftstep:dword
  70. externdef _r_origin:dword
  71. externdef _r_ppn:dword
  72. externdef _r_pup:dword
  73. externdef _r_pright:dword
  74. externdef _ycenter:dword
  75. externdef _xcenter:dword
  76. externdef _d_vrectbottom_particle:dword
  77. externdef _d_vrectright_particle:dword
  78. externdef _d_vrecty:dword
  79. externdef _d_vrectx:dword
  80. externdef _d_pix_shift:dword
  81. externdef _d_pix_min:dword
  82. externdef _d_pix_max:dword
  83. externdef _d_y_aspect_shift:dword
  84. externdef _screenwidth:dword
  85. externdef _r_leftclipped:dword
  86. externdef _r_leftenter:dword
  87. externdef _r_rightclipped:dword
  88. externdef _r_rightenter:dword
  89. externdef _modelorg:dword
  90. externdef _xscale:dword
  91. externdef _r_refdef:dword
  92. externdef _yscale:dword
  93. externdef _r_leftexit:dword
  94. externdef _r_rightexit:dword
  95. externdef _r_lastvertvalid:dword
  96. externdef _cacheoffset:dword
  97. externdef _newedges:dword
  98. externdef _removeedges:dword
  99. externdef _r_pedge:dword
  100. externdef _r_framecount:dword
  101. externdef _r_u1:dword
  102. externdef _r_emitted:dword
  103. externdef _edge_p:dword
  104. externdef _surface_p:dword
  105. externdef _surfaces:dword
  106. externdef _r_lzi1:dword
  107. externdef _r_v1:dword
  108. externdef _r_ceilv1:dword
  109. externdef _r_nearzi:dword
  110. externdef _r_nearzionly:dword
  111. externdef _edge_aftertail:dword
  112. externdef _edge_tail:dword
  113. externdef _current_iv:dword
  114. externdef _edge_head_u_shift20:dword
  115. externdef _span_p:dword
  116. externdef _edge_head:dword
  117. externdef _fv:dword
  118. externdef _edge_tail_u_shift20:dword
  119. externdef _r_apverts:dword
  120. externdef _r_anumverts:dword
  121. externdef _aliastransform:dword
  122. externdef _r_avertexnormals:dword
  123. externdef _r_plightvec:dword
  124. externdef _r_ambientlight:dword
  125. externdef _r_shadelight:dword
  126. externdef _aliasxcenter:dword
  127. externdef _aliasycenter:dword
  128. externdef _a_sstepxfrac:dword
  129. externdef _r_affinetridesc:dword
  130. externdef _acolormap:dword
  131. externdef _d_pcolormap:dword
  132. externdef _r_affinetridesc:dword
  133. externdef _d_sfrac:dword
  134. externdef _d_ptex:dword
  135. externdef _d_pedgespanpackage:dword
  136. externdef _d_tfrac:dword
  137. externdef _d_light:dword
  138. externdef _d_zi:dword
  139. externdef _d_pdest:dword
  140. externdef _d_pz:dword
  141. externdef _d_aspancount:dword
  142. externdef _erroradjustup:dword
  143. externdef _errorterm:dword
  144. externdef _d_xdenom:dword
  145. externdef _r_p0:dword
  146. externdef _r_p1:dword
  147. externdef _r_p2:dword
  148. externdef _a_tstepxfrac:dword
  149. externdef _r_sstepx:dword
  150. externdef _r_tstepx:dword
  151. externdef _a_ststepxwhole:dword
  152. externdef _zspantable:dword
  153. externdef _skintable:dword
  154. externdef _r_zistepx:dword
  155. externdef _erroradjustdown:dword
  156. externdef _d_countextrastep:dword
  157. externdef _ubasestep:dword
  158. externdef _a_ststepxwhole:dword
  159. externdef _a_tstepxfrac:dword
  160. externdef _r_lstepx:dword
  161. externdef _a_spans:dword
  162. externdef _erroradjustdown:dword
  163. externdef _d_pdestextrastep:dword
  164. externdef _d_pzextrastep:dword
  165. externdef _d_sfracextrastep:dword
  166. externdef _d_ptexextrastep:dword
  167. externdef _d_countextrastep:dword
  168. externdef _d_tfracextrastep:dword
  169. externdef _d_lightextrastep:dword
  170. externdef _d_ziextrastep:dword
  171. externdef _d_pdestbasestep:dword
  172. externdef _d_pzbasestep:dword
  173. externdef _d_sfracbasestep:dword
  174. externdef _d_ptexbasestep:dword
  175. externdef _ubasestep:dword
  176. externdef _d_tfracbasestep:dword
  177. externdef _d_lightbasestep:dword
  178. externdef _d_zibasestep:dword
  179. externdef _zspantable:dword
  180. externdef _r_lstepy:dword
  181. externdef _r_sstepy:dword
  182. externdef _r_tstepy:dword
  183. externdef _r_zistepy:dword
  184. externdef _D_PolysetSetEdgeTable:dword
  185. externdef _D_RasterizeAliasPolySmooth:dword
  186. externdef float_point5:dword
  187. externdef Float2ToThe31nd:dword
  188. externdef izistep:dword
  189. externdef izi:dword
  190. externdef FloatMinus2ToThe31nd:dword
  191. externdef float_1:dword
  192. externdef float_particle_z_clip:dword
  193. externdef float_minus_1:dword
  194. externdef float_0:dword
  195. externdef fp_16:dword
  196. externdef fp_64k:dword
  197. externdef fp_1m:dword
  198. externdef fp_1m_minus_1:dword
  199. externdef fp_8 :dword
  200. externdef entryvec_table:dword
  201. externdef advancetable:dword
  202. externdef sstep:dword
  203. externdef tstep:dword
  204. externdef pspantemp:dword
  205. externdef counttemp:dword
  206. externdef jumptemp:dword
  207. externdef reciprocal_table:dword
  208. externdef DP_Count:dword
  209. externdef DP_u:dword
  210. externdef DP_v:dword
  211. externdef DP_32768:dword
  212. externdef DP_Color:dword
  213. externdef DP_Pix:dword
  214. externdef DP_EntryTable:dword
  215. externdef pbase:dword
  216. externdef s:dword
  217. externdef t:dword
  218. externdef sfracf:dword
  219. externdef tfracf:dword
  220. externdef snext:dword
  221. externdef tnext:dword
  222. externdef spancountminus1:dword
  223. externdef zi16stepu:dword
  224. externdef sdivz16stepu:dword
  225. externdef tdivz16stepu:dword
  226. externdef zi8stepu:dword
  227. externdef sdivz8stepu:dword
  228. externdef tdivz8stepu:dword
  229. externdef reciprocal_table_16:dword
  230. externdef entryvec_table_16:dword
  231. externdef fp_64kx64k:dword
  232. externdef pz:dword
  233. externdef spr8entryvec_table:dword
  234. endif
  235. externdef _fpu_ceil_cw:dword
  236. externdef _fpu_chop_cw:dword
  237. externdef _snd_scaletable:dword
  238. externdef _paintbuffer:dword
  239. externdef _snd_linear_count:dword
  240. externdef _snd_p:dword
  241. externdef _snd_vol:dword
  242. externdef _snd_out:dword
  243. externdef _vright:dword
  244. externdef _vup:dword
  245. externdef _vpn:dword
  246. externdef _BOPS_Error:dword
  247. ; plane_t structure
  248. ; !!! if this is changed, it must be changed in model.h too !!!
  249. ; !!! if the size of this is changed, the array lookup in SV_HullPointContents
  250. ; must be changed too !!!
  251. pl_normal equ 0
  252. pl_dist equ 12
  253. pl_type equ 16
  254. pl_signbits equ 17
  255. pl_pad equ 18
  256. pl_size equ 20
  257. ; hull_t structure
  258. ; !!! if this is changed, it must be changed in model.h too !!!
  259. hu_clipnodes equ 0
  260. hu_planes equ 4
  261. hu_firstclipnode equ 8
  262. hu_lastclipnode equ 12
  263. hu_clip_mins equ 16
  264. hu_clip_maxs equ 28
  265. hu_size equ 40
  266. ; dnode_t structure
  267. ; !!! if this is changed, it must be changed in bspfile.h too !!!
  268. nd_planenum equ 0
  269. nd_children equ 4
  270. nd_mins equ 8
  271. nd_maxs equ 20
  272. nd_firstface equ 32
  273. nd_numfaces equ 36
  274. nd_size equ 40
  275. ; sfxcache_t structure
  276. ; !!! if this is changed, it much be changed in sound.h too !!!
  277. sfxc_length equ 0
  278. sfxc_loopstart equ 4
  279. sfxc_speed equ 8
  280. sfxc_width equ 12
  281. sfxc_stereo equ 16
  282. sfxc_data equ 20
  283. ; channel_t structure
  284. ; !!! if this is changed, it much be changed in sound.h too !!!
  285. ch_sfx equ 0
  286. ch_leftvol equ 4
  287. ch_rightvol equ 8
  288. ch_end equ 12
  289. ch_pos equ 16
  290. ch_looping equ 20
  291. ch_entnum equ 24
  292. ch_entchannel equ 28
  293. ch_origin equ 32
  294. ch_dist_mult equ 44
  295. ch_master_vol equ 48
  296. ch_size equ 52
  297. ; portable_samplepair_t structure
  298. ; !!! if this is changed, it much be changed in sound.h too !!!
  299. psp_left equ 0
  300. psp_right equ 4
  301. psp_size equ 8
  302. ; !!! if this is changed, it must be changed in r_local.h too !!!
  303. NEAR_CLIP equ 0.01
  304. ; !!! if this is changed, it must be changed in r_local.h too !!!
  305. CYCLE equ 128
  306. ; espan_t structure
  307. ; !!! if this is changed, it must be changed in r_shared.h too !!!
  308. espan_t_u equ 0
  309. espan_t_v equ 4
  310. espan_t_count equ 8
  311. espan_t_pnext equ 12
  312. espan_t_size equ 16
  313. ; sspan_t structure
  314. ; !!! if this is changed, it must be changed in d_local.h too !!!
  315. sspan_t_u equ 0
  316. sspan_t_v equ 4
  317. sspan_t_count equ 8
  318. sspan_t_size equ 12
  319. ; spanpackage_t structure
  320. ; !!! if this is changed, it must be changed in d_polyset.c too !!!
  321. spanpackage_t_pdest equ 0
  322. spanpackage_t_pz equ 4
  323. spanpackage_t_count equ 8
  324. spanpackage_t_ptex equ 12
  325. spanpackage_t_sfrac equ 16
  326. spanpackage_t_tfrac equ 20
  327. spanpackage_t_light equ 24
  328. spanpackage_t_zi equ 28
  329. spanpackage_t_size equ 32
  330. ; edge_t structure
  331. ; !!! if this is changed, it must be changed in r_shared.h too !!!
  332. et_u equ 0
  333. et_u_step equ 4
  334. et_prev equ 8
  335. et_next equ 12
  336. et_surfs equ 16
  337. et_nextremove equ 20
  338. et_nearzi equ 24
  339. et_owner equ 28
  340. et_size equ 32
  341. ; surf_t structure
  342. ; !!! if this is changed, it must be changed in r_shared.h too !!!
  343. SURF_T_SHIFT equ 6
  344. st_next equ 0
  345. st_prev equ 4
  346. st_spans equ 8
  347. st_key equ 12
  348. st_last_u equ 16
  349. st_spanstate equ 20
  350. st_flags equ 24
  351. st_data equ 28
  352. st_entity equ 32
  353. st_nearzi equ 36
  354. st_insubmodel equ 40
  355. st_d_ziorigin equ 44
  356. st_d_zistepu equ 48
  357. st_d_zistepv equ 52
  358. st_pad equ 56
  359. st_size equ 64
  360. ; clipplane_t structure
  361. ; !!! if this is changed, it must be changed in r_local.h too !!!
  362. cp_normal equ 0
  363. cp_dist equ 12
  364. cp_next equ 16
  365. cp_leftedge equ 20
  366. cp_rightedge equ 21
  367. cp_reserved equ 22
  368. cp_size equ 24
  369. ; medge_t structure
  370. ; !!! if this is changed, it must be changed in model.h too !!!
  371. me_v equ 0
  372. me_cachededgeoffset equ 4
  373. me_size equ 8
  374. ; mvertex_t structure
  375. ; !!! if this is changed, it must be changed in model.h too !!!
  376. mv_position equ 0
  377. mv_size equ 12
  378. ; refdef_t structure
  379. ; !!! if this is changed, it must be changed in render.h too !!!
  380. rd_vrect equ 0
  381. rd_aliasvrect equ 20
  382. rd_vrectright equ 40
  383. rd_vrectbottom equ 44
  384. rd_aliasvrectright equ 48
  385. rd_aliasvrectbottom equ 52
  386. rd_vrectrightedge equ 56
  387. rd_fvrectx equ 60
  388. rd_fvrecty equ 64
  389. rd_fvrectx_adj equ 68
  390. rd_fvrecty_adj equ 72
  391. rd_vrect_x_adj_shift20 equ 76
  392. rd_vrectright_adj_shift20 equ 80
  393. rd_fvrectright_adj equ 84
  394. rd_fvrectbottom_adj equ 88
  395. rd_fvrectright equ 92
  396. rd_fvrectbottom equ 96
  397. rd_horizontalFieldOfView equ 100
  398. rd_xOrigin equ 104
  399. rd_yOrigin equ 108
  400. rd_vieworg equ 112
  401. rd_viewangles equ 124
  402. rd_ambientlight equ 136
  403. rd_size equ 140
  404. ; mtriangle_t structure
  405. ; !!! if this is changed, it must be changed in model.h too !!!
  406. mtri_facesfront equ 0
  407. mtri_vertindex equ 4
  408. mtri_size equ 16 ; !!! if this changes, array indexing in !!!
  409. ; !!! d_polysa.s must be changed to match !!!
  410. mtri_shift equ 4