Mercurial > mm7
diff GUIWindow.cpp @ 688:c0bfb386b15f
some ui cleanup
author | Gloval |
---|---|
date | Sat, 16 Mar 2013 01:11:39 +0400 |
parents | 59713bb36033 |
children | e0a1fccc89b1 |
line wrap: on
line diff
--- a/GUIWindow.cpp Fri Mar 15 15:58:18 2013 +0200 +++ b/GUIWindow.cpp Sat Mar 16 01:11:39 2013 +0400 @@ -147,8 +147,8 @@ //----- (0041D3B7) -------------------------------------------------------- -char GUIWindow::DrawQuickCharRecord() -{ +void GUIWindow::DrawQuickCharRecord() + { Player *pPlayer; // esi@1 int v6; // eax@5 int v7; // ebx@5 @@ -217,20 +217,20 @@ pRenderer->DrawTextureTransparent(uFrameX + 24, uFrameY + 24, v13); v16 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu); - sprintf(pTmpBuf, "\xC%05d", v16); + sprintf(pTmpBuf, "\f%05d", v16); sprintfex(pTmpBuf2, pGlobalTXT_LocalizationStrings[429], pPlayer->pName, pClassNames[pPlayer->classType]); strcat(pTmpBuf, pTmpBuf2); - strcat(pTmpBuf, "\xC" "00000\n"); + strcat(pTmpBuf, "\f00000\n"); v20 = UI_GetHealthManaStringColor(pPlayer->sHealth, pPlayer->GetMaxHealth()); - sprintf(pTmpBuf2, "%s : \x0C" "%05u%d\x0C" "00000 / %d\n", pGlobalTXT_LocalizationStrings[108], + sprintf(pTmpBuf2, "%s : \f%05u%d\f00000 / %d\n", pGlobalTXT_LocalizationStrings[108], v20, pPlayer->sHealth, pPlayer->GetMaxHealth()); strcat(pTmpBuf, pTmpBuf2); v24 = UI_GetHealthManaStringColor(pPlayer->sMana, pPlayer->GetMaxMana()); - sprintf(pTmpBuf2, "%s : \x0C" "%05u%d\x0C" "00000 / %d\n", pGlobalTXT_LocalizationStrings[212], + sprintf(pTmpBuf2, "%s : \f%05u%d\f00000 / %d\n", pGlobalTXT_LocalizationStrings[212], v24, pPlayer->sMana, pPlayer->GetMaxMana()); strcat(pTmpBuf, pTmpBuf2); v25 = pPlayer->GetMajorConditionIdx(); - sprintf(pTmpBuf2, "%s: \x0C" "%05d%s\x0C" "00000\n", pGlobalTXT_LocalizationStrings[47], + sprintf(pTmpBuf2, "%s: \f%05d%s\f00000\n", pGlobalTXT_LocalizationStrings[47], GetConditionDrawColor(v25), aCharacterConditionNames[v25]); strcat(pTmpBuf, pTmpBuf2); v28 = pPlayer->uQuickSpell; @@ -263,7 +263,7 @@ if ( uFramesetIDa == 0 ) v39 = pGlobalTXT_LocalizationStrings[153]; sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[450], v39); - return DrawText(pFontArrus, 14, 114, 0, pTmpBuf, 0, 0, 0); + DrawText(pFontArrus, 14, 114, 0, pTmpBuf, 0, 0, 0); } //----- (0041D08F) -------------------------------------------------------- @@ -474,56 +474,56 @@ awards_count2 = 0; dword_506528 = 0; dword_50651C = 0; - awards_count = 0; - if ( v1->ptr_1C == (void *)177 ) - { - byte_506360 = 0; - 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)]; - 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(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]; - if ( HIBYTE(v18) & 1 || (v18 & 0x80u) != 0 ) - { - v23 = 5; - } - else - { - if ( v18 & 0x40 ) - v23 = 3; - } - v19 = 0; - if ( v23 > 0 ) - { + awards_count = 0; + switch (v1->par1C) + { + case 177:{ + byte_506360 = 0; + 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)]; + 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(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]; + if ( HIBYTE(v18) & 1 || (v18 & 0x80u) != 0 ) + { + v23 = 5; + } + else + { + if ( v18 & 0x40 ) + v23 = 3; + } + v19 = 0; + if ( v23 > 0 ) + { + do + { + v1->CreateButton(pLloydsBeaconsPreviewXs[v19], pLloydsBeaconsPreviewYs[v19], 0x5Cu, 0x44u, 1, 180, 0xB3u, v19, 0, "", 0); + ++v19; + } + while ( (signed int)v19 < v23 ); + } + v20 = 0; + v21 = v17->pInstalledBeacons; do - { - v1->CreateButton(pLloydsBeaconsPreviewXs[v19], pLloydsBeaconsPreviewYs[v19], 0x5Cu, 0x44u, 1, 180, 0xB3u, v19, 0, "", 0); - ++v19; + { + if ( *(_QWORD *)v21 >= (signed __int64)pParty->uTimePlayed ) + LoadThumbnailLloydTexture(v20, _506348_current_lloyd_playerid + 1); + else + memset(v21, 0, 0x1Cu); + ++v20; + v21 = (char *)v21 + 28; + } + while ( (signed int)v20 < 5 ); } - while ( (signed int)v19 < v23 ); - } - v20 = 0; - v21 = v17->pInstalledBeacons; - do - { - if ( *(_QWORD *)v21 >= (signed __int64)pParty->uTimePlayed ) - LoadThumbnailLloydTexture(v20, _506348_current_lloyd_playerid + 1); - else - memset(v21, 0, 0x1Cu); - ++v20; - v21 = (char *)v21 + 28; - } - while ( (signed int)v20 < 5 ); - } - else - { - if ( v1->ptr_1C == (void *)195 ) - { + break; + case 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)]; @@ -533,223 +533,220 @@ v16 = 0; 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); - ++v16; + { + 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 ); } - while ( (signed int)v16 < 6 ); - } - else - { - if ( v1->ptr_1C == (void *)200 ) + break; + case 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)]; - 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); - awards_count = 0; - memset(&achievedAwardsIndex, 0, 4000); - for ( i = dword_506528; i < 512; ++i ) - { + pTexture_CurrentBook = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture( "sbquiknot", TEXTURE_16BIT_PALETTE)]; + pSpellBookPagesTextr_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); + awards_count = 0; + memset(&achievedAwardsIndex, 0, 4000); + for ( i = dword_506528; i < 512; ++i ) + { v14 = (char *)pQuestTable[i-1];//(&dword_722F10)[4 * i]; if ( _449B57_test_bit(pParty->_quest_bits, i) && v14 ) - { - v15 = awards_count++; - achievedAwardsIndex[v15] = i; - } - } - } - else - { - if ( v1->ptr_1C == (void *)201 ) - { - pTexture_AutonotesBook = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("sbautnot", 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)]; - pTexture_506394 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-1b", TEXTURE_16BIT_PALETTE)]; - pTexture_506390 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-1a", TEXTURE_16BIT_PALETTE)]; - pTexture_50638C = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-2b", TEXTURE_16BIT_PALETTE)]; - pTexture_506388 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-2a", TEXTURE_16BIT_PALETTE)]; - pTexture_506384 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-3b", TEXTURE_16BIT_PALETTE)]; - pTexture_506380 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-3a", TEXTURE_16BIT_PALETTE)]; - pTexture_50637C = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-5b", TEXTURE_16BIT_PALETTE)]; - pTexture_506378 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-5a", TEXTURE_16BIT_PALETTE)]; - pTexture_506374 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-4b", TEXTURE_16BIT_PALETTE)]; - 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], 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; - awards_count = 0; - while ( v10 < 196 ) - { - if ( dword_506568 == pAutonoteTxt[v10-1].eType)//dword_72371C[2 * v10] ) - { - //v25 = (&dword_723718_autonote_related)[8 * (signed __int16)v10]; - v25 = (char *)pAutonoteTxt[v10-1].pText; - if ( (short)v10 ) { - if ( _449B57_test_bit(pParty->_autonote_bits, v10) && v25 ) - { - v11 = awards_count++; - achievedAwardsIndex[v11] = (signed __int16)v10; - } + v15 = awards_count++; + achievedAwardsIndex[v15] = i; } - } - ++v10; } - } - else - { - 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)]; - 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)]; - pTexture_506390 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tabNoff", TEXTURE_16BIT_PALETTE)]; - pTexture_50638C = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tabSon", TEXTURE_16BIT_PALETTE)]; - pTexture_506388 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tabSoff", TEXTURE_16BIT_PALETTE)]; - pTexture_506384 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tabEon", TEXTURE_16BIT_PALETTE)]; - 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], 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 ) - { - pTextures_5064A0[13] = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("sbdate-time", TEXTURE_16BIT_PALETTE)]; - pTex_moon_new = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("moon_new", TEXTURE_16BIT_PALETTE)]; - pTex_moon_4 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("moon_4", TEXTURE_16BIT_PALETTE)]; - pTex_moon_2 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("moon_2", TEXTURE_16BIT_PALETTE)]; - pTex_moon_2_2 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("moon_2", TEXTURE_16BIT_PALETTE)]; - pTex_moon_ful = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("moon_ful", TEXTURE_16BIT_PALETTE)]; - return; - } - if ( v1->ptr_1C != (void *)224 ) - return; - pTextures_5064A0[11] = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("sbplayrnot", 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], - 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], - pTex_tab_an_7b__zoot_on, - 0); - awards_count = 0; - v26.uFrameX = 48; - v26.uFrameY = 70; - v26.uFrameWidth = 360; - v26.uFrameHeight = 264; - v2 = LOBYTE(pAutonoteFont->uFontHeight) - 3; - v26.uFrameZ = 407; - v26.uFrameHeight = v2 * 264 / v2; - v26.uFrameW = v26.uFrameHeight + 69; - memset(&achievedAwardsIndex, 0, 4000); - memset(byte_5C6D50, 0, 0x64u); - if ( dword_506528 < 29 ) - { - v3 = (__int64 *)&pParty->field_3C.field_4F0[2 * dword_506528]; - for(int i=dword_506528+1;i<dword_506528+31;i++) - { - v4 = pStorylineText->StoreLine[i].pText; - if ( *v3 ) - { - if ( v4 ) - { - v5 = BuilDialogueString(v4, uActiveCharacter - 1, 0, 0, 0, v3); - v6 = pAutonoteFont->CalcTextHeight(v5, &v26, 1, 0); - v7 = (v6 - 3) / (signed int)v26.uFrameHeight; - v8 = v7 + 1; - if ( (signed int)v7 + 1 > 0 ) - { - memset32((char *)&achievedAwardsIndex + 4 * awards_count , i, v8); - do - { - LODWORD(v7) = awards_count++; - byte_5C6D50[(int)v7] = BYTE4(v7); - ++HIDWORD(v7); - } - while ( SHIDWORD(v7) < (signed int)v8 ); - } - } - } - ++i; - ++v3; - } - } - } - } v12 = awards_count; awards_count = 0; awards_count2 = v12; - } - } + } + break; + case 201: + { + pTexture_AutonotesBook = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("sbautnot", TEXTURE_16BIT_PALETTE)]; + pSpellBookPagesTextr_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)]; + pTexture_506394 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-1b", TEXTURE_16BIT_PALETTE)]; + pTexture_506390 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-1a", TEXTURE_16BIT_PALETTE)]; + pTexture_50638C = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-2b", TEXTURE_16BIT_PALETTE)]; + pTexture_506388 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-2a", TEXTURE_16BIT_PALETTE)]; + pTexture_506384 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-3b", TEXTURE_16BIT_PALETTE)]; + pTexture_506380 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-3a", TEXTURE_16BIT_PALETTE)]; + pTexture_50637C = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-5b", TEXTURE_16BIT_PALETTE)]; + pTexture_506378 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-5a", TEXTURE_16BIT_PALETTE)]; + pTexture_506374 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-4b", TEXTURE_16BIT_PALETTE)]; + 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], 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; + awards_count = 0; + while ( v10 < 196 ) + { + if ( dword_506568 == pAutonoteTxt[v10-1].eType)//dword_72371C[2 * v10] ) + { + //v25 = (&dword_723718_autonote_related)[8 * (signed __int16)v10]; + v25 = (char *)pAutonoteTxt[v10-1].pText; + if ( (short)v10 ) + { + if ( _449B57_test_bit(pParty->_autonote_bits, v10) && v25 ) + { + v11 = awards_count++; + achievedAwardsIndex[v11] = (signed __int16)v10; + } + } + } + ++v10; + } + } + break; + case 202: + { + dword_506364 = 1; + pSpellBookPagesTextr_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)]; + pTexture_506390 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tabNoff", TEXTURE_16BIT_PALETTE)]; + pTexture_50638C = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tabSon", TEXTURE_16BIT_PALETTE)]; + pTexture_506388 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tabSoff", TEXTURE_16BIT_PALETTE)]; + pTexture_506384 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tabEon", TEXTURE_16BIT_PALETTE)]; + 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], 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" + } + break; + case 203: { + pSpellBookPagesTextr_13 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("sbdate-time", TEXTURE_16BIT_PALETTE)]; + pTex_moon_new = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("moon_new", TEXTURE_16BIT_PALETTE)]; + pTex_moon_4 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("moon_4", TEXTURE_16BIT_PALETTE)]; + pTex_moon_2 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("moon_2", TEXTURE_16BIT_PALETTE)]; + pTex_moon_2_2 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("moon_2", TEXTURE_16BIT_PALETTE)]; + pTex_moon_ful = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("moon_ful", TEXTURE_16BIT_PALETTE)]; + } + break; + case 224: + { + pSpellBookPagesTextr_11 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("sbplayrnot", 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], + 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], + pTex_tab_an_7b__zoot_on, + 0); + awards_count = 0; + v26.uFrameX = 48; + v26.uFrameY = 70; + v26.uFrameWidth = 360; + v26.uFrameHeight = 264; + v2 = LOBYTE(pAutonoteFont->uFontHeight) - 3; + v26.uFrameZ = 407; + v26.uFrameHeight = v2 * 264 / v2; + v26.uFrameW = v26.uFrameHeight + 69; + memset(&achievedAwardsIndex, 0, 4000); + memset(byte_5C6D50, 0, 0x64u); + if ( dword_506528 < 29 ) + { + v3 = (__int64 *)&pParty->field_3C.field_4F0[2 * dword_506528]; + for(int i=dword_506528+1;i<dword_506528+31;i++) + { + v4 = pStorylineText->StoreLine[i].pText; + if ( *v3 ) + { + if ( v4 ) + { + v5 = BuilDialogueString(v4, uActiveCharacter - 1, 0, 0, 0, v3); + v6 = pAutonoteFont->CalcTextHeight(v5, &v26, 1, 0); + v7 = (v6 - 3) / (signed int)v26.uFrameHeight; + v8 = v7 + 1; + if ( (signed int)v7 + 1 > 0 ) + { + memset32((char *)&achievedAwardsIndex + 4 * awards_count , i, v8); + do + { + LODWORD(v7) = awards_count++; + byte_5C6D50[(int)v7] = BYTE4(v7); + ++HIDWORD(v7); + } + while ( SHIDWORD(v7) < (signed int)v8 ); + } + } + } + ++i; + ++v3; + } + } + + } + break; + } + } @@ -879,7 +876,7 @@ if ( !pIcons_LOD->uNumPrevLoadedFiles ) pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles; pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0); - pTextures_5064A0[9] = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("book", TEXTURE_16BIT_PALETTE)]; + pSpellBookPagesTextr_9 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("book", TEXTURE_16BIT_PALETTE)]; pTexture_pagemask = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("pagemask", TEXTURE_16BIT_PALETTE)]; pTexture_506448 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("ib-m5-u", TEXTURE_16BIT_PALETTE)]; ptr_506440 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("ib-m5-d", TEXTURE_16BIT_PALETTE)]; @@ -895,7 +892,7 @@ pTexture_506444 = pIcons_LOD->LoadTexturePtr("ib-m6-d",TEXTURE_16BIT_PALETTE); for (uint i = 0; i < 8; ++i) { - pTextures_5064A0[i] = pIcons_LOD->LoadTexturePtr(texNames[i], TEXTURE_16BIT_PALETTE); + pSpellBookPagesTextr[i] = pIcons_LOD->LoadTexturePtr(texNames[i], TEXTURE_16BIT_PALETTE); sprintf(pTmpBuf, "tab%da", i+1); pTextures_tabs[i][0] = pIcons_LOD->LoadTexturePtr(pTmpBuf, TEXTURE_16BIT_PALETTE); @@ -1288,9 +1285,8 @@ //----- (0044D406) -------------------------------------------------------- -char *GUIWindow::DrawTitleText(GUIFont *a2, unsigned int uHorizontalMargin, unsigned int uVerticalMargin, - unsigned __int16 uDefaultColor, const char *pInString, unsigned int uLineSpacing) -{ +char * GUIWindow::DrawTitleText( GUIFont *a2, signed int uHorizontalMargin, unsigned int uVerticalMargin, unsigned __int16 uDefaultColor, const char *pInString, unsigned int uLineSpacing ) + { GUIWindow *pWindow; // esi@1 unsigned int v8; // ebx@1 char *v9; // eax@1