Mercurial > mm7
comparison Render.cpp @ 2334:ddb803517a48
unused local variables I commented
author | Ritor1 |
---|---|
date | Wed, 02 Apr 2014 21:05:19 +0600 |
parents | 82851980e3d8 |
children | d6887ee81068 |
comparison
equal
deleted
inserted
replaced
2333:82851980e3d8 | 2334:ddb803517a48 |
---|---|
226 | 226 |
227 void Render::RenderTerrainD3D() // New function | 227 void Render::RenderTerrainD3D() // New function |
228 { | 228 { |
229 int v6; // ecx@8 | 229 int v6; // ecx@8 |
230 struct Polygon *pTilePolygon; // ebx@8 | 230 struct Polygon *pTilePolygon; // ebx@8 |
231 float Light_tile_dist; | 231 // float Light_tile_dist; |
232 | 232 |
233 //warning: the game uses CW culling by default, ccw is incosistent | 233 //warning: the game uses CW culling by default, ccw is incosistent |
234 pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_CULLMODE, D3DCULL_CCW); | 234 pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_CULLMODE, D3DCULL_CCW); |
235 | 235 |
236 static RenderVertexSoft pTerrainVertices[128 * 128];//vertexCountX and vertexCountZ | 236 static RenderVertexSoft pTerrainVertices[128 * 128];//vertexCountX and vertexCountZ |
476 //int v4; // edi@3 | 476 //int v4; // edi@3 |
477 //int v5; // eax@3 | 477 //int v5; // eax@3 |
478 //__int16 v6; // di@3 | 478 //__int16 v6; // di@3 |
479 //int v7; // eax@3 | 479 //int v7; // eax@3 |
480 //int v8; // ebx@4 | 480 //int v8; // ebx@4 |
481 unsigned __int16 *v9; // eax@7 | 481 // unsigned __int16 *v9; // eax@7 |
482 char v10; // zf@9 | 482 // char v10; // zf@9 |
483 //DWORD v11; // eax@13 | 483 //DWORD v11; // eax@13 |
484 int v12; // eax@13 | 484 // int v12; // eax@13 |
485 int v13; // eax@14 | 485 // int v13; // eax@14 |
486 RenderBillboardTransform_local0 billboard; // [sp+4h] [bp-60h]@1 | 486 RenderBillboardTransform_local0 billboard; // [sp+4h] [bp-60h]@1 |
487 int v15; // [sp+54h] [bp-10h]@13 | 487 // int v15; // [sp+54h] [bp-10h]@13 |
488 //int v16; // [sp+58h] [bp-Ch]@1 | 488 //int v16; // [sp+58h] [bp-Ch]@1 |
489 //int v17; // [sp+5Ch] [bp-8h]@2 | 489 //int v17; // [sp+5Ch] [bp-8h]@2 |
490 int v18; // [sp+60h] [bp-4h]@13 | 490 // int v18; // [sp+60h] [bp-4h]@13 |
491 | 491 |
492 billboard.sParentBillboardID = -1; | 492 billboard.sParentBillboardID = -1; |
493 billboard.pTarget = pRenderer->pTargetSurface; | 493 billboard.pTarget = pRenderer->pTargetSurface; |
494 billboard.pTargetZ = pRenderer->pActiveZBuffer; | 494 billboard.pTargetZ = pRenderer->pActiveZBuffer; |
495 billboard.uTargetPitch = pRenderer->uTargetSurfacePitch; | 495 billboard.uTargetPitch = pRenderer->uTargetSurfacePitch; |
550 SpriteFrame *frame; // eax@10 | 550 SpriteFrame *frame; // eax@10 |
551 unsigned int v6; // eax@10 | 551 unsigned int v6; // eax@10 |
552 int v9; // ecx@10 | 552 int v9; // ecx@10 |
553 int v17; // ecx@25 | 553 int v17; // ecx@25 |
554 int v18; // eax@25 | 554 int v18; // eax@25 |
555 int v22; // ST3C_4@29 | 555 // int v22; // ST3C_4@29 |
556 signed __int64 v23; // qtt@30 | 556 signed __int64 v23; // qtt@30 |
557 int v26; // eax@31 | 557 int v26; // eax@31 |
558 char v27; // zf@31 | 558 // char v27; // zf@31 |
559 int v30; // [sp+14h] [bp-2Ch]@23 | 559 int v30; // [sp+14h] [bp-2Ch]@23 |
560 int v37; // [sp+1Ch] [bp-24h]@23 | 560 int v37; // [sp+1Ch] [bp-24h]@23 |
561 int a6; // [sp+20h] [bp-20h]@10 | 561 int a6; // [sp+20h] [bp-20h]@10 |
562 int v42; // [sp+2Ch] [bp-14h]@23 | 562 int v42; // [sp+2Ch] [bp-14h]@23 |
563 int y; // [sp+30h] [bp-10h]@10 | 563 int y; // [sp+30h] [bp-10h]@10 |
1809 { | 1809 { |
1810 Render *v5; // edi@1 | 1810 Render *v5; // edi@1 |
1811 unsigned int v6; // ebx@1 | 1811 unsigned int v6; // ebx@1 |
1812 LightmapBuilder *v7; // esi@3 | 1812 LightmapBuilder *v7; // esi@3 |
1813 int v8; // eax@7 | 1813 int v8; // eax@7 |
1814 ODMFace *v9; // eax@12 | 1814 // ODMFace *v9; // eax@12 |
1815 char *v10; // esi@12 | 1815 // char *v10; // esi@12 |
1816 double v11; // st7@14 | 1816 // double v11; // st7@14 |
1817 double v12; // st7@14 | 1817 // double v12; // st7@14 |
1818 int v13; // eax@14 | 1818 // int v13; // eax@14 |
1819 ODMFace *v14; // ecx@14 | 1819 // ODMFace *v14; // ecx@14 |
1820 double v15; // st7@14 | 1820 // double v15; // st7@14 |
1821 float v16; // ST48_4@15 | 1821 // float v16; // ST48_4@15 |
1822 int v17; // eax@15 | 1822 // int v17; // eax@15 |
1823 char v18; // zf@17 | 1823 // char v18; // zf@17 |
1824 HRESULT v19; // eax@18 | 1824 // HRESULT v19; // eax@18 |
1825 HRESULT v20; // eax@18 | 1825 // HRESULT v20; // eax@18 |
1826 HRESULT v21; // eax@20 | 1826 // HRESULT v21; // eax@20 |
1827 HRESULT v22; // eax@20 | 1827 // HRESULT v22; // eax@20 |
1828 unsigned int v23; // ecx@20 | 1828 // unsigned int v23; // ecx@20 |
1829 char *v24; // eax@21 | 1829 // char *v24; // eax@21 |
1830 HRESULT v25; // eax@23 | 1830 // HRESULT v25; // eax@23 |
1831 HRESULT v26; // eax@23 | 1831 // HRESULT v26; // eax@23 |
1832 HRESULT v27; // eax@24 | 1832 // HRESULT v27; // eax@24 |
1833 HRESULT v28; // eax@25 | 1833 // HRESULT v28; // eax@25 |
1834 HRESULT v29; // eax@25 | 1834 // HRESULT v29; // eax@25 |
1835 HRESULT v30; // eax@25 | 1835 // HRESULT v30; // eax@25 |
1836 HRESULT v31; // eax@25 | 1836 // HRESULT v31; // eax@25 |
1837 HRESULT v32; // eax@26 | 1837 // HRESULT v32; // eax@26 |
1838 unsigned int v33; // ecx@26 | 1838 // unsigned int v33; // ecx@26 |
1839 char *v34; // eax@27 | 1839 // char *v34; // eax@27 |
1840 int v35; // edx@28 | 1840 // int v35; // edx@28 |
1841 HRESULT v36; // eax@29 | 1841 // HRESULT v36; // eax@29 |
1842 HRESULT v37; // eax@29 | 1842 // HRESULT v37; // eax@29 |
1843 HRESULT v38; // eax@29 | 1843 // HRESULT v38; // eax@29 |
1844 HRESULT v39; // eax@29 | 1844 // HRESULT v39; // eax@29 |
1845 //IDirect3DDevice3Vtbl *v40; // ebx@29 | 1845 //IDirect3DDevice3Vtbl *v40; // ebx@29 |
1846 unsigned int v41; // eax@29 | 1846 unsigned int v41; // eax@29 |
1847 HRESULT v42; // eax@30 | 1847 // HRESULT v42; // eax@30 |
1848 HRESULT v43; // eax@30 | 1848 // HRESULT v43; // eax@30 |
1849 HRESULT v44; // eax@30 | 1849 // HRESULT v44; // eax@30 |
1850 char *v45; // esi@34 | 1850 // char *v45; // esi@34 |
1851 int v46; // ecx@35 | 1851 // int v46; // ecx@35 |
1852 double v47; // st6@35 | 1852 // double v47; // st6@35 |
1853 int v48; // eax@36 | 1853 // int v48; // eax@36 |
1854 const char *v49; // [sp+4Ch] [bp-1Ch]@0 | 1854 // const char *v49; // [sp+4Ch] [bp-1Ch]@0 |
1855 const char *v50; // [sp+4Ch] [bp-1Ch]@20 | 1855 // const char *v50; // [sp+4Ch] [bp-1Ch]@20 |
1856 int v51; // [sp+50h] [bp-18h]@0 | 1856 // int v51; // [sp+50h] [bp-18h]@0 |
1857 unsigned int v52; // [sp+54h] [bp-14h]@0 | 1857 // unsigned int v52; // [sp+54h] [bp-14h]@0 |
1858 LightmapBuilder *v53; // [sp+58h] [bp-10h]@3 | 1858 LightmapBuilder *v53; // [sp+58h] [bp-10h]@3 |
1859 unsigned int v54; // [sp+5Ch] [bp-Ch]@3 | 1859 unsigned int v54; // [sp+5Ch] [bp-Ch]@3 |
1860 unsigned int v55; // [sp+5Ch] [bp-Ch]@34 | 1860 // unsigned int v55; // [sp+5Ch] [bp-Ch]@34 |
1861 unsigned int v56; // [sp+60h] [bp-8h]@12 | 1861 // unsigned int v56; // [sp+60h] [bp-8h]@12 |
1862 int v57; // [sp+60h] [bp-8h]@34 | 1862 // int v57; // [sp+60h] [bp-8h]@34 |
1863 signed int a2; // [sp+64h] [bp-4h]@4 | 1863 signed int a2; // [sp+64h] [bp-4h]@4 |
1864 | 1864 |
1865 v5 = this; | 1865 v5 = this; |
1866 v6 = 0; | 1866 v6 = 0; |
1867 if ( this->uNumD3DSceneBegins && (signed int)uNumVertices >= 3 ) | 1867 if ( this->uNumD3DSceneBegins && (signed int)uNumVertices >= 3 ) |
2037 | 2037 |
2038 //----- (0049E992) -------------------------------------------------------- | 2038 //----- (0049E992) -------------------------------------------------------- |
2039 Render::Render() | 2039 Render::Render() |
2040 { | 2040 { |
2041 //Render *v1; // esi@1 | 2041 //Render *v1; // esi@1 |
2042 int v2; // eax@1 | 2042 // int v2; // eax@1 |
2043 char v3; // zf@1 | 2043 // char v3; // zf@1 |
2044 | 2044 |
2045 //v1 = this; | 2045 //v1 = this; |
2046 this->pDirectDraw4 = 0; | 2046 this->pDirectDraw4 = 0; |
2047 this->pFrontBuffer4 = 0; | 2047 this->pFrontBuffer4 = 0; |
2048 this->pBackBuffer4 = 0; | 2048 this->pBackBuffer4 = 0; |
2154 void Render::SavePCXScreenshot() | 2154 void Render::SavePCXScreenshot() |
2155 { | 2155 { |
2156 int v5; // eax@8 | 2156 int v5; // eax@8 |
2157 FILE *pOutFile; // edi@10 | 2157 FILE *pOutFile; // edi@10 |
2158 unsigned short *v8; // eax@11 | 2158 unsigned short *v8; // eax@11 |
2159 int v9; // eax@13 | 2159 // int v9; // eax@13 |
2160 int v10; // ecx@15 | 2160 // int v10; // ecx@15 |
2161 signed int v12; // eax@18 | 2161 signed int v12; // eax@18 |
2162 HRESULT v14; // eax@29 | 2162 // HRESULT v14; // eax@29 |
2163 char v15[56]; // [sp+Ch] [bp-158h]@10 | 2163 char v15[56]; // [sp+Ch] [bp-158h]@10 |
2164 DDSURFACEDESC2 Dst; // [sp+48h] [bp-11Ch]@7 | 2164 DDSURFACEDESC2 Dst; // [sp+48h] [bp-11Ch]@7 |
2165 char color_map[48]; // [sp+C4h] [bp-A0h]@10 | 2165 char color_map[48]; // [sp+C4h] [bp-A0h]@10 |
2166 char Filename[40]; // [sp+F4h] [bp-70h]@3 | 2166 char Filename[40]; // [sp+F4h] [bp-70h]@3 |
2167 char *lineB; // [sp+11Ch] [bp-48h]@14 | 2167 char *lineB; // [sp+11Ch] [bp-48h]@14 |
2309 //----- (0049F1BC) -------------------------------------------------------- | 2309 //----- (0049F1BC) -------------------------------------------------------- |
2310 void Render::SaveWinnersCertificate(const char *a1) | 2310 void Render::SaveWinnersCertificate(const char *a1) |
2311 { | 2311 { |
2312 unsigned int v6; // eax@8 | 2312 unsigned int v6; // eax@8 |
2313 //FILE *v7; // edi@10 | 2313 //FILE *v7; // edi@10 |
2314 int v8; // ecx@11 | 2314 // int v8; // ecx@11 |
2315 unsigned short *v9; // eax@11 | 2315 unsigned short *v9; // eax@11 |
2316 int v10; // eax@13 | 2316 int v10; // eax@13 |
2317 signed int v13; // eax@18 | 2317 signed int v13; // eax@18 |
2318 char v14; // zf@27 | 2318 // char v14; // zf@27 |
2319 HRESULT v15; // eax@29 | 2319 // HRESULT v15; // eax@29 |
2320 char v16[56]; // [sp+Ch] [bp-12Ch]@10 | 2320 char v16[56]; // [sp+Ch] [bp-12Ch]@10 |
2321 __int16 v17; // [sp+44h] [bp-F4h]@10 | 2321 __int16 v17; // [sp+44h] [bp-F4h]@10 |
2322 DDSURFACEDESC2 Dst; // [sp+48h] [bp-F0h]@7 | 2322 DDSURFACEDESC2 Dst; // [sp+48h] [bp-F0h]@7 |
2323 int v19; // [sp+58h] [bp-E0h]@8 | 2323 // int v19; // [sp+58h] [bp-E0h]@8 |
2324 unsigned __int16 *v20; // [sp+6Ch] [bp-CCh]@8 | 2324 // unsigned __int16 *v20; // [sp+6Ch] [bp-CCh]@8 |
2325 char color_map[48]; // [sp+C4h] [bp-74h]@10 | 2325 char color_map[48]; // [sp+C4h] [bp-74h]@10 |
2326 unsigned int v22; // [sp+F4h] [bp-44h]@11 | 2326 // unsigned int v22; // [sp+F4h] [bp-44h]@11 |
2327 char *lineB; // [sp+F8h] [bp-40h]@14 | 2327 char *lineB; // [sp+F8h] [bp-40h]@14 |
2328 int image_width; // [sp+FCh] [bp-3Ch]@11 | 2328 int image_width; // [sp+FCh] [bp-3Ch]@11 |
2329 int v25; // [sp+100h] [bp-38h]@4 | 2329 int v25; // [sp+100h] [bp-38h]@4 |
2330 FILE *File; // [sp+104h] [bp-34h]@3 | 2330 FILE *File; // [sp+104h] [bp-34h]@3 |
2331 char Str; // [sp+108h] [bp-30h]@10 | 2331 char Str; // [sp+108h] [bp-30h]@10 |
2475 void Render::PackPCXpicture( unsigned short* picture_data, int wight, int heidth, void *data_buff, int max_buff_size,unsigned int* packed_size ) | 2475 void Render::PackPCXpicture( unsigned short* picture_data, int wight, int heidth, void *data_buff, int max_buff_size,unsigned int* packed_size ) |
2476 { | 2476 { |
2477 void *v8; // esi@3 | 2477 void *v8; // esi@3 |
2478 void *v9; // esi@3 | 2478 void *v9; // esi@3 |
2479 unsigned short* v11; // eax@4 | 2479 unsigned short* v11; // eax@4 |
2480 int v13; // eax@8 | 2480 // int v13; // eax@8 |
2481 int v14; // ecx@8 | 2481 // int v14; // ecx@8 |
2482 signed int v15; // eax@11 | 2482 signed int v15; // eax@11 |
2483 char v16; // zf@20 | 2483 // char v16; // zf@20 |
2484 int result; // eax@21 | 2484 // int result; // eax@21 |
2485 char v18[58]; // [sp+Ch] [bp-ACh]@3 | 2485 char v18[58]; // [sp+Ch] [bp-ACh]@3 |
2486 char v20[48]; // [sp+48h] [bp-70h]@3 | 2486 char v20[48]; // [sp+48h] [bp-70h]@3 |
2487 char *lineG; // [sp+78h] [bp-40h]@7 | 2487 char *lineG; // [sp+78h] [bp-40h]@7 |
2488 char *lineB; // [sp+7Ch] [bp-3Ch]@7 | 2488 char *lineB; // [sp+7Ch] [bp-3Ch]@7 |
2489 int v23; // [sp+80h] [bp-38h]@4 | 2489 int v23; // [sp+80h] [bp-38h]@4 |
2617 void Render::SavePCXImage(const char *Filename, unsigned short* picture_data, int width, int height) | 2617 void Render::SavePCXImage(const char *Filename, unsigned short* picture_data, int width, int height) |
2618 { | 2618 { |
2619 FILE *result; // eax@1 | 2619 FILE *result; // eax@1 |
2620 FILE *pOutFile; // edi@4 | 2620 FILE *pOutFile; // edi@4 |
2621 unsigned short* v9; // eax@5 | 2621 unsigned short* v9; // eax@5 |
2622 int v10; // eax@7 | 2622 // int v10; // eax@7 |
2623 signed int v12; // eax@12 | 2623 signed int v12; // eax@12 |
2624 char v13; // zf@21 | 2624 // char v13; // zf@21 |
2625 char v14[56]; // [sp+4h] [bp-A0h]@4 | 2625 char v14[56]; // [sp+4h] [bp-A0h]@4 |
2626 __int16 v15; // [sp+3Ch] [bp-68h]@4 | 2626 __int16 v15; // [sp+3Ch] [bp-68h]@4 |
2627 char color_map[48]; // [sp+40h] [bp-64h]@4 | 2627 char color_map[48]; // [sp+40h] [bp-64h]@4 |
2628 int v18; // [sp+74h] [bp-30h]@5 | 2628 int v18; // [sp+74h] [bp-30h]@5 |
2629 char *v19; // [sp+78h] [bp-2Ch]@5 | 2629 // char *v19; // [sp+78h] [bp-2Ch]@5 |
2630 int image_width; // [sp+7Ch] [bp-28h]@5 | 2630 int image_width; // [sp+7Ch] [bp-28h]@5 |
2631 PCXHeader_1 header1; // [sp+80h] [bp-24h]@4 | 2631 PCXHeader_1 header1; // [sp+80h] [bp-24h]@4 |
2632 PCXHeader_2 header2; // [sp+90h] [bp-14h]@4 | 2632 PCXHeader_2 header2; // [sp+90h] [bp-14h]@4 |
2633 char *lineRGB; // [sp+98h] [bp-Ch]@4 | 2633 char *lineRGB; // [sp+98h] [bp-Ch]@4 |
2634 int pitch; // [sp+9Ch] [bp-8h]@2 | 2634 int pitch; // [sp+9Ch] [bp-8h]@2 |
2834 { | 2834 { |
2835 Render *v1; // esi@1 | 2835 Render *v1; // esi@1 |
2836 //RenderD3D *v2; // ecx@1 | 2836 //RenderD3D *v2; // ecx@1 |
2837 //char v3; // zf@4 | 2837 //char v3; // zf@4 |
2838 //void *v4; // ebx@6 | 2838 //void *v4; // ebx@6 |
2839 IDirectDraw *v5; // eax@10 | 2839 // IDirectDraw *v5; // eax@10 |
2840 IDirectDrawSurface2 *v6; // eax@11 | 2840 // IDirectDrawSurface2 *v6; // eax@11 |
2841 IDirectDrawSurface2 *v7; // eax@13 | 2841 // IDirectDrawSurface2 *v7; // eax@13 |
2842 IDirectDrawSurface2 *v8; // eax@15 | 2842 // IDirectDrawSurface2 *v8; // eax@15 |
2843 IDirectDraw2 *v9; // eax@17 | 2843 // IDirectDraw2 *v9; // eax@17 |
2844 IDirectDraw4 *v10; // eax@19 | 2844 // IDirectDraw4 *v10; // eax@19 |
2845 IDirectDrawSurface4 *v11; // eax@20 | 2845 // IDirectDrawSurface4 *v11; // eax@20 |
2846 IDirectDrawSurface4 *v12; // eax@22 | 2846 // IDirectDrawSurface4 *v12; // eax@22 |
2847 IDirectDrawSurface4 *v13; // eax@24 | 2847 // IDirectDrawSurface4 *v13; // eax@24 |
2848 IDirectDraw4 *v14; // eax@26 | 2848 // IDirectDraw4 *v14; // eax@26 |
2849 unsigned __int16 **v15; // ebx@28 | 2849 // unsigned __int16 **v15; // ebx@28 |
2850 void **v16; // esi@29 | 2850 // void **v16; // esi@29 |
2851 | 2851 |
2852 v1 = this; | 2852 v1 = this; |
2853 if (pRenderD3D) | 2853 if (pRenderD3D) |
2854 { | 2854 { |
2855 if ( v1->using_software_screen_buffer ) | 2855 if ( v1->using_software_screen_buffer ) |
2988 | 2988 |
2989 //----- (004A597D) -------------------------------------------------------- | 2989 //----- (004A597D) -------------------------------------------------------- |
2990 void Present_NoColorKey() | 2990 void Present_NoColorKey() |
2991 { | 2991 { |
2992 //unsigned __int16 *v0; // eax@4 | 2992 //unsigned __int16 *v0; // eax@4 |
2993 unsigned __int16 *v1; // esi@4 | 2993 // unsigned __int16 *v1; // esi@4 |
2994 void *v2; // edi@4 | 2994 void *v2; // edi@4 |
2995 //signed int v4; // ebx@4 | 2995 //signed int v4; // ebx@4 |
2996 //signed int v5; // ebx@6 | 2996 //signed int v5; // ebx@6 |
2997 //void *v6; // edi@7 | 2997 //void *v6; // edi@7 |
2998 //const void *v7; // esi@7 | 2998 //const void *v7; // esi@7 |
2999 signed int v8; // ebx@8 | 2999 // signed int v8; // ebx@8 |
3000 int v9; // eax@10 | 3000 int v9; // eax@10 |
3001 unsigned int v10; // esi@10 | 3001 unsigned int v10; // esi@10 |
3002 unsigned __int32 v11; // edi@10 | 3002 unsigned __int32 v11; // edi@10 |
3003 //int v12; // ecx@10 | 3003 //int v12; // ecx@10 |
3004 unsigned int v13; // ebx@10 | 3004 unsigned int v13; // ebx@10 |
3005 int v14; // eax@11 | 3005 // int v14; // eax@11 |
3006 int v15; // eax@13 | 3006 // int v15; // eax@13 |
3007 int v16; // eax@14 | 3007 // int v16; // eax@14 |
3008 int v17; // eax@16 | 3008 // int v17; // eax@16 |
3009 HRESULT v18; // eax@22 | 3009 // HRESULT v18; // eax@22 |
3010 DDSURFACEDESC2 Dst; // [sp+Ch] [bp-98h]@3 | 3010 DDSURFACEDESC2 Dst; // [sp+Ch] [bp-98h]@3 |
3011 //int v20; // [sp+88h] [bp-1Ch]@10 | 3011 //int v20; // [sp+88h] [bp-1Ch]@10 |
3012 int v21; // [sp+8Ch] [bp-18h]@10 | 3012 int v21; // [sp+8Ch] [bp-18h]@10 |
3013 __int32 v22; // [sp+90h] [bp-14h]@10 | 3013 __int32 v22; // [sp+90h] [bp-14h]@10 |
3014 //unsigned __int32 v23; // [sp+94h] [bp-10h]@10 | 3014 //unsigned __int32 v23; // [sp+94h] [bp-10h]@10 |
3170 RenderD3D__DevInfo *v7; // ecx@5 | 3170 RenderD3D__DevInfo *v7; // ecx@5 |
3171 bool v8; // eax@6 | 3171 bool v8; // eax@6 |
3172 RenderD3D *v9; // ecx@13 | 3172 RenderD3D *v9; // ecx@13 |
3173 unsigned int v10; // eax@13 | 3173 unsigned int v10; // eax@13 |
3174 RenderD3D *v11; // eax@25 | 3174 RenderD3D *v11; // eax@25 |
3175 HRESULT v12; // eax@25 | 3175 // HRESULT v12; // eax@25 |
3176 int v13; // ecx@25 | 3176 int v13; // ecx@25 |
3177 int v14; // eax@27 | 3177 int v14; // eax@27 |
3178 signed int v15; // ebx@31 | 3178 signed int v15; // ebx@31 |
3179 //bool v16; // eax@35 | 3179 //bool v16; // eax@35 |
3180 //char v17; // zf@35 | 3180 //char v17; // zf@35 |
3181 IDirectDraw4 *v18; // eax@38 | 3181 // IDirectDraw4 *v18; // eax@38 |
3182 HRESULT v19; // eax@38 | 3182 // HRESULT v19; // eax@38 |
3183 //int *v20; // eax@39 | 3183 //int *v20; // eax@39 |
3184 int *v22; // eax@42 | 3184 int *v22; // eax@42 |
3185 int v23; // ecx@42 | 3185 int v23; // ecx@42 |
3186 D3DDEVICEDESC refCaps; // [sp+Ch] [bp-300h]@25 | 3186 D3DDEVICEDESC refCaps; // [sp+Ch] [bp-300h]@25 |
3187 DDSURFACEDESC2 pDesc; // [sp+108h] [bp-204h]@40 | 3187 DDSURFACEDESC2 pDesc; // [sp+108h] [bp-204h]@40 |
3188 D3DDEVICEDESC halCaps; // [sp+184h] [bp-188h]@25 | 3188 D3DDEVICEDESC halCaps; // [sp+184h] [bp-188h]@25 |
3189 DDSURFACEDESC2 ddsd2; // [sp+280h] [bp-8Ch]@38 | 3189 // DDSURFACEDESC2 ddsd2; // [sp+280h] [bp-8Ch]@38 |
3190 void *v28; // [sp+2FCh] [bp-10h]@2 | 3190 void *v28; // [sp+2FCh] [bp-10h]@2 |
3191 int v29; // [sp+308h] [bp-4h]@2 | 3191 int v29; // [sp+308h] [bp-4h]@2 |
3192 | 3192 |
3193 __debugbreak(); // Nomad | 3193 __debugbreak(); // Nomad |
3194 | 3194 |
3387 //unsigned int v5; // edx@5 | 3387 //unsigned int v5; // edx@5 |
3388 //RenderD3D__DevInfo *v6; // ecx@5 | 3388 //RenderD3D__DevInfo *v6; // ecx@5 |
3389 bool v7; // eax@7 | 3389 bool v7; // eax@7 |
3390 //RenderD3D *v8; // ecx@12 | 3390 //RenderD3D *v8; // ecx@12 |
3391 unsigned int v9; // eax@12 | 3391 unsigned int v9; // eax@12 |
3392 RenderD3D *v10; // eax@24 | 3392 // RenderD3D *v10; // eax@24 |
3393 HRESULT v11; // eax@24 | 3393 // HRESULT v11; // eax@24 |
3394 int v12; // eax@24 | 3394 int v12; // eax@24 |
3395 int v13; // eax@26 | 3395 int v13; // eax@26 |
3396 //bool v14; // eax@32 | 3396 //bool v14; // eax@32 |
3397 //char v15; // zf@32 | 3397 //char v15; // zf@32 |
3398 IDirectDraw4 *v16; // eax@35 | 3398 // IDirectDraw4 *v16; // eax@35 |
3399 HRESULT v17; // eax@35 | 3399 // HRESULT v17; // eax@35 |
3400 //int *v18; // eax@36 | 3400 //int *v18; // eax@36 |
3401 int *v19; // edx@38 | 3401 // int *v19; // edx@38 |
3402 int v20; // eax@38 | 3402 // int v20; // eax@38 |
3403 unsigned int v21; // ecx@38 | 3403 // unsigned int v21; // ecx@38 |
3404 int v22; // eax@41 | 3404 // int v22; // eax@41 |
3405 D3DDEVICEDESC refCaps; // [sp+Ch] [bp-300h]@24 | 3405 D3DDEVICEDESC refCaps; // [sp+Ch] [bp-300h]@24 |
3406 DDSURFACEDESC2 pDesc; // [sp+108h] [bp-204h]@37 | 3406 DDSURFACEDESC2 pDesc; // [sp+108h] [bp-204h]@37 |
3407 D3DDEVICEDESC halCaps; // [sp+184h] [bp-188h]@24 | 3407 D3DDEVICEDESC halCaps; // [sp+184h] [bp-188h]@24 |
3408 DDSURFACEDESC2 ddsd2; // [sp+280h] [bp-8Ch]@35 | 3408 // DDSURFACEDESC2 ddsd2; // [sp+280h] [bp-8Ch]@35 |
3409 //RenderD3D *thisa; // [sp+2FCh] [bp-10h]@2 | 3409 //RenderD3D *thisa; // [sp+2FCh] [bp-10h]@2 |
3410 int v29; // [sp+308h] [bp-4h]@2 | 3410 int v29; // [sp+308h] [bp-4h]@2 |
3411 | 3411 |
3412 pParty->uFlags |= PARTY_FLAGS_1_0002; | 3412 pParty->uFlags |= PARTY_FLAGS_1_0002; |
3413 pViewport->SetFOV(flt_6BE3A0 * 65536.0f); | 3413 pViewport->SetFOV(flt_6BE3A0 * 65536.0f); |
3618 | 3618 |
3619 | 3619 |
3620 //----- (0044F2B2) -------------------------------------------------------- | 3620 //----- (0044F2B2) -------------------------------------------------------- |
3621 bool Render::IsGammaSupported() | 3621 bool Render::IsGammaSupported() |
3622 { | 3622 { |
3623 bool result; // eax@3 | 3623 // bool result; // eax@3 |
3624 HRESULT v1; // eax@4 | 3624 // HRESULT v1; // eax@4 |
3625 | 3625 |
3626 //if ( pVersion->pVersionInfo.dwPlatformId != VER_PLATFORM_WIN32_NT || pVersion->pVersionInfo.dwMajorVersion != 4 ) | 3626 //if ( pVersion->pVersionInfo.dwPlatformId != VER_PLATFORM_WIN32_NT || pVersion->pVersionInfo.dwMajorVersion != 4 ) |
3627 { | 3627 { |
3628 DDCAPS halCaps; // [sp+0h] [bp-180h]@4 | 3628 DDCAPS halCaps; // [sp+0h] [bp-180h]@4 |
3629 memset(&halCaps, 0, sizeof(DDCAPS)); | 3629 memset(&halCaps, 0, sizeof(DDCAPS)); |
3638 | 3638 |
3639 //----- (004A0BEE) -------------------------------------------------------- | 3639 //----- (004A0BEE) -------------------------------------------------------- |
3640 void Render::RasterLine2D(signed int uX, signed int uY, signed int uZ, signed int uW, unsigned __int16 uColor) | 3640 void Render::RasterLine2D(signed int uX, signed int uY, signed int uZ, signed int uW, unsigned __int16 uColor) |
3641 { | 3641 { |
3642 signed int lower_bound; // eax@17 | 3642 signed int lower_bound; // eax@17 |
3643 signed int left_bound; | 3643 // signed int left_bound; |
3644 unsigned int v21; // edi@46 | 3644 unsigned int v21; // edi@46 |
3645 int v22; // esi@47 | 3645 int v22; // esi@47 |
3646 int v23; // ebx@47 | 3646 int v23; // ebx@47 |
3647 signed int v24; // edx@50 | 3647 signed int v24; // edx@50 |
3648 signed int v25; // esi@52 | 3648 signed int v25; // esi@52 |
3923 bool Render::LockSurface_DDraw4(IDirectDrawSurface4 *pSurface, DDSURFACEDESC2 *pDesc, unsigned int uLockFlags) | 3923 bool Render::LockSurface_DDraw4(IDirectDrawSurface4 *pSurface, DDSURFACEDESC2 *pDesc, unsigned int uLockFlags) |
3924 { | 3924 { |
3925 //IDirectDrawSurface4 *v4; // esi@1 | 3925 //IDirectDrawSurface4 *v4; // esi@1 |
3926 HRESULT result; // eax@1 | 3926 HRESULT result; // eax@1 |
3927 HRESULT v6; // eax@4 | 3927 HRESULT v6; // eax@4 |
3928 int v7; // [sp-8h] [bp-14h]@10 | 3928 // int v7; // [sp-8h] [bp-14h]@10 |
3929 unsigned int v8; // [sp-4h] [bp-10h]@10 | 3929 // unsigned int v8; // [sp-4h] [bp-10h]@10 |
3930 char v9; // [sp+Bh] [bp-1h]@1 | 3930 char v9; // [sp+Bh] [bp-1h]@1 |
3931 | 3931 |
3932 //v4 = pSurface; | 3932 //v4 = pSurface; |
3933 v9 = 1; | 3933 v9 = 1; |
3934 result = pSurface->Lock(0, pDesc, uLockFlags, 0); | 3934 result = pSurface->Lock(0, pDesc, uLockFlags, 0); |
3953 ErrD3D(result); | 3953 ErrD3D(result); |
3954 if ( result ) | 3954 if ( result ) |
3955 { | 3955 { |
3956 //v8 = 0; | 3956 //v8 = 0; |
3957 //v7 = 2161; | 3957 //v7 = 2161; |
3958 LABEL_19: | 3958 //LABEL_19: |
3959 //CheckHRESULT((CheckHRESULT_stru0 *)&pSurface, result, "E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\Screen16.cpp", v7, v8); | 3959 //CheckHRESULT((CheckHRESULT_stru0 *)&pSurface, result, "E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\Screen16.cpp", v7, v8); |
3960 goto LABEL_20; | 3960 goto LABEL_20; |
3961 } | 3961 } |
3962 if ( pRenderer->pRenderD3D ) | 3962 if ( pRenderer->pRenderD3D ) |
3963 pRenderD3D->HandleLostResources(); | 3963 pRenderD3D->HandleLostResources(); |
3983 | 3983 |
3984 //----- (004A10E4) -------------------------------------------------------- | 3984 //----- (004A10E4) -------------------------------------------------------- |
3985 void Render::CreateDirectDraw() | 3985 void Render::CreateDirectDraw() |
3986 { | 3986 { |
3987 Render *v1; // edi@1 | 3987 Render *v1; // edi@1 |
3988 HRESULT v2; // eax@1 | 3988 // HRESULT v2; // eax@1 |
3989 HRESULT v3; // eax@5 | 3989 // HRESULT v3; // eax@5 |
3990 int v6; // [sp-Ch] [bp-20h]@3 | 3990 // int v6; // [sp-Ch] [bp-20h]@3 |
3991 unsigned int v9; // [sp+0h] [bp-14h]@0 | 3991 // unsigned int v9; // [sp+0h] [bp-14h]@0 |
3992 IDirectDraw *lpDD; // [sp+10h] [bp-4h]@1 | 3992 IDirectDraw *lpDD; // [sp+10h] [bp-4h]@1 |
3993 | 3993 |
3994 v1 = this; | 3994 v1 = this; |
3995 ErrD3D(DirectDrawCreate(0, &lpDD, 0)); | 3995 ErrD3D(DirectDrawCreate(0, &lpDD, 0)); |
3996 | 3996 |
4004 | 4004 |
4005 //----- (004A1169) -------------------------------------------------------- | 4005 //----- (004A1169) -------------------------------------------------------- |
4006 void Render::SetDirectDrawCooperationMode(HWND hWnd, bool bFullscreen) | 4006 void Render::SetDirectDrawCooperationMode(HWND hWnd, bool bFullscreen) |
4007 { | 4007 { |
4008 DWORD flags; // eax@1 | 4008 DWORD flags; // eax@1 |
4009 IDirectDraw *v4; // ecx@3 | 4009 // IDirectDraw *v4; // ecx@3 |
4010 HRESULT v5; // eax@5 | 4010 //// HRESULT v5; // eax@5 |
4011 int v6; // [sp-8h] [bp-8h]@3 | 4011 // int v6; // [sp-8h] [bp-8h]@3 |
4012 unsigned int v7; // [sp-4h] [bp-4h]@3 | 4012 // unsigned int v7; // [sp-4h] [bp-4h]@3 |
4013 | 4013 |
4014 flags = bFullscreen ? DDSCL_NORMAL | DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN : | 4014 flags = bFullscreen ? DDSCL_NORMAL | DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN : |
4015 DDSCL_NORMAL; | 4015 DDSCL_NORMAL; |
4016 | 4016 |
4017 ErrD3D(pDirectDraw4->SetCooperativeLevel(hWnd, flags | DDSCL_MULTITHREADED)); | 4017 ErrD3D(pDirectDraw4->SetCooperativeLevel(hWnd, flags | DDSCL_MULTITHREADED)); |
4028 { | 4028 { |
4029 Render *v1; // esi@1 | 4029 Render *v1; // esi@1 |
4030 IDirectDraw *pDD; // eax@3 | 4030 IDirectDraw *pDD; // eax@3 |
4031 IDirectDrawSurface **pOutSurf; // esi@3 | 4031 IDirectDrawSurface **pOutSurf; // esi@3 |
4032 struct _DDSURFACEDESC *v4; // edx@3 | 4032 struct _DDSURFACEDESC *v4; // edx@3 |
4033 HRESULT v5; // eax@5 | 4033 //// HRESULT v5; // eax@5 |
4034 int v6; // [sp-8h] [bp-8Ch]@3 | 4034 int v6; // [sp-8h] [bp-8Ch]@3 |
4035 unsigned int v7; // [sp-4h] [bp-88h]@3 | 4035 unsigned int v7; // [sp-4h] [bp-88h]@3 |
4036 DDSURFACEDESC2 a2; // [sp+4h] [bp-80h]@3 | 4036 DDSURFACEDESC2 a2; // [sp+4h] [bp-80h]@3 |
4037 | 4037 |
4038 v1 = this; | 4038 v1 = this; |
4069 { | 4069 { |
4070 Render *v1; // esi@1 | 4070 Render *v1; // esi@1 |
4071 IDirectDraw *v2; // eax@3 | 4071 IDirectDraw *v2; // eax@3 |
4072 IDirectDrawSurface **ppBackBuffer; // esi@3 | 4072 IDirectDrawSurface **ppBackBuffer; // esi@3 |
4073 struct _DDSURFACEDESC *v4; // edx@3 | 4073 struct _DDSURFACEDESC *v4; // edx@3 |
4074 HRESULT v5; // eax@5 | 4074 // HRESULT v5; // eax@5 |
4075 int v6; // [sp-8h] [bp-8Ch]@3 | 4075 int v6; // [sp-8h] [bp-8Ch]@3 |
4076 unsigned int v7; // [sp-4h] [bp-88h]@3 | 4076 unsigned int v7; // [sp-4h] [bp-88h]@3 |
4077 DDSURFACEDESC2 a2; // [sp+4h] [bp-80h]@3 | 4077 DDSURFACEDESC2 a2; // [sp+4h] [bp-80h]@3 |
4078 | 4078 |
4079 v1 = this; | 4079 v1 = this; |
4112 //----- (004A139A) -------------------------------------------------------- | 4112 //----- (004A139A) -------------------------------------------------------- |
4113 void Render::CreateDirectDrawPrimarySurface() | 4113 void Render::CreateDirectDrawPrimarySurface() |
4114 { | 4114 { |
4115 Render *v1; // esi@1 | 4115 Render *v1; // esi@1 |
4116 //int v2; // ebx@3 | 4116 //int v2; // ebx@3 |
4117 IDirectDraw2 *v3; // eax@3 | 4117 // IDirectDraw2 *v3; // eax@3 |
4118 HRESULT v4; // eax@3 | 4118 // HRESULT v4; // eax@3 |
4119 IDirectDrawSurface *pFrontBuffer; // eax@3 | 4119 IDirectDrawSurface *pFrontBuffer; // eax@3 |
4120 DDSCAPS2 *v6; // edx@3 | 4120 DDSCAPS2 *v6; // edx@3 |
4121 IDirectDraw4 *v7; // eax@4 | 4121 IDirectDraw4 *v7; // eax@4 |
4122 HRESULT v8; // eax@4 | 4122 // HRESULT v8; // eax@4 |
4123 int v9; // ST14_4@5 | 4123 int v9; // ST14_4@5 |
4124 IDirectDrawSurface *v10; // ST10_4@5 | 4124 IDirectDrawSurface *v10; // ST10_4@5 |
4125 HRESULT v11; // eax@5 | 4125 // HRESULT v11; // eax@5 |
4126 IDirectDrawSurface **ppBackBuffer; // [sp-4h] [bp-A4h]@3 | 4126 IDirectDrawSurface **ppBackBuffer; // [sp-4h] [bp-A4h]@3 |
4127 const char *v13; // [sp+0h] [bp-A0h]@0 | 4127 // const char *v13; // [sp+0h] [bp-A0h]@0 |
4128 int v14; // [sp+4h] [bp-9Ch]@0 | 4128 // int v14; // [sp+4h] [bp-9Ch]@0 |
4129 unsigned int v15; // [sp+8h] [bp-98h]@0 | 4129 // unsigned int v15; // [sp+8h] [bp-98h]@0 |
4130 DDSURFACEDESC2 ddsd2; // [sp+Ch] [bp-94h]@3 | 4130 DDSURFACEDESC2 ddsd2; // [sp+Ch] [bp-94h]@3 |
4131 DDSCAPS2 v17; // [sp+88h] [bp-18h]@4 | 4131 DDSCAPS2 v17; // [sp+88h] [bp-18h]@4 |
4132 int a4; // [sp+98h] [bp-8h]@3 | 4132 // int a4; // [sp+98h] [bp-8h]@3 |
4133 | 4133 |
4134 v1 = this; | 4134 v1 = this; |
4135 //if (pVersion->pVersionInfo.dwPlatformId != VER_PLATFORM_WIN32_NT || | 4135 //if (pVersion->pVersionInfo.dwPlatformId != VER_PLATFORM_WIN32_NT || |
4136 //pVersion->pVersionInfo.dwMajorVersion != 4 ) | 4136 //pVersion->pVersionInfo.dwMajorVersion != 4 ) |
4137 { | 4137 { |
4553 void Render::DrawTerrainPolygon(unsigned int uNumVertices, struct Polygon *a4, IDirect3DTexture2 *a5, bool transparent, bool clampAtTextureBorders) | 4553 void Render::DrawTerrainPolygon(unsigned int uNumVertices, struct Polygon *a4, IDirect3DTexture2 *a5, bool transparent, bool clampAtTextureBorders) |
4554 { | 4554 { |
4555 //RenderVertexSoft *pVertices; // esi@0 | 4555 //RenderVertexSoft *pVertices; // esi@0 |
4556 //int v7; // edi@1 | 4556 //int v7; // edi@1 |
4557 unsigned int v8; // ebx@1 | 4557 unsigned int v8; // ebx@1 |
4558 LightmapBuilder *v9; // esi@3 | 4558 // LightmapBuilder *v9; // esi@3 |
4559 unsigned int v10; // edx@3 | 4559 // unsigned int v10; // edx@3 |
4560 int v11; // eax@5 | 4560 int v11; // eax@5 |
4561 int v12; // eax@11 | 4561 // int v12; // eax@11 |
4562 char *v13; // esi@11 | 4562 // char *v13; // esi@11 |
4563 double v14; // st7@13 | 4563 // double v14; // st7@13 |
4564 double v15; // st7@13 | 4564 // double v15; // st7@13 |
4565 signed int v16; // eax@13 | 4565 // signed int v16; // eax@13 |
4566 int v17; // ecx@13 | 4566 // int v17; // ecx@13 |
4567 double v18; // st7@13 | 4567 // double v18; // st7@13 |
4568 float v19; // ST78_4@14 | 4568 // float v19; // ST78_4@14 |
4569 int v20; // eax@14 | 4569 int v20; // eax@14 |
4570 char v21; // zf@16 | 4570 // char v21; // zf@16 |
4571 HRESULT v22; // eax@17 | 4571 // HRESULT v22; // eax@17 |
4572 HRESULT v23; // eax@17 | 4572 // HRESULT v23; // eax@17 |
4573 HRESULT v24; // eax@19 | 4573 // HRESULT v24; // eax@19 |
4574 HRESULT v25; // eax@19 | 4574 // HRESULT v25; // eax@19 |
4575 unsigned int v26; // ecx@19 | 4575 // unsigned int v26; // ecx@19 |
4576 char *v27; // eax@20 | 4576 // char *v27; // eax@20 |
4577 HRESULT v28; // eax@22 | 4577 // HRESULT v28; // eax@22 |
4578 HRESULT v29; // eax@22 | 4578 // HRESULT v29; // eax@22 |
4579 HRESULT v30; // eax@23 | 4579 // HRESULT v30; // eax@23 |
4580 HRESULT v31; // eax@24 | 4580 // HRESULT v31; // eax@24 |
4581 HRESULT v32; // eax@24 | 4581 // HRESULT v32; // eax@24 |
4582 HRESULT v33; // eax@24 | 4582 // HRESULT v33; // eax@24 |
4583 HRESULT v34; // eax@24 | 4583 // HRESULT v34; // eax@24 |
4584 HRESULT v35; // eax@25 | 4584 // HRESULT v35; // eax@25 |
4585 HRESULT v36; // eax@25 | 4585 // HRESULT v36; // eax@25 |
4586 unsigned int v37; // ecx@25 | 4586 // unsigned int v37; // ecx@25 |
4587 char *v38; // eax@26 | 4587 // char *v38; // eax@26 |
4588 int v39; // edx@27 | 4588 // int v39; // edx@27 |
4589 HRESULT v40; // eax@28 | 4589 // HRESULT v40; // eax@28 |
4590 HRESULT v41; // eax@28 | 4590 // HRESULT v41; // eax@28 |
4591 HRESULT v42; // eax@28 | 4591 // HRESULT v42; // eax@28 |
4592 HRESULT v43; // eax@28 | 4592 // HRESULT v43; // eax@28 |
4593 //IDirect3DDevice3Vtbl *v44; // ebx@28 | 4593 //IDirect3DDevice3Vtbl *v44; // ebx@28 |
4594 unsigned int v45; // eax@28 | 4594 unsigned int v45; // eax@28 |
4595 HRESULT v46; // eax@29 | 4595 // HRESULT v46; // eax@29 |
4596 HRESULT v47; // eax@29 | 4596 // HRESULT v47; // eax@29 |
4597 HRESULT v48; // eax@29 | 4597 // HRESULT v48; // eax@29 |
4598 //IDirect3DDevice3 *v49; // eax@35 | 4598 //IDirect3DDevice3 *v49; // eax@35 |
4599 //IDirect3DDevice3Vtbl *v50; // ecx@35 | 4599 //IDirect3DDevice3Vtbl *v50; // ecx@35 |
4600 int v51; // eax@40 | 4600 // int v51; // eax@40 |
4601 char *v52; // esi@40 | 4601 // char *v52; // esi@40 |
4602 double v53; // st7@42 | 4602 // double v53; // st7@42 |
4603 double v54; // st7@42 | 4603 // double v54; // st7@42 |
4604 signed int v55; // eax@42 | 4604 // signed int v55; // eax@42 |
4605 int v56; // ecx@42 | 4605 // int v56; // ecx@42 |
4606 double v57; // st7@42 | 4606 // double v57; // st7@42 |
4607 float v58; // ST7C_4@43 | 4607 // float v58; // ST7C_4@43 |
4608 int v59; // eax@43 | 4608 // int v59; // eax@43 |
4609 //signed int v60; // [sp+78h] [bp-14h]@31 | 4609 //signed int v60; // [sp+78h] [bp-14h]@31 |
4610 //RenderVertexSoft *v61; // [sp+7Ch] [bp-10h]@3 | 4610 //RenderVertexSoft *v61; // [sp+7Ch] [bp-10h]@3 |
4611 const char *v62; // [sp+80h] [bp-Ch]@0 | 4611 // const char *v62; // [sp+80h] [bp-Ch]@0 |
4612 const char *v63; // [sp+80h] [bp-Ch]@19 | 4612 // const char *v63; // [sp+80h] [bp-Ch]@19 |
4613 int v64; // [sp+84h] [bp-8h]@0 | 4613 // int v64; // [sp+84h] [bp-8h]@0 |
4614 LightmapBuilder *v65; // [sp+88h] [bp-4h]@3 | 4614 // LightmapBuilder *v65; // [sp+88h] [bp-4h]@3 |
4615 unsigned int v66; // [sp+88h] [bp-4h]@40 | 4615 // unsigned int v66; // [sp+88h] [bp-4h]@40 |
4616 unsigned int a6a; // [sp+A0h] [bp+14h]@11 | 4616 // unsigned int a6a; // [sp+A0h] [bp+14h]@11 |
4617 int a7; | 4617 // int a7; |
4618 | 4618 |
4619 //v7 = (int)this; | 4619 //v7 = (int)this; |
4620 v8 = 0; | 4620 v8 = 0; |
4621 if (!this->uNumD3DSceneBegins) | 4621 if (!this->uNumD3DSceneBegins) |
4622 return; | 4622 return; |
4857 BLVFace *pFace; // esi@1 | 4857 BLVFace *pFace; // esi@1 |
4858 double v5; // st7@3 | 4858 double v5; // st7@3 |
4859 signed __int64 v6; // qax@3 | 4859 signed __int64 v6; // qax@3 |
4860 int v12; // edx@7 | 4860 int v12; // edx@7 |
4861 int v13; // eax@7 | 4861 int v13; // eax@7 |
4862 void *v15; // ecx@9 | 4862 // void *v15; // ecx@9 |
4863 int v17; // edi@9 | 4863 int v17; // edi@9 |
4864 double v18; // st7@9 | 4864 double v18; // st7@9 |
4865 signed int v19; // ebx@9 | 4865 signed int v19; // ebx@9 |
4866 void *v20; // ecx@9 | 4866 void *v20; // ecx@9 |
4867 int v21; // ebx@11 | 4867 int v21; // ebx@11 |
4868 int v22; // eax@14 | 4868 int v22; // eax@14 |
4869 signed __int64 v23; // qtt@16 | 4869 signed __int64 v23; // qtt@16 |
4870 double v24; // st7@16 | 4870 // double v24; // st7@16 |
4871 unsigned __int8 v25; // sf@16 | 4871 // unsigned __int8 v25; // sf@16 |
4872 unsigned __int8 v26; // of@16 | 4872 // unsigned __int8 v26; // of@16 |
4873 double v28; // st7@20 | 4873 double v28; // st7@20 |
4874 char *v29; // ebx@20 | 4874 // char *v29; // ebx@20 |
4875 char *v30; // edx@20 | 4875 // char *v30; // edx@20 |
4876 unsigned __int8 v31; // c0@21 | 4876 // unsigned __int8 v31; // c0@21 |
4877 unsigned __int8 v32; // c3@21 | 4877 // unsigned __int8 v32; // c3@21 |
4878 double v33; // st6@23 | 4878 double v33; // st6@23 |
4879 char *v34; // esi@30 | 4879 // char *v34; // esi@30 |
4880 const void *v35; // ecx@31 | 4880 const void *v35; // ecx@31 |
4881 int v36; // eax@31 | 4881 int v36; // eax@31 |
4882 const void *v37; // edi@31 | 4882 const void *v37; // edi@31 |
4883 signed __int64 v38; // qax@31 | 4883 signed __int64 v38; // qax@31 |
4884 int v39; // ecx@31 | 4884 int v39; // ecx@31 |
4885 int v40; // ebx@33 | 4885 int v40; // ebx@33 |
4886 int v41; // eax@36 | 4886 int v41; // eax@36 |
4887 signed __int64 v42; // qtt@39 | 4887 signed __int64 v42; // qtt@39 |
4888 int v43; // eax@39 | 4888 int v43; // eax@39 |
4889 char v44; // zf@39 | 4889 // char v44; // zf@39 |
4890 double v45; // st7@39 | 4890 // double v45; // st7@39 |
4891 double v46; // st7@39 | 4891 // double v46; // st7@39 |
4892 unsigned int v47; // edx@40 | 4892 // unsigned int v47; // edx@40 |
4893 double v48; // st7@41 | 4893 double v48; // st7@41 |
4894 RenderVertexSoft *v49; // ebx@41 | 4894 // RenderVertexSoft *v49; // ebx@41 |
4895 void *v50; // edi@43 | 4895 // void *v50; // edi@43 |
4896 double v51; // st7@46 | 4896 double v51; // st7@46 |
4897 RenderVertexSoft *v52; // edx@46 | 4897 // RenderVertexSoft *v52; // edx@46 |
4898 void *v53; // edi@48 | 4898 // void *v53; // edi@48 |
4899 signed int v59; // [sp-4h] [bp-178h]@17 | 4899 // signed int v59; // [sp-4h] [bp-178h]@17 |
4900 struct Polygon *v60; // [sp+0h] [bp-174h]@17 | 4900 // struct Polygon *v60; // [sp+0h] [bp-174h]@17 |
4901 IDirect3DTexture2 *v61; // [sp+4h] [bp-170h]@17 | 4901 // IDirect3DTexture2 *v61; // [sp+4h] [bp-170h]@17 |
4902 struct Polygon pSkyPolygon; // [sp+14h] [bp-160h]@6 | 4902 struct Polygon pSkyPolygon; // [sp+14h] [bp-160h]@6 |
4903 unsigned int v63; // [sp+120h] [bp-54h]@7 | 4903 unsigned int v63; // [sp+120h] [bp-54h]@7 |
4904 unsigned int v65; // [sp+128h] [bp-4Ch]@1 | 4904 unsigned int v65; // [sp+128h] [bp-4Ch]@1 |
4905 unsigned int v66; // [sp+12Ch] [bp-48h]@7 | 4905 unsigned int v66; // [sp+12Ch] [bp-48h]@7 |
4906 //float v67; // [sp+130h] [bp-44h]@7 | 4906 //float v67; // [sp+130h] [bp-44h]@7 |
5204 //----- (004A2FC0) -------------------------------------------------------- | 5204 //----- (004A2FC0) -------------------------------------------------------- |
5205 void Render::DrawIndoorPolygon(unsigned int uNumVertices, BLVFace *pFace, IDirect3DTexture2 *pHwTex, Texture *pTex, int uPackedID, unsigned int uColor, int a8) | 5205 void Render::DrawIndoorPolygon(unsigned int uNumVertices, BLVFace *pFace, IDirect3DTexture2 *pHwTex, Texture *pTex, int uPackedID, unsigned int uColor, int a8) |
5206 { | 5206 { |
5207 //Render *v8; // edi@1 | 5207 //Render *v8; // edi@1 |
5208 //unsigned int v9; // esi@3 | 5208 //unsigned int v9; // esi@3 |
5209 RenderVertexSoft *v12; // ecx@9 | 5209 // RenderVertexSoft *v12; // ecx@9 |
5210 RenderVertexD3D3 *v13; // eax@9 | 5210 // RenderVertexD3D3 *v13; // eax@9 |
5211 double v14; // st6@10 | 5211 // double v14; // st6@10 |
5212 int v15; // edx@10 | 5212 // int v15; // edx@10 |
5213 Texture *v16; // edx@10 | 5213 // Texture *v16; // edx@10 |
5214 double v17; // st6@10 | 5214 // double v17; // st6@10 |
5215 //char v18; // zf@10 | 5215 //char v18; // zf@10 |
5216 Texture *v19; // edx@10 | 5216 // Texture *v19; // edx@10 |
5217 //Texture *v23; // edx@16 | 5217 //Texture *v23; // edx@16 |
5218 //char *v24; // ecx@16 | 5218 //char *v24; // ecx@16 |
5219 //char *v25; // eax@16 | 5219 //char *v25; // eax@16 |
5220 //double v26; // st6@17 | 5220 //double v26; // st6@17 |
5221 //int v27; // esi@17 | 5221 //int v27; // esi@17 |
5226 //char *v46; // ecx@23 | 5226 //char *v46; // ecx@23 |
5227 //char *v47; // eax@23 | 5227 //char *v47; // eax@23 |
5228 //double v48; // st6@24 | 5228 //double v48; // st6@24 |
5229 //int v49; // esi@24 | 5229 //int v49; // esi@24 |
5230 //double v50; // st6@24 | 5230 //double v50; // st6@24 |
5231 const char *v53; // [sp-Ch] [bp-20h]@21 | 5231 // const char *v53; // [sp-Ch] [bp-20h]@21 |
5232 //int v54; // [sp-8h] [bp-1Ch]@21 | 5232 //int v54; // [sp-8h] [bp-1Ch]@21 |
5233 //unsigned int v55; // [sp-4h] [bp-18h]@21 | 5233 //unsigned int v55; // [sp-4h] [bp-18h]@21 |
5234 const char *v56; // [sp+0h] [bp-14h]@0 | 5234 // const char *v56; // [sp+0h] [bp-14h]@0 |
5235 int v57; // [sp+4h] [bp-10h]@0 | 5235 // int v57; // [sp+4h] [bp-10h]@0 |
5236 unsigned int v58; // [sp+8h] [bp-Ch]@0 | 5236 // unsigned int v58; // [sp+8h] [bp-Ch]@0 |
5237 //LightmapBuilder *v59; // [sp+Ch] [bp-8h]@3 | 5237 //LightmapBuilder *v59; // [sp+Ch] [bp-8h]@3 |
5238 //int a3a; // [sp+10h] [bp-4h]@4 | 5238 //int a3a; // [sp+10h] [bp-4h]@4 |
5239 | 5239 |
5240 //v8 = this; | 5240 //v8 = this; |
5241 if (!uNumD3DSceneBegins || uNumVertices < 3) | 5241 if (!uNumD3DSceneBegins || uNumVertices < 3) |
5252 pGame->AlterGamma_BLV(pFace, &sCorrectedColor); | 5252 pGame->AlterGamma_BLV(pFace, &sCorrectedColor); |
5253 | 5253 |
5254 | 5254 |
5255 if (pFace->uAttributes & FACE_OUTLINED) | 5255 if (pFace->uAttributes & FACE_OUTLINED) |
5256 { | 5256 { |
5257 int color; | 5257 // int color; |
5258 if (GetTickCount() % 300 >= 150) | 5258 if (GetTickCount() % 300 >= 150) |
5259 uColor = sCorrectedColor = 0xFF20FF20; | 5259 uColor = sCorrectedColor = 0xFF20FF20; |
5260 else uColor = sCorrectedColor = 0xFF109010; | 5260 else uColor = sCorrectedColor = 0xFF109010; |
5261 } | 5261 } |
5262 | 5262 |
6086 | 6086 |
6087 //----- (004A4CC9) -------------------------------------------------------- | 6087 //----- (004A4CC9) -------------------------------------------------------- |
6088 void Render::_4A4CC9_AddSomeBillboard(stru6_stru1_indoor_sw_billboard *a1, int diffuse) | 6088 void Render::_4A4CC9_AddSomeBillboard(stru6_stru1_indoor_sw_billboard *a1, int diffuse) |
6089 { | 6089 { |
6090 unsigned int v5; // eax@7 | 6090 unsigned int v5; // eax@7 |
6091 char *v7; // edx@8 | 6091 // char *v7; // edx@8 |
6092 double v10; // st6@9 | 6092 double v10; // st6@9 |
6093 double v11; // st6@10 | 6093 double v11; // st6@10 |
6094 int v12; // ebx@13 | 6094 int v12; // ebx@13 |
6095 | 6095 |
6096 if (a1->uNumVertices < 3) | 6096 if (a1->uNumVertices < 3) |
6137 } | 6137 } |
6138 | 6138 |
6139 //----- (004A4DE1) -------------------------------------------------------- | 6139 //----- (004A4DE1) -------------------------------------------------------- |
6140 bool Render::LoadTexture(const char *pName, unsigned int bMipMaps, IDirectDrawSurface4 **pOutSurface, IDirect3DTexture2 **pOutTexture) | 6140 bool Render::LoadTexture(const char *pName, unsigned int bMipMaps, IDirectDrawSurface4 **pOutSurface, IDirect3DTexture2 **pOutTexture) |
6141 { | 6141 { |
6142 HRESULT v12; // eax@14 | 6142 // HRESULT v12; // eax@14 |
6143 unsigned __int16 *v13; // ecx@19 | 6143 unsigned __int16 *v13; // ecx@19 |
6144 unsigned __int16 *v14; // eax@19 | 6144 unsigned __int16 *v14; // eax@19 |
6145 DWORD v15; // edx@20 | 6145 DWORD v15; // edx@20 |
6146 HRESULT v16; // eax@23 | 6146 // HRESULT v16; // eax@23 |
6147 stru350 Dst; // [sp+Ch] [bp-F8h]@12 | 6147 stru350 Dst; // [sp+Ch] [bp-F8h]@12 |
6148 | 6148 |
6149 HWLTexture* pHWLTexture = pD3DBitmaps.LoadTexture(pName, bMipMaps); | 6149 HWLTexture* pHWLTexture = pD3DBitmaps.LoadTexture(pName, bMipMaps); |
6150 if ( pHWLTexture ) | 6150 if ( pHWLTexture ) |
6151 { | 6151 { |
6293 //Render *v1; // esi@1 | 6293 //Render *v1; // esi@1 |
6294 unsigned int v2; // eax@1 | 6294 unsigned int v2; // eax@1 |
6295 /*int v3; // eax@5 | 6295 /*int v3; // eax@5 |
6296 unsigned __int16 **v4; // edi@6 | 6296 unsigned __int16 **v4; // edi@6 |
6297 char *v5; // ebx@7*/ | 6297 char *v5; // ebx@7*/ |
6298 DDSURFACEDESC2 Dst; // [sp+Ch] [bp-7Ch]@4 | 6298 // DDSURFACEDESC2 Dst; // [sp+Ch] [bp-7Ch]@4 |
6299 | 6299 |
6300 //v1 = this; | 6300 //v1 = this; |
6301 v2 = this->uNumSceneBegins; | 6301 v2 = this->uNumSceneBegins; |
6302 this->uNumSceneBegins = v2 + 1; | 6302 this->uNumSceneBegins = v2 + 1; |
6303 if ( !v2 ) | 6303 if ( !v2 ) |
6370 //double v5; // st7@6 | 6370 //double v5; // st7@6 |
6371 double v6; // st6@6 | 6371 double v6; // st6@6 |
6372 unsigned int v7; // eax@6 | 6372 unsigned int v7; // eax@6 |
6373 double v8; // st5@6 | 6373 double v8; // st5@6 |
6374 double v9; // st4@6 | 6374 double v9; // st4@6 |
6375 HRESULT v10; // eax@6 | 6375 // HRESULT v10; // eax@6 |
6376 HRESULT v11; // eax@6 | 6376 // HRESULT v11; // eax@6 |
6377 unsigned int result; // eax@6 | 6377 // unsigned int result; // eax@6 |
6378 unsigned int v13; // eax@7 | 6378 // unsigned int v13; // eax@7 |
6379 unsigned __int16 *v14; // ecx@7 | 6379 // unsigned __int16 *v14; // ecx@7 |
6380 int *v15; // eax@7 | 6380 // int *v15; // eax@7 |
6381 unsigned int v16; // ecx@8 | 6381 // unsigned int v16; // ecx@8 |
6382 __int16 v17; // ax@10 | 6382 // __int16 v17; // ax@10 |
6383 int v18; // esi@10 | 6383 // int v18; // esi@10 |
6384 float v19; // edi@10 | 6384 // float v19; // edi@10 |
6385 void *v20; // esi@10 | 6385 // void *v20; // esi@10 |
6386 int v21; // edx@10 | 6386 // int v21; // edx@10 |
6387 int v22; // ecx@11 | 6387 // int v22; // ecx@11 |
6388 int v23; // edx@12 | 6388 // int v23; // edx@12 |
6389 __int16 v24; // ax@15 | 6389 // __int16 v24; // ax@15 |
6390 int v25; // esi@15 | 6390 // int v25; // esi@15 |
6391 float v26; // edi@15 | 6391 // float v26; // edi@15 |
6392 char *v27; // esi@15 | 6392 // char *v27; // esi@15 |
6393 int v28; // edx@15 | 6393 // int v28; // edx@15 |
6394 int v29; // ecx@16 | 6394 // int v29; // ecx@16 |
6395 int v30; // edx@17 | 6395 // int v30; // edx@17 |
6396 int v31; // [sp-Ch] [bp-ACh]@11 | 6396 // int v31; // [sp-Ch] [bp-ACh]@11 |
6397 int v32; // [sp-Ch] [bp-ACh]@16 | 6397 // int v32; // [sp-Ch] [bp-ACh]@16 |
6398 const char *v33; // [sp+0h] [bp-A0h]@0 | 6398 // const char *v33; // [sp+0h] [bp-A0h]@0 |
6399 int v34; // [sp+4h] [bp-9Ch]@0 | 6399 // int v34; // [sp+4h] [bp-9Ch]@0 |
6400 unsigned int v35; // [sp+8h] [bp-98h]@0 | 6400 // unsigned int v35; // [sp+8h] [bp-98h]@0 |
6401 RenderVertexD3D3 v36[4]; // [sp+Ch] [bp-94h]@6 | 6401 RenderVertexD3D3 v36[4]; // [sp+Ch] [bp-94h]@6 |
6402 unsigned int v37; // [sp+8Ch] [bp-14h]@7 | 6402 // unsigned int v37; // [sp+8Ch] [bp-14h]@7 |
6403 int v38; // [sp+90h] [bp-10h]@7 | 6403 // int v38; // [sp+90h] [bp-10h]@7 |
6404 double v39; // [sp+94h] [bp-Ch]@6 | 6404 // double v39; // [sp+94h] [bp-Ch]@6 |
6405 int v40; // [sp+9Ch] [bp-4h]@6 | 6405 int v40; // [sp+9Ch] [bp-4h]@6 |
6406 | 6406 |
6407 v3 = 0; | 6407 v3 = 0; |
6408 | 6408 |
6409 //{ | 6409 //{ |
6607 { | 6607 { |
6608 int v4; // edi@3 | 6608 int v4; // edi@3 |
6609 //unsigned __int16 *v5; // edx@3 | 6609 //unsigned __int16 *v5; // edx@3 |
6610 unsigned __int16 *v6; // esi@3 | 6610 unsigned __int16 *v6; // esi@3 |
6611 unsigned int v8; // eax@5 | 6611 unsigned int v8; // eax@5 |
6612 //unsigned int v9; // ebx@5 | 6612 unsigned int v9; // ebx@5 |
6613 unsigned int v11; // eax@7 | 6613 unsigned int v11; // eax@7 |
6614 unsigned int v12; // ebx@8 | 6614 unsigned int v12; // ebx@8 |
6615 unsigned int v15; // eax@14 | 6615 unsigned int v15; // eax@14 |
6616 //int v19; // [sp+10h] [bp-8h]@3 | 6616 int v19; // [sp+10h] [bp-8h]@3 |
6617 unsigned int uOutXa; // [sp+20h] [bp+8h]@16 | 6617 // unsigned int uOutXa; // [sp+20h] [bp+8h]@16 |
6618 int v23; // [sp+28h] [bp+10h]@3 | 6618 int v23; // [sp+28h] [bp+10h]@3 |
6619 | 6619 |
6620 if ( this->uNumSceneBegins && a4 ) | 6620 if ( this->uNumSceneBegins && a4 ) |
6621 { | 6621 { |
6622 v4 = a4->uWidth; | 6622 v4 = a4->uWidth; |
6623 //v5 = &this->pTargetSurface[uOutX + uOutY * this->uTargetSurfacePitch]; | 6623 //v5 = &this->pTargetSurface[uOutX + uOutY * this->uTargetSurfacePitch]; |
6624 v6 = a4->pPixels; | 6624 v6 = a4->pPixels; |
6625 v23 = a4->uHeight; | 6625 v23 = a4->uHeight; |
6626 ///v19 = v4; | 6626 v19 = v4; |
6627 if ( this->bClip ) | 6627 if ( this->bClip ) |
6628 { | 6628 { |
6629 if ( (signed int)uOutX < (signed int)this->uClipX ) | 6629 if ( (signed int)uOutX < (signed int)this->uClipX ) |
6630 { | 6630 { |
6631 v8 = this->uClipX - uOutX; | 6631 v8 = this->uClipX - uOutX; |
6632 //v9 = uOutX - this->uClipX; | 6632 v9 = uOutX - this->uClipX; |
6633 v8 *= 2; | 6633 v8 *= 2; |
6634 v4 += uOutX - this->uClipX; | 6634 v4 += v9; |
6635 v6 = (unsigned __int16 *)((char *)v6 + v8); | 6635 v6 = (unsigned __int16 *)((char *)v6 + v8); |
6636 //v5 = (unsigned __int16 *)((char *)v5 + v8); | 6636 //v5 = (unsigned __int16 *)((char *)v5 + v8); |
6637 } | 6637 } |
6638 if ( (signed int)uOutY < (signed int)this->uClipY ) | 6638 if ( (signed int)uOutY < (signed int)this->uClipY ) |
6639 { | 6639 { |
6640 v11 = this->uClipY - uOutY; | 6640 v11 = this->uClipY - uOutY; |
6641 v6 += a4->uWidth * v11; | 6641 v6 += v19 * v11; |
6642 v23 += uOutY - this->uClipY; | 6642 v23 += uOutY - this->uClipY; |
6643 //v5 += this->uTargetSurfacePitch * v11; | 6643 //v5 += this->uTargetSurfacePitch * v11; |
6644 } | 6644 } |
6645 v12 = max(this->uClipX, uOutX); | 6645 v12 = max(this->uClipX, uOutX); |
6646 if ( (signed int)(v4 + v12) > (signed int)this->uClipZ ) | 6646 if ( (signed int)(v4 + v12) > (signed int)this->uClipZ ) |
6647 { | |
6647 v4 = this->uClipZ - max(this->uClipX, uOutX); | 6648 v4 = this->uClipZ - max(this->uClipX, uOutX); |
6649 } | |
6648 v15 = max(this->uClipY, uOutY); | 6650 v15 = max(this->uClipY, uOutY); |
6649 if ( (signed int)(v15 + v23) > (signed int)this->uClipW ) | 6651 if ( (signed int)(v15 + v23) > (signed int)this->uClipW ) |
6652 { | |
6650 v23 = this->uClipW - max(this->uClipY, uOutY); | 6653 v23 = this->uClipW - max(this->uClipY, uOutY); |
6654 } | |
6651 } | 6655 } |
6652 | 6656 |
6653 for (int y = 0; y < v23; y++) | 6657 for (int y = 0; y < v23; y++) |
6654 { | 6658 { |
6655 for (int x = 0; x < v4; x++) | 6659 for (int x = 0; x < v4; x++) |
6657 WritePixel16(uOutX + x, uOutY + y, *v6); | 6661 WritePixel16(uOutX + x, uOutY + y, *v6); |
6658 //*v5 = *v6; | 6662 //*v5 = *v6; |
6659 //++v5; | 6663 //++v5; |
6660 ++v6; | 6664 ++v6; |
6661 } | 6665 } |
6662 v6 += a4->uWidth - v4; | 6666 v6 += v19 - v4; |
6663 //v5 += this->uTargetSurfacePitch - v4; | 6667 //v5 += this->uTargetSurfacePitch - v4; |
6664 } | 6668 } |
6665 } | 6669 } |
6666 } | 6670 } |
6667 | 6671 |
6751 unsigned int v12; // esi@11 | 6755 unsigned int v12; // esi@11 |
6752 unsigned int v13; // edx@12 | 6756 unsigned int v13; // edx@12 |
6753 unsigned int v14; // ebx@15 | 6757 unsigned int v14; // ebx@15 |
6754 unsigned int v15; // esi@17 | 6758 unsigned int v15; // esi@17 |
6755 unsigned int v16; // edi@18 | 6759 unsigned int v16; // edi@18 |
6756 char v17; // zf@29 | 6760 // char v17; // zf@29 |
6757 int v18; // [sp+14h] [bp-Ch]@4 | 6761 int v18; // [sp+14h] [bp-Ch]@4 |
6758 int v19; // [sp+18h] [bp-8h]@4 | 6762 int v19; // [sp+18h] [bp-8h]@4 |
6759 unsigned __int8 *v20; // [sp+1Ch] [bp-4h]@4 | 6763 unsigned __int8 *v20; // [sp+1Ch] [bp-4h]@4 |
6760 int v21; // [sp+28h] [bp+8h]@25 | 6764 // int v21; // [sp+28h] [bp+8h]@25 |
6761 int v22; // [sp+28h] [bp+8h]@34 | 6765 // int v22; // [sp+28h] [bp+8h]@34 |
6762 unsigned int v23; // [sp+2Ch] [bp+Ch]@23 | 6766 // unsigned int v23; // [sp+2Ch] [bp+Ch]@23 |
6763 unsigned int v24; // [sp+2Ch] [bp+Ch]@32 | 6767 // unsigned int v24; // [sp+2Ch] [bp+Ch]@32 |
6764 | 6768 |
6765 if ( this->uNumSceneBegins && a4 && a4->pPalette16 ) | 6769 if ( this->uNumSceneBegins && a4 && a4->pPalette16 ) |
6766 { | 6770 { |
6767 //v4 = &this->pTargetSurface[a2 + a3 * this->uTargetSurfacePitch]; | 6771 //v4 = &this->pTargetSurface[a2 + a3 * this->uTargetSurfacePitch]; |
6768 v20 = a4->pLevelOfDetail0_prolly_alpha_mask; | 6772 v20 = a4->pLevelOfDetail0_prolly_alpha_mask; |
7048 unsigned int v16; // edx@9 | 7052 unsigned int v16; // edx@9 |
7049 signed int v17; // edi@10 | 7053 signed int v17; // edi@10 |
7050 signed int v18; // ebx@13 | 7054 signed int v18; // ebx@13 |
7051 unsigned int v19; // edx@15 | 7055 unsigned int v19; // edx@15 |
7052 signed int v20; // esi@16 | 7056 signed int v20; // esi@16 |
7053 int v21; // ebx@22 | 7057 // int v21; // ebx@22 |
7054 char v22; // zf@28 | 7058 // char v22; // zf@28 |
7055 int v23; // ebx@31 | 7059 // int v23; // ebx@31 |
7056 unsigned __int16 v24; // si@35 | 7060 unsigned __int16 v24; // si@35 |
7057 int v25; // [sp+Ch] [bp-4h]@2 | 7061 int v25; // [sp+Ch] [bp-4h]@2 |
7058 int v26; // [sp+1Ch] [bp+Ch]@24 | 7062 // int v26; // [sp+1Ch] [bp+Ch]@24 |
7059 int v27; // [sp+1Ch] [bp+Ch]@33 | 7063 // int v27; // [sp+1Ch] [bp+Ch]@33 |
7060 unsigned int v28; // [sp+20h] [bp+10h]@30 | 7064 unsigned int v28; // [sp+20h] [bp+10h]@30 |
7061 unsigned int v29; // [sp+24h] [bp+14h]@22 | 7065 // unsigned int v29; // [sp+24h] [bp+14h]@22 |
7062 unsigned int v30; // [sp+24h] [bp+14h]@31 | 7066 // unsigned int v30; // [sp+24h] [bp+14h]@31 |
7063 | 7067 |
7064 int a2 = x; | 7068 int a2 = x; |
7065 int a3 = y; | 7069 int a3 = y; |
7066 uint a6 = uFontHeight; | 7070 uint a6 = uFontHeight; |
7067 if (!this->uNumSceneBegins) | 7071 if (!this->uNumSceneBegins) |
7336 signed int v11; // edx@9 | 7340 signed int v11; // edx@9 |
7337 signed int v12; // esi@12 | 7341 signed int v12; // esi@12 |
7338 signed int v13; // esi@15 | 7342 signed int v13; // esi@15 |
7339 signed int v15; // esi@18 | 7343 signed int v15; // esi@18 |
7340 unsigned __int8 *v16; // ebx@22 | 7344 unsigned __int8 *v16; // ebx@22 |
7341 char v17; // zf@28 | 7345 // char v17; // zf@28 |
7342 int v18; // [sp+10h] [bp-10h]@4 | 7346 int v18; // [sp+10h] [bp-10h]@4 |
7343 unsigned __int8 *v19; // [sp+18h] [bp-8h]@4 | 7347 unsigned __int8 *v19; // [sp+18h] [bp-8h]@4 |
7344 int v20; // [sp+1Ch] [bp-4h]@4 | 7348 int v20; // [sp+1Ch] [bp-4h]@4 |
7345 int v21; // [sp+28h] [bp+8h]@24 | 7349 // int v21; // [sp+28h] [bp+8h]@24 |
7346 unsigned int v22; // [sp+2Ch] [bp+Ch]@22 | 7350 // unsigned int v22; // [sp+2Ch] [bp+Ch]@22 |
7347 | 7351 |
7348 if (!uNumSceneBegins || !pTexture) | 7352 if (!uNumSceneBegins || !pTexture) |
7349 return; | 7353 return; |
7350 | 7354 |
7351 if ( pTexture->pPalette16 ) | 7355 if ( pTexture->pPalette16 ) |
7444 unsigned int v16; // edx@14 | 7448 unsigned int v16; // edx@14 |
7445 unsigned int v17; // edx@17 | 7449 unsigned int v17; // edx@17 |
7446 unsigned int v19; // edx@20 | 7450 unsigned int v19; // edx@20 |
7447 int v20; // eax@27 | 7451 int v20; // eax@27 |
7448 int v21; // edx@29 | 7452 int v21; // edx@29 |
7449 int v23; // [sp+Ch] [bp-Ch]@24 | 7453 // int v23; // [sp+Ch] [bp-Ch]@24 |
7450 unsigned __int8 *v24; // [sp+14h] [bp-4h]@6 | 7454 unsigned __int8 *v24; // [sp+14h] [bp-4h]@6 |
7451 int xa; // [sp+20h] [bp+8h]@26 | 7455 // int xa; // [sp+20h] [bp+8h]@26 |
7452 unsigned int ya; // [sp+24h] [bp+Ch]@24 | 7456 // unsigned int ya; // [sp+24h] [bp+Ch]@24 |
7453 int Width; // [sp+2Ch] [bp+14h]@6 | 7457 int Width; // [sp+2Ch] [bp+14h]@6 |
7454 | 7458 |
7455 if ( this->uNumSceneBegins && a4 && a4->pPalette16 && a5 && a5->pPalette16 ) | 7459 if ( this->uNumSceneBegins && a4 && a4->pPalette16 && a5 && a5->pPalette16 ) |
7456 { | 7460 { |
7457 v24 = a4->pLevelOfDetail0_prolly_alpha_mask; | 7461 v24 = a4->pLevelOfDetail0_prolly_alpha_mask; |
7552 unsigned int v16; // edx@14 | 7556 unsigned int v16; // edx@14 |
7553 unsigned int v17; // edx@17 | 7557 unsigned int v17; // edx@17 |
7554 unsigned int v19; // edx@20 | 7558 unsigned int v19; // edx@20 |
7555 int v20; // eax@27 | 7559 int v20; // eax@27 |
7556 int v21; // edx@29 | 7560 int v21; // edx@29 |
7557 int v23; // [sp+Ch] [bp-Ch]@24 | 7561 // int v23; // [sp+Ch] [bp-Ch]@24 |
7558 int Height; // [sp+10h] [bp-8h]@6 | 7562 int Height; // [sp+10h] [bp-8h]@6 |
7559 int Width; // [sp+14h] [bp-4h]@6 | 7563 int Width; // [sp+14h] [bp-4h]@6 |
7560 int v27; // [sp+24h] [bp+Ch]@23 | 7564 int v27; // [sp+24h] [bp+Ch]@23 |
7561 unsigned __int8 *v28; // [sp+28h] [bp+10h]@6 | 7565 unsigned __int8 *v28; // [sp+28h] [bp+10h]@6 |
7562 | 7566 |
7975 unsigned int v10; // edx@8 | 7979 unsigned int v10; // edx@8 |
7976 unsigned int v11; // edx@9 | 7980 unsigned int v11; // edx@9 |
7977 unsigned int v12; // esi@12 | 7981 unsigned int v12; // esi@12 |
7978 unsigned int v13; // esi@15 | 7982 unsigned int v13; // esi@15 |
7979 unsigned int v15; // esi@18 | 7983 unsigned int v15; // esi@18 |
7980 char v17; // zf@26 | 7984 // char v17; // zf@26 |
7981 int v18; // [sp+10h] [bp-10h]@4 | 7985 int v18; // [sp+10h] [bp-10h]@4 |
7982 unsigned __int8 *v19; // [sp+18h] [bp-8h]@4 | 7986 unsigned __int8 *v19; // [sp+18h] [bp-8h]@4 |
7983 int v20; // [sp+1Ch] [bp-4h]@4 | 7987 int v20; // [sp+1Ch] [bp-4h]@4 |
7984 int uXa; // [sp+28h] [bp+8h]@24 | 7988 // int uXa; // [sp+28h] [bp+8h]@24 |
7985 unsigned int uYa; // [sp+2Ch] [bp+Ch]@22 | 7989 // unsigned int uYa; // [sp+2Ch] [bp+Ch]@22 |
7986 | 7990 |
7987 if ( this->uNumSceneBegins ) | 7991 if ( this->uNumSceneBegins ) |
7988 { | 7992 { |
7989 if ( a4 ) | 7993 if ( a4 ) |
7990 { | 7994 { |
8088 float v0; // ST14_4@17 | 8092 float v0; // ST14_4@17 |
8089 int v4; // edx@26 | 8093 int v4; // edx@26 |
8090 ObjectDesc *v5; // eax@26 | 8094 ObjectDesc *v5; // eax@26 |
8091 RGBTexture *v6; // esi@33 | 8095 RGBTexture *v6; // esi@33 |
8092 const char *v8; // [sp-4h] [bp-28h]@33 | 8096 const char *v8; // [sp-4h] [bp-28h]@33 |
8093 struct tagRECT Rect; // [sp+14h] [bp-10h]@15 | 8097 // struct tagRECT Rect; // [sp+14h] [bp-10h]@15 |
8094 | 8098 |
8095 /*if ( !pRenderer->bWindowMode && (dword_6BE364_game_settings_1 & 2) ) | 8099 /*if ( !pRenderer->bWindowMode && (dword_6BE364_game_settings_1 & 2) ) |
8096 { | 8100 { |
8097 ModalWindow(pGlobalTXT_LocalizationStrings[62], UIMSG_0);// "Might and Magic VII requires your desktop to be in 16bit (32k or 65k) Color mode in order to operate in a window." | 8101 ModalWindow(pGlobalTXT_LocalizationStrings[62], UIMSG_0);// "Might and Magic VII requires your desktop to be in 16bit (32k or 65k) Color mode in order to operate in a window." |
8098 return; | 8102 return; |
8682 { | 8686 { |
8683 int v9; // ecx@8 | 8687 int v9; // ecx@8 |
8684 Texture *pFaceTexture; // eax@10 | 8688 Texture *pFaceTexture; // eax@10 |
8685 unsigned int v16; // edi@22 | 8689 unsigned int v16; // edi@22 |
8686 int v27; // eax@57 | 8690 int v27; // eax@57 |
8687 int vertex_id; // eax@58 | 8691 // int vertex_id; // eax@58 |
8688 unsigned int v34; // eax@80 | 8692 unsigned int v34; // eax@80 |
8689 int v40; // [sp-4h] [bp-5Ch]@2 | 8693 int v40; // [sp-4h] [bp-5Ch]@2 |
8690 int v49; // [sp+2Ch] [bp-2Ch]@10 | 8694 int v49; // [sp+2Ch] [bp-2Ch]@10 |
8691 int v50; // [sp+30h] [bp-28h]@34 | 8695 int v50; // [sp+30h] [bp-28h]@34 |
8692 int v51; // [sp+34h] [bp-24h]@35 | 8696 int v51; // [sp+34h] [bp-24h]@35 |
9043 int v4; // edx@7 | 9047 int v4; // edx@7 |
9044 unsigned __int8 v5; // cf@9 | 9048 unsigned __int8 v5; // cf@9 |
9045 unsigned int v6; // ecx@9 | 9049 unsigned int v6; // ecx@9 |
9046 unsigned __int16 *v7; // edi@9 | 9050 unsigned __int16 *v7; // edi@9 |
9047 int j; // ecx@9 | 9051 int j; // ecx@9 |
9048 unsigned int screen_x; // qax@18 | 9052 // unsigned int screen_x; // qax@18 |
9049 HRESULT v14; // eax@21 | 9053 // HRESULT v14; // eax@21 |
9050 int v15; // edi@29 | 9054 // int v15; // edi@29 |
9051 signed __int64 v16; // qax@30 | 9055 // signed __int64 v16; // qax@30 |
9052 signed int v17; // edx@34 | 9056 // signed int v17; // edx@34 |
9053 unsigned __int16 *v18; // edi@36 | 9057 // unsigned __int16 *v18; // edi@36 |
9054 int k; // ecx@36 | 9058 // int k; // ecx@36 |
9055 DDSURFACEDESC2 Dst; // [sp+4h] [bp-A0h]@6 | 9059 DDSURFACEDESC2 Dst; // [sp+4h] [bp-A0h]@6 |
9056 unsigned __int16 *pPixels; // [sp+80h] [bp-24h]@1 | 9060 unsigned __int16 *pPixels; // [sp+80h] [bp-24h]@1 |
9057 float interval_x; // [sp+84h] [bp-20h]@1 | 9061 float interval_x; // [sp+84h] [bp-20h]@1 |
9058 unsigned __int16 *_this; // [sp+88h] [bp-1Ch]@21 | 9062 //unsigned __int16 *_this; // [sp+88h] [bp-1Ch]@21 |
9059 float interval_y; // [sp+8Ch] [bp-18h]@1 | 9063 float interval_y; // [sp+8Ch] [bp-18h]@1 |
9060 unsigned int screen_y; // [sp+90h] [bp-14h]@17 | 9064 // unsigned int screen_y; // [sp+90h] [bp-14h]@17 |
9061 int v28; // [sp+98h] [bp-Ch]@16 | 9065 // int v28; // [sp+98h] [bp-Ch]@16 |
9062 int v29; // [sp+9Ch] [bp-8h]@15 | 9066 // int v29; // [sp+9Ch] [bp-8h]@15 |
9063 | 9067 |
9064 interval_x = game_viewport_width / (double)width; | 9068 interval_x = game_viewport_width / (double)width; |
9065 interval_y = game_viewport_height / (double)height; | 9069 interval_y = game_viewport_height / (double)height; |
9066 | 9070 |
9067 pPixels = (unsigned __int16 *)malloc(2 * height * width); | 9071 pPixels = (unsigned __int16 *)malloc(2 * height * width); |
9324 //----- (00437C96) -------------------------------------------------------- | 9328 //----- (00437C96) -------------------------------------------------------- |
9325 void Render::do_draw_debug_line_d3d(const RenderVertexD3D3 *pLineBegin, signed int sDiffuseBegin, const RenderVertexD3D3 *pLineEnd, signed int sDiffuseEnd, float z_stuff) | 9329 void Render::do_draw_debug_line_d3d(const RenderVertexD3D3 *pLineBegin, signed int sDiffuseBegin, const RenderVertexD3D3 *pLineEnd, signed int sDiffuseEnd, float z_stuff) |
9326 { | 9330 { |
9327 double v6; // st7@2 | 9331 double v6; // st7@2 |
9328 //IDirect3DDevice3 *v7; // eax@2 | 9332 //IDirect3DDevice3 *v7; // eax@2 |
9329 HRESULT v8; // eax@2 | 9333 // HRESULT v8; // eax@2 |
9330 std::string v9; // [sp-18h] [bp-60h]@3 | 9334 std::string v9; // [sp-18h] [bp-60h]@3 |
9331 const char *v10; // [sp-Ch] [bp-54h]@2 | 9335 // const char *v10; // [sp-Ch] [bp-54h]@2 |
9332 const char *v11; // [sp-8h] [bp-50h]@2 | 9336 // const char *v11; // [sp-8h] [bp-50h]@2 |
9333 int v12; // [sp-4h] [bp-4Ch]@2 | 9337 // int v12; // [sp-4h] [bp-4Ch]@2 |
9334 RenderVertexD3D3 v13[2]; // [sp+8h] [bp-40h]@2 | 9338 RenderVertexD3D3 v13[2]; // [sp+8h] [bp-40h]@2 |
9335 | 9339 |
9336 //if ( pRenderer->pRenderD3D ) | 9340 //if ( pRenderer->pRenderD3D ) |
9337 { | 9341 { |
9338 v6 = 0.001 - z_stuff; | 9342 v6 = 0.001 - z_stuff; |