# HG changeset patch # User Nomad # Date 1369172691 -7200 # Node ID 3a5c8df8381d800602c951e9e43e9dea6c401ecf # Parent f93d173371130dd3e975b3446aba68350225a657 * UI cleans and moves * Deleted many junk global variables. diff -r f93d17337113 -r 3a5c8df8381d Actor.cpp --- a/Actor.cpp Tue May 21 14:34:14 2013 +0200 +++ b/Actor.cpp Tue May 21 23:44:51 2013 +0200 @@ -226,107 +226,6 @@ } } -//----- (00445D4A) -------------------------------------------------------- -void Actor::InitializeDialogue(int bPlayerSaysHello) -{ - NPCData *pNPCInfo; // ebp@1 - int v9; // esi@8 - int pNumberContacts; // eax@11 - char pContainer[32]; // [sp+14h] [bp-28h]@3 - - dword_A74CDC = -1; - dword_AE336C = -1; - pEventTimer->Pause(); - pMiscTimer->Pause(); - pAudioPlayer->StopChannels(-1, -1); - uDialogueType = 0; - sDialogue_SpeakingActorNPC_ID = this->sNPC_ID; - pDialogue_SpeakingActor = this; - pNPCInfo = GetNPCData(this->sNPC_ID); - if ( (pNPCInfo->uFlags & 3) != 2 ) - pNPCInfo->uFlags = pNPCInfo->uFlags + 1; - - switch (pParty->alignment) - { - case PartyAlignment_Good: sprintf(pContainer, "evt%02d-b", const_2()); break; - case PartyAlignment_Neutral: sprintf(pContainer, "evt%02d", const_2()); break; - case PartyAlignment_Evil: sprintf(pContainer, "evt%02d-c", const_2()); break; - } - - pDialogueNPCCount = 0; - uNumDialogueNPCPortraits = 1; - pTexture_Dialogue_Background = pIcons_LOD->LoadTexturePtr(pContainer, TEXTURE_16BIT_PALETTE); - sprintf(pContainer, "npc%03u", pNPCInfo->uPortraitID); - v9 = 0; - pDialogueNPCPortraits[0] = pIcons_LOD->LoadTexturePtr(pContainer, TEXTURE_16BIT_PALETTE); - dword_591084 = areWeLoadingTexture; - uTextureID_right_panel_loop = uTextureID_right_panel; - if ( !pNPCInfo->Hired() && pNPCInfo->Location2D >= 0 ) - { - if ( (signed int)pParty->GetPartyFame() <= pNPCInfo->fame - || (pNumberContacts = pNPCInfo->uFlags & 0xFFFFFF7F, (pNumberContacts & 0x80000000u) != 0) ) - { - v9 = 1; - } - else - { - if ( pNumberContacts > 1 ) - { - if ( pNumberContacts == 2 ) - { - v9 = 3; - } - else - { - if ( pNumberContacts != 3 ) - { - if ( pNumberContacts != 4 ) - v9 = 1; - } - else - { - v9 = 2; - } - } - } - else if ( pNPCInfo->rep ) - { - v9 = 2; - } - } - } - if ( (sDialogue_SpeakingActorNPC_ID & 0x80000000u) != 0 ) - v9 = 4; - pDialogueWindow = GUIWindow::Create(0, 0, 640, 480, WINDOW_Dialogue, v9, 0);//pNumberContacts = 1, v9 = 0; pNumberContacts = 2, v9 = 3; - if (pNPCInfo->Hired()) - { - if ( !pNPCInfo->bHasUsedTheAbility ) - { - if ( pNPCInfo->uProfession >= 10 ) - { - if ( pNPCInfo->uProfession <= 12 || pNPCInfo->uProfession > 32 && (pNPCInfo->uProfession <= 34 - || pNPCInfo->uProfession > 38 && (pNPCInfo->uProfession <= 43 || pNPCInfo->uProfession == 52)) ) - { - pDialogueWindow->CreateButton(480, 250, 140, LOBYTE(pFontArrus->uFontHeight) - 3, 1, 0, UIMSG_SelectNPCDialogueOption, 9, 0, "", 0); - pDialogueWindow->_41D08F_set_keyboard_control_group(4, 1, 0, 1); - } - } - } - } - - pDialogueWindow->CreateButton( 61, 424, 31, 40, 2, 94, UIMSG_SelectCharacter, 1, '1', "", 0); - pDialogueWindow->CreateButton(177, 424, 31, 40, 2, 94, UIMSG_SelectCharacter, 2, '2', "", 0); - pDialogueWindow->CreateButton(292, 424, 31, 40, 2, 94, UIMSG_SelectCharacter, 3, '3', "", 0); - pDialogueWindow->CreateButton(407, 424, 31, 40, 2, 94, UIMSG_SelectCharacter, 4, '4', "", 0); - - if (bPlayerSaysHello && uActiveCharacter && !pNPCInfo->Hired()) - { - if (pParty->uCurrentHour < 5 || pParty->uCurrentHour > 21) - pPlayers[uActiveCharacter]->PlaySound(SPEECH_GoodEvening, 0); - else - pPlayers[uActiveCharacter]->PlaySound(SPEECH_GoodDay, 0); - } -} //----- (0040894B) -------------------------------------------------------- bool Actor::CanAct() diff -r f93d17337113 -r 3a5c8df8381d Actor.h --- a/Actor.h Tue May 21 14:34:14 2013 +0200 +++ b/Actor.h Tue May 21 23:44:51 2013 +0200 @@ -187,7 +187,6 @@ void SetRandomGoldIfTheresNoItem(); bool CanAct(); bool IsNotAlive(); - void InitializeDialogue(int bPlayerSaysHello); bool IsPeasant(); diff -r f93d17337113 -r 3a5c8df8381d Arcomage.cpp --- a/Arcomage.cpp Tue May 21 14:34:14 2013 +0200 +++ b/Arcomage.cpp Tue May 21 23:44:51 2013 +0200 @@ -1,4 +1,5 @@ #include +#include #include "LightmapBuilder.h" #include "Arcomage.h" @@ -2038,7 +2039,8 @@ { //nullsub_1(); //nullsub_1(); - inv_strcpy(pAreYouSureWishToLeave, Dest); + assert(false && "Invalid strcpy params"); + inv_strcpy(nullptr, Dest); v5 = 0;//unk::const_0(&unk_4E19FC, 0); //nullsub_1(); if ( v5 == 1 ) diff -r f93d17337113 -r 3a5c8df8381d Events.cpp --- a/Events.cpp Tue May 21 14:34:14 2013 +0200 +++ b/Events.cpp Tue May 21 23:44:51 2013 +0200 @@ -529,7 +529,7 @@ memset(&Dst, 0, 0x344u); dword_5B65D0_dialogue_actor_npc_id = _evt->v5 + ((_evt->v6 + ((_evt->v7 + ((unsigned int)_evt->v8 << 8)) << 8)) << 8); Dst.sNPC_ID = dword_5B65D0_dialogue_actor_npc_id; - Dst.InitializeDialogue(0); + GameUI_InitializeDialogue(&Dst, false); } else { @@ -1257,7 +1257,7 @@ { if ( pRenderer->pRenderD3D && !pRenderer->bWindowMode ) pRenderer->_49FD3A(); - sub_444839_move_map(_evt->v29, _evt->v30, v135, v132, v126, v129, v95, v134, (char *)&_evt->v31); + TransitionUI_Load(_evt->v29, _evt->v30, v135, v132, v126, v129, v95, v134, (char *)&_evt->v31); dword_5C3418 = uEventID; dword_5C341C = curr_seq_num + 1; goto LABEL_301; diff -r f93d17337113 -r 3a5c8df8381d GUIWindow.h --- a/GUIWindow.h Tue May 21 14:34:14 2013 +0200 +++ b/GUIWindow.h Tue May 21 23:44:51 2013 +0200 @@ -464,7 +464,17 @@ void draw_leather(); +// main menu ui +void MainMenuUI_LoadFontsAndSomeStuff(); +void MainMenuUI_Create(); +MENU_STATE MainMenuUI_Credits_Loop(); +// save & load ui +void SaveUI_Load(); +void SaveUI_Draw(); + +void LoadUI_Draw(); +void LoadUI_Load(unsigned int uDialogueType); // idb // game ui void GameUI_DrawRightPanel(); @@ -479,11 +489,16 @@ 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); +auto GameUI_GetMinimapHintText() -> const char *; void GameUI_DrawPartySpells(); void GameUI_DrawTorchlightAndWizardEye(); void GameUI_DrawCharacterSelectionFrame(); void GameUI_CharacterQuickRecord_Draw(GUIWindow *window, Player *player); +void GameUI_DrawNPCPopup(void *_this); +void GameUI_InitializeDialogue(Actor *actor, int bPlayerSaysHello); +void GameUI_DrawBranchlessDialogue(); +void GameUI_DrawDialogue(); // game menu ui @@ -494,8 +509,6 @@ - - // character ui struct GUIWindow *CharacterUI_Initialize(unsigned int _this); const char *CharacterUI_GetSkillDescText(unsigned int uPlayerID, PLAYER_SKILL_TYPE uPlayerSkillType); @@ -517,7 +530,7 @@ -//book ui +// book ui void BookUI_Draw(WindowType book); void BookUI_Questbook_Draw(); void BookUI_Autonotes_Draw(); @@ -538,8 +551,17 @@ +// rest ui +void RestUI_Load(); +void RestUI_Draw(); +// transition & travel ui +void TransitionUI_Load(uint anim_id, uint exit_pic_id, int x, int y, int z, int directiony, int directionx, int a8, const char *pLocationName); +void TransitionUI_Draw(); + +void TravelUI_Load(); +void TravelUI_Draw(); diff -r f93d17337113 -r 3a5c8df8381d Player.cpp --- a/Player.cpp Tue May 21 14:34:14 2013 +0200 +++ b/Player.cpp Tue May 21 23:44:51 2013 +0200 @@ -7687,7 +7687,7 @@ //----- (00449BB4) -------------------------------------------------------- bool Player::CompareVariable( enum VariableType VarNum, signed int pValue ) - { +{ Player *v3; // esi@1 signed int v4; // edi@1 unsigned int v5; // eax@8 @@ -7822,8 +7822,8 @@ case VAR_NPCs2: return pNPCStats->pNewNPCData[pValue].Hired(); case VAR_MonthEquals|VAR_CurrentSP: - test_bit_value = 0x80u >> ((signed __int16)a1 - 1) % 8; - our_bit_value = this->field_1A50[((signed __int16)a1 - 1)/8]; + test_bit_value = 0x80u >> ((signed __int16)pValue - 1) % 8; + our_bit_value = this->field_1A50[((signed __int16)pValue - 1)/8]; if ( !((unsigned __int8)test_bit_value & our_bit_value) ) return v4 >= pValue; v4 = pValue; @@ -7884,8 +7884,8 @@ } if ( VarNum == VAR_AutoNotes ) { - test_bit_value = 0x80u >> ((signed __int16)(a1 - 1) - 1) % 8; - our_bit_value = pParty->_autonote_bits[((signed __int16)(a1 - 1) - 1) /8]; + test_bit_value = 0x80u >> ((signed __int16)(pValue - 1) - 1) % 8; + our_bit_value = pParty->_autonote_bits[((signed __int16)(pValue - 1) - 1) /8]; if ( !((unsigned __int8)test_bit_value & our_bit_value) ) return false; return true; @@ -7954,8 +7954,8 @@ v12 = GetActualAge(); goto _j_cmp_against_arg; case VAR_Award: - test_bit_value = 0x80u >> ((signed __int16)a1 - 1) % 8; - our_bit_value = this->_guilds_member_bits[((signed __int16)a1 - 1) /8]; + test_bit_value = 0x80u >> ((signed __int16)pValue - 1) % 8; + our_bit_value = this->_guilds_member_bits[((signed __int16)pValue - 1) /8]; if ( !((unsigned __int8)test_bit_value & our_bit_value) ) return true; return false; diff -r f93d17337113 -r 3a5c8df8381d UIHouses.cpp --- a/UIHouses.cpp Tue May 21 14:34:14 2013 +0200 +++ b/UIHouses.cpp Tue May 21 23:44:51 2013 +0200 @@ -2097,7 +2097,7 @@ v6 = TargetColor(0xFFu, 0xFFu, 0xFFu); v7 = v5->pName; v8 = TargetColor(0xFFu, 0xFFu, 0x9Bu); - sprintf(pTmpBuf, &byte_4F0F98, v8, v7, v6); + sprintf(pTmpBuf, "\f%05d%s\f%05d", v8, v7, v6); sprintf(pTmpBuf2, dword_F8B1A4, pTmpBuf, 100 * v5->uLevel); current_npc_text = pTmpBuf2; memcpy(&a1, pDialogueWindow, sizeof(a1)); @@ -2123,9 +2123,9 @@ v0 = window_SpeakInHouse; if ( window_SpeakInHouse->field_40 == 1 ) { - sprintf(pTmpBuf, "%s\n%s", pGlobalTXT_LocalizationStrings[606], pGlobalTXT_LocalizationStrings[112]); + sprintf(pTmpBuf, "%s\n%s", pGlobalTXT_LocalizationStrings[606], pGlobalTXT_LocalizationStrings[112]); // "Pay" "How Much?" _this.DrawTitleText(pFontArrus, 0, 0x92u, v30, pTmpBuf, 3u); - _this.DrawTitleText(pFontArrus, 0, 0xBAu, v28, (const char *)pKeyActionMap->pPressedKeysBuffer, 3u); + _this.DrawTitleText(pFontArrus, 0, 0xBAu, v28, (const char *)pKeyActionMap->pPressedKeysBuffer, 3); v3 = pFontArrus; v4 = pFontArrus->GetLineWidth((const char *)pKeyActionMap->pPressedKeysBuffer); _this.DrawFlashingInputCursor(v4 / 2 + 80, 185, v3); @@ -2137,15 +2137,7 @@ v2 = v1; if ( v1 <= 0 ) { - //LABEL_8: pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0); - /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) - { - pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = UIMSG_Escape; - pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 1; - *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; - ++pMessageQueue_50CBD0->uNumMessages; - }*/ return; } if ( v1 > pParty->uNumGold ) @@ -2177,8 +2169,8 @@ } return; } -// F8B19C: using guessed type int dword_F8B19C; -// F8B1A0: using guessed type __int16 word_F8B1A0; + + //----- (004B7D7E) -------------------------------------------------------- void __cdecl BankDialog() diff -r f93d17337113 -r 3a5c8df8381d UIMainMenu.cpp --- a/UIMainMenu.cpp Tue May 21 14:34:14 2013 +0200 +++ b/UIMainMenu.cpp Tue May 21 23:44:51 2013 +0200 @@ -49,40 +49,44 @@ //----- (0041B578) -------------------------------------------------------- -void __cdecl MainMenuUI_LoadFontsAndSomeStuff() - { - pIcons_LOD->SetupPalettes(pRenderer->uTargetRBits, - pRenderer->uTargetGBits, - pRenderer->uTargetBBits); - pPaletteManager->SetColorChannelInfo(pRenderer->uTargetRBits, - pRenderer->uTargetGBits, - pRenderer->uTargetBBits); - pPaletteManager->RecalculateAll(); +void MainMenuUI_LoadFontsAndSomeStuff() +{ + pIcons_LOD->SetupPalettes(pRenderer->uTargetRBits, + pRenderer->uTargetGBits, + pRenderer->uTargetBBits); + pPaletteManager->SetColorChannelInfo(pRenderer->uTargetRBits, + pRenderer->uTargetGBits, + pRenderer->uTargetBBits); + pPaletteManager->RecalculateAll(); - for (uint i = 0; i < 480; ++i) - pSRZBufferLineOffsets[i] = 640 * i; + for (uint i = 0; i < 480; ++i) + pSRZBufferLineOffsets[i] = 640 * i; - pRenderer->ResetTextureClipRect(); + pRenderer->ResetTextureClipRect(); + + uTextureID_FONTPAL = pIcons_LOD->LoadTexture("FONTPAL", TEXTURE_16BIT_PALETTE); - uTextureID_FONTPAL = pIcons_LOD->LoadTexture("FONTPAL", TEXTURE_16BIT_PALETTE); - pFontArrus = LoadFont("arrus.fnt", "FONTPAL", NULL); - pFontLucida = LoadFont("lucida.fnt", "FONTPAL", NULL); - pFontCreate = LoadFont("create.fnt", "FONTPAL", NULL); - pFontSmallnum = LoadFont("smallnum.fnt", "FONTPAL", NULL); - pFontComic = LoadFont("comic.fnt", "FONTPAL", NULL); - pFontArrus->field_3 = 0; - pFontLucida->field_3 = 0; - pFontCreate->field_3 = 0; + pFontArrus = LoadFont("arrus.fnt", "FONTPAL", nullptr); + pFontArrus->field_3 = 0; + + pFontLucida = LoadFont("lucida.fnt", "FONTPAL", nullptr); + pFontLucida->field_3 = 0; + + pFontCreate = LoadFont("create.fnt", "FONTPAL", nullptr); + pFontCreate->field_3 = 0; - for (uint i = 0; i < 20; ++i) - pWindowList[i].eWindowType = WINDOW_null; + pFontSmallnum = LoadFont("smallnum.fnt", "FONTPAL", nullptr); + pFontComic = LoadFont("comic.fnt", "FONTPAL", nullptr); - uNumVisibleWindows = -1; - memset(pVisibleWindowsIdxs, 0, sizeof(pVisibleWindowsIdxs)); - } + for (uint i = 0; i < 20; ++i) + pWindowList[i].eWindowType = WINDOW_null; + + uNumVisibleWindows = -1; + memset(pVisibleWindowsIdxs, 0, sizeof(pVisibleWindowsIdxs)); +} //----- (004415C5) -------------------------------------------------------- -void LoadPartyBuffIcons() +static void LoadPartyBuffIcons() { for (uint i = 0; i < 14; ++i) { @@ -96,8 +100,8 @@ } //----- (0041B690) -------------------------------------------------------- -void __cdecl MainMenuUI_Create() - { +void MainMenuUI_Create() +{ //unsigned int v0; // eax@1 //unsigned int v1; // eax@1 //unsigned int v2; // eax@1 @@ -173,14 +177,14 @@ pPrimaryWindow->CreateButton(0xB1u, 0x1A8u, 0x1Fu, 0x28u, 2, 94, UIMSG_SelectCharacter, 2, '2', "", 0); pPrimaryWindow->CreateButton(0x124u, 0x1A8u, 0x1Fu, 0x28u, 2, 94, UIMSG_SelectCharacter, 3, '3', "", 0); pPrimaryWindow->CreateButton(0x197u, 0x1A8u, 0x1Fu, 0x28u, 2, 94, UIMSG_SelectCharacter, 4, '4', "", 0); - pPrimaryWindow->CreateButton(0x18u, 0x194u, 5u, 0x31u, 1, 93, UIMSG_0, 1u, 0, "", 0); - pPrimaryWindow->CreateButton(0x8Bu, 0x194u, 5u, 0x31u, 1, 93, UIMSG_0, 2u, 0, "", 0); - pPrimaryWindow->CreateButton(0xFFu, 0x194u, 5u, 0x31u, 1, 93, UIMSG_0, 3u, 0, "", 0); - pPrimaryWindow->CreateButton(0x172u, 0x194u, 5u, 0x31u, 1, 93, UIMSG_0, 4u, 0, "", 0); - pPrimaryWindow->CreateButton(0x61u, 0x194u, 5u, 0x31u, 1, 93, UIMSG_0, 1u, 0, "", 0); - pPrimaryWindow->CreateButton(0xD4u, 0x194u, 5u, 0x31u, 1, 93, UIMSG_0, 2u, 0, "", 0); - pPrimaryWindow->CreateButton(0x148u, 0x194u, 5u, 0x31u, 1, 93, UIMSG_0, 3u, 0, "", 0); - pPrimaryWindow->CreateButton(0x1BBu, 0x194u, 5u, 0x31u, 1, 93, UIMSG_0, 4u, 0, "", 0); + pPrimaryWindow->CreateButton(0x18u, 0x194u, 5u, 0x31u, 1, 93, UIMSG_0, 1, 0, "", 0); + pPrimaryWindow->CreateButton(0x8Bu, 0x194u, 5u, 0x31u, 1, 93, UIMSG_0, 2, 0, "", 0); + pPrimaryWindow->CreateButton(0xFFu, 0x194u, 5u, 0x31u, 1, 93, UIMSG_0, 3, 0, "", 0); + pPrimaryWindow->CreateButton(0x172u, 0x194u, 5u, 0x31u, 1, 93, UIMSG_0, 4, 0, "", 0); + pPrimaryWindow->CreateButton(0x61u, 0x194u, 5u, 0x31u, 1, 93, UIMSG_0, 1, 0, "", 0); + pPrimaryWindow->CreateButton(0xD4u, 0x194u, 5u, 0x31u, 1, 93, UIMSG_0, 2, 0, "", 0); + pPrimaryWindow->CreateButton(0x148u, 0x194u, 5u, 0x31u, 1, 93, UIMSG_0, 3, 0, "", 0); + pPrimaryWindow->CreateButton(0x1BBu, 0x194u, 5u, 0x31u, 1, 93, UIMSG_0, 4, 0, "", 0); uTextureID_ib_td1_A = pIcons_LOD->LoadTexture("ib-td1-A", TEXTURE_16BIT_PALETTE); v6 = pIcons_LOD->GetTexture(uTextureID_ib_td1_A); @@ -257,7 +261,7 @@ } //----- (004979D2) -------------------------------------------------------- -MENU_STATE __cdecl CreditsMenu__Loop() +MENU_STATE MainMenuUI_Credits_Loop() { char *v0; // eax@5 char *v1; // edi@5 diff -r f93d17337113 -r 3a5c8df8381d UIPopup.cpp --- a/UIPopup.cpp Tue May 21 14:34:14 2013 +0200 +++ b/UIPopup.cpp Tue May 21 23:44:51 2013 +0200 @@ -2002,12 +2002,12 @@ { pAudioPlayer->StopChannels(-1, -1); v3 = 0; - sub_416B01(v3); + GameUI_DrawNPCPopup(v3); } } else { - pWindow.Hint = _4443D5_GetMinimapRightClickText(); + pWindow.Hint = (char *)GameUI_GetMinimapHintText(); pWindow.uFrameWidth = 256; pWindow.uFrameX = 130; pWindow.uFrameY = 140; diff -r f93d17337113 -r 3a5c8df8381d UIRest.cpp --- a/UIRest.cpp Tue May 21 14:34:14 2013 +0200 +++ b/UIRest.cpp Tue May 21 23:44:51 2013 +0200 @@ -47,18 +47,18 @@ //----- (0041F6C1) -------------------------------------------------------- -void __cdecl RestUI_Initialize() +void RestUI_Load() { Player *v0; // eax@10 if ( !dword_506F14 ) pAudioPlayer->StopChannels(-1, -1); - if ( pCurrentScreen ) - { + if ( pCurrentScreen != SCREEN_GAME) + { pGUIWindow_CurrentMenu->Release(); pCurrentScreen = SCREEN_GAME; - viewparams->bRedrawGameUI = 1; - } + viewparams->bRedrawGameUI = true; + } pEventTimer->Pause(); if ( dword_506F14 != 2 ) GUIWindow::Create(518, 450, 0, 0, WINDOW_PressedButton2, (int)pBtn_Rest, 0); @@ -87,11 +87,13 @@ --uRestUI_FoodRequiredToRest; if ( uRestUI_FoodRequiredToRest < 1 ) uRestUI_FoodRequiredToRest = 1; - if ( !_strcmpi(pCurrentMapName, "d29.blv") && (unsigned __int16)_449B57_test_bit(pParty->_quest_bits, 98) ) + if ( !_strcmpi(pCurrentMapName, "d29.blv") && _449B57_test_bit(pParty->_quest_bits, 98) ) uRestUI_FoodRequiredToRest = 0; + ++pIcons_LOD->uTexturePacksCount; if ( !pIcons_LOD->uNumPrevLoadedFiles ) pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles; + pCurrentScreen = SCREEN_REST; _507CD4_RestUI_hourglass_anim_controller = 0; uTextureID_RestUI_restmain = pIcons_LOD->LoadTexture("restmain", TEXTURE_16BIT_PALETTE); @@ -104,16 +106,16 @@ LoadActualSkyFrame(); pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640u, 480u, WINDOW_Rest, 0, 0); - pButton_RestUI_Exit = pGUIWindow_CurrentMenu->CreateButton(280, 297, 154, 37, 1, 0, UIMSG_ExitRest, 0, 0, "", pIcons_LOD->GetTexture(uTextureID_RestUI_restexit), 0); - pButton_RestUI_Main = pGUIWindow_CurrentMenu->CreateButton( 24, 154, 225, 37, 1, 0, UIMSG_Rest8Hour, 0, 0x52u, "", pIcons_LOD->GetTexture(uTextureID_RestUI_restb4), 0); - pButton_RestUI_WaitUntilDawn = pGUIWindow_CurrentMenu->CreateButton( 61, 232, 154, 33, 1, 0, UIMSG_AlreadyResting, 0, 0x44u, "", pIcons_LOD->GetTexture(uTextureID_RestUI_restb1), 0); - pButton_RestUI_Wait1Hour = pGUIWindow_CurrentMenu->CreateButton( 61, 264, 154, 33, 1, 0, UIMSG_Wait1Hour, 0, 0x48u, "", pIcons_LOD->GetTexture(uTextureID_RestUI_restb2), 0); - pButton_RestUI_Wait5Minutes = pGUIWindow_CurrentMenu->CreateButton( 61, 296, 154, 33, 1, 0, UIMSG_Wait5Minutes, 0, 0x4Du, "", pIcons_LOD->GetTexture(uTextureID_RestUI_restb3), 0); + pButton_RestUI_Exit = pGUIWindow_CurrentMenu->CreateButton(280, 297, 154, 37, 1, 0, UIMSG_ExitRest, 0, 0, "", pIcons_LOD->GetTexture(uTextureID_RestUI_restexit), 0); + pButton_RestUI_Main = pGUIWindow_CurrentMenu->CreateButton( 24, 154, 225, 37, 1, 0, UIMSG_Rest8Hour, 0, 'R', "", pIcons_LOD->GetTexture(uTextureID_RestUI_restb4), 0); + pButton_RestUI_WaitUntilDawn = pGUIWindow_CurrentMenu->CreateButton( 61, 232, 154, 33, 1, 0, UIMSG_AlreadyResting, 0, 'D', "", pIcons_LOD->GetTexture(uTextureID_RestUI_restb1), 0); + pButton_RestUI_Wait1Hour = pGUIWindow_CurrentMenu->CreateButton( 61, 264, 154, 33, 1, 0, UIMSG_Wait1Hour, 0, 'H', "", pIcons_LOD->GetTexture(uTextureID_RestUI_restb2), 0); + pButton_RestUI_Wait5Minutes = pGUIWindow_CurrentMenu->CreateButton( 61, 296, 154, 33, 1, 0, UIMSG_Wait5Minutes, 0, 'M', "", pIcons_LOD->GetTexture(uTextureID_RestUI_restb3), 0); } //----- (0041FA01) -------------------------------------------------------- -void __cdecl RestUI_Draw() - { +void RestUI_Draw() +{ int live_characters; // esi@1 unsigned int v3; // eax@15 //char v4; // al@17 @@ -217,8 +219,5 @@ Sleep6Hours(); } else - { - GUIWindow::Create(pButton_RestUI_Exit->uX, pButton_RestUI_Exit->uY, 0, 0, WINDOW_CloseRestWindowBtn, - (int)pButton_RestUI_Exit, (int)pGlobalTXT_LocalizationStrings[81]); - } + GUIWindow::Create(pButton_RestUI_Exit->uX, pButton_RestUI_Exit->uY, 0, 0, WINDOW_CloseRestWindowBtn, (int)pButton_RestUI_Exit, (int)pGlobalTXT_LocalizationStrings[81]); // "Exit Rest" } \ No newline at end of file diff -r f93d17337113 -r 3a5c8df8381d UISaveLoad.cpp --- a/UISaveLoad.cpp Tue May 21 14:34:14 2013 +0200 +++ b/UISaveLoad.cpp Tue May 21 23:44:51 2013 +0200 @@ -48,7 +48,7 @@ //----- (004601B7) -------------------------------------------------------- -void GameUI_MainMenu_DoDrawLoad(int a1) +static void UI_DrawSaveLoad(bool save) { unsigned __int16 v1; // bx@1 unsigned int v2; // edi@4 @@ -87,18 +87,17 @@ unsigned int pSaveFiles; // [sp+70h] [bp-14h]@10 __int64 pAMPM2; // [sp+74h] [bp-10h]@10 int pYear; // [sp+7Ch] [bp-8h]@10 - int a4; // [sp+80h] [bp-4h]@1 + //int a4; // [sp+80h] [bp-4h]@1 int pFilesID; v1 = 255; - a4 = a1; TargetColor(0xFF, 0xFF, 0xFF); TargetColor(0xFF, 0xFF, 0x9B); pRenderer->BeginScene(); if ( GetCurrentMenuID() != MENU_SAVELOAD && GetCurrentMenuID() != MENU_LoadingProcInMainMenu ) { pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(uTextureID_loadsave)); - if ( a4 ) + if (save) { v2 = uTextureID_save_up; v3 = uTextureID_LS_saveU; @@ -213,11 +212,11 @@ } else { - if ( a4 ) + if ( save ) pSaveFiles = 40; else pSaveFiles = uNumSavegameFiles; - a4 = 199; + int a4 = 199; pFilesID = pSaveListPosition; pSlotName = (const char *)(&pSavegameHeader[pSaveListPosition]);//draw name for save slot do @@ -246,27 +245,20 @@ // 6A0C9C: using guessed type int dword_6A0C9C; //----- (004606F7) -------------------------------------------------------- -void __cdecl GameUI_MainMenu_DrawLoad() +void LoadUI_Draw() { - GameUI_MainMenu_DoDrawLoad(0); + UI_DrawSaveLoad(false); } //----- (004606FE) -------------------------------------------------------- -void __cdecl sub_4606FE() +void SaveUI_Draw() { - GameUI_MainMenu_DoDrawLoad(1); + UI_DrawSaveLoad(true); } -void __cdecl FreeSavegameThumbnails() - { - for (int i = 0; i < 40; ++i) - //pAllocator->FreeChunk(pSavegameThumbnails[i].pPixels); - pSavegameThumbnails[i].Release(); - } - //----- (0045E361) -------------------------------------------------------- -void __fastcall GameUI_DrawLoadMenu(unsigned int uDialogueType) +void LoadUI_Load(unsigned int uDialogueType) { unsigned int v1; // ebp@5 unsigned int v2; // eax@5 @@ -389,7 +381,7 @@ } //----- (0045E93E) -------------------------------------------------------- -void GameUI_DrawSaveMenu() +void SaveUI_Load() { unsigned int v0; // ebp@4 unsigned int v1; // eax@4 diff -r f93d17337113 -r 3a5c8df8381d UITransition.cpp --- a/UITransition.cpp Tue May 21 14:34:14 2013 +0200 +++ b/UITransition.cpp Tue May 21 23:44:51 2013 +0200 @@ -0,0 +1,280 @@ +#include +#include + +#include "Mouse.h" +#include "Keyboard.h" +#include "VideoPlayer.h" +#include "MapInfo.h" +#include "Game.h" +#include "GUIWindow.h" +#include "GUIFont.h" +#include "GUIProgressBar.h" +#include "Party.h" +#include "AudioPlayer.h" +#include "Outdoor.h" +#include "IndoorCamera.h" +#include "Overlays.h" +#include "Monsters.h" +#include "Arcomage.h" +#include "LOD.h" +#include "Actor.h" +#include "Allocator.h" +#include "Events.h" +#include "Viewport.h" +#include "FrameTableInc.h" +#include "Math.h" +#include "SpriteObject.h" +#include "ObjectList.h" +#include "Chest.h" +#include "PaletteManager.h" +#include "DecorationList.h" +#include "SaveLoad.h" +#include "stru123.h" +#include "Time.h" +#include "IconFrameTable.h" +#include "Awards.h" +#include "Autonotes.h" +#include "stru159.h" +#include "stru160.h" +#include "TurnEngine.h" +#include "CastSpellInfo.h" +#include "Weather.h" +#include "stru298.h" +#include "StorylineTextTable.h" +#include "Events2D.h" +#include "texts.h" +#include "UIHouses.h" + +#include "mm7_data.h" + + + + + +//----- (00444839) -------------------------------------------------------- +void TransitionUI_Load(uint anim_id, uint exit_pic_id, int x, int y, int z, int directiony, int directionx, int a8, const char *pLocationName) +{ + //unsigned int v9; // ebx@1 + //int v10; // edi@1 + //signed int v11; // eax@1 + unsigned int v12; // eax@6 + const char *v13; // ST0C_4@6 + unsigned int v14; // eax@8 + const char *v15; // eax@14 + unsigned int v16; // eax@16 + //unsigned int result; // eax@26 + const char *v18; // [sp-8h] [bp-40h]@9 + //const char *v19; // [sp-4h] [bp-3Ch]@2 + char *v20; // [sp-4h] [bp-3Ch]@9 + const char *v21; // [sp-4h] [bp-3Ch]@11 + char pContainer[40]; // [sp+Ch] [bp-2Ch]@1 + unsigned int v23; // [sp+34h] [bp-4h]@1 + + //v9 = a1; + //v10 = a2; + v23 = IndoorLocation::GetLocationIndex(pLocationName); + dword_59117C_teleportx = x; + dword_591178_teleporty = y; + dword_591174_teleportz = z; + dword_591170_teleport_directiony = directiony; + dword_59116C_teleport_directionx = directionx; + dword_591168_teleport_speedz = a8; + dword_591164_teleport_map_name = (char *)pLocationName; + uCurrentHouse_Animation = anim_id; + pEventTimer->Pause(); + pAudioPlayer->StopChannels(-1, -1); + + switch (pParty->alignment) + { + case PartyAlignment_Good: sprintfex(pContainer, "evt%02d-b", const_2()); break; + case PartyAlignment_Neutral: sprintfex(pContainer, "evt%02d", const_2()); break; + case PartyAlignment_Evil: sprintfex(pContainer, "evt%02d-c", const_2()); break; + default: assert(false); + } + + v12 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); + v13 = pHouse_ExitPictures[exit_pic_id]; + pTexture_Dialogue_Background = &pIcons_LOD->pTextures[v12]; + pTexture_outside = pIcons_LOD->LoadTexturePtr(v13, TEXTURE_16BIT_PALETTE); + if (anim_id) + { + if ( !v23 ) + //pVideoPlayer->OpenHouseMovie(pAnimatedRooms[p2DEvents_minus1___02[26 * v9]].field_0, 1u); + pVideoPlayer->OpenHouseMovie(pAnimatedRooms[p2DEvents[anim_id - 1].uAnimationID].video_name, 1); + } + else if ( !v23 ) + { + v14 = pMapStats->GetMapInfo(pCurrentMapName); + if ( v14 ) + { + sprintfex(sHouseName, pGlobalTXT_LocalizationStrings[410], pMapStats->pInfos[v14].pName); // "Leave %s" + goto LABEL_20; + } + v21 = pGlobalTXT_LocalizationStrings[79]; + goto LABEL_19; + } + v15 = pLocationName; + if ( *pLocationName == 48 ) + v15 = pCurrentMapName; + v16 = pMapStats->GetMapInfo(v15); + if ( v16 ) + { + sprintfex(sHouseName, pGlobalTXT_LocalizationStrings[411], pMapStats->pInfos[v16].pName); + goto LABEL_20; + } + v21 = pGlobalTXT_LocalizationStrings[73]; +LABEL_19: + strcpy(sHouseName, v21); +LABEL_20: + pDialogueWindow = GUIWindow::Create(0, 0, 640, 480, WINDOW_Transition, 0, (int)sHouseName); + //if ( BYTE1(pAnimatedRooms[p2DEvents_minus1___02[26 * v9]].field_C) ) + if ( pAnimatedRooms[p2DEvents[anim_id - 1].uAnimationID].uRoomSoundId ) + PlayHouseSound(anim_id, HouseSound_Greeting); + if ( uCurrentlyLoadedLevelType == LEVEL_Indoor && uActiveCharacter && pParty->uFlags & 0x30 ) + pPlayers[uActiveCharacter]->PlaySound(SPEECH_47, 0); + if ( v23 ) + uCurrentHouse_Animation = v23; +} + + + + +//----- (00444C8F) -------------------------------------------------------- +void TravelUI_Load() +{ + //signed int v0; // eax@1 + unsigned int v1; // eax@6 + GUIWindow *result; // eax@9 + //const char *v3; // [sp-4h] [bp-2Ch]@2 + char pContainer[32]; // [sp+0h] [bp-28h]@1 + + pEventTimer->Pause(); + + switch (pParty->alignment) + { + case PartyAlignment_Good: sprintfex(pContainer, "evt%02d-b", const_2()); break; + case PartyAlignment_Neutral: sprintfex(pContainer, "evt%02d", const_2()); break; + case PartyAlignment_Evil: sprintfex(pContainer, "evt%02d-c", const_2()); break; + default: assert(false); + } + + 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, pGlobalTXT_LocalizationStrings[410], pMapStats->pInfos[v1].pName);// "Leave %s" + else + strcpy(sHouseName, pGlobalTXT_LocalizationStrings[79]);// "Exit" + pDialogueWindow = GUIWindow::Create(0, 0, 640, 480, WINDOW_ChangeLocation, 0, (int)sHouseName); +} + + + +//----- (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 + 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); + 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(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 ) + { + 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." + } + else + { + v6 = v3; + v5 = pGlobalTXT_LocalizationStrings[128]; // "It will take %d days to travel to %s." + } + sprintfex(pTmpBuf, v5, v6, v1->pName); + strcat(pTmpBuf, "\n \n"); + sprintfex(pTmpBuf2, pGlobalTXT_LocalizationStrings[126], pMapStats->pInfos[v9].pName); + strcat(pTmpBuf, pTmpBuf2); + v4 = pFontCreate->CalcTextHeight(pTmpBuf, &v7, 0, 0); + v7.DrawTitleText(pFontCreate, 0, (212 - v4) / 2 + 101, 0, pTmpBuf, 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 + unsigned int v9; // [sp+60h] [bp-Ch]@1 + unsigned int v10; // [sp+64h] [bp-8h]@1 + int a3; // [sp+6Bh] [bp-1h]@11 + + memcpy(&v8, pPrimaryWindow, sizeof(v8)); + v10 = pMapStats->GetMapInfo(pCurrentMapName); + 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)); + pRenderer->DrawTextureIndexed(pNPCPortraits_x[0][0], pNPCPortraits_y[0][0], pTexture_outside); + uTextureID_right_panel_loop = uTextureID_right_panel; + 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)); + 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; + + 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); + } + else if ( v10 ) + { + sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[409], pMapInfo->pName);// "Do you wish to leave %s?" + v4 = (212 - pFontCreate->CalcTextHeight(pTmpBuf, &v8, 0, 0)) / 2 + 101; + v8.DrawTitleText(pFontCreate, 0, v4, 0, pTmpBuf, 3); + } + else assert(false); + + _unused_5B5924_is_travel_ui_drawn = true; +} diff -r f93d17337113 -r 3a5c8df8381d UiGame.cpp --- a/UiGame.cpp Tue May 21 14:34:14 2013 +0200 +++ b/UiGame.cpp Tue May 21 23:44:51 2013 +0200 @@ -67,6 +67,642 @@ int uTextureID_GameUI_CharSelectionFrame; // 50C98C + + + + +//----- (00445D4A) -------------------------------------------------------- +void GameUI_InitializeDialogue(Actor *actor, int bPlayerSaysHello) +{ + NPCData *pNPCInfo; // ebp@1 + int v9; // esi@8 + int pNumberContacts; // eax@11 + char pContainer[32]; // [sp+14h] [bp-28h]@3 + + dword_A74CDC = -1; + dword_AE336C = -1; + pEventTimer->Pause(); + pMiscTimer->Pause(); + pAudioPlayer->StopChannels(-1, -1); + uDialogueType = 0; + sDialogue_SpeakingActorNPC_ID = actor->sNPC_ID; + pDialogue_SpeakingActor = actor; + pNPCInfo = GetNPCData(actor->sNPC_ID); + if ( (pNPCInfo->uFlags & 3) != 2 ) + pNPCInfo->uFlags = pNPCInfo->uFlags + 1; + + switch (pParty->alignment) + { + case PartyAlignment_Good: sprintfex(pContainer, "evt%02d-b", const_2()); break; + case PartyAlignment_Neutral: sprintfex(pContainer, "evt%02d", const_2()); break; + case PartyAlignment_Evil: sprintfex(pContainer, "evt%02d-c", const_2()); break; + } + + pDialogueNPCCount = 0; + uNumDialogueNPCPortraits = 1; + pTexture_Dialogue_Background = pIcons_LOD->LoadTexturePtr(pContainer, TEXTURE_16BIT_PALETTE); + sprintfex(pContainer, "npc%03u", pNPCInfo->uPortraitID); + v9 = 0; + pDialogueNPCPortraits[0] = pIcons_LOD->LoadTexturePtr(pContainer, TEXTURE_16BIT_PALETTE); + dword_591084 = areWeLoadingTexture; + uTextureID_right_panel_loop = uTextureID_right_panel; + if ( !pNPCInfo->Hired() && pNPCInfo->Location2D >= 0 ) + { + if ( (signed int)pParty->GetPartyFame() <= pNPCInfo->fame + || (pNumberContacts = pNPCInfo->uFlags & 0xFFFFFF7F, (pNumberContacts & 0x80000000u) != 0) ) + { + v9 = 1; + } + else + { + if ( pNumberContacts > 1 ) + { + if ( pNumberContacts == 2 ) + { + v9 = 3; + } + else + { + if ( pNumberContacts != 3 ) + { + if ( pNumberContacts != 4 ) + v9 = 1; + } + else + { + v9 = 2; + } + } + } + else if ( pNPCInfo->rep ) + { + v9 = 2; + } + } + } + if (sDialogue_SpeakingActorNPC_ID < 0) + v9 = 4; + pDialogueWindow = GUIWindow::Create(0, 0, 640, 480, WINDOW_Dialogue, v9, 0);//pNumberContacts = 1, v9 = 0; pNumberContacts = 2, v9 = 3; + if (pNPCInfo->Hired()) + { + if ( !pNPCInfo->bHasUsedTheAbility ) + { + if ( pNPCInfo->uProfession >= 10 ) + { + if ( pNPCInfo->uProfession <= 12 || pNPCInfo->uProfession > 32 && (pNPCInfo->uProfession <= 34 + || pNPCInfo->uProfession > 38 && (pNPCInfo->uProfession <= 43 || pNPCInfo->uProfession == 52)) ) + { + pDialogueWindow->CreateButton(480, 250, 140, LOBYTE(pFontArrus->uFontHeight) - 3, 1, 0, UIMSG_SelectNPCDialogueOption, 9, 0, "", 0); + pDialogueWindow->_41D08F_set_keyboard_control_group(4, 1, 0, 1); + } + } + } + } + + pDialogueWindow->CreateButton( 61, 424, 31, 40, 2, 94, UIMSG_SelectCharacter, 1, '1', "", 0); + pDialogueWindow->CreateButton(177, 424, 31, 40, 2, 94, UIMSG_SelectCharacter, 2, '2', "", 0); + pDialogueWindow->CreateButton(292, 424, 31, 40, 2, 94, UIMSG_SelectCharacter, 3, '3', "", 0); + pDialogueWindow->CreateButton(407, 424, 31, 40, 2, 94, UIMSG_SelectCharacter, 4, '4', "", 0); + + if (bPlayerSaysHello && uActiveCharacter && !pNPCInfo->Hired()) + { + if (pParty->uCurrentHour < 5 || pParty->uCurrentHour > 21) + pPlayers[uActiveCharacter]->PlaySound(SPEECH_GoodEvening, 0); + else + pPlayers[uActiveCharacter]->PlaySound(SPEECH_GoodDay, 0); + } +} + +//----- (00445350) -------------------------------------------------------- +void GameUI_DrawDialogue() +{ + NPCData *pNPC; // ebx@2 + int pGreetType; // eax@2 + unsigned __int16 v2; // di@2 + //unsigned int v3; // eax@2 + char *v4; // esi@3 + //int v5; // eax@11 + //char *v6; // ecx@13 + //char *v7; // eax@16 + //unsigned int v8; // edi@19 + //char *v9; // ecx@27 + char *v10; // eax@29 + //int v11; // eax@30 + int v12; // esi@39 + char *v13; // eax@41 + GUIButton *v14; // eax@43 + //GUIButton *v15; // edi@43 + signed int v16; // eax@44 + //unsigned int v23; // eax@53 + //const char *v24; // eax@59 + //unsigned __int16 v30; // cx@83 + int v31; // ecx@86 + int v32; // ebx@93 + unsigned int v33; // eax@93 + GUIWindow *v34; // ecx@93 + int v35; // esi@93 + int i; // eax@93 + GUIButton *v37; // eax@94 + int v38; // eax@95 + signed int v39; // esi@99 + signed int v40; // eax@102 + unsigned int v41; // ebx@102 + int v42; // edi@102 + GUIButton *v43; // esi@103 + int v44; // eax@104 + unsigned int v45; // ecx@104 + unsigned __int16 *v46; // edx@104 + unsigned __int16 v47; // ax@104 + GUIWindow pWindow; // [sp+4h] [bp-110h]@39 + int v49; // [sp+Ch] [bp-108h]@39 + int v50; // [sp+14h] [bp-100h]@39 + GUIWindow v51; // [sp+58h] [bp-BCh]@2 + GUIWindow v52; // [sp+ACh] [bp-68h]@42 + char *Str; // [sp+100h] [bp-14h]@104 + //int v54; // [sp+104h] [bp-10h]@2 + //unsigned __int16 *v55; // [sp+108h] [bp-Ch]@82 + GUIFont *pOutString; // [sp+10Ch] [bp-8h]@39 + char *pInString=NULL; // [sp+110h] [bp-4h]@32 + + if ( !pDialogueWindow ) + return; + + memcpy(&v51, pDialogueWindow, sizeof(v51)); + pNPC = GetNPCData(sDialogue_SpeakingActorNPC_ID); + pGreetType = GetGreetType(sDialogue_SpeakingActorNPC_ID); + v51.uFrameWidth -= 10; + v51.uFrameZ -= 10; + //v54 = v1; + TargetColor(0xFFu, 0xFFu, 0xFFu); + TargetColor(0xE1u, 0xCDu, 0x23u); + v2 = TargetColor(0x15u, 0x99u, 0xE9u); + pRenderer->DrawTextureIndexed(477, 0, pTexture_Dialogue_Background); + pRenderer->DrawTextureTransparent(468, 0, (Texture *)(uTextureID_right_panel_loop != -1 ? &pIcons_LOD->pTextures[uTextureID_right_panel_loop] : 0)); + pRenderer->DrawTextureIndexed(pNPCPortraits_x[0][0] - 4, pNPCPortraits_y[0][0] - 4, (Texture *)(uTextureID_50795C != -1 ? &pIcons_LOD->pTextures[uTextureID_50795C] : 0)); + pRenderer->DrawTextureIndexed(pNPCPortraits_x[0][0], pNPCPortraits_y[0][0], pDialogueNPCPortraits[0]); + + if (pNPC->uProfession) + { + assert(pNPC->uProfession < sizeof(aNPCProfessionNames) / sizeof(*aNPCProfessionNames)); // sometimes buffer overflows; errors emerge both here and in dialogue text + sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[429], pNPC->pName, aNPCProfessionNames[pNPC->uProfession]);//^Pi[%s] %s + } + else + strcpy(pTmpBuf, pNPC->pName); + + v51.DrawTitleText(pFontArrus, 483, 112, v2, pTmpBuf, 3); + pParty->GetPartyFame(); + + pInString = nullptr; + switch (uDialogueType) + { + case DIALOGUE_13: + pInString = BuilDialogueString(pNPCStats->pProfessions[pNPC->uProfession - 1].pJoinText, uActiveCharacter - 1, 0, 0, 0, 0); + break; + + case DIALOGUE_PROFESSION_DETAILS: + { + auto prof = pNPCStats->pProfessions + pNPC->uProfession - 1; + + if (dialogue_show_profession_details) + pInString = BuilDialogueString(prof->pBenefits, uActiveCharacter - 1, 0, 0, 0, 0); + else if (pNPC->Hired()) + pInString = BuilDialogueString(prof->pDismissText, uActiveCharacter - 1, 0, 0, 0, 0); + else + pInString = BuilDialogueString(prof->pJoinText, uActiveCharacter - 1, 0, 0, 0, 0); + } + break; + + + case DIALOGUE_ARENA_WELCOME: + pInString = pGlobalTXT_LocalizationStrings[574]; // "Welcome to the Arena of Life and Death. Remember, you are only allowed one arena combat per visit. To fight an arena battle, select the option that best describes your abilities and return to me- if you survive:" + break; + + case DIALOGUE_ARENA_FIGHT_NOT_OVER_YET: + pInString = pGlobalTXT_LocalizationStrings[577]; //"Get back in there you wimps:" + break; + + case DIALOGUE_ARENA_REWARD: + sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[576], gold_transaction_amount);// "Congratulations on your win: here's your stuff: %u gold." + pInString = pTmpBuf; + break; + + case DIALOGUE_ARENA_ALREADY_WON: + pInString = pGlobalTXT_LocalizationStrings[582]; // "You already won this trip to the Arena:" + break; + + default: + if (uDialogueType > DIALOGUE_18 && uDialogueType < DIALOGUE_23 && !byte_5B0938[0]) + { + pInString = (char *)current_npc_text; + } + else if (pGreetType == 1)//QuestNPC_greet + { + if (pNPC->greet) + { + if ((pNPC->uFlags & 3) == 2) + pInString = pNPCStats->pNPCGreetings[pNPC->greet - 1].pGreeting2; + else + pInString = pNPCStats->pNPCGreetings[pNPC->greet - 1].pGreeting1; + } + } + else if (pGreetType == 2)//HiredNPC_greet + { + auto prof = pNPCStats->pProfessions + pNPC->uProfession - 1; + + if (pNPC->Hired()) + pInString = BuilDialogueString(prof->pDismissText, uActiveCharacter - 1, 0, 0, 0, 0); + else + pInString = BuilDialogueString(prof->pJoinText, uActiveCharacter - 1, 0, 0, 0, 0); + } + break; + } + + if (pInString) + { + pWindow.uFrameWidth = game_viewport_width; + pWindow.uFrameZ = 452; + auto font = pFontArrus; + v12 = pFontArrus->CalcTextHeight(pInString, &pWindow, 13, 0) + 7; + if ( 352 - v12 < 8 ) + { + font = pFontCreate; + v12 = pFontCreate->CalcTextHeight(pInString, &pWindow, 13, 0) + 7; + } + if (uTextureID_Leather != -1) + pRenderer->_4A6A68(8, 352 - v12, &pIcons_LOD->pTextures[uTextureID_Leather], pIcons_LOD->pTextures[uTextureID_Leather].uTextureHeight - v12); + pRenderer->DrawTextureIndexed(8u, 347 - v12, pTexture_591428); + v13 = FitTextInAWindow(pInString, font, &pWindow, 0xDu, 0); + pDialogueWindow->DrawText(font, 13, 354 - v12, 0, v13, 0, 0, 0); + } + + + memcpy(&v52, pDialogueWindow, sizeof(v52)); + v52.uFrameX = 483; + v52.uFrameWidth = 148; + v52.uFrameZ = 334; + for (int i = v52.pStartingPosActiveItem; + i < v52.pStartingPosActiveItem + v52.pNumPresenceButton; ++i) + { + v14 = v52.GetControl(i); + //v15 = v14; + if ( !v14 ) + break; + v16 = v14->msg_param; + + if ( v16 > 88 ) + v14->pButtonName[0] = 0; + else if (v16 == 88) + strcpy(v14->pButtonName, pGlobalTXT_LocalizationStrings[581]); // Lord + else if (v16 == 87) + strcpy(v14->pButtonName, pGlobalTXT_LocalizationStrings[580]); // Knight + else if (v16 == 86) + strcpy(v14->pButtonName, pGlobalTXT_LocalizationStrings[579]); // Squire + else if (v16 == 85) + strcpy(v14->pButtonName, pGlobalTXT_LocalizationStrings[578]); // Page + else if (v16 == 77) + strcpy(v14->pButtonName, pGlobalTXT_LocalizationStrings[407]); // Details + else if (v16 == 76) + { + if (pNPC->Hired()) + sprintf(v14->pButtonName, (const char*)pGlobalTXT_LocalizationStrings[408], pNPC->pName); // Release %s + else + strcpy(v14->pButtonName, pGlobalTXT_LocalizationStrings[406]); // Hire + } + else if (v16 == 24) + { + __debugbreak(); // learn conditions of this event + auto topic = pNPCTopics[pNPC->evt_F - 1].pTopic;//(&dword_721660)[8 * v23]; + if (!topic) + { + v14->pButtonName[0] = 0; + v14->msg_param = 0; + } + else + strcpy(v14->pButtonName, topic); + } + else if (v16 == 9) + strcpy(v14->pButtonName, GetProfessionActionText(pNPC->uProfession)); + else if (v16 == 19) + { + // __debugbreak(); // learn conditions of this event Scavenger Hunt + auto topic = pNPCTopics[pNPC->evt_A - 1].pTopic;//(&dword_721660)[8 * v23]; + if (!topic) + { + v14->pButtonName[0] = 0; + v14->msg_param = 0; + } + else strcpy(v14->pButtonName, topic); + } + else if (v16 == 20) + { + //__debugbreak(); // learn conditions of this event instruments + auto topic = pNPCTopics[pNPC->evt_B - 1].pTopic;//(&dword_721660)[8 * v23]; + if (!topic) + { + v14->pButtonName[0] = 0; + v14->msg_param = 0; + } + else strcpy(v14->pButtonName, topic); + } + else if (v16 == 21) + { + //__debugbreak(); // learn conditions of this event + auto topic = pNPCTopics[pNPC->evt_C - 1].pTopic;//(&dword_721660)[8 * v23]; + if (!topic) + { + v14->pButtonName[0] = 0; + v14->msg_param = 0; + } + else strcpy(v14->pButtonName, topic); + } + else if (v16 == 22) + { + //__debugbreak(); // learn conditions of this event + auto topic = pNPCTopics[pNPC->evt_D - 1].pTopic;//(&dword_721660)[8 * v23]; + if (!topic) + { + v14->pButtonName[0] = 0; + v14->msg_param = 0; + } + else strcpy(v14->pButtonName, topic); + } + else if (v16 == 23) + { + //__debugbreak(); // learn conditions of this event + auto topic = pNPCTopics[pNPC->evt_E - 1].pTopic;//(&dword_721660)[8 * v23]; + if (!topic) + { + v14->pButtonName[0] = 0; + v14->msg_param = 0; + } + else strcpy(v14->pButtonName, topic); + } + else if (v16 == 13) + { + if (pNPC->Hired()) + sprintf(v14->pButtonName, pGlobalTXT_LocalizationStrings[408], pNPC->pName); // Release %s + else + strcpy(v14->pButtonName, pGlobalTXT_LocalizationStrings[122]); // Join + } + else + v14->pButtonName[0] = 0; + + + if (pParty->field_7B5_in_arena_quest && pParty->field_7B5_in_arena_quest != -1) + { + int num_dead_actors = 0; + pInString = 0; + for (uint i = 0; i < uNumActors; ++i) + { + if (pActors[i].uAIState == Dead || pActors[i].uAIState == Removed || + pActors[i].uAIState == Disabled) + ++num_dead_actors; + else + { + int sumonner_type = PID_TYPE(pActors[i].uSummonerID); + if (sumonner_type == OBJECT_Player) + ++num_dead_actors; + } + } + if (num_dead_actors == uNumActors) + strcpy(v14->pButtonName, pGlobalTXT_LocalizationStrings[658]); // Collect Prize + } + } + + + v32 = 0; + //pInString = (char *)TargetColor(0xFFu, 0xFFu, 0xFFu); + v33 = TargetColor(0xE1u, 0xCDu, 0x23u); + v34 = pDialogueWindow; + //v54 = v33; + v35 = pDialogueWindow->pStartingPosActiveItem; + for ( i = v35 + pDialogueWindow->pNumPresenceButton; v35 < i; i = pDialogueWindow->pNumPresenceButton + pDialogueWindow->pStartingPosActiveItem ) + { + v37 = v34->GetControl(v35); + if ( !v37 ) + { + v34 = pDialogueWindow; + break; + } + v38 = pFontArrus->CalcTextHeight(v37->pButtonName, &v52, 0, 0); + v34 = pDialogueWindow; + v32 += v38; + ++v35; + } + v39 = v34->pNumPresenceButton; + if ( v39 ) + { + pOutString = (GUIFont *)((174 - v32) / v39); + if ( (174 - v32) / v39 > 32 ) + pOutString = (GUIFont *)32; + int v55 = 1; + v40 = 174 - (int)pOutString * v39 - v32; + v41 = v34->pStartingPosActiveItem; + v42 = v40 / 2 - (signed int)pOutString / 2 + 138; + if ( (signed int)v41 < (signed int)(v41 + v39) ) + { + do + { + v43 = v34->GetControl(v41); + if ( !v43 ) + break; + v43->uY = (unsigned int)((char *)pOutString + v42); + Str = v43->pButtonName; + v44 = pFontArrus->CalcTextHeight(v43->pButtonName, &v52, 0, 0); + v45 = v43->uY; + v46 = (unsigned short *)v55; + v43->uHeight = v44; + v42 = v45 + v44 - 1; + v43->uW = v42; + v47 = v33; + if ( (unsigned __int16 *)pDialogueWindow->pCurrentPosActiveItem != v46 ) + v47 = TargetColor(0xFFu, 0xFFu, 0xFFu); + v52.DrawTitleText(pFontArrus, 0, v45, v47, Str, 3u); + v34 = pDialogueWindow; + ++v55; + ++v41; + } + while ( (signed int)v41 < pDialogueWindow->pNumPresenceButton + pDialogueWindow->pStartingPosActiveItem ); + } + } + pRenderer->DrawTextureIndexed(471, 445, pIcons_LOD->GetTexture(uExitCancelTextureId)); +} + + + +//----- (00444FBE) -------------------------------------------------------- +void GameUI_DrawBranchlessDialogue() +{ + //GUIFont *v0; // esi@1 + int v1; // esi@4 + char *v2; // eax@6 + int v3; // edi@12 + char Str[200]; // [sp+Ch] [bp-120h]@12 + GUIWindow v5; // [sp+D4h] [bp-58h]@4 + GUIFont *pFont; // [sp+128h] [bp-4h]@1 + + pFont = pFontArrus; + if ( current_npc_text && !byte_5B0938[0] ) + strcpy(byte_5B0938, current_npc_text); + v5.uFrameWidth = game_viewport_width; + v5.uFrameZ = 452; + v1 = pFontArrus->CalcTextHeight(byte_5B0938, &v5, 12, 0) + 7; + if ( 352 - v1 < 8 ) + { + pFont = pFontCreate; + v1 = pFontCreate->CalcTextHeight(byte_5B0938, &v5, 12, 0) + 7; + } + pRenderer->_4A6A68(8, 352 - v1, + pIcons_LOD->GetTexture(uTextureID_Leather), + pIcons_LOD->GetTexture(uTextureID_Leather)->uTextureHeight - v1); + pRenderer->DrawTextureIndexed(8, 347 - v1, pTexture_591428); + v2 = FitTextInAWindow(byte_5B0938, pFont, &v5, 0xCu, 0); + pGUIWindow2->DrawText(pFont, 12, 354 - v1, 0, v2, 0, 0, 0); + pRenderer->DrawTextureRGB(0, 0x160u, pTexture_StatusBar); + if ( pGUIWindow2->field_40 != 1 ) + { + if ( pGUIWindow2->field_40 == 2 ) + { + pGUIWindow2->field_40 = 0; + strcpy(GameUI_Footer_TimedString, (const char *)pKeyActionMap->pPressedKeysBuffer); +LABEL_16: + sub_4452BB(); + return; + } + if ( pGUIWindow2->field_40 != 3 ) + return; + pGUIWindow2->field_40 = 0; +LABEL_15: + memset(GameUI_Footer_TimedString, 0, 0xC8u); + goto LABEL_16; + } + if ( pGUIWindow2->ptr_1C == (void *)26 ) + { + sprintf(Str, "%s %s", GameUI_Footer_TimedString, pKeyActionMap->pPressedKeysBuffer); + v3 = pFontLucida->GetLineWidth(Str); + pGUIWindow2->DrawText(pFontLucida, 13, 357, 0, Str, 0, 0, 0); + pGUIWindow2->DrawFlashingInputCursor(v3 + 13, 357, pFontLucida); + return; + } + if ( pKeyActionMap->pPressedKeysBuffer[0] ) + { + pKeyActionMap->_459ED1(0); + goto LABEL_15; + } +} + + +//----- (004443D5) -------------------------------------------------------- +const char *GameUI_GetMinimapHintText() +{ + int v0; // ST20_4@1 + unsigned int v1; // esi@1 + signed int v2; // ebx@1 + double v3; // st7@1 + int v4; // esi@3 + int v5; // edi@4 + int v6; // eax@4 + int v7; // eax@4 + BSPModel *v8; // ecx@4 + unsigned __int8 v9; // zf@5 + char v10; // sf@5 + unsigned __int8 v11; // of@5 + ODMFace *v12; // eax@6 + __int16 v13; // cx@6 + const char *v14; // eax@8 + const char *v15; // edi@8 + char *result; // eax@12 + unsigned int v17; // eax@14 + unsigned int v18; // [sp+Ch] [bp-20h]@1 + int v19; // [sp+10h] [bp-1Ch]@1 + int v20; // [sp+14h] [bp-18h]@1 + char *v21; // [sp+18h] [bp-14h]@1 + unsigned int pY; // [sp+1Ch] [bp-10h]@1 + int v23; // [sp+20h] [bp-Ch]@1 + int v24; // [sp+24h] [bp-8h]@1 + int pX; // [sp+28h] [bp-4h]@1 + + v24 = pParty->vPosition.x; + v0 = pParty->vPosition.y; + v1 = pOutdoor->uNumBModels; + *(float *)&v23 = (double)(signed int)viewparams->uMinimapZoom * 0.000015258789; + v2 = 0; + v18 = pOutdoor->uNumBModels; + v21 = 0; + pMouse->GetClickPos((unsigned int *)&pX, &pY); + v3 = 1.0 / *(float *)&v23; + v23 = pX - 557; + v19 = (signed __int64)((double)(pX - 557) * v3 + (double)v24); + v20 = (signed __int64)((double)v0 - (double)(signed int)(pY - 74) * v3); + if ( uCurrentlyLoadedLevelType != LEVEL_Outdoor || (*(float *)&v23 = 0.0, (signed int)v1 <= 0) ) + { +LABEL_14: + v17 = pMapStats->GetMapInfo(pCurrentMapName); + if ( v17 == v2 ) + result = "No Maze Info for this maze on file!"; + else + result = pMapStats->pInfos[v17].pName; + } + else + { + v4 = 0; + while ( 1 ) + { + pX = pOutdoor->pBModels[v4].vBoundingCenter.x - v19; + pY = pOutdoor->pBModels[v4].vBoundingCenter.y - v20; + v5 = abs((signed)pY); + v6 = abs((signed)pX); + v7 = int_get_vector_length(v6, v5, v2); + v8 = &pOutdoor->pBModels[0]; + if ( v7 < 2 * pOutdoor->pBModels[v4].sBoundingRadius ) + { + v11 = __OFSUB__(pOutdoor->pBModels[v4].uNumFaces, v2); + v9 = pOutdoor->pBModels[v4].uNumFaces == v2; + v10 = ((pOutdoor->pBModels[v4].uNumFaces - v2) & 0x80000000u) != 0; + v24 = v2; + if ( !((unsigned __int8)(v10 ^ v11) | v9) ) + { + do + { + v12 = &v8[v4].pFaces[v2 / 0x134u]; + v13 = v12->sCogTriggeredID; + if ( v13 ) + { + if ( !(BYTE2(v12->uAttributes) & 0x10) ) + { + v14 = GetEventHintString(v13); + v15 = v14; + if ( v14 ) + { + if ( _strcmpi(v14, "") ) + v21 = (char *)v15; + } + } + } + ++v24; + v8 = pOutdoor->pBModels; + v2 += 308; + } + while ( v24 < (signed int)pOutdoor->pBModels[v4].uNumFaces ); + } + result = v21; + v2 = 0; + if ( v21 ) + break; + } + ++v23; + ++v4; + if ( v23 >= (signed int)v18 ) + goto LABEL_14; + } + } + return result; +} + + + + + //----- (0041D3B7) -------------------------------------------------------- void GameUI_CharacterQuickRecord_Draw(GUIWindow *window, Player *player) { diff -r f93d17337113 -r 3a5c8df8381d mm7_2.cpp --- a/mm7_2.cpp Tue May 21 14:34:14 2013 +0200 +++ b/mm7_2.cpp Tue May 21 23:44:51 2013 +0200 @@ -6673,7 +6673,7 @@ pTexture_PCX.Load("lsave640.pcx", 0); pGUIWindow2 = GUIWindow::Create(0, 0, 640, 480, WINDOW_MainMenu, 0, 0); pCurrentScreen = SCREEN_LOADGAME; - GameUI_DrawLoadMenu(0); + LoadUI_Load(0); } pWindow = pGUIWindow_CurrentMenu; } @@ -9511,8 +9511,7 @@ { if ( pAudioPlayer->hAILRedbook ) AIL_redbook_stop(pAudioPlayer->hAILRedbook); - extern MENU_STATE __cdecl CreditsMenu__Loop(); - CreditsMenu__Loop(); + MainMenuUI_Credits_Loop(); break; } if (GetCurrentMenuID() == MENU_5 || GetCurrentMenuID() == MENU_LoadingProcInMainMenu) @@ -11335,7 +11334,7 @@ else { pAudioPlayer->StopChannels(-1, -1); - UI_CreateTravelDialogue(); + TravelUI_Load(); } } UpdateActors_ODM(); diff -r f93d17337113 -r 3a5c8df8381d mm7_3.cpp --- a/mm7_3.cpp Tue May 21 14:34:14 2013 +0200 +++ b/mm7_3.cpp Tue May 21 23:44:51 2013 +0200 @@ -12041,113 +12041,6 @@ LoadLevel_InitializeLevelStr(); } -//----- (004443D5) -------------------------------------------------------- -char *__cdecl _4443D5_GetMinimapRightClickText() -{ - int v0; // ST20_4@1 - unsigned int v1; // esi@1 - signed int v2; // ebx@1 - double v3; // st7@1 - int v4; // esi@3 - int v5; // edi@4 - int v6; // eax@4 - int v7; // eax@4 - BSPModel *v8; // ecx@4 - unsigned __int8 v9; // zf@5 - char v10; // sf@5 - unsigned __int8 v11; // of@5 - ODMFace *v12; // eax@6 - __int16 v13; // cx@6 - const char *v14; // eax@8 - const char *v15; // edi@8 - char *result; // eax@12 - unsigned int v17; // eax@14 - unsigned int v18; // [sp+Ch] [bp-20h]@1 - int v19; // [sp+10h] [bp-1Ch]@1 - int v20; // [sp+14h] [bp-18h]@1 - char *v21; // [sp+18h] [bp-14h]@1 - unsigned int pY; // [sp+1Ch] [bp-10h]@1 - int v23; // [sp+20h] [bp-Ch]@1 - int v24; // [sp+24h] [bp-8h]@1 - int pX; // [sp+28h] [bp-4h]@1 - - v24 = pParty->vPosition.x; - v0 = pParty->vPosition.y; - v1 = pOutdoor->uNumBModels; - *(float *)&v23 = (double)(signed int)viewparams->uMinimapZoom * 0.000015258789; - v2 = 0; - v18 = pOutdoor->uNumBModels; - v21 = 0; - pMouse->GetClickPos((unsigned int *)&pX, &pY); - v3 = 1.0 / *(float *)&v23; - v23 = pX - 557; - v19 = (signed __int64)((double)(pX - 557) * v3 + (double)v24); - v20 = (signed __int64)((double)v0 - (double)(signed int)(pY - 74) * v3); - if ( uCurrentlyLoadedLevelType != LEVEL_Outdoor || (*(float *)&v23 = 0.0, (signed int)v1 <= 0) ) - { -LABEL_14: - v17 = pMapStats->GetMapInfo(pCurrentMapName); - if ( v17 == v2 ) - result = "No Maze Info for this maze on file!"; - else - result = pMapStats->pInfos[v17].pName; - } - else - { - v4 = 0; - while ( 1 ) - { - pX = pOutdoor->pBModels[v4].vBoundingCenter.x - v19; - pY = pOutdoor->pBModels[v4].vBoundingCenter.y - v20; - v5 = abs((signed)pY); - v6 = abs((signed)pX); - v7 = int_get_vector_length(v6, v5, v2); - v8 = &pOutdoor->pBModels[0]; - if ( v7 < 2 * pOutdoor->pBModels[v4].sBoundingRadius ) - { - v11 = __OFSUB__(pOutdoor->pBModels[v4].uNumFaces, v2); - v9 = pOutdoor->pBModels[v4].uNumFaces == v2; - v10 = ((pOutdoor->pBModels[v4].uNumFaces - v2) & 0x80000000u) != 0; - v24 = v2; - if ( !((unsigned __int8)(v10 ^ v11) | v9) ) - { - do - { - v12 = &v8[v4].pFaces[v2 / 0x134u]; - v13 = v12->sCogTriggeredID; - if ( v13 ) - { - if ( !(BYTE2(v12->uAttributes) & 0x10) ) - { - v14 = GetEventHintString(v13); - v15 = v14; - if ( v14 ) - { - if ( _strcmpi(v14, "") ) - v21 = (char *)v15; - } - } - } - ++v24; - v8 = pOutdoor->pBModels; - v2 += 308; - } - while ( v24 < (signed int)pOutdoor->pBModels[v4].uNumFaces ); - } - result = v21; - v2 = 0; - if ( v21 ) - break; - } - ++v23; - ++v4; - if ( v23 >= (signed int)v18 ) - goto LABEL_14; - } - } - return result; -} - //----- (00444564) -------------------------------------------------------- const char *__cdecl sub_444564() { @@ -12232,102 +12125,6 @@ return result; } -//----- (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 - unsigned int v9; // [sp+60h] [bp-Ch]@1 - unsigned int v10; // [sp+64h] [bp-8h]@1 - int a3; // [sp+6Bh] [bp-1h]@11 - - memcpy(&v8, pPrimaryWindow, sizeof(v8)); - v10 = pMapStats->GetMapInfo(pCurrentMapName); - 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)); - pRenderer->DrawTextureIndexed(pNPCPortraits_x[0][0], pNPCPortraits_y[0][0], pTexture_outside); - uTextureID_right_panel_loop = uTextureID_right_panel; - 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)); - 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; - - 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); - } - else if ( v10 ) - { - sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[409], pMapInfo->pName);// "Do you wish to leave %s?" - v4 = (212 - pFontCreate->CalcTextHeight(pTmpBuf, &v8, 0, 0)) / 2 + 101; - v8.DrawTitleText(pFontCreate, 0, v4, 0, pTmpBuf, 3); - } - else assert(false); - - _unused_5B5924_is_travel_ui_drawn = true; -} - -//----- (00444C8F) -------------------------------------------------------- -void UI_CreateTravelDialogue() -{ - //signed int v0; // eax@1 - unsigned int v1; // eax@6 - GUIWindow *result; // eax@9 - //const char *v3; // [sp-4h] [bp-2Ch]@2 - char pContainer[32]; // [sp+0h] [bp-28h]@1 - - pEventTimer->Pause(); - /*v0 = const_2(); - sprintf(pContainer, "evt%02d", v0); - if ( pParty->uAlignment ) - { - if ( pParty->uAlignment != 2 ) - goto LABEL_6; - v3 = "-c"; - } - else - { - v3 = "-b"; - } - strcat(pContainer, v3); -LABEL_6:*/ - switch (pParty->alignment) - { - case PartyAlignment_Good: sprintf(pContainer, "evt%02d-b", const_2()); break; - case PartyAlignment_Neutral: sprintf(pContainer, "evt%02d", const_2()); break; - case PartyAlignment_Evil: sprintf(pContainer, "evt%02d-c", const_2()); break; - default: assert(false); - } - - 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, pGlobalTXT_LocalizationStrings[410], pMapStats->pInfos[v1].pName);// "Leave %s" - else - strcpy(sHouseName, pGlobalTXT_LocalizationStrings[79]);// "Exit" - pDialogueWindow = GUIWindow::Create(0, 0, 640, 480, WINDOW_ChangeLocation, 0, (int)sHouseName); -} - //----- (00444D80) -------------------------------------------------------- signed int __cdecl GetTravelTime() { @@ -12348,123 +12145,6 @@ } // 6BD07C: using guessed type int uDefaultTravelTime_ByFoot; -//----- (00444DCA) -------------------------------------------------------- -void __cdecl 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 - 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); - 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(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 ) - { - 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." - } - else - { - v6 = v3; - v5 = pGlobalTXT_LocalizationStrings[128]; // "It will take %d days to travel to %s." - } - sprintfex(pTmpBuf, v5, v6, v1->pName); - strcat(pTmpBuf, "\n \n"); - sprintfex(pTmpBuf2, pGlobalTXT_LocalizationStrings[126], pMapStats->pInfos[v9].pName); - strcat(pTmpBuf, pTmpBuf2); - v4 = pFontCreate->CalcTextHeight(pTmpBuf, &v7, 0, 0); - v7.DrawTitleText(pFontCreate, 0, (212 - v4) / 2 + 101, 0, pTmpBuf, 3u); - _unused_5B5924_is_travel_ui_drawn = 1; - } -} - -//----- (00444FBE) -------------------------------------------------------- -void __cdecl DrawBranchlessDialogueUI() -{ - GUIFont *v0; // esi@1 - int v1; // esi@4 - char *v2; // eax@6 - int v3; // edi@12 - char Str[200]; // [sp+Ch] [bp-120h]@12 - GUIWindow v5; // [sp+D4h] [bp-58h]@4 - GUIFont *pFont; // [sp+128h] [bp-4h]@1 - - v0 = pFontArrus; - pFont = pFontArrus; - if ( current_npc_text && !byte_5B0938[0] ) - strcpy(byte_5B0938, current_npc_text); - v5.uFrameWidth = game_viewport_width; - v5.uFrameZ = 452; - v1 = pFontArrus->CalcTextHeight(byte_5B0938, &v5, 12, 0) + 7; - if ( 352 - v1 < 8 ) - { - pFont = pFontCreate; - v1 = pFontCreate->CalcTextHeight(byte_5B0938, &v5, 12, 0) + 7; - } - pRenderer->_4A6A68( - 8u, - 352 - v1, - (Texture *)(uTextureID_Leather != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_Leather] : 0), - (uTextureID_Leather != -1 ? pIcons_LOD->pTextures[uTextureID_Leather].uTextureHeight : 26) - v1); - pRenderer->DrawTextureIndexed(8u, 347 - v1, pTexture_591428); - v2 = FitTextInAWindow(byte_5B0938, pFont, &v5, 0xCu, 0); - pGUIWindow2->DrawText(pFont, 12, 354 - v1, 0, v2, 0, 0, 0); - pRenderer->DrawTextureRGB(0, 0x160u, pTexture_StatusBar); - if ( pGUIWindow2->field_40 != 1 ) - { - if ( pGUIWindow2->field_40 == 2 ) - { - pGUIWindow2->field_40 = 0; - strcpy(GameUI_Footer_TimedString, (const char *)pKeyActionMap->pPressedKeysBuffer); -LABEL_16: - sub_4452BB(); - return; - } - if ( pGUIWindow2->field_40 != 3 ) - return; - pGUIWindow2->field_40 = 0; -LABEL_15: - memset(GameUI_Footer_TimedString, 0, 0xC8u); - goto LABEL_16; - } - if ( pGUIWindow2->ptr_1C == (void *)26 ) - { - sprintf(Str, "%s %s", GameUI_Footer_TimedString, pKeyActionMap->pPressedKeysBuffer); - v3 = pFontLucida->GetLineWidth(Str); - pGUIWindow2->DrawText(pFontLucida, 13, 357, 0, Str, 0, 0, 0); - pGUIWindow2->DrawFlashingInputCursor(v3 + 13, 357, pFontLucida); - return; - } - if ( pKeyActionMap->pPressedKeysBuffer[0] ) - { - pKeyActionMap->_459ED1(0); - goto LABEL_15; - } -} - //----- (004451A8) -------------------------------------------------------- void __fastcall sub_4451A8_press_any_key(int a1, int a2, int a4) { @@ -12524,359 +12204,6 @@ return pNPCTopics[407].pTopic; } -//----- (00445350) -------------------------------------------------------- -void __cdecl DrawDialogueUI() -{ - NPCData *pNPC; // ebx@2 - int pGreetType; // eax@2 - unsigned __int16 v2; // di@2 - //unsigned int v3; // eax@2 - char *v4; // esi@3 - //int v5; // eax@11 - //char *v6; // ecx@13 - //char *v7; // eax@16 - //unsigned int v8; // edi@19 - //char *v9; // ecx@27 - char *v10; // eax@29 - //int v11; // eax@30 - int v12; // esi@39 - char *v13; // eax@41 - GUIButton *v14; // eax@43 - //GUIButton *v15; // edi@43 - signed int v16; // eax@44 - //unsigned int v23; // eax@53 - //const char *v24; // eax@59 - //unsigned __int16 v30; // cx@83 - int v31; // ecx@86 - int v32; // ebx@93 - unsigned int v33; // eax@93 - GUIWindow *v34; // ecx@93 - int v35; // esi@93 - int i; // eax@93 - GUIButton *v37; // eax@94 - int v38; // eax@95 - signed int v39; // esi@99 - signed int v40; // eax@102 - unsigned int v41; // ebx@102 - int v42; // edi@102 - GUIButton *v43; // esi@103 - int v44; // eax@104 - unsigned int v45; // ecx@104 - unsigned __int16 *v46; // edx@104 - unsigned __int16 v47; // ax@104 - GUIWindow pWindow; // [sp+4h] [bp-110h]@39 - int v49; // [sp+Ch] [bp-108h]@39 - int v50; // [sp+14h] [bp-100h]@39 - GUIWindow v51; // [sp+58h] [bp-BCh]@2 - GUIWindow v52; // [sp+ACh] [bp-68h]@42 - char *Str; // [sp+100h] [bp-14h]@104 - //int v54; // [sp+104h] [bp-10h]@2 - //unsigned __int16 *v55; // [sp+108h] [bp-Ch]@82 - GUIFont *pOutString; // [sp+10Ch] [bp-8h]@39 - char *pInString=NULL; // [sp+110h] [bp-4h]@32 - - if ( !pDialogueWindow ) - return; - memcpy(&v51, pDialogueWindow, sizeof(v51)); - pNPC = GetNPCData(sDialogue_SpeakingActorNPC_ID); - pGreetType = GetGreetType(sDialogue_SpeakingActorNPC_ID); - v51.uFrameWidth -= 10; - v51.uFrameZ -= 10; - //v54 = v1; - TargetColor(0xFFu, 0xFFu, 0xFFu); - TargetColor(0xE1u, 0xCDu, 0x23u); - v2 = TargetColor(0x15u, 0x99u, 0xE9u); - pRenderer->DrawTextureIndexed(477, 0, pTexture_Dialogue_Background); - pRenderer->DrawTextureTransparent(468, 0, (Texture *)(uTextureID_right_panel_loop != -1 ? &pIcons_LOD->pTextures[uTextureID_right_panel_loop] : 0)); - pRenderer->DrawTextureIndexed(pNPCPortraits_x[0][0] - 4, pNPCPortraits_y[0][0] - 4, (Texture *)(uTextureID_50795C != -1 ? &pIcons_LOD->pTextures[uTextureID_50795C] : 0)); - pRenderer->DrawTextureIndexed(pNPCPortraits_x[0][0], pNPCPortraits_y[0][0], pDialogueNPCPortraits[0]); - - if (pNPC->uProfession) - { - assert(pNPC->uProfession < sizeof(aNPCProfessionNames) / sizeof(*aNPCProfessionNames)); // sometimes buffer overflows; errors emerge both here and in dialogue text - sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[429], pNPC->pName, aNPCProfessionNames[pNPC->uProfession]);//^Pi[%s] %s - } - else - strcpy(pTmpBuf, pNPC->pName); - - v51.DrawTitleText(pFontArrus, 483, 112, v2, pTmpBuf, 3); - pParty->GetPartyFame(); - - pInString = nullptr; - switch (uDialogueType) - { - case DIALOGUE_13: - pInString = BuilDialogueString(pNPCStats->pProfessions[pNPC->uProfession - 1].pJoinText, uActiveCharacter - 1, 0, 0, 0, 0); - break; - - case DIALOGUE_PROFESSION_DETAILS: - { - auto prof = pNPCStats->pProfessions + pNPC->uProfession - 1; - - if (dialogue_show_profession_details) - pInString = BuilDialogueString(prof->pBenefits, uActiveCharacter - 1, 0, 0, 0, 0); - else if (pNPC->Hired()) - pInString = BuilDialogueString(prof->pDismissText, uActiveCharacter - 1, 0, 0, 0, 0); - else - pInString = BuilDialogueString(prof->pJoinText, uActiveCharacter - 1, 0, 0, 0, 0); - } - break; - - - case DIALOGUE_ARENA_WELCOME: - pInString = pGlobalTXT_LocalizationStrings[574]; // "Welcome to the Arena of Life and Death. Remember, you are only allowed one arena combat per visit. To fight an arena battle, select the option that best describes your abilities and return to me- if you survive:" - break; - - case DIALOGUE_ARENA_FIGHT_NOT_OVER_YET: - pInString = pGlobalTXT_LocalizationStrings[577]; //"Get back in there you wimps:" - break; - - case DIALOGUE_ARENA_REWARD: - sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[576], gold_transaction_amount);// "Congratulations on your win: here's your stuff: %u gold." - pInString = pTmpBuf; - break; - - case DIALOGUE_ARENA_ALREADY_WON: - pInString = pGlobalTXT_LocalizationStrings[582]; // "You already won this trip to the Arena:" - break; - - default: - if (uDialogueType > DIALOGUE_18 && uDialogueType < DIALOGUE_23 && !byte_5B0938[0]) - { - pInString = (char *)current_npc_text; - } - else if (pGreetType == 1)//QuestNPC_greet - { - if (pNPC->greet) - { - if ((pNPC->uFlags & 3) == 2) - pInString = pNPCStats->pNPCGreetings[pNPC->greet - 1].pGreeting2; - else - pInString = pNPCStats->pNPCGreetings[pNPC->greet - 1].pGreeting1; - } - } - else if (pGreetType == 2)//HiredNPC_greet - { - auto prof = pNPCStats->pProfessions + pNPC->uProfession - 1; - - if (pNPC->Hired()) - pInString = BuilDialogueString(prof->pDismissText, uActiveCharacter - 1, 0, 0, 0, 0); - else - pInString = BuilDialogueString(prof->pJoinText, uActiveCharacter - 1, 0, 0, 0, 0); - } - break; - } - - if (pInString) - { - pWindow.uFrameWidth = game_viewport_width; - pWindow.uFrameZ = 452; - auto font = pFontArrus; - v12 = pFontArrus->CalcTextHeight(pInString, &pWindow, 13, 0) + 7; - if ( 352 - v12 < 8 ) - { - font = pFontCreate; - v12 = pFontCreate->CalcTextHeight(pInString, &pWindow, 13, 0) + 7; - } - if (uTextureID_Leather != -1) - pRenderer->_4A6A68(8, 352 - v12, &pIcons_LOD->pTextures[uTextureID_Leather], pIcons_LOD->pTextures[uTextureID_Leather].uTextureHeight - v12); - pRenderer->DrawTextureIndexed(8u, 347 - v12, pTexture_591428); - v13 = FitTextInAWindow(pInString, font, &pWindow, 0xDu, 0); - pDialogueWindow->DrawText(font, 13, 354 - v12, 0, v13, 0, 0, 0); - } - - - memcpy(&v52, pDialogueWindow, sizeof(v52)); - v52.uFrameX = 483; - v52.uFrameWidth = 148; - v52.uFrameZ = 334; - for (int i = v52.pStartingPosActiveItem; - i < v52.pStartingPosActiveItem + v52.pNumPresenceButton; ++i) - { - v14 = v52.GetControl(i); - //v15 = v14; - if ( !v14 ) - break; - v16 = v14->msg_param; - - if ( v16 > 88 ) - v14->pButtonName[0] = 0; - else if (v16 == 88) - strcpy(v14->pButtonName, pGlobalTXT_LocalizationStrings[581]); // Lord - else if (v16 == 87) - strcpy(v14->pButtonName, pGlobalTXT_LocalizationStrings[580]); // Knight - else if (v16 == 86) - strcpy(v14->pButtonName, pGlobalTXT_LocalizationStrings[579]); // Squire - else if (v16 == 85) - strcpy(v14->pButtonName, pGlobalTXT_LocalizationStrings[578]); // Page - else if (v16 == 77) - strcpy(v14->pButtonName, pGlobalTXT_LocalizationStrings[407]); // Details - else if (v16 == 76) - { - if (pNPC->Hired()) - sprintf(v14->pButtonName, (const char*)pGlobalTXT_LocalizationStrings[408], pNPC->pName); // Release %s - else - strcpy(v14->pButtonName, pGlobalTXT_LocalizationStrings[406]); // Hire - } - else if (v16 == 24) - { - __debugbreak(); // learn conditions of this event - auto topic = pNPCTopics[pNPC->evt_F - 1].pTopic;//(&dword_721660)[8 * v23]; - if (!topic) - { - v14->pButtonName[0] = 0; - v14->msg_param = 0; - } - else - strcpy(v14->pButtonName, topic); - } - else if (v16 == 9) - strcpy(v14->pButtonName, GetProfessionActionText(pNPC->uProfession)); - else if (v16 == 19) - { - // __debugbreak(); // learn conditions of this event Scavenger Hunt - auto topic = pNPCTopics[pNPC->evt_A - 1].pTopic;//(&dword_721660)[8 * v23]; - if (!topic) - { - v14->pButtonName[0] = 0; - v14->msg_param = 0; - } - else strcpy(v14->pButtonName, topic); - } - else if (v16 == 20) - { - //__debugbreak(); // learn conditions of this event instruments - auto topic = pNPCTopics[pNPC->evt_B - 1].pTopic;//(&dword_721660)[8 * v23]; - if (!topic) - { - v14->pButtonName[0] = 0; - v14->msg_param = 0; - } - else strcpy(v14->pButtonName, topic); - } - else if (v16 == 21) - { - //__debugbreak(); // learn conditions of this event - auto topic = pNPCTopics[pNPC->evt_C - 1].pTopic;//(&dword_721660)[8 * v23]; - if (!topic) - { - v14->pButtonName[0] = 0; - v14->msg_param = 0; - } - else strcpy(v14->pButtonName, topic); - } - else if (v16 == 22) - { - //__debugbreak(); // learn conditions of this event - auto topic = pNPCTopics[pNPC->evt_D - 1].pTopic;//(&dword_721660)[8 * v23]; - if (!topic) - { - v14->pButtonName[0] = 0; - v14->msg_param = 0; - } - else strcpy(v14->pButtonName, topic); - } - else if (v16 == 23) - { - //__debugbreak(); // learn conditions of this event - auto topic = pNPCTopics[pNPC->evt_E - 1].pTopic;//(&dword_721660)[8 * v23]; - if (!topic) - { - v14->pButtonName[0] = 0; - v14->msg_param = 0; - } - else strcpy(v14->pButtonName, topic); - } - else if (v16 == 13) - { - if (pNPC->Hired()) - sprintf(v14->pButtonName, pGlobalTXT_LocalizationStrings[408], pNPC->pName); // Release %s - else - strcpy(v14->pButtonName, pGlobalTXT_LocalizationStrings[122]); // Join - } - else - v14->pButtonName[0] = 0; - - - if (pParty->field_7B5_in_arena_quest && pParty->field_7B5_in_arena_quest != -1) - { - int num_dead_actors = 0; - pInString = 0; - for (uint i = 0; i < uNumActors; ++i) - { - if (pActors[i].uAIState == Dead || pActors[i].uAIState == Removed || - pActors[i].uAIState == Disabled) - ++num_dead_actors; - else - { - int sumonner_type = PID_TYPE(pActors[i].uSummonerID); - if (sumonner_type == OBJECT_Player) - ++num_dead_actors; - } - } - if (num_dead_actors == uNumActors) - strcpy(v14->pButtonName, pGlobalTXT_LocalizationStrings[658]); // Collect Prize - } - } - - - v32 = 0; - //pInString = (char *)TargetColor(0xFFu, 0xFFu, 0xFFu); - v33 = TargetColor(0xE1u, 0xCDu, 0x23u); - v34 = pDialogueWindow; - //v54 = v33; - v35 = pDialogueWindow->pStartingPosActiveItem; - for ( i = v35 + pDialogueWindow->pNumPresenceButton; v35 < i; i = pDialogueWindow->pNumPresenceButton + pDialogueWindow->pStartingPosActiveItem ) - { - v37 = v34->GetControl(v35); - if ( !v37 ) - { - v34 = pDialogueWindow; - break; - } - v38 = pFontArrus->CalcTextHeight(v37->pButtonName, &v52, 0, 0); - v34 = pDialogueWindow; - v32 += v38; - ++v35; - } - v39 = v34->pNumPresenceButton; - if ( v39 ) - { - pOutString = (GUIFont *)((174 - v32) / v39); - if ( (174 - v32) / v39 > 32 ) - pOutString = (GUIFont *)32; - int v55 = 1; - v40 = 174 - (int)pOutString * v39 - v32; - v41 = v34->pStartingPosActiveItem; - v42 = v40 / 2 - (signed int)pOutString / 2 + 138; - if ( (signed int)v41 < (signed int)(v41 + v39) ) - { - do - { - v43 = v34->GetControl(v41); - if ( !v43 ) - break; - v43->uY = (unsigned int)((char *)pOutString + v42); - Str = v43->pButtonName; - v44 = pFontArrus->CalcTextHeight(v43->pButtonName, &v52, 0, 0); - v45 = v43->uY; - v46 = (unsigned short *)v55; - v43->uHeight = v44; - v42 = v45 + v44 - 1; - v43->uW = v42; - v47 = v33; - if ( (unsigned __int16 *)pDialogueWindow->pCurrentPosActiveItem != v46 ) - v47 = TargetColor(0xFFu, 0xFFu, 0xFFu); - v52.DrawTitleText(pFontArrus, 0, v45, v47, Str, 3u); - v34 = pDialogueWindow; - ++v55; - ++v41; - } - while ( (signed int)v41 < pDialogueWindow->pNumPresenceButton + pDialogueWindow->pStartingPosActiveItem ); - } - } - pRenderer->DrawTextureIndexed(471, 445, pIcons_LOD->GetTexture(uExitCancelTextureId)); -} //----- (00445C8B) -------------------------------------------------------- int __fastcall GetGreetType(signed int SpeakingNPC_ID) diff -r f93d17337113 -r 3a5c8df8381d mm7_4.cpp --- a/mm7_4.cpp Tue May 21 14:34:14 2013 +0200 +++ b/mm7_4.cpp Tue May 21 23:44:51 2013 +0200 @@ -7288,8 +7288,8 @@ v30 = TargetColor(0xFFu, 0xFFu, 0xFFu); v31 = *(int *)v29; v32 = TargetColor(0xFFu, 0xFFu, 0x9Bu); - sprintf(pTmpBuf, &byte_4F0F98, v32, v31, v30); - sprintf(pTmpBuf2, dword_F8B1A4, pTmpBuf, 100 * (unsigned __int8)v29[8]); + sprintfex(pTmpBuf, "\f%05d%s\f%05d", v32, v31, v30); + sprintfex(pTmpBuf2, dword_F8B1A4, pTmpBuf, 100 * (unsigned __int8)v29[8]); current_npc_text = pTmpBuf2; v15 = ""; goto LABEL_45; @@ -8960,107 +8960,3 @@ return result; } - -//----- (00444839) -------------------------------------------------------- -unsigned int __fastcall sub_444839_move_map(unsigned int a1, int a2, int x, int y, int z, int directiony, int directionx, int a8, const char *pLocationName) -{ - unsigned int v9; // ebx@1 - int v10; // edi@1 - //signed int v11; // eax@1 - unsigned int v12; // eax@6 - const char *v13; // ST0C_4@6 - unsigned int v14; // eax@8 - const char *v15; // eax@14 - unsigned int v16; // eax@16 - unsigned int result; // eax@26 - const char *v18; // [sp-8h] [bp-40h]@9 - //const char *v19; // [sp-4h] [bp-3Ch]@2 - char *v20; // [sp-4h] [bp-3Ch]@9 - const char *v21; // [sp-4h] [bp-3Ch]@11 - char pContainer[40]; // [sp+Ch] [bp-2Ch]@1 - unsigned int v23; // [sp+34h] [bp-4h]@1 - - v9 = a1; - v10 = a2; - v23 = IndoorLocation::GetLocationIndex(pLocationName); - dword_59117C_teleportx = x; - dword_591178_teleporty = y; - dword_591174_teleportz = z; - dword_591170_teleport_directiony = directiony; - dword_59116C_teleport_directionx = directionx; - dword_591168_teleport_speedz = a8; - dword_591164_teleport_map_name = (char *)pLocationName; - uCurrentHouse_Animation = v9; - pEventTimer->Pause(); - pAudioPlayer->StopChannels(-1, -1); - - switch (pParty->alignment) - { - case PartyAlignment_Good: sprintf(pContainer, "evt%02d-b", const_2()); break; - case PartyAlignment_Neutral: sprintf(pContainer, "evt%02d", const_2()); break; - case PartyAlignment_Evil: sprintf(pContainer, "evt%02d-c", const_2()); break; - default: assert(false); - } - /*v11 = const_2(); - sprintf(pContainer, "evt%02d", v11); - if ( pParty->uAlignment ) - { - if ( pParty->uAlignment != 2 ) - goto LABEL_6; - v19 = "-c"; - } - else - { - v19 = "-b"; - } - strcat(pContainer, v19);*/ - -//LABEL_6: - v12 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); - v13 = pHouse_ExitPictures[v10]; - pTexture_Dialogue_Background = &pIcons_LOD->pTextures[v12]; - pTexture_outside = pIcons_LOD->LoadTexturePtr(v13, TEXTURE_16BIT_PALETTE); - if ( v9 ) - { - if ( !v23 ) - //pVideoPlayer->OpenHouseMovie(pAnimatedRooms[p2DEvents_minus1___02[26 * v9]].field_0, 1u); - pVideoPlayer->OpenHouseMovie(pAnimatedRooms[p2DEvents[v9 - 1].uAnimationID].video_name, 1u); - } - else - { - if ( !v23 ) - { - v14 = pMapStats->GetMapInfo(pCurrentMapName); - if ( v14 ) - { - sprintfex(sHouseName, pGlobalTXT_LocalizationStrings[410], pMapStats->pInfos[v14].pName); - goto LABEL_20; - } - v21 = pGlobalTXT_LocalizationStrings[79]; - goto LABEL_19; - } - } - v15 = pLocationName; - if ( *pLocationName == 48 ) - v15 = pCurrentMapName; - v16 = pMapStats->GetMapInfo(v15); - if ( v16 ) - { - sprintfex(sHouseName, pGlobalTXT_LocalizationStrings[411], pMapStats->pInfos[v16].pName); - goto LABEL_20; - } - v21 = pGlobalTXT_LocalizationStrings[73]; -LABEL_19: - strcpy(sHouseName, v21); -LABEL_20: - pDialogueWindow = GUIWindow::Create(0, 0, 640, 480, WINDOW_Transition, 0, (int)sHouseName); - //if ( BYTE1(pAnimatedRooms[p2DEvents_minus1___02[26 * v9]].field_C) ) - if ( pAnimatedRooms[p2DEvents[v9 - 1].uAnimationID].uRoomSoundId ) - PlayHouseSound(v9, HouseSound_Greeting); - if ( uCurrentlyLoadedLevelType == LEVEL_Indoor && uActiveCharacter && pParty->uFlags & 0x30 ) - pPlayers[uActiveCharacter]->PlaySound(SPEECH_47, 0); - result = v23; - if ( v23 ) - uCurrentHouse_Animation = v23; - return result; -} diff -r f93d17337113 -r 3a5c8df8381d mm7_5.cpp --- a/mm7_5.cpp Tue May 21 14:34:14 2013 +0200 +++ b/mm7_5.cpp Tue May 21 23:44:51 2013 +0200 @@ -275,7 +275,7 @@ memset(&actor, 0, 0x344u); dword_5B65D0_dialogue_actor_npc_id = bDialogueUI_InitializeActor_NPC_ID; actor.sNPC_ID = bDialogueUI_InitializeActor_NPC_ID; - actor.InitializeDialogue(0); + GameUI_InitializeDialogue(&actor, false); bDialogueUI_InitializeActor_NPC_ID = 0; } if ( pMessageQueue_50CBD0->uNumMessages ) @@ -306,7 +306,7 @@ dword_5B65D0_dialogue_actor_npc_id = pActors[uMessageParam].sNPC_ID; pActor = &pActors[uMessageParam]; //goto _actor_init_dlg; - pActor->InitializeDialogue(1); + GameUI_InitializeDialogue(pActor, true); continue; case UIMSG_StartHireling1Dialogue: case UIMSG_StartHireling2Dialogue: @@ -359,7 +359,7 @@ memset(&actor, 0, 0x344u); actor.sNPC_ID += -1 - (unsigned __int8)pParty->field_709 - hireling_idx; pActor = &actor; - pActor->InitializeDialogue(1); + GameUI_InitializeDialogue(&actor, true); } } continue; @@ -406,7 +406,7 @@ pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; pGUIWindow_CurrentMenu->Release(); pCurrentScreen = SCREEN_LOADGAME; - GameUI_DrawLoadMenu(1); + LoadUI_Load(1); continue; case UIMSG_Quit: if ( dword_6BE138 == 132 || uMessageParam ) @@ -515,7 +515,7 @@ case UIMSG_Game_OpenSaveGameDialog: pGUIWindow_CurrentMenu->Release(); pCurrentScreen = SCREEN_SAVEGAME; - GameUI_DrawSaveMenu(); + SaveUI_Load(); continue; case UIMSG_Game_OpenOptionsDialog://Open if ( pMessageQueue_50CBD0->uNumMessages ) @@ -2493,7 +2493,7 @@ continue; case UIMSG_RentRoom: dword_506F14 = 2; - RestUI_Initialize(); + RestUI_Load(); v86 = 60 * (_494820_training_time(pParty->uCurrentHour) + 1) - pParty->uCurrentMinute; _506F18_num_hours_to_sleep = v86; if ( uMessageParam == 111 || uMessageParam == 114 || uMessageParam == 116 ) @@ -2534,7 +2534,7 @@ } if ( !(pParty->uFlags & 0x88) ) { - RestUI_Initialize(); + RestUI_Load(); continue; } if ( pParty->bTurnBasedModeOn == 1 ) @@ -5416,10 +5416,7 @@ } else { - result = (flt_4E4A80[v2] - *(float *)&aAuthenticamd[4 * v2 + 12]) - * (v3 - flt_4E4A80[v2 + 4]) - / (flt_4E4A80[v2 + 5] - flt_4E4A80[v2 + 4]) - + flt_4E4A80[v2]; + result = (flt_4E4A80[v2] - flt_4E4A80[v2 - 3]) * (v3 - flt_4E4A80[v2 + 4]) / (flt_4E4A80[v2 + 5] - flt_4E4A80[v2 + 4]) + flt_4E4A80[v2]; } return result; } @@ -10071,7 +10068,7 @@ void GUI_UpdateWindows() { GUIWindow *pWindow; // esi@4 - unsigned int pWindowType; // eax@4 + //unsigned int pWindowType; // eax@4 char *pHint; // edx@66 GUIButton *pButtonPtr_1C; // ebp@79 char *pHint1; // edx@80 @@ -10099,7 +10096,6 @@ for ( i = 1; i <= uNumVisibleWindows; ++i ) { pWindow = &pWindowList[pVisibleWindowsIdxs[i] - 1]; - pWindowType = pWindow->eWindowType; switch (pWindow->eWindowType) { case WINDOW_OptionsButtons: @@ -10126,7 +10122,7 @@ } case WINDOW_Dialogue: { - DrawDialogueUI(); + GameUI_DrawDialogue(); continue; } case WINDOW_QuickReference: @@ -10151,7 +10147,7 @@ } case WINDOW_GreetingNPC: { - DrawBranchlessDialogueUI(); + GameUI_DrawBranchlessDialogue(); continue; } case WINDOW_Chest: @@ -10171,12 +10167,12 @@ } case WINDOW_SaveLoadButtons: { - sub_4606FE(); + SaveUI_Draw(); continue; } case WINDOW_MainMenu_Load: { - GameUI_MainMenu_DrawLoad(); + LoadUI_Draw(); continue; } case WINDOW_HouseInterior: @@ -10439,7 +10435,7 @@ pButton = (GUIButton *)pWindow->ptr_1C; pRenderer->DrawTextureIndexed(pWindow->uFrameY, pWindow->uFrameX, pButton->pTextures[0]); - viewparams->bRedrawGameUI = 1; + viewparams->bRedrawGameUI = true; continue; } case WINDOW_CharacterWindow_Inventory: @@ -10486,7 +10482,7 @@ } //----- (00416196) -------------------------------------------------------- -void __cdecl identify_item() +void identify_item() { Player *v0; // esi@2 POINT *v1; // edi@2 @@ -10774,13 +10770,7 @@ pAudioPlayer->PlaySound(SOUND_8, 0, 0, -1, 0, 0, 0, 0); pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 0, 0); - /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) - { - pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = UIMSG_Escape; - pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0; - *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; - ++pMessageQueue_50CBD0->uNumMessages; - }*/ + v42 = (int *)&a2.y; v41 = (int *)&y.y; v40 = (int *)&pOut; @@ -10852,13 +10842,7 @@ pAudioPlayer->PlaySound(SOUND_8, 0, 0, -1, 0, 0, 0, 0); pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 0, 0); - /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) - { - pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = UIMSG_Escape; - pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0; - *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; - ++pMessageQueue_50CBD0->uNumMessages; - }*/ + v42 = (int *)&a2.y; v41 = (int *)&y.y; v40 = (int *)&pOut; @@ -10925,7 +10909,7 @@ //----- (00416B01) -------------------------------------------------------- -void __thiscall sub_416B01(void *_this)//PopupWindowForBenefitAndJoinText +void GameUI_DrawNPCPopup(void *_this)//PopupWindowForBenefitAndJoinText { int v1; // edi@2 int v2; // ecx@2 diff -r f93d17337113 -r 3a5c8df8381d mm7_data.cpp --- a/mm7_data.cpp Tue May 21 14:34:14 2013 +0200 +++ b/mm7_data.cpp Tue May 21 23:44:51 2013 +0200 @@ -386,14 +386,6 @@ char pDeckMaster[12]; char aIxf[4]; // idb _UNKNOWN unk_4E19FC; // weak -char pAreYouSureWishToLeave[32]; -char asc_4E1A28[4]; // idb -char aUsxfs[13]; -char aLayout_pcx[11]; // weak -char aSprites_pcx[12]; // weak -char aProblemInBlit_[777]; // idb -char aEWorkMsdevMm7M[777]; // idb -char aProblemInBli_0[777]; // idb char aD[777]; // idb char asc_4E1AB0[777]; // idb char aWb_0[777]; // idb @@ -525,123 +517,22 @@ const char *format_4E2D80 = "\f%05d%s\f00000\n"; -char format_4E2D90[8]; -char aS03d03dS000_0[777]; // idb -char aS03d03dS000[777]; // idb //const char *format_4E2DC8 = "\f%05d"; -char aS[777]; // idb -char aLuSLuS[777]; // idb const char *format_4E2DE8 = "\f%05d%s\f00000 - "; -char asc_4E2DFC[3]; // idb const char *format_4E2E00 = "%s\f%05u\xD\r180%s\n"; // idb const char *format_4E2E10 = "%s\f%05u\t110%d\f00000 / %d\n"; -char aS100S_0[777]; // idb -char aS100S[777]; // idb -char aS100D[777]; // idb -char aS180[6]; // idb -char aS_6[2]; // idb -char aSS_0[777]; // idb -char aS_5[4]; // idb -char string_4E3294[8]; -char Format[777]; // idb -char aMem03i_txt[777]; // idb -char aMemory[777]; // idb -char aIdSSizeI[16]; // idb __int16 word_4E3C66[777]; // idb int dword_4E455C; // weak int dword_4E4560[6]; int dword_4E4578[6]; int dword_4E4590[6]; int dword_4E45A8[6]; -char aDDSDDS[777]; // idb -char asc_4E45DC[777]; // idb -char aD02dSSDSD[777]; // idb -char aButtexi1[777]; // idb -char aCanTJumpToThat[777]; // idb -char aNoMapFoundForS[777]; // idb -char global_a2[777]; // idb -char aSSS[777]; // idb -char aNotInMapStats[17]; // weak -char aD47_blv[777]; // idb -char aOut15_odm[777]; // idb -char Delim[777]; // idb -char aGamma_pcx[777]; -char aQuit1[777]; // idb -char aControls1[777]; // idb -char aSave1[777]; // idb -char aLoad1[777]; // idb -char aNew1[777]; // idb -char aOptions[777]; // idb -char aGammapos[9]; // weak -char aBloodsplats[777]; // idb -char aTinting[777]; // idb -char aColoredLights[777]; // idb -char aTurndelta[777]; // idb -char aFliponexit[777]; // idb -char pKey[777]; // idb -char aGraphicsmode[777]; // idb -char aShowdamage[777]; // idb -char aWalksound[777]; // idb -char aCharvoices[777]; // idb -char aMusicflag[777]; // idb -char aSoundflag[777]; // idb -char aOpvdgTn[777]; // idb -char aOpvdgCl[777]; // idb -char aOpvdgBs[777]; // idb -char aOpvdhTn[777]; // idb -char aOpvdhCl[777]; // idb -char aOpvdhBs[777]; // idb -char aOptvid[777]; // idb -char aOptkb_2[777]; // idb -char aOptkb_1[777]; // idb -char aResume1[777]; // idb -char aOptkb_h[777]; // idb -char aOptkb[777]; // idb -char aOption01[777]; // idb -char aOption02[777]; // idb -char aOption03[777]; // idb -char aOption04[777]; // idb -char aConvol90[777]; // idb -char aConvol80[777]; // idb -char aConvol70[777]; // idb -char aConvol60[777]; // idb -char aConvol50[777]; // idb -char aConvol40[777]; // idb -char aConvol30[777]; // idb -char aConvol20[777]; // idb -char aConvol10[777]; // idb -char aConvol00[777]; // idb -char aCon_smoo[777]; // idb -char aCon_arrr[777]; // idb -char aCon_arrl[777]; // idb -char aCon_32x[777]; // idb -char aCon_16x[777]; // idb -char aControlbg[777]; // idb -char aTitle_pcx[10]; // weak -char aEWorkMsdevMm_0[777]; // idb -char aDraw_debug_lin[777]; // idb -char aGenuineintel[13]; // weak -char asc_4E4938[13]; // weak -int dword_4E4948[777]; // weak -int dword_4E494C[777]; // weak -int dword_4E49D0[777]; // weak _UNKNOWN dword_4E49D4; // idb int dword_4E4A18[777]; // weak int dword_4E4A1C[777]; // weak int dword_4E4A40[777]; // weak int dword_4E4A44[777]; // weak -char aCentaurhauls[13]; // weak -char aCyrixinstead[13]; // weak -char aAuthenticamd[13]; // weak float flt_4E4A80[10]; -char aInvalidPlayerI[777]; // idb -char aEWorkMsdevMm_1[777]; // idb -char aEWorkMsdevMm_2[777]; // idb -char aErrorNoKeyboar[25]; // weak -char aInvalidDeviceP[777]; // idb -char aInvalidDevic_0[777]; // idb -char aEWorkMsdevMm_3[777]; // idb -char aErrorNoMouseFo[22]; // weak int pPaperdoll_BodyX = 481; // 004E4C28 int pPaperdoll_BodyY = 0; // 004E4C2C int paperdoll_Armor[4][17][2] = //4E4E30 @@ -748,24 +639,6 @@ 0x83, 0xD8, 0x7B, 0xD8, }; -char aItem092v3[777]; // idb -char aIbCd5D[777]; // idb -char aItem281pc02d[777]; // idb -char aPc02dbrd[777]; // idb -char aPc23vDlhu[777]; // idb -char aPc23vDlh[777]; // idb -char aPc23vDrh[777]; // idb -char aPc23vDlau[777]; // idb -char aPc23vDlad[777]; // idb -char aPc23vDbod[777]; // idb -char aBackhand[777]; // idb -char aBackdoll[777]; // idb -char aMagnifB[777]; // idb -char aItem3_3dvDa2[777]; // idb -char aItem3_3dvDa1[15]; // weak -char aItem3_3dvD[13]; // weak -char aItem64v1[9]; // weak -char aEffpar01[777]; // idb int pPartySpellbuffsUI_XYs[14][2] = { @@ -783,14 +656,6 @@ 3, 6, 15, 8, 3, 12, 0 }; -char aSpell27[777]; // idb -char aSpell21[777]; // idb -char aIsn02d[777]; // idb -char aBardataB[777]; // idb -char aBardata[8]; // weak -char aBardataC[10]; // weak -char aLoadprog[777]; // idb -char aLoadingD_pcx[777]; // idb int pNPCPortraits_x[6][6] = // 004E5E50 { {521, 0, 0, 0, 0, 0}, @@ -824,109 +689,9 @@ "isecdoor" }; -char aMer[777]; // idb -char aMir[777]; // idb -char aSel[777]; // idb -char aEle[777]; // idb -char aDar[777]; // idb -char aLig[777]; // idb -char aBod[777]; // idb -char aMin[777]; // idb -char aSpi[777]; // idb -char aEar[777]; // idb -char aWat[777]; // idb -char aAir[777]; // idb -char aFir[777]; // idb -char aBan[777]; // idb -char aTav[777]; // idb -char aTow[777]; // idb -char aTra[777]; // idb -char aTem[777]; // idb -char aBoa[777]; // idb -char aSta[777]; // idb -char aAlc[777]; // idb -char aMag[777]; // idb -char aArm[777]; // idb -char aWea[777]; // idb -char asc_4E7BD4[2]; // idb -char a2devents_txt[777]; // idb -char aFileSSizeLuBuf[777]; // idb -char aGlobal_evt[777]; // idb -char aMax_event_text[777]; // idb -char aS_str[777]; // idb -char aS_evt[777]; // idb -char aNoMazeInfoForT[36]; // weak -char aC[777]; // idb -char aB[3]; // weak -char aEvt02d[777]; // idb -char aNoTransitionTe[777]; // idb -char aEWorkMsdevMm_4[777]; // idb -char asc_4E7CD4[777]; // idb -char aSS_1[777]; // idb -char aNpcIdExceedsMa[777]; // idb -char aNpc03u[777]; // idb -char aPcout01[777]; // idb -char aArbiterEvil[777]; // idb -char aArbiterGood[777]; // idb -char a0[777]; // idb -char aPartyStart[777]; // idb -char aNorthStart[12]; // weak -char aSouthStart[12]; // weak -char aEastStart[11]; // weak -char aWestStart[11]; // weak -char aUnableToFindDo[777]; // idb -char aNwc_blv[777]; // idb -char aUnableToOpenS[777]; // idb -char aInvalidStringP[777]; // idb -char aEWorkMsdevMm_5[777]; // idb -char aNull[777]; // idb -char aInvalidStrin_0[777]; // idb -char aSI[777]; // idb -char aS7[4]; // weak -char aS6[777]; // idb -char aS5[4]; // weak -char aS1[777]; // idb -char aS3[4]; // weak -char aS0[777]; // idb -char aS2[4]; // weak -char aS4[4]; // weak -char aUnableToSaveDs[777]; // idb -char aDataDsft_bin[777]; // idb -char aPFrames[777]; // idb -char aEFrames[777]; // idb -char aSFrames[777]; // idb -char aMirror7[777]; // idb -char aMirror6[777]; // idb -char aMirror5[777]; // idb -char aMirror4[777]; // idb -char aMirror3[777]; // idb -char aMirror2[777]; // idb -char aMirror1[777]; // idb -char aMirror0[777]; // idb -char aLuminous[777]; // idb -char a1[777]; // idb -char aNew[777]; // idb -char pMessag[777]; // idb -char aCspriteframeta[777]; // idb -char aR[777]; // idb -char aNew_0[777]; // idb -char aUnableToSaveDt[777]; // idb -char aDataDtft_bin[777]; // idb -char aTxtFrames[777]; // idb -char aCtexturefram_1[777]; // idb -char aCtexturefram_0[777]; // idb -char aCtextureframet[777]; // idb int bWinNT4_0; // weak -char aEWorkMsdevMm_6[777]; // idb -char aTheVisObjectPo[777]; // idb -char aSpriteOutlineC[777]; // idb -char aUndefinedCobje[777]; // idb -char aEWorkMsdevMm_7[777]; // idb -char aGammaControlNo[777]; // idb __int16 word_4E8152[11] = {0, 0, 0, 90, 8, 2, 70, 20, 10, 50, 30}; -char aD3dTextureName[777]; // idb -char aLogd3d_txt[777]; // idb char byte_4E8394[204] = { 0, 0, 0, 0, 1, 1, 2, 3, 0, 4, 5, 6, 7, 8, 10, 9, 1, 0, 0, 0, 0, 0, 0, @@ -1260,59 +1025,13 @@ "MAGSHELF", "MAGSHELF", "MAGSHELF", "MAGSHELF", "MAGSHELF", "MAGSHELF", "MAGSHELF" }; -//__int16 word_4F03FE[777]; // weak -//__int16 word_4F0400[777]; // weak -/*__int16 word_4F0404[] = -{ - 0, 0, 1, 0x17, 0x1B, 0x14, 0x14, 1, 0x17, 0x18, 0x1C, - 0x14, 2, 0x17, 0x18, 0x19, 0x14, 2, 0x1B, 0x1B, 0x1A, 0x1A, - 4, 0x18, 0x1E, 0x19, 0x1B, 4, 0x18, 0x1E, 0x19, 0x1B, 3, 0x1E, - 0x18, 0x14, 0x14, 2, 0x14, 0x14, 0x14, 0x14, 3, 0x1B, 0x1B, 0x1A, 0x1A, - 3, 0x1C, 0x1C, 0x19, 0x19, 2, 0x17, 0x17, 0x18, 0x18, - 3, 0x17, 0x17, 0x1A, 0x1A, 2, 0x1E, 0x1A, 0x1A, 0x1A, 2, 0x1C, - 0x19, 0x1C, 0x1D, 0, 0 -};*/ -//__int16 word_4F0498[777]; // weak -/*__int16 word_4F0498[] = -{ -1, 0x23, 0x23, 0x26, 0x26, 1, 0x1F, 0x1F, 0x1F, 0x22, 1, 0x23, 0x23, -0x26, 0x26, 1, 0x1F, 0x1F, 0x20, 0x22, 2, 0x23, 0x23, -0x26, 0x26, 2, 0x1F, 0x20, 0x20, 0x21, 2, 0x23, 0x23, -0x26, 0x26, 2, 0x1F, 0x1F, 0x20, 0x20, 4, 0x23, 0x23, -0x26, 0x26, 4, 0x1F, 0x20, 0x21, 0x22, 4, 0x23, 0x23, 0x26, 0x26, -4, 0x1F, 0x20, 0x21, 0x22, 3, 0x23, 0x23, 0x26, 0x26, 3, -0x1F, 0x1F, 0x1F, 0x1F, 2, 0x23, 0x23, 0x26, 0x26, 2, 0x1F, 0x20, -0x22, 0x22, 3, 0x23, 0x23, 0x26, 0x26, 3, 0x1F, 0x1F, -0x20, 0x20, 3, 0x23, 0x23, 0x26, 0x26, 3, 0x20, 0x20, 0x20, -0x21, 3, 0x23, 0x23, 0x26, 0x26, 3, 0x1F, 0x1F, 0x1F, 0x20 -};*/ -//__int16 word_4F0576[777]; // weak -/*__int16 word_4F0576[] = -{ -0x23, 0x23, 0x26, 0x26, 3, 0x21, 0x1F, 0x20, 0x22, 3, 0x23, 0x23, -0x26, 0x26, 3, 0x21, 0x1F, 0x20, 0x22, 4, 0x23, 0x23, 0x26, 0x26, -4, 0x21, 0x1F, 0x20, 0x22, 0x1, 0x1, 0x2, 0x2, 0x4, 0x4, -3, 2, 2, 2, 2, 2, 2, 0, 0x1, 0x1, 0x2, 0x2, 0x3, 0x3, 0x4, 0x4, -2, 2, 2, 2, 0x0, 0x0, 1, 0, 0xA3, 0xA3, 0xA2, 0xA1, 0xA0, -2, 0, 0xA3, 0xA3, 0xA2, 0xA1, 0xA0, 2, 0, 0xA3, 0xA3, -0xA2, 0xA1, 0xA0, 2, 0, 0x0A3, 0x0A3, 0xA2, 0xA1, 0xA0, -3, 0, 0xA3, 0xA3, 0xA2, 0xA1, 0xA0, 3, 0, 0xA3, 0xA3, -0xA2, 0xA1, 0xA0 -};*/ -//__int16 word_4F0578[777]; // weak -//__int16 word_4F05AE[777]; // weak - -//__int16 word_4F063E[290]; -//__int16 word_4F06D8[22]; int guild_mambership_flags[32]={ 54, 54, 54, 54, 52, 52, 52, 52, 55, 55, 55, 55, 53, 53, 53, 53, 58, 58, 58, 58, 57, 57, 57, 57, 56, 56, 56, 56, 59, 59, 60, 60}; __int16 word_4F0754[49]; -//__int16 word_4F07B6[88]; -//__int16 _word_4F0866_pMaxLevelPerTrainingHallType_negindexing[14]; -__int16 _4F0882_evt_VAR_PlayerItemInHands_vals[54]= +__int16 _4F0882_evt_VAR_PlayerItemInHands_vals[54] = { 0x0D4, 0x270, 0x0D5, 0x21C, 0x0D6, 0x2BE, 0x0D7, 0x2BD, 0x0D8, 0x289, 0x0D9, 0x258, 0x0DA, 0x2AB, 0x0DB, 0x281, 0x0DC, 0x280, 0x0DD, @@ -1336,40 +1055,6 @@ 4, 7, 10, 11, 7, 11, 7, 11}; -char aS03d[777]; // idb -char byte_4F0F98; // idb -char sz[777]; // idb -char aSSSSSS[777]; // idb -char aSDS[777]; // idb -char aSS_3[777]; // idb -char aSSSS[777]; // idb -char aS_2[777]; // idb -char aErrorlog_txt[777]; // idb -char aUnsupportedPix[777]; // idb -char aSmackerError[777]; // idb -char aCS[777]; // idb -char aAnimsMagic7_vi[777]; // idb -char aVideoFileError[777]; // idb -char aCanTOpenFileAn[777]; // idb -char aAnimsMight7_vi[777]; // idb -char aCanTLoadS[777]; // idb -char aS_smk[777]; // idb -char aUnsupportedBin[27]; // weak -char aEWorkMsdevM_29[777]; // idb -char aFailedToOpenBl[777]; // idb -char aCanTAllocateMe[33]; // weak -char aCanTLoadFileAn[777]; // idb -char aS_bik[777]; // idb -char aMm7_win_pcx[777]; // idb -char aLuSLuSLuS[777]; // idb -char aEndgame_fnt[777]; // idb -char aWinbg_pcx[10]; // weak -char aDefaultCaseRea[777]; // idb -char aUnsupportedExc[71]; // weak -char aEWorkMsdevM_30[777]; // idb -char aUndefinedTypeR[777]; // idb -char aUnknownPointer[777]; // idb -char a1_1_3[6]; // weak double dbl_4F2870; // weak int dword_4F288C; // weak double dbl_4F5372; // weak @@ -1541,26 +1226,16 @@ int _50B834_view_transformed_zs[45]; int dword_50B918[777]; int _50B924_view_transformed_xs[45]; -//int unk_50B9D4[777]; // idb int _50B9D8_screen_space_y[777]; int dword_50B9E4[777]; -//int dword_50B9E0_ys[777]; // idb -//int dword_50B9EC[777]; // idb int dword_50B9F0[2]; // idb -//int dword_50BAE8_xs[777]; -//int dword_50BAF4_xs[777]; -//int dword_50B9F8[777]; // idb int dword_50B9FC_ys[3 + 45]; int dword_50BA08_ys[48]; // idb -//int dword_50BAC4[777]; // weak int _50BAC8_screen_space_x[777]; // idb -//int dword_50BAD0[777]; // weak int dword_50BAD4[777]; // weak -//int dword_50BADC_xs[777]; // weak int dword_50BAE0[777]; // weak int dword_50BAE8[777]; // weak int dword_50BAEC_xs[3 + 45]; // weak -//int dword_50BAF4[777]; // weak int dword_50BAF8_xs[48]; // weak int dword_50BC10[777]; // weak int dword_50BDA0[777]; // weak diff -r f93d17337113 -r 3a5c8df8381d mm7_data.h --- a/mm7_data.h Tue May 21 14:34:14 2013 +0200 +++ b/mm7_data.h Tue May 21 23:44:51 2013 +0200 @@ -321,14 +321,6 @@ extern char pDeckMaster[12]; extern char aIxf[4]; // idb extern _UNKNOWN unk_4E19FC; // weak -extern char pAreYouSureWishToLeave[32]; -extern char asc_4E1A28[4]; // idb -extern char aUsxfs[13]; -extern char aLayout_pcx[11]; // weak -extern char aSprites_pcx[12]; // weak -extern char aProblemInBlit_[]; // idb -extern char aEWorkMsdevMm7M[]; // idb -extern char aProblemInBli_0[]; // idb extern char aD[]; // idb extern char asc_4E1AB0[]; // idb extern char aWb_0[]; // idb @@ -448,118 +440,21 @@ extern const char *format_4E2D80; extern char format_4E2D90[8]; -//extern const char *format_4E2DC8; extern const char *format_4E2DE8; // idb -extern char asc_4E2DFC[3]; // idb extern const char *format_4E2E00; // idb extern const char *format_4E2E10; // format text of resistance in Stats screen -extern char aS100S_0[]; // idb -extern char aS100S[]; // idb -extern char aS100D[]; // idb -extern char aS180[6]; // idb -extern char aS_6[2]; // idb -extern char aSS_0[]; // idb -extern char aS_5[4]; // idb -extern char string_4E3294[8]; -extern char Format[]; // idb -extern char aMem03i_txt[]; // idb -extern char aMemory[]; // idb -extern char aIdSSizeI[16]; // idb extern __int16 word_4E3C66[]; // idb extern int dword_4E455C; // weak extern int dword_4E4560[6]; extern int dword_4E4578[6]; extern int dword_4E4590[6]; extern int dword_4E45A8[6]; -extern char aDDSDDS[]; // idb -extern char asc_4E45DC[]; // idb -extern char aD02dSSDSD[]; // idb -extern char aButtexi1[]; // idb -extern char aCanTJumpToThat[]; // idb -extern char aNoMapFoundForS[]; // idb -extern char global_a2[]; // idb -extern char aSSS[]; // idb -extern char aNotInMapStats[17]; // weak -extern char aD47_blv[]; // idb -extern char aOut15_odm[]; // idb -extern char Delim[]; // idb -extern char aGamma_pcx[]; -extern char aQuit1[]; // idb -extern char aControls1[]; // idb -extern char aSave1[]; // idb -extern char aLoad1[]; // idb -extern char aNew1[]; // idb -extern char aOptions[]; // idb -extern char aGammapos[9]; // weak -extern char aBloodsplats[]; // idb -extern char aTinting[]; // idb -extern char aColoredLights[]; // idb -extern char aTurndelta[]; // idb -extern char aFliponexit[]; // idb -extern char pKey[]; // idb -extern char aGraphicsmode[]; // idb -extern char aShowdamage[]; // idb -extern char aWalksound[]; // idb -extern char aCharvoices[]; // idb -extern char aMusicflag[]; // idb -extern char aSoundflag[]; // idb -extern char aOpvdgTn[]; // idb -extern char aOpvdgCl[]; // idb -extern char aOpvdgBs[]; // idb -extern char aOpvdhTn[]; // idb -extern char aOpvdhCl[]; // idb -extern char aOpvdhBs[]; // idb -extern char aOptvid[]; // idb -extern char aOptkb_2[]; // idb -extern char aOptkb_1[]; // idb -extern char aResume1[]; // idb -extern char aOptkb_h[]; // idb -extern char aOptkb[]; // idb -extern char aOption01[]; // idb -extern char aOption02[]; // idb -extern char aOption03[]; // idb -extern char aOption04[]; // idb -extern char aConvol90[]; // idb -extern char aConvol80[]; // idb -extern char aConvol70[]; // idb -extern char aConvol60[]; // idb -extern char aConvol50[]; // idb -extern char aConvol40[]; // idb -extern char aConvol30[]; // idb -extern char aConvol20[]; // idb -extern char aConvol10[]; // idb -extern char aConvol00[]; // idb -extern char aCon_smoo[]; // idb -extern char aCon_arrr[]; // idb -extern char aCon_arrl[]; // idb -extern char aCon_32x[]; // idb -extern char aCon_16x[]; // idb -extern char aControlbg[]; // idb -extern char aTitle_pcx[10]; // weak -extern char aEWorkMsdevMm_0[]; // idb -extern char aDraw_debug_lin[]; // idb -extern char aGenuineintel[13]; // weak -extern char asc_4E4938[13]; // weak -extern int dword_4E4948[]; // weak -extern int dword_4E494C[]; // weak -extern int dword_4E49D0[]; // weak extern _UNKNOWN dword_4E49D4; // idb extern int dword_4E4A18[]; // weak extern int dword_4E4A1C[]; // weak extern int dword_4E4A40[]; // weak extern int dword_4E4A44[]; // weak -extern char aCentaurhauls[13]; // weak -extern char aCyrixinstead[13]; // weak -extern char aAuthenticamd[13]; // weak extern float flt_4E4A80[10]; -extern char aInvalidPlayerI[]; // idb -extern char aEWorkMsdevMm_1[]; // idb -extern char aEWorkMsdevMm_2[]; // idb -extern char aErrorNoKeyboar[25]; // weak -extern char aInvalidDeviceP[]; // idb -extern char aInvalidDevic_0[]; // idb -extern char aEWorkMsdevMm_3[]; // idb -extern char aErrorNoMouseFo[22]; // weak extern int pPaperdoll_BodyX; // weak extern int pPaperdoll_BodyY; // weak extern int paperdoll_Armor[4][17][2]; @@ -577,143 +472,16 @@ extern int pPaperdoll_SecondLeftHand[4][2]; extern int pPaperdoll_RightHand[4][2]; extern int pPaperdollLeftEmptyHand[4][2]; -extern char aItem092v3[]; // idb -extern char aIbCd5D[]; // idb -extern char aItem281pc02d[]; // idb -extern char aPc02dbrd[]; // idb -extern char aPc23vDlhu[]; // idb -extern char aPc23vDlh[]; // idb -extern char aPc23vDrh[]; // idb -extern char aPc23vDlau[]; // idb -extern char aPc23vDlad[]; // idb -extern char aPc23vDbod[]; // idb -extern char aBackhand[]; // idb -extern char aBackdoll[]; // idb -extern char aMagnifB[]; // idb -extern char aItem3_3dvDa2[]; // idb -extern char aItem3_3dvDa1[15]; // weak -extern char aItem3_3dvD[13]; // weak -extern char aItem64v1[9]; // weak -extern char aEffpar01[]; // idb extern int pPartySpellbuffsUI_XYs[14][2]; extern unsigned char byte_4E5DD8[]; // weak extern unsigned __int8 pPartySpellbuffsUI_smthns[14]; -extern char aSpell27[]; // idb -extern char aSpell21[]; // idb -extern char aIsn02d[]; // idb -extern char aBardataB[]; // idb -extern char aBardata[8]; // weak -extern char aBardataC[10]; // weak -extern char aLoadprog[]; // idb -extern char aLoadingD_pcx[]; // idb extern int pNPCPortraits_x[6][6]; // 004E5E50 extern int pNPCPortraits_y[6][6]; // 004E5EE0 extern const char *pHouse_ExitPictures[11]; extern const char *_4E6BDC_loc_names[11]; -extern char aOutside[]; // idb -extern char aMer[]; // idb -extern char aMir[]; // idb -extern char aSel[]; // idb -extern char aEle[]; // idb -extern char aDar[]; // idb -extern char aLig[]; // idb -extern char aBod[]; // idb -extern char aMin[]; // idb -extern char aSpi[]; // idb -extern char aEar[]; // idb -extern char aWat[]; // idb -extern char aAir[]; // idb -extern char aFir[]; // idb -extern char aBan[]; // idb -extern char aTav[]; // idb -extern char aTow[]; // idb -extern char aTra[]; // idb -extern char aTem[]; // idb -extern char aBoa[]; // idb -extern char aSta[]; // idb -extern char aAlc[]; // idb -extern char aMag[]; // idb -extern char aArm[]; // idb -extern char aWea[]; // idb -extern char asc_4E7BD4[2]; // idb -extern char a2devents_txt[]; // idb -extern char aFileSSizeLuBuf[]; // idb -extern char aGlobal_evt[]; // idb -extern char aMax_event_text[]; // idb -extern char aS_str[]; // idb -extern char aS_evt[]; // idb -extern char aNoMazeInfoForT[36]; // weak -extern char aC[]; // idb -extern char aB[3]; // weak -extern char aEvt02d[]; // idb -extern char aNoTransitionTe[]; // idb -extern char aEWorkMsdevMm_4[]; // idb -extern char asc_4E7CD4[]; // idb -extern char aSS_1[]; // idb -extern char aNpcIdExceedsMa[]; // idb -extern char aNpc03u[]; // idb -extern char aPcout01[]; // idb -extern char aArbiterEvil[]; // idb -extern char aArbiterGood[]; // idb -extern char a0[]; // idb -extern char aPartyStart[]; // idb -extern char aNorthStart[12]; // weak -extern char aSouthStart[12]; // weak -extern char aEastStart[11]; // weak -extern char aWestStart[11]; // weak -extern char aUnableToFindDo[]; // idb -extern char aNwc_blv[]; // idb -extern char aUnableToOpenS[]; // idb -extern char aInvalidStringP[]; // idb -extern char aEWorkMsdevMm_5[]; // idb -extern char aNull[]; // idb -extern char aInvalidStrin_0[]; // idb -extern char aSI[]; // idb -extern char aS7[4]; // weak -extern char aS6[]; // idb -extern char aS5[4]; // weak -extern char aS1[]; // idb -extern char aS3[4]; // weak -extern char aS0[]; // idb -extern char aS2[4]; // weak -extern char aS4[4]; // weak -extern char aUnableToSaveDs[]; // idb -extern char aDataDsft_bin[]; // idb -extern char aPFrames[]; // idb -extern char aEFrames[]; // idb -extern char aSFrames[]; // idb -extern char aMirror7[]; // idb -extern char aMirror6[]; // idb -extern char aMirror5[]; // idb -extern char aMirror4[]; // idb -extern char aMirror3[]; // idb -extern char aMirror2[]; // idb -extern char aMirror1[]; // idb -extern char aMirror0[]; // idb -extern char aLuminous[]; // idb -extern char a1[]; // idb -extern char aNew[]; // idb -extern char pMessag[]; // idb -extern char aCspriteframeta[]; // idb -extern char aR[]; // idb -extern char aNew_0[]; // idb -extern char aUnableToSaveDt[]; // idb -extern char aDataDtft_bin[]; // idb -extern char aTxtFrames[]; // idb -extern char aCtexturefram_1[]; // idb -extern char aCtexturefram_0[]; // idb -extern char aCtextureframet[]; // idb extern int bWinNT4_0; // weak -extern char aEWorkMsdevMm_6[]; // idb -extern char aTheVisObjectPo[]; // idb -extern char aSpriteOutlineC[]; // idb -extern char aUndefinedCobje[]; // idb -extern char aEWorkMsdevMm_7[]; // idb -extern char aGammaControlNo[]; // idb extern __int16 word_4E8152[11]; extern char byte_4E8168[7][14]; -extern char aD3dTextureName[]; // idb -extern char aLogd3d_txt[]; // idb extern char byte_4E8394[]; // weak #include "Texture.h" extern stru355 stru_4E82A4;// = {0x20, 0x41, 0, 0x20, 0xFF0000, 0xFF00, 0xFF, 0xFF000000}; @@ -740,7 +508,6 @@ extern const char *dlhu_texnames_by_face[25]; extern unsigned char byte_4ECF08[48][25]; extern unsigned char SoundSetAction[110][8]; // weak -//extern unsigned char byte_4ED498; // weak extern __int16 pPlayerPortraitsXCoords_For_PlayerBuffAnimsDrawing[4]; extern char byte_4ED970_skill_learn_ability_by_class_table[36][37]; extern int dword_4EDEA0[]; // weak @@ -760,59 +527,15 @@ extern void *off_4EFDB0; // weak extern int dword_4F031C[]; // weak extern const char *off_4F03B8[]; // idb -//extern __int16 word_4F03FE[]; // weak -//extern __int16 word_4F0400[]; // weak -//extern __int16 word_4F0404[]; -//extern __int16 word_4F0498[]; // weak extern __int16 word_4F0576[]; // weak -//extern __int16 word_4F05AE[]; // weak - -//extern __int16 word_4F063E[290]; -//extern __int16 word_4F06D8[22]; extern int guild_mambership_flags[32]; extern __int16 word_4F0754[49]; -//extern __int16 word_4F07B6[88]; -//extern __int16 _word_4F0866_pMaxLevelPerTrainingHallType_negindexing[14]; extern __int16 _4F0882_evt_VAR_PlayerItemInHands_vals[54]; extern unsigned short pMaxLevelPerTrainingHallType[]; extern int price_for_membership[]; // weak extern Vec2_int_ pMonsterArenaPlacements[20]; extern __int16 word_4F0F30[32]; // weak -extern char aS03d[]; // idb -extern char byte_4F0F98; // idb -extern char sz[]; // idb -extern char aSSSSSS[]; // idb -extern char aSDS[]; // idb -extern char aSS_3[]; // idb -extern char aSSSS[]; // idb -extern char aS_2[]; // idb -extern char aErrorlog_txt[]; // idb -extern char aUnsupportedPix[]; // idb -extern char aSmackerError[]; // idb -extern char aCS[]; // idb -extern char aAnimsMagic7_vi[]; // idb -extern char aVideoFileError[]; // idb -extern char aCanTOpenFileAn[]; // idb -extern char aAnimsMight7_vi[]; // idb -extern char aCanTLoadS[]; // idb -extern char aS_smk[]; // idb -extern char aUnsupportedBin[27]; // weak -extern char aEWorkMsdevM_29[]; // idb -extern char aFailedToOpenBl[]; // idb -extern char aCanTAllocateMe[33]; // weak -extern char aCanTLoadFileAn[]; // idb -extern char aS_bik[]; // idb -extern char aMm7_win_pcx[]; // idb -extern char aLuSLuSLuS[]; // idb -extern char aEndgame_fnt[]; // idb -extern char aWinbg_pcx[10]; // weak -extern char aDefaultCaseRea[]; // idb -extern char aUnsupportedExc[71]; // weak -extern char aEWorkMsdevM_30[]; // idb -extern char aUndefinedTypeR[]; // idb -extern char aUnknownPointer[]; // idb -extern char a1_1_3[6]; // weak extern double dbl_4F2870; // weak extern int dword_4F288C; // weak extern double dbl_4F5372; // weak @@ -984,26 +707,16 @@ extern int _50B834_view_transformed_zs[]; extern int dword_50B918[]; extern int _50B924_view_transformed_xs[]; -//extern int unk_50B9D4[]; // idb extern int _50B9D8_screen_space_y[]; extern int dword_50B9E4[]; -//extern int dword_50B9E0_ys[]; // idb -//extern int dword_50B9EC[]; // idb extern int dword_50B9F0[]; // idb -//extern int dword_50BAE8_xs[]; -//extern int dword_50BAF4_xs[]; -//extern int dword_50B9F8_xs[]; // idb extern int dword_50B9FC_ys[]; extern int dword_50BA08_ys[]; // idb -//extern int dword_50BAC4[]; // weak extern int _50BAC8_screen_space_x[]; // idb -//extern int dword_50BAD0[]; // weak extern int dword_50BAD4[]; // weak -//extern int dword_50BADC_xs[]; // weak extern int dword_50BAE0[]; // weak extern int dword_50BAE8[]; // weak extern int dword_50BAEC_xs[]; // weak -//extern int dword_50BAF4[]; // weak extern int dword_50BAF8_xs[]; // weak extern int dword_50BC10[]; // weak extern int dword_50BDA0[]; // weak @@ -1050,11 +763,6 @@ extern int papredoll_flying_feet[]; // idb extern int paperdoll_boots_texture[4][6]; extern int paperdoll_cloak_collar_texture[4][10]; // weak -//extern int dword_51179C; // weak -//extern int dword_5117A0; // weak -//extern int dword_5117A4; // weak -//extern int dword_5117A8; // weak -//extern int dword_5117AC; // weak extern int paperdoll_cloak_texture[4][10]; extern int bRingsShownInCharScreen; // weak extern int _unused000; // weak @@ -1551,7 +1259,6 @@ void LoadFonts_and_DrawCopyrightWindow(); void GUI_UpdateWindows(); void identify_item(); -void __thiscall sub_416B01(void *_this); void __thiscall sub_416D62_ShowPopupWindow_MonsterRecord_ItemInfo_etcsub_416D62(struct Vec2_int_ *_this); void UI_OnMouseLeftClick(int *pXY); // idb void __thiscall sub_417871(int *pXY); @@ -1566,8 +1273,6 @@ 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 __cdecl MainMenuUI_LoadFontsAndSomeStuff(); -void __cdecl MainMenuUI_Create(); void __fastcall sub_41D20D_buff_remaining_time_string(int ecx0, struct GUIWindow *edx0, __int64 a3, struct GUIFont *a2); bool UI_OnKeyDown(unsigned int vkKey); void GameUI_DrawItemInfo(struct ItemGen* inspect_item); // idb @@ -1575,8 +1280,6 @@ void __cdecl nullsub_3(); // idb void __cdecl LoadActualSkyFrame(); void __cdecl Sleep6Hours(); -void __cdecl RestUI_Initialize(); -void __cdecl RestUI_Draw(); // idb void __cdecl sub_42038D(); void __fastcall party_finds_gold(unsigned int uNumGold, int _1_dont_share_with_followers___2_the_same_but_without_a_message__else_normal); // idb @@ -1662,7 +1365,6 @@ void __fastcall sub_4406BC(unsigned int node_id, unsigned int uFirstNode); // idb void __fastcall sub_440BED(struct IndoorLocation_drawstru *_this); bool sub_44100D(); -void LoadPartyBuffIcons(); __int16 __fastcall sub_441A4E(int a1); void DrawBook_Map_sub(unsigned int tl_x, unsigned int tl_y, unsigned int br_x, int br_y, int _48074); // idb void Initialize2DA(); @@ -1672,19 +1374,12 @@ void __cdecl OnMapLeave(); void /*__usercall*/ OnMapLoad(); void __thiscall Level_LoadEvtAndStr(const char *pLevelName); -char *__cdecl _4443D5_GetMinimapRightClickText(); const char *__cdecl sub_444564(); char *__thiscall GetEventHintString(unsigned int uEventID); // idb -unsigned int __fastcall sub_444839_move_map(unsigned int a1, int a2, int x, int y, int z, int directiony, int directionx, int a8, const char *pLocationName); // idb -void TransitionUI_Draw(); -void UI_CreateTravelDialogue(); signed int __cdecl GetTravelTime(); -void __cdecl TravelUI_Draw(); -void __cdecl DrawBranchlessDialogueUI(); void __fastcall sub_4451A8_press_any_key(int a1, int a2, int a4); void __cdecl sub_4452BB(); const char *GetProfessionActionText(int a1); -void __cdecl DrawDialogueUI(); struct NPCData *__fastcall GetNPCData(signed int npcid); struct NPCData *__fastcall GetNewNPCData(signed int npcid, int a2); int __fastcall GetGreetType(signed int SpeakingNPC_ID); @@ -1743,14 +1438,9 @@ void *__thiscall unknown_vdtor_6(void *_this, bool a2); unsigned short * MakeScreenshot(signed int width, signed int height); void __thiscall SaveScreenshot(const char *pFilename); -void __fastcall GameUI_DrawLoadMenu(unsigned int uDialogueType); // idb -void __cdecl GameUI_DrawSaveMenu(); void __fastcall LoadGame(unsigned int uSlot); // idb void SaveGame(bool IsAutoSAve, bool NotSaveWorld); void __fastcall DoSavegame(unsigned int uSlot); // idb -void GameUI_MainMenu_DoDrawLoad(int a1); -void GameUI_MainMenu_DrawLoad(); -void __cdecl sub_4606FE(); void __cdecl TryLoadLevelFromLOD(); void __cdecl sub_46080D(); bool __cdecl Initialize_GamesLOD_NewLOD(); @@ -1787,7 +1477,6 @@ void __cdecl MM7Initialization(); int __cdecl AbortWithError(); void Abortf(const char *Format, ...); -void FreeSavegameThumbnails(); void SetCurrentMenuID(enum MENU_STATE); // idb enum MENU_STATE GetCurrentMenuID(); void *__thiscall output_debug_string(void *_this, std::string a2, const char *a3, int a4);