Mercurial > might-and-magic-trilogy
changeset 203:dacc9207809a
Слияние
author | Ritor1 |
---|---|
date | Thu, 03 Jan 2013 16:03:54 +0600 |
parents | b78cf60aaa8e (current diff) 11a199790ce0 (diff) |
children | 22730e77fa32 |
files | |
diffstat | 4 files changed, 130 insertions(+), 267 deletions(-) [+] |
line wrap: on
line diff
--- a/Render.cpp Thu Jan 03 16:03:46 2013 +0600 +++ b/Render.cpp Thu Jan 03 16:03:54 2013 +0600 @@ -907,8 +907,8 @@ float Render::DrawBezierTerrain() { //__debugbreak();Ritor1: it's temporarily - return 0; - /* + //return 0; + unsigned int v0; // ebx@1 unsigned int v1; // edi@1 unsigned int v2; // eax@1 @@ -1694,7 +1694,7 @@ } result = v126; pOutdoorCamera->field_40 = v126; - return result;*/ + return result; } // 47FFC4: inconsistent fpu stack // 4D864C: using guessed type char byte_4D864C; @@ -1824,8 +1824,8 @@ v3 = a1; v82 = edx0; - v83 = *(short *)(a3 + 4); - X = abs(*(short *)(a3 + 6)); + v83 = *(/*short **/_WORD *)(a3 + 4); + X = abs(*(/*short **/_WORD *)(a3 + 6)); v4 = 0; v88 = 0; v84 = v3 - 1; @@ -1836,8 +1836,8 @@ { while ( 1 ) { - v5 = abs(X); - v6 = abs(v83); + v5 = abs(X);//v5 = 13108 + v6 = abs(v83);//v6 = 13108 --X; v93 = &stru_76E5C8[(v5 << 7) + v6]; if ( !v93->field_0 || ((v7 = 48 * v4, v8 = &pVerticesSR_806210[v4], a2 = v8, !v82) ? (v9 = (RenderVertexSoft *)((char *)&pVerticesSR_801A10 + v7), @@ -2419,11 +2419,11 @@ Vec3_float_ *pNormalb; // [sp+C0h] [bp+8h]@77 v3 = a1; - v4 = *(short *)(a3 + 4); - v5 = *(short *)(a3 + 6); + //v4 = *(short *)(a3 + 4); + //v5 = *(short *)(a3 + 6); v85 = a2; - v86 = v4; - X = abs(v5); + v86 = *(_WORD *)(a3 + 4); //v4; + X = abs(*(_WORD *)(a3 + 6)); //v5 v6 = 0; v90 = 0; v81 = v3 - 1; @@ -9205,7 +9205,7 @@ //----- (004A5D33) -------------------------------------------------------- -void Render::_4A5D33(unsigned int a2, unsigned int a3, int a4, int a5, RGBTexture *pTexture) +void Render::_4A5D33(unsigned int pX, unsigned int pY, int a4, int a5, RGBTexture *pTexture) { Render *v6; // esi@1 unsigned __int16 *v7; // ebx@3 @@ -9227,7 +9227,7 @@ int v23; // edi@23 int v24; // [sp+Ch] [bp-4h]@3 int a2a; // [sp+18h] [bp+8h]@21 - unsigned int a3a; // [sp+1Ch] [bp+Ch]@20 + unsigned int teal; // [sp+1Ch] [bp+Ch]@20 int a4a; // [sp+20h] [bp+10h]@3 int a4b; // [sp+20h] [bp+10h]@21 unsigned __int16 *pTexturea; // [sp+28h] [bp+18h]@3 @@ -9235,7 +9235,7 @@ v6 = this; if ( this->uNumSceneBegins && pTexture ) { - v7 = &this->pTargetSurface[a2 + a3 * this->uTargetSurfacePitch]; + v7 = &this->pTargetSurface[pX + pY * this->uTargetSurfacePitch]; v8 = pTexture->uWidth; v24 = pTexture->uWidth; v9 = a4 + a5 * v8; @@ -9246,47 +9246,47 @@ if ( v6->bClip ) { v12 = v6->uClipX; - if ( (signed int)a2 < v12 ) - { - v13 = 2 * (v12 - a2); + if ( (signed int)pX < v12 ) + { + v13 = 2 * (v12 - pX); pTexturea = (unsigned __int16 *)((char *)pTexturea + v13); - v10 += a2 - v6->uClipX; + v10 += pX - v6->uClipX; v7 = (unsigned __int16 *)((char *)v7 + v13); a4a = v10; } v14 = v6->uClipY; - if ( (signed int)a3 < v14 ) - { - v15 = v14 - a3; + if ( (signed int)pY < v14 ) + { + v15 = v14 - pY; pTexturea += v24 * v15; - v11 += a3 - v6->uClipY; + v11 += pY - v6->uClipY; v10 = a4a; v7 += v6->uTargetSurfacePitch * v15; } v16 = v6->uClipX; - if ( (signed int)v16 < (signed int)a2 ) - v16 = a2; + if ( (signed int)v16 < (signed int)pX ) + v16 = pX; v17 = v6->uClipZ; if ( (signed int)(v10 + v16) > v17 ) { v18 = v6->uClipX; - if ( (signed int)v18 < (signed int)a2 ) - v18 = a2; + if ( (signed int)v18 < (signed int)pX ) + v18 = pX; a4a = v17 - v18; } v19 = v6->uClipY; - if ( (signed int)v19 < (signed int)a3 ) - v19 = a3; + if ( (signed int)v19 < (signed int)pY ) + v19 = pY; v20 = v6->uClipW; if ( (signed int)(v11 + v19) > v20 ) { v21 = v6->uClipY; - if ( (signed int)v21 < (signed int)a3 ) - v21 = a3; + if ( (signed int)v21 < (signed int)pY ) + v21 = pY; v11 = v20 - v21; } } - a3a = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0xFFu, 0xFFu); + teal = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0xFFu, 0xFFu); if ( v11 > 0 ) { v22 = a4a; @@ -9299,7 +9299,7 @@ v23 = v22; do { - if ( *pTexturea != a3a ) + if ( *pTexturea != teal ) *v7 = *pTexturea; ++pTexturea; ++v7; @@ -10341,7 +10341,6 @@ } - //----- (004A612A) -------------------------------------------------------- void Render::_4A612A(signed int uOutX, unsigned int uOutY, Texture *pTexture, int zVal) {
--- a/mm7_2.cpp Thu Jan 03 16:03:46 2013 +0600 +++ b/mm7_2.cpp Thu Jan 03 16:03:54 2013 +0600 @@ -12040,15 +12040,15 @@ //----- (004627B7) -------------------------------------------------------- void __cdecl MainMenu_Loop() { - GUIButton *v8; // eax@27 - unsigned int v9; // ecx@35 + GUIButton *pButton; // eax@27 + unsigned int pControlParam; // ecx@35 int v10; // ecx@36 int v11; // ecx@37 - unsigned int v12; // [sp-18h] [bp-54h]@39 - Texture *v13; // [sp-14h] [bp-50h]@39 - GUIButton *v14; // [sp+0h] [bp-3Ch]@27 - GUIWindow *v15; // [sp+4h] [bp-38h]@11 - + unsigned int pY; // [sp-18h] [bp-54h]@39 + Texture *pTexture; // [sp-14h] [bp-50h]@39 + GUIButton *pButton2; // [sp+0h] [bp-3Ch]@27 + GUIWindow *pWindow; // [sp+4h] [bp-38h]@11 + pCurrentScreen = 0; if (pAsyncMouse) pAsyncMouse->Resume(); @@ -12061,31 +12061,13 @@ if ( !pIcons_LOD->uNumPrevLoadedFiles ) pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles; pWindow_MainMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_MainMenu, 0, 0); - auto pNew = pIcons_LOD->LoadTexturePtr("title_new", TEXTURE_16BIT_PALETTE); - //v0 = pIcons_LOD->LoadTexture("title_new", TEXTURE_16BIT_PALETTE); - //v1 = (Texture *)(v0 != -1 ? &pIcons_LOD->pTextures[v0] : 0); pMainMenu_BtnNew = pWindow_MainMenu->CreateButton(495, 172, pNew->uTextureWidth, pNew->uTextureHeight, 1, 0, UIMSG_MainMenu_ShowPartyCreationWnd, 0, 78, "", pNew, 0); - //v2 = pIcons_LOD->LoadTexture("title_load", TEXTURE_16BIT_PALETTE); - //v3 = (Texture *)(v2 != -1 ? (int)&pIcons_LOD->pTextures[v2] : 0); auto pLoad = pIcons_LOD->LoadTexturePtr("title_load", TEXTURE_16BIT_PALETTE); - pMainMenu_BtnLoad = pWindow_MainMenu->CreateButton(495, 227, - pLoad->uTextureWidth, - pLoad->uTextureHeight, - 1, - 0, - UIMSG_MainMenu_ShowLoadWindow, - 1, - 76, - "", - pLoad, - 0); - //v4 = pIcons_LOD->LoadTexture("title_cred", TEXTURE_16BIT_PALETTE); - //v5 = (Texture *)(v4 != -1 ? (int)&pIcons_LOD->pTextures[v4] : 0); + pMainMenu_BtnLoad = pWindow_MainMenu->CreateButton(495, 227, pLoad->uTextureWidth, pLoad->uTextureHeight, 1, 0, UIMSG_MainMenu_ShowLoadWindow, + 1, 76, "", pLoad, 0); auto pCredits = pIcons_LOD->LoadTexturePtr("title_cred", TEXTURE_16BIT_PALETTE); pMainMenu_BtnCredits = pWindow_MainMenu->CreateButton(495, 282, pCredits->uTextureWidth, pCredits->uTextureHeight, 1, 0, UIMSG_ShowCredits, 2, 67, "", pCredits, 0); - //v6 = pIcons_LOD->LoadTexture("title_exit", TEXTURE_16BIT_PALETTE); - //v7 = (Texture *)(v6 != -1 ? (int)&pIcons_LOD->pTextures[v6] : 0); auto pExit = pIcons_LOD->LoadTexturePtr("title_exit", TEXTURE_16BIT_PALETTE); pMainMenu_BtnExit = pWindow_MainMenu->CreateButton(495, 337, pExit->uTextureWidth, pExit->uTextureHeight, 1, 0, UIMSG_ExitToWindows, 3, 0, "", pExit, 0); pTexture_PCX.Release(); @@ -12093,14 +12075,11 @@ SetCurrentMenuID(MENU_MAIN); SetForegroundWindow(hWnd); SendMessageW(hWnd, WM_ACTIVATEAPP, 1, 0); - while (GetCurrentMenuID() == MENU_MAIN || - GetCurrentMenuID() == MENU_SAVELOAD) + while (GetCurrentMenuID() == MENU_MAIN || GetCurrentMenuID() == MENU_SAVELOAD) { POINT pt; pMouse->GetCursorPos(&pt); - //uMouseX = pMouse->GetCursorPos(&v18)->x; - //uMouseY = pMouse->GetCursorPos(&v19)->y; - v15 = pWindow_MainMenu; + pWindow = pWindow_MainMenu; if ( GetCurrentMenuID() == MENU_SAVELOAD) { if ( pCurrentScreen != 12 ) @@ -12111,7 +12090,7 @@ pCurrentScreen = 12; GameUI_DrawLoadMenu(0); } - v15 = pGUIWindow_CurrentMenu; + pWindow = pGUIWindow_CurrentMenu; } MSG msg; @@ -12138,7 +12117,6 @@ pAsyncMouse->_46B736_consume_click_lists(1); if (GetCurrentMenuID() != MENU_MAIN) { -LABEL_45: if (GetCurrentMenuID() == MENU_LOAD) { pIcons_LOD->_4114F2(); @@ -12150,60 +12128,37 @@ } else { - if ( !ptr_507BDC ) - { - v8 = v15->pControlsHead; - v14 = v15->pControlsHead; - if ( v8 ) - { - while ( 1 ) - { - if ( pt.x >= (signed int)v8->uX - && pt.x <= (signed int)v8->uZ - && pt.y >= (signed int)v8->uY - && pt.y <= (signed int)v8->uW - && v15 == pWindow_MainMenu ) - { - v9 = v8->uControlParam; - if ( v9 ) - { - v10 = v9 - 1; - if ( v10 ) - { - v11 = v10 - 1; - if ( v11 ) - { - if ( v11 != 1 ) - goto LABEL_44; - v13 = pExit; - v12 = 337; - } - else - { - v13 = pCredits; - v12 = 282; - } - } - else - { - v13 = pLoad; - v12 = 227; - } - } - else - { - v13 = pNew; - v12 = 172; - } - pRenderer->DrawTextureIndexed(495u, v12, v13); - v8 = v14; - } -LABEL_44: - v14 = v8->pNext; - if ( !v14 ) - goto LABEL_45; - v8 = v8->pNext; - } + if ( !ptr_507BDC )// ??? + { + pButton = pWindow->pControlsHead; + for ( pButton = pWindow->pControlsHead; pButton; pButton = pButton->pNext ) + { + if ( pt.x >= (signed int)pButton->uX && pt.x <= (signed int)pButton->uZ + && pt.y >= (signed int)pButton->uY && pt.y <= (signed int)pButton->uW + && pWindow == pWindow_MainMenu ) + { + pControlParam = pButton->uControlParam; + switch (pControlParam) + { + case 0: + pTexture = pNew; + pY = 172; + break; + case 1: + pTexture = pLoad; + pY = 227; + break; + case 2: + pTexture = pCredits; + pY = 282; + break; + case 3: + pTexture = pExit; + pY = 337; + break; + } + pRenderer->DrawTextureIndexed(495, pY, pTexture); // + } } } }
--- a/mm7_4.cpp Thu Jan 03 16:03:46 2013 +0600 +++ b/mm7_4.cpp Thu Jan 03 16:03:54 2013 +0600 @@ -6128,39 +6128,32 @@ { char *v0; // eax@5 char *v1; // edi@5 - FILE *v2; // eax@5 - unsigned int v3; // esi@7 - GUIFont *v4; // edx@9 - GUIFont *v5; // ecx@9 - __int16 v6; // ax@9 + FILE *pFile; // eax@5 + unsigned int pSize; // esi@7 + GUIFont *pFont; // edx@9 + GUIFont *pFont2; // ecx@9 + __int16 pHeight; // ax@9 void *v7; // eax@9 - unsigned int v8; // ST2C_4@9 - unsigned int v9; // eax@9 + unsigned int pNumPixels; // ST2C_4@9 + unsigned int teal; // eax@9 unsigned int v10; // ST2C_4@19 - unsigned int teal; // eax@19 - //Texture v12; // [sp+Ch] [bp-130h]@5 - //RGBTexture v16; // [sp+54h] [bp-E8h]@1 - //double v15; // [sp+7Ch] [bp-C0h]@9 MSG Msg; // [sp+84h] [bp-B8h]@10 int v17; // [sp+A0h] [bp-9Ch]@9 - int a2; // [sp+A4h] [bp-98h]@9 - unsigned int a3; // [sp+A8h] [bp-94h]@9 + int pX; // [sp+A4h] [bp-98h]@9 + unsigned int pY; // [sp+A8h] [bp-94h]@9 int v20; // [sp+ACh] [bp-90h]@9 int a4; // [sp+B0h] [bp-8Ch]@9 - int a8; // [sp+F8h] [bp-44h]@9 - int a7; // [sp+FCh] [bp-40h]@9 - //RGBTexture v21; // [sp+100h] [bp-3Ch]@1 + int pColor2; // [sp+F8h] [bp-44h]@9 + int pColor1; // [sp+FCh] [bp-40h]@9 int a5; // [sp+128h] [bp-14h]@1 char *pString; // [sp+12Ch] [bp-10h]@9 char *ptr; // [sp+130h] [bp-Ch]@5 GUIFont *pFontQuick; // [sp+134h] [bp-8h]@1 GUIFont *pFontCChar; // [sp+138h] [bp-4h]@1 + RGBTexture pTexture; // [sp+54h] [bp-E8h]@1 + RGBTexture pTexture2; // [sp+100h] [bp-3Ch]@1 + Texture pTexture3; // [sp+Ch] [bp-130h]@5 - RGBTexture v16; // [sp+54h] [bp-E8h]@1 - //RGBTexture::RGBTexture(&v16); - RGBTexture v21; // [sp+100h] [bp-3Ch]@1 - //RGBTexture::RGBTexture(&v21); - a5 = 0; pFontQuick = LoadFont("quick.fnt", "FONTPAL", 0); pFontCChar = LoadFont("cchar.fnt", "FONTPAL", 0); @@ -6171,87 +6164,51 @@ pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles; dword_A74C88 = 0; pAudioPlayer->PlayMusicTrack(MUSIC_Credits); - v16.Load("mm6title.pcx", 0); + pTexture.Load("mm6title.pcx", 0); v0 = (char *)pEvents_LOD->LoadRaw("credits.txt", 0); v1 = v0; ptr = v0; - - Texture v12; // [sp+Ch] [bp-130h]@5 - //Texture::Texture(&v12); - - v2 = pEvents_LOD->FindContainer("credits.txt", 0); - if ( !v2 ) + pFile = pEvents_LOD->FindContainer("credits.txt", 0); + if ( !pFile ) Abortf(pGlobalTXT_LocalizationStrings[63]); // "Might and Magic VII is having trouble loading files. // Please re-install to fix this problem. Note: Re-installing will not destroy your save games." - fread(&v12, 1u, 0x30u, v2); - v3 = v12.uDecompressedSize; - if ( !v12.uDecompressedSize ) - v3 = v12.uTextureSize; - memset(&v12, 0, 0x48u); - v4 = pFontCChar; - v5 = pFontQuick; - v1[v3] = 0; + fread(&pTexture3, 1, 0x30, pFile); + pSize = pTexture3.uDecompressedSize; + if ( !pTexture3.uDecompressedSize ) + pSize = pTexture3.uTextureSize; + memset(&pTexture3, 0, 0x48); + pFont = pFontCChar; + pFont2 = pFontQuick; + v1[pSize] = 0; v20 = 250; a4 = 440; - a2 = 389; - a3 = 19; - v21.uWidth = 250; - v6 = v5->GetStringHeight2(v4, v1, (int)&a2, 0, 1); - v21.uHeight = v6 + 2 * a4; - v21.uNumPixels = (signed __int16)v21.uWidth * (signed __int16)v21.uHeight; - v7 = pAllocator->AllocNamedChunk(v21.pPixels, 2 * v21.uNumPixels, "scrollermap"); - v8 = v21.uNumPixels; - v21.pPixels = (unsigned __int16 *)v7; - v9 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0xFFu, 0xFFu); - fill_pixels_fast(v9, v21.pPixels, v8); - v21.field_20 = 0; - v21.field_22 = 0; - a7 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0x70u, 0x8Fu, 0xFEu); - a8 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xECu, 0xE6u, 0x9Cu); - pString = (char *)operator new(2 * v3); - strncpy(pString, ptr, v3); - pFontQuick->_44D2FD_prolly_draw_credits_entry( - pFontCChar, - 1, - a4 + 1, - (signed __int16)v21.uWidth, - (signed __int16)v21.uHeight, - 1u, - 1u, - pString, - v21.pPixels, - (signed __int16)v21.uWidth); - strncpy(pString, ptr, v3); - pFontQuick->_44D2FD_prolly_draw_credits_entry( - pFontCChar, - 0, - a4, - (signed __int16)v21.uWidth, - (signed __int16)v21.uHeight, - a7, - a8, - pString, - v21.pPixels, - (signed __int16)v21.uWidth); + pX = 389; + pY = 19; + pTexture2.uWidth = 250; + pHeight = pFont2->GetStringHeight2(pFont, v1, (int)&pX, 0, 1); + pTexture2.uHeight = pHeight + 2 * a4; + pTexture2.uNumPixels = (signed __int16)pTexture2.uWidth * (signed __int16)pTexture2.uHeight; + v7 = pAllocator->AllocNamedChunk(pTexture2.pPixels, 2 * pTexture2.uNumPixels, "scrollermap"); + pNumPixels = pTexture2.uNumPixels; + pTexture2.pPixels = (unsigned __int16 *)v7; + teal = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0xFFu, 0xFFu); + fill_pixels_fast(teal, pTexture2.pPixels, pNumPixels); + pTexture2.field_20 = 0; + pTexture2.field_22 = 0; + pColor1 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0x70u, 0x8Fu, 0xFEu); + pColor2 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xECu, 0xE6u, 0x9Cu); + pString = (char *)operator new(2 * pSize); + strncpy(pString, ptr, pSize); + pFontQuick->_44D2FD_prolly_draw_credits_entry(pFontCChar, 0, a4, (signed __int16)pTexture2.uWidth, (signed __int16)pTexture2.uHeight, pColor1, + pColor2, pString, pTexture2.pPixels, (signed __int16)pTexture2.uWidth); free(pString); pWindow_MainMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_MainMenu, 0, (int)ptr); pWindow_MainMenu->CreateButton(0, 0, 0, 0, 1, 0, 0x71u, 0, 0x1Bu, "", 0); - pCurrentScreen = 9; + pCurrentScreen = 9; // Credits SetCurrentMenuID(MENU_Credits); - pRenderer->BeginScene(); - pRenderer->DrawTextureRGB(0, 0, &v16); - pRenderer->Clip(a2, a3, a2 + v20, a3 + a4); - pRenderer->_4A5D33(a2, a3, 0, 0, &v21); - pRenderer->ResetClip(); - pRenderer->EndScene(); - pString = (char *)0x447A0000; - //v15 = 1000.0 + 6.7553994e15; - v17 = floorf(1000.0f + 0.5f);//(v15); - GetTickCount(); - pRenderer->Present(); do { - while ( PeekMessageA(&Msg, 0, 0, 0, 1u) ) + while ( PeekMessageA(&Msg, 0, 0, 0, 1) ) { if ( Msg.message == 18 ) Game_DeinitializeAndTerminate(0); @@ -6266,80 +6223,32 @@ { if (pAsyncMouse) pAsyncMouse->_46B736_consume_click_lists(1); - if ( dword_A74C88 ) - { - v16.Load("mm6title.pcx", 1); - v10 = v21.uNumPixels; - teal = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0xFFu, 0xFFu); - fill_pixels_fast(teal, v21.pPixels, v10); - strncpy(pTmpBuf, ptr, 0x7D0u); - pFontQuick->_44D2FD_prolly_draw_credits_entry( - pFontCChar, - 1, - a4 + 1, - (signed __int16)v21.uWidth, - (signed __int16)v21.uHeight, - 1u, - 1u, - pTmpBuf, - v21.pPixels, - (signed __int16)v21.uWidth); - strncpy(pTmpBuf, ptr, 0x7D0u); - pFontQuick->_44D2FD_prolly_draw_credits_entry( - pFontCChar, - 0, - a4, - (signed __int16)v21.uWidth, - (signed __int16)v21.uHeight, - a7, - a8, - pTmpBuf, - v21.pPixels, - (signed __int16)v21.uWidth); - dword_A74C88 = 0; - pRenderer->BeginScene(); - pRenderer->DrawTextureRGB(0, 0, &v16); - pRenderer->Clip(a2, a3, a2 + v20, a2 + a4); - pRenderer->_4A5D33(a2, a3, 0, a5, &v21); - pRenderer->ResetClip(); - pRenderer->EndScene(); - pRenderer->Present(); - } - timeGetTime(); pRenderer->BeginScene(); - pRenderer->DrawTextureRGB(0, 0, &v16); - pRenderer->Clip(a2, a3, a2 + v20, a3 + a4); - pRenderer->_4A5D33(a2, a3, 0, a5, &v21); + pRenderer->DrawTextureRGB(0, 0, &pTexture); + pRenderer->Clip(pX, pY, pX + v20, pY + a4); + pRenderer->_4A5D33(pX, pY, 0, a5, &pTexture2); pRenderer->ResetClip(); pRenderer->EndScene(); ++a5; - if ( a5 >= (signed __int16)v21.uHeight ) + if ( a5 >= (signed __int16)pTexture2.uHeight ) SetCurrentMenuID(MENU_MAIN); - timeGetTime(); pRenderer->Present(); + pCurrentScreen = 0;//Ritor1: temporarily, must be corrected GUI_MainMenuMessageProc() GUI_MainMenuMessageProc(); } } while ( GetCurrentMenuID() == MENU_Credits ); - GUI_MainMenuMessageProc(); - pRenderer->BeginScene(); - GUI_UpdateWindows(); - pRenderer->EndScene(); - pRenderer->Present(); pAudioPlayer->_4AA258(1); pAllocator->FreeChunk(ptr); pAllocator->FreeChunk(pFontQuick); pAllocator->FreeChunk(pFontCChar); pWindow_MainMenu->Release(); pIcons_LOD->_4114F2(); - v16.Release(); - v21.Release(); + pTexture.Release(); + pTexture2.Release(); return MENU_MAIN; // return MENU_Main } - - - //----- (0049B04D) -------------------------------------------------------- int stru154::_49B04D(ODMFace *a2, BSPVertexBuffer *a3) {