Mercurial > mm7
changeset 995:5876a9cafa3e
Various UIs, autonotes title fixed
author | Nomad |
---|---|
date | Tue, 14 May 2013 14:03:07 +0200 |
parents | 3431f6abc786 |
children | dcdfbb6eede9 |
files | GUIWindow.cpp GUIWindow.h Player.cpp UIBooks.cpp UICharacter.cpp UIMainMenu.cpp UiGame.cpp mm7_1.cpp mm7_5.cpp mm7_data.cpp mm7_data.h |
diffstat | 11 files changed, 464 insertions(+), 395 deletions(-) [+] |
line wrap: on
line diff
--- a/GUIWindow.cpp Tue May 14 12:35:06 2013 +0200 +++ b/GUIWindow.cpp Tue May 14 14:03:07 2013 +0200 @@ -944,56 +944,7 @@ } -//----- (0041192C) -------------------------------------------------------- -void __cdecl InitializeBookTextures() -{ - //signed int v0; // ebp@3 - //Texture **v1; // ebx@3 - pAudioPlayer->StopChannels(-1, -1); - ++pIcons_LOD->uTexturePacksCount; - if ( !pIcons_LOD->uNumPrevLoadedFiles ) - pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles; - pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0); - pSpellBookPagesTextr_9 = pIcons_LOD->LoadTexturePtr("book", TEXTURE_16BIT_PALETTE); - pTexture_pagemask = pIcons_LOD->LoadTexturePtr("pagemask", TEXTURE_16BIT_PALETTE); - pTexture_506448 = pIcons_LOD->LoadTexturePtr("ib-m5-u", TEXTURE_16BIT_PALETTE); - ptr_506440 = pIcons_LOD->LoadTexturePtr("ib-m5-d", TEXTURE_16BIT_PALETTE); - pTexture_50643C = pIcons_LOD->LoadTexturePtr("ib-m6-u",TEXTURE_16BIT_PALETTE); - //v0 = 1; - - static const char *texNames[9] = - { - "SBFB00", "SBAB00", "SBWB00", "SBEB00", - "SBSB00", "SBMB00", "SBBB00", "SBLB00", - }; - - pTexture_506444 = pIcons_LOD->LoadTexturePtr("ib-m6-d",TEXTURE_16BIT_PALETTE); - for (uint i = 0; i < 8; ++i) - { - 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); - sprintf(pTmpBuf, "tab%db", i+1); - pTextures_tabs[i][1] = pIcons_LOD->LoadTexturePtr(pTmpBuf, TEXTURE_16BIT_PALETTE); - } -} - -//----- (00411AAA) -------------------------------------------------------- -void __cdecl InitializeBookFonts() -{ - pAudioPlayer->StopChannels(-1, -1); - ++pIcons_LOD->uTexturePacksCount; - if ( !pIcons_LOD->uNumPrevLoadedFiles ) - pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles; - pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0); - pTexture_mapbordr = pIcons_LOD->LoadTexturePtr("mapbordr", TEXTURE_16BIT_PALETTE); - pBookFont = LoadFont("book.fnt", "FONTPAL", NULL); - pBook2Font = LoadFont("book2.fnt", "FONTPAL", NULL); - pAutonoteFont = LoadFont("autonote.fnt", "FONTPAL", NULL); - pSpellFont = LoadFont("spell.fnt", "FONTPAL", NULL); -} //----- (00411B59) -------------------------------------------------------- void __fastcall LoadThumbnailLloydTexture(unsigned int uSlot, unsigned int uPlayer)
--- a/GUIWindow.h Tue May 14 12:35:06 2013 +0200 +++ b/GUIWindow.h Tue May 14 14:03:07 2013 +0200 @@ -480,6 +480,10 @@ void GameUI_Footer(); void GameUI_Footer_2(); void GameUI_SetFooterString(const char *pStr); +void GameUI_DrawMinimap(unsigned int uX, unsigned int uY, unsigned int uZ, unsigned int uW, unsigned int uZoom, unsigned int bRedrawOdmMinimap); +void GameUI_DrawPartySpells(); +void GameUI_DrawTorchlightAndWizardEye(); +void GameUI_DrawCharacterSelectionFrame(); @@ -492,7 +496,7 @@ // character ui -unsigned int GetSkillColor(unsigned int uPlayerClass, PLAYER_SKILL_TYPE uPlayerSkillType, signed int skill_level); +struct GUIWindow *CharacterUI_Initialize(unsigned int _this); const char *CharacterUI_GetSkillDescText(unsigned int uPlayerID, PLAYER_SKILL_TYPE uPlayerSkillType); char CharacterUI_SkillsTab_ShowHint(); void CharacterUI_StatsTab_ShowHint(); @@ -506,11 +510,28 @@ void CharacterUI_DrawPaperdollWithRingOverlay(Player *player); void CharacterUI_ReleaseButtons(); +unsigned int GetSkillColor(unsigned int uPlayerClass, PLAYER_SKILL_TYPE uPlayerSkillType, signed int skill_level); +//book ui +void BookUI_Draw(WindowType book); +void BookUI_Questbook_Draw(); +void BookUI_Autonotes_Draw(); +void BookUI_Map_Draw(); +void BookUI_Calendar_Draw(); + +void OnCloseSpellBook(); +void InitializeBookTextures(); +void InitializeBookFonts(); +void DrawSpellBookContent(); +void DrawBook_History(); +unsigned int __cdecl DrawLloydBeaconsScreen(); +void DrawTownPortalScreen(); +void LoadSpellbook(unsigned int uID); // idb +void DrawSpellDescriptionPopup(int spell_index); @@ -669,12 +690,26 @@ extern GUIButton *pCreationUI_BtnPressLeft[4]; extern GUIButton *pCreationUI_BtnPressRight[4]; +extern int uTextureID_GameUI_CharSelectionFrame; // 50C98C -extern unsigned int ui_color_text_default; -extern unsigned int ui_color_text_highlight; -extern unsigned int ui_color_text_header; -extern unsigned int ui_color_text_bonus; -extern unsigned int ui_color_text_bonus_neg; -extern unsigned int ui_color_text_skill_upgradeable; -extern unsigned int ui_color_text_skill_not_upgradeable; -extern unsigned int ui_color_text_awards[6]; \ No newline at end of file +extern unsigned int ui_character_default_text_color; +extern unsigned int ui_character_skill_highlight_color; +extern unsigned int ui_character_header_text_color; +extern unsigned int ui_character_bonus_text_color; +extern unsigned int ui_character_bonus_text_color_neg; +extern unsigned int ui_character_skill_upgradeable_color; +extern unsigned int ui_character_skill_default_color; +extern unsigned int ui_character_award_color[6]; +extern unsigned int ui_game_minimap_outline_color; +extern unsigned int ui_game_minimap_actor_friendly_color; +extern unsigned int ui_game_minimap_actor_hostile_color; +extern unsigned int ui_game_minimap_actor_corpse_color; +extern unsigned int ui_game_minimap_decoration_color_1; +extern unsigned int ui_game_minimap_projectile_color; +extern unsigned int ui_game_minimap_treasure_color; +extern unsigned int ui_book_quests_title_color; +extern unsigned int ui_book_quests_text_color; +extern unsigned int ui_book_autonotes_title_color; +extern unsigned int ui_book_autonotes_text_color; +extern unsigned int ui_book_map_title_color; +extern unsigned int ui_book_map_coordinates_color; \ No newline at end of file
--- a/Player.cpp Tue May 14 12:35:06 2013 +0200 +++ b/Player.cpp Tue May 14 14:03:07 2013 +0200 @@ -3273,9 +3273,9 @@ unsigned int result; // eax@2 if ( CanTrainToNextLevel() ) - result = ui_color_text_bonus; + result = ui_character_bonus_text_color; else - result = ui_color_text_default; + result = ui_character_default_text_color; return result; }
--- a/UIBooks.cpp Tue May 14 12:35:06 2013 +0200 +++ b/UIBooks.cpp Tue May 14 14:03:07 2013 +0200 @@ -46,6 +46,164 @@ + + + +//----- (00413CC6) -------------------------------------------------------- +void BookUI_Draw(WindowType book) +{ + pRenderer->DrawTextureIndexed(471, 445, pIcons_LOD->GetTexture(uExitCancelTextureId)); + switch (book) + { + case WINDOW_QuestBook: BookUI_Questbook_Draw(); break; + case WINDOW_AutonotesBook: BookUI_Autonotes_Draw(); break; + case WINDOW_MapsBook: BookUI_Map_Draw(); break; + case WINDOW_CalendarBook: BookUI_Calendar_Draw(); break; + case WINDOW_LloydsBeacon: DrawLloydBeaconsScreen(); break; + case WINDOW_TownPortal: DrawTownPortalScreen(); break; + case WINDOW_HistoryBook: DrawBook_History(); break; + } +} + + + +//----- (00413D6F) -------------------------------------------------------- +void BookUI_Calendar_Draw() +{ + unsigned int v0; // esi@1 + char *v1; // eax@5 + int v2; // ecx@5 + char *v3; // eax@6 + GUIWindow a1; // [sp+Ch] [bp-60h]@5 + unsigned int v6; // [sp+60h] [bp-Ch]@1 + int v7; // [sp+64h] [bp-8h]@1 + int a5; // [sp+68h] [bp-4h]@1 + + v0 = pParty->uCurrentHour; + v6 = pMapStats->GetMapInfo(pCurrentMapName); + a5 = TargetColor(0x4Bu, 0x4Bu, 0x4Bu); + pRenderer->DrawTextureIndexed(pViewport->uViewportTL_X, pViewport->uViewportTL_Y, pSpellBookPagesTextr_13); + v7 = (unsigned __int8)pDayMoonPhase[pParty->uDaysPlayed]; + if ( (signed int)v0 <= 12 ) + { + if ( !v0 ) + v0 = 12; + } + else + { + v0 -= 12; + } + a1.uFrameX = game_viewport_x; + a1.uFrameY = game_viewport_y; + a1.uFrameWidth = game_viewport_width; + a1.uFrameHeight = game_viewport_height; + a1.uFrameZ = game_viewport_z; + a1.uFrameW = game_viewport_w; + a1.DrawTitleText(pBook2Font, 0, 0x16u, 0, pGlobalTXT_LocalizationStrings[186], 3u); + if ( pParty->uCurrentHour >= 12 ) + { + if ( pParty->uCurrentHour >= 24 ) + v2=0; + else + v2=1; + } + else + v2=0; + v1 = GetDayPart(); + sprintf( + pTmpBuf, + "%s\t100:\t110%d:%02d %s - %s", + pGlobalTXT_LocalizationStrings[526], + v0, + pParty->uCurrentMinute, + aAMPMNames[v2], + v1); + a1.DrawText(pBookFont, 70, 55, a5, pTmpBuf, 0, 0, 0); + sprintf( + pTmpBuf, + "%s\t100:\t110%d - %s", + pGlobalTXT_LocalizationStrings[56], + pParty->uDaysPlayed + 1, + aDayNames[pParty->uDaysPlayed % 7]); + a1.DrawText(pBookFont, 70, 2 * LOBYTE(pBookFont->uFontHeight) + 49, a5, pTmpBuf, 0, 0, 0); + sprintf( + pTmpBuf, + "%s\t100:\t110%d - %s", + pGlobalTXT_LocalizationStrings[146], + pParty->uCurrentMonth + 1, + aMonthNames[pParty->uCurrentMonth]); + a1.DrawText(pBookFont, 70, 4 * LOBYTE(pBookFont->uFontHeight) + 43, a5, pTmpBuf, 0, 0, 0); + sprintf(pTmpBuf, "%s\t100:\t110%d", pGlobalTXT_LocalizationStrings[245], pParty->uCurrentYear); + a1.DrawText(pBookFont, 70, 6 * LOBYTE(pBookFont->uFontHeight) + 37, a5, pTmpBuf, 0, 0, 0); + sprintf(pTmpBuf, "%s\t100:\t110%s", pGlobalTXT_LocalizationStrings[530], aMoonPhaseNames[v7]); + a1.DrawText(pBookFont, 70, 8 * LOBYTE(pBookFont->uFontHeight) + 31, a5, pTmpBuf, 0, 0, 0); + if ( v6 ) + v3 = pMapStats->pInfos[v6].pName; + else + v3 = "Unknown"; + sprintf(pTmpBuf, "%s\t100:\t110%s", pGlobalTXT_LocalizationStrings[531], v3); + a1.DrawText(pBookFont, 70, 10 * LOBYTE(pBookFont->uFontHeight) + 25, a5, pTmpBuf, 0, 0, 0); +} + + + +//----- (0041192C) -------------------------------------------------------- +void InitializeBookTextures() +{ + //signed int v0; // ebp@3 + //Texture **v1; // ebx@3 + + pAudioPlayer->StopChannels(-1, -1); + + ++pIcons_LOD->uTexturePacksCount; + if ( !pIcons_LOD->uNumPrevLoadedFiles ) + pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles; + + pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0); + pSpellBookPagesTextr_9 = pIcons_LOD->LoadTexturePtr("book", TEXTURE_16BIT_PALETTE); + pTexture_pagemask = pIcons_LOD->LoadTexturePtr("pagemask", TEXTURE_16BIT_PALETTE); + pTexture_506448 = pIcons_LOD->LoadTexturePtr("ib-m5-u", TEXTURE_16BIT_PALETTE); + ptr_506440 = pIcons_LOD->LoadTexturePtr("ib-m5-d", TEXTURE_16BIT_PALETTE); + pTexture_50643C = pIcons_LOD->LoadTexturePtr("ib-m6-u",TEXTURE_16BIT_PALETTE); + //v0 = 1; + + static const char *texNames[9] = + { + "SBFB00", "SBAB00", "SBWB00", "SBEB00", + "SBSB00", "SBMB00", "SBBB00", "SBLB00", + }; + + pTexture_506444 = pIcons_LOD->LoadTexturePtr("ib-m6-d",TEXTURE_16BIT_PALETTE); + for (uint i = 0; i < 8; ++i) + { + 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); + sprintf(pTmpBuf, "tab%db", i+1); + pTextures_tabs[i][1] = pIcons_LOD->LoadTexturePtr(pTmpBuf, TEXTURE_16BIT_PALETTE); + } +} + + + +//----- (00411AAA) -------------------------------------------------------- +void InitializeBookFonts() +{ + pAudioPlayer->StopChannels(-1, -1); + ++pIcons_LOD->uTexturePacksCount; + if ( !pIcons_LOD->uNumPrevLoadedFiles ) + pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles; + pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0); + pTexture_mapbordr = pIcons_LOD->LoadTexturePtr("mapbordr", TEXTURE_16BIT_PALETTE); + pBookFont = LoadFont("book.fnt", "FONTPAL", NULL); + pBook2Font = LoadFont("book2.fnt", "FONTPAL", NULL); + pAutonoteFont = LoadFont("autonote.fnt", "FONTPAL", NULL); + pSpellFont = LoadFont("spell.fnt", "FONTPAL", NULL); +} + + + //----- (00411300) -------------------------------------------------------- void LoadSpellbook(unsigned int spell_school) { @@ -85,7 +243,7 @@ } //----- (0041140B) -------------------------------------------------------- -GUIWindow *__cdecl sub_41140B() +GUIWindow *sub_41140B() { signed int v0; // esi@1 GUIButton *v1; // eax@3 @@ -120,7 +278,7 @@ } //----- (00411473) -------------------------------------------------------- -void __cdecl sub_411473() +void sub_411473() { pTexture_pagemask->Release(); pTexture_506448->Release(); @@ -137,7 +295,7 @@ //----- (00411597) -------------------------------------------------------- -void __cdecl OnCloseSpellBook() +void OnCloseSpellBook() { pAllocator->FreeChunk(pSpellFont); pSpellFont = 0; @@ -162,7 +320,7 @@ //----- (00412AF9) -------------------------------------------------------- void sub_412AF9() - { +{ int v0; // ecx@1 v0 = 0; @@ -174,7 +332,7 @@ } //----- (00412B58) -------------------------------------------------------- -void __cdecl DrawSpellBookContent() +void DrawSpellBookContent() { Player *v0; // ebx@1 int v1; // ebp@1 @@ -377,7 +535,7 @@ // 50654C: using guessed type int dword_50654C; //----- (00412E85) -------------------------------------------------------- -char __cdecl DrawBook_History() +void DrawBook_History() { unsigned int v0; // eax@3 unsigned int v1; // eax@7 @@ -433,7 +591,7 @@ a1.uFrameZ = game_viewport_z; a1.uFrameW = game_viewport_w; if ( v3 ) - a1.DrawTitleText(pBook2Font, 0, 0x16u, 0, v3, 3u); + a1.DrawTitleText(pBook2Font, 0, 22, 0, v3, 3); } a1.uFrameX = 48; a1.uFrameY = 70; @@ -477,15 +635,14 @@ if ( v7 ) { v9 = pAutonoteFont->_44C6C2(v8, &a1, 1u, (unsigned __int8)byte_5C6D50[dword_506528]); - LOBYTE(v8) = a1.DrawText(pAutonoteFont, 1, 0, 0, (const char *)v9, 0, a1.uFrameY + a1.uFrameHeight, 0); + a1.DrawText(pAutonoteFont, 1, 0, 0, (const char *)v9, 0, a1.uFrameY + a1.uFrameHeight, 0); ++num_achieved_awards; } - return (char)v8; } //----- (00413126) -------------------------------------------------------- -void __cdecl DrawBook_Quests() +void BookUI_Questbook_Draw() { unsigned int v0; // eax@3 unsigned int v1; // eax@7 @@ -534,7 +691,8 @@ a1.uFrameY = game_viewport_y; a1.uFrameZ = game_viewport_z; a1.uFrameW = game_viewport_w; - a1.DrawTitleText(pBook2Font, 0, 0x16u, 0, pGlobalTXT_LocalizationStrings[174], 3u); + a1.DrawTitleText(pBook2Font, 0, 22, ui_book_quests_title_color, pGlobalTXT_LocalizationStrings[174], 3); //"Current Quests" + a1.uFrameX = 48; a1.uFrameY = 70; a1.uFrameWidth = 360; @@ -568,7 +726,7 @@ v4 = achieved_awards[v3]; ++num_achieved_awards; v5 = pQuestTable[v4-1];//(&dword_722F10)[4 * v4]; - a1.DrawText(pAutonoteFont, 1, 0, 0, pQuestTable[v4-1], 0, 0, 0);//(&dword_722F10)[4 * v4], 0, 0, 0); + a1.DrawText(pAutonoteFont, 1, 0, ui_book_quests_text_color, pQuestTable[v4-1], 0, 0, 0);//(&dword_722F10)[4 * v4], 0, 0, 0); v6 = pAutonoteFont->CalcTextHeight(v5, &a1, 1, 0); v7 = a1.uFrameY + v6; if ( (signed int)(a1.uFrameY + v6) > (signed int)a1.uFrameHeight ) @@ -581,7 +739,7 @@ //----- (0041338E) -------------------------------------------------------- -void __cdecl DrawBook_Autonotes() +void BookUI_Autonotes_Draw() { unsigned int v0; // eax@3 unsigned int v1; // eax@7 @@ -795,10 +953,11 @@ a1.uFrameWidth = game_viewport_width; a1.uFrameHeight = game_viewport_height; a1.uFrameX = game_viewport_x; - a1.uFrameY = game_viewport_z; + a1.uFrameY = game_viewport_y; a1.uFrameZ = game_viewport_z; a1.uFrameW = game_viewport_w; - a1.DrawTitleText(pBook2Font, 0, 0x16u, 0, pGlobalTXT_LocalizationStrings[154], 3u); + a1.DrawTitleText(pBook2Font, 0, 22, ui_book_autonotes_title_color, pGlobalTXT_LocalizationStrings[154], 3); // "Auto notes" + a1.uFrameX = 48; a1.uFrameY = 70; a1.uFrameWidth = 360; @@ -875,7 +1034,7 @@ //v14 = (&dword_723718_autonote_related)[8 * v13]; v14 = pAutonoteTxt[v13-1].pText; //a1.DrawText(pAutonoteFont, 1, 0, 0, (&dword_723718_autonote_related)[8 * v13], 0, 0, 0); - a1.DrawText(pAutonoteFont, 1, 0, 0, pAutonoteTxt[v13-1].pText, 0, 0, 0); + a1.DrawText(pAutonoteFont, 1, 0, ui_book_autonotes_text_color, pAutonoteTxt[v13-1].pText, 0, 0, 0); v15 = pAutonoteFont->CalcTextHeight(v14, &a1, 1, 0); v16 = a1.uFrameY + v15; if ( (signed int)(a1.uFrameY + v15) > (signed int)a1.uFrameHeight ) @@ -888,9 +1047,8 @@ //----- (00413980) -------------------------------------------------------- -void DrawBook_Maps() - { - +void BookUI_Map_Draw() +{ int v6; // eax@31 unsigned int map_id; // eax@35 Texture *buttnTxtr; // [sp-4h] [bp-DCh]@3 @@ -1008,10 +1166,11 @@ map_window.uFrameW = game_viewport_w; map_id = pMapStats->GetMapInfo(pCurrentMapName); if ( map_id ) - map_window.DrawTitleText(pBook2Font, -14, 12, 0, pMapStats->pInfos[map_id].pName, 3); + map_window.DrawTitleText(pBook2Font, -14, 12, ui_book_map_title_color, pMapStats->pInfos[map_id].pName, 3); + map_window.uFrameX = 0; sprintf(party_coord, pGlobalTXT_LocalizationStrings[659], pParty->vPosition.x, pParty->vPosition.y); //"x: %d y: %d" - map_window.DrawTitleText(pFontComic, 0, 320, 0, party_coord, 0); + map_window.DrawTitleText(pFontComic, 0, 320, ui_book_map_coordinates_color, party_coord, 0); } //----- (00442955) -------------------------------------------------------- @@ -1518,19 +1677,3 @@ - -//----- (00413CC6) -------------------------------------------------------- -void DrawCurrentBook(unsigned int uBook) -{ - pRenderer->DrawTextureIndexed(471, 445, pIcons_LOD->GetTexture(uExitCancelTextureId)); - switch ((enum WindowType)uBook) - { - case WINDOW_LloydsBeacon: DrawLloydBeaconsScreen(); break; - case WINDOW_TownPortal: DrawTownPortalScreen(); break; - case WINDOW_QuestBook: DrawBook_Quests(); break; - case WINDOW_AutonotesBook: DrawBook_Autonotes(); break; - case WINDOW_MapsBook: DrawBook_Maps(); break; - case WINDOW_CalendarBook: DrawBook_Calendar(); break; - case WINDOW_HistoryBook: DrawBook_History(); break; - } -}
--- a/UICharacter.cpp Tue May 14 12:35:06 2013 +0200 +++ b/UICharacter.cpp Tue May 14 14:03:07 2013 +0200 @@ -45,33 +45,160 @@ -unsigned int ui_color_text_default; -unsigned int ui_color_text_highlight; -unsigned int ui_color_text_header; -unsigned int ui_color_text_bonus; -unsigned int ui_color_text_bonus_neg; -unsigned int ui_color_text_skill_upgradeable; -unsigned int ui_color_text_skill_not_upgradeable; -unsigned int ui_color_text_awards[6]; + +int bRingsShownInCharScreen; // 5118E0 + + + +unsigned int ui_character_default_text_color; +unsigned int ui_character_skill_highlight_color; +unsigned int ui_character_header_text_color; +unsigned int ui_character_bonus_text_color; +unsigned int ui_character_bonus_text_color_neg; +unsigned int ui_character_skill_upgradeable_color; +unsigned int ui_character_skill_default_color; +unsigned int ui_character_award_color[6]; + +unsigned int ui_game_minimap_outline_color; +unsigned int ui_game_minimap_actor_friendly_color; +unsigned int ui_game_minimap_actor_hostile_color; +unsigned int ui_game_minimap_actor_corpse_color; +unsigned int ui_game_minimap_decoration_color_1; +unsigned int ui_game_minimap_projectile_color; +unsigned int ui_game_minimap_treasure_color; + +unsigned int ui_book_quests_title_color; +unsigned int ui_book_quests_text_color; +unsigned int ui_book_autonotes_title_color; +unsigned int ui_book_autonotes_text_color; +unsigned int ui_book_map_title_color; +unsigned int ui_book_map_coordinates_color; void set_default_ui_skin() { - ui_color_text_default = TargetColor(255, 255, 255); - ui_color_text_highlight = TargetColor(255, 0, 0); - ui_color_text_header = TargetColor(255, 255, 155); - ui_color_text_bonus = TargetColor(0, 255, 0); - ui_color_text_bonus_neg = TargetColor(255, 0, 0); + ui_character_default_text_color = TargetColor(255, 255, 255); + ui_character_header_text_color = TargetColor(255, 255, 155); + ui_character_bonus_text_color = TargetColor(0, 255, 0); + ui_character_bonus_text_color_neg = TargetColor(255, 0, 0); + + ui_character_skill_upgradeable_color = TargetColor(0, 175, 255); + ui_character_skill_default_color = TargetColor(255, 0, 0); + ui_character_skill_highlight_color = TargetColor(255, 0, 0); + + ui_character_award_color[0] = TargetColor(248, 108, 160); + ui_character_award_color[1] = TargetColor(112, 220, 248); + ui_character_award_color[2] = TargetColor(192, 192, 240); + ui_character_award_color[3] = TargetColor( 64, 244, 96); + ui_character_award_color[4] = TargetColor(232, 244, 96); + ui_character_award_color[5] = TargetColor(240, 252, 192); + + ui_game_minimap_outline_color = TargetColor(0, 0, 255); + ui_game_minimap_actor_friendly_color = TargetColor(0, 255, 0); + ui_game_minimap_actor_hostile_color = TargetColor(255, 0, 0); + ui_game_minimap_actor_corpse_color = TargetColor(255, 255, 0); + ui_game_minimap_decoration_color_1 = TargetColor(255, 255, 255); + ui_game_minimap_projectile_color = TargetColor(255, 0, 0); + ui_game_minimap_treasure_color = TargetColor(0, 0, 255); + + ui_book_quests_title_color = TargetColor(255, 255, 255); + ui_book_quests_text_color = TargetColor(255, 255, 255); + ui_book_autonotes_title_color = TargetColor(255, 255, 255); + ui_book_autonotes_text_color = TargetColor(255, 255, 255); + ui_book_map_title_color = TargetColor(255, 255, 255); + ui_book_map_coordinates_color = TargetColor(255, 255, 255); +} + + + + +//----- (00421626) -------------------------------------------------------- +GUIWindow *CharacterUI_Initialize(unsigned int _this) +{ + GUIWindow *pWindow; // edi@3 + + ++pIcons_LOD->uTexturePacksCount; + if ( !pIcons_LOD->uNumPrevLoadedFiles ) + pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles; + + pEventTimer->Pause(); + pAudioPlayer->StopChannels(-1, -1); + bRingsShownInCharScreen = false; + CharacterUI_LoadPaperdollTextures(); + pCurrentScreen = _this; - ui_color_text_skill_upgradeable = TargetColor(0, 175, 255); - ui_color_text_skill_not_upgradeable = TargetColor(255, 0, 0); + pWindow = GUIWindow::Create(0, 0, 640, 480, WINDOW_CharacterRecord, uActiveCharacter, 0); + pCharacterScreen_StatsBtn = pWindow->CreateButton(pViewport->uViewportTL_X + 12, pViewport->uViewportTL_Y + 308, + pIcons_LOD->GetTexture(papredoll_dbrds[9])->uTextureWidth, + pIcons_LOD->GetTexture(papredoll_dbrds[9])->uTextureHeight, + 1, 0, UIMSG_ClickStatsBtn, 0, 'S', pGlobalTXT_LocalizationStrings[216],// Stats + pIcons_LOD->GetTexture(papredoll_dbrds[10]), + pIcons_LOD->GetTexture(papredoll_dbrds[9]), 0); + pCharacterScreen_SkillsBtn = pWindow->CreateButton(pViewport->uViewportTL_X + 102, pViewport->uViewportTL_Y + 308, + pIcons_LOD->GetTexture(papredoll_dbrds[7])->uTextureWidth, + pIcons_LOD->GetTexture(papredoll_dbrds[7])->uTextureHeight, + 1, 0, UIMSG_ClickSkillsBtn, 0, 'K', pGlobalTXT_LocalizationStrings[205],//Skills + pIcons_LOD->GetTexture(papredoll_dbrds[8]), + pIcons_LOD->GetTexture(papredoll_dbrds[7]), 0); + pCharacterScreen_InventoryBtn = pWindow->CreateButton(pViewport->uViewportTL_X + 192, pViewport->uViewportTL_Y + 308, + pIcons_LOD->GetTexture(papredoll_dbrds[5])->uTextureWidth, + pIcons_LOD->GetTexture(papredoll_dbrds[5])->uTextureHeight, + 1, 0, UIMSG_ClickInventoryBtn, 0, 'I', pGlobalTXT_LocalizationStrings[120], //Inventory + pIcons_LOD->GetTexture(papredoll_dbrds[6]), + pIcons_LOD->GetTexture(papredoll_dbrds[5]), 0); + pCharacterScreen_AwardsBtn = pWindow->CreateButton(pViewport->uViewportTL_X + 282, pViewport->uViewportTL_Y + 308, + pIcons_LOD->GetTexture(papredoll_dbrds[3])->uTextureWidth, + pIcons_LOD->GetTexture(papredoll_dbrds[3])->uTextureHeight, + 1, 0, UIMSG_ClickAwardsBtn, 0, 'A', pGlobalTXT_LocalizationStrings[22], //Awards + pIcons_LOD->GetTexture(papredoll_dbrds[4]), + pIcons_LOD->GetTexture(papredoll_dbrds[3]), 0); + pCharacterScreen_ExitBtn = pWindow->CreateButton(pViewport->uViewportTL_X + 371, pViewport->uViewportTL_Y + 308, + pIcons_LOD->GetTexture(papredoll_dbrds[1])->uTextureWidth, + pIcons_LOD->GetTexture(papredoll_dbrds[1])->uTextureHeight, + 1, 0, UIMSG_ClickExitCharacterWindowBtn, 0, 0, pGlobalTXT_LocalizationStrings[79],//Exit + pIcons_LOD->GetTexture(papredoll_dbrds[2]), + pIcons_LOD->GetTexture(papredoll_dbrds[1]), 0); + pWindow->CreateButton(0, 0, 0x1DCu, 0x159u, 1, 122, UIMSG_InventoryLeftClick, 0, 0, "", 0); + pCharacterScreen_DetalizBtn = pWindow->CreateButton(0x258u, 0x12Cu, 30, 30, 1, 0, UIMSG_ChangeDetaliz, 0, 0, pGlobalTXT_LocalizationStrings[64], 0); + pCharacterScreen_DollBtn = pWindow->CreateButton(0x1DCu, 0, 0xA4u, 0x159u, 1, 0, UIMSG_ClickPaperdoll, 0, 0, "", 0); - ui_color_text_awards[0] = TargetColor(248, 108, 160); - ui_color_text_awards[1] = TargetColor(112, 220, 248); - ui_color_text_awards[2] = TargetColor(192, 192, 240); - ui_color_text_awards[3] = TargetColor( 64, 244, 96); - ui_color_text_awards[4] = TargetColor(232, 244, 96); - ui_color_text_awards[5] = TargetColor(240, 252, 192); + pWindow->CreateButton( 61, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 1, '1', "", 0); + pWindow->CreateButton(177, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 2, '2', "", 0); + pWindow->CreateButton(292, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 3, '3', "", 0); + pWindow->CreateButton(407, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 4, '4', "", 0); + + pWindow->CreateButton(0, 0, 0, 0, 1, 0, UIMSG_CycleCharacters, 0, '\t', "", 0); + FillAwardsData(); + return pWindow; } +//----- (004219BE) -------------------------------------------------------- +GUIWindow *CastSpellInfo::sub_4219BE() +{ + GUIWindow *v2; // ebx@1 + + pEventTimer->Pause(); + pAudioPlayer->StopChannels(-1, -1); + bRingsShownInCharScreen = 0; + CharacterUI_LoadPaperdollTextures(); + pCurrentScreen = SCREEN_CASTING; + v2 = GUIWindow::Create(0, 0, 640, 480, WINDOW_CastSpell_InInventory, (int)this, 0); + pCharacterScreen_ExitBtn = v2->CreateButton(394, 318, 75, 33, 1, 0, UIMSG_ClickExitCharacterWindowBtn, 0, 0, + pGlobalTXT_LocalizationStrings[79], // Close + pIcons_LOD->GetTexture(papredoll_dbrds[2]), + pIcons_LOD->GetTexture(papredoll_dbrds[1]), 0); + v2->CreateButton(0, 0, 0x1DCu, 0x159u, 1, 122, UIMSG_InventoryLeftClick, 0, 0, "", 0); + pCharacterScreen_DollBtn = v2->CreateButton(0x1DCu, 0, 0xA4u, 0x159u, 1, 0, UIMSG_ClickPaperdoll, 0, 0, "", 0); + + v2->CreateButton( 61, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 1, '1', "", 0); + v2->CreateButton(177, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 2, '2', "", 0); + v2->CreateButton(292, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 3, '3', "", 0); + v2->CreateButton(407, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 4, '4', "", 0); + + return v2; +} + + + + static int CharacterUI_SkillsTab_Draw__DrawSkillTable(Player *player, int x, int y, int *skill_list, int skill_list_size, int right_margin, const char *skill_group_name) @@ -79,7 +206,7 @@ int y_offset = y; sprintf(pTmpBuf, "%s\r%03d%s", skill_group_name, right_margin, pGlobalTXT_LocalizationStrings[131]); //"Level" - pGUIWindow_CurrentMenu->DrawText(pFontArrus, x, y, ui_color_text_header, pTmpBuf, 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontArrus, x, y, ui_character_header_text_color, pTmpBuf, 0, 0, 0); int num_skills_drawn = 0; for (uint i = 0; i < skill_list_size; ++i) @@ -107,14 +234,14 @@ uint skill_color = 0; uint skill_mastery_color = 0; if (player->uSkillPoints > skill_level) - skill_color = ui_color_text_skill_upgradeable; + skill_color = ui_character_skill_upgradeable_color; if (pGUIWindow_CurrentMenu->pCurrentPosActiveItem == j) { if (player->uSkillPoints > skill_level) - skill_mastery_color = ui_color_text_bonus; + skill_mastery_color = ui_character_bonus_text_color; else - skill_mastery_color = ui_color_text_skill_not_upgradeable; + skill_mastery_color = ui_character_skill_default_color; skill_color = skill_mastery_color; } @@ -135,7 +262,7 @@ } if (!skill_mastery_color) - skill_mastery_color = ui_color_text_header; + skill_mastery_color = ui_character_header_text_color; sprintfex(pTmpBuf, "%s \f%05d%s\f%05d\r%03d%2d", pSkillNames[skill], skill_mastery_color, v46, skill_color, right_margin, skill_level); @@ -162,10 +289,10 @@ sprintfex(pTmpBuf, "%s \f%05d^Pv[%s]\f00000\r177%s: \f%05d%d\f00000", pGlobalTXT_LocalizationStrings[206], // Skills for - ui_color_text_header, + ui_character_header_text_color, player->pName, pGlobalTXT_LocalizationStrings[207], // Skill Points - player->uSkillPoints ? ui_color_text_bonus : ui_color_text_default, + player->uSkillPoints ? ui_character_bonus_text_color : ui_character_default_text_color, player->uSkillPoints); pGUIWindow_CurrentMenu->DrawText(pFontArrus, 24, 18, 0, pTmpBuf, 0, 0, 0); @@ -218,7 +345,7 @@ //int v22; // [sp+CCh] [bp-4h]@40 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->LoadTexturePtr("fr_award", TEXTURE_16BIT_PALETTE)); - sprintfex(pTmpBuf, "%s \f%05d", pGlobalTXT_LocalizationStrings[LOCSTR_AVARDS_FOR], ui_color_text_header); + sprintfex(pTmpBuf, "%s \f%05d", pGlobalTXT_LocalizationStrings[LOCSTR_AVARDS_FOR], ui_character_header_text_color); sprintfex(Source, pGlobalTXT_LocalizationStrings[LOCSTR_S_THE_S], player->pName, pClassNames[player->classType]); strcat(pTmpBuf, Source); strcat(pTmpBuf, "\f00000"); @@ -290,7 +417,7 @@ v6 = pTmpBuf; - a1.DrawText(pFontArrus, 0, 0, ui_color_text_awards[pAwards[v5].uPriority % 6], v6, 0, 0, 0); + a1.DrawText(pFontArrus, 0, 0, ui_character_award_color[pAwards[v5].uPriority % 6], v6, 0, 0, 0); a1.uFrameY = pFontArrus->CalcTextHeight(v6, &a1, 0, 0) + a1.uFrameY + 4; if (a1.uFrameY > a1.uFrameHeight) break; @@ -1951,12 +2078,12 @@ //pPlayer = &pParty->pPlayers[uPlayerID-1]; //pPlayer = player; pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->LoadTexturePtr("fr_stats", TEXTURE_16BIT_PALETTE)); - sprintf(pTmpBuf, "\f%05d", ui_color_text_header); + sprintf(pTmpBuf, "\f%05d", ui_character_header_text_color); sprintfex(pTmpBuf2, pGlobalTXT_LocalizationStrings[429], player->pName, pClassNames[player->classType]);//"^Pi[%s] %s" / "%s the %s" strcat(pTmpBuf, pTmpBuf2); sprintfex(pTmpBuf2, "\f00000\r180%s: \f%05d%d\f00000\n\n\n", pGlobalTXT_LocalizationStrings[207], // "Skill points" - player->uSkillPoints ? ui_color_text_bonus : ui_color_text_default, + player->uSkillPoints ? ui_character_bonus_text_color : ui_character_default_text_color, player->uSkillPoints); strcat(pTmpBuf, pTmpBuf2); pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, 18, 0, pTmpBuf, 0, 0, 0);
--- a/UIMainMenu.cpp Tue May 14 12:35:06 2013 +0200 +++ b/UIMainMenu.cpp Tue May 14 14:03:07 2013 +0200 @@ -78,6 +78,20 @@ memset(pVisibleWindowsIdxs, 0, sizeof(pVisibleWindowsIdxs)); } +//----- (004415C5) -------------------------------------------------------- +void LoadPartyBuffIcons() +{ + for (uint i = 0; i < 14; ++i) + { + char filename[200]; + sprintf(filename, "isn-%02d", i + 1); + pTextureIDs_PartyBuffIcons[i] = pIcons_LOD->LoadTexture(filename, TEXTURE_16BIT_PALETTE); + } + + uIconIdx_FlySpell = pIconsFrameTable->FindIcon("spell21"); + uIconIdx_WaterWalk = pIconsFrameTable->FindIcon("spell27"); +} + //----- (0041B690) -------------------------------------------------------- void __cdecl MainMenuUI_Create() {
--- a/UiGame.cpp Tue May 14 12:35:06 2013 +0200 +++ b/UiGame.cpp Tue May 14 14:03:07 2013 +0200 @@ -48,6 +48,8 @@ +int uTextureID_GameUI_CharSelectionFrame; // 50C98C + //----- (0041A57E) -------------------------------------------------------- void GameUI_QuickRef_Draw() @@ -116,14 +118,14 @@ v44 = 94 * v43 + 89; if ( v43 == 0 ) pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, 0x12u, 0, pGlobalTXT_LocalizationStrings[149], 60, 0);//Name - pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 94 * v43 + 89, 0x12u, ui_color_text_header, player->pName, 84, 0); + pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 94 * v43 + 89, 0x12u, ui_character_header_text_color, player->pName, 84, 0); if ( v43 == 0 ) pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, 0x2Fu, 0, pGlobalTXT_LocalizationStrings[131], 60, 0); //Óðîâ. sprintf(pTmpBuf, "%lu", player->GetActualLevel()); if ( player->GetActualLevel() <= player->GetBaseLevel()) v5 = player->GetExperienceDisplayColor(); else - v5 = ui_color_text_bonus; + v5 = ui_character_bonus_text_color; pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, 0x2Fu, v5, pTmpBuf, 84, 0); v6 = v45 + 47; if ( v43 == 0 ) @@ -187,7 +189,7 @@ if ( !v43 ) pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v31, 0, pGlobalTXT_LocalizationStrings[168], 60, 0);//Î÷êè sprintf(pTmpBuf, "%lu", player->uSkillPoints); - pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v31, player->uSkillPoints ? ui_color_text_bonus : ui_color_text_default, pTmpBuf, 84, 0); + pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v31, player->uSkillPoints ? ui_character_bonus_text_color : ui_character_default_text_color, pTmpBuf, 84, 0); v32 = v45 + v31; v48 = player->GetMajorConditionIdx(); if ( !v43 ) @@ -211,12 +213,12 @@ if ( v38 >= 0 ) { if ( v38 <= 5 ) - v39 = ui_color_text_default; + v39 = ui_character_default_text_color; else - v39 = ui_color_text_bonus_neg; + v39 = ui_character_bonus_text_color_neg; } else - v39 = ui_color_text_bonus; + v39 = ui_character_bonus_text_color; sprintf(pTmpBuf, "%s: \f%05d%s\f00000", pGlobalTXT_LocalizationStrings[180], v39, GetReputationString(v38));//Reputation pGUIWindow_CurrentMenu->DrawText(pFontArrus, 22, 323, 0, pTmpBuf, 0, 0, 0); @@ -1097,30 +1099,18 @@ //----- (0044158F) -------------------------------------------------------- -void __cdecl GameUI_DrawCharacterSelectionFrame() +void GameUI_DrawCharacterSelectionFrame() { if ( uActiveCharacter ) - pRenderer->DrawTextureTransparent(pPlayerPortraitsXCoords_For_PlayerBuffAnimsDrawing[uActiveCharacter - 1] - 9, - 380, &pIcons_LOD->pTextures[dword_50C98C]); + pRenderer->DrawTextureTransparent(pPlayerPortraitsXCoords_For_PlayerBuffAnimsDrawing[uActiveCharacter - 1] - 9, 380, + pIcons_LOD->GetTexture(uTextureID_GameUI_CharSelectionFrame)); } -//----- (004415C5) -------------------------------------------------------- -void LoadPartyBuffIcons() - { - for (uint i = 0; i < 14; ++i) - { - char filename[200]; - sprintf(filename, "isn-%02d", i + 1); - pTextureIDs_PartyBuffIcons[i] = pIcons_LOD->LoadTexture(filename, TEXTURE_16BIT_PALETTE); - } - uIconIdx_FlySpell = pIconsFrameTable->FindIcon("spell21"); - uIconIdx_WaterWalk = pIconsFrameTable->FindIcon("spell27"); - } //----- (0044162D) -------------------------------------------------------- -void __cdecl GameUI_DrawPartySpells() - { +void GameUI_DrawPartySpells() +{ unsigned int v0; // ebp@1 //signed int v1; // edi@1 //int v2; // eax@2 @@ -1142,7 +1132,6 @@ { auto tex = pIcons_LOD->GetTexture(pTextureIDs_PartyBuffIcons[i]); //v3 = pTextureIDs_PartyBuffIcons[i]; - if (tex) pRenderer->_4A65CC(pPartySpellbuffsUI_XYs[i][0], pPartySpellbuffsUI_XYs[i][1], tex, tex, v0 + 20 * pPartySpellbuffsUI_smthns[i], 0, 63); @@ -1156,20 +1145,20 @@ if (pParty->FlyActive()) { if ( pParty->bFlying ) - v7 = &pIcons_LOD->pTextures[pIconsFrameTable->GetFrame(uIconIdx_FlySpell, v0)->uTextureID]; + v7 = pIcons_LOD->GetTexture(pIconsFrameTable->GetFrame(uIconIdx_FlySpell, v0)->uTextureID); else - v7 = &pIcons_LOD->pTextures[pIconsFrameTable->GetFrame(uIconIdx_FlySpell, 0)->uTextureID]; + v7 = pIcons_LOD->GetTexture(pIconsFrameTable->GetFrame(uIconIdx_FlySpell, 0)->uTextureID); if ( pRenderer->pRenderD3D ) - pRenderer->DrawTextureIndexed(8u, 8u, v7); + pRenderer->DrawTextureIndexed(8, 8, v7); else - pRenderer->DrawTextureTransparent(8u, 8u, v7); + pRenderer->DrawTextureTransparent(8, 8, v7); } if (pParty->WaterWalkActive()) { if ( pParty->uFlags & PARTY_FLAGS_1_STANDING_ON_WATER) - v9 = &pIcons_LOD->pTextures[pIconsFrameTable->GetFrame(uIconIdx_WaterWalk, v0)->uTextureID]; + v9 = pIcons_LOD->GetTexture(pIconsFrameTable->GetFrame(uIconIdx_WaterWalk, v0)->uTextureID); else - v9 = &pIcons_LOD->pTextures[pIconsFrameTable->GetFrame(uIconIdx_WaterWalk, 0)->uTextureID]; + v9 = pIcons_LOD->GetTexture(pIconsFrameTable->GetFrame(uIconIdx_WaterWalk, 0)->uTextureID); if ( pRenderer->pRenderD3D ) pRenderer->DrawTextureIndexed(396u, 8u, v9); else @@ -1193,65 +1182,6 @@ } -//----- (00421626) -------------------------------------------------------- -GUIWindow *GameUI_InitializeCharacterWindow(unsigned int _this) -{ - unsigned int v1; // edi@1 - GUIWindow *pWindow; // edi@3 - - ++pIcons_LOD->uTexturePacksCount; - v1 = _this; - if ( !pIcons_LOD->uNumPrevLoadedFiles ) - pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles; - pEventTimer->Pause(); - pAudioPlayer->StopChannels(-1, -1); - bRingsShownInCharScreen = 0; - CharacterUI_LoadPaperdollTextures(); - pCurrentScreen = v1; - - pWindow = GUIWindow::Create(0, 0, 640, 480, WINDOW_CharacterRecord, uActiveCharacter, 0); - pCharacterScreen_StatsBtn = pWindow->CreateButton(pViewport->uViewportTL_X + 12, pViewport->uViewportTL_Y + 308, - pIcons_LOD->GetTexture(papredoll_dbrds[9])->uTextureWidth, - pIcons_LOD->GetTexture(papredoll_dbrds[9])->uTextureHeight, - 1, 0, UIMSG_ClickStatsBtn, 0, 'S', pGlobalTXT_LocalizationStrings[216],// Stats - pIcons_LOD->GetTexture(papredoll_dbrds[10]), - pIcons_LOD->GetTexture(papredoll_dbrds[9]), 0); - pCharacterScreen_SkillsBtn = pWindow->CreateButton(pViewport->uViewportTL_X + 102, pViewport->uViewportTL_Y + 308, - pIcons_LOD->GetTexture(papredoll_dbrds[7])->uTextureWidth, - pIcons_LOD->GetTexture(papredoll_dbrds[7])->uTextureHeight, - 1, 0, UIMSG_ClickSkillsBtn, 0, 'K', pGlobalTXT_LocalizationStrings[205],//Skills - pIcons_LOD->GetTexture(papredoll_dbrds[8]), - pIcons_LOD->GetTexture(papredoll_dbrds[7]), 0); - pCharacterScreen_InventoryBtn = pWindow->CreateButton(pViewport->uViewportTL_X + 192, pViewport->uViewportTL_Y + 308, - pIcons_LOD->GetTexture(papredoll_dbrds[5])->uTextureWidth, - pIcons_LOD->GetTexture(papredoll_dbrds[5])->uTextureHeight, - 1, 0, UIMSG_ClickInventoryBtn, 0, 'I', pGlobalTXT_LocalizationStrings[120], //Inventory - pIcons_LOD->GetTexture(papredoll_dbrds[6]), - pIcons_LOD->GetTexture(papredoll_dbrds[5]), 0); - pCharacterScreen_AwardsBtn = pWindow->CreateButton(pViewport->uViewportTL_X + 282, pViewport->uViewportTL_Y + 308, - pIcons_LOD->GetTexture(papredoll_dbrds[3])->uTextureWidth, - pIcons_LOD->GetTexture(papredoll_dbrds[3])->uTextureHeight, - 1, 0, UIMSG_ClickAwardsBtn, 0, 'A', pGlobalTXT_LocalizationStrings[22], //Awards - pIcons_LOD->GetTexture(papredoll_dbrds[4]), - pIcons_LOD->GetTexture(papredoll_dbrds[3]), 0); - pCharacterScreen_ExitBtn = pWindow->CreateButton(pViewport->uViewportTL_X + 371, pViewport->uViewportTL_Y + 308, - pIcons_LOD->GetTexture(papredoll_dbrds[1])->uTextureWidth, - pIcons_LOD->GetTexture(papredoll_dbrds[1])->uTextureHeight, - 1, 0, UIMSG_ClickExitCharacterWindowBtn, 0, 0, pGlobalTXT_LocalizationStrings[79],//Exit - pIcons_LOD->GetTexture(papredoll_dbrds[2]), - pIcons_LOD->GetTexture(papredoll_dbrds[1]), 0); - pWindow->CreateButton(0, 0, 0x1DCu, 0x159u, 1, 122, UIMSG_InventoryLeftClick, 0, 0, "", 0); - pCharacterScreen_DetalizBtn = pWindow->CreateButton(0x258u, 0x12Cu, 0x1Eu, 0x1Eu, 1, 0, UIMSG_ChangeDetaliz, 0, 0, pGlobalTXT_LocalizationStrings[64], 0); - pCharacterScreen_DollBtn = pWindow->CreateButton(0x1DCu, 0, 0xA4u, 0x159u, 1, 0, UIMSG_ClickPaperdoll, 0, 0, "", 0); - pWindow->CreateButton(0x3Du, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 1, '1', "", 0); - pWindow->CreateButton(0xB1u, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 2, '2', "", 0); - pWindow->CreateButton(0x124u, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 3, '3', "", 0); - pWindow->CreateButton(0x197u, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 4, '4', "", 0); - pWindow->CreateButton(0, 0, 0, 0, 1, 0, UIMSG_CycleCharacters, 0, '\t', "", 0); - FillAwardsData(); - return pWindow; -} - //----- (004921C1) -------------------------------------------------------- void GameUI_DrawPortraits(unsigned int _this) @@ -1457,16 +1387,16 @@ //signed int v57; // [sp-4h] [bp-58h]@54 //unsigned __int16 v58; // [sp-4h] [bp-58h]@77 unsigned __int16 v59; // [sp-4h] [bp-58h]@100 - unsigned __int16 v60; // [sp+10h] [bp-44h]@66 - unsigned int v61; // [sp+10h] [bp-44h]@85 - unsigned int v63; // [sp+14h] [bp-40h]@85 - unsigned int v65; // [sp+18h] [bp-3Ch]@85 + //unsigned __int16 v60; // [sp+10h] [bp-44h]@66 + //unsigned int v61; // [sp+10h] [bp-44h]@85 + //unsigned int v63; // [sp+14h] [bp-40h]@85 + //unsigned int v65; // [sp+18h] [bp-3Ch]@85 unsigned int lPitch; // [sp+20h] [bp-34h]@1 unsigned int lPitcha; // [sp+20h] [bp-34h]@23 char *lPitchb; // [sp+20h] [bp-34h]@106 unsigned int v69; // [sp+24h] [bp-30h]@23 signed int v70; // [sp+24h] [bp-30h]@37 - unsigned __int16 uBlue; // [sp+28h] [bp-2Ch]@1 + //unsigned __int16 uBlue; // [sp+28h] [bp-2Ch]@1 signed int uBluea; // [sp+28h] [bp-2Ch]@37 int v73; // [sp+2Ch] [bp-28h]@30 int v76; // [sp+34h] [bp-20h]@91 @@ -1483,15 +1413,15 @@ float uWb; // [sp+60h] [bp+Ch]@30 unsigned int uWd; // [sp+60h] [bp+Ch]@95 float uZooma; // [sp+64h] [bp+10h]@117 - unsigned int flagsb; // [sp+68h] [bp+14h]@66 + //unsigned int flagsb; // [sp+68h] [bp+14h]@66 Actor *flagsc; // [sp+68h] [bp+14h]@86 - unsigned int flagsd; // [sp+68h] [bp+14h]@105 + //unsigned int flagsd; // [sp+68h] [bp+14h]@105 uCenterX = (uX + uZ) / 2; uCenterY = (uY + uW) / 2; lPitch = pRenderer->uTargetSurfacePitch; - TargetColor(0, 0, 0); - uBlue = TargetColor(0, 0, 0xFFu); + //TargetColor(0, 0, 0); + //uBlue = TargetColor(0, 0, 0xFFu); auto bWizardEyeActive = pParty->WizardEyeActive(); auto uWizardEyeSkillLevel = pParty->WizardEyeSkillLevel(); if (CheckHiredNPCSpeciality(Cartographer)) @@ -1660,7 +1590,7 @@ - ((signed int)(((unsigned int)((unsigned __int64)((signed int)uZoom * (signed __int64)pIndoor->pVertices[pOutline->uVertex2ID].y) >> 16) << 16) - uZoom * pParty->vPosition.y) >> 16), - uBlue); + ui_game_minimap_outline_color); } } @@ -1672,8 +1602,8 @@ uint arrow_idx = floorf(0.5f + 7 * angle); pRenderer->DrawTextureTransparent(uCenterX - 3, uCenterY - 3, pIcons_LOD->GetTexture(pTextureIDs_pMapDirs[arrow_idx])); - flagsb = TargetColor(0, 0, 255); - v60 = TargetColor(255, 0, 0); + //flagsb = TargetColor(0, 0, 255); + //v60 = TargetColor(255, 0, 0); if (bWizardEyeActive) { //uZe = 0; @@ -1700,24 +1630,23 @@ assert(uZoom >= 512); if (pObjectList->pObjects[object->uObjectDescID].uFlags & OBJECT_DESC_UNPICKABLE) { - pRenderer->RasterLine2D(v37, v38, - v37, v38, v60); + pRenderer->RasterLine2D(v37, v38, v37, v38, ui_game_minimap_projectile_color); } else if (uZoom > 512) { - pRenderer->RasterLine2D(v37 - 1, v38 - 1, v37 - 1, v38 + 1, flagsb); - pRenderer->RasterLine2D(v37, v38 - 2, v37, v38 + 1, flagsb); - pRenderer->RasterLine2D(v37 + 1, v38 - 1, v37 + 1, v38 + 1, flagsb); - pRenderer->RasterLine2D(v37 - 2, v38, v37 - 2, v38 + 1, flagsb); + pRenderer->RasterLine2D(v37 - 1, v38 - 1, v37 - 1, v38 + 1, ui_game_minimap_treasure_color); + pRenderer->RasterLine2D(v37, v38 - 2, v37, v38 + 1, ui_game_minimap_treasure_color); + pRenderer->RasterLine2D(v37 + 1, v38 - 1, v37 + 1, v38 + 1, ui_game_minimap_treasure_color); + pRenderer->RasterLine2D(v37 - 2, v38, v37 - 2, v38 + 1, ui_game_minimap_treasure_color); pRenderer->RasterLine2D(v37 + 2, v38, - v37 + 2, v38 + 1, flagsb); + v37 + 2, v38 + 1, ui_game_minimap_treasure_color); } else { pRenderer->RasterLine2D(v37 - 1, v38 - 1, - v37 - 1, v38, flagsb); + v37 - 1, v38, ui_game_minimap_treasure_color); pRenderer->RasterLine2D(v37, v38 - 1, - v37, v38, flagsb); + v37, v38, ui_game_minimap_treasure_color); } //LABEL_82: //LABEL_83: @@ -1732,9 +1661,9 @@ LABEL_85: - v63 = TargetColor(255, 0, 0); - v61 = TargetColor(0, 255, 0); - v65 = TargetColor(255, 255, 0); + //v63 = TargetColor(255, 0, 0); + //v61 = TargetColor(0, 255, 0); + //v65 = TargetColor(255, 255, 0); uZf = 0; if ( (signed int)uNumActors > 0 ) { @@ -1754,11 +1683,11 @@ { if ( v40 <= pRenderer->raster_clip_z && v41 >= pRenderer->raster_clip_y && v41 <= pRenderer->raster_clip_w ) { - uWd = v61; + uWd = ui_game_minimap_actor_friendly_color; if ( BYTE3(flagsc->uAttributes) & 1 ) - uWd = v63; - if ( flagsc->uAIState == 5 ) - uWd = v65; + uWd = ui_game_minimap_actor_hostile_color; + if ( flagsc->uAIState == Dead) + uWd = ui_game_minimap_actor_corpse_color; if ( (signed int)uZoom > 1024 ) { pRenderer->RasterLine2D(v40 - 1, v41 - 2, v40 - 1, v41 + 2, uWd); @@ -1794,7 +1723,7 @@ } - flagsd = TargetColor(255, 255, 255); + //flagsd = TargetColor(255, 255, 255); uZg = 0; if ( (signed int)uNumLevelDecorations > 0 ) { @@ -1816,14 +1745,14 @@ { v48 = v47 + 1; v49 = v47 - 1; - pRenderer->RasterLine2D(v46 - 1, v47 - 1, v46 - 1, v47 + 1, flagsd); - pRenderer->RasterLine2D(v46, v49, v46, v48, flagsd); - pRenderer->RasterLine2D(v46 + 1, v49, v46 + 1, v48, flagsd); + pRenderer->RasterLine2D(v46 - 1, v47 - 1, v46 - 1, v47 + 1, ui_game_minimap_decoration_color_1); + pRenderer->RasterLine2D(v46, v49, v46, v48, ui_game_minimap_decoration_color_1); + pRenderer->RasterLine2D(v46 + 1, v49, v46 + 1, v48, ui_game_minimap_decoration_color_1); v45 = lPitchb; } else { - pRenderer->RasterLine2D(v46, uCenterY - v77, v46, uCenterY - v77, flagsd); + pRenderer->RasterLine2D(v46, uCenterY - v77, v46, uCenterY - v77, ui_game_minimap_decoration_color_1); } } }
--- a/mm7_1.cpp Tue May 14 12:35:06 2013 +0200 +++ b/mm7_1.cpp Tue May 14 14:03:07 2013 +0200 @@ -671,32 +671,7 @@ } } -//----- (004219BE) -------------------------------------------------------- -GUIWindow *CastSpellInfo::sub_4219BE() -{ - int v1; // esi@1 - GUIWindow *v2; // ebx@1 - auto a4 = this; - v1 = (int)a4; - pEventTimer->Pause(); - pAudioPlayer->StopChannels(-1, -1); - bRingsShownInCharScreen = 0; - CharacterUI_LoadPaperdollTextures(); - pCurrentScreen = SCREEN_CASTING; - v2 = GUIWindow::Create(0, 0, 640, 480, WINDOW_CastSpell_InInventory, v1, 0); - pCharacterScreen_ExitBtn = v2->CreateButton(394, 318, 75, 33, 1, 0, UIMSG_ClickExitCharacterWindowBtn, 0, 0, - pGlobalTXT_LocalizationStrings[79], // Close - pIcons_LOD->GetTexture(papredoll_dbrds[2]), - pIcons_LOD->GetTexture(papredoll_dbrds[1]), 0); - v2->CreateButton(0, 0, 0x1DCu, 0x159u, 1, 122, UIMSG_InventoryLeftClick, 0, 0, "", 0); - pCharacterScreen_DollBtn = v2->CreateButton(0x1DCu, 0, 0xA4u, 0x159u, 1, 0, UIMSG_ClickPaperdoll, 0, 0, "", 0); - v2->CreateButton( 61, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 1, '1', "", 0); - v2->CreateButton(177, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 2, '2', "", 0); - v2->CreateButton(292, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 3, '3', "", 0); - v2->CreateButton(407, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 4, '4', "", 0); - return v2; -} //----- (00421B2C) -------------------------------------------------------- bool __cdecl sub_421B2C_PlaceInInventory_or_DropPickedItem() @@ -838,7 +813,7 @@ } v5 = 7; //LABEL_22: - pGUIWindow_CurrentMenu = GameUI_InitializeCharacterWindow(v5); + pGUIWindow_CurrentMenu = CharacterUI_Initialize(v5); return; } if ( pCurrentScreen == SCREEN_SPELL_BOOK ) @@ -908,7 +883,7 @@ pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 103; v5 = 14; //goto LABEL_22; - pGUIWindow_CurrentMenu = GameUI_InitializeCharacterWindow(v5); + pGUIWindow_CurrentMenu = CharacterUI_Initialize(v5); return; } } @@ -1342,7 +1317,7 @@ pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_NPCRight], "IB-NPCRD-C", 2); pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_ZoomIn], "ib-autout-C", 2); pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_ZoomOut], "ib-autin-C", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_50C98C], "IB-selec-C", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_GameUI_CharSelectionFrame], "IB-selec-C", 2); pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_CastSpell], "ib-m1d-c", 2); pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_Rest], "ib-m2d-c", 2); pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_QuickReference], "ib-m3d-c", 2); @@ -1389,7 +1364,7 @@ uTextureID_Btn_NPCRight = pIcons_LOD->LoadTexture("IB-NPCRD-C", TEXTURE_16BIT_PALETTE); uTextureID_Btn_ZoomIn = pIcons_LOD->LoadTexture("ib-autout-C", TEXTURE_16BIT_PALETTE); uTextureID_Btn_ZoomOut = pIcons_LOD->LoadTexture("ib-autin-C", TEXTURE_16BIT_PALETTE); - dword_50C98C = pIcons_LOD->LoadTexture("IB-selec-C", TEXTURE_16BIT_PALETTE); + uTextureID_GameUI_CharSelectionFrame = pIcons_LOD->LoadTexture("IB-selec-C", TEXTURE_16BIT_PALETTE); uTextureID_Btn_CastSpell = pIcons_LOD->LoadTexture("ib-m1d-c", TEXTURE_16BIT_PALETTE); uTextureID_Btn_Rest = pIcons_LOD->LoadTexture("ib-m2d-c", TEXTURE_16BIT_PALETTE); uTextureID_Btn_QuickReference = pIcons_LOD->LoadTexture("ib-m3d-c", TEXTURE_16BIT_PALETTE); @@ -1430,7 +1405,7 @@ pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_NPCRight], "IB-NPCRD-a", 2); pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_ZoomIn], "ib-autout-a", 2); pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_ZoomOut], "ib-autin-a", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_50C98C], "IB-selec-a", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_GameUI_CharSelectionFrame], "IB-selec-a", 2); pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_CastSpell], "ib-m1d-a", 2); pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_Rest], "ib-m2d-a", 2); pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_QuickReference], "ib-m3d-a", 2); @@ -1472,7 +1447,7 @@ dword_5079CC = pIcons_LOD->LoadTexture("IB-InitR-a", TEXTURE_16BIT_PALETTE); uTextureID_Btn_NPCLeft = pIcons_LOD->LoadTexture("IB-NPCLD-A", TEXTURE_16BIT_PALETTE); uTextureID_Btn_NPCRight = pIcons_LOD->LoadTexture("IB-NPCRD-A", TEXTURE_16BIT_PALETTE); - dword_50C98C = pIcons_LOD->LoadTexture("IB-selec-A", TEXTURE_16BIT_PALETTE); + uTextureID_GameUI_CharSelectionFrame = pIcons_LOD->LoadTexture("IB-selec-A", TEXTURE_16BIT_PALETTE); uTextureID_Btn_CastSpell = pIcons_LOD->LoadTexture("ib-m1d-a", TEXTURE_16BIT_PALETTE); uTextureID_Btn_Rest = pIcons_LOD->LoadTexture("ib-m2d-a", TEXTURE_16BIT_PALETTE); uTextureID_Btn_QuickReference = pIcons_LOD->LoadTexture("ib-m3d-a", TEXTURE_16BIT_PALETTE); @@ -1526,7 +1501,7 @@ pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_NPCRight], "IB-NPCRD-B", 2); pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_ZoomIn], "ib-autout-B", 2); pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_ZoomOut], "ib-autin-B", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_50C98C], "IB-selec-B", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_GameUI_CharSelectionFrame], "IB-selec-B", 2); pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_CastSpell], "ib-m1d-b", 2); pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_Rest], "ib-m2d-b", 2); pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_QuickReference], "ib-m3d-b", 2);
--- a/mm7_5.cpp Tue May 14 12:35:06 2013 +0200 +++ b/mm7_5.cpp Tue May 14 14:03:07 2013 +0200 @@ -9990,86 +9990,8 @@ return pGlobalTXT_LocalizationStrings[567]; } -//----- (00413D6F) -------------------------------------------------------- -char __cdecl DrawBook_Calendar() -{ - unsigned int v0; // esi@1 - char *v1; // eax@5 - int v2; // ecx@5 - char *v3; // eax@6 - GUIWindow a1; // [sp+Ch] [bp-60h]@5 - unsigned int v6; // [sp+60h] [bp-Ch]@1 - int v7; // [sp+64h] [bp-8h]@1 - int a5; // [sp+68h] [bp-4h]@1 - - v0 = pParty->uCurrentHour; - v6 = pMapStats->GetMapInfo(pCurrentMapName); - a5 = TargetColor(0x4Bu, 0x4Bu, 0x4Bu); - pRenderer->DrawTextureIndexed(pViewport->uViewportTL_X, pViewport->uViewportTL_Y, pSpellBookPagesTextr_13); - v7 = (unsigned __int8)pDayMoonPhase[pParty->uDaysPlayed]; - if ( (signed int)v0 <= 12 ) - { - if ( !v0 ) - v0 = 12; - } - else - { - v0 -= 12; - } - a1.uFrameX = game_viewport_x; - a1.uFrameY = game_viewport_y; - a1.uFrameWidth = game_viewport_width; - a1.uFrameHeight = game_viewport_height; - a1.uFrameZ = game_viewport_z; - a1.uFrameW = game_viewport_w; - a1.DrawTitleText(pBook2Font, 0, 0x16u, 0, pGlobalTXT_LocalizationStrings[186], 3u); - if ( pParty->uCurrentHour >= 12 ) - { - if ( pParty->uCurrentHour >= 24 ) - v2=0; - else - v2=1; - } - else - v2=0; - v1 = GetDayPart(); - sprintf( - pTmpBuf, - "%s\t100:\t110%d:%02d %s - %s", - pGlobalTXT_LocalizationStrings[526], - v0, - pParty->uCurrentMinute, - aAMPMNames[v2], - v1); - a1.DrawText(pBookFont, 70, 55, a5, pTmpBuf, 0, 0, 0); - sprintf( - pTmpBuf, - "%s\t100:\t110%d - %s", - pGlobalTXT_LocalizationStrings[56], - pParty->uDaysPlayed + 1, - aDayNames[pParty->uDaysPlayed % 7]); - a1.DrawText(pBookFont, 70, 2 * LOBYTE(pBookFont->uFontHeight) + 49, a5, pTmpBuf, 0, 0, 0); - sprintf( - pTmpBuf, - "%s\t100:\t110%d - %s", - pGlobalTXT_LocalizationStrings[146], - pParty->uCurrentMonth + 1, - aMonthNames[pParty->uCurrentMonth]); - a1.DrawText(pBookFont, 70, 4 * LOBYTE(pBookFont->uFontHeight) + 43, a5, pTmpBuf, 0, 0, 0); - sprintf(pTmpBuf, "%s\t100:\t110%d", pGlobalTXT_LocalizationStrings[245], pParty->uCurrentYear); - a1.DrawText(pBookFont, 70, 6 * LOBYTE(pBookFont->uFontHeight) + 37, a5, pTmpBuf, 0, 0, 0); - sprintf(pTmpBuf, "%s\t100:\t110%s", pGlobalTXT_LocalizationStrings[530], aMoonPhaseNames[v7]); - a1.DrawText(pBookFont, 70, 8 * LOBYTE(pBookFont->uFontHeight) + 31, a5, pTmpBuf, 0, 0, 0); - if ( v6 ) - v3 = pMapStats->pInfos[v6].pName; - else - v3 = "Unknown"; - sprintf(pTmpBuf, "%s\t100:\t110%s", pGlobalTXT_LocalizationStrings[531], v3); - return a1.DrawText(pBookFont, 70, 10 * LOBYTE(pBookFont->uFontHeight) + 25, a5, pTmpBuf, 0, 0, 0); -} - //----- (00413FF1) -------------------------------------------------------- -void __cdecl SetMonthNames() +void SetMonthNames() { aMonthNames[0] = pGlobalTXT_LocalizationStrings[415]; aMonthNames[1] = pGlobalTXT_LocalizationStrings[416]; @@ -10086,7 +10008,7 @@ } //----- (0041406F) -------------------------------------------------------- -void __cdecl SetDayNames() +void SetDayNames() { aDayNames[0] = pGlobalTXT_LocalizationStrings[145]; aDayNames[1] = pGlobalTXT_LocalizationStrings[230]; @@ -10098,7 +10020,7 @@ } //----- (004140BB) -------------------------------------------------------- -void __cdecl SetSpellSchoolNames() +void SetSpellSchoolNames() { aSpellSchoolNames[0] = pGlobalTXT_LocalizationStrings[87]; aSpellSchoolNames[1] = pGlobalTXT_LocalizationStrings[6]; @@ -10112,7 +10034,7 @@ } //----- (0041411B) -------------------------------------------------------- -void __cdecl SetAttributeNames() +void SetAttributeNames() { aAttributeNames[0] = pGlobalTXT_LocalizationStrings[144]; aAttributeNames[1] = pGlobalTXT_LocalizationStrings[116]; @@ -10124,13 +10046,13 @@ } //----- (00414162) -------------------------------------------------------- -void __cdecl uGameUIFontMain_initialize() +void uGameUIFontMain_initialize() { uGameUIFontMain = TargetColor(0xAu, 0, 0); } //----- (00414174) -------------------------------------------------------- -void __cdecl uGameUIFontShadow_initialize() +void uGameUIFontShadow_initialize() { uGameUIFontShadow = TargetColor(0xE6u, 214u, 193u); } @@ -10276,7 +10198,7 @@ } case WINDOW_Book: { - DrawCurrentBook((unsigned int)pWindow->ptr_1C); + BookUI_Draw((WindowType)(int)pWindow->ptr_1C); continue; } case WINDOW_Dialogue:
--- a/mm7_data.cpp Tue May 14 12:35:06 2013 +0200 +++ b/mm7_data.cpp Tue May 14 14:03:07 2013 +0200 @@ -1594,7 +1594,6 @@ unsigned int uIconID_TurnStop; unsigned int uIconID_TurnHour; int uIconID_CharacterFrame; // idb -int dword_50C98C; // weak unsigned int uIconID_TurnStart; int dword_50C994; // weak int dword_50C998_turnbased_icon_1A; // weak @@ -1629,13 +1628,7 @@ int papredoll_flying_feet[777]; // idb int paperdoll_boots_texture[4][6];//0x511638 int paperdoll_cloak_collar_texture[4][10]; // weak -//int dword_51179C; // weak -//int dword_5117A0; // weak -//int dword_5117A4; // weak -//int dword_5117A8; // weak -//int dword_5117AC; // weak int paperdoll_cloak_texture[4][10]; -int bRingsShownInCharScreen; // weak int _unused000; // weak unsigned __int16 pOdmMinimap[117][137];
--- a/mm7_data.h Tue May 14 12:35:06 2013 +0200 +++ b/mm7_data.h Tue May 14 14:03:07 2013 +0200 @@ -1022,7 +1022,6 @@ extern unsigned int uIconID_TurnStop; extern unsigned int uIconID_TurnHour; extern int uIconID_CharacterFrame; // idb -extern int dword_50C98C; // weak extern unsigned int uIconID_TurnStart; extern int dword_50C994; // weak extern int dword_50C998_turnbased_icon_1A; // weak @@ -1546,26 +1545,12 @@ void __fastcall ZBuffer_DoFill(int *pZBuffer, Texture *pTex, int uZValue); void __fastcall sub_40F92A(int *pZBuffer, struct Texture *a2, int a3); // idb void __cdecl SetMoonPhaseNames(); -void DrawSpellDescriptionPopup(int spell_index); signed int __fastcall sub_410D99_get_map_index(int a1); -unsigned int __cdecl DrawLloydBeaconsScreen(); -void DrawTownPortalScreen(); -void LoadSpellbook(unsigned int uID); // idb struct GUIWindow *__cdecl sub_41140B(); void __cdecl sub_411473(); -void __cdecl OnCloseSpellBook(); -void __cdecl InitializeBookTextures(); -void __cdecl InitializeBookFonts(); void __fastcall LoadThumbnailLloydTexture(unsigned int uSlot, unsigned int uPlayer); void sub_412AF9(); -void DrawSpellBookContent(); -char DrawBook_History(); -void DrawBook_Quests(); -void DrawBook_Autonotes(); -void DrawBook_Maps(); -void DrawCurrentBook(unsigned int uBook); // idb char *GetDayPart(); -char DrawBook_Calendar(); void SetAttributeNames(); void uGameUIFontMain_initialize(); void uGameUIFontShadow_initialize(); @@ -1611,7 +1596,6 @@ void __fastcall party_finds_gold(unsigned int uNumGold, int _1_dont_share_with_followers___2_the_same_but_without_a_message__else_normal); // idb void OnChestLeftClick(); void __cdecl GameUI_WritePointedObjectStatusString(); -struct GUIWindow *__thiscall GameUI_InitializeCharacterWindow(unsigned int _this); struct GUIWindow *__thiscall sub_4219BE(void *a4); bool __cdecl sub_421B2C_PlaceInInventory_or_DropPickedItem(); void __fastcall GameUI_OnPlayerPortraitLeftClick(unsigned int uPlayerID); // idb @@ -1692,12 +1676,8 @@ void __fastcall sub_4406BC(unsigned int node_id, unsigned int uFirstNode); // idb void __fastcall sub_440BED(struct IndoorLocation_drawstru *_this); bool sub_44100D(); -void GameUI_DrawTorchlightAndWizardEye(); -void GameUI_DrawCharacterSelectionFrame(); void LoadPartyBuffIcons(); -void GameUI_DrawPartySpells(); __int16 __fastcall sub_441A4E(int a1); -void GameUI_DrawMinimap(unsigned int uX, unsigned int uY, unsigned int uZ, unsigned int uW, unsigned int uZoom, unsigned int bRedrawOdmMinimap); void DrawBook_Map_sub(unsigned int tl_x, unsigned int tl_y, unsigned int br_x, int br_y, int _48074); // idb void Initialize2DA();