Mercurial > mm7
changeset 1762:2b8b748a222a
Слияние
author | Ritor1 |
---|---|
date | Tue, 01 Oct 2013 09:33:38 +0600 |
parents | 5be18330f9a3 (current diff) 24e756a50073 (diff) |
children | 20223822fabc |
files | |
diffstat | 8 files changed, 295 insertions(+), 383 deletions(-) [+] |
line wrap: on
line diff
--- a/GUIWindow.cpp Tue Oct 01 09:33:29 2013 +0600 +++ b/GUIWindow.cpp Tue Oct 01 09:33:38 2013 +0600 @@ -230,7 +230,7 @@ Y_pos = string_count * pFontComic->uFontHeight + 40; text_color = TargetColor(spell_tooltip_colors[i].R, spell_tooltip_colors[i].G, spell_tooltip_colors[i].B); DrawText(pFontComic, 52, Y_pos, text_color, aSpellNames[i], 0, 0, 0); - sub_41D20D_buff_remaining_time_string(Y_pos, this, remaing_time, pFontComic); + DrawBuff_remaining_time_string(Y_pos, this, remaing_time, pFontComic); ++string_count; } } @@ -1063,74 +1063,57 @@ } //----- (004B1854) -------------------------------------------------------- -void GUIWindow::DrawCurrentTime( __int64 a2 ) - { - unsigned int v2; // edi@1 - unsigned int v3; // esi@1 - unsigned int v4; // ebp@1 - unsigned int v5; // ebx@1 - signed __int64 v6; // ST2C_8@1 - signed __int64 v7; // kr00_8@1 - char *v8; // eax@2 - char *v9; // eax@7 - char *v10; // eax@13 - char *v11; // eax@19 - unsigned __int16 v12; // ST0C_2@22 - int v13; // eax@22 - GUIWindow *v15; // [sp+0h] [bp-1Ch]@1 - signed __int64 v16; // [sp+Ch] [bp-10h]@1 - signed __int64 v17; // [sp+14h] [bp-8h]@1 - unsigned int v18; // [sp+20h] [bp+4h]@1 +void GUIWindow::DrawShops_next_generation_time_string( __int64 next_generation_time ) +{ + unsigned int full_time; // esi@1 + signed __int64 hours; // kr00_8@1 + char *text; // eax@2 + signed __int64 minutes; // [sp+Ch] [bp-10h]@1 + signed __int64 seconds; // [sp+14h] [bp-8h]@1 + unsigned int days; // [sp+20h] [bp+4h]@1 - v15 = this; - v2 = (unsigned __int64)(signed __int64)((double)a2 * 0.234375) >> 32; - v3 = (signed __int64)((double)a2 * 0.234375); - v4 = (unsigned __int64)((signed __int64)((double)a2 * 0.234375) / 60) >> 32; - v5 = (signed __int64)((double)a2 * 0.234375) / 60; - v6 = (signed __int64)((double)a2 * 0.234375) / 60 / 60; - v18 = (unsigned int)v6 / 0x18; - v17 = (signed __int64)__PAIR__(v2, v3) % 60; - v16 = (signed __int64)__PAIR__(v4, v5) % 60; - v7 = v6 % 24; + full_time = (signed __int64)((double)next_generation_time * 0.234375); + seconds = (signed __int64)full_time % 60; + minutes = (signed __int64)(full_time / 60) % 60; + hours = ((full_time / 60) / 60) % 24; + days = (unsigned int)((full_time / 60) / 60) / 24; strcpy(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[532]); - if ( (unsigned int)v6 /24 ) + if ( days ) { - v8 = pGlobalTXT_LocalizationStrings[57]; - if ( v18 <= 1 ) - v8 = pGlobalTXT_LocalizationStrings[56]; - sprintfex(pTmpBuf2.data(), "%d %s ", v18, v8); + text = pGlobalTXT_LocalizationStrings[57];//Days + if ( days <= 1 ) + text = pGlobalTXT_LocalizationStrings[56];//Day + sprintfex(pTmpBuf2.data(), "%d %s ", days, text); strcat(pTmpBuf.data(), pTmpBuf2.data()); } - if ( v7 ) + if ( hours ) { - if ( v7 <= 1 ) - v9 = pGlobalTXT_LocalizationStrings[109]; + if ( hours <= 1 ) + text = pGlobalTXT_LocalizationStrings[109];//Hour else - v9 = pGlobalTXT_LocalizationStrings[110]; - sprintfex(pTmpBuf2.data(), "%d %s ", v7, v9); + text = pGlobalTXT_LocalizationStrings[110];//Hours + sprintfex(pTmpBuf2.data(), "%d %s ", (int)hours, text); strcat(pTmpBuf.data(), pTmpBuf2.data()); } - if ( v16 && !v18 ) + if ( minutes && !days ) { - if ( v16 <= 1 ) - v10 = pGlobalTXT_LocalizationStrings[437];//"Minute" + if ( minutes <= 1 ) + text = pGlobalTXT_LocalizationStrings[437];//"Minute" else - v10 = pGlobalTXT_LocalizationStrings[436]; //"Minutes" - sprintfex(pTmpBuf2.data(), "%d %s ", v16, v10); + text = pGlobalTXT_LocalizationStrings[436]; //"Minutes" + sprintfex(pTmpBuf2.data(), "%d %s ", (int)minutes, text); strcat(pTmpBuf.data(), pTmpBuf2.data()); } - if ( v17 && !v7 ) + if ( seconds && !hours ) { - if ( v17 <= 1 ) - v11 = pGlobalTXT_LocalizationStrings[439]; //"Second" + if ( seconds <= 1 ) + text = pGlobalTXT_LocalizationStrings[439]; //"Second" else - v11 = pGlobalTXT_LocalizationStrings[438]; //"Seconds" - sprintfex(pTmpBuf2.data(), "%d %s ", v17, v11); + text = pGlobalTXT_LocalizationStrings[438]; //"Seconds" + sprintfex(pTmpBuf2.data(), "%d %s ", (int)seconds, text); strcat(pTmpBuf.data(), pTmpBuf2.data()); } - v12 = TargetColor(0xFFu, 0xFFu, 0x9Bu); - v13 = pFontArrus->CalcTextHeight(pTmpBuf.data(), v15, 0, 0); - v15->DrawTitleText(pFontArrus, 0, (212 - v13) / 2 + 101, v12, pTmpBuf.data(), 3u); + this->DrawTitleText(pFontArrus, 0, (212 - pFontArrus->CalcTextHeight(pTmpBuf.data(), this, 0, 0)) / 2 + 101, TargetColor(0xFFu, 0xFFu, 0x9Bu), pTmpBuf.data(), 3); }
--- a/GUIWindow.h Tue Oct 01 09:33:29 2013 +0600 +++ b/GUIWindow.h Tue Oct 01 09:33:38 2013 +0600 @@ -329,7 +329,7 @@ int DrawTextInRect(GUIFont *pFont, unsigned int uX, unsigned int uY, unsigned int uColor, const char *text, int rect_width, int reverse_text); void DrawText(GUIFont *a2, signed int uX, int uY, unsigned int uFontColor, const char *Str, int a7, int a8, unsigned int uFontShadowColor); void DrawTitleText(GUIFont *a2, signed int uHorizontalMargin, unsigned int uVerticalMargin, unsigned __int16 uDefaultColor, const char *pInString, unsigned int uLineSpacing); - void DrawCurrentTime(__int64 a2); + void DrawShops_next_generation_time_string(__int64 next_generation_time); void HouseDialogManager(); void OpenSpellBook(); void InitializeBookView();
--- a/UI/UIGuilds.cpp Tue Oct 01 09:33:29 2013 +0600 +++ b/UI/UIGuilds.cpp Tue Oct 01 09:33:38 2013 +0600 @@ -223,7 +223,7 @@ DrawTextAtStatusBar(statusbar_string, 0); if ( !v8 ) { - working_window.DrawCurrentTime(pParty->PartyTimes.Shops_next_generation_time[window_SpeakInHouse->par1C] - pParty->uTimePlayed);//" 14 " + working_window.DrawShops_next_generation_time_string(pParty->PartyTimes.Shops_next_generation_time[window_SpeakInHouse->par1C] - pParty->uTimePlayed);//" 14 " return; } v12 = pMouse->GetCursorPos(&v51);
--- a/UI/UIShops.cpp Tue Oct 01 09:33:29 2013 +0600 +++ b/UI/UIShops.cpp Tue Oct 01 09:33:38 2013 +0600 @@ -116,7 +116,7 @@ } } else - dialog_window.DrawCurrentTime( pParty->PartyTimes.Shops_next_generation_time[(unsigned int)window_SpeakInHouse->ptr_1C] - pParty->uTimePlayed);// 7 + dialog_window.DrawShops_next_generation_time_string(pParty->PartyTimes.Shops_next_generation_time[(unsigned int)window_SpeakInHouse->ptr_1C] - pParty->uTimePlayed);// 7 } break; } @@ -167,7 +167,7 @@ } } else - dialog_window.DrawCurrentTime( pParty->PartyTimes.Shops_next_generation_time[(unsigned int)window_SpeakInHouse->ptr_1C] - pParty->uTimePlayed); + dialog_window.DrawShops_next_generation_time_string(pParty->PartyTimes.Shops_next_generation_time[(unsigned int)window_SpeakInHouse->ptr_1C] - pParty->uTimePlayed); } break; } @@ -450,7 +450,7 @@ } return; } - dialog_window.DrawCurrentTime( pParty->PartyTimes.Shops_next_generation_time[window_SpeakInHouse->par1C]- pParty->uTimePlayed); + dialog_window.DrawShops_next_generation_time_string(pParty->PartyTimes.Shops_next_generation_time[window_SpeakInHouse->par1C]- pParty->uTimePlayed); return; } break; @@ -513,7 +513,7 @@ } return; } - dialog_window.DrawCurrentTime( pParty->PartyTimes.Shops_next_generation_time[window_SpeakInHouse->par1C]- pParty->uTimePlayed); + dialog_window.DrawShops_next_generation_time_string(pParty->PartyTimes.Shops_next_generation_time[window_SpeakInHouse->par1C]- pParty->uTimePlayed); return; } break; @@ -807,7 +807,7 @@ DrawTextAtStatusBar(pGlobalTXT_LocalizationStrings[195], 0); if ( !item_num ) { - dialog_window.DrawCurrentTime( pParty->PartyTimes.Shops_next_generation_time[ (unsigned int)window_SpeakInHouse->ptr_1C] - pParty->uTimePlayed); + dialog_window.DrawShops_next_generation_time_string(pParty->PartyTimes.Shops_next_generation_time[ (unsigned int)window_SpeakInHouse->ptr_1C] - pParty->uTimePlayed); return; } pMouse->GetCursorPos(&mouse); @@ -895,7 +895,7 @@ DrawTextAtStatusBar(pGlobalTXT_LocalizationStrings[196], 0); if ( !item_num ) { - dialog_window.DrawCurrentTime( pParty->PartyTimes.Shops_next_generation_time[ (unsigned int)window_SpeakInHouse->ptr_1C] - pParty->uTimePlayed); + dialog_window.DrawShops_next_generation_time_string(pParty->PartyTimes.Shops_next_generation_time[ (unsigned int)window_SpeakInHouse->ptr_1C] - pParty->uTimePlayed); return; } pMouse->GetCursorPos(&mouse); @@ -1182,7 +1182,7 @@ DrawTextAtStatusBar(pGlobalTXT_LocalizationStrings[195], 0);// "Select the Item to Buy" if ( !item_num ) { - dialog_window.DrawCurrentTime( pParty->PartyTimes.Shops_next_generation_time[(unsigned int)window_SpeakInHouse->ptr_1C] - pParty->uTimePlayed); + dialog_window.DrawShops_next_generation_time_string(pParty->PartyTimes.Shops_next_generation_time[(unsigned int)window_SpeakInHouse->ptr_1C] - pParty->uTimePlayed); return; } pMouse->GetCursorPos(&mouse); @@ -1270,7 +1270,7 @@ DrawTextAtStatusBar(pGlobalTXT_LocalizationStrings[196], 0);// "Select the Special Item to Buy" if ( !item_num ) { - dialog_window.DrawCurrentTime( pParty->PartyTimes.Shops_next_generation_time[(unsigned int)window_SpeakInHouse->ptr_1C] - pParty->uTimePlayed); + dialog_window.DrawShops_next_generation_time_string( pParty->PartyTimes.Shops_next_generation_time[(unsigned int)window_SpeakInHouse->ptr_1C] - pParty->uTimePlayed); return; } pMouse->GetCursorPos(&mouse);
--- a/UI/UITransition.cpp Tue Oct 01 09:33:29 2013 +0600 +++ b/UI/UITransition.cpp Tue Oct 01 09:33:38 2013 +0600 @@ -102,14 +102,9 @@ uCurrentHouse_Animation = IndoorLocation::GetLocationIndex(pLocationName); } - - - //----- (00444C8F) -------------------------------------------------------- void TravelUI_Load() { - unsigned int v1; // eax@6 - GUIWindow *result; // eax@9 char pContainer[32]; // [sp+0h] [bp-28h]@1 pEventTimer->Pause(); @@ -124,88 +119,57 @@ pTexture_Dialogue_Background = pIcons_LOD->LoadTexturePtr(pContainer, TEXTURE_16BIT_PALETTE); pTexture_outside = pIcons_LOD->LoadTexturePtr("outside", TEXTURE_16BIT_PALETTE); - v1 = pMapStats->GetMapInfo(pCurrentMapName); - if ( v1 ) - sprintfex(sHouseName.data(), pGlobalTXT_LocalizationStrings[410], pMapStats->pInfos[v1].pName);// "Leave %s" + if ( pMapStats->GetMapInfo(pCurrentMapName) ) + sprintfex(sHouseName.data(), pGlobalTXT_LocalizationStrings[410], pMapStats->pInfos[pMapStats->GetMapInfo(pCurrentMapName)].pName);// "Leave %s" else strcpy(sHouseName.data(), pGlobalTXT_LocalizationStrings[79]);// "Exit" pDialogueWindow = GUIWindow::Create(0, 0, 640, 480, WINDOW_ChangeLocation, 0, sHouseName.data()); } - - //----- (00444DCA) -------------------------------------------------------- void TravelUI_Draw() { - unsigned int v0; // edi@1 - MapInfo *v1; // edi@2 - signed int v3; // eax@2 - int v4; // eax@5 - const char *v5; // [sp-Ch] [bp-90h]@3 - signed int v6; // [sp-8h] [bp-8Ch]@3 - GUIWindow v7; // [sp+Ch] [bp-78h]@1 + GUIWindow travel_window; // [sp+Ch] [bp-78h]@1 char pDestinationMapName[32]; // [sp+60h] [bp-24h]@1 - unsigned int v9; // [sp+80h] [bp-4h]@1 - memcpy(&v7, pPrimaryWindow, sizeof(v7)); - v9 = pMapStats->GetMapInfo(pCurrentMapName); + memcpy(&travel_window, pPrimaryWindow, sizeof(travel_window)); pOutdoor->GetTravelDestination(pParty->vPosition.x, pParty->vPosition.y, pDestinationMapName, 20); - v0 = pMapStats->GetMapInfo(pDestinationMapName); - pRenderer->DrawTextureIndexed(0x1DDu, 0, pTexture_Dialogue_Background); - pRenderer->DrawTextureTransparent(0x1D4u, 0, &pIcons_LOD->pTextures[uTextureID_right_panel_loop]); + pRenderer->DrawTextureIndexed(477, 0, pTexture_Dialogue_Background); + pRenderer->DrawTextureTransparent(468, 0, &pIcons_LOD->pTextures[uTextureID_right_panel_loop]); pRenderer->DrawTextureIndexed(pNPCPortraits_x[0][0], pNPCPortraits_y[0][0], pTexture_outside); - pRenderer->DrawTextureIndexed(0x22Cu, 0x1C3u, pIcons_LOD->GetTexture(uTextureID_x_x_u)); - pRenderer->DrawTextureIndexed(0x1DCu, 0x1C3u, pIcons_LOD->GetTexture(uTextureID_x_ok_u)); - if ( v0 ) + pRenderer->DrawTextureIndexed(556, 451, pIcons_LOD->GetTexture(uTextureID_x_x_u)); + pRenderer->DrawTextureIndexed(476, 451, pIcons_LOD->GetTexture(uTextureID_x_ok_u)); + if ( pMapStats->GetMapInfo(pDestinationMapName) ) { - v1 = &pMapStats->pInfos[v0]; - v7.uFrameX = 493; - v7.uFrameWidth = 126; - v7.uFrameZ = 366; - v7.DrawTitleText(pFontCreate, 0, 4u, 0, v1->pName, 3); - v7.uFrameX = 483; - v7.uFrameWidth = 148; - v7.uFrameZ = 334; - v3 = GetTravelTime(); - if ( v3 == 1 ) - { - v6 = 1; - v5 = pGlobalTXT_LocalizationStrings[663]; // "It will take %d day to cross to %s." - } + travel_window.uFrameX = 493; + travel_window.uFrameWidth = 126; + travel_window.uFrameZ = 366; + travel_window.DrawTitleText(pFontCreate, 0, 4, 0, pMapStats->pInfos[pMapStats->GetMapInfo(pDestinationMapName)].pName, 3); + travel_window.uFrameX = 483; + travel_window.uFrameWidth = 148; + travel_window.uFrameZ = 334; + if ( GetTravelTime() == 1 ) + sprintfex(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[663], 1, pMapStats->pInfos[pMapStats->GetMapInfo(pDestinationMapName)].pName);// "It will take %d day to cross to %s." else - { - v6 = v3; - v5 = pGlobalTXT_LocalizationStrings[128]; // "It will take %d days to travel to %s." - } - sprintfex(pTmpBuf.data(), v5, v6, v1->pName); + sprintfex(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[128], GetTravelTime(), pMapStats->pInfos[pMapStats->GetMapInfo(pDestinationMapName)].pName);// "It will take %d days to travel to %s." + strcat(pTmpBuf.data(), "\n \n"); - sprintfex(pTmpBuf2.data(), pGlobalTXT_LocalizationStrings[126], pMapStats->pInfos[v9].pName); + sprintfex(pTmpBuf2.data(), pGlobalTXT_LocalizationStrings[126], pMapStats->pInfos[pMapStats->GetMapInfo(pCurrentMapName)].pName); strcat(pTmpBuf.data(), pTmpBuf2.data()); - v4 = pFontCreate->CalcTextHeight(pTmpBuf.data(), &v7, 0, 0); - v7.DrawTitleText(pFontCreate, 0, (212 - v4) / 2 + 101, 0, pTmpBuf.data(), 3); + travel_window.DrawTitleText(pFontCreate, 0, (212 - pFontCreate->CalcTextHeight(pTmpBuf.data(), &travel_window, 0, 0)) / 2 + 101, 0, pTmpBuf.data(), 3); _unused_5B5924_is_travel_ui_drawn = 1; } } - - //----- (00444A51) -------------------------------------------------------- void TransitionUI_Draw() { - MapInfo *pMapInfo; // esi@5 - char *v1; // eax@6 - std::string v3; // [sp-18h] [bp-84h]@11 unsigned int v4; // [sp-10h] [bp-7Ch]@12 - int v5; // [sp-Ch] [bp-78h]@12 - const char *v6; // [sp-8h] [bp-74h]@11 - signed int v7; // [sp-4h] [bp-70h]@11 - GUIWindow v8; // [sp+Ch] [bp-60h]@1 + GUIWindow transition_window; // [sp+Ch] [bp-60h]@1 unsigned int v9; // [sp+60h] [bp-Ch]@1 - unsigned int v10; // [sp+64h] [bp-8h]@1 - int a3; // [sp+6Bh] [bp-1h]@11 + unsigned int map_id; // [sp+64h] [bp-8h]@1 - memcpy(&v8, pPrimaryWindow, sizeof(v8)); - v10 = pMapStats->GetMapInfo(pCurrentMapName); + memcpy(&transition_window, pPrimaryWindow, sizeof(transition_window)); v9 = IndoorLocation::GetLocationIndex(dword_591164_teleport_map_name); pRenderer->DrawTextureIndexed(0x1DDu, 0, pTexture_Dialogue_Background); pRenderer->DrawTextureIndexed(pNPCPortraits_x[0][0] - 4, pNPCPortraits_y[0][0] - 4, pIcons_LOD->GetTexture(uTextureID_50795C)); @@ -214,29 +178,27 @@ pRenderer->DrawTextureTransparent(468, 0, pIcons_LOD->GetTexture(uTextureID_right_panel)); pRenderer->DrawTextureIndexed(556, 451, pIcons_LOD->GetTexture(uTextureID_x_x_u)); pRenderer->DrawTextureIndexed(476, 451, pIcons_LOD->GetTexture(uTextureID_x_ok_u)); + map_id = pMapStats->GetMapInfo(pCurrentMapName); if ( (pVideoPlayer->AnyMovieLoaded() || v9) && *dword_591164_teleport_map_name != ' ' ) - v10 = pMapStats->GetMapInfo(dword_591164_teleport_map_name); - pMapInfo = &pMapStats->pInfos[v10]; - v8.uFrameX = 493; - v8.uFrameWidth = 126; - v8.uFrameZ = 366; - v8.DrawTitleText(pFontCreate, 0, 5u, 0, pMapInfo->pName, 3); - v8.uFrameX = 483; - v8.uFrameWidth = 148; - v8.uFrameZ = 334; + map_id = pMapStats->GetMapInfo(dword_591164_teleport_map_name); + transition_window.uFrameX = 493; + transition_window.uFrameWidth = 126; + transition_window.uFrameZ = 366; + transition_window.DrawTitleText(pFontCreate, 0, 5, 0, pMapStats->pInfos[map_id].pName, 3); + transition_window.uFrameX = 483; + transition_window.uFrameWidth = 148; + transition_window.uFrameZ = 334; - v1 = ""; if ( uCurrentHouse_Animation ) { - v1 = pTransitionStrings[uCurrentHouse_Animation]; - v4 = (212 - pFontCreate->CalcTextHeight(v1, &v8, 0, 0)) / 2 + 101; - v8.DrawTitleText(pFontCreate, 0, v4, 0, v1, 3); + v4 = (212 - pFontCreate->CalcTextHeight(pTransitionStrings[uCurrentHouse_Animation], &transition_window, 0, 0)) / 2 + 101; + transition_window.DrawTitleText(pFontCreate, 0, v4, 0, pTransitionStrings[uCurrentHouse_Animation], 3); } - else if ( v10 ) + else if ( map_id ) { - sprintfex(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[409], pMapInfo->pName);// "Do you wish to leave %s?" - v4 = (212 - pFontCreate->CalcTextHeight(pTmpBuf.data(), &v8, 0, 0)) / 2 + 101; - v8.DrawTitleText(pFontCreate, 0, v4, 0, pTmpBuf.data(), 3); + sprintfex(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[409], pMapStats->pInfos[map_id].pName);// "Do you wish to leave %s?" + v4 = (212 - pFontCreate->CalcTextHeight(pTmpBuf.data(), &transition_window, 0, 0)) / 2 + 101; + transition_window.DrawTitleText(pFontCreate, 0, v4, 0, pTmpBuf.data(), 3); } else Error("Troubles in da house");
--- a/UI/UiGame.cpp Tue Oct 01 09:33:29 2013 +0600 +++ b/UI/UiGame.cpp Tue Oct 01 09:33:38 2013 +0600 @@ -824,7 +824,7 @@ { v36 = uFramesetIDa++ * pFontComic->uFontHeight + 134; window->DrawText(pFontComic, 52, v36, ui_game_character_record_playerbuff_colors[i], aSpellNames[20 + i], 0, 0, 0); - sub_41D20D_buff_remaining_time_string(v36, window, buff->uExpireTime - pParty->uTimePlayed, pFontComic); + DrawBuff_remaining_time_string(v36, window, buff->uExpireTime - pParty->uTimePlayed, pFontComic); } }
--- a/mm7_1.cpp Tue Oct 01 09:33:29 2013 +0600 +++ b/mm7_1.cpp Tue Oct 01 09:33:38 2013 +0600 @@ -74,72 +74,57 @@ } //----- (0041D20D) -------------------------------------------------------- -void __fastcall sub_41D20D_buff_remaining_time_string( int ecx0, struct GUIWindow *edx0, __int64 a3, struct GUIFont *a2 ) - { - unsigned int v4; // edi@1 - unsigned int v5; // esi@1 - unsigned int v6; // ebp@1 - unsigned int v7; // ebx@1 - signed __int64 v8; // ST34_8@1 - signed __int64 v9; // kr00_8@1 - char *v10; // eax@2 - char *v11; // eax@7 - char *v12; // eax@13 - char *v13; // eax@19 - int uY; // [sp+0h] [bp-20h]@1 - GUIWindow *a1; // [sp+4h] [bp-1Ch]@1 - signed __int64 v17; // [sp+10h] [bp-10h]@1 - signed __int64 v18; // [sp+18h] [bp-8h]@1 - unsigned int v19; // [sp+24h] [bp+4h]@1 +void DrawBuff_remaining_time_string( int uY, struct GUIWindow *window, __int64 remaining_time, struct GUIFont *Font ) +{ + unsigned int full_time; // esi@1 + signed __int64 hours; // kr00_8@1 + char *text; // eax@2 + signed __int64 minutes; // [sp+10h] [bp-10h]@1 + signed __int64 seconds; // [sp+18h] [bp-8h]@1 + unsigned int day; // [sp+24h] [bp+4h]@1 - a1 = edx0; - uY = ecx0; - v4 = (unsigned __int64)(signed __int64)((double)a3 * 0.234375) >> 32; - v5 = (signed __int64)((double)a3 * 0.234375); - v6 = (unsigned __int64)((signed __int64)((double)a3 * 0.234375) / 60) >> 32; - v7 = (signed __int64)((double)a3 * 0.234375) / 60; - v8 = (signed __int64)((double)a3 * 0.234375) / 60 / 60; - v19 = (unsigned int)v8 / 0x18; - v18 = (signed __int64)__PAIR__(v4, v5) % 60; - v17 = (signed __int64)__PAIR__(v6, v7) % 60; - v9 = v8 % 24; + full_time = (signed __int64)((double)remaining_time * 0.234375); + day = (unsigned int)((full_time / 60) / 60) / 24; + hours = ((full_time / 60) / 60) % 24; + minutes = (signed __int64)(full_time / 60) % 60; + seconds = (signed __int64)full_time % 60; strcpy(pTmpBuf.data(), "\r020"); - if ( (unsigned int)v8 / 0x18 ) + if ( day ) { - v10 = pGlobalTXT_LocalizationStrings[57]; // Days - if ( v19 <= 1 ) - v10 = pGlobalTXT_LocalizationStrings[56]; // Day - sprintfex(pTmpBuf2.data(), "%d %s ", (int)v19, v10); + text = pGlobalTXT_LocalizationStrings[57]; // Days + if ( day <= 1 ) + text = pGlobalTXT_LocalizationStrings[56]; // Day + sprintfex(pTmpBuf2.data(), "%d %s ", (int)day, text); strcat(pTmpBuf.data(), pTmpBuf2.data()); } - if ( v9 ) + if ( hours ) { - if ( v9 <= 1 ) - v11 = pGlobalTXT_LocalizationStrings[109];// Hour + if ( hours <= 1 ) + text = pGlobalTXT_LocalizationStrings[109];// Hour else - v11 = pGlobalTXT_LocalizationStrings[110];// Hours - sprintfex(pTmpBuf2.data(), "%d %s ", (int)v9, v11); + text = pGlobalTXT_LocalizationStrings[110];// Hours + sprintfex(pTmpBuf2.data(), "%d %s ", (int)hours, text); strcat(pTmpBuf.data(), pTmpBuf2.data()); } - if ( v17 && !v19 ) + if ( minutes && !day ) { - if ( v17 <= 1 ) - v12 = pGlobalTXT_LocalizationStrings[437];// Minute + if ( minutes <= 1 ) + text = pGlobalTXT_LocalizationStrings[437];// Minute else - v12 = pGlobalTXT_LocalizationStrings[436];// Minutes - sprintfex(pTmpBuf2.data(), "%d %s ", (int)v17, v12); + text = pGlobalTXT_LocalizationStrings[436];// Minutes + sprintfex(pTmpBuf2.data(), "%d %s ", (int)minutes, text); strcat(pTmpBuf.data(), pTmpBuf2.data()); } - if ( v18 && !v9 ) + if ( seconds && !hours ) { - if ( v18 <= 1 ) - v13 = pGlobalTXT_LocalizationStrings[439];// Second + if ( seconds <= 1 ) + text = pGlobalTXT_LocalizationStrings[439];// Second else - v13 = pGlobalTXT_LocalizationStrings[438];// Seconds - sprintfex(pTmpBuf2.data(), "%d %s ", (int)v18, v13); + text = pGlobalTXT_LocalizationStrings[438];// Seconds + sprintfex(pTmpBuf2.data(), "%d %s ", (int)seconds, text); strcat(pTmpBuf.data(), pTmpBuf2.data()); } - a1->DrawText(a2, 32, uY, 0, pTmpBuf.data(), 0, 0, 0); + window->DrawText(Font, 32, uY, 0, pTmpBuf.data(), 0, 0, 0); } //----- (004226C2) -------------------------------------------------------- @@ -161,199 +146,188 @@ //----- (004226EF) -------------------------------------------------------- void SetUserInterface(PartyAlignment align, bool bReplace) { - unsigned int v3; // eax@7 - unsigned __int16 v4; // dx@7 - unsigned __int16 v5; // cx@7 - unsigned __int16 v6; // [sp-4h] [bp-14h]@7 - - extern void set_default_ui_skin(); set_default_ui_skin(); - if (align == PartyAlignment_Evil) + if (align == PartyAlignment_Evil) + { + if ( bReplace ) { - if ( bReplace ) - { - pTexture_RightFrame->Reload("ib-r-C.pcx"); - pTexture_BottomFrame->Reload("ib-b-C.pcx"); - pTexture_TopFrame->Reload("ib-t-C.pcx"); - pTexture_LeftFrame->Reload("ib-l-C.pcx"); - pTexture_StatusBar->Reload("IB-Foot-c.pcx"); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_right_panel], "ib-mb-C", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Minimap_Loop], "ib-autmask-c", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Compas], "IB-COMP-C", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079D0], "IB-InitG-c", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079C8], "IB-InitY-c", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079CC], "IB-InitR-c", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_NPCLeft], "IB-NPCLD-C", 2); - 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[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); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_GameSettings], "ib-m4d-c", 2); + pTexture_RightFrame->Reload("ib-r-C.pcx"); + pTexture_BottomFrame->Reload("ib-b-C.pcx"); + pTexture_TopFrame->Reload("ib-t-C.pcx"); + pTexture_LeftFrame->Reload("ib-l-C.pcx"); + pTexture_StatusBar->Reload("IB-Foot-c.pcx"); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_right_panel], "ib-mb-C", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Minimap_Loop], "ib-autmask-c", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Compas], "IB-COMP-C", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079D0], "IB-InitG-c", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079C8], "IB-InitY-c", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079CC], "IB-InitR-c", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_NPCLeft], "IB-NPCLD-C", 2); + 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[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); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_GameSettings], "ib-m4d-c", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_Bless], "isg-01-c", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_Preservation], "isg-02-c", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_Hammerhands], "isg-03-c", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_PainReflection], "isg-04-c", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_Bless], "isg-01-c", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_Preservation], "isg-02-c", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_Hammerhands], "isg-03-c", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_PainReflection], "isg-04-c", 2); - pUIAnim_WizardEye->uIconID = pIconsFrameTable->FindIcon("wizeyeC"); - pIconsFrameTable->InitializeAnimation(pUIAnim_WizardEye->uIconID); - pUIAnum_Torchlight->uIconID = pIconsFrameTable->FindIcon("torchC"); - pIconsFrameTable->InitializeAnimation(pUIAnum_Torchlight->uIconID); + pUIAnim_WizardEye->uIconID = pIconsFrameTable->FindIcon("wizeyeC"); + pIconsFrameTable->InitializeAnimation(pUIAnim_WizardEye->uIconID); + pUIAnum_Torchlight->uIconID = pIconsFrameTable->FindIcon("torchC"); + pIconsFrameTable->InitializeAnimation(pUIAnum_Torchlight->uIconID); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uExitCancelTextureId], "ib-bcu-c", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_50795C], "evtnpc-c", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_CharacterUI_InventoryBackground], "fr_inven-c", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Parchment], "parchment", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076B4], "cornr_ll-c", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076B0], "cornr_lr-c", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076AC], "cornr_ul-c", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076A8], "cornr_ur-c", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076A4], "edge_btm-c", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076A0], "edge_lf-c", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_50769C], "edge_rt-c", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_507698], "edge_top-c", 2); - pIcons_LOD->ReloadTexture(pTexture_591428, "endcap-c", 2); - } - else - { - pTexture_RightFrame->Load("ib-r-C.pcx", 0); - pTexture_BottomFrame->Load("ib-b-c.pcx", 0); - pTexture_TopFrame->Load("ib-t-C.pcx", 0); - pTexture_LeftFrame->Load("ib-l-C.pcx", 0); - pTexture_StatusBar->Load("IB-Foot-c.pcx", 0); - uTextureID_right_panel = pIcons_LOD->LoadTexture("ib-mb-C", TEXTURE_16BIT_PALETTE); - uTextureID_Minimap_Loop = pIcons_LOD->LoadTexture("ib-autmask-c", TEXTURE_16BIT_PALETTE); - uTextureID_Compas = pIcons_LOD->LoadTexture("IB-COMP-C", TEXTURE_16BIT_PALETTE); - dword_5079D0 = pIcons_LOD->LoadTexture("IB-InitG-c", TEXTURE_16BIT_PALETTE); - dword_5079C8 = pIcons_LOD->LoadTexture("IB-InitY-c", TEXTURE_16BIT_PALETTE); - dword_5079CC = pIcons_LOD->LoadTexture("IB-InitR-c", TEXTURE_16BIT_PALETTE); - uTextureID_Btn_NPCLeft = pIcons_LOD->LoadTexture("IB-NPCLD-C", TEXTURE_16BIT_PALETTE); - 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); - 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); - uTextureID_Btn_GameSettings = pIcons_LOD->LoadTexture("ib-m4d-c", TEXTURE_16BIT_PALETTE); - uExitCancelTextureId = pIcons_LOD->LoadTexture("ib-bcu-c", TEXTURE_16BIT_PALETTE); - uTextureID_PlayerBuff_Bless = pIcons_LOD->LoadTexture("isg-01-c", TEXTURE_16BIT_PALETTE); - uTextureID_PlayerBuff_Preservation = pIcons_LOD->LoadTexture("isg-02-c", TEXTURE_16BIT_PALETTE); - uTextureID_PlayerBuff_Hammerhands = pIcons_LOD->LoadTexture("isg-03-c", TEXTURE_16BIT_PALETTE); - uTextureID_PlayerBuff_PainReflection = pIcons_LOD->LoadTexture("isg-04-c", TEXTURE_16BIT_PALETTE); - uTextureID_50795C = pIcons_LOD->LoadTexture("evtnpc-c", TEXTURE_16BIT_PALETTE); - uTextureID_CharacterUI_InventoryBackground = pIcons_LOD->LoadTexture("fr_inven", TEXTURE_16BIT_PALETTE); - pUIAnim_WizardEye->uIconID = pIconsFrameTable->FindIcon("wizeyeC"); - pIconsFrameTable->InitializeAnimation((signed __int16)pUIAnim_WizardEye->uIconID); - pUIAnum_Torchlight->uIconID = pIconsFrameTable->FindIcon("torchC"); - pIconsFrameTable->InitializeAnimation((signed __int16)pUIAnum_Torchlight->uIconID); - } - v3 = TargetColor(0xC8u, 0, 0); - v4 = 0; - v6 = 0; - v5 = 10; + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uExitCancelTextureId], "ib-bcu-c", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_50795C], "evtnpc-c", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_CharacterUI_InventoryBackground], "fr_inven-c", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Parchment], "parchment", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076B4], "cornr_ll-c", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076B0], "cornr_lr-c", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076AC], "cornr_ul-c", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076A8], "cornr_ur-c", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076A4], "edge_btm-c", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076A0], "edge_lf-c", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_50769C], "edge_rt-c", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_507698], "edge_top-c", 2); + pIcons_LOD->ReloadTexture(pTexture_591428, "endcap-c", 2); } - else if (align == PartyAlignment_Neutral) + else + { + pTexture_RightFrame->Load("ib-r-C.pcx", 0); + pTexture_BottomFrame->Load("ib-b-c.pcx", 0); + pTexture_TopFrame->Load("ib-t-C.pcx", 0); + pTexture_LeftFrame->Load("ib-l-C.pcx", 0); + pTexture_StatusBar->Load("IB-Foot-c.pcx", 0); + uTextureID_right_panel = pIcons_LOD->LoadTexture("ib-mb-C", TEXTURE_16BIT_PALETTE); + uTextureID_Minimap_Loop = pIcons_LOD->LoadTexture("ib-autmask-c", TEXTURE_16BIT_PALETTE); + uTextureID_Compas = pIcons_LOD->LoadTexture("IB-COMP-C", TEXTURE_16BIT_PALETTE); + dword_5079D0 = pIcons_LOD->LoadTexture("IB-InitG-c", TEXTURE_16BIT_PALETTE); + dword_5079C8 = pIcons_LOD->LoadTexture("IB-InitY-c", TEXTURE_16BIT_PALETTE); + dword_5079CC = pIcons_LOD->LoadTexture("IB-InitR-c", TEXTURE_16BIT_PALETTE); + uTextureID_Btn_NPCLeft = pIcons_LOD->LoadTexture("IB-NPCLD-C", TEXTURE_16BIT_PALETTE); + 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); + 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); + uTextureID_Btn_GameSettings = pIcons_LOD->LoadTexture("ib-m4d-c", TEXTURE_16BIT_PALETTE); + uExitCancelTextureId = pIcons_LOD->LoadTexture("ib-bcu-c", TEXTURE_16BIT_PALETTE); + uTextureID_PlayerBuff_Bless = pIcons_LOD->LoadTexture("isg-01-c", TEXTURE_16BIT_PALETTE); + uTextureID_PlayerBuff_Preservation = pIcons_LOD->LoadTexture("isg-02-c", TEXTURE_16BIT_PALETTE); + uTextureID_PlayerBuff_Hammerhands = pIcons_LOD->LoadTexture("isg-03-c", TEXTURE_16BIT_PALETTE); + uTextureID_PlayerBuff_PainReflection = pIcons_LOD->LoadTexture("isg-04-c", TEXTURE_16BIT_PALETTE); + uTextureID_50795C = pIcons_LOD->LoadTexture("evtnpc-c", TEXTURE_16BIT_PALETTE); + uTextureID_CharacterUI_InventoryBackground = pIcons_LOD->LoadTexture("fr_inven", TEXTURE_16BIT_PALETTE); + pUIAnim_WizardEye->uIconID = pIconsFrameTable->FindIcon("wizeyeC"); + pIconsFrameTable->InitializeAnimation((signed __int16)pUIAnim_WizardEye->uIconID); + pUIAnum_Torchlight->uIconID = pIconsFrameTable->FindIcon("torchC"); + pIconsFrameTable->InitializeAnimation((signed __int16)pUIAnum_Torchlight->uIconID); + } + uGameUIFontMain = TargetColor(0xC8u, 0, 0); + uGameUIFontShadow = TargetColor(10, 0, 0); + } + else if (align == PartyAlignment_Neutral) + { + if ( bReplace ) { - if ( bReplace ) - { - pTexture_RightFrame->Reload("ib-r-a.pcx"); - pTexture_BottomFrame->Reload("ib-b-a.pcx"); - pTexture_TopFrame->Reload("ib-t-a.pcx"); - pTexture_LeftFrame->Reload("ib-l-a.pcx"); - pTexture_StatusBar->Reload("IB-Foot-a.pcx"); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_right_panel], "ib-mb-a", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Minimap_Loop], "ib-autmask-a", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Compas], "IB-COMP-a", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079D0], "IB-InitG-a", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079C8], "IB-InitY-a", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079CC], "IB-InitR-a", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_NPCLeft], "IB-NPCLD-a", 2); - 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[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); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_GameSettings], "ib-m4d-a", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_Bless], "isg-01-a", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_Preservation], "isg-02-a", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_Hammerhands], "isg-03-a", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_PainReflection], "isg-04-a", 2); - pUIAnim_WizardEye->uIconID = pIconsFrameTable->FindIcon("wizeyeA"); - pIconsFrameTable->InitializeAnimation((signed __int16)pUIAnim_WizardEye->uIconID); - pUIAnum_Torchlight->uIconID = pIconsFrameTable->FindIcon("torchA"); - pIconsFrameTable->InitializeAnimation((signed __int16)pUIAnum_Torchlight->uIconID); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uExitCancelTextureId], "ib-bcu-a", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_50795C], "evtnpc", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_CharacterUI_InventoryBackground], "fr_inven", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Parchment], "parchment", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076B4], "cornr_ll", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076B0], "cornr_lr", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076AC], "cornr_ul", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076A8], "cornr_ur", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076A4], "edge_btm", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076A0], "edge_lf", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_50769C], "edge_rt", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_507698], "edge_top", 2); - pIcons_LOD->ReloadTexture(pTexture_591428, "endcap", 2); - } - else - { - pTexture_RightFrame->Load("ib-r-A.pcx", 0); - pTexture_BottomFrame->Load("ib-b-A.pcx", 0); - pTexture_TopFrame->Load("ib-t-A.pcx", 0); - pTexture_LeftFrame->Load("ib-l-A.pcx", 0); - pTexture_StatusBar->Load("IB-Foot-a.pcx", 0); - uTextureID_right_panel = pIcons_LOD->LoadTexture("ib-mb-A", TEXTURE_16BIT_PALETTE); - uTextureID_Minimap_Loop = pIcons_LOD->LoadTexture("ib-autmask-a", TEXTURE_16BIT_PALETTE); - uTextureID_Compas = pIcons_LOD->LoadTexture("IB-COMP-A", TEXTURE_16BIT_PALETTE); - dword_5079D0 = pIcons_LOD->LoadTexture("IB-InitG-a", TEXTURE_16BIT_PALETTE); - dword_5079C8 = pIcons_LOD->LoadTexture("IB-InitY-a", TEXTURE_16BIT_PALETTE); - 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); - 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); - uTextureID_Btn_GameSettings = pIcons_LOD->LoadTexture("ib-m4d-a", TEXTURE_16BIT_PALETTE); - uTextureID_Btn_ZoomIn = pIcons_LOD->LoadTexture("ib-autout-a", TEXTURE_16BIT_PALETTE); - uTextureID_Btn_ZoomOut = pIcons_LOD->LoadTexture("ib-autin-a", TEXTURE_16BIT_PALETTE); - uExitCancelTextureId = pIcons_LOD->LoadTexture("ib-bcu-a", TEXTURE_16BIT_PALETTE); - uTextureID_PlayerBuff_Bless = pIcons_LOD->LoadTexture("isg-01-a", TEXTURE_16BIT_PALETTE); - uTextureID_PlayerBuff_Preservation = pIcons_LOD->LoadTexture("isg-02-a", TEXTURE_16BIT_PALETTE); - uTextureID_PlayerBuff_Hammerhands = pIcons_LOD->LoadTexture("isg-03-a", TEXTURE_16BIT_PALETTE); - uTextureID_PlayerBuff_PainReflection = pIcons_LOD->LoadTexture("isg-04-a", TEXTURE_16BIT_PALETTE); - uTextureID_50795C = pIcons_LOD->LoadTexture("evtnpc", TEXTURE_16BIT_PALETTE); - uTextureID_CharacterUI_InventoryBackground = pIcons_LOD->LoadTexture("fr_inven", TEXTURE_16BIT_PALETTE); - pUIAnim_WizardEye->uIconID = pIconsFrameTable->FindIcon("wizeyeA"); - pIconsFrameTable->InitializeAnimation((signed __int16)pUIAnim_WizardEye->uIconID); - pUIAnum_Torchlight->uIconID = pIconsFrameTable->FindIcon("torchA"); - pIconsFrameTable->InitializeAnimation((signed __int16)pUIAnum_Torchlight->uIconID); - uTextureID_Parchment = pIcons_LOD->LoadTexture("parchment", TEXTURE_16BIT_PALETTE); - uTextureID_5076B4 = pIcons_LOD->LoadTexture("cornr_ll", TEXTURE_16BIT_PALETTE); - uTextureID_5076B0 = pIcons_LOD->LoadTexture("cornr_lr", TEXTURE_16BIT_PALETTE); - uTextureID_5076AC = pIcons_LOD->LoadTexture("cornr_ul", TEXTURE_16BIT_PALETTE); - uTextureID_5076A8 = pIcons_LOD->LoadTexture("cornr_ur", TEXTURE_16BIT_PALETTE); - uTextureID_5076A4 = pIcons_LOD->LoadTexture("edge_btm", TEXTURE_16BIT_PALETTE); - uTextureID_5076A0 = pIcons_LOD->LoadTexture("edge_lf", TEXTURE_16BIT_PALETTE); - uTextureID_50769C = pIcons_LOD->LoadTexture("edge_rt", TEXTURE_16BIT_PALETTE); - uTextureID_507698 = pIcons_LOD->LoadTexture("edge_top", TEXTURE_16BIT_PALETTE); - pTexture_591428 = pIcons_LOD->LoadTexturePtr("endcap", TEXTURE_16BIT_PALETTE); - - } - v3 = TargetColor(0xAu, 0, 0); - v4 = 214; - v5 = 230; - v6 = 193; + pTexture_RightFrame->Reload("ib-r-a.pcx"); + pTexture_BottomFrame->Reload("ib-b-a.pcx"); + pTexture_TopFrame->Reload("ib-t-a.pcx"); + pTexture_LeftFrame->Reload("ib-l-a.pcx"); + pTexture_StatusBar->Reload("IB-Foot-a.pcx"); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_right_panel], "ib-mb-a", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Minimap_Loop], "ib-autmask-a", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Compas], "IB-COMP-a", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079D0], "IB-InitG-a", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079C8], "IB-InitY-a", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079CC], "IB-InitR-a", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_NPCLeft], "IB-NPCLD-a", 2); + 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[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); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_GameSettings], "ib-m4d-a", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_Bless], "isg-01-a", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_Preservation], "isg-02-a", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_Hammerhands], "isg-03-a", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_PainReflection], "isg-04-a", 2); + pUIAnim_WizardEye->uIconID = pIconsFrameTable->FindIcon("wizeyeA"); + pIconsFrameTable->InitializeAnimation((signed __int16)pUIAnim_WizardEye->uIconID); + pUIAnum_Torchlight->uIconID = pIconsFrameTable->FindIcon("torchA"); + pIconsFrameTable->InitializeAnimation((signed __int16)pUIAnum_Torchlight->uIconID); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uExitCancelTextureId], "ib-bcu-a", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_50795C], "evtnpc", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_CharacterUI_InventoryBackground], "fr_inven", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Parchment], "parchment", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076B4], "cornr_ll", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076B0], "cornr_lr", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076AC], "cornr_ul", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076A8], "cornr_ur", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076A4], "edge_btm", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076A0], "edge_lf", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_50769C], "edge_rt", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_507698], "edge_top", 2); + pIcons_LOD->ReloadTexture(pTexture_591428, "endcap", 2); } + else + { + pTexture_RightFrame->Load("ib-r-A.pcx", 0); + pTexture_BottomFrame->Load("ib-b-A.pcx", 0); + pTexture_TopFrame->Load("ib-t-A.pcx", 0); + pTexture_LeftFrame->Load("ib-l-A.pcx", 0); + pTexture_StatusBar->Load("IB-Foot-a.pcx", 0); + uTextureID_right_panel = pIcons_LOD->LoadTexture("ib-mb-A", TEXTURE_16BIT_PALETTE); + uTextureID_Minimap_Loop = pIcons_LOD->LoadTexture("ib-autmask-a", TEXTURE_16BIT_PALETTE); + uTextureID_Compas = pIcons_LOD->LoadTexture("IB-COMP-A", TEXTURE_16BIT_PALETTE); + dword_5079D0 = pIcons_LOD->LoadTexture("IB-InitG-a", TEXTURE_16BIT_PALETTE); + dword_5079C8 = pIcons_LOD->LoadTexture("IB-InitY-a", TEXTURE_16BIT_PALETTE); + 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); + 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); + uTextureID_Btn_GameSettings = pIcons_LOD->LoadTexture("ib-m4d-a", TEXTURE_16BIT_PALETTE); + uTextureID_Btn_ZoomIn = pIcons_LOD->LoadTexture("ib-autout-a", TEXTURE_16BIT_PALETTE); + uTextureID_Btn_ZoomOut = pIcons_LOD->LoadTexture("ib-autin-a", TEXTURE_16BIT_PALETTE); + uExitCancelTextureId = pIcons_LOD->LoadTexture("ib-bcu-a", TEXTURE_16BIT_PALETTE); + uTextureID_PlayerBuff_Bless = pIcons_LOD->LoadTexture("isg-01-a", TEXTURE_16BIT_PALETTE); + uTextureID_PlayerBuff_Preservation = pIcons_LOD->LoadTexture("isg-02-a", TEXTURE_16BIT_PALETTE); + uTextureID_PlayerBuff_Hammerhands = pIcons_LOD->LoadTexture("isg-03-a", TEXTURE_16BIT_PALETTE); + uTextureID_PlayerBuff_PainReflection = pIcons_LOD->LoadTexture("isg-04-a", TEXTURE_16BIT_PALETTE); + uTextureID_50795C = pIcons_LOD->LoadTexture("evtnpc", TEXTURE_16BIT_PALETTE); + uTextureID_CharacterUI_InventoryBackground = pIcons_LOD->LoadTexture("fr_inven", TEXTURE_16BIT_PALETTE); + pUIAnim_WizardEye->uIconID = pIconsFrameTable->FindIcon("wizeyeA"); + pIconsFrameTable->InitializeAnimation((signed __int16)pUIAnim_WizardEye->uIconID); + pUIAnum_Torchlight->uIconID = pIconsFrameTable->FindIcon("torchA"); + pIconsFrameTable->InitializeAnimation((signed __int16)pUIAnum_Torchlight->uIconID); + uTextureID_Parchment = pIcons_LOD->LoadTexture("parchment", TEXTURE_16BIT_PALETTE); + uTextureID_5076B4 = pIcons_LOD->LoadTexture("cornr_ll", TEXTURE_16BIT_PALETTE); + uTextureID_5076B0 = pIcons_LOD->LoadTexture("cornr_lr", TEXTURE_16BIT_PALETTE); + uTextureID_5076AC = pIcons_LOD->LoadTexture("cornr_ul", TEXTURE_16BIT_PALETTE); + uTextureID_5076A8 = pIcons_LOD->LoadTexture("cornr_ur", TEXTURE_16BIT_PALETTE); + uTextureID_5076A4 = pIcons_LOD->LoadTexture("edge_btm", TEXTURE_16BIT_PALETTE); + uTextureID_5076A0 = pIcons_LOD->LoadTexture("edge_lf", TEXTURE_16BIT_PALETTE); + uTextureID_50769C = pIcons_LOD->LoadTexture("edge_rt", TEXTURE_16BIT_PALETTE); + uTextureID_507698 = pIcons_LOD->LoadTexture("edge_top", TEXTURE_16BIT_PALETTE); + pTexture_591428 = pIcons_LOD->LoadTexturePtr("endcap", TEXTURE_16BIT_PALETTE); + } + uGameUIFontMain = TargetColor(0xAu, 0, 0); + uGameUIFontShadow = TargetColor(230, 214, 193); + } else if (align == PartyAlignment_Good) { if ( bReplace ) @@ -400,19 +374,12 @@ pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_507698], "edge_top-b", 2); pIcons_LOD->ReloadTexture(pTexture_591428, "endcap-b", 2); } - v3 = TargetColor(0, 0, 0xC8u); - v5 = 255; - v4 = 225; - v6 = 255; + uGameUIFontMain = TargetColor(0, 0, 0xC8u); + uGameUIFontShadow = TargetColor(255, 255, 255); } else Error("Invalid alignment type: %u", align); - - uGameUIFontMain = v3; - uGameUIFontShadow = TargetColor(v5, v4, v6); } - - //----- (00424CD7) -------------------------------------------------------- int sr_424CD7(unsigned int num_vertices) {
--- a/mm7_data.h Tue Oct 01 09:33:29 2013 +0600 +++ b/mm7_data.h Tue Oct 01 09:33:38 2013 +0600 @@ -1080,7 +1080,7 @@ unsigned int __fastcall GetSizeInInventorySlots(unsigned int uNumPixels); struct GUIButton *__fastcall GUI_HandleHotkey(unsigned __int8 uHotkey); // idb int __fastcall GUI_ReplaceHotkey(unsigned __int8 uOldHotkey, unsigned __int8 uNewHotkey, char bFirstCall); -void __fastcall sub_41D20D_buff_remaining_time_string(int ecx0, struct GUIWindow *edx0, __int64 a3, struct GUIFont *a2); +void DrawBuff_remaining_time_string(int uY, struct GUIWindow *window, __int64 remaining_time, struct GUIFont *Font); bool UI_OnKeyDown(unsigned int vkKey); void GameUI_DrawItemInfo(struct ItemGen* inspect_item); // idb void MonsterPopup_Draw(unsigned int uActorID, struct GUIWindow *window);