d_polysa.asm 26 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121
  1. .386P
  2. .model FLAT
  3. externdef _d_zistepu:dword
  4. externdef _d_pzbuffer:dword
  5. externdef _d_zistepv:dword
  6. externdef _d_zrowbytes:dword
  7. externdef _d_ziorigin:dword
  8. externdef _r_turb_s:dword
  9. externdef _r_turb_t:dword
  10. externdef _r_turb_pdest:dword
  11. externdef _r_turb_spancount:dword
  12. externdef _r_turb_turb:dword
  13. externdef _r_turb_pbase:dword
  14. externdef _r_turb_sstep:dword
  15. externdef _r_turb_tstep:dword
  16. externdef _r_bmodelactive:dword
  17. externdef _d_sdivzstepu:dword
  18. externdef _d_tdivzstepu:dword
  19. externdef _d_sdivzstepv:dword
  20. externdef _d_tdivzstepv:dword
  21. externdef _d_sdivzorigin:dword
  22. externdef _d_tdivzorigin:dword
  23. externdef _sadjust:dword
  24. externdef _tadjust:dword
  25. externdef _bbextents:dword
  26. externdef _bbextentt:dword
  27. externdef _cacheblock:dword
  28. externdef _d_viewbuffer:dword
  29. externdef _cachewidth:dword
  30. externdef _d_pzbuffer:dword
  31. externdef _d_zrowbytes:dword
  32. externdef _d_zwidth:dword
  33. externdef _d_scantable:dword
  34. externdef _r_lightptr:dword
  35. externdef _r_numvblocks:dword
  36. externdef _prowdestbase:dword
  37. externdef _pbasesource:dword
  38. externdef _r_lightwidth:dword
  39. externdef _lightright:dword
  40. externdef _lightrightstep:dword
  41. externdef _lightdeltastep:dword
  42. externdef _lightdelta:dword
  43. externdef _lightright:dword
  44. externdef _lightdelta:dword
  45. externdef _sourcetstep:dword
  46. externdef _surfrowbytes:dword
  47. externdef _lightrightstep:dword
  48. externdef _lightdeltastep:dword
  49. externdef _r_sourcemax:dword
  50. externdef _r_stepback:dword
  51. externdef _colormap:dword
  52. externdef _blocksize:dword
  53. externdef _sourcesstep:dword
  54. externdef _lightleft:dword
  55. externdef _blockdivshift:dword
  56. externdef _blockdivmask:dword
  57. externdef _lightleftstep:dword
  58. externdef _r_origin:dword
  59. externdef _r_ppn:dword
  60. externdef _r_pup:dword
  61. externdef _r_pright:dword
  62. externdef _ycenter:dword
  63. externdef _xcenter:dword
  64. externdef _d_vrectbottom_particle:dword
  65. externdef _d_vrectright_particle:dword
  66. externdef _d_vrecty:dword
  67. externdef _d_vrectx:dword
  68. externdef _d_pix_shift:dword
  69. externdef _d_pix_min:dword
  70. externdef _d_pix_max:dword
  71. externdef _d_y_aspect_shift:dword
  72. externdef _screenwidth:dword
  73. externdef _vright:dword
  74. externdef _vup:dword
  75. externdef _vpn:dword
  76. externdef _BOPS_Error:dword
  77. externdef _snd_scaletable:dword
  78. externdef _paintbuffer:dword
  79. externdef _snd_linear_count:dword
  80. externdef _snd_p:dword
  81. externdef _snd_vol:dword
  82. externdef _snd_out:dword
  83. externdef _r_leftclipped:dword
  84. externdef _r_leftenter:dword
  85. externdef _r_rightclipped:dword
  86. externdef _r_rightenter:dword
  87. externdef _modelorg:dword
  88. externdef _xscale:dword
  89. externdef _r_refdef:dword
  90. externdef _yscale:dword
  91. externdef _r_leftexit:dword
  92. externdef _r_rightexit:dword
  93. externdef _r_lastvertvalid:dword
  94. externdef _cacheoffset:dword
  95. externdef _newedges:dword
  96. externdef _removeedges:dword
  97. externdef _r_pedge:dword
  98. externdef _r_framecount:dword
  99. externdef _r_u1:dword
  100. externdef _r_emitted:dword
  101. externdef _edge_p:dword
  102. externdef _surface_p:dword
  103. externdef _surfaces:dword
  104. externdef _r_lzi1:dword
  105. externdef _r_v1:dword
  106. externdef _r_ceilv1:dword
  107. externdef _r_nearzi:dword
  108. externdef _r_nearzionly:dword
  109. externdef _edge_aftertail:dword
  110. externdef _edge_tail:dword
  111. externdef _current_iv:dword
  112. externdef _edge_head_u_shift20:dword
  113. externdef _span_p:dword
  114. externdef _edge_head:dword
  115. externdef _fv:dword
  116. externdef _edge_tail_u_shift20:dword
  117. externdef _r_apverts:dword
  118. externdef _r_anumverts:dword
  119. externdef _aliastransform:dword
  120. externdef _r_avertexnormals:dword
  121. externdef _r_plightvec:dword
  122. externdef _r_ambientlight:dword
  123. externdef _r_shadelight:dword
  124. externdef _aliasxcenter:dword
  125. externdef _aliasycenter:dword
  126. externdef _a_sstepxfrac:dword
  127. externdef _r_affinetridesc:dword
  128. externdef _acolormap:dword
  129. externdef _d_pcolormap:dword
  130. externdef _r_affinetridesc:dword
  131. externdef _d_sfrac:dword
  132. externdef _d_ptex:dword
  133. externdef _d_pedgespanpackage:dword
  134. externdef _d_tfrac:dword
  135. externdef _d_light:dword
  136. externdef _d_zi:dword
  137. externdef _d_pdest:dword
  138. externdef _d_pz:dword
  139. externdef _d_aspancount:dword
  140. externdef _erroradjustup:dword
  141. externdef _errorterm:dword
  142. externdef _d_xdenom:dword
  143. externdef _r_p0:dword
  144. externdef _r_p1:dword
  145. externdef _r_p2:dword
  146. externdef _a_tstepxfrac:dword
  147. externdef _r_sstepx:dword
  148. externdef _r_tstepx:dword
  149. externdef _a_ststepxwhole:dword
  150. externdef _zspantable:dword
  151. externdef _skintable:dword
  152. externdef _r_zistepx:dword
  153. externdef _erroradjustdown:dword
  154. externdef _d_countextrastep:dword
  155. externdef _ubasestep:dword
  156. externdef _a_ststepxwhole:dword
  157. externdef _a_tstepxfrac:dword
  158. externdef _r_lstepx:dword
  159. externdef _a_spans:dword
  160. externdef _erroradjustdown:dword
  161. externdef _d_pdestextrastep:dword
  162. externdef _d_pzextrastep:dword
  163. externdef _d_sfracextrastep:dword
  164. externdef _d_ptexextrastep:dword
  165. externdef _d_countextrastep:dword
  166. externdef _d_tfracextrastep:dword
  167. externdef _d_lightextrastep:dword
  168. externdef _d_ziextrastep:dword
  169. externdef _d_pdestbasestep:dword
  170. externdef _d_pzbasestep:dword
  171. externdef _d_sfracbasestep:dword
  172. externdef _d_ptexbasestep:dword
  173. externdef _ubasestep:dword
  174. externdef _d_tfracbasestep:dword
  175. externdef _d_lightbasestep:dword
  176. externdef _d_zibasestep:dword
  177. externdef _zspantable:dword
  178. externdef _r_lstepy:dword
  179. externdef _r_sstepy:dword
  180. externdef _r_tstepy:dword
  181. externdef _r_zistepy:dword
  182. externdef _D_PolysetSetEdgeTable:dword
  183. externdef _D_RasterizeAliasPolySmooth:dword
  184. externdef float_point5:dword
  185. externdef Float2ToThe31nd:dword
  186. externdef izistep:dword
  187. externdef izi:dword
  188. externdef FloatMinus2ToThe31nd:dword
  189. externdef float_1:dword
  190. externdef float_particle_z_clip:dword
  191. externdef float_minus_1:dword
  192. externdef float_0:dword
  193. externdef fp_16:dword
  194. externdef fp_64k:dword
  195. externdef fp_1m:dword
  196. externdef fp_1m_minus_1:dword
  197. externdef fp_8:dword
  198. externdef entryvec_table:dword
  199. externdef advancetable:dword
  200. externdef sstep:dword
  201. externdef tstep:dword
  202. externdef pspantemp:dword
  203. externdef counttemp:dword
  204. externdef jumptemp:dword
  205. externdef reciprocal_table:dword
  206. externdef DP_Count:dword
  207. externdef DP_u:dword
  208. externdef DP_v:dword
  209. externdef DP_32768:dword
  210. externdef DP_Color:dword
  211. externdef DP_Pix:dword
  212. externdef DP_EntryTable:dword
  213. externdef pbase:dword
  214. externdef s:dword
  215. externdef t:dword
  216. externdef sfracf:dword
  217. externdef tfracf:dword
  218. externdef snext:dword
  219. externdef tnext:dword
  220. externdef spancountminus1:dword
  221. externdef zi16stepu:dword
  222. externdef sdivz16stepu:dword
  223. externdef tdivz16stepu:dword
  224. externdef zi8stepu:dword
  225. externdef sdivz8stepu:dword
  226. externdef tdivz8stepu:dword
  227. externdef reciprocal_table_16:dword
  228. externdef entryvec_table_16:dword
  229. externdef ceil_cw:dword
  230. externdef single_cw:dword
  231. externdef fp_64kx64k:dword
  232. externdef pz:dword
  233. externdef spr8entryvec_table:dword
  234. _DATA SEGMENT
  235. align 4
  236. p10_minus_p20 dd 0
  237. p01_minus_p21 dd 0
  238. temp0 dd 0
  239. temp1 dd 0
  240. Ltemp dd 0
  241. aff8entryvec_table dd LDraw8, LDraw7, LDraw6, LDraw5
  242. dd LDraw4, LDraw3, LDraw2, LDraw1
  243. lzistepx dd 0
  244. _DATA ENDS
  245. _TEXT SEGMENT
  246. externdef _D_PolysetSetEdgeTable:dword
  247. externdef _D_RasterizeAliasPolySmooth:dword
  248. public _D_PolysetCalcGradients
  249. _D_PolysetCalcGradients:
  250. fild ds:dword ptr[_r_p0+0]
  251. fild ds:dword ptr[_r_p2+0]
  252. fild ds:dword ptr[_r_p0+4]
  253. fild ds:dword ptr[_r_p2+4]
  254. fild ds:dword ptr[_r_p1+0]
  255. fild ds:dword ptr[_r_p1+4]
  256. fxch st(3)
  257. fsub st(0),st(2)
  258. fxch st(1)
  259. fsub st(0),st(4)
  260. fxch st(5)
  261. fsubrp st(4),st(0)
  262. fxch st(2)
  263. fsubrp st(1),st(0)
  264. fxch st(1)
  265. fld ds:dword ptr[_d_xdenom]
  266. fxch st(4)
  267. fstp ds:dword ptr[p10_minus_p20]
  268. fstp ds:dword ptr[p01_minus_p21]
  269. fxch st(2)
  270. fild ds:dword ptr[_r_p2+16]
  271. fild ds:dword ptr[_r_p0+16]
  272. fild ds:dword ptr[_r_p1+16]
  273. fxch st(2)
  274. fld st(0)
  275. fsubp st(2),st(0)
  276. fsubp st(2),st(0)
  277. fld st(0)
  278. fmul st(0),st(5)
  279. fxch st(2)
  280. fld st(0)
  281. fmul ds:dword ptr[p01_minus_p21]
  282. fxch st(2)
  283. fmul ds:dword ptr[p10_minus_p20]
  284. fxch st(1)
  285. fmul st(0),st(5)
  286. fxch st(2)
  287. fsubrp st(3),st(0)
  288. fsubp st(1),st(0)
  289. fld st(2)
  290. fmul ds:dword ptr[float_minus_1]
  291. fxch st(2)
  292. fmul st(0),st(3)
  293. fxch st(1)
  294. fmul st(0),st(2)
  295. fldcw ds:word ptr[ceil_cw]
  296. fistp ds:dword ptr[_r_lstepy]
  297. fistp ds:dword ptr[_r_lstepx]
  298. fldcw ds:word ptr[single_cw]
  299. fild ds:dword ptr[_r_p2+8]
  300. fild ds:dword ptr[_r_p0+8]
  301. fild ds:dword ptr[_r_p1+8]
  302. fxch st(2)
  303. fld st(0)
  304. fsubp st(2),st(0)
  305. fsubp st(2),st(0)
  306. fld st(0)
  307. fmul st(0),st(6)
  308. fxch st(2)
  309. fld st(0)
  310. fmul ds:dword ptr[p01_minus_p21]
  311. fxch st(2)
  312. fmul ds:dword ptr[p10_minus_p20]
  313. fxch st(1)
  314. fmul st(0),st(6)
  315. fxch st(2)
  316. fsubrp st(3),st(0)
  317. fsubp st(1),st(0)
  318. fmul st(0),st(2)
  319. fxch st(1)
  320. fmul st(0),st(3)
  321. fxch st(1)
  322. fistp ds:dword ptr[_r_sstepy]
  323. fistp ds:dword ptr[_r_sstepx]
  324. fild ds:dword ptr[_r_p2+12]
  325. fild ds:dword ptr[_r_p0+12]
  326. fild ds:dword ptr[_r_p1+12]
  327. fxch st(2)
  328. fld st(0)
  329. fsubp st(2),st(0)
  330. fsubp st(2),st(0)
  331. fld st(0)
  332. fmul st(0),st(6)
  333. fxch st(2)
  334. fld st(0)
  335. fmul ds:dword ptr[p01_minus_p21]
  336. fxch st(2)
  337. fmul ds:dword ptr[p10_minus_p20]
  338. fxch st(1)
  339. fmul st(0),st(6)
  340. fxch st(2)
  341. fsubrp st(3),st(0)
  342. fsubp st(1),st(0)
  343. fmul st(0),st(2)
  344. fxch st(1)
  345. fmul st(0),st(3)
  346. fxch st(1)
  347. fistp ds:dword ptr[_r_tstepy]
  348. fistp ds:dword ptr[_r_tstepx]
  349. fild ds:dword ptr[_r_p2+20]
  350. fild ds:dword ptr[_r_p0+20]
  351. fild ds:dword ptr[_r_p1+20]
  352. fxch st(2)
  353. fld st(0)
  354. fsubp st(2),st(0)
  355. fsubp st(2),st(0)
  356. fld st(0)
  357. fmulp st(6),st(0)
  358. fxch st(1)
  359. fld st(0)
  360. fmul ds:dword ptr[p01_minus_p21]
  361. fxch st(2)
  362. fmul ds:dword ptr[p10_minus_p20]
  363. fxch st(1)
  364. fmulp st(5),st(0)
  365. fxch st(5)
  366. fsubp st(1),st(0)
  367. fxch st(3)
  368. fsubrp st(4),st(0)
  369. fxch st(1)
  370. fmulp st(2),st(0)
  371. fmulp st(2),st(0)
  372. fistp ds:dword ptr[_r_zistepx]
  373. fistp ds:dword ptr[_r_zistepy]
  374. mov eax,ds:dword ptr[_r_sstepx]
  375. mov edx,ds:dword ptr[_r_tstepx]
  376. shl eax,16
  377. shl edx,16
  378. mov ds:dword ptr[_a_sstepxfrac],eax
  379. mov ds:dword ptr[_a_tstepxfrac],edx
  380. mov ecx,ds:dword ptr[_r_sstepx]
  381. mov eax,ds:dword ptr[_r_tstepx]
  382. sar ecx,16
  383. sar eax,16
  384. imul ds:dword ptr[4+0+esp]
  385. add eax,ecx
  386. mov ds:dword ptr[_a_ststepxwhole],eax
  387. ret
  388. public _D_PolysetRecursiveTriangle
  389. _D_PolysetRecursiveTriangle:
  390. push ebp
  391. push esi
  392. push edi
  393. push ebx
  394. mov esi,ds:dword ptr[8+16+esp]
  395. mov ebx,ds:dword ptr[4+16+esp]
  396. mov edi,ds:dword ptr[12+16+esp]
  397. mov eax,ds:dword ptr[0+esi]
  398. mov edx,ds:dword ptr[0+ebx]
  399. mov ebp,ds:dword ptr[4+esi]
  400. sub eax,edx
  401. mov ecx,ds:dword ptr[4+ebx]
  402. sub ebp,ecx
  403. inc eax
  404. cmp eax,2
  405. ja LSplit
  406. mov eax,ds:dword ptr[0+edi]
  407. inc ebp
  408. cmp ebp,2
  409. ja LSplit
  410. mov edx,ds:dword ptr[0+esi]
  411. mov ebp,ds:dword ptr[4+edi]
  412. sub eax,edx
  413. mov ecx,ds:dword ptr[4+esi]
  414. sub ebp,ecx
  415. inc eax
  416. cmp eax,2
  417. ja LSplit2
  418. mov eax,ds:dword ptr[0+ebx]
  419. inc ebp
  420. cmp ebp,2
  421. ja LSplit2
  422. mov edx,ds:dword ptr[0+edi]
  423. mov ebp,ds:dword ptr[4+ebx]
  424. sub eax,edx
  425. mov ecx,ds:dword ptr[4+edi]
  426. sub ebp,ecx
  427. inc eax
  428. inc ebp
  429. mov edx,ebx
  430. cmp eax,2
  431. ja LSplit3
  432. cmp ebp,2
  433. jna LDone
  434. LSplit3:
  435. mov ebx,edi
  436. mov edi,esi
  437. mov esi,edx
  438. jmp LSplit
  439. LSplit2:
  440. mov eax,ebx
  441. mov ebx,esi
  442. mov esi,edi
  443. mov edi,eax
  444. LSplit:
  445. sub esp,24
  446. mov eax,ds:dword ptr[8+ebx]
  447. mov edx,ds:dword ptr[8+esi]
  448. mov ecx,ds:dword ptr[12+ebx]
  449. add eax,edx
  450. mov edx,ds:dword ptr[12+esi]
  451. sar eax,1
  452. add ecx,edx
  453. mov ds:dword ptr[8+esp],eax
  454. mov eax,ds:dword ptr[20+ebx]
  455. sar ecx,1
  456. mov edx,ds:dword ptr[20+esi]
  457. mov ds:dword ptr[12+esp],ecx
  458. add eax,edx
  459. mov ecx,ds:dword ptr[0+ebx]
  460. mov edx,ds:dword ptr[0+esi]
  461. sar eax,1
  462. add edx,ecx
  463. mov ds:dword ptr[20+esp],eax
  464. mov eax,ds:dword ptr[4+ebx]
  465. sar edx,1
  466. mov ebp,ds:dword ptr[4+esi]
  467. mov ds:dword ptr[0+esp],edx
  468. add ebp,eax
  469. sar ebp,1
  470. mov ds:dword ptr[4+esp],ebp
  471. cmp ds:dword ptr[4+esi],eax
  472. jg LNoDraw
  473. mov edx,ds:dword ptr[0+esi]
  474. jnz LDraw
  475. cmp edx,ecx
  476. jl LNoDraw
  477. LDraw:
  478. mov edx,ds:dword ptr[20+esp]
  479. mov ecx,ds:dword ptr[4+esp]
  480. sar edx,16
  481. mov ebp,ds:dword ptr[0+esp]
  482. mov eax,ds:dword ptr[_zspantable+ecx*4]
  483. cmp dx,ds:word ptr[eax+ebp*2]
  484. jnge LNoDraw
  485. mov ds:word ptr[eax+ebp*2],dx
  486. mov eax,ds:dword ptr[12+esp]
  487. sar eax,16
  488. mov edx,ds:dword ptr[8+esp]
  489. sar edx,16
  490. sub ecx,ecx
  491. mov eax,ds:dword ptr[_skintable+eax*4]
  492. mov ebp,ds:dword ptr[4+esp]
  493. mov cl,ds:byte ptr[eax+edx]
  494. mov edx,ds:dword ptr[_d_pcolormap]
  495. mov dl,ds:byte ptr[edx+ecx]
  496. mov ecx,ds:dword ptr[0+esp]
  497. mov eax,ds:dword ptr[_d_scantable+ebp*4]
  498. add ecx,eax
  499. mov eax,ds:dword ptr[_d_viewbuffer]
  500. mov ds:byte ptr[eax+ecx*1],dl
  501. LNoDraw:
  502. push esp
  503. push ebx
  504. push edi
  505. call near ptr _D_PolysetRecursiveTriangle
  506. mov ebx,esp
  507. push esi
  508. push ebx
  509. push edi
  510. call near ptr _D_PolysetRecursiveTriangle
  511. add esp,24
  512. LDone:
  513. pop ebx
  514. pop edi
  515. pop esi
  516. pop ebp
  517. ret 12
  518. public _D_PolysetAff8Start
  519. _D_PolysetAff8Start:
  520. public _D_PolysetDrawSpans8
  521. _D_PolysetDrawSpans8:
  522. push esi
  523. push ebx
  524. mov esi,ds:dword ptr[4+8+esp]
  525. mov ecx,ds:dword ptr[_r_zistepx]
  526. push ebp
  527. push edi
  528. ror ecx,16
  529. mov edx,ds:dword ptr[8+esi]
  530. mov ds:dword ptr[lzistepx],ecx
  531. LSpanLoop:
  532. mov eax,ds:dword ptr[_d_aspancount]
  533. sub eax,edx
  534. mov edx,ds:dword ptr[_erroradjustup]
  535. mov ebx,ds:dword ptr[_errorterm]
  536. add ebx,edx
  537. js LNoTurnover
  538. mov edx,ds:dword ptr[_erroradjustdown]
  539. mov edi,ds:dword ptr[_d_countextrastep]
  540. sub ebx,edx
  541. mov ebp,ds:dword ptr[_d_aspancount]
  542. mov ds:dword ptr[_errorterm],ebx
  543. add ebp,edi
  544. mov ds:dword ptr[_d_aspancount],ebp
  545. jmp LRightEdgeStepped
  546. LNoTurnover:
  547. mov edi,ds:dword ptr[_d_aspancount]
  548. mov edx,ds:dword ptr[_ubasestep]
  549. mov ds:dword ptr[_errorterm],ebx
  550. add edi,edx
  551. mov ds:dword ptr[_d_aspancount],edi
  552. LRightEdgeStepped:
  553. cmp eax,1
  554. jl LNextSpan
  555. jz LExactlyOneLong
  556. mov ecx,ds:dword ptr[_a_ststepxwhole]
  557. mov edx,ds:dword ptr[_r_affinetridesc+8]
  558. mov ds:dword ptr[advancetable+4],ecx
  559. add ecx,edx
  560. mov ds:dword ptr[advancetable],ecx
  561. mov ecx,ds:dword ptr[_a_tstepxfrac]
  562. mov cx,ds:word ptr[_r_lstepx]
  563. mov edx,eax
  564. mov ds:dword ptr[tstep],ecx
  565. add edx,7
  566. shr edx,3
  567. mov ebx,ds:dword ptr[16+esi]
  568. mov bx,dx
  569. mov ecx,ds:dword ptr[4+esi]
  570. neg eax
  571. mov edi,ds:dword ptr[0+esi]
  572. and eax,7
  573. sub edi,eax
  574. sub ecx,eax
  575. sub ecx,eax
  576. mov edx,ds:dword ptr[20+esi]
  577. mov dx,ds:word ptr[24+esi]
  578. mov ebp,ds:dword ptr[28+esi]
  579. ror ebp,16
  580. push esi
  581. mov esi,ds:dword ptr[12+esi]
  582. jmp dword ptr[aff8entryvec_table+eax*4]
  583. LDrawLoop:
  584. LDraw8:
  585. cmp bp,ds:word ptr[ecx]
  586. jl Lp1
  587. xor eax,eax
  588. mov ah,dh
  589. mov al,ds:byte ptr[esi]
  590. mov ds:word ptr[ecx],bp
  591. mov al,ds:byte ptr[12345678h+eax]
  592. LPatch8:
  593. mov ds:byte ptr[edi],al
  594. Lp1:
  595. add edx,ds:dword ptr[tstep]
  596. sbb eax,eax
  597. add ebp,ds:dword ptr[lzistepx]
  598. adc ebp,0
  599. add ebx,ds:dword ptr[_a_sstepxfrac]
  600. adc esi,ds:dword ptr[advancetable+4+eax*4]
  601. LDraw7:
  602. cmp bp,ds:word ptr[2+ecx]
  603. jl Lp2
  604. xor eax,eax
  605. mov ah,dh
  606. mov al,ds:byte ptr[esi]
  607. mov ds:word ptr[2+ecx],bp
  608. mov al,ds:byte ptr[12345678h+eax]
  609. LPatch7:
  610. mov ds:byte ptr[1+edi],al
  611. Lp2:
  612. add edx,ds:dword ptr[tstep]
  613. sbb eax,eax
  614. add ebp,ds:dword ptr[lzistepx]
  615. adc ebp,0
  616. add ebx,ds:dword ptr[_a_sstepxfrac]
  617. adc esi,ds:dword ptr[advancetable+4+eax*4]
  618. LDraw6:
  619. cmp bp,ds:word ptr[4+ecx]
  620. jl Lp3
  621. xor eax,eax
  622. mov ah,dh
  623. mov al,ds:byte ptr[esi]
  624. mov ds:word ptr[4+ecx],bp
  625. mov al,ds:byte ptr[12345678h+eax]
  626. LPatch6:
  627. mov ds:byte ptr[2+edi],al
  628. Lp3:
  629. add edx,ds:dword ptr[tstep]
  630. sbb eax,eax
  631. add ebp,ds:dword ptr[lzistepx]
  632. adc ebp,0
  633. add ebx,ds:dword ptr[_a_sstepxfrac]
  634. adc esi,ds:dword ptr[advancetable+4+eax*4]
  635. LDraw5:
  636. cmp bp,ds:word ptr[6+ecx]
  637. jl Lp4
  638. xor eax,eax
  639. mov ah,dh
  640. mov al,ds:byte ptr[esi]
  641. mov ds:word ptr[6+ecx],bp
  642. mov al,ds:byte ptr[12345678h+eax]
  643. LPatch5:
  644. mov ds:byte ptr[3+edi],al
  645. Lp4:
  646. add edx,ds:dword ptr[tstep]
  647. sbb eax,eax
  648. add ebp,ds:dword ptr[lzistepx]
  649. adc ebp,0
  650. add ebx,ds:dword ptr[_a_sstepxfrac]
  651. adc esi,ds:dword ptr[advancetable+4+eax*4]
  652. LDraw4:
  653. cmp bp,ds:word ptr[8+ecx]
  654. jl Lp5
  655. xor eax,eax
  656. mov ah,dh
  657. mov al,ds:byte ptr[esi]
  658. mov ds:word ptr[8+ecx],bp
  659. mov al,ds:byte ptr[12345678h+eax]
  660. LPatch4:
  661. mov ds:byte ptr[4+edi],al
  662. Lp5:
  663. add edx,ds:dword ptr[tstep]
  664. sbb eax,eax
  665. add ebp,ds:dword ptr[lzistepx]
  666. adc ebp,0
  667. add ebx,ds:dword ptr[_a_sstepxfrac]
  668. adc esi,ds:dword ptr[advancetable+4+eax*4]
  669. LDraw3:
  670. cmp bp,ds:word ptr[10+ecx]
  671. jl Lp6
  672. xor eax,eax
  673. mov ah,dh
  674. mov al,ds:byte ptr[esi]
  675. mov ds:word ptr[10+ecx],bp
  676. mov al,ds:byte ptr[12345678h+eax]
  677. LPatch3:
  678. mov ds:byte ptr[5+edi],al
  679. Lp6:
  680. add edx,ds:dword ptr[tstep]
  681. sbb eax,eax
  682. add ebp,ds:dword ptr[lzistepx]
  683. adc ebp,0
  684. add ebx,ds:dword ptr[_a_sstepxfrac]
  685. adc esi,ds:dword ptr[advancetable+4+eax*4]
  686. LDraw2:
  687. cmp bp,ds:word ptr[12+ecx]
  688. jl Lp7
  689. xor eax,eax
  690. mov ah,dh
  691. mov al,ds:byte ptr[esi]
  692. mov ds:word ptr[12+ecx],bp
  693. mov al,ds:byte ptr[12345678h+eax]
  694. LPatch2:
  695. mov ds:byte ptr[6+edi],al
  696. Lp7:
  697. add edx,ds:dword ptr[tstep]
  698. sbb eax,eax
  699. add ebp,ds:dword ptr[lzistepx]
  700. adc ebp,0
  701. add ebx,ds:dword ptr[_a_sstepxfrac]
  702. adc esi,ds:dword ptr[advancetable+4+eax*4]
  703. LDraw1:
  704. cmp bp,ds:word ptr[14+ecx]
  705. jl Lp8
  706. xor eax,eax
  707. mov ah,dh
  708. mov al,ds:byte ptr[esi]
  709. mov ds:word ptr[14+ecx],bp
  710. mov al,ds:byte ptr[12345678h+eax]
  711. LPatch1:
  712. mov ds:byte ptr[7+edi],al
  713. Lp8:
  714. add edx,ds:dword ptr[tstep]
  715. sbb eax,eax
  716. add ebp,ds:dword ptr[lzistepx]
  717. adc ebp,0
  718. add ebx,ds:dword ptr[_a_sstepxfrac]
  719. adc esi,ds:dword ptr[advancetable+4+eax*4]
  720. add edi,8
  721. add ecx,16
  722. dec bx
  723. jnz LDrawLoop
  724. pop esi
  725. LNextSpan:
  726. add esi,32
  727. LNextSpanESISet:
  728. mov edx,ds:dword ptr[8+esi]
  729. cmp edx,offset -999999
  730. jnz LSpanLoop
  731. pop edi
  732. pop ebp
  733. pop ebx
  734. pop esi
  735. ret
  736. LExactlyOneLong:
  737. mov ecx,ds:dword ptr[4+esi]
  738. mov ebp,ds:dword ptr[28+esi]
  739. ror ebp,16
  740. mov ebx,ds:dword ptr[12+esi]
  741. cmp bp,ds:word ptr[ecx]
  742. jl LNextSpan
  743. xor eax,eax
  744. mov edi,ds:dword ptr[0+esi]
  745. mov ah,ds:byte ptr[24+1+esi]
  746. add esi,32
  747. mov al,ds:byte ptr[ebx]
  748. mov ds:word ptr[ecx],bp
  749. mov al,ds:byte ptr[12345678h+eax]
  750. LPatch9:
  751. mov ds:byte ptr[edi],al
  752. jmp LNextSpanESISet
  753. public _D_PolysetAff8End
  754. _D_PolysetAff8End:
  755. public _D_Aff8Patch
  756. _D_Aff8Patch:
  757. mov eax,ds:dword ptr[4+esp]
  758. mov ds:dword ptr[LPatch1-4],eax
  759. mov ds:dword ptr[LPatch2-4],eax
  760. mov ds:dword ptr[LPatch3-4],eax
  761. mov ds:dword ptr[LPatch4-4],eax
  762. mov ds:dword ptr[LPatch5-4],eax
  763. mov ds:dword ptr[LPatch6-4],eax
  764. mov ds:dword ptr[LPatch7-4],eax
  765. mov ds:dword ptr[LPatch8-4],eax
  766. mov ds:dword ptr[LPatch9-4],eax
  767. ret
  768. public _D_PolysetDraw
  769. _D_PolysetDraw:
  770. sub esp,offset (((1024+1 + 1 + ((32 - 1) / 32)) + 1) * 32)
  771. mov eax,esp
  772. add eax,32 - 1
  773. and eax,offset not (32 - 1)
  774. mov ds:dword ptr[_a_spans],eax
  775. mov eax,ds:dword ptr[_r_affinetridesc+28]
  776. test eax,eax
  777. jz _D_DrawNonSubdiv
  778. push ebp
  779. mov ebp,ds:dword ptr[_r_affinetridesc+24]
  780. push esi
  781. shl ebp,4
  782. push ebx
  783. mov ebx,ds:dword ptr[_r_affinetridesc+16]
  784. push edi
  785. mov edi,ds:dword ptr[_r_affinetridesc+20]
  786. Llooptop:
  787. mov ecx,ds:dword ptr[4-16+0+ebx+ebp]
  788. mov esi,ds:dword ptr[4-16+4+ebx+ebp]
  789. shl ecx,5
  790. mov edx,ds:dword ptr[4-16+8+ebx+ebp]
  791. shl esi,5
  792. add ecx,edi
  793. shl edx,5
  794. add esi,edi
  795. add edx,edi
  796. fild ds:dword ptr[0+4+ecx]
  797. fild ds:dword ptr[0+4+esi]
  798. fild ds:dword ptr[0+0+ecx]
  799. fild ds:dword ptr[0+0+edx]
  800. fxch st(2)
  801. fsubr st(0),st(3)
  802. fild ds:dword ptr[0+0+esi]
  803. fxch st(2)
  804. fsubr st(3),st(0)
  805. fild ds:dword ptr[0+4+edx]
  806. fxch st(1)
  807. fsubrp st(3),st(0)
  808. fxch st(1)
  809. fmulp st(3),st(0)
  810. fsubp st(3),st(0)
  811. mov eax,ds:dword ptr[0+16+ecx]
  812. and eax,0FF00h
  813. fmulp st(2),st(0)
  814. add eax,ds:dword ptr[_acolormap]
  815. fsubrp st(1),st(0)
  816. mov ds:dword ptr[_d_pcolormap],eax
  817. fstp ds:dword ptr[Ltemp]
  818. mov eax,ds:dword ptr[Ltemp]
  819. sub eax,080000001h
  820. jc Lskip
  821. mov eax,ds:dword ptr[0-16+ebx+ebp]
  822. test eax,eax
  823. jz Lfacesback
  824. push edx
  825. push esi
  826. push ecx
  827. call near ptr _D_PolysetRecursiveTriangle
  828. sub ebp,16
  829. jnz Llooptop
  830. jmp Ldone2
  831. Lfacesback:
  832. mov eax,ds:dword ptr[0+8+ecx]
  833. push eax
  834. mov eax,ds:dword ptr[0+8+esi]
  835. push eax
  836. mov eax,ds:dword ptr[0+8+edx]
  837. push eax
  838. push ecx
  839. push edx
  840. mov eax,ds:dword ptr[_r_affinetridesc+32]
  841. test ds:dword ptr[24+ecx],00020h
  842. jz Lp11
  843. add ds:dword ptr[0+8+ecx],eax
  844. Lp11:
  845. test ds:dword ptr[24+esi],00020h
  846. jz Lp12
  847. add ds:dword ptr[0+8+esi],eax
  848. Lp12:
  849. test ds:dword ptr[24+edx],00020h
  850. jz Lp13
  851. add ds:dword ptr[0+8+edx],eax
  852. Lp13:
  853. push edx
  854. push esi
  855. push ecx
  856. call near ptr _D_PolysetRecursiveTriangle
  857. pop edx
  858. pop ecx
  859. pop eax
  860. mov ds:dword ptr[0+8+edx],eax
  861. pop eax
  862. mov ds:dword ptr[0+8+esi],eax
  863. pop eax
  864. mov ds:dword ptr[0+8+ecx],eax
  865. Lskip:
  866. sub ebp,16
  867. jnz Llooptop
  868. Ldone2:
  869. pop edi
  870. pop ebx
  871. pop esi
  872. pop ebp
  873. add esp,offset (((1024+1 + 1 + ((32 - 1) / 32)) + 1) * 32)
  874. ret
  875. public _D_PolysetScanLeftEdge
  876. _D_PolysetScanLeftEdge:
  877. push ebp
  878. push esi
  879. push edi
  880. push ebx
  881. mov eax,ds:dword ptr[4+16+esp]
  882. mov ecx,ds:dword ptr[_d_sfrac]
  883. and eax,0FFFFh
  884. mov ebx,ds:dword ptr[_d_ptex]
  885. or ecx,eax
  886. mov esi,ds:dword ptr[_d_pedgespanpackage]
  887. mov edx,ds:dword ptr[_d_tfrac]
  888. mov edi,ds:dword ptr[_d_light]
  889. mov ebp,ds:dword ptr[_d_zi]
  890. LScanLoop:
  891. mov ds:dword ptr[12+esi],ebx
  892. mov eax,ds:dword ptr[_d_pdest]
  893. mov ds:dword ptr[0+esi],eax
  894. mov eax,ds:dword ptr[_d_pz]
  895. mov ds:dword ptr[4+esi],eax
  896. mov eax,ds:dword ptr[_d_aspancount]
  897. mov ds:dword ptr[8+esi],eax
  898. mov ds:dword ptr[24+esi],edi
  899. mov ds:dword ptr[28+esi],ebp
  900. mov ds:dword ptr[16+esi],ecx
  901. mov ds:dword ptr[20+esi],edx
  902. mov al,ds:byte ptr[32+esi]
  903. add esi,32
  904. mov eax,ds:dword ptr[_erroradjustup]
  905. mov ds:dword ptr[_d_pedgespanpackage],esi
  906. mov esi,ds:dword ptr[_errorterm]
  907. add esi,eax
  908. mov eax,ds:dword ptr[_d_pdest]
  909. js LNoLeftEdgeTurnover
  910. sub esi,ds:dword ptr[_erroradjustdown]
  911. add eax,ds:dword ptr[_d_pdestextrastep]
  912. mov ds:dword ptr[_errorterm],esi
  913. mov ds:dword ptr[_d_pdest],eax
  914. mov eax,ds:dword ptr[_d_pz]
  915. mov esi,ds:dword ptr[_d_aspancount]
  916. add eax,ds:dword ptr[_d_pzextrastep]
  917. add ecx,ds:dword ptr[_d_sfracextrastep]
  918. adc ebx,ds:dword ptr[_d_ptexextrastep]
  919. add esi,ds:dword ptr[_d_countextrastep]
  920. mov ds:dword ptr[_d_pz],eax
  921. mov eax,ds:dword ptr[_d_tfracextrastep]
  922. mov ds:dword ptr[_d_aspancount],esi
  923. add edx,eax
  924. jnc LSkip1
  925. add ebx,ds:dword ptr[_r_affinetridesc+8]
  926. LSkip1:
  927. add edi,ds:dword ptr[_d_lightextrastep]
  928. add ebp,ds:dword ptr[_d_ziextrastep]
  929. mov esi,ds:dword ptr[_d_pedgespanpackage]
  930. dec ecx
  931. test ecx,0FFFFh
  932. jnz LScanLoop
  933. pop ebx
  934. pop edi
  935. pop esi
  936. pop ebp
  937. ret
  938. LNoLeftEdgeTurnover:
  939. mov ds:dword ptr[_errorterm],esi
  940. add eax,ds:dword ptr[_d_pdestbasestep]
  941. mov ds:dword ptr[_d_pdest],eax
  942. mov eax,ds:dword ptr[_d_pz]
  943. mov esi,ds:dword ptr[_d_aspancount]
  944. add eax,ds:dword ptr[_d_pzbasestep]
  945. add ecx,ds:dword ptr[_d_sfracbasestep]
  946. adc ebx,ds:dword ptr[_d_ptexbasestep]
  947. add esi,ds:dword ptr[_ubasestep]
  948. mov ds:dword ptr[_d_pz],eax
  949. mov ds:dword ptr[_d_aspancount],esi
  950. mov esi,ds:dword ptr[_d_tfracbasestep]
  951. add edx,esi
  952. jnc LSkip2
  953. add ebx,ds:dword ptr[_r_affinetridesc+8]
  954. LSkip2:
  955. add edi,ds:dword ptr[_d_lightbasestep]
  956. add ebp,ds:dword ptr[_d_zibasestep]
  957. mov esi,ds:dword ptr[_d_pedgespanpackage]
  958. dec ecx
  959. test ecx,0FFFFh
  960. jnz LScanLoop
  961. pop ebx
  962. pop edi
  963. pop esi
  964. pop ebp
  965. ret
  966. public _D_PolysetDrawFinalVerts
  967. _D_PolysetDrawFinalVerts:
  968. push ebp
  969. push ebx
  970. mov ecx,ds:dword ptr[8+8+esp]
  971. mov ebx,ds:dword ptr[4+8+esp]
  972. push esi
  973. push edi
  974. LFVLoop:
  975. mov eax,ds:dword ptr[0+0+ebx]
  976. mov edx,ds:dword ptr[_r_refdef+40]
  977. cmp eax,edx
  978. jge LNextVert
  979. mov esi,ds:dword ptr[0+4+ebx]
  980. mov edx,ds:dword ptr[_r_refdef+44]
  981. cmp esi,edx
  982. jge LNextVert
  983. mov edi,ds:dword ptr[_zspantable+esi*4]
  984. mov edx,ds:dword ptr[0+20+ebx]
  985. shr edx,16
  986. cmp dx,ds:word ptr[edi+eax*2]
  987. jl LNextVert
  988. mov ds:word ptr[edi+eax*2],dx
  989. mov edi,ds:dword ptr[0+12+ebx]
  990. shr edi,16
  991. mov edi,ds:dword ptr[_skintable+edi*4]
  992. mov edx,ds:dword ptr[0+8+ebx]
  993. shr edx,16
  994. mov dl,ds:byte ptr[edi+edx]
  995. mov edi,ds:dword ptr[0+16+ebx]
  996. and edi,0FF00h
  997. and edx,000FFh
  998. add edi,edx
  999. mov edx,ds:dword ptr[_acolormap]
  1000. mov dl,ds:byte ptr[edx+edi*1]
  1001. mov edi,ds:dword ptr[_d_scantable+esi*4]
  1002. mov esi,ds:dword ptr[_d_viewbuffer]
  1003. add edi,eax
  1004. mov ds:byte ptr[esi+edi],dl
  1005. LNextVert:
  1006. add ebx,32
  1007. dec ecx
  1008. jnz LFVLoop
  1009. pop edi
  1010. pop esi
  1011. pop ebx
  1012. pop ebp
  1013. ret
  1014. public _D_DrawNonSubdiv
  1015. _D_DrawNonSubdiv:
  1016. push ebp
  1017. mov ebp,ds:dword ptr[_r_affinetridesc+24]
  1018. push ebx
  1019. shl ebp,4
  1020. push esi
  1021. mov esi,ds:dword ptr[_r_affinetridesc+16]
  1022. push edi
  1023. LNDLoop:
  1024. mov edi,ds:dword ptr[_r_affinetridesc+20]
  1025. mov ecx,ds:dword ptr[4+0-16+esi+ebp*1]
  1026. shl ecx,5
  1027. mov edx,ds:dword ptr[4+4-16+esi+ebp*1]
  1028. shl edx,5
  1029. mov ebx,ds:dword ptr[4+8-16+esi+ebp*1]
  1030. shl ebx,5
  1031. add ecx,edi
  1032. add edx,edi
  1033. add ebx,edi
  1034. mov eax,ds:dword ptr[0+4+ecx]
  1035. mov esi,ds:dword ptr[0+0+ecx]
  1036. sub eax,ds:dword ptr[0+4+edx]
  1037. sub esi,ds:dword ptr[0+0+ebx]
  1038. imul eax,esi
  1039. mov esi,ds:dword ptr[0+0+ecx]
  1040. mov edi,ds:dword ptr[0+4+ecx]
  1041. sub esi,ds:dword ptr[0+0+edx]
  1042. sub edi,ds:dword ptr[0+4+ebx]
  1043. imul edi,esi
  1044. sub eax,edi
  1045. jns LNextTri
  1046. mov ds:dword ptr[_d_xdenom],eax
  1047. fild ds:dword ptr[_d_xdenom]
  1048. mov eax,ds:dword ptr[0+0+ecx]
  1049. mov esi,ds:dword ptr[0+4+ecx]
  1050. mov ds:dword ptr[_r_p0+0],eax
  1051. mov ds:dword ptr[_r_p0+4],esi
  1052. mov eax,ds:dword ptr[0+8+ecx]
  1053. mov esi,ds:dword ptr[0+12+ecx]
  1054. mov ds:dword ptr[_r_p0+8],eax
  1055. mov ds:dword ptr[_r_p0+12],esi
  1056. mov eax,ds:dword ptr[0+16+ecx]
  1057. mov esi,ds:dword ptr[0+20+ecx]
  1058. mov ds:dword ptr[_r_p0+16],eax
  1059. mov ds:dword ptr[_r_p0+20],esi
  1060. fdivr ds:dword ptr[float_1]
  1061. mov eax,ds:dword ptr[0+0+edx]
  1062. mov esi,ds:dword ptr[0+4+edx]
  1063. mov ds:dword ptr[_r_p1+0],eax
  1064. mov ds:dword ptr[_r_p1+4],esi
  1065. mov eax,ds:dword ptr[0+8+edx]
  1066. mov esi,ds:dword ptr[0+12+edx]
  1067. mov ds:dword ptr[_r_p1+8],eax
  1068. mov ds:dword ptr[_r_p1+12],esi
  1069. mov eax,ds:dword ptr[0+16+edx]
  1070. mov esi,ds:dword ptr[0+20+edx]
  1071. mov ds:dword ptr[_r_p1+16],eax
  1072. mov ds:dword ptr[_r_p1+20],esi
  1073. mov eax,ds:dword ptr[0+0+ebx]
  1074. mov esi,ds:dword ptr[0+4+ebx]
  1075. mov ds:dword ptr[_r_p2+0],eax
  1076. mov ds:dword ptr[_r_p2+4],esi
  1077. mov eax,ds:dword ptr[0+8+ebx]
  1078. mov esi,ds:dword ptr[0+12+ebx]
  1079. mov ds:dword ptr[_r_p2+8],eax
  1080. mov ds:dword ptr[_r_p2+12],esi
  1081. mov eax,ds:dword ptr[0+16+ebx]
  1082. mov esi,ds:dword ptr[0+20+ebx]
  1083. mov ds:dword ptr[_r_p2+16],eax
  1084. mov edi,ds:dword ptr[_r_affinetridesc+16]
  1085. mov ds:dword ptr[_r_p2+20],esi
  1086. mov eax,ds:dword ptr[0-16+edi+ebp*1]
  1087. test eax,eax
  1088. jnz LFacesFront
  1089. mov eax,ds:dword ptr[24+ecx]
  1090. mov esi,ds:dword ptr[24+edx]
  1091. mov edi,ds:dword ptr[24+ebx]
  1092. test eax,00020h
  1093. mov eax,ds:dword ptr[_r_affinetridesc+32]
  1094. jz LOnseamDone0
  1095. add ds:dword ptr[_r_p0+8],eax
  1096. LOnseamDone0:
  1097. test esi,00020h
  1098. jz LOnseamDone1
  1099. add ds:dword ptr[_r_p1+8],eax
  1100. LOnseamDone1:
  1101. test edi,00020h
  1102. jz LOnseamDone2
  1103. add ds:dword ptr[_r_p2+8],eax
  1104. LOnseamDone2:
  1105. LFacesFront:
  1106. fstp ds:dword ptr[_d_xdenom]
  1107. call near ptr _D_PolysetSetEdgeTable
  1108. call near ptr _D_RasterizeAliasPolySmooth
  1109. LNextTri:
  1110. mov esi,ds:dword ptr[_r_affinetridesc+16]
  1111. sub ebp,16
  1112. jnz LNDLoop
  1113. pop edi
  1114. pop esi
  1115. pop ebx
  1116. pop ebp
  1117. add esp,offset (((1024+1 + 1 + ((32 - 1) / 32)) + 1) * 32)
  1118. ret
  1119. _TEXT ENDS
  1120. END