home *** CD-ROM | disk | FTP | other *** search
/ Programming a Multiplayer FPS in DirectX / Programming a Multiplayer FPS in DirectX (Companion CD).iso / DirectX / dxsdk_oct2004.exe / dxsdk.exe / Utilities / MView / gxu / edgeoutline.cod < prev    next >
Encoding:
Text File  |  2004-09-30  |  51.5 KB  |  1,730 lines

  1. ; Listing generated by Microsoft (R) Optimizing Compiler Version 13.10.4035 
  2.  
  3.     TITLE    .\edgeoutline.cpp
  4.     .386P
  5. include listing.inc
  6. if @Version gt 510
  7. .model FLAT
  8. else
  9. _TEXT    SEGMENT PARA USE32 PUBLIC 'CODE'
  10. _TEXT    ENDS
  11. _DATA    SEGMENT DWORD USE32 PUBLIC 'DATA'
  12. _DATA    ENDS
  13. CONST    SEGMENT DWORD USE32 PUBLIC 'CONST'
  14. CONST    ENDS
  15. _BSS    SEGMENT DWORD USE32 PUBLIC 'BSS'
  16. _BSS    ENDS
  17. $$SYMBOLS    SEGMENT BYTE USE32 'DEBSYM'
  18. $$SYMBOLS    ENDS
  19. _TLS    SEGMENT DWORD USE32 PUBLIC 'TLS'
  20. _TLS    ENDS
  21. ;    COMDAT ??0CEdgeOutline@@QAE@XZ
  22. _TEXT    SEGMENT PARA USE32 PUBLIC 'CODE'
  23. _TEXT    ENDS
  24. ;    COMDAT ??1CEdgeOutline@@QAE@XZ
  25. _TEXT    SEGMENT PARA USE32 PUBLIC 'CODE'
  26. _TEXT    ENDS
  27. ;    COMDAT ?FindNeighbor@@YAKPBKK@Z
  28. _TEXT    SEGMENT PARA USE32 PUBLIC 'CODE'
  29. _TEXT    ENDS
  30. ;    COMDAT ?Init@CEdgeOutline@@QAEJPAUID3DXBaseMesh@@PAK@Z
  31. _TEXT    SEGMENT PARA USE32 PUBLIC 'CODE'
  32. _TEXT    ENDS
  33. ;    COMDAT ?Draw@CEdgeOutline@@QAEJPAUID3DXBaseMesh@@K@Z
  34. _TEXT    SEGMENT PARA USE32 PUBLIC 'CODE'
  35. _TEXT    ENDS
  36. ;    COMDAT ?CreateEmptyOutline@CEdgeOutline@@AAEJXZ
  37. _TEXT    SEGMENT PARA USE32 PUBLIC 'CODE'
  38. _TEXT    ENDS
  39. ;    COMDAT ??$BCrease@G@@YAHKKPAKPAG@Z
  40. _TEXT    SEGMENT PARA USE32 PUBLIC 'CODE'
  41. _TEXT    ENDS
  42. ;    COMDAT ??$BCrease@I@@YAHKKPAKPAI@Z
  43. _TEXT    SEGMENT PARA USE32 PUBLIC 'CODE'
  44. _TEXT    ENDS
  45. FLAT    GROUP _DATA, CONST, _BSS
  46.     ASSUME    CS: FLAT, DS: FLAT, SS: FLAT
  47. endif
  48.  
  49. INCLUDELIB LIBC
  50. INCLUDELIB OLDNAMES
  51.  
  52. PUBLIC    ??0CEdgeOutline@@QAE@XZ                ; CEdgeOutline::CEdgeOutline
  53. ; Function compile flags: /Ogs
  54. ; File d:\builds\nt32_fre\multimedia\directx\dxsdk\src\mview\gxu\edgeoutline.cpp
  55. ;    COMDAT ??0CEdgeOutline@@QAE@XZ
  56. _TEXT    SEGMENT
  57. ??0CEdgeOutline@@QAE@XZ PROC NEAR            ; CEdgeOutline::CEdgeOutline, COMDAT
  58. ; _this$ = ecx
  59.  
  60. ; 31   : {
  61.  
  62.   00000    8b c1         mov     eax, ecx
  63.   00002    33 c9         xor     ecx, ecx
  64.   00004    89 08         mov     DWORD PTR [eax], ecx
  65.   00006    89 48 04     mov     DWORD PTR [eax+4], ecx
  66.   00009    89 48 08     mov     DWORD PTR [eax+8], ecx
  67.   0000c    89 88 18 02 00
  68.     00         mov     DWORD PTR [eax+536], ecx
  69.   00012    89 88 1c 02 00
  70.     00         mov     DWORD PTR [eax+540], ecx
  71.   00018    89 88 20 02 00
  72.     00         mov     DWORD PTR [eax+544], ecx
  73.  
  74. ; 32   : }
  75.  
  76.   0001e    c3         ret     0
  77. ??0CEdgeOutline@@QAE@XZ ENDP                ; CEdgeOutline::CEdgeOutline
  78. _TEXT    ENDS
  79. PUBLIC    ??1CEdgeOutline@@QAE@XZ                ; CEdgeOutline::~CEdgeOutline
  80. EXTRN    ??3@YAXPAX@Z:NEAR                ; operator delete
  81. ; Function compile flags: /Ogs
  82. ;    COMDAT ??1CEdgeOutline@@QAE@XZ
  83. _TEXT    SEGMENT
  84. ??1CEdgeOutline@@QAE@XZ PROC NEAR            ; CEdgeOutline::~CEdgeOutline, COMDAT
  85. ; _this$ = ecx
  86.  
  87. ; 41   : }
  88.  
  89.   00000    8b ff         npad     2
  90.   00002    56         push     esi
  91.  
  92. ; 35   : {
  93.  
  94.   00003    8b f1         mov     esi, ecx
  95.  
  96. ; 36   :     GXRELEASE(m_pIndexBuffer);
  97.  
  98.   00005    8b 46 04     mov     eax, DWORD PTR [esi+4]
  99.   00008    85 c0         test     eax, eax
  100.   0000a    74 0a         je     SHORT $L56243
  101.   0000c    8b 08         mov     ecx, DWORD PTR [eax]
  102.   0000e    50         push     eax
  103.   0000f    ff 51 08     call     DWORD PTR [ecx+8]
  104.   00012    83 66 04 00     and     DWORD PTR [esi+4], 0
  105. $L56243:
  106.  
  107. ; 37   :     GXRELEASE(m_pDevice);
  108.  
  109.   00016    8b 06         mov     eax, DWORD PTR [esi]
  110.   00018    85 c0         test     eax, eax
  111.   0001a    74 09         je     SHORT $L56247
  112.   0001c    8b 08         mov     ecx, DWORD PTR [eax]
  113.   0001e    50         push     eax
  114.   0001f    ff 51 08     call     DWORD PTR [ecx+8]
  115.   00022    83 26 00     and     DWORD PTR [esi], 0
  116. $L56247:
  117.  
  118. ; 38   :     GXRELEASE(m_pDeclObj);
  119.  
  120.   00025    8b 46 08     mov     eax, DWORD PTR [esi+8]
  121.   00028    85 c0         test     eax, eax
  122.   0002a    74 0a         je     SHORT $L56251
  123.   0002c    8b 08         mov     ecx, DWORD PTR [eax]
  124.   0002e    50         push     eax
  125.   0002f    ff 51 08     call     DWORD PTR [ecx+8]
  126.   00032    83 66 08 00     and     DWORD PTR [esi+8], 0
  127. $L56251:
  128.  
  129. ; 39   : 
  130. ; 40   :     delete []m_rgaeAttributeTable;
  131.  
  132.   00036    ff b6 18 02 00
  133.     00         push     DWORD PTR [esi+536]
  134.   0003c    e8 00 00 00 00     call     ??3@YAXPAX@Z        ; operator delete
  135.   00041    59         pop     ecx
  136.   00042    5e         pop     esi
  137.  
  138. ; 41   : }
  139.  
  140.   00043    c3         ret     0
  141. ??1CEdgeOutline@@QAE@XZ ENDP                ; CEdgeOutline::~CEdgeOutline
  142. ; Function compile flags: /Ogs
  143. _TEXT    ENDS
  144. ;    COMDAT ?FindNeighbor@@YAKPBKK@Z
  145. _TEXT    SEGMENT
  146. ?FindNeighbor@@YAKPBKK@Z PROC NEAR            ; FindNeighbor, COMDAT
  147. ; _pdwAdjacency$ = ecx
  148. ; _iFace$ = eax
  149.  
  150. ; 49   :     if (pdwAdjacency[0] == iFace)
  151.  
  152.   00000    39 01         cmp     DWORD PTR [ecx], eax
  153.   00002    75 03         jne     SHORT $L56259
  154.  
  155. ; 50   :         return 0;
  156.  
  157.   00004    33 c0         xor     eax, eax
  158.  
  159. ; 52   :         return 1;
  160. ; 53   :     else 
  161. ; 54   :         return 2;
  162. ; 55   : }
  163.  
  164.   00006    c3         ret     0
  165. $L56259:
  166.  
  167. ; 51   :     else if (pdwAdjacency[1] == iFace)
  168.  
  169.   00007    33 d2         xor     edx, edx
  170.   00009    39 41 04     cmp     DWORD PTR [ecx+4], eax
  171.   0000c    0f 95 c2     setne     dl
  172.   0000f    42         inc     edx
  173.   00010    8b c2         mov     eax, edx
  174.  
  175. ; 52   :         return 1;
  176. ; 53   :     else 
  177. ; 54   :         return 2;
  178. ; 55   : }
  179.  
  180.   00012    c3         ret     0
  181. ?FindNeighbor@@YAKPBKK@Z ENDP                ; FindNeighbor
  182. _TEXT    ENDS
  183. PUBLIC    ?Draw@CEdgeOutline@@QAEJPAUID3DXBaseMesh@@K@Z    ; CEdgeOutline::Draw
  184. EXTRN    __alloca_probe:NEAR
  185. ; Function compile flags: /Ogs
  186. ;    COMDAT ?Draw@CEdgeOutline@@QAEJPAUID3DXBaseMesh@@K@Z
  187. _TEXT    SEGMENT
  188. _iLineEnd$ = -20                    ; size = 4
  189. _pbPoints$ = -16                    ; size = 4
  190. _pdwLineIndices$ = -12                    ; size = 4
  191. _pVertexBuffer$ = -8                    ; size = 4
  192. _pbLine$ = -4                        ; size = 4
  193. _ptmDrawMesh$ = 8                    ; size = 4
  194. _iLine$ = 12                        ; size = 4
  195. _iAttrib$ = 12                        ; size = 4
  196. ?Draw@CEdgeOutline@@QAEJPAUID3DXBaseMesh@@K@Z PROC NEAR    ; CEdgeOutline::Draw, COMDAT
  197. ; _this$ = ecx
  198.  
  199. ; 364  : }
  200.  
  201.   00000    8b ff         npad     2
  202.  
  203. ; 284  : {
  204.  
  205.   00002    55         push     ebp
  206.   00003    8b ec         mov     ebp, esp
  207.   00005    83 ec 14     sub     esp, 20            ; 00000014H
  208.   00008    53         push     ebx
  209.   00009    8b d9         mov     ebx, ecx
  210.  
  211. ; 285  :     HRESULT hr;
  212. ; 286  :     LPDIRECT3DVERTEXBUFFER9 pVertexBuffer;
  213. ; 287  :     DWORD iSubset;
  214. ; 288  : 
  215. ; 289  :     DWORD *pdwLineIndices;
  216. ; 290  :     PBYTE pbLine;
  217. ; 291  :     PBYTE pbPoints;
  218. ; 292  :     DWORD iLine;
  219. ; 293  :     DWORD iLineStart;
  220. ; 294  :     DWORD iLineEnd;
  221. ; 295  : 
  222. ; 296  :     if ((iAttrib < m_caeAttributeTable) && (m_rgaeAttributeTable[iAttrib].AttribId == iAttrib))
  223.  
  224.   0000b    8b 93 1c 02 00
  225.     00         mov     edx, DWORD PTR [ebx+540]
  226.   00011    8b 4d 0c     mov     ecx, DWORD PTR _iAttrib$[ebp]
  227.   00014    3b ca         cmp     ecx, edx
  228.   00016    56         push     esi
  229.   00017    57         push     edi
  230.   00018    73 14         jae     SHORT $L56392
  231.   0001a    8b b3 18 02 00
  232.     00         mov     esi, DWORD PTR [ebx+536]
  233.   00020    8d 04 89     lea     eax, DWORD PTR [ecx+ecx*4]
  234.   00023    39 0c 86     cmp     DWORD PTR [esi+eax*4], ecx
  235.   00026    75 06         jne     SHORT $L56392
  236.  
  237. ; 297  :     {
  238. ; 298  :         iSubset = iAttrib;
  239.  
  240.   00028    8b c1         mov     eax, ecx
  241.  
  242. ; 299  :     }
  243. ; 300  :     else
  244.  
  245.   0002a    33 ff         xor     edi, edi
  246.   0002c    eb 1a         jmp     SHORT $L56480
  247. $L56392:
  248.  
  249. ; 301  :     {
  250. ; 302  :         // look for the correct attribute table entry to draw
  251. ; 303  :         for (iSubset = 0; iSubset < m_caeAttributeTable; iSubset++)
  252.  
  253.   0002e    33 ff         xor     edi, edi
  254.   00030    33 c0         xor     eax, eax
  255.   00032    3b d7         cmp     edx, edi
  256.   00034    76 12         jbe     SHORT $L56480
  257.   00036    8b b3 18 02 00
  258.     00         mov     esi, DWORD PTR [ebx+536]
  259. $L56394:
  260.  
  261. ; 304  :         {
  262. ; 305  :             if (m_rgaeAttributeTable[iSubset].AttribId == iAttrib)
  263.  
  264.   0003c    39 0e         cmp     DWORD PTR [esi], ecx
  265.   0003e    74 08         je     SHORT $L56480
  266.   00040    40         inc     eax
  267.   00041    83 c6 14     add     esi, 20            ; 00000014H
  268.   00044    3b c2         cmp     eax, edx
  269.   00046    72 f4         jb     SHORT $L56394
  270. $L56480:
  271.  
  272. ; 306  :             {
  273. ; 307  :                 break;
  274. ; 308  :             }
  275. ; 309  :         }
  276. ; 310  :     }
  277. ; 311  : 
  278. ; 312  :     if (iSubset < m_caeAttributeTable)
  279.  
  280.   00048    3b c2         cmp     eax, edx
  281.   0004a    0f 83 8d 01 00
  282.     00         jae     $L56407
  283.  
  284. ; 313  :     {
  285. ; 314  :         if (m_rgaeAttributeTable[iSubset].FaceCount > 0)
  286.  
  287.   00050    8d 34 80     lea     esi, DWORD PTR [eax+eax*4]
  288.   00053    8b 83 18 02 00
  289.     00         mov     eax, DWORD PTR [ebx+536]
  290.   00059    c1 e6 02     shl     esi, 2
  291.   0005c    39 7c 06 08     cmp     DWORD PTR [esi+eax+8], edi
  292.   00060    0f 86 77 01 00
  293.     00         jbe     $L56407
  294.  
  295. ; 315  :         {
  296. ; 316  :             if (!m_bEmulate32BitIndex)
  297.  
  298.   00066    39 bb 20 02 00
  299.     00         cmp     DWORD PTR [ebx+544], edi
  300.  
  301. ; 317  :             {
  302. ; 318  :                 ptmDrawMesh->GetVertexBuffer(&pVertexBuffer);
  303.  
  304.   0006c    8b 45 08     mov     eax, DWORD PTR _ptmDrawMesh$[ebp]
  305.   0006f    8b 08         mov     ecx, DWORD PTR [eax]
  306.   00071    75 7f         jne     SHORT $L56400
  307.   00073    8d 55 f8     lea     edx, DWORD PTR _pVertexBuffer$[ebp]
  308.   00076    52         push     edx
  309.   00077    50         push     eax
  310.   00078    ff 51 34     call     DWORD PTR [ecx+52]
  311.  
  312. ; 319  :                 m_pDevice->SetVertexDeclaration(m_pDeclObj);
  313.  
  314.   0007b    8b 03         mov     eax, DWORD PTR [ebx]
  315.   0007d    ff 73 08     push     DWORD PTR [ebx+8]
  316.   00080    8b 08         mov     ecx, DWORD PTR [eax]
  317.   00082    50         push     eax
  318.   00083    ff 91 5c 01 00
  319.     00         call     DWORD PTR [ecx+348]
  320.  
  321. ; 320  :                 m_pDevice->SetStreamSource(0, pVertexBuffer, 0, m_cBytesPerVertex);
  322.  
  323.   00089    ff b3 14 02 00
  324.     00         push     DWORD PTR [ebx+532]
  325.   0008f    8b 03         mov     eax, DWORD PTR [ebx]
  326.   00091    8b 08         mov     ecx, DWORD PTR [eax]
  327.   00093    57         push     edi
  328.   00094    ff 75 f8     push     DWORD PTR _pVertexBuffer$[ebp]
  329.   00097    57         push     edi
  330.   00098    50         push     eax
  331.   00099    ff 91 90 01 00
  332.     00         call     DWORD PTR [ecx+400]
  333.  
  334. ; 321  :                 m_pDevice->SetIndices(m_pIndexBuffer);
  335.  
  336.   0009f    8b 03         mov     eax, DWORD PTR [ebx]
  337.   000a1    ff 73 04     push     DWORD PTR [ebx+4]
  338.   000a4    8b 08         mov     ecx, DWORD PTR [eax]
  339.   000a6    50         push     eax
  340.   000a7    ff 91 a0 01 00
  341.     00         call     DWORD PTR [ecx+416]
  342.  
  343. ; 322  : 
  344. ; 323  :                 hr = m_pDevice->DrawIndexedPrimitive(D3DPT_LINELIST, 
  345. ; 324  :                                              0, 0, m_rgaeAttributeTable[iSubset].VertexStart + m_rgaeAttributeTable[iSubset].VertexCount,
  346. ; 325  :                                              m_rgaeAttributeTable[iSubset].FaceStart * 2, 
  347. ; 326  :                                              m_rgaeAttributeTable[iSubset].FaceCount);
  348.  
  349.   000ad    8b 83 18 02 00
  350.     00         mov     eax, DWORD PTR [ebx+536]
  351.   000b3    8b 0b         mov     ecx, DWORD PTR [ebx]
  352.   000b5    8b 11         mov     edx, DWORD PTR [ecx]
  353.   000b7    03 c6         add     eax, esi
  354.   000b9    ff 70 08     push     DWORD PTR [eax+8]
  355.   000bc    8b 70 04     mov     esi, DWORD PTR [eax+4]
  356.   000bf    d1 e6         shl     esi, 1
  357.   000c1    56         push     esi
  358.   000c2    8b 70 10     mov     esi, DWORD PTR [eax+16]
  359.   000c5    03 70 0c     add     esi, DWORD PTR [eax+12]
  360.   000c8    56         push     esi
  361.   000c9    57         push     edi
  362.   000ca    57         push     edi
  363.   000cb    6a 02         push     2
  364.   000cd    51         push     ecx
  365.   000ce    ff 92 48 01 00
  366.     00         call     DWORD PTR [edx+328]
  367.  
  368. ; 327  :                 if (FAILED(hr))
  369.  
  370.   000d4    3b c7         cmp     eax, edi
  371.  
  372. ; 328  :                     return hr;
  373.  
  374.   000d6    0f 8c 03 01 00
  375.     00         jl     $L56382
  376.  
  377. ; 329  : 
  378. ; 330  :                 GXRELEASE(pVertexBuffer);
  379.  
  380.   000dc    8b 45 f8     mov     eax, DWORD PTR _pVertexBuffer$[ebp]
  381.   000df    3b c7         cmp     eax, edi
  382.   000e1    0f 84 f6 00 00
  383.     00         je     $L56407
  384.   000e7    8b 08         mov     ecx, DWORD PTR [eax]
  385.   000e9    50         push     eax
  386.   000ea    ff 51 08     call     DWORD PTR [ecx+8]
  387.  
  388. ; 331  :             }
  389. ; 332  :             else
  390.  
  391.   000ed    e9 eb 00 00 00     jmp     $L56407
  392. $L56400:
  393.  
  394. ; 333  :             {
  395. ; 334  :                 GXASSERT(ptmDrawMesh->GetOptions() & D3DXMESH_32BIT);
  396. ; 335  : 
  397. ; 336  :                 hr = ptmDrawMesh->LockVertexBuffer(D3DLOCK_READONLY, (PVOID*)&pbPoints);
  398.  
  399.   000f2    8d 55 f0     lea     edx, DWORD PTR _pbPoints$[ebp]
  400.   000f5    52         push     edx
  401.   000f6    6a 10         push     16            ; 00000010H
  402.   000f8    50         push     eax
  403.   000f9    ff 51 3c     call     DWORD PTR [ecx+60]
  404.  
  405. ; 337  :                 if (FAILED(hr))
  406.  
  407.   000fc    3b c7         cmp     eax, edi
  408.  
  409. ; 338  :                     return hr;
  410.  
  411.   000fe    0f 8c db 00 00
  412.     00         jl     $L56382
  413.  
  414. ; 339  : 
  415. ; 340  :                 hr = m_pIndexBuffer->Lock(0, 0, (PVOID*)&pdwLineIndices, D3DLOCK_NOSYSLOCK|D3DLOCK_READONLY);
  416.  
  417.   00104    8b 43 04     mov     eax, DWORD PTR [ebx+4]
  418.   00107    8b 08         mov     ecx, DWORD PTR [eax]
  419.   00109    68 10 08 00 00     push     2064            ; 00000810H
  420.   0010e    8d 55 f4     lea     edx, DWORD PTR _pdwLineIndices$[ebp]
  421.   00111    52         push     edx
  422.   00112    57         push     edi
  423.   00113    57         push     edi
  424.   00114    50         push     eax
  425.   00115    ff 51 2c     call     DWORD PTR [ecx+44]
  426.  
  427. ; 341  :                 if (FAILED(hr))
  428.  
  429.   00118    3b c7         cmp     eax, edi
  430.  
  431. ; 342  :                     return hr;
  432.  
  433.   0011a    0f 8c bf 00 00
  434.     00         jl     $L56382
  435.  
  436. ; 343  : 
  437. ; 344  :                 pbLine = (PBYTE)_alloca(m_cBytesPerVertex * 2);
  438.  
  439.   00120    8b 83 14 02 00
  440.     00         mov     eax, DWORD PTR [ebx+532]
  441.   00126    d1 e0         shl     eax, 1
  442.   00128    83 c0 03     add     eax, 3
  443.   0012b    83 e0 fc     and     eax, -4            ; fffffffcH
  444.   0012e    e8 00 00 00 00     call     __alloca_probe
  445.  
  446. ; 345  : 
  447. ; 346  :                 iLineStart = m_rgaeAttributeTable[iSubset].FaceStart * 2;
  448.  
  449.   00133    8b 83 18 02 00
  450.     00         mov     eax, DWORD PTR [ebx+536]
  451.   00139    8d 0c 06     lea     ecx, DWORD PTR [esi+eax]
  452.   0013c    8b 41 04     mov     eax, DWORD PTR [ecx+4]
  453.  
  454. ; 347  :                 iLineEnd = iLineStart + m_rgaeAttributeTable[iSubset].FaceCount * 2;
  455.  
  456.   0013f    8b 49 08     mov     ecx, DWORD PTR [ecx+8]
  457.   00142    d1 e0         shl     eax, 1
  458.   00144    8d 0c 48     lea     ecx, DWORD PTR [eax+ecx*2]
  459.  
  460. ; 348  :                 for (iLine = iLineStart; iLine < iLineEnd; iLine+=2)
  461.  
  462.   00147    3b c1         cmp     eax, ecx
  463.   00149    89 65 fc     mov     DWORD PTR _pbLine$[ebp], esp
  464.   0014c    89 4d ec     mov     DWORD PTR _iLineEnd$[ebp], ecx
  465.   0014f    89 45 0c     mov     DWORD PTR _iLine$[ebp], eax
  466.   00152    73 77         jae     SHORT $L56418
  467. $L56416:
  468.  
  469. ; 349  :                 {
  470. ; 350  :                     memcpy(pbLine, pbPoints + pdwLineIndices[iLine]*m_cBytesPerVertex, m_cBytesPerVertex);
  471.  
  472.   00154    8b 55 f4     mov     edx, DWORD PTR _pdwLineIndices$[ebp]
  473.   00157    8b 8b 14 02 00
  474.     00         mov     ecx, DWORD PTR [ebx+532]
  475.   0015d    8b 45 0c     mov     eax, DWORD PTR _iLine$[ebp]
  476.   00160    8b 7d fc     mov     edi, DWORD PTR _pbLine$[ebp]
  477.   00163    c1 e0 02     shl     eax, 2
  478.   00166    8b 34 10     mov     esi, DWORD PTR [eax+edx]
  479.   00169    0f af f1     imul     esi, ecx
  480.   0016c    03 75 f0     add     esi, DWORD PTR _pbPoints$[ebp]
  481.   0016f    8b d1         mov     edx, ecx
  482.   00171    c1 e9 02     shr     ecx, 2
  483.   00174    f3 a5         rep movsd
  484.   00176    8b ca         mov     ecx, edx
  485.   00178    83 e1 03     and     ecx, 3
  486.   0017b    f3 a4         rep movsb
  487.  
  488. ; 351  :                     memcpy(pbLine + m_cBytesPerVertex, pbPoints + pdwLineIndices[iLine+1]*m_cBytesPerVertex, m_cBytesPerVertex);
  489.  
  490.   0017d    8b 8b 14 02 00
  491.     00         mov     ecx, DWORD PTR [ebx+532]
  492.   00183    8b 55 f4     mov     edx, DWORD PTR _pdwLineIndices$[ebp]
  493.   00186    8b 74 10 04     mov     esi, DWORD PTR [eax+edx+4]
  494.   0018a    0f af f1     imul     esi, ecx
  495.   0018d    03 75 f0     add     esi, DWORD PTR _pbPoints$[ebp]
  496.   00190    8b f9         mov     edi, ecx
  497.   00192    03 7d fc     add     edi, DWORD PTR _pbLine$[ebp]
  498.   00195    8b c1         mov     eax, ecx
  499.   00197    c1 e9 02     shr     ecx, 2
  500.   0019a    f3 a5         rep movsd
  501.   0019c    8b c8         mov     ecx, eax
  502.   0019e    83 e1 03     and     ecx, 3
  503.   001a1    f3 a4         rep movsb
  504.  
  505. ; 352  : 
  506. ; 353  :                     hr = m_pDevice->DrawPrimitiveUP(D3DPT_LINELIST, 1, pbLine, m_cBytesPerVertex);
  507.  
  508.   001a3    ff b3 14 02 00
  509.     00         push     DWORD PTR [ebx+532]
  510.   001a9    8b 03         mov     eax, DWORD PTR [ebx]
  511.   001ab    ff 75 fc     push     DWORD PTR _pbLine$[ebp]
  512.   001ae    8b 08         mov     ecx, DWORD PTR [eax]
  513.   001b0    6a 01         push     1
  514.   001b2    6a 02         push     2
  515.   001b4    50         push     eax
  516.   001b5    ff 91 4c 01 00
  517.     00         call     DWORD PTR [ecx+332]
  518.  
  519. ; 354  :                     if (FAILED(hr))
  520.  
  521.   001bb    85 c0         test     eax, eax
  522.   001bd    7c 20         jl     SHORT $L56382
  523.   001bf    83 45 0c 02     add     DWORD PTR _iLine$[ebp], 2
  524.   001c3    8b 45 0c     mov     eax, DWORD PTR _iLine$[ebp]
  525.   001c6    3b 45 ec     cmp     eax, DWORD PTR _iLineEnd$[ebp]
  526.   001c9    72 89         jb     SHORT $L56416
  527. $L56418:
  528.  
  529. ; 355  :                         return hr;
  530. ; 356  :                 }
  531. ; 357  : 
  532. ; 358  :                 ptmDrawMesh->UnlockVertexBuffer();
  533.  
  534.   001cb    8b 45 08     mov     eax, DWORD PTR _ptmDrawMesh$[ebp]
  535.   001ce    8b 08         mov     ecx, DWORD PTR [eax]
  536.   001d0    50         push     eax
  537.   001d1    ff 51 40     call     DWORD PTR [ecx+64]
  538.  
  539. ; 359  :                 m_pIndexBuffer->Unlock();
  540.  
  541.   001d4    8b 5b 04     mov     ebx, DWORD PTR [ebx+4]
  542.   001d7    8b 03         mov     eax, DWORD PTR [ebx]
  543.   001d9    53         push     ebx
  544.   001da    ff 50 30     call     DWORD PTR [eax+48]
  545. $L56407:
  546.  
  547. ; 360  :             }
  548. ; 361  :         }
  549. ; 362  :     }
  550. ; 363  :     return S_OK;
  551.  
  552.   001dd    33 c0         xor     eax, eax
  553. $L56382:
  554.  
  555. ; 364  : }
  556.  
  557.   001df    8d 65 e0     lea     esp, DWORD PTR [ebp-32]
  558.   001e2    5f         pop     edi
  559.   001e3    5e         pop     esi
  560.   001e4    5b         pop     ebx
  561.   001e5    c9         leave
  562.   001e6    c2 08 00     ret     8
  563. ?Draw@CEdgeOutline@@QAEJPAUID3DXBaseMesh@@K@Z ENDP    ; CEdgeOutline::Draw
  564. _TEXT    ENDS
  565. PUBLIC    ?CreateEmptyOutline@CEdgeOutline@@AAEJXZ    ; CEdgeOutline::CreateEmptyOutline
  566. ; Function compile flags: /Ogs
  567. ;    COMDAT ?CreateEmptyOutline@CEdgeOutline@@AAEJXZ
  568. _TEXT    SEGMENT
  569. ?CreateEmptyOutline@CEdgeOutline@@AAEJXZ PROC NEAR    ; CEdgeOutline::CreateEmptyOutline, COMDAT
  570. ; _this$ = ecx
  571.  
  572. ; 377  : }
  573.  
  574.   00000    8b ff         npad     2
  575.   00002    53         push     ebx
  576.   00003    56         push     esi
  577.  
  578. ; 368  : {
  579.  
  580.   00004    8b f1         mov     esi, ecx
  581.   00006    57         push     edi
  582.  
  583. ; 369  :     delete []m_rgaeAttributeTable;
  584.  
  585.   00007    8d be 18 02 00
  586.     00         lea     edi, DWORD PTR [esi+536]
  587.   0000d    ff 37         push     DWORD PTR [edi]
  588.   0000f    e8 00 00 00 00     call     ??3@YAXPAX@Z        ; operator delete
  589.  
  590. ; 370  :     m_rgaeAttributeTable = NULL;
  591. ; 371  :     m_caeAttributeTable = 0;
  592. ; 372  :     GXRELEASE(m_pIndexBuffer);
  593.  
  594.   00014    8b 46 04     mov     eax, DWORD PTR [esi+4]
  595.   00017    33 db         xor     ebx, ebx
  596.   00019    3b c3         cmp     eax, ebx
  597.   0001b    59         pop     ecx
  598.   0001c    89 1f         mov     DWORD PTR [edi], ebx
  599.   0001e    89 9e 1c 02 00
  600.     00         mov     DWORD PTR [esi+540], ebx
  601.   00024    74 09         je     SHORT $L56427
  602.   00026    8b 08         mov     ecx, DWORD PTR [eax]
  603.   00028    50         push     eax
  604.   00029    ff 51 08     call     DWORD PTR [ecx+8]
  605.   0002c    89 5e 04     mov     DWORD PTR [esi+4], ebx
  606. $L56427:
  607.  
  608. ; 373  :     GXRELEASE(m_pDevice);
  609.  
  610.   0002f    8b 06         mov     eax, DWORD PTR [esi]
  611.   00031    3b c3         cmp     eax, ebx
  612.   00033    74 08         je     SHORT $L56431
  613.   00035    8b 08         mov     ecx, DWORD PTR [eax]
  614.   00037    50         push     eax
  615.   00038    ff 51 08     call     DWORD PTR [ecx+8]
  616.   0003b    89 1e         mov     DWORD PTR [esi], ebx
  617. $L56431:
  618.  
  619. ; 374  :     GXRELEASE(m_pDeclObj);
  620.  
  621.   0003d    8b 46 08     mov     eax, DWORD PTR [esi+8]
  622.   00040    3b c3         cmp     eax, ebx
  623.   00042    74 09         je     SHORT $L56435
  624.   00044    8b 08         mov     ecx, DWORD PTR [eax]
  625.   00046    50         push     eax
  626.   00047    ff 51 08     call     DWORD PTR [ecx+8]
  627.   0004a    89 5e 08     mov     DWORD PTR [esi+8], ebx
  628. $L56435:
  629.   0004d    5f         pop     edi
  630.   0004e    5e         pop     esi
  631.  
  632. ; 375  : 
  633. ; 376  :     return S_OK;
  634.  
  635.   0004f    33 c0         xor     eax, eax
  636.   00051    5b         pop     ebx
  637.  
  638. ; 377  : }
  639.  
  640.   00052    c3         ret     0
  641. ?CreateEmptyOutline@CEdgeOutline@@AAEJXZ ENDP        ; CEdgeOutline::CreateEmptyOutline
  642. _TEXT    ENDS
  643. PUBLIC    ??$BCrease@G@@YAHKKPAKPAG@Z            ; BCrease<unsigned short>
  644. ; Function compile flags: /Ogs
  645. ;    COMDAT ??$BCrease@G@@YAHKKPAKPAG@Z
  646. _TEXT    SEGMENT
  647. tv192 = 8                        ; size = 4
  648. _iFace$ = 8                        ; size = 4
  649. _iPoint$ = 12                        ; size = 4
  650. _rgdwAdjacency$ = 16                    ; size = 4
  651. _pwFaceIndices$ = 20                    ; size = 4
  652. ??$BCrease@G@@YAHKKPAKPAG@Z PROC NEAR            ; BCrease<unsigned short>, COMDAT
  653.  
  654. ; 81   :     }
  655. ; 82   : }
  656.  
  657.   00000    8b ff         npad     2
  658.  
  659. ; 59   : {
  660.  
  661.   00002    55         push     ebp
  662.   00003    8b ec         mov     ebp, esp
  663.  
  664. ; 60   :     DWORD iNeighbor;
  665. ; 61   :     DWORD iEdge;
  666. ; 62   : 
  667. ; 63   :     GXASSERT(iPoint < 3);
  668. ; 64   : 
  669. ; 65   :     iNeighbor = rgdwAdjacency[(iFace * 3) + iPoint];
  670.  
  671.   00005    8b 4d 08     mov     ecx, DWORD PTR _iFace$[ebp]
  672.   00008    8b 45 0c     mov     eax, DWORD PTR _iPoint$[ebp]
  673.   0000b    8b 55 10     mov     edx, DWORD PTR _rgdwAdjacency$[ebp]
  674.   0000e    53         push     ebx
  675.   0000f    8d 1c 49     lea     ebx, DWORD PTR [ecx+ecx*2]
  676.   00012    89 5d 08     mov     DWORD PTR tv192[ebp], ebx
  677.   00015    03 d8         add     ebx, eax
  678.   00017    8b 04 9a     mov     eax, DWORD PTR [edx+ebx*4]
  679.  
  680. ; 66   :     if (iNeighbor == UNUSED32)
  681.  
  682.   0001a    83 f8 ff     cmp     eax, -1
  683.   0001d    75 05         jne     SHORT $L56443
  684.  
  685. ; 67   :         return TRUE;
  686.  
  687.   0001f    33 c0         xor     eax, eax
  688.   00021    40         inc     eax
  689.   00022    eb 5b         jmp     SHORT $L56446
  690. $L56443:
  691.   00024    56         push     esi
  692.  
  693. ; 68   : 
  694. ; 69   :     GXASSERT(rgdwAdjacency[(iFace * 3) + iPoint] != UNUSED32);
  695. ; 70   : 
  696. ; 71   :     iEdge = FindNeighbor(&rgdwAdjacency[iNeighbor * 3], iFace);
  697.  
  698.   00025    8d 34 40     lea     esi, DWORD PTR [eax+eax*2]
  699.   00028    8d 34 b2     lea     esi, DWORD PTR [edx+esi*4]
  700.   0002b    39 0e         cmp     DWORD PTR [esi], ecx
  701.   0002d    57         push     edi
  702.   0002e    75 04         jne     SHORT $L56493
  703.   00030    33 ff         xor     edi, edi
  704.   00032    eb 0b         jmp     SHORT $L56495
  705. $L56493:
  706.   00034    33 d2         xor     edx, edx
  707.   00036    39 4e 04     cmp     DWORD PTR [esi+4], ecx
  708.   00039    0f 95 c2     setne     dl
  709.   0003c    42         inc     edx
  710.   0003d    8b fa         mov     edi, edx
  711. $L56495:
  712.  
  713. ; 72   : 
  714. ; 73   :     if ((pwFaceIndices[iNeighbor * 3 + iEdge] == pwFaceIndices[iFace * 3 + ((iPoint+1)%3)])
  715. ; 74   :         && (pwFaceIndices[iNeighbor * 3 +((iEdge+1)%3)] == pwFaceIndices[iFace * 3 + iPoint]))
  716.  
  717.   0003f    8d 34 40     lea     esi, DWORD PTR [eax+eax*2]
  718.   00042    8b 45 0c     mov     eax, DWORD PTR _iPoint$[ebp]
  719.   00045    40         inc     eax
  720.   00046    33 d2         xor     edx, edx
  721.   00048    6a 03         push     3
  722.   0004a    59         pop     ecx
  723.   0004b    f7 f1         div     ecx
  724.   0004d    8b 4d 14     mov     ecx, DWORD PTR _pwFaceIndices$[ebp]
  725.   00050    8d 04 3e     lea     eax, DWORD PTR [esi+edi]
  726.   00053    66 8b 04 41     mov     ax, WORD PTR [ecx+eax*2]
  727.   00057    03 55 08     add     edx, DWORD PTR tv192[ebp]
  728.   0005a    66 3b 04 51     cmp     ax, WORD PTR [ecx+edx*2]
  729.   0005e    75 1a         jne     SHORT $L56445
  730.   00060    8d 47 01     lea     eax, DWORD PTR [edi+1]
  731.   00063    33 d2         xor     edx, edx
  732.   00065    6a 03         push     3
  733.   00067    5f         pop     edi
  734.   00068    f7 f7         div     edi
  735.   0006a    03 d6         add     edx, esi
  736.   0006c    66 8b 04 51     mov     ax, WORD PTR [ecx+edx*2]
  737.   00070    66 3b 04 59     cmp     ax, WORD PTR [ecx+ebx*2]
  738.   00074    75 04         jne     SHORT $L56445
  739.  
  740. ; 75   :     {
  741. ; 76   :         return FALSE;
  742.  
  743.   00076    33 c0         xor     eax, eax
  744.   00078    eb 03         jmp     SHORT $L56498
  745. $L56445:
  746.  
  747. ; 77   :     }
  748. ; 78   :     else 
  749. ; 79   :     {
  750. ; 80   :         return TRUE;
  751.  
  752.   0007a    33 c0         xor     eax, eax
  753.   0007c    40         inc     eax
  754. $L56498:
  755.   0007d    5f         pop     edi
  756.   0007e    5e         pop     esi
  757. $L56446:
  758.   0007f    5b         pop     ebx
  759.  
  760. ; 81   :     }
  761. ; 82   : }
  762.  
  763.   00080    5d         pop     ebp
  764.   00081    c3         ret     0
  765. ??$BCrease@G@@YAHKKPAKPAG@Z ENDP            ; BCrease<unsigned short>
  766. _TEXT    ENDS
  767. PUBLIC    ??$BCrease@I@@YAHKKPAKPAI@Z            ; BCrease<unsigned int>
  768. ; Function compile flags: /Ogs
  769. ;    COMDAT ??$BCrease@I@@YAHKKPAKPAI@Z
  770. _TEXT    SEGMENT
  771. tv192 = 8                        ; size = 4
  772. _iFace$ = 8                        ; size = 4
  773. _iPoint$ = 12                        ; size = 4
  774. _rgdwAdjacency$ = 16                    ; size = 4
  775. _pwFaceIndices$ = 20                    ; size = 4
  776. ??$BCrease@I@@YAHKKPAKPAI@Z PROC NEAR            ; BCrease<unsigned int>, COMDAT
  777.  
  778. ; 81   :     }
  779. ; 82   : }
  780.  
  781.   00000    8b ff         npad     2
  782.  
  783. ; 59   : {
  784.  
  785.   00002    55         push     ebp
  786.   00003    8b ec         mov     ebp, esp
  787.  
  788. ; 60   :     DWORD iNeighbor;
  789. ; 61   :     DWORD iEdge;
  790. ; 62   : 
  791. ; 63   :     GXASSERT(iPoint < 3);
  792. ; 64   : 
  793. ; 65   :     iNeighbor = rgdwAdjacency[(iFace * 3) + iPoint];
  794.  
  795.   00005    8b 4d 08     mov     ecx, DWORD PTR _iFace$[ebp]
  796.   00008    8b 55 0c     mov     edx, DWORD PTR _iPoint$[ebp]
  797.   0000b    56         push     esi
  798.   0000c    8d 34 49     lea     esi, DWORD PTR [ecx+ecx*2]
  799.   0000f    89 75 08     mov     DWORD PTR tv192[ebp], esi
  800.   00012    03 f2         add     esi, edx
  801.   00014    57         push     edi
  802.   00015    8b 7d 10     mov     edi, DWORD PTR _rgdwAdjacency$[ebp]
  803.   00018    c1 e6 02     shl     esi, 2
  804.   0001b    8b 04 3e     mov     eax, DWORD PTR [esi+edi]
  805.  
  806. ; 66   :     if (iNeighbor == UNUSED32)
  807.  
  808.   0001e    83 f8 ff     cmp     eax, -1
  809.   00021    75 05         jne     SHORT $L56451
  810.  
  811. ; 67   :         return TRUE;
  812.  
  813.   00023    33 c0         xor     eax, eax
  814.   00025    40         inc     eax
  815.   00026    eb 4e         jmp     SHORT $L56454
  816. $L56451:
  817.   00028    53         push     ebx
  818.  
  819. ; 68   : 
  820. ; 69   :     GXASSERT(rgdwAdjacency[(iFace * 3) + iPoint] != UNUSED32);
  821. ; 70   : 
  822. ; 71   :     iEdge = FindNeighbor(&rgdwAdjacency[iNeighbor * 3], iFace);
  823.  
  824.   00029    8d 1c 40     lea     ebx, DWORD PTR [eax+eax*2]
  825.   0002c    8d 3c 9f     lea     edi, DWORD PTR [edi+ebx*4]
  826.   0002f    33 db         xor     ebx, ebx
  827.   00031    39 0f         cmp     DWORD PTR [edi], ecx
  828.   00033    74 07         je     SHORT $L56506
  829.   00035    39 4f 04     cmp     DWORD PTR [edi+4], ecx
  830.   00038    0f 95 c3     setne     bl
  831.   0003b    43         inc     ebx
  832. $L56506:
  833.  
  834. ; 72   : 
  835. ; 73   :     if ((pwFaceIndices[iNeighbor * 3 + iEdge] == pwFaceIndices[iFace * 3 + ((iPoint+1)%3)])
  836. ; 74   :         && (pwFaceIndices[iNeighbor * 3 +((iEdge+1)%3)] == pwFaceIndices[iFace * 3 + iPoint]))
  837.  
  838.   0003c    8d 3c 40     lea     edi, DWORD PTR [eax+eax*2]
  839.   0003f    8d 42 01     lea     eax, DWORD PTR [edx+1]
  840.   00042    33 d2         xor     edx, edx
  841.   00044    6a 03         push     3
  842.   00046    59         pop     ecx
  843.   00047    f7 f1         div     ecx
  844.   00049    8b 4d 14     mov     ecx, DWORD PTR _pwFaceIndices$[ebp]
  845.   0004c    8d 04 1f     lea     eax, DWORD PTR [edi+ebx]
  846.   0004f    8b 04 81     mov     eax, DWORD PTR [ecx+eax*4]
  847.   00052    03 55 08     add     edx, DWORD PTR tv192[ebp]
  848.   00055    3b 04 91     cmp     eax, DWORD PTR [ecx+edx*4]
  849.   00058    75 18         jne     SHORT $L56453
  850.   0005a    8d 43 01     lea     eax, DWORD PTR [ebx+1]
  851.   0005d    33 d2         xor     edx, edx
  852.   0005f    6a 03         push     3
  853.   00061    5b         pop     ebx
  854.   00062    f7 f3         div     ebx
  855.   00064    03 d7         add     edx, edi
  856.   00066    8b 04 91     mov     eax, DWORD PTR [ecx+edx*4]
  857.   00069    3b 04 0e     cmp     eax, DWORD PTR [esi+ecx]
  858.   0006c    75 04         jne     SHORT $L56453
  859.  
  860. ; 75   :     {
  861. ; 76   :         return FALSE;
  862.  
  863.   0006e    33 c0         xor     eax, eax
  864.   00070    eb 03         jmp     SHORT $L56509
  865. $L56453:
  866.  
  867. ; 77   :     }
  868. ; 78   :     else 
  869. ; 79   :     {
  870. ; 80   :         return TRUE;
  871.  
  872.   00072    33 c0         xor     eax, eax
  873.   00074    40         inc     eax
  874. $L56509:
  875.   00075    5b         pop     ebx
  876. $L56454:
  877.   00076    5f         pop     edi
  878.   00077    5e         pop     esi
  879.  
  880. ; 81   :     }
  881. ; 82   : }
  882.  
  883.   00078    5d         pop     ebp
  884.   00079    c3         ret     0
  885. ??$BCrease@I@@YAHKKPAKPAI@Z ENDP            ; BCrease<unsigned int>
  886. _TEXT    ENDS
  887. PUBLIC    ?Init@CEdgeOutline@@QAEJPAUID3DXBaseMesh@@PAK@Z    ; CEdgeOutline::Init
  888. EXTRN    ??2@YAPAXI@Z:NEAR                ; operator new
  889. EXTRN    _D3DXGetDeclVertexSize@8:NEAR
  890. ; Function compile flags: /Ogs
  891. ;    COMDAT ?Init@CEdgeOutline@@QAEJPAUID3DXBaseMesh@@PAK@Z
  892. _TEXT    SEGMENT
  893. _Caps$ = -380                        ; size = 304
  894. tv551 = -76                        ; size = 4
  895. tv973 = -72                        ; size = 4
  896. _pbDest$ = -68                        ; size = 4
  897. _iFace$ = -64                        ; size = 4
  898. _pbLineIndices$ = -60                    ; size = 4
  899. tv939 = -56                        ; size = 4
  900. tv903 = -52                        ; size = 4
  901. tv955 = -48                        ; size = 4
  902. tv1026 = -44                        ; size = 4
  903. _b16BitIndex$ = -40                    ; size = 4
  904. _cBytesPerIndex$ = -36                    ; size = 4
  905. _iFaceEnd$ = -32                    ; size = 4
  906. _hr$ = -28                        ; size = 4
  907. _rgaeAttributeTableMesh$ = -24                ; size = 4
  908. tv840 = -20                        ; size = 4
  909. _iAttr$ = -16                        ; size = 4
  910. _pbFaceIndices$ = -12                    ; size = 4
  911. tv917 = -8                        ; size = 4
  912. tv758 = -8                        ; size = 4
  913. _iPoint$ = -4                        ; size = 4
  914. _ptmMesh$ = 8                        ; size = 4
  915. _rgdwAdjacency$ = 12                    ; size = 4
  916. ?Init@CEdgeOutline@@QAEJPAUID3DXBaseMesh@@PAK@Z PROC NEAR ; CEdgeOutline::Init, COMDAT
  917. ; _this$ = ecx
  918.  
  919. ; 280  : }
  920.  
  921.   00000    8b ff         npad     2
  922.  
  923. ; 87   : {
  924.  
  925.   00002    55         push     ebp
  926.   00003    8b ec         mov     ebp, esp
  927.   00005    81 ec 7c 01 00
  928.     00         sub     esp, 380        ; 0000017cH
  929.   0000b    53         push     ebx
  930.   0000c    56         push     esi
  931.   0000d    57         push     edi
  932.  
  933. ; 88   :     HRESULT hr = S_OK;
  934. ; 89   :     BOOL b16BitIndex;
  935. ; 90   :     DWORD cBytesPerIndex;
  936. ; 91   :     DWORD iPoint;
  937. ; 92   :     DWORD iFace;
  938. ; 93   :     D3DXATTRIBUTERANGE *rgaeAttributeTableMesh = NULL;
  939. ; 94   :     PBYTE pbFaceIndices = NULL;
  940. ; 95   :     PBYTE pbLineIndices = NULL;
  941. ; 96   :     PBYTE pbSrc;
  942. ; 97   :     PBYTE pbDest;
  943. ; 98   :     DWORD iLineOffset;
  944. ; 99   :     DWORD iAttr;
  945. ; 100  :     DWORD dwNeighbor;
  946. ; 101  :     DWORD iFaceEnd;
  947. ; 102  :     BOOL bCrease;
  948. ; 103  :     DWORD cFacesCur;
  949. ; 104  :     D3DCAPS9 Caps;
  950. ; 105  : 
  951. ; 106  :     // is the mesh 16 bit?
  952. ; 107  :     b16BitIndex = !(ptmMesh->GetOptions() & D3DXMESH_32BIT);
  953.  
  954.   0000e    8b 7d 08     mov     edi, DWORD PTR _ptmMesh$[ebp]
  955.   00011    8b 07         mov     eax, DWORD PTR [edi]
  956.   00013    33 f6         xor     esi, esi
  957.   00015    57         push     edi
  958.   00016    8b d9         mov     ebx, ecx
  959.   00018    89 75 e8     mov     DWORD PTR _rgaeAttributeTableMesh$[ebp], esi
  960.   0001b    89 75 f4     mov     DWORD PTR _pbFaceIndices$[ebp], esi
  961.   0001e    89 75 c4     mov     DWORD PTR _pbLineIndices$[ebp], esi
  962.   00021    ff 50 24     call     DWORD PTR [eax+36]
  963.   00024    f7 d0         not     eax
  964.   00026    83 e0 01     and     eax, 1
  965.   00029    89 45 d8     mov     DWORD PTR _b16BitIndex$[ebp], eax
  966.  
  967. ; 108  :     cBytesPerIndex = (b16BitIndex ? 2:4);
  968.  
  969.   0002c    56         push     esi
  970.   0002d    58         pop     eax
  971.   0002e    0f 94 c0     sete     al
  972.  
  973. ; 109  : 
  974. ; 110  :     hr = CreateEmptyOutline();
  975.  
  976.   00031    8b cb         mov     ecx, ebx
  977.   00033    8d 44 00 02     lea     eax, DWORD PTR [eax+eax+2]
  978.   00037    89 45 dc     mov     DWORD PTR _cBytesPerIndex$[ebp], eax
  979.   0003a    e8 00 00 00 00     call     ?CreateEmptyOutline@CEdgeOutline@@AAEJXZ ; CEdgeOutline::CreateEmptyOutline
  980.  
  981. ; 111  :     if (FAILED(hr))
  982.  
  983.   0003f    3b c6         cmp     eax, esi
  984.   00041    89 45 e4     mov     DWORD PTR _hr$[ebp], eax
  985.   00044    0f 8c c1 03 00
  986.     00         jl     $e_Exit$56293
  987.  
  988. ; 112  :         goto e_Exit;
  989. ; 113  : 
  990. ; 114  :     ptmMesh->GetDeclaration(m_pDecl);
  991.  
  992.   0004a    8b 07         mov     eax, DWORD PTR [edi]
  993.   0004c    8d 73 0c     lea     esi, DWORD PTR [ebx+12]
  994.   0004f    56         push     esi
  995.   00050    57         push     edi
  996.   00051    ff 50 1c     call     DWORD PTR [eax+28]
  997.  
  998. ; 115  :     m_cBytesPerVertex = D3DXGetDeclVertexSize(m_pDecl, 0);
  999.  
  1000.   00054    6a 00         push     0
  1001.   00056    56         push     esi
  1002.   00057    e8 00 00 00 00     call     _D3DXGetDeclVertexSize@8
  1003.  
  1004. ; 116  : 
  1005. ; 117  :     ptmMesh->GetDevice(&m_pDevice);
  1006.  
  1007.   0005c    53         push     ebx
  1008.   0005d    89 83 14 02 00
  1009.     00         mov     DWORD PTR [ebx+532], eax
  1010.   00063    8b 07         mov     eax, DWORD PTR [edi]
  1011.   00065    57         push     edi
  1012.   00066    ff 50 28     call     DWORD PTR [eax+40]
  1013.  
  1014. ; 118  : 
  1015. ; 119  :     hr = m_pDevice->CreateVertexDeclaration(m_pDecl, &m_pDeclObj);
  1016.  
  1017.   00069    8b 03         mov     eax, DWORD PTR [ebx]
  1018.   0006b    8b 08         mov     ecx, DWORD PTR [eax]
  1019.   0006d    8d 53 08     lea     edx, DWORD PTR [ebx+8]
  1020.   00070    52         push     edx
  1021.   00071    56         push     esi
  1022.   00072    50         push     eax
  1023.   00073    ff 91 58 01 00
  1024.     00         call     DWORD PTR [ecx+344]
  1025.  
  1026. ; 120  :     if (FAILED(hr))
  1027.  
  1028.   00079    85 c0         test     eax, eax
  1029.   0007b    89 45 e4     mov     DWORD PTR _hr$[ebp], eax
  1030.   0007e    0f 8c 87 03 00
  1031.     00         jl     $e_Exit$56293
  1032.  
  1033. ; 121  :         goto e_Exit;
  1034. ; 122  : 
  1035. ; 123  :     hr = ptmMesh->GetAttributeTable(NULL, &m_caeAttributeTable);
  1036.  
  1037.   00084    8b 07         mov     eax, DWORD PTR [edi]
  1038.   00086    8d b3 1c 02 00
  1039.     00         lea     esi, DWORD PTR [ebx+540]
  1040.   0008c    56         push     esi
  1041.   0008d    6a 00         push     0
  1042.   0008f    57         push     edi
  1043.   00090    ff 50 4c     call     DWORD PTR [eax+76]
  1044.  
  1045. ; 124  :     if (FAILED(hr))
  1046.  
  1047.   00093    85 c0         test     eax, eax
  1048.   00095    89 45 e4     mov     DWORD PTR _hr$[ebp], eax
  1049.   00098    0f 8c 6d 03 00
  1050.     00         jl     $e_Exit$56293
  1051.  
  1052. ; 125  :         goto e_Exit;
  1053. ; 126  : 
  1054. ; 127  :     // check for no attribute table and/or no adjacency
  1055. ; 128  :     if ((m_caeAttributeTable == 0) || (rgdwAdjacency == NULL))
  1056.  
  1057.   0009e    8b 06         mov     eax, DWORD PTR [esi]
  1058.   000a0    85 c0         test     eax, eax
  1059.   000a2    0f 84 63 03 00
  1060.     00         je     $e_Exit$56293
  1061.   000a8    83 7d 0c 00     cmp     DWORD PTR _rgdwAdjacency$[ebp], 0
  1062.   000ac    0f 84 59 03 00
  1063.     00         je     $e_Exit$56293
  1064.  
  1065. ; 129  :     {
  1066. ; 130  :         // not attribute sorted!  just return for now
  1067. ; 131  :         goto e_Exit;
  1068. ; 132  :     }
  1069. ; 133  : 
  1070. ; 134  :     rgaeAttributeTableMesh = new D3DXATTRIBUTERANGE[m_caeAttributeTable];
  1071.  
  1072.   000b2    8d 04 80     lea     eax, DWORD PTR [eax+eax*4]
  1073.   000b5    c1 e0 02     shl     eax, 2
  1074.   000b8    50         push     eax
  1075.   000b9    e8 00 00 00 00     call     ??2@YAPAXI@Z        ; operator new
  1076.   000be    89 45 e8     mov     DWORD PTR _rgaeAttributeTableMesh$[ebp], eax
  1077.  
  1078. ; 135  :     m_rgaeAttributeTable = new D3DXATTRIBUTERANGE[m_caeAttributeTable];
  1079.  
  1080.   000c1    8b 06         mov     eax, DWORD PTR [esi]
  1081.   000c3    8d 04 80     lea     eax, DWORD PTR [eax+eax*4]
  1082.   000c6    c1 e0 02     shl     eax, 2
  1083.   000c9    50         push     eax
  1084.   000ca    e8 00 00 00 00     call     ??2@YAPAXI@Z        ; operator new
  1085.  
  1086. ; 136  :     if ((rgaeAttributeTableMesh == NULL) || (rgaeAttributeTableMesh == NULL))
  1087.  
  1088.   000cf    83 7d e8 00     cmp     DWORD PTR _rgaeAttributeTableMesh$[ebp], 0
  1089.   000d3    59         pop     ecx
  1090.   000d4    59         pop     ecx
  1091.   000d5    89 83 18 02 00
  1092.     00         mov     DWORD PTR [ebx+536], eax
  1093.   000db    0f 84 58 03 00
  1094.     00         je     $L56309
  1095.  
  1096. ; 139  :         goto e_Exit;
  1097. ; 140  :     }
  1098. ; 141  : 
  1099. ; 142  :     hr = ptmMesh->GetAttributeTable(rgaeAttributeTableMesh, NULL);
  1100.  
  1101.   000e1    8b 07         mov     eax, DWORD PTR [edi]
  1102.   000e3    6a 00         push     0
  1103.   000e5    ff 75 e8     push     DWORD PTR _rgaeAttributeTableMesh$[ebp]
  1104.   000e8    57         push     edi
  1105.   000e9    ff 50 4c     call     DWORD PTR [eax+76]
  1106.  
  1107. ; 143  :     if (FAILED(hr))
  1108.  
  1109.   000ec    33 d2         xor     edx, edx
  1110.   000ee    3b c2         cmp     eax, edx
  1111.   000f0    89 45 e4     mov     DWORD PTR _hr$[ebp], eax
  1112.   000f3    0f 8c 12 03 00
  1113.     00         jl     $e_Exit$56293
  1114.  
  1115. ; 144  :         goto e_Exit;
  1116. ; 145  : 
  1117. ; 146  :     // now initialize the edge attribute table
  1118. ; 147  :     for (iAttr = 0; iAttr < m_caeAttributeTable; iAttr++)
  1119.  
  1120.   000f9    39 16         cmp     DWORD PTR [esi], edx
  1121.   000fb    76 3a         jbe     SHORT $L56317
  1122.   000fd    33 c0         xor     eax, eax
  1123. $L56315:
  1124.  
  1125. ; 148  :     {
  1126. ; 149  :         m_rgaeAttributeTable[iAttr] = rgaeAttributeTableMesh[iAttr];
  1127.  
  1128.   000ff    8b bb 18 02 00
  1129.     00         mov     edi, DWORD PTR [ebx+536]
  1130.   00105    8b 4d e8     mov     ecx, DWORD PTR _rgaeAttributeTableMesh$[ebp]
  1131.   00108    8d 34 08     lea     esi, DWORD PTR [eax+ecx]
  1132.   0010b    03 f8         add     edi, eax
  1133.   0010d    6a 05         push     5
  1134.   0010f    59         pop     ecx
  1135.   00110    f3 a5         rep movsd
  1136.  
  1137. ; 150  :         m_rgaeAttributeTable[iAttr].FaceStart = 0;
  1138.  
  1139.   00112    8b 8b 18 02 00
  1140.     00         mov     ecx, DWORD PTR [ebx+536]
  1141.   00118    83 64 01 04 00     and     DWORD PTR [ecx+eax+4], 0
  1142.  
  1143. ; 151  :         m_rgaeAttributeTable[iAttr].FaceCount = 0;
  1144.  
  1145.   0011d    8b 8b 18 02 00
  1146.     00         mov     ecx, DWORD PTR [ebx+536]
  1147.   00123    83 64 01 08 00     and     DWORD PTR [ecx+eax+8], 0
  1148.   00128    42         inc     edx
  1149.   00129    83 c0 14     add     eax, 20            ; 00000014H
  1150.   0012c    3b 93 1c 02 00
  1151.     00         cmp     edx, DWORD PTR [ebx+540]
  1152.   00132    72 cb         jb     SHORT $L56315
  1153.  
  1154. ; 144  :         goto e_Exit;
  1155. ; 145  : 
  1156. ; 146  :     // now initialize the edge attribute table
  1157. ; 147  :     for (iAttr = 0; iAttr < m_caeAttributeTable; iAttr++)
  1158.  
  1159.   00134    8b 7d 08     mov     edi, DWORD PTR _ptmMesh$[ebp]
  1160. $L56317:
  1161.  
  1162. ; 152  :     }
  1163. ; 153  : 
  1164. ; 154  :     ptmMesh->LockIndexBuffer(D3DLOCK_READONLY, (LPVOID*)&pbFaceIndices);
  1165.  
  1166.   00137    8b 07         mov     eax, DWORD PTR [edi]
  1167.   00139    8d 4d f4     lea     ecx, DWORD PTR _pbFaceIndices$[ebp]
  1168.   0013c    51         push     ecx
  1169.   0013d    6a 10         push     16            ; 00000010H
  1170.   0013f    57         push     edi
  1171.   00140    ff 50 44     call     DWORD PTR [eax+68]
  1172.  
  1173. ; 155  : 
  1174. ; 156  :     for (iAttr = 0; iAttr < m_caeAttributeTable; iAttr++)
  1175.  
  1176.   00143    83 65 f0 00     and     DWORD PTR _iAttr$[ebp], 0
  1177.   00147    8d bb 1c 02 00
  1178.     00         lea     edi, DWORD PTR [ebx+540]
  1179.   0014d    83 3f 00     cmp     DWORD PTR [edi], 0
  1180.   00150    0f 86 98 00 00
  1181.     00         jbe     $L56321
  1182.   00156    8b 45 e8     mov     eax, DWORD PTR _rgaeAttributeTableMesh$[ebp]
  1183.   00159    c7 45 ec fc ff
  1184.     ff ff         mov     DWORD PTR tv840[ebp], -4 ; fffffffcH
  1185.   00160    29 45 ec     sub     DWORD PTR tv840[ebp], eax
  1186.   00163    8d 70 04     lea     esi, DWORD PTR [eax+4]
  1187. $L56319:
  1188.  
  1189. ; 157  :     {
  1190. ; 158  :         // first figure out the counts for the number of creases per attribute group
  1191. ; 159  :         iFaceEnd = rgaeAttributeTableMesh[iAttr].FaceStart + rgaeAttributeTableMesh[iAttr].FaceCount;
  1192.  
  1193.   00166    8b 3e         mov     edi, DWORD PTR [esi]
  1194.   00168    8b 4e 04     mov     ecx, DWORD PTR [esi+4]
  1195.   0016b    03 cf         add     ecx, edi
  1196.  
  1197. ; 160  :         for (iFace = rgaeAttributeTableMesh[iAttr].FaceStart; iFace < iFaceEnd; iFace++)
  1198.  
  1199.   0016d    3b f9         cmp     edi, ecx
  1200.   0016f    89 4d e0     mov     DWORD PTR _iFaceEnd$[ebp], ecx
  1201.   00172    73 63         jae     SHORT $L56320
  1202.   00174    8b 55 0c     mov     edx, DWORD PTR _rgdwAdjacency$[ebp]
  1203.   00177    8d 04 7f     lea     eax, DWORD PTR [edi+edi*2]
  1204.   0017a    8d 04 82     lea     eax, DWORD PTR [edx+eax*4]
  1205. $L56322:
  1206.  
  1207. ; 161  :         {
  1208. ; 162  :             for (iPoint = 0; iPoint < 3; iPoint++)
  1209.  
  1210.   0017d    83 65 fc 00     and     DWORD PTR _iPoint$[ebp], 0
  1211.   00181    89 45 f8     mov     DWORD PTR tv758[ebp], eax
  1212. $L56325:
  1213.  
  1214. ; 163  :             {
  1215. ; 164  :                 dwNeighbor = rgdwAdjacency[iFace * 3 + iPoint];
  1216. ; 165  : 
  1217. ; 166  :                 // if the neigbor is less than the current face, we have already looked at this edge
  1218. ; 167  :                 //    if unused, just skip... not a crease
  1219. ; 168  :                 if (dwNeighbor < iFace)
  1220.  
  1221.   00184    8b 45 f8     mov     eax, DWORD PTR tv758[ebp]
  1222.   00187    39 38         cmp     DWORD PTR [eax], edi
  1223.   00189    72 37         jb     SHORT $L56326
  1224.  
  1225. ; 169  :                     continue;
  1226. ; 170  : 
  1227. ; 171  :                 if (b16BitIndex)
  1228.  
  1229.   0018b    83 7d d8 00     cmp     DWORD PTR _b16BitIndex$[ebp], 0
  1230.  
  1231. ; 172  :                 {
  1232. ; 173  :                     bCrease = BCrease<UINT16>(iFace, iPoint, rgdwAdjacency, (UINT16*)pbFaceIndices);
  1233.  
  1234.   0018f    ff 75 f4     push     DWORD PTR _pbFaceIndices$[ebp]
  1235.   00192    ff 75 0c     push     DWORD PTR _rgdwAdjacency$[ebp]
  1236.   00195    ff 75 fc     push     DWORD PTR _iPoint$[ebp]
  1237.   00198    57         push     edi
  1238.   00199    74 07         je     SHORT $L56329
  1239.   0019b    e8 00 00 00 00     call     ??$BCrease@G@@YAHKKPAKPAG@Z ; BCrease<unsigned short>
  1240.  
  1241. ; 174  :                 }
  1242. ; 175  :                 else
  1243.  
  1244.   001a0    eb 05         jmp     SHORT $L56542
  1245. $L56329:
  1246.  
  1247. ; 176  :                 {
  1248. ; 177  :                     bCrease = BCrease<UINT32>(iFace, iPoint, rgdwAdjacency, (UINT32*)pbFaceIndices);
  1249.  
  1250.   001a2    e8 00 00 00 00     call     ??$BCrease@I@@YAHKKPAKPAI@Z ; BCrease<unsigned int>
  1251. $L56542:
  1252.   001a7    83 c4 10     add     esp, 16            ; 00000010H
  1253.  
  1254. ; 178  :                 }
  1255. ; 179  : 
  1256. ; 180  :                 if (bCrease)
  1257.  
  1258.   001aa    85 c0         test     eax, eax
  1259.   001ac    74 11         je     SHORT $L56538
  1260.  
  1261. ; 181  :                 {
  1262. ; 182  :                     // add one to the count of creases for this attribute
  1263. ; 183  :                     m_rgaeAttributeTable[iAttr].FaceCount += 1;
  1264.  
  1265.   001ae    8b 45 ec     mov     eax, DWORD PTR tv840[ebp]
  1266.   001b1    8b 8b 18 02 00
  1267.     00         mov     ecx, DWORD PTR [ebx+536]
  1268.   001b7    03 c6         add     eax, esi
  1269.   001b9    8d 44 01 08     lea     eax, DWORD PTR [ecx+eax+8]
  1270.   001bd    ff 00         inc     DWORD PTR [eax]
  1271. $L56538:
  1272.   001bf    8b 4d e0     mov     ecx, DWORD PTR _iFaceEnd$[ebp]
  1273. $L56326:
  1274.  
  1275. ; 161  :         {
  1276. ; 162  :             for (iPoint = 0; iPoint < 3; iPoint++)
  1277.  
  1278.   001c2    ff 45 fc     inc     DWORD PTR _iPoint$[ebp]
  1279.   001c5    83 45 f8 04     add     DWORD PTR tv758[ebp], 4
  1280.   001c9    83 7d fc 03     cmp     DWORD PTR _iPoint$[ebp], 3
  1281.   001cd    72 b5         jb     SHORT $L56325
  1282.   001cf    8b 45 f8     mov     eax, DWORD PTR tv758[ebp]
  1283.   001d2    47         inc     edi
  1284.   001d3    3b f9         cmp     edi, ecx
  1285.   001d5    72 a6         jb     SHORT $L56322
  1286. $L56320:
  1287.  
  1288. ; 155  : 
  1289. ; 156  :     for (iAttr = 0; iAttr < m_caeAttributeTable; iAttr++)
  1290.  
  1291.   001d7    ff 45 f0     inc     DWORD PTR _iAttr$[ebp]
  1292.   001da    8b 45 f0     mov     eax, DWORD PTR _iAttr$[ebp]
  1293.   001dd    8d bb 1c 02 00
  1294.     00         lea     edi, DWORD PTR [ebx+540]
  1295.   001e3    83 c6 14     add     esi, 20            ; 00000014H
  1296.   001e6    3b 07         cmp     eax, DWORD PTR [edi]
  1297.   001e8    0f 82 78 ff ff
  1298.     ff         jb     $L56319
  1299. $L56321:
  1300.  
  1301. ; 184  :                 }
  1302. ; 185  :             }
  1303. ; 186  :         }
  1304. ; 187  :     }
  1305. ; 188  : 
  1306. ; 189  :     // now setup the table to have the correct offsets into the index buffer
  1307. ; 190  :     //   now that we have calculated the FaceCount field (calc the FaceStarts...)
  1308. ; 191  :     cFacesCur = 0;
  1309. ; 192  :     for (iAttr = 0; iAttr < m_caeAttributeTable; iAttr++)
  1310.  
  1311.   001ee    33 c9         xor     ecx, ecx
  1312.   001f0    33 f6         xor     esi, esi
  1313.   001f2    33 d2         xor     edx, edx
  1314.   001f4    39 0f         cmp     DWORD PTR [edi], ecx
  1315.   001f6    0f 86 0c 02 00
  1316.     00         jbe     $L56534
  1317. $L56348:
  1318.  
  1319. ; 193  :     {
  1320. ; 194  :         m_rgaeAttributeTable[iAttr].FaceStart = cFacesCur;
  1321.  
  1322.   001fc    8b 83 18 02 00
  1323.     00         mov     eax, DWORD PTR [ebx+536]
  1324.   00202    89 74 01 04     mov     DWORD PTR [ecx+eax+4], esi
  1325.  
  1326. ; 195  :         cFacesCur += m_rgaeAttributeTable[iAttr].FaceCount;
  1327.  
  1328.   00206    8b 83 18 02 00
  1329.     00         mov     eax, DWORD PTR [ebx+536]
  1330.   0020c    8d 44 01 08     lea     eax, DWORD PTR [ecx+eax+8]
  1331.   00210    03 30         add     esi, DWORD PTR [eax]
  1332.  
  1333. ; 196  : 
  1334. ; 197  :         // reset the face count, to be used in the second pass as current position in buffer
  1335. ; 198  :         //   will become the count by the end of the pass
  1336. ; 199  :         m_rgaeAttributeTable[iAttr].FaceCount = 0;
  1337.  
  1338.   00212    83 20 00     and     DWORD PTR [eax], 0
  1339.   00215    42         inc     edx
  1340.   00216    83 c1 14     add     ecx, 20            ; 00000014H
  1341.   00219    3b 17         cmp     edx, DWORD PTR [edi]
  1342.   0021b    72 df         jb     SHORT $L56348
  1343.  
  1344. ; 200  :     }
  1345. ; 201  : 
  1346. ; 202  :     // just exit if there are no creases
  1347. ; 203  :     if (cFacesCur == 0)
  1348.  
  1349.   0021d    85 f6         test     esi, esi
  1350.   0021f    0f 84 e3 01 00
  1351.     00         je     $L56534
  1352.  
  1353. ; 204  :         goto e_Exit;
  1354. ; 205  : 
  1355. ; 206  :     m_pDevice->GetDeviceCaps(&Caps);
  1356.  
  1357.   00225    8b 03         mov     eax, DWORD PTR [ebx]
  1358.   00227    8b 08         mov     ecx, DWORD PTR [eax]
  1359.   00229    8d 95 84 fe ff
  1360.     ff         lea     edx, DWORD PTR _Caps$[ebp]
  1361.   0022f    52         push     edx
  1362.   00230    50         push     eax
  1363.   00231    ff 51 1c     call     DWORD PTR [ecx+28]
  1364.  
  1365. ; 207  : 
  1366. ; 208  :     // if there are too many vertices, or the max vertex index is below 16bit (means no 32 bit support)
  1367. ; 209  :     //    then we need to emulate
  1368. ; 210  :     if (!b16BitIndex && ((Caps.MaxVertexIndex < ptmMesh->GetNumVertices()) || (Caps.MaxVertexIndex <= 0xffff) || (Caps.MaxPrimitiveCount < cFacesCur)))
  1369.  
  1370.   00234    83 7d d8 00     cmp     DWORD PTR _b16BitIndex$[ebp], 0
  1371.   00238    75 31         jne     SHORT $L56535
  1372.   0023a    8b 45 08     mov     eax, DWORD PTR _ptmMesh$[ebp]
  1373.   0023d    8b 08         mov     ecx, DWORD PTR [eax]
  1374.   0023f    50         push     eax
  1375.   00240    ff 51 14     call     DWORD PTR [ecx+20]
  1376.   00243    39 85 3c ff ff
  1377.     ff         cmp     DWORD PTR _Caps$[ebp+184], eax
  1378.   00249    72 14         jb     SHORT $L56354
  1379.   0024b    81 bd 3c ff ff
  1380.     ff ff ff 00 00     cmp     DWORD PTR _Caps$[ebp+184], 65535 ; 0000ffffH
  1381.   00255    76 08         jbe     SHORT $L56354
  1382.   00257    39 b5 38 ff ff
  1383.     ff         cmp     DWORD PTR _Caps$[ebp+180], esi
  1384.   0025d    73 0c         jae     SHORT $L56535
  1385. $L56354:
  1386.  
  1387. ; 211  :     {
  1388. ; 212  :         m_bEmulate32BitIndex = TRUE;
  1389.  
  1390.   0025f    c7 83 20 02 00
  1391.     00 01 00 00 00     mov     DWORD PTR [ebx+544], 1
  1392.  
  1393. ; 213  :     }
  1394. ; 214  :     else
  1395.  
  1396.   00269    eb 07         jmp     SHORT $L56355
  1397. $L56535:
  1398.  
  1399. ; 215  :     {
  1400. ; 216  :         m_bEmulate32BitIndex = FALSE;
  1401.  
  1402.   0026b    83 a3 20 02 00
  1403.     00 00         and     DWORD PTR [ebx+544], 0
  1404. $L56355:
  1405.  
  1406. ; 217  :     }
  1407. ; 218  : 
  1408. ; 219  :     hr = m_pDevice->CreateIndexBuffer(cFacesCur * 2 * cBytesPerIndex, D3DUSAGE_SOFTWAREPROCESSING, 
  1409. ; 220  :                                         (b16BitIndex ? D3DFMT_INDEX16:D3DFMT_INDEX32),
  1410. ; 221  :                                         D3DPOOL_MANAGED, &m_pIndexBuffer, NULL);
  1411.  
  1412.   00272    8b 03         mov     eax, DWORD PTR [ebx]
  1413.   00274    8b 10         mov     edx, DWORD PTR [eax]
  1414.   00276    6a 00         push     0
  1415.   00278    8d 4b 04     lea     ecx, DWORD PTR [ebx+4]
  1416.   0027b    51         push     ecx
  1417.   0027c    8b 4d d8     mov     ecx, DWORD PTR _b16BitIndex$[ebp]
  1418.   0027f    f7 d9         neg     ecx
  1419.   00281    1b c9         sbb     ecx, ecx
  1420.   00283    0f af 75 dc     imul     esi, DWORD PTR _cBytesPerIndex$[ebp]
  1421.   00287    6a 01         push     1
  1422.   00289    83 c1 66     add     ecx, 102        ; 00000066H
  1423.   0028c    51         push     ecx
  1424.   0028d    6a 10         push     16            ; 00000010H
  1425.   0028f    d1 e6         shl     esi, 1
  1426.   00291    56         push     esi
  1427.   00292    50         push     eax
  1428.   00293    ff 52 6c     call     DWORD PTR [edx+108]
  1429.  
  1430. ; 222  :     if (FAILED(hr))
  1431.  
  1432.   00296    85 c0         test     eax, eax
  1433.   00298    89 45 e4     mov     DWORD PTR _hr$[ebp], eax
  1434.   0029b    0f 8c 67 01 00
  1435.     00         jl     $L56534
  1436.  
  1437. ; 223  :         goto e_Exit;
  1438. ; 224  : 
  1439. ; 225  :     m_pIndexBuffer->Lock(0, 0, (PVOID*)&pbLineIndices, D3DLOCK_NOSYSLOCK);
  1440.  
  1441.   002a1    8b 43 04     mov     eax, DWORD PTR [ebx+4]
  1442.   002a4    8b 08         mov     ecx, DWORD PTR [eax]
  1443.   002a6    68 00 08 00 00     push     2048            ; 00000800H
  1444.   002ab    8d 55 c4     lea     edx, DWORD PTR _pbLineIndices$[ebp]
  1445.   002ae    52         push     edx
  1446.   002af    33 f6         xor     esi, esi
  1447.   002b1    56         push     esi
  1448.   002b2    56         push     esi
  1449.   002b3    50         push     eax
  1450.   002b4    ff 51 2c     call     DWORD PTR [ecx+44]
  1451.  
  1452. ; 226  : 
  1453. ; 227  : 
  1454. ; 228  :     // next go through and fill the index buffer
  1455. ; 229  :     for (iAttr = 0; iAttr < m_caeAttributeTable; iAttr++)
  1456.  
  1457.   002b7    39 37         cmp     DWORD PTR [edi], esi
  1458.   002b9    89 75 f0     mov     DWORD PTR _iAttr$[ebp], esi
  1459.   002bc    0f 86 46 01 00
  1460.     00         jbe     $L56534
  1461.   002c2    8b 45 e8     mov     eax, DWORD PTR _rgaeAttributeTableMesh$[ebp]
  1462.   002c5    8d 48 04     lea     ecx, DWORD PTR [eax+4]
  1463.   002c8    c7 45 ec fc ff
  1464.     ff ff         mov     DWORD PTR tv840[ebp], -4 ; fffffffcH
  1465.   002cf    29 45 ec     sub     DWORD PTR tv840[ebp], eax
  1466.   002d2    89 4d d4     mov     DWORD PTR tv1026[ebp], ecx
  1467. $L56541:
  1468.  
  1469. ; 230  :     {
  1470. ; 231  :         // first figure out the counts for the number of creases per attribute group
  1471. ; 232  :         iFaceEnd = rgaeAttributeTableMesh[iAttr].FaceStart + rgaeAttributeTableMesh[iAttr].FaceCount;
  1472.  
  1473.   002d5    8b 31         mov     esi, DWORD PTR [ecx]
  1474.   002d7    8b 41 04     mov     eax, DWORD PTR [ecx+4]
  1475.   002da    03 c6         add     eax, esi
  1476.  
  1477. ; 233  :         for (iFace = rgaeAttributeTableMesh[iAttr].FaceStart; iFace < iFaceEnd; iFace++)
  1478.  
  1479.   002dc    3b f0         cmp     esi, eax
  1480.   002de    89 45 e0     mov     DWORD PTR _iFaceEnd$[ebp], eax
  1481.   002e1    89 75 c0     mov     DWORD PTR _iFace$[ebp], esi
  1482.   002e4    0f 83 06 01 00
  1483.     00         jae     $L56361
  1484.   002ea    8b 45 ec     mov     eax, DWORD PTR tv840[ebp]
  1485.   002ed    8b 7d dc     mov     edi, DWORD PTR _cBytesPerIndex$[ebp]
  1486.   002f0    03 c1         add     eax, ecx
  1487.   002f2    8b 55 0c     mov     edx, DWORD PTR _rgdwAdjacency$[ebp]
  1488.   002f5    89 45 b4     mov     DWORD PTR tv551[ebp], eax
  1489.   002f8    8d 04 76     lea     eax, DWORD PTR [esi+esi*2]
  1490.   002fb    89 45 c8     mov     DWORD PTR tv939[ebp], eax
  1491.   002fe    8b c6         mov     eax, esi
  1492.   00300    0f af c7     imul     eax, edi
  1493.   00303    8d 04 40     lea     eax, DWORD PTR [eax+eax*2]
  1494.   00306    89 45 d0     mov     DWORD PTR tv955[ebp], eax
  1495.   00309    8d 04 7f     lea     eax, DWORD PTR [edi+edi*2]
  1496.   0030c    89 45 b8     mov     DWORD PTR tv973[ebp], eax
  1497.   0030f    8d 04 76     lea     eax, DWORD PTR [esi+esi*2]
  1498.   00312    8d 04 82     lea     eax, DWORD PTR [edx+eax*4]
  1499. $L56540:
  1500.  
  1501. ; 234  :         {
  1502. ; 235  :             for (iPoint = 0; iPoint < 3; iPoint++)
  1503.  
  1504.   00315    8b 55 d0     mov     edx, DWORD PTR tv955[ebp]
  1505.   00318    83 65 fc 00     and     DWORD PTR _iPoint$[ebp], 0
  1506.   0031c    89 55 cc     mov     DWORD PTR tv903[ebp], edx
  1507.   0031f    89 45 f8     mov     DWORD PTR tv917[ebp], eax
  1508. $L56366:
  1509.  
  1510. ; 236  :             {
  1511. ; 237  :                 dwNeighbor = rgdwAdjacency[iFace * 3 + iPoint];
  1512. ; 238  : 
  1513. ; 239  :                 // if the neigbor is less than the current face, we have already looked at this edge
  1514. ; 240  :                 //    if unused, just skip... not a crease
  1515. ; 241  :                 if (dwNeighbor < iFace)
  1516.  
  1517.   00322    8b 45 f8     mov     eax, DWORD PTR tv917[ebp]
  1518.   00325    39 30         cmp     DWORD PTR [eax], esi
  1519.   00327    0f 82 95 00 00
  1520.     00         jb     $L56367
  1521.  
  1522. ; 242  :                     continue;
  1523. ; 243  : 
  1524. ; 244  :                 if (b16BitIndex)
  1525.  
  1526.   0032d    83 7d d8 00     cmp     DWORD PTR _b16BitIndex$[ebp], 0
  1527.  
  1528. ; 245  :                 {
  1529. ; 246  :                     bCrease = BCrease<UINT16>(iFace, iPoint, rgdwAdjacency, (UINT16*)pbFaceIndices);
  1530.  
  1531.   00331    ff 75 f4     push     DWORD PTR _pbFaceIndices$[ebp]
  1532.   00334    ff 75 0c     push     DWORD PTR _rgdwAdjacency$[ebp]
  1533.   00337    ff 75 fc     push     DWORD PTR _iPoint$[ebp]
  1534.   0033a    56         push     esi
  1535.   0033b    74 07         je     SHORT $L56370
  1536.   0033d    e8 00 00 00 00     call     ??$BCrease@G@@YAHKKPAKPAG@Z ; BCrease<unsigned short>
  1537.  
  1538. ; 247  :                 }
  1539. ; 248  :                 else
  1540.  
  1541.   00342    eb 05         jmp     SHORT $L56543
  1542. $L56370:
  1543.  
  1544. ; 249  :                 {
  1545. ; 250  :                     bCrease = BCrease<UINT32>(iFace, iPoint, rgdwAdjacency, (UINT32*)pbFaceIndices);
  1546.  
  1547.   00344    e8 00 00 00 00     call     ??$BCrease@I@@YAHKKPAKPAI@Z ; BCrease<unsigned int>
  1548. $L56543:
  1549.   00349    83 c4 10     add     esp, 16            ; 00000010H
  1550.  
  1551. ; 251  :                 }
  1552. ; 252  : 
  1553. ; 253  :                 if (bCrease)
  1554.  
  1555.   0034c    85 c0         test     eax, eax
  1556.   0034e    74 6f         je     SHORT $L56536
  1557.  
  1558. ; 254  :                 {
  1559. ; 255  :                     iLineOffset = m_rgaeAttributeTable[iAttr].FaceStart + m_rgaeAttributeTable[iAttr].FaceCount;
  1560.  
  1561.   00350    8b 83 18 02 00
  1562.     00         mov     eax, DWORD PTR [ebx+536]
  1563.   00356    8b 4d b4     mov     ecx, DWORD PTR tv551[ebp]
  1564.   00359    03 c8         add     ecx, eax
  1565.   0035b    8b 51 08     mov     edx, DWORD PTR [ecx+8]
  1566.   0035e    8b 41 04     mov     eax, DWORD PTR [ecx+4]
  1567.  
  1568. ; 256  :                     m_rgaeAttributeTable[iAttr].FaceCount += 1;
  1569. ; 257  : 
  1570. ; 258  :                     pbSrc  = pbFaceIndices + ((iFace * 3 + iPoint) * cBytesPerIndex);
  1571.  
  1572.   00361    8b 75 cc     mov     esi, DWORD PTR tv903[ebp]
  1573.   00364    03 c2         add     eax, edx
  1574.  
  1575. ; 259  :                     pbDest = pbLineIndices + iLineOffset * 2 * cBytesPerIndex;
  1576.  
  1577.   00366    0f af c7     imul     eax, edi
  1578.   00369    42         inc     edx
  1579.   0036a    89 51 08     mov     DWORD PTR [ecx+8], edx
  1580.   0036d    8b 4d c4     mov     ecx, DWORD PTR _pbLineIndices$[ebp]
  1581.   00370    8b 55 f4     mov     edx, DWORD PTR _pbFaceIndices$[ebp]
  1582.   00373    8d 04 41     lea     eax, DWORD PTR [ecx+eax*2]
  1583.   00376    03 f2         add     esi, edx
  1584.  
  1585. ; 260  :                     memcpy(pbDest, pbSrc, cBytesPerIndex);
  1586.  
  1587.   00378    8b cf         mov     ecx, edi
  1588.   0037a    8b f8         mov     edi, eax
  1589.   0037c    89 45 bc     mov     DWORD PTR _pbDest$[ebp], eax
  1590.   0037f    8b c1         mov     eax, ecx
  1591.   00381    c1 e9 02     shr     ecx, 2
  1592.   00384    f3 a5         rep movsd
  1593.   00386    8b c8         mov     ecx, eax
  1594.  
  1595. ; 261  :                 
  1596. ; 262  :                     pbSrc  = pbFaceIndices + ((iFace * 3 + ((iPoint+1)%3)) * cBytesPerIndex);
  1597.  
  1598.   00388    8b 45 fc     mov     eax, DWORD PTR _iPoint$[ebp]
  1599.   0038b    83 e1 03     and     ecx, 3
  1600.   0038e    f3 a4         rep movsb
  1601.   00390    40         inc     eax
  1602.   00391    6a 03         push     3
  1603.   00393    33 d2         xor     edx, edx
  1604.   00395    5e         pop     esi
  1605.   00396    f7 f6         div     esi
  1606.  
  1607. ; 263  :                     pbDest += cBytesPerIndex;
  1608. ; 264  :                     memcpy(pbDest, pbSrc, cBytesPerIndex);                
  1609.  
  1610.   00398    8b 4d dc     mov     ecx, DWORD PTR _cBytesPerIndex$[ebp]
  1611.   0039b    8b 45 bc     mov     eax, DWORD PTR _pbDest$[ebp]
  1612.   0039e    8d 3c 08     lea     edi, DWORD PTR [eax+ecx]
  1613.   003a1    8b f2         mov     esi, edx
  1614.   003a3    03 75 c8     add     esi, DWORD PTR tv939[ebp]
  1615.   003a6    0f af f1     imul     esi, ecx
  1616.   003a9    03 75 f4     add     esi, DWORD PTR _pbFaceIndices$[ebp]
  1617.   003ac    8b c1         mov     eax, ecx
  1618.   003ae    c1 e9 02     shr     ecx, 2
  1619.   003b1    f3 a5         rep movsd
  1620.   003b3    8b c8         mov     ecx, eax
  1621.   003b5    83 e1 03     and     ecx, 3
  1622.   003b8    f3 a4         rep movsb
  1623.   003ba    8b 75 c0     mov     esi, DWORD PTR _iFace$[ebp]
  1624.   003bd    8b f8         mov     edi, eax
  1625. $L56536:
  1626.   003bf    8b 4d d4     mov     ecx, DWORD PTR tv1026[ebp]
  1627. $L56367:
  1628.  
  1629. ; 234  :         {
  1630. ; 235  :             for (iPoint = 0; iPoint < 3; iPoint++)
  1631.  
  1632.   003c2    ff 45 fc     inc     DWORD PTR _iPoint$[ebp]
  1633.   003c5    83 45 f8 04     add     DWORD PTR tv917[ebp], 4
  1634.   003c9    01 7d cc     add     DWORD PTR tv903[ebp], edi
  1635.   003cc    83 7d fc 03     cmp     DWORD PTR _iPoint$[ebp], 3
  1636.   003d0    0f 82 4c ff ff
  1637.     ff         jb     $L56366
  1638.   003d6    8b 45 b8     mov     eax, DWORD PTR tv973[ebp]
  1639.   003d9    01 45 d0     add     DWORD PTR tv955[ebp], eax
  1640.   003dc    83 45 c8 03     add     DWORD PTR tv939[ebp], 3
  1641.   003e0    8b 45 f8     mov     eax, DWORD PTR tv917[ebp]
  1642.   003e3    46         inc     esi
  1643.   003e4    3b 75 e0     cmp     esi, DWORD PTR _iFaceEnd$[ebp]
  1644.   003e7    89 75 c0     mov     DWORD PTR _iFace$[ebp], esi
  1645.   003ea    0f 82 25 ff ff
  1646.     ff         jb     $L56540
  1647. $L56361:
  1648.  
  1649. ; 226  : 
  1650. ; 227  : 
  1651. ; 228  :     // next go through and fill the index buffer
  1652. ; 229  :     for (iAttr = 0; iAttr < m_caeAttributeTable; iAttr++)
  1653.  
  1654.   003f0    ff 45 f0     inc     DWORD PTR _iAttr$[ebp]
  1655.   003f3    8b 45 f0     mov     eax, DWORD PTR _iAttr$[ebp]
  1656.   003f6    83 c1 14     add     ecx, 20            ; 00000014H
  1657.   003f9    3b 83 1c 02 00
  1658.     00         cmp     eax, DWORD PTR [ebx+540]
  1659.   003ff    89 4d d4     mov     DWORD PTR tv1026[ebp], ecx
  1660.   00402    0f 82 cd fe ff
  1661.     ff         jb     $L56541
  1662. $L56534:
  1663.  
  1664. ; 265  :                 }
  1665. ; 266  :             }
  1666. ; 267  :         }
  1667. ; 268  :     }
  1668.  
  1669.   00408    8b 7d 08     mov     edi, DWORD PTR _ptmMesh$[ebp]
  1670. $e_Exit$56293:
  1671.  
  1672. ; 269  : 
  1673. ; 270  : e_Exit:
  1674. ; 271  :     delete []rgaeAttributeTableMesh;
  1675.  
  1676.   0040b    ff 75 e8     push     DWORD PTR _rgaeAttributeTableMesh$[ebp]
  1677.   0040e    e8 00 00 00 00     call     ??3@YAXPAX@Z        ; operator delete
  1678.  
  1679. ; 272  : 
  1680. ; 273  :     if (pbFaceIndices != NULL)
  1681.  
  1682.   00413    83 7d f4 00     cmp     DWORD PTR _pbFaceIndices$[ebp], 0
  1683.   00417    59         pop     ecx
  1684.   00418    74 06         je     SHORT $L56376
  1685.  
  1686. ; 274  :         ptmMesh->UnlockIndexBuffer();
  1687.  
  1688.   0041a    8b 07         mov     eax, DWORD PTR [edi]
  1689.   0041c    57         push     edi
  1690.   0041d    ff 50 48     call     DWORD PTR [eax+72]
  1691. $L56376:
  1692.  
  1693. ; 275  : 
  1694. ; 276  :     if (pbLineIndices != NULL)
  1695.  
  1696.   00420    83 7d c4 00     cmp     DWORD PTR _pbLineIndices$[ebp], 0
  1697.   00424    74 09         je     SHORT $L56377
  1698.  
  1699. ; 277  :         m_pIndexBuffer->Unlock();
  1700.  
  1701.   00426    8b 5b 04     mov     ebx, DWORD PTR [ebx+4]
  1702.   00429    8b 03         mov     eax, DWORD PTR [ebx]
  1703.   0042b    53         push     ebx
  1704.   0042c    ff 50 30     call     DWORD PTR [eax+48]
  1705. $L56377:
  1706.  
  1707. ; 278  : 
  1708. ; 279  :     return hr;
  1709.  
  1710.   0042f    8b 45 e4     mov     eax, DWORD PTR _hr$[ebp]
  1711.   00432    5f         pop     edi
  1712.   00433    5e         pop     esi
  1713.   00434    5b         pop     ebx
  1714.  
  1715. ; 280  : }
  1716.  
  1717.   00435    c9         leave
  1718.   00436    c2 08 00     ret     8
  1719. $L56309:
  1720.  
  1721. ; 137  :     {
  1722. ; 138  :         hr = E_OUTOFMEMORY;
  1723.  
  1724.   00439    c7 45 e4 0e 00
  1725.     07 80         mov     DWORD PTR _hr$[ebp], -2147024882 ; 8007000eH
  1726.   00440    eb c9         jmp     SHORT $e_Exit$56293
  1727. ?Init@CEdgeOutline@@QAEJPAUID3DXBaseMesh@@PAK@Z ENDP    ; CEdgeOutline::Init
  1728. _TEXT    ENDS
  1729. END
  1730.