Mercurial > mm7
diff GUIWindow.cpp @ 24:352b15291822
18.01.13 (PlaySound work)
author | Ritor1 |
---|---|
date | Fri, 18 Jan 2013 17:30:54 +0600 |
parents | fe0d9a98213f |
children | 5a08b193507f 764abc86ce90 |
line wrap: on
line diff
--- 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; }