Mercurial > mm7
changeset 24:352b15291822
18.01.13 (PlaySound work)
author | Ritor1 |
---|---|
date | Fri, 18 Jan 2013 17:30:54 +0600 |
parents | 75d706037de4 |
children | 34192c501dfe 968e681bcceb |
files | AIL.cpp AudioPlayer.cpp AudioPlayer.h GUIFont.cpp GUIWindow.cpp Player.cpp mm7_1.cpp mm7_2.cpp mm7_5.cpp |
diffstat | 9 files changed, 168 insertions(+), 515 deletions(-) [+] |
line wrap: on
line diff
--- a/AIL.cpp Fri Jan 18 09:44:49 2013 +0600 +++ b/AIL.cpp Fri Jan 18 17:30:54 2013 +0600 @@ -238,7 +238,7 @@ int __stdcall AIL_release_sample_handle(void *a1) { - __asm int 3 + //__asm int 3 return 0; } @@ -250,20 +250,20 @@ int __stdcall AIL_close_3D_provider(HPROVIDER) { - __asm int 3 + //__asm int 3 return 0; } int __stdcall AIL_redbook_close(HREDBOOK a1) { - __asm int 3 + //__asm int 3 return 0; } // sub_4D8344: using guessed type int __stdcall AIL_shutdown(); int __stdcall AIL_shutdown() { - __asm int 3 + //__asm int 3 return 0; }
--- a/AudioPlayer.cpp Fri Jan 18 09:44:49 2013 +0600 +++ b/AudioPlayer.cpp Fri Jan 18 17:30:54 2013 +0600 @@ -737,6 +737,7 @@ int v102; // [sp+90h] [bp+1Ch]@60 int v103; // [sp+90h] [bp+1Ch]@68 + uVolume = 120; //Ritor1:It's temporary pAudioPlayer = this; v35 = this->bPlayerReady == 0; //pAudioPlayer = this; @@ -2099,7 +2100,7 @@ char v4; // dl@5 int v5; // ebx@6 AudioPlayer_3DSample *p3DSample; // edi@7 - int v7; // edx@14 + //int v7; // edx@14 int v8; // ecx@14 void *v9; // ecx@15 @@ -2124,7 +2125,7 @@ if ( ReadWindowsRegistryInt("Disable3DSound", 0) != 1 ) { v5 = 0; - pAudioPlayer->CheckA3DSupport(v4); + pAudioPlayer->CheckA3DSupport(0);// pAudioPlayer->CheckA3DSupport(v4); if ( pAudioPlayer->uNum3DSamples > 0 ) { p3DSample = pAudioPlayer->p3DSamples; @@ -2146,10 +2147,11 @@ pAudioPlayer->h3DSoundProvider = 0; } } + v8 = (int)&pAudioPlayer->hAILRedbook; if ( pAudioPlayer->hAILRedbook ) { AIL_redbook_stop(pAudioPlayer->hAILRedbook); - AIL_redbook_set_volume((HREDBOOK)v8, v7); + AIL_redbook_set_volume((HREDBOOK)v8, pAudioPlayer->sRedbookVolume); AIL_redbook_close(pAudioPlayer->hAILRedbook); } AIL_shutdown(); @@ -2514,20 +2516,20 @@ //----- (004A96BE) -------------------------------------------------------- void ReleaseSoundData(void *_this) { - int v1; // esi@1 + int pID; // esi@1 char *v2; // eax@1 - v1 = 0; + pID = 0; v2 = (char *)&pSounds[0].pSoundData; while ( *(void **)v2 != _this ) { v2 += 128; - ++v1; + ++pID; if ( (signed int)v2 >= (signed int)&pAudioPlayer->p3DSamples[6].field_8 ) return; } pAllocator->FreeChunk(_this); - memset(&pSounds[v1], 0, 0x80u); + memset(&pSounds[pID], 0, 0x80u); } //----- (004A96FF) -------------------------------------------------------- @@ -2639,7 +2641,10 @@ FindSound_BinSearch(0, pAudioPlayer->uNumSoundHeaders, pSoundName_); if ( uFindSound_BinSearch_ResultID == -1 ) - goto LABEL_22; + { + result = 0; + return result; + } v6 = &pAudioPlayer->pSoundHeaders[uFindSound_BinSearch_ResultID]; pDecompressedSize = &v6->uDecompressedSize; v8 = v6->uDecompressedSize; @@ -2684,7 +2689,7 @@ while ( *(int *)v13 ); uLastLoadedSoundID = v12; } - v16 = pSounds[v12].field_4; + v16 = pSounds[v12].SoundName; strcpy((char *)v16, pSoundName_); v14 = uLastLoadedSoundID++ << 7; pSoundList->uTotalLoadedSoundSize += v11; @@ -2693,7 +2698,6 @@ } else { -LABEL_22: result = 0; } return result;
--- a/AudioPlayer.h Fri Jan 18 09:44:49 2013 +0600 +++ b/AudioPlayer.h Fri Jan 18 17:30:54 2013 +0600 @@ -271,7 +271,7 @@ struct Sound { unsigned int uID; - char field_4[120]; + char SoundName[120]; SoundData *pSoundData; }; #pragma pack(pop)
--- a/GUIFont.cpp Fri Jan 18 09:44:49 2013 +0600 +++ b/GUIFont.cpp Fri Jan 18 17:30:54 2013 +0600 @@ -624,37 +624,43 @@ //----- (0044C51E) -------------------------------------------------------- int GUIFont::GetLineWidth(const char *pString) { - GUIFont *v2; // edi@1 - size_t v4; // ebp@3 + GUIFont *pFont; // edi@1 + size_t pNumLen; // ebp@3 int v5; // esi@3 signed int i; // ebx@3 unsigned __int8 v7; // cl@4 - const char *v8; // [sp+0h] [bp-4h]@1 + const char *pStr; // [sp+0h] [bp-4h]@1 - v8 = pString; - v2 = this; - if ( !pString ) + pStr = pString; + pFont = this; + if ( !pString ) // == 0 return 0; - v4 = strlen(pString); + pNumLen = strlen(pString); v5 = 0; - for ( i = 0; i < (signed int)v4; ++i ) + for ( i = 0; i < (signed int)pNumLen; ++i ) { - if ( IsCharValid(v7 = v8[i]) ) + if ( IsCharValid(v7 = pStr[i]) ) { if ( v7 < 9u ) - goto LABEL_9; + { + if ( i > 0 ) + v5 += pFont->pMetrics[v7].uLeftSpacing; + v5 += *((int *)&pFont->cFirstChar + 3 * v7 + 9); + if ( i < (signed int)pNumLen ) + v5 += pFont->pMetrics[v7].uRightSpacing; + continue; + } if ( v7 <= 0xAu ) return v5; if ( v7 != '\f' ) { if ( v7 == '\r' ) return v5; -LABEL_9: if ( i > 0 ) - v5 += v2->pMetrics[v7].uLeftSpacing; - v5 += *((int *)&v2->cFirstChar + 3 * v7 + 9); - if ( i < (signed int)v4 ) - v5 += v2->pMetrics[v7].uRightSpacing; + v5 += pFont->pMetrics[v7].uLeftSpacing; + v5 += *((int *)&pFont->cFirstChar + 3 * v7 + 9); + if ( i < (signed int)pNumLen ) + v5 += pFont->pMetrics[v7].uRightSpacing; continue; } i += 5;
--- a/GUIWindow.cpp Fri Jan 18 09:44:49 2013 +0600 +++ b/GUIWindow.cpp Fri Jan 18 17:30:54 2013 +0600 @@ -481,35 +481,13 @@ if ( v1->ptr_1C == (void *)177 ) { byte_506360 = 0; - pTexture_CurrentBook = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("lb_bordr", TEXTURE_16BIT_PALETTE)]; + pTexture_CurrentBook = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("lb_bordr", TEXTURE_16BIT_PALETTE)]; pTexture_LloydBeacons[0] = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("sbmap", TEXTURE_16BIT_PALETTE)]; - pTexture_50635C = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("sbmap", TEXTURE_16BIT_PALETTE)]; + pTexture_50635C = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("sbmap", TEXTURE_16BIT_PALETTE)]; pTex_tab_an_6b__zoom_on = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-6b", TEXTURE_16BIT_PALETTE)]; pTex_tab_an_6a__zoom_off = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-6a", TEXTURE_16BIT_PALETTE)]; - pBtn_Book_1 = v1->CreateButton( - 415u, - 13u, - 39u, - 36u, - 1, - 0, - 0xB2u, - 0, - 0, - pGlobalTXT_LocalizationStrings[375], - 0); - pBtn_Book_2 = v1->CreateButton( - 415u, - 48u, - 39u, - 36u, - 1, - 0, - 0xB2u, - 1u, - 0, - pGlobalTXT_LocalizationStrings[523], - 0); + pBtn_Book_1 = v1->CreateButton(415, 13, 39, 36, 1, 0, 0xB2u, 0, 0, pGlobalTXT_LocalizationStrings[375], 0); + pBtn_Book_2 = v1->CreateButton(415, 48, 39, 36, 1, 0, 0xB2u, 1, 0, pGlobalTXT_LocalizationStrings[523], 0); v17 = &pParty->pPlayers[_506348_current_lloyd_playerid]; v23 = 1; v18 = v17->pActiveSkills[14]; @@ -527,18 +505,7 @@ { do { - v1->CreateButton( - pLloydsBeaconsPreviewXs[v19], - pLloydsBeaconsPreviewYs[v19], - 0x5Cu, - 0x44u, - 1, - 180, - 0xB3u, - v19, - 0, - "", - 0); + v1->CreateButton(pLloydsBeaconsPreviewXs[v19], pLloydsBeaconsPreviewYs[v19], 0x5Cu, 0x44u, 1, 180, 0xB3u, v19, 0, "", 0); ++v19; } while ( (signed int)v19 < v23 ); @@ -560,28 +527,17 @@ { if ( v1->ptr_1C == (void *)195 ) { - pTexture_CurrentBook = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("townport", TEXTURE_16BIT_PALETTE)]; - pTexture_TownPortalHarmn = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tpharmndy", TEXTURE_16BIT_PALETTE)]; - pTexture_TownPortalElf = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tpelf", TEXTURE_16BIT_PALETTE)]; + pTexture_CurrentBook = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("townport", TEXTURE_16BIT_PALETTE)]; + pTexture_TownPortalHarmn = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tpharmndy", TEXTURE_16BIT_PALETTE)]; + pTexture_TownPortalElf = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tpelf", TEXTURE_16BIT_PALETTE)]; pTexture_TownPortalWarlock = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tpwarlock", TEXTURE_16BIT_PALETTE)]; - pTexture_TownPortalIsland = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tpisland", TEXTURE_16BIT_PALETTE)]; - pTexture_TownPortalHeaven = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tpheaven", TEXTURE_16BIT_PALETTE)]; + pTexture_TownPortalIsland = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tpisland", TEXTURE_16BIT_PALETTE)]; + pTexture_TownPortalHeaven = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tpheaven", TEXTURE_16BIT_PALETTE)]; v16 = 0; - pTexture_TownPortalHell = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture( "tphell", TEXTURE_16BIT_PALETTE)]; + pTexture_TownPortalHell = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture( "tphell", TEXTURE_16BIT_PALETTE)]; do { - v1->CreateButton( - pTownPortalBook_xs[v16], - pTownPortalBook_ys[v16], - pTownPortalBook_ws[v16], - pTownPortalBook_hs[v16], - 1, - 182, - 0xB7u, - v16, - 0, - "", - 0); + v1->CreateButton(pTownPortalBook_xs[v16], pTownPortalBook_ys[v16], pTownPortalBook_ws[v16], pTownPortalBook_hs[v16], 1, 182, 0xB7u, v16, 0, "", 0); ++v16; } while ( (signed int)v16 < 6 ); @@ -590,38 +546,18 @@ { if ( v1->ptr_1C == (void *)200 ) { - pTexture_CurrentBook = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture( "sbquiknot", TEXTURE_16BIT_PALETTE)]; - pTextures_5064A0[10] = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture( "divbar", TEXTURE_16BIT_PALETTE)]; - pTex_tab_an_6b__zoom_on = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-6b", TEXTURE_16BIT_PALETTE)]; - pTex_tab_an_7b__zoot_on = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-7b", TEXTURE_16BIT_PALETTE)]; + pTexture_CurrentBook = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture( "sbquiknot", TEXTURE_16BIT_PALETTE)]; + pTextures_5064A0[10] = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture( "divbar", TEXTURE_16BIT_PALETTE)]; + pTex_tab_an_6b__zoom_on = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-6b", TEXTURE_16BIT_PALETTE)]; + pTex_tab_an_7b__zoot_on = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-7b", TEXTURE_16BIT_PALETTE)]; pTex_tab_an_6a__zoom_off = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-6a", TEXTURE_16BIT_PALETTE)]; pTex_tab_an_7a__zoot_off = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-7a", TEXTURE_16BIT_PALETTE)]; - pBtn_Book_1 = v1->CreateButton( - pViewport->uViewportX + 398, - pViewport->uViewportY + 1, - pTex_tab_an_6b__zoom_on->uTextureWidth, - pTex_tab_an_6b__zoom_on->uTextureHeight, - 1, - 0, - 0x47u, - 0xBu, - 0, - pGlobalTXT_LocalizationStrings[192],// "Scroll Up" - pTex_tab_an_6b__zoom_on, - 0); - pBtn_Book_2 = v1->CreateButton( - pViewport->uViewportX + 398, - pViewport->uViewportY + 38, - pTex_tab_an_7b__zoot_on->uTextureHeight, - pTex_tab_an_7b__zoot_on->uTextureHeight, - 1, - 0, - 0x47u, - 0xAu, - 0, - pGlobalTXT_LocalizationStrings[193],// "Scroll Down" - pTex_tab_an_7b__zoot_on, - 0); + pBtn_Book_1 = v1->CreateButton(pViewport->uViewportX + 398, pViewport->uViewportY + 1, pTex_tab_an_6b__zoom_on->uTextureWidth, + pTex_tab_an_6b__zoom_on->uTextureHeight, 1, 0, 0x47u, 0xBu, 0, pGlobalTXT_LocalizationStrings[192],// "Scroll Up" + pTex_tab_an_6b__zoom_on, 0); + pBtn_Book_2 = v1->CreateButton(pViewport->uViewportX + 398, pViewport->uViewportY + 38, pTex_tab_an_7b__zoot_on->uTextureHeight, + pTex_tab_an_7b__zoot_on->uTextureHeight, 1, 0, 0x47u, 0xAu, 0, pGlobalTXT_LocalizationStrings[193],// "Scroll Down" + pTex_tab_an_7b__zoot_on, 0); dword_506520 = 0; memset(&pStru179, 0, 0xFA0u); for ( i = dword_506528; i < 512; ++i ) @@ -656,110 +592,22 @@ pTexture_506370 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-4a", TEXTURE_16BIT_PALETTE)]; pTexture_50636C = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-8b", TEXTURE_16BIT_PALETTE)]; pTexture_506368 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-8a", TEXTURE_16BIT_PALETTE)]; - pBtn_Book_1 = v1->CreateButton( - pViewport->uViewportX + 398, - pViewport->uViewportY + 1, - 0x32u, - 0x22u, - 1, - 0, - 0x47u, - 0xBu, - 0, - pGlobalTXT_LocalizationStrings[193], - pTex_tab_an_6b__zoom_on, - 0); - pBtn_Book_2 = v1->CreateButton( - pViewport->uViewportX + 398, - pViewport->uViewportY + 38, - 0x32u, - 0x22u, - 1, - 0, - 0x47u, - 0xAu, - 0, - pGlobalTXT_LocalizationStrings[192], - pTex_tab_an_7b__zoot_on, - 0); - pBtn_Book_3 = v1->CreateButton( - pViewport->uViewportX + 398, - pViewport->uViewportY + 113, - 0x32u, - 0x22u, - 1, - 0, - 0x47u, - 2u, - 0, - pGlobalTXT_LocalizationStrings[85],// "Potion Notes" - pTexture_506394, - 0); - pBtn_Book_4 = v1->CreateButton( - pViewport->uViewportX + 399, - pViewport->uViewportY + 150, - 0x32u, - 0x22u, - 1, - 0, - 0x47u, - 3u, - 0, - pGlobalTXT_LocalizationStrings[137],// "Fountain Notes" - pTexture_50638C, - 0); - pBtn_Book_5 = v1->CreateButton( - pViewport->uViewportX + 397, - pViewport->uViewportY + 188, - 0x32u, - 0x22u, - 1, - 0, - 0x47u, - 4u, - 0, - pGlobalTXT_LocalizationStrings[8],// "Obelisk Notes" - pTexture_506384, - 0); - pBtn_Book_6 = v1->CreateButton( - pViewport->uViewportX + 397, - pViewport->uViewportY + 226, - 0x32u, - 0x22u, - 1, - 0, - 0x47u, - 5u, - 0, - pGlobalTXT_LocalizationStrings[141],// "Seer Notes" - pTexture_50637C, - 0); - pBtn_Autonotes_Misc = v1->CreateButton( - pViewport->uViewportX + 397, - pViewport->uViewportY + 264, - 0x32u, - 0x22u, - 1, - 0, - 0x47u, - 6u, - 0, - pGlobalTXT_LocalizationStrings[123],// "Miscellaneous Notes" - pTexture_506374, - 0); - v9 = v1->CreateButton( - pViewport->uViewportX + 397, - pViewport->uViewportY + 302, - 0x32u, - 0x22u, - 1, - 0, - 0x47u, - 7u, - 0, - pGlobalTXT_LocalizationStrings[662],// "Instructors" - pTexture_50636C, - 0); + pBtn_Book_1 = v1->CreateButton(pViewport->uViewportX + 398, pViewport->uViewportY + 1, 0x32u, 0x22u, 1, 0, 0x47u, 0xBu, 0, + pGlobalTXT_LocalizationStrings[193], pTex_tab_an_6b__zoom_on, 0); + pBtn_Book_2 = v1->CreateButton(pViewport->uViewportX + 398, pViewport->uViewportY + 38, 0x32u, 0x22u, 1, 0, 0x47u, 0xAu, 0, + pGlobalTXT_LocalizationStrings[192], pTex_tab_an_7b__zoot_on, 0); + pBtn_Book_3 = v1->CreateButton(pViewport->uViewportX + 398, pViewport->uViewportY + 113, 0x32u, 0x22u, 1, 0, 0x47u, 2u, 0, + pGlobalTXT_LocalizationStrings[85], pTexture_506394, 0);// "Potion Notes" + pBtn_Book_4 = v1->CreateButton(pViewport->uViewportX + 399, pViewport->uViewportY + 150, 0x32u, 0x22u, 1, 0, 0x47u, 3u, 0, + pGlobalTXT_LocalizationStrings[137], pTexture_50638C, 0);// "Fountain Notes" + pBtn_Book_5 = v1->CreateButton(pViewport->uViewportX + 397, pViewport->uViewportY + 188, 0x32u, 0x22u, 1, 0, 0x47u, 4u, 0, + pGlobalTXT_LocalizationStrings[8], pTexture_506384, 0);// "Obelisk Notes" + pBtn_Book_6 = v1->CreateButton(pViewport->uViewportX + 397, pViewport->uViewportY + 226, 0x32u, 0x22u, 1, 0, 0x47u, 5u, 0, + pGlobalTXT_LocalizationStrings[141], pTexture_50637C, 0);// "Seer Notes" + pBtn_Autonotes_Misc = v1->CreateButton(pViewport->uViewportX + 397, pViewport->uViewportY + 264, 0x32u, 0x22u, 1, 0, 0x47u, 6u, 0, + pGlobalTXT_LocalizationStrings[123], pTexture_506374, 0);// "Miscellaneous Notes" + v9 = v1->CreateButton(pViewport->uViewportX + 397, pViewport->uViewportY + 302, 0x32u, 0x22u, 1, 0, 0x47u, 7u, 0, + pGlobalTXT_LocalizationStrings[662], pTexture_50636C, 0);// "Instructors" v10 = dword_506528; pBtn_Autonotes_Instructors = v9; dword_506520 = 0; @@ -785,9 +633,9 @@ if ( v1->ptr_1C == (void *)202 ) { dword_506364 = 1; - pTextures_5064A0[12] = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("sbmap", TEXTURE_16BIT_PALETTE)]; - pTex_tab_an_6b__zoom_on = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("zoom-on", TEXTURE_16BIT_PALETTE)]; - pTex_tab_an_7b__zoot_on = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("zoot-on", TEXTURE_16BIT_PALETTE)]; + pTextures_5064A0[12] = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("sbmap", TEXTURE_16BIT_PALETTE)]; + pTex_tab_an_6b__zoom_on = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("zoom-on", TEXTURE_16BIT_PALETTE)]; + pTex_tab_an_7b__zoot_on = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("zoot-on", TEXTURE_16BIT_PALETTE)]; pTex_tab_an_6a__zoom_off = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("zoom-off", TEXTURE_16BIT_PALETTE)]; pTex_tab_an_7a__zoot_off = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("zoot-off", TEXTURE_16BIT_PALETTE)]; pTexture_506394 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tabNon", TEXTURE_16BIT_PALETTE)]; @@ -798,84 +646,18 @@ pTexture_506380 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tabEoff", TEXTURE_16BIT_PALETTE)]; pTexture_50637C = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tabWon", TEXTURE_16BIT_PALETTE)]; pTexture_506378 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tabWoff", TEXTURE_16BIT_PALETTE)]; - pBtn_Book_1 = v1->CreateButton( - pViewport->uViewportX + 398, - pViewport->uViewportY + 1, - 0x32u, - 0x22u, - 1, - 0, - 0x47u, - 0, - 0, - pGlobalTXT_LocalizationStrings[251],// "Zoom In" - pTex_tab_an_6b__zoom_on, - 0); - pBtn_Book_2 = v1->CreateButton( - pViewport->uViewportX + 398, - pViewport->uViewportY + 38, - 0x32u, - 0x22u, - 1, - 0, - 0x47u, - 1u, - 0, - pGlobalTXT_LocalizationStrings[252],// "Zoom Out" - pTex_tab_an_7b__zoot_on, - 0); - pBtn_Book_3 = v1->CreateButton( - pViewport->uViewportX + 397, - pViewport->uViewportY + 113, - 0x32u, - 0x22u, - 1, - 0, - 0x47u, - 2u, - 0, - pGlobalTXT_LocalizationStrings[192],// Scroll Up - (Texture *)"", - 0); - pBtn_Book_4 = v1->CreateButton( - pViewport->uViewportX + 397, - pViewport->uViewportY + 150, - 0x32u, - 0x22u, - 1, - 0, - 0x47u, - 3u, - 0, - pGlobalTXT_LocalizationStrings[193],// Scroll Down - (Texture *)"", - 0); - pBtn_Book_5 = v1->CreateButton( - pViewport->uViewportX + 397, - pViewport->uViewportY + 188, - 0x32u, - 0x22u, - 1, - 0, - 0x47u, - 4u, - 0, - pGlobalTXT_LocalizationStrings[573],// "Scroll Right" - (Texture *)"", - 0); - pBtn_Book_6 = v1->CreateButton( - pViewport->uViewportX + 397, - pViewport->uViewportY + 226, - 0x32u, - 0x22u, - 1, - 0, - 0x47u, - 5u, - 0, - pGlobalTXT_LocalizationStrings[572],// "Scroll Left" - (Texture *)"", - 0); + pBtn_Book_1 = v1->CreateButton(pViewport->uViewportX + 398, pViewport->uViewportY + 1, 0x32u, 0x22u, 1, 0, 0x47u, 0, 0, + pGlobalTXT_LocalizationStrings[251], pTex_tab_an_6b__zoom_on, 0);// "Zoom In" + pBtn_Book_2 = v1->CreateButton(pViewport->uViewportX + 398, pViewport->uViewportY + 38, 0x32u, 0x22u, 1, 0, 0x47u, 1, 0, + pGlobalTXT_LocalizationStrings[252], pTex_tab_an_7b__zoot_on, 0);// "Zoom Out" + pBtn_Book_3 = v1->CreateButton(pViewport->uViewportX + 397, pViewport->uViewportY + 113, 0x32u, 0x22u, 1, 0, 0x47u, 2, 0, + pGlobalTXT_LocalizationStrings[192], (Texture *)"", 0);// Scroll Up + pBtn_Book_4 = v1->CreateButton(pViewport->uViewportX + 397, pViewport->uViewportY + 150, 0x32u, 0x22u, 1, 0, 0x47u, 3, 0, + pGlobalTXT_LocalizationStrings[193], (Texture *)"", 0);// Scroll Down + pBtn_Book_5 = v1->CreateButton(pViewport->uViewportX + 397, pViewport->uViewportY + 188, 0x32u, 0x22u, 1, 0, 0x47u, 4, 0, + pGlobalTXT_LocalizationStrings[573], (Texture *)"", 0);// "Scroll Right" + pBtn_Book_6 = v1->CreateButton(pViewport->uViewportX + 397, pViewport->uViewportY + 226, 0x32u, 0x22u, 1, 0, 0x47u, 5, 0, + pGlobalTXT_LocalizationStrings[572], (Texture *)"", 0);// "Scroll Left" return; } if ( v1->ptr_1C == (void *)203 ) @@ -964,7 +746,7 @@ v22 += 12; ++v3; ++v24; - __debugbreak(); // fix condition + //__debugbreak(); // fix condition } while ( (signed int)v22 < (signed int)&pFactionTable->relations + 8 ); } @@ -1766,8 +1548,8 @@ //----- (0044CB4F) -------------------------------------------------------- int GUIWindow::DrawTextInRect(GUIFont *a2, unsigned int uX, unsigned int uY, unsigned int uColor, const char *Str1, int Source, int a8) { - GUIFont *v8; // edi@1 - int v9; // ebx@1 + GUIFont *pFont; // edi@1 + int pLineWidth; // ebx@1 int v11; // esi@3 unsigned __int8 v12; // cl@7 signed int v13; // esi@19 @@ -1787,37 +1569,44 @@ char v27; // [sp+11h] [bp-1Bh]@35 int v28; // [sp+20h] [bp-Ch]@17 GUIWindow *pWindow; // [sp+24h] [bp-8h]@1 - size_t v30; // [sp+28h] [bp-4h]@1 + size_t pNumLen; // [sp+28h] [bp-4h]@1 size_t Str1a; // [sp+40h] [bp+14h]@5 size_t Str1b; // [sp+40h] [bp+14h]@19 const char *Sourcea; // [sp+44h] [bp+18h]@20 int v34; // [sp+48h] [bp+1Ch]@26 - v8 = a2; + pFont = a2; pWindow = this; - v30 = strlen(Str1); - v9 = v8->GetLineWidth(Str1); - if ( v9 < Source ) + pNumLen = strlen(Str1); + pLineWidth = pFont->GetLineWidth(Str1); + if ( pLineWidth < Source ) { - pWindow->DrawText(v8, uX, uY, uColor, Str1, 0, 0, 0); - return v9; + pWindow->DrawText(pFont, uX, uY, uColor, Str1, 0, 0, 0); + return pLineWidth; } strcpy(pTmpBuf2, Str1); v11 = 0; if ( a8 ) _strrev(pTmpBuf2); Str1a = 0; - if ( (signed int)v30 > 0 ) + if ( (signed int)pNumLen > 0 ) { do { if ( v11 >= Source ) break; - if ( v8->IsCharValid(pTmpBuf2[Str1a]) ) + if ( pFont->IsCharValid(v12 = pTmpBuf2[Str1a]) ) { if ( v12 < 9u ) - goto LABEL_12; - if ( v12 > 0xAu ) + { + if ( (signed int)Str1a > 0 ) + v11 += pFont->pMetrics[v12].uLeftSpacing; + v11 += *((int *)&pFont->cFirstChar + 3 * v12 + 9); + if ( (signed int)Str1a < (signed int)pNumLen ) + v11 += pFont->pMetrics[v12].uRightSpacing; + goto LABEL_16; + } + if ( v12 > 0xAu )//10 { if ( v12 == 12 ) { @@ -1827,13 +1616,11 @@ { if ( v12 != 13 ) { -LABEL_12: if ( (signed int)Str1a > 0 ) - v11 += v8->pMetrics[v12].uLeftSpacing; - v11 += *((int *)&v8->cFirstChar + 3 * v12 + 9); - if ( (signed int)Str1a < (signed int)v30 ) - v11 += v8->pMetrics[v12].uRightSpacing; - goto LABEL_16; + v11 += pFont->pMetrics[v12].uLeftSpacing; + v11 += *((int *)&pFont->cFirstChar + 3 * v12 + 9); + if ( (signed int)Str1a < (signed int)pNumLen ) + v11 += pFont->pMetrics[v12].uRightSpacing; } } } @@ -1841,76 +1628,61 @@ LABEL_16: ++Str1a; } - while ( (signed int)Str1a < (signed int)v30 ); + while ( (signed int)Str1a < (signed int)pNumLen ); } pTmpBuf[Str1a + 1999] = 0; - v30 = strlen(pTmpBuf2); - v28 = v8->GetLineWidth(pTmpBuf2); + pNumLen = strlen(pTmpBuf2); + v28 = pFont->GetLineWidth(pTmpBuf2); if ( a8 ) _strrev(pTmpBuf2); Str1b = 0; v13 = uX + pWindow->uFrameX; v14 = uY + pWindow->uFrameY; - if ( (signed int)v30 > 0 ) + if ( (signed int)pNumLen > 0 ) { Sourcea = &pTmpBuf2[1]; do { - if ( v8->IsCharValid(pTmpBuf2[Str1b]) ) + if ( pFont->IsCharValid(v15 = pTmpBuf2[Str1b]) ) { v16 = v15; v17 = v15 - 9; - if ( v17 ) + if ( v17 )//>0 { v18 = v17 - 1; - if ( v18 ) + if ( v18 )//>0 { v19 = v18 - 2; - if ( v19 ) + if ( v19 )//>0 { - if ( v19 == 1 ) + if ( v19 == 1 )//v15 == 13 { strncpy(&Str, Sourcea, 3u); v26 = 0; Str1b += 3; Sourcea += 3; v22 = atoi(&Str); - v23 = v8->GetLineWidth(&pTmpBuf2[Str1b]); + v23 = pFont->GetLineWidth(&pTmpBuf2[Str1b]); v13 = pWindow->uFrameZ - v23 - v22; v14 = uY; } - else + else//v15 > 13 { - v20 = *((int *)&v8->cFirstChar + 3 * v16 + 9); - v34 = *((int *)&v8->cFirstChar + 3 * v16 + 9); + v20 = *((int *)&pFont->cFirstChar + 3 * v16 + 9); + v34 = *((int *)&pFont->cFirstChar + 3 * v16 + 9); if ( (signed int)Str1b > 0 ) - v13 += v8->pMetrics[v16].uLeftSpacing; - v21 = (int)((char *)&v8[1] + v8->field_C20[v16]); + v13 += pFont->pMetrics[v16].uLeftSpacing; + v21 = (int)((char *)&pFont[1] + pFont->field_C20[v16]); if ( (short)uColor ) - pRenderer->DrawText( - v13, - v14, - (unsigned __int8 *)v21, - v20, - LOBYTE(v8->uFontHeight), - v8->pFontPalettes[0], - uColor, - 0); + pRenderer->DrawText(v13, v14, (unsigned __int8 *)v21, v20, LOBYTE(pFont->uFontHeight), pFont->pFontPalettes[0], uColor, 0); else - pRenderer->DrawTextPalette( - v13, - v14, - v21, - v20, - LOBYTE(v8->uFontHeight), - v8->pFontPalettes[0], - 0); + pRenderer->DrawTextPalette(v13, v14, v21, v20, LOBYTE(pFont->uFontHeight), pFont->pFontPalettes[0], 0); v13 += v34; - if ( (signed int)Str1b < (signed int)v30 ) - v13 += v8->pMetrics[(unsigned __int8)pTmpBuf2[Str1b]].uRightSpacing; + if ( (signed int)Str1b < (signed int)pNumLen ) + v13 += pFont->pMetrics[(unsigned __int8)pTmpBuf2[Str1b]].uRightSpacing; } } - else + else//v15 == 12 { strncpy(&Str, Sourcea, 5u); v27 = 0; @@ -1919,15 +1691,15 @@ uColor = atoi(&Str); } } - else + else//v15 == 10 { - v24 = LOBYTE(v8->uFontHeight); + v24 = LOBYTE(pFont->uFontHeight); v13 = uX; uY = uY + v24 - 3; v14 = v24 + uY - 3; } } - else + else//v15 == 9 { strncpy(&Str, Sourcea, 3u); v26 = 0; @@ -1939,7 +1711,7 @@ ++Str1b; ++Sourcea; } - while ( (signed int)Str1b < (signed int)v30 ); + while ( (signed int)Str1b < (signed int)pNumLen ); } return v28; }
--- a/Player.cpp Fri Jan 18 09:44:49 2013 +0600 +++ b/Player.cpp Fri Jan 18 17:30:54 2013 +0600 @@ -628,7 +628,7 @@ + 4998; v12 = 8 * pPlayerNum + 312; LOBYTE(v12) = v12 | 4; - pAudioPlayer->PlaySound((SoundID)pSoundId, v12, 0, -1, 0, 0, (signed __int64)(pSoundVolumeLevels[(char)uVoicesVolumeMultiplier] * 128.0), 0); + pAudioPlayer->PlaySound((SoundID)pSoundId, v12, 0, -1, 0, 0, (pSoundVolumeLevels[uVoicesVolumeMultiplier] * 128.0), 0); } } }
--- a/mm7_1.cpp Fri Jan 18 09:44:49 2013 +0600 +++ b/mm7_1.cpp Fri Jan 18 17:30:54 2013 +0600 @@ -1047,24 +1047,10 @@ pPlayer = &pParty->pPlayers[v43]; v44 = 94 * v43 + 89; if ( v43 == v0 ) - pGUIWindow_CurrentMenu->DrawTextInRect( - pFontArrus, - 0x16u, - 0x12u, - v0, - pGlobalTXT_LocalizationStrings[149], - 60, - v0); + pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, 0x12u, v0, pGlobalTXT_LocalizationStrings[149], 60, v0);//Name pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 94 * v43 + 89, 0x12u, v47, pPlayer->pName, 84, v0); if ( v43 == v0 ) - pGUIWindow_CurrentMenu->DrawTextInRect( - pFontArrus, - 0x16u, - 0x2Fu, - v0, - pGlobalTXT_LocalizationStrings[131], - 60, - v0); + pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, 0x2Fu, v0, pGlobalTXT_LocalizationStrings[131], 60, v0); //Уров. v3 = pPlayer->GetActualLevel(); sprintf(pTmpBuf, "%lu", v3); v4 = pPlayer->GetBaseLevel(); @@ -1075,53 +1061,25 @@ pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, 0x2Fu, v5, pTmpBuf, 84, v0); v6 = v45 + 47; if ( v43 == v0 ) - pGUIWindow_CurrentMenu->DrawTextInRect( - pFontArrus, - 0x16u, - v45 + 47, - v0, - pGlobalTXT_LocalizationStrings[41], - 60, - v0); + pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v45 + 47, v0, pGlobalTXT_LocalizationStrings[41], 60, v0);//Класс pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v6, v0, pClassNames[pPlayer->uClass], 84, v0); v7 = v45 + v6; if ( v43 == v0 ) - pGUIWindow_CurrentMenu->DrawTextInRect( - pFontArrus, - 0x16u, - v7, - v0, - pGlobalTXT_LocalizationStrings[107], - 60, - v0); + pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v7, v0, pGlobalTXT_LocalizationStrings[107], 60, v0);//Здор. sprintf(pTmpBuf, "%d", pPlayer->sHealth); v8 = pPlayer->GetMaxHealth(); v9 = UI_GetHealthManaStringColor(pPlayer->sHealth, v8); pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v7, v9, pTmpBuf, 84, v0); v10 = v45 + v7; if ( v43 == v0 ) - pGUIWindow_CurrentMenu->DrawTextInRect( - pFontArrus, - 0x16u, - v10, - v0, - pGlobalTXT_LocalizationStrings[209], - 60, - v0); + pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v10, v0, pGlobalTXT_LocalizationStrings[209], 60, v0);//Мана sprintf(pTmpBuf, "%d", pPlayer->sMana); v11 = pPlayer->GetMaxMana(); v12 = UI_GetHealthManaStringColor(pPlayer->sMana, v11); pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v10, v12, pTmpBuf, 84, v0); v13 = v45 + v10; if ( v43 == v0 ) - pGUIWindow_CurrentMenu->DrawTextInRect( - pFontArrus, - 0x16u, - v13, - v0, - pGlobalTXT_LocalizationStrings[0], - 60, - v0); + pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v13, v0, pGlobalTXT_LocalizationStrings[0], 60, v0);//Класс брони v14 = pPlayer->GetActualAC(); sprintf(pTmpBuf, "%d", v14); v15 = v0; @@ -1132,64 +1090,29 @@ v0 = 0; v19 = v45 + v13; if ( !v43 ) - pGUIWindow_CurrentMenu->DrawTextInRect( - pFontArrus, - 0x16u, - v19, - 0, - pGlobalTXT_LocalizationStrings[18], - 60, - 0); + pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v19, 0, pGlobalTXT_LocalizationStrings[18], 60, 0);//Атака v20 = pPlayer->GetActualAttack(0); sprintf(pTmpBuf, "%+d", v20); pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v19, 0, pTmpBuf, 84, 0); v21 = v45 + v19; if ( !v43 ) - pGUIWindow_CurrentMenu->DrawTextInRect( - pFontArrus, - 0x16u, - v21, - 0, - pGlobalTXT_LocalizationStrings[66], - 60, - 0); + pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v21, 0, pGlobalTXT_LocalizationStrings[66], 60, 0);//Повр. v22 = pPlayer->GetMeleeDamageString(); pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v21, 0, v22, 84, 0); v23 = v45 + v21; if ( !v43 ) - pGUIWindow_CurrentMenu->DrawTextInRect( - pFontArrus, - 0x16u, - v23, - 0, - pGlobalTXT_LocalizationStrings[203], - 60, - 0); + pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v23, 0, pGlobalTXT_LocalizationStrings[203], 60, 0);// Стрелять v24 = pPlayer->GetRangedAttack(); sprintf(pTmpBuf, "%+d", v24); pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v23, 0, pTmpBuf, 84, 0); v25 = v45 + v23; if ( !v43 ) - pGUIWindow_CurrentMenu->DrawTextInRect( - pFontArrus, - 0x16u, - v25, - 0, - pGlobalTXT_LocalizationStrings[66], - 60, - 0); + pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v25, 0, pGlobalTXT_LocalizationStrings[66], 60, 0);//Повр. v26 = pPlayer->GetRangedDamageString(); pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v25, 0, v26, 84, 0); v27 = v45 + v25; if ( !v43 ) - pGUIWindow_CurrentMenu->DrawTextInRect( - pFontArrus, - 0x16u, - v27, - 0, - pGlobalTXT_LocalizationStrings[205], - 60, - 0); + pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v27, 0, pGlobalTXT_LocalizationStrings[205], 60, 0);//Навыки v28 = 0; v29 = (char *)pPlayer->pActiveSkills; v30 = 36; @@ -1205,52 +1128,24 @@ pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v27, 0, pTmpBuf, 84, 0); v31 = v45 + v27; if ( !v43 ) - pGUIWindow_CurrentMenu->DrawTextInRect( - pFontArrus, - 0x16u, - v31, - 0, - pGlobalTXT_LocalizationStrings[168], - 60, - 0); + pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v31, 0, pGlobalTXT_LocalizationStrings[168], 60, 0);//Очки sprintf(pTmpBuf, "%lu", pPlayer->uSkillPoints); - pGUIWindow_CurrentMenu->DrawTextInRect( - pFontArrus, - v44, - v31, - pPlayer->uSkillPoints != 0 ? v46 : 0, - pTmpBuf, - 84, - 0); + pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v31, pPlayer->uSkillPoints != 0 ? v46 : 0, pTmpBuf, 84, 0); v32 = v45 + v31; v48 = pPlayer->GetMajorConditionIdx(); if ( !v43 ) - pGUIWindow_CurrentMenu->DrawTextInRect( - pFontArrus, - 0x16u, - v32, - 0, - pGlobalTXT_LocalizationStrings[45], - 60, - 0); + pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v32, 0, pGlobalTXT_LocalizationStrings[45], 60, 0);//Сост. v33 = aCharacterConditionNames[v48]; v34 = GetConditionDrawColor(v48); pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v32, v34, v33, 84, 0); v35 = v45 + v32; if ( !v43 ) - pGUIWindow_CurrentMenu->DrawTextInRect( - pFontArrus, - 0x16u, - v35, - 0, - pGlobalTXT_LocalizationStrings[170], - 60, - 0); + pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v35, 0, pGlobalTXT_LocalizationStrings[170], 60, 0);//Б.Прим. v36 = pPlayer->uQuickSpell; if ( v36 ) v37 = pSpellStats->pInfos[v36].pShortName; else - v37 = pGlobalTXT_LocalizationStrings[153]; + v37 = pGlobalTXT_LocalizationStrings[153];//Нет pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v35, 0, v37, 84, 0); ++v43; } @@ -1267,10 +1162,10 @@ v39 = v46; } v40 = GetReputationString(v38); - sprintf(pTmpBuf, "%s: ", pGlobalTXT_LocalizationStrings[180], v39, v40); + sprintf(pTmpBuf, "%s: ", pGlobalTXT_LocalizationStrings[180], v39, v40);//Reputation pGUIWindow_CurrentMenu->DrawText(pFontArrus, 22, 323, 0, pTmpBuf, 0, 0, 0); v41 = pParty->GetPartyFame(); - sprintf(pTmpBuf, "\r261%s: %d", pGlobalTXT_LocalizationStrings[84], v41);// Fame + sprintf(pTmpBuf, "\r261%s: %d", pGlobalTXT_LocalizationStrings[84], v41);// Fame Слава return pGUIWindow_CurrentMenu->DrawText(pFontArrus, 0, 323, 0, pTmpBuf, 0, 0, 0); } @@ -4719,9 +4614,7 @@ } while ( v23 < v21 * v19 ); } - pRenderer->DrawTextureIndexed( - pBtn_ExitCancel->uX, - pBtn_ExitCancel->uY, + pRenderer->DrawTextureIndexed(pBtn_ExitCancel->uX, pBtn_ExitCancel->uY, (Texture *)(uTextureID_506438 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_506438] : 0)); }
--- a/mm7_2.cpp Fri Jan 18 09:44:49 2013 +0600 +++ b/mm7_2.cpp Fri Jan 18 17:30:54 2013 +0600 @@ -3150,19 +3150,8 @@ uDialogueType = 83; pDialogueWindow->Release(); pDialogueWindow = GUIWindow::Create(0, 0, 640, 350, WINDOW_MainMenu, 0, 0); - pBtn_ExitCancel = pDialogueWindow->CreateButton( - 471u, - 445u, - 169u, - 35u, - 1, - 0, - 0x71u, - 0, - 0, - pGlobalTXT_LocalizationStrings[34],// "Cancel" - (Texture *)(uTextureID_506438 != -1 ? &pIcons_LOD->pTextures[uTextureID_506438] : 0), - 0); + pBtn_ExitCancel = pDialogueWindow->CreateButton(471u, 445u, 169u, 35u, 1, 0, 0x71u, 0, 0, pGlobalTXT_LocalizationStrings[34],// "Cancel" + (Texture *)(uTextureID_506438 != -1 ? &pIcons_LOD->pTextures[uTextureID_506438] : 0), 0); pDialogueWindow->CreateButton(0, 0, 0, 0, 1, 0, 0x51u, 0, 0, "", 0); pDialogueWindow->CreateButton(480u, 160u, 140u, 30u, 1, 0, 0, 0x53u, 0, "", 0); pDialogueWindow->_41D08F(1, 1, 0, 2); @@ -3303,19 +3292,8 @@ pDialogueWindow->pControlsHead = 0; pDialogueWindow->pControlsTail = 0; pDialogueWindow->uNumControls = 0; - pBtn_ExitCancel = pDialogueWindow->CreateButton( - 0x1D7u, - 0x1BDu, - 0xA9u, - 0x23u, - 1, - 0, - 0x71u, - 0, - 0, - pGlobalTXT_LocalizationStrings[79], - (Texture *)(uTextureID_506438 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_506438] : 0), - 0); + pBtn_ExitCancel = pDialogueWindow->CreateButton(0x1D7u, 0x1BDu, 0xA9u, 0x23u, 1, 0, 0x71u, 0, 0, pGlobalTXT_LocalizationStrings[79], + (Texture *)(uTextureID_506438 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_506438] : 0), 0); pDialogueWindow->CreateButton(0x1E0u, 0xA0u, 0x8Cu, 0x1Eu, 1, 0, 0x88u, 0x55u, 0, "", 0); pDialogueWindow->CreateButton(0x1E0u, 0xBEu, 0x8Cu, 0x1Eu, 1, 0, 0x88u, 0x56u, 0, "", 0); pDialogueWindow->CreateButton(0x1E0u, 0xDCu, 0x8Cu, 0x1Eu, 1, 0, 0x88u, 0x57u, 0, "", 0);
--- a/mm7_5.cpp Fri Jan 18 09:44:49 2013 +0600 +++ b/mm7_5.cpp Fri Jan 18 17:30:54 2013 +0600 @@ -3226,7 +3226,7 @@ papredoll_dbrds[2] = pIcons_LOD->LoadTexture("BUTTEXI1", TEXTURE_16BIT_PALETTE); pBtn_ExitCancel = pGUIWindow_CurrentMenu->CreateButton(0x187u, 0x13Cu, 0x4Bu, 0x21u, v0, 0, 0x71u, 0, 0, pGlobalTXT_LocalizationStrings[79],// "Exit" - (Texture *)(uTextureID_BUTTDESC2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTDESC2] : 0), 0, v179); + (Texture *)(uTextureID_BUTTDESC2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTDESC2] : 0), 0); //, v179); continue; case 0x6B: if ( pCurrentScreen ) @@ -12564,7 +12564,7 @@ //----- (0040F82D) -------------------------------------------------------- void __fastcall ZBuffer_Fill(int *pZBuffer, int uTextureId, int iZValue) { - ZBuffer_DoFill(pZBuffer, (Texture *)(uTextureId != -1 ? 72 * uTextureId + 0x6D084C : 0), iZValue); + ZBuffer_DoFill(pZBuffer, (Texture *)(uTextureId != -1 ? (int)&pIcons_LOD->pTextures[uTextureId] : 0), iZValue); } //----- (0040F845) --------------------------------------------------------