Mercurial > mm7
changeset 319:5a66be213cff
Actor::Die
author | Nomad |
---|---|
date | Wed, 20 Feb 2013 02:53:37 +0200 |
parents | e41fe9cf3613 |
children | 0b2af9c5f70f |
files | Actor.cpp Actor.h Monsters.h Texture.cpp Texture.h mm7_1.cpp mm7_5.cpp mm7_6.cpp mm7_data.cpp mm7_data.h |
diffstat | 10 files changed, 224 insertions(+), 415 deletions(-) [+] |
line wrap: on
line diff
--- a/Actor.cpp Wed Feb 20 01:21:59 2013 +0200 +++ b/Actor.cpp Wed Feb 20 02:53:37 2013 +0200 @@ -2178,7 +2178,7 @@ } v15 = pSpriteFrameTable->pSpriteSFrames; v3->uYawAngle = LOWORD(v12->uYawAngle); - v16 = v15[v3->pSpriteIDs[2]].uAnimLength; + v16 = v15[v3->pSpriteIDs[ANIM_AtkMelee]].uAnimLength; v17 = v24; v3->uCurrentActionLength = 8 * v16; v3->uCurrentActionTime = v13; @@ -2575,7 +2575,7 @@ } v12 = pSpriteFrameTable->pSpriteSFrames; v3->uYawAngle = LOWORD(v9->uYawAngle); - v13 = v12[v3->pSpriteIDs[3]].uAnimLength; + v13 = v12[v3->pSpriteIDs[ANIM_AtkRanged]].uAnimLength; v14 = v22; v3->uCurrentActionLength = 8 * v13; v3->uCurrentActionTime = v10; @@ -2687,7 +2687,7 @@ } v12 = pSpriteFrameTable->pSpriteSFrames; v3->uYawAngle = LOWORD(v9->uYawAngle); - v13 = v12[v3->pSpriteIDs[3]].uAnimLength; + v13 = v12[v3->pSpriteIDs[ANIM_AtkRanged]].uAnimLength; v14 = v22; v3->uCurrentActionLength = 8 * v13; v3->uCurrentActionTime = v10; @@ -2798,7 +2798,7 @@ } v12 = pSpriteFrameTable->pSpriteSFrames; v3->uYawAngle = LOWORD(v9->uYawAngle); - v13 = v12[v3->pSpriteIDs[3]].uAnimLength; + v13 = v12[v3->pSpriteIDs[ANIM_AtkRanged]].uAnimLength; v14 = v21; v3->uCurrentActionLength = 8 * v13; v3->uCurrentActionTime = v10; @@ -2902,7 +2902,7 @@ } v13 = pSpriteFrameTable->pSpriteSFrames; v3->uYawAngle = LOWORD(v10->uYawAngle); - v14 = v13[v3->pSpriteIDs[3]].uAnimLength; + v14 = v13[v3->pSpriteIDs[ANIM_AtkRanged]].uAnimLength; v15 = v21; v3->uCurrentActionLength = 8 * v14; v3->uCurrentActionTime = v11; @@ -3111,7 +3111,7 @@ memcpy(&v10, Actor::GetDirectionInfo(8 * v3 | 3, a2, &a3, 0), sizeof(v10)); v6 = pSpriteFrameTable->pSpriteSFrames; v4->uYawAngle = LOWORD(v10.uYawAngle); - v7 = v6[v4->pSpriteIDs[4]].uAnimLength; + v7 = v6[v4->pSpriteIDs[ANIM_GotHit]].uAnimLength; v8 = v11; v4->uCurrentActionTime = 0; v4->uAIState = Stunned; @@ -3153,7 +3153,7 @@ } v6 = pSpriteFrameTable->pSpriteSFrames; v5->uYawAngle = LOWORD(v4->uYawAngle); - v5->uCurrentActionLength = 8 * v6[v5->pSpriteIDs[7]].uAnimLength; + v5->uCurrentActionLength = 8 * v6[v5->pSpriteIDs[ANIM_Bored]].uAnimLength; v7 = stru_5C6E00->Atan2(v5->vPosition.x - pIndoorCamera->pos.x, v5->vPosition.y - pIndoorCamera->pos.y); LOWORD(v8) = v5->uYawAngle; v9 = stru_5C6E00->uIntegerPi + v8 + ((signed int)stru_5C6E00->uIntegerPi >> 3) - v7; @@ -3184,7 +3184,7 @@ pActor = &pActors[uActorID]; v2 = pSpriteFrameTable->pSpriteSFrames; - v3 = pActor->pSpriteIDs[5]; + v3 = pActor->pSpriteIDs[ANIM_Dying]; pActor->uCurrentActionTime = 0; pActor->uAIState = Resurrected; pActor->uCurrentActionAnimation = ANIM_Dying; @@ -3196,237 +3196,65 @@ //----- (00402D6E) -------------------------------------------------------- -void __fastcall Actor::Die(unsigned int uActorID) +void Actor::Die(unsigned int uActorID) { - Actor *v1; // esi@1 - SpriteFrame *v2; // ecx@1 - int v3; // eax@1 - int v4; // ecx@1 - char *v5; // eax@1 - SpellBuff *v6; // edi@5 - signed int v7; // ebx@5 - MONSTER_TYPE v8; // eax@7 - int v9; // eax@23 - ItemGen _this; // [sp+8h] [bp-28h]@7 - unsigned int v11; // [sp+2Ch] [bp-4h]@1 + auto actor = &pActors[uActorID]; - v1 = &pActors[uActorID]; - v11 = uActorID; - v2 = pSpriteFrameTable->pSpriteSFrames; - v3 = 60 * v1->pSpriteIDs[5]; - v1->uCurrentActionTime = 0; - v1->uAIState = Dying; - v1->uCurrentActionAnimation = ANIM_Dying; - LOWORD(v3) = *(__int16 *)((char *)&v2->uAnimLength + v3); - v1->sCurrentHP = 0; - v1->uCurrentActionLength = 8 * v3; - v1->pActorBuffs[6].Reset(); - v1->pActorBuffs[5].Reset(); - Actor::PlaySound(v11, 1u); - v1->UpdateAnimation(); - v4 = v1->pMonsterInfo.uID; - v5 = (char *)pParty->field_75A; - do - { - if ( v4 == *((short *)v5 - 5) ) - *(short *)v5 = 1; - v5 += 2; - } - while ( (signed int)v5 < (signed int)&pParty->field_764 ); - v6 = v1->pActorBuffs; - v7 = 22; - do - { - v6->Reset(); - ++v6; - --v7; - } - while ( v7 ); - _this.Reset(); - v8 = (MONSTER_TYPE)v1->pMonsterInfo.uID; - if ( v8 > MONSTER_HARPY_3 ) + actor->uCurrentActionTime = 0; + actor->uAIState = Dying; + actor->uCurrentActionAnimation = ANIM_Dying; + actor->sCurrentHP = 0; + actor->uCurrentActionLength = 8 * pSpriteFrameTable->pSpriteSFrames[actor->pSpriteIDs[ANIM_Dying]].uAnimLength; + actor->pActorBuffs[6].Reset(); + actor->pActorBuffs[5].Reset(); + Actor::PlaySound(uActorID, 1); + actor->UpdateAnimation(); + + for (uint i = 0; i < 5; ++i) + if (pParty->field_750[i] == actor->pMonsterInfo.uID) + pParty->field_75A[i] = true; + + for (uint i = 0; i < 22; ++i) + actor->pActorBuffs[i].Reset(); + + ItemGen drop; + switch (actor->pMonsterInfo.uID) { - if ( v8 < MONSTER_OOZE_1 ) - { - if ( !_this.uItemID ) - { - if ( v1->pMonsterInfo.uSpecialAbilityType == MONSTER_SPECIAL_ABILITY_EXPLODE ) - Actor::Explode(v11); - return; - } - if ( rand() % 100 < 20 ) - { - v9 = rand(); - sub_42F7EB_DropItemAt( - pItemsTable->pItems[_this.uItemID].uSpriteID, - v1->vPosition.x, - v1->vPosition.y, - v1->vPosition.z + 16, - v9 % 200 + 200, - 1, - 1, - 0, - &_this); - } - if ( v1->pMonsterInfo.uSpecialAbilityType == MONSTER_SPECIAL_ABILITY_EXPLODE ) - Actor::Explode(v11); - return; - } - if ( v8 <= MONSTER_OOZE_3 ) - { - _this.uItemID = ITEM_OOZE_ECTOPLASM_BOTTLE; - if ( !_this.uItemID ) - { - if ( v1->pMonsterInfo.uSpecialAbilityType == MONSTER_SPECIAL_ABILITY_EXPLODE ) - Actor::Explode(v11); - return; - } - if ( rand() % 100 < 20 ) - { - v9 = rand(); - sub_42F7EB_DropItemAt( - pItemsTable->pItems[_this.uItemID].uSpriteID, - v1->vPosition.x, - v1->vPosition.y, - v1->vPosition.z + 16, - v9 % 200 + 200, - 1, - 1, - 0, - &_this); - } - if ( v1->pMonsterInfo.uSpecialAbilityType == MONSTER_SPECIAL_ABILITY_EXPLODE ) - Actor::Explode(v11); - return; - } - if ( v8 <= MONSTER_PEASANT_GOBLIN_MALE_3_3 || v8 > MONSTER_TROLL_3 ) - { - if ( !_this.uItemID ) - { - if ( v1->pMonsterInfo.uSpecialAbilityType == MONSTER_SPECIAL_ABILITY_EXPLODE ) - Actor::Explode(v11); - return; - } - if ( rand() % 100 < 20 ) - { - v9 = rand(); - sub_42F7EB_DropItemAt( - pItemsTable->pItems[_this.uItemID].uSpriteID, - v1->vPosition.x, - v1->vPosition.y, - v1->vPosition.z + 16, - v9 % 200 + 200, - 1, - 1, - 0, - &_this); - } - if ( v1->pMonsterInfo.uSpecialAbilityType == MONSTER_SPECIAL_ABILITY_EXPLODE ) - Actor::Explode(v11); - return; - } - _this.uItemID = ITEM_TROLL_BLOOD; + case MONSTER_HARPY_1: case MONSTER_HARPY_2: case MONSTER_HARPY_3: + drop.uItemID = ITEM_HARPY_FEATHER; + break; + + case MONSTER_OOZE_1: case MONSTER_OOZE_2: case MONSTER_OOZE_3: + drop.uItemID = ITEM_OOZE_ECTOPLASM_BOTTLE; + break; + + case MONSTER_TROLL_1: case MONSTER_TROLL_2: case MONSTER_TROLL_3: + drop.uItemID = ITEM_TROLL_BLOOD; + break; + + case MONSTER_DEVIL_1: case MONSTER_DEVIL_2: case MONSTER_DEVIL_3: + drop.uItemID = ITEM_DEVIL_ICHOR; + break; + + case MONSTER_DRAGON_1: case MONSTER_DRAGON_2: case MONSTER_DRAGON_3: + drop.uItemID = ITEM_DRAGON_EYE; } - else + + if (rand() % 100 < 20) { - if ( v8 >= MONSTER_HARPY_1 ) - { - _this.uItemID = ITEM_HARPY_FEATHER; - } - else - { - if ( v8 < MONSTER_DEVIL_1 ) - { - if ( !_this.uItemID ) - { - if ( v1->pMonsterInfo.uSpecialAbilityType == MONSTER_SPECIAL_ABILITY_EXPLODE ) - Actor::Explode(v11); - return; - } - if ( rand() % 100 < 20 ) - { - v9 = rand(); - sub_42F7EB_DropItemAt( - pItemsTable->pItems[_this.uItemID].uSpriteID, - v1->vPosition.x, - v1->vPosition.y, - v1->vPosition.z + 16, - v9 % 200 + 200, - 1, - 1, - 0, - &_this); - } - if ( v1->pMonsterInfo.uSpecialAbilityType == MONSTER_SPECIAL_ABILITY_EXPLODE ) - Actor::Explode(v11); - return; - } - if ( v8 > MONSTER_DEVIL_3 ) - { - if ( v8 <= MONSTER_DRAGON_3 ) - { - _this.uItemID = ITEM_DRAGON_EYE; - if ( rand() % 100 < 20 ) - { - v9 = rand(); - sub_42F7EB_DropItemAt( - pItemsTable->pItems[_this.uItemID].uSpriteID, - v1->vPosition.x, - v1->vPosition.y, - v1->vPosition.z + 16, - v9 % 200 + 200, - 1, - 1, - 0, - &_this); - } - if ( v1->pMonsterInfo.uSpecialAbilityType == MONSTER_SPECIAL_ABILITY_EXPLODE ) - Actor::Explode(v11); - return; - } - if ( !_this.uItemID ) - { - if ( v1->pMonsterInfo.uSpecialAbilityType == MONSTER_SPECIAL_ABILITY_EXPLODE ) - Actor::Explode(v11); - return; - } - if ( rand() % 100 < 20 ) - { - v9 = rand(); - sub_42F7EB_DropItemAt( - pItemsTable->pItems[_this.uItemID].uSpriteID, - v1->vPosition.x, - v1->vPosition.y, - v1->vPosition.z + 16, - v9 % 200 + 200, - 1, - 1, - 0, - &_this); - } - if ( v1->pMonsterInfo.uSpecialAbilityType == MONSTER_SPECIAL_ABILITY_EXPLODE ) - Actor::Explode(v11); - return; - } - _this.uItemID = ITEM_DEVIL_ICHOR; - } - } - if ( rand() % 100 < 20 ) - { - v9 = rand(); - sub_42F7EB_DropItemAt( - pItemsTable->pItems[_this.uItemID].uSpriteID, - v1->vPosition.x, - v1->vPosition.y, - v1->vPosition.z + 16, - v9 % 200 + 200, + sub_42F7EB_DropItemAt(pItemsTable->pItems[drop.uItemID].uSpriteID, + actor->vPosition.x, + actor->vPosition.y, + actor->vPosition.z + 16, + rand() % 200 + 200, 1, 1, 0, - &_this); + &drop); } - if ( v1->pMonsterInfo.uSpecialAbilityType == MONSTER_SPECIAL_ABILITY_EXPLODE ) - Actor::Explode(v11); + + if (actor->pMonsterInfo.uSpecialAbilityType == MONSTER_SPECIAL_ABILITY_EXPLODE) + Actor::Explode(uActorID); } //----- (00402CED) -------------------------------------------------------- @@ -4129,7 +3957,7 @@ this->uAttributes = result; break; case Dead: - result = 60 * this->pSpriteIDs[6]; + result = 60 * this->pSpriteIDs[ANIM_Dead]; if ( *(__int16 *)((char *)pSpriteFrameTable->pSpriteSFrames->pHwSpriteIDs + result) <= 0 ) this->uAIState = Removed; else
--- a/Actor.h Wed Feb 20 01:21:59 2013 +0200 +++ b/Actor.h Wed Feb 20 02:53:37 2013 +0200 @@ -205,7 +205,7 @@ static unsigned int __fastcall _402968(unsigned int uActorID, signed int edx0, int uActionLength, struct AIDirection *a4); static unsigned int __fastcall _402AD7(unsigned int uActorID, unsigned int a2, signed int arg0, signed int uActionLength, struct AIDirection *pDir); static void __fastcall PlaySound(unsigned int uActorID, unsigned int uSoundID); - static void __fastcall Die(unsigned int uActorID); + static void Die(unsigned int uActorID); static unsigned int __fastcall Resurrect(unsigned int uActorID); static int __fastcall _402F87(unsigned int uActorID, unsigned int uObjID, struct AIDirection *a4); static __int16 __fastcall _4030AD(unsigned int uActorID, signed int edx0, int arg0);
--- a/Monsters.h Wed Feb 20 01:21:59 2013 +0200 +++ b/Monsters.h Wed Feb 20 02:53:37 2013 +0200 @@ -6,8 +6,10 @@ enum MONSTER_TYPE { MONSTER_DEVIL_1 = 0x16, + MONSTER_DEVIL_2 = 0x17, MONSTER_DEVIL_3 = 0x18, MONSTER_DRAGON_1 = 0x19, + MONSTER_DRAGON_2 = 0x1A, MONSTER_DRAGON_3 = 0x1B, MONSTER_ELEMENTAL_WATER_1 = 0x2E, MONSTER_ELEMENTAL_WATER_3 = 0x30, @@ -18,10 +20,12 @@ MONSTER_GHOST_1 = 0x46, MONSTER_GHOST_3 = 0x48, MONSTER_HARPY_1 = 0x55, + MONSTER_HARPY_2 = 0x56, MONSTER_HARPY_3 = 0x57, MONSTER_LICH_1 = 0x5B, MONSTER_LICH_3 = 0x5D, MONSTER_OOZE_1 = 0x70, + MONSTER_OOZE_2 = 0x71, MONSTER_OOZE_3 = 0x72, MONSTER_PEASANT_ELF_FEMALE_1_1 = 0x85, MONSTER_PEASANT_ELF_MALE_3_3 = 0x96, @@ -36,6 +40,8 @@ MONSTER_ZOMBIE_1 = 0xE5, MONSTER_ZOMBIE_3 = 0xE7, MONSTER_PEASANT_GOBLIN_MALE_3_3 = 0xF9, + MONSTER_TROLL_1 = 0xFA, + MONSTER_TROLL_2 = 0xFB, MONSTER_TROLL_3 = 0xFC, MONSTER_TREANT_1 = 0xFD, MONSTER_TREANT_3 = 0xFF,
--- a/Texture.cpp Wed Feb 20 01:21:59 2013 +0200 +++ b/Texture.cpp Wed Feb 20 02:53:37 2013 +0200 @@ -132,16 +132,16 @@ int uTextureID_50795C; // weak -unsigned int uTextureID_507970; +unsigned int uTextureID_Btn_GameSettings; -unsigned int uTextureID_507978; -unsigned int uTextureID_50797C; -unsigned int uTextureID_507980; -unsigned int uTextureID_507984; +unsigned int uTextureID_Btn_Rest; +unsigned int uTextureID_Btn_CastSpell; +unsigned int uTextureID_Btn_ZoomIn; +unsigned int uTextureID_Btn_ZoomOut; unsigned int uTextureID_FONTPAL; -unsigned int uTextureID_50798C; -unsigned int uTextureID_507990; +unsigned int uTextureID_Btn_NPCRight; +unsigned int uTextureID_Btn_NPCLeft; unsigned int pTextureIDs_pMapDirs[8];
--- a/Texture.h Wed Feb 20 01:21:59 2013 +0200 +++ b/Texture.h Wed Feb 20 02:53:37 2013 +0200 @@ -234,16 +234,16 @@ extern int uTextureID_50795C; // weak -extern unsigned int uTextureID_507970; +extern unsigned int uTextureID_Btn_GameSettings; -extern unsigned int uTextureID_507978; -extern unsigned int uTextureID_50797C; -extern unsigned int uTextureID_507980; -extern unsigned int uTextureID_507984; +extern unsigned int uTextureID_Btn_Rest; +extern unsigned int uTextureID_Btn_CastSpell; +extern unsigned int uTextureID_Btn_ZoomIn; +extern unsigned int uTextureID_Btn_ZoomOut; extern unsigned int uTextureID_FONTPAL; -extern unsigned int uTextureID_50798C; -extern unsigned int uTextureID_507990; +extern unsigned int uTextureID_Btn_NPCRight; +extern unsigned int uTextureID_Btn_NPCLeft; extern unsigned int pTextureIDs_pMapDirs[8];
--- a/mm7_1.cpp Wed Feb 20 01:21:59 2013 +0200 +++ b/mm7_1.cpp Wed Feb 20 02:53:37 2013 +0200 @@ -1624,23 +1624,23 @@ //----- (0041B690) -------------------------------------------------------- void __cdecl MainMenuUI_Create() { - unsigned int v0; // eax@1 - unsigned int v1; // eax@1 - unsigned int v2; // eax@1 - unsigned int v3; // eax@1 - unsigned int v4; // eax@1 - unsigned int v5; // eax@1 + //unsigned int v0; // eax@1 + //unsigned int v1; // eax@1 + //unsigned int v2; // eax@1 + //unsigned int v3; // eax@1 + //unsigned int v4; // eax@1 + //unsigned int v5; // eax@1 Texture *v6; // ST78_4@1 - const char *v7; // ST5C_4@1 + //const char *v7; // ST5C_4@1 unsigned __int8 v8; // al@1 //Texture *v9; // ST60_4@1 Texture *v10; // ST78_4@1 - const char *v11; // ST5C_4@1 + //const char *v11; // ST5C_4@1 unsigned __int8 v12; // al@1 //Texture *v13; // ST60_4@1 unsigned int v14; // eax@1 Texture *v15; // ST78_4@1 - const char *v16; // ST5C_4@1 + //const char *v16; // ST5C_4@1 unsigned __int8 v17; // al@1 //Texture *v18; // ST60_4@1 unsigned int uTextureID_ib_td4_A; // eax@1 @@ -1648,28 +1648,23 @@ unsigned __int8 v22; // al@1 //Texture *v23; // ST60_4@1 Texture *v24; // eax@1 - Texture *v25; // esi@1 - Texture *v26; // ST60_4@1 - const char *v27; // ST5C_4@1 + //Texture *v25; // esi@1 + //Texture *v26; // ST60_4@1 + //const char *v27; // ST5C_4@1 unsigned __int8 v28; // al@1 Texture *v29; // eax@1 - Texture *v30; // esi@1 - Texture *v31; // ST60_4@1 - const char *v32; // ST5C_4@1 + //Texture *v30; // esi@1 + //Texture *v31; // ST60_4@1 + //const char *v32; // ST5C_4@1 unsigned __int8 v33; // al@1 - v0 = pIconsFrameTable->FindIcon("wizeyeC"); - pIconsFrameTable->InitializeAnimation(v0); - v1 = pIconsFrameTable->FindIcon("wizeyeB"); - pIconsFrameTable->InitializeAnimation(v1); - v2 = pIconsFrameTable->FindIcon("wizeyeA"); - pIconsFrameTable->InitializeAnimation(v2); - v3 = pIconsFrameTable->FindIcon("torchC"); - pIconsFrameTable->InitializeAnimation(v3); - v4 = pIconsFrameTable->FindIcon("torchB"); - pIconsFrameTable->InitializeAnimation(v4); - v5 = pIconsFrameTable->FindIcon("torchA"); - pIconsFrameTable->InitializeAnimation(v5); + pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("wizeyeC")); + pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("wizeyeB")); + pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("wizeyeA")); + pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("torchC")); + pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("torchB")); + pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("torchA")); + pTextureIDs_pMapDirs[0] = pIcons_LOD->LoadTexture("MAPDIR8", TEXTURE_16BIT_PALETTE); pTextureIDs_pMapDirs[1] = pIcons_LOD->LoadTexture("MAPDIR1", TEXTURE_16BIT_PALETTE); pTextureIDs_pMapDirs[2] = pIcons_LOD->LoadTexture("MAPDIR2", TEXTURE_16BIT_PALETTE); @@ -1678,6 +1673,7 @@ pTextureIDs_pMapDirs[5] = pIcons_LOD->LoadTexture("MAPDIR5", TEXTURE_16BIT_PALETTE); pTextureIDs_pMapDirs[6] = pIcons_LOD->LoadTexture("MAPDIR6", TEXTURE_16BIT_PALETTE); pTextureIDs_pMapDirs[7] = pIcons_LOD->LoadTexture("MAPDIR7", TEXTURE_16BIT_PALETTE); + uTextureID_BarBlue = pIcons_LOD->LoadTexture("ib-statB", TEXTURE_16BIT_PALETTE); uTextureID_BarGreen = pIcons_LOD->LoadTexture("ib-statG", TEXTURE_16BIT_PALETTE); uTextureID_BarYellow = pIcons_LOD->LoadTexture("ib-statY", TEXTURE_16BIT_PALETTE); @@ -1711,154 +1707,142 @@ pPrimaryWindow->CreateButton(0xD4u, 0x194u, 5u, 0x31u, 1, 93, 0, 2u, 0, "", 0); pPrimaryWindow->CreateButton(0x148u, 0x194u, 5u, 0x31u, 1, 93, 0, 3u, 0, "", 0); pPrimaryWindow->CreateButton(0x1BBu, 0x194u, 5u, 0x31u, 1, 93, 0, 4u, 0, "", 0); + uTextureID_ib_td1_A = pIcons_LOD->LoadTexture("ib-td1-A", TEXTURE_16BIT_PALETTE); v6 = (Texture *)(uTextureID_ib_td1_A != -1 ? &pIcons_LOD->pTextures[uTextureID_ib_td1_A] : 0); - v7 = pGlobalTXT_LocalizationStrings[174];//Quests v8 = pKeyActionMap->GetActionVKey(INPUT_Quest); - pBtn_Quests = pPrimaryWindow->CreateButton(0x1EBu, 0x161u, v6->uTextureWidth, v6->uTextureHeight, 1, 0, 0xC8u, 0, v8, v7, v6, 0); + pBtn_Quests = pPrimaryWindow->CreateButton(0x1EBu, 0x161u, v6->uTextureWidth, v6->uTextureHeight, 1, 0, 0xC8u, 0, v8, pGlobalTXT_LocalizationStrings[174], v6, 0); //Quests + uTextureID_ib_td2_A = pIcons_LOD->LoadTexture("ib-td2-A", TEXTURE_16BIT_PALETTE); v10 = (Texture *)(uTextureID_ib_td2_A != -1 ? &pIcons_LOD->pTextures[uTextureID_ib_td2_A] : 0); - v11 = pGlobalTXT_LocalizationStrings[154];//Autonotes v12 = pKeyActionMap->GetActionVKey(INPUT_Autonotes); - pBtn_Autonotes = pPrimaryWindow->CreateButton(0x20Fu, 0x161u, v10->uTextureWidth, v10->uTextureHeight, 1, 0, 0xC9u, 0, v12, v11, v10, 0); + pBtn_Autonotes = pPrimaryWindow->CreateButton(0x20Fu, 0x161u, v10->uTextureWidth, v10->uTextureHeight, 1, 0, 0xC9u, 0, v12, pGlobalTXT_LocalizationStrings[154], v10, 0);//Autonotes + v14 = pIcons_LOD->LoadTexture("ib-td3-A", TEXTURE_16BIT_PALETTE); - v15 = (Texture *)(v14 != -1 ? (int)&pIcons_LOD->pTextures[v14] : 0); - v16 = pGlobalTXT_LocalizationStrings[139];//Maps + v15 = (Texture *)(v14 != -1 ? &pIcons_LOD->pTextures[v14] : 0); v17 = pKeyActionMap->GetActionVKey(INPUT_Mapbook); - pBtn_Maps = pPrimaryWindow->CreateButton(0x222u, 0x161u, v15->uTextureWidth, v15->uTextureHeight, 1, 0, 0xCAu, 0, v17, v16, v15, 0); + pBtn_Maps = pPrimaryWindow->CreateButton(0x222u, 0x161u, v15->uTextureWidth, v15->uTextureHeight, 1, 0, 0xCAu, 0, v17, pGlobalTXT_LocalizationStrings[139], v15, 0); //Maps + uTextureID_ib_td4_A = pIcons_LOD->LoadTexture("ib-td4-A", TEXTURE_16BIT_PALETTE); - v20 = (Texture *)(uTextureID_ib_td4_A != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_ib_td4_A] : 0); + v20 = (Texture *)(uTextureID_ib_td4_A != -1 ? &pIcons_LOD->pTextures[uTextureID_ib_td4_A] : 0); v22 = pKeyActionMap->GetActionVKey(INPUT_TimeCal); pBtn_Calendar = pPrimaryWindow->CreateButton(0x23Au, 0x161u, v20->uTextureWidth, v20->uTextureHeight, 1, 0, 0xCBu, 0, v22, pGlobalTXT_LocalizationStrings[78],//Calendar v20, 0); + uTextureID_ib_td5_A = pIcons_LOD->LoadTexture("ib-td5-A", TEXTURE_16BIT_PALETTE); pBtn_History = pPrimaryWindow->CreateButton(0x258u, 0x169u, (uTextureID_ib_td5_A != -1 ? pIcons_LOD->pTextures[uTextureID_ib_td5_A].uTextureWidth : 24), (uTextureID_ib_td5_A != -1 ? pIcons_LOD->pTextures[uTextureID_ib_td5_A].uTextureHeight : 26), 1, 0, 0xE0u, 0, 0x48u, pGlobalTXT_LocalizationStrings[602],//History (Texture *)(uTextureID_ib_td5_A != -1 ? &pIcons_LOD->pTextures[uTextureID_ib_td5_A] : 0), 0); - v24 = &pIcons_LOD->pTextures[uTextureID_507980]; - v25 = (Texture *)(uTextureID_507980 != -1 ? (int)v24 : 0); - bFlashHistoryBook = 0; - v26 = (Texture *)(uTextureID_507980 != -1 ? (int)v24 : 0); + bFlashAutonotesBook = 0; - v27 = pGlobalTXT_LocalizationStrings[252]; bFlashQuestBook = 0; + bFlashHistoryBook = 0; + + v24 = &pIcons_LOD->pTextures[uTextureID_Btn_ZoomIn]; v28 = pKeyActionMap->GetActionVKey(INPUT_ZoomIn); - dword_507A18 = pPrimaryWindow->CreateButton( + pBtn_ZoomIn = pPrimaryWindow->CreateButton( 0x23Eu, 0x88u, - v25->uTextureWidth, - v25->uTextureHeight, + v24->uTextureWidth, + v24->uTextureHeight, 2, 0, 0x170u, 0, v28, - v27, - v26, + pGlobalTXT_LocalizationStrings[252], // Zoom In + v24, 0); - v29 = &pIcons_LOD->pTextures[uTextureID_507984]; - v30 = (Texture *)(uTextureID_507984 != -1 ? (int)v29 : 0); - v31 = (Texture *)(uTextureID_507984 != -1 ? (int)v29 : 0); - v32 = pGlobalTXT_LocalizationStrings[251]; + + v29 = &pIcons_LOD->pTextures[uTextureID_Btn_ZoomOut]; v33 = pKeyActionMap->GetActionVKey(INPUT_ZoomOut); - dword_507A14 = pPrimaryWindow->CreateButton( + pBtn_ZoomOut = pPrimaryWindow->CreateButton( 0x207u, 0x88u, - v30->uTextureWidth, - v30->uTextureHeight, + v29->uTextureWidth, + v29->uTextureHeight, 2, 0, 0x16Fu, 0, v33, - v32, - v31, + pGlobalTXT_LocalizationStrings[251], // Zoom Out + v29, 0); + pPrimaryWindow->CreateButton(0x1E1u, 0, 0x99u, 0x43u, 1, 92, 0, 0, 0, "", 0); pPrimaryWindow->CreateButton(0x1EBu, 0x95u, 0x40u, 0x4Au, 1, 0, 0x86u, 0, 0x35u, "", 0); pPrimaryWindow->CreateButton(0x231u, 0x95u, 0x40u, 0x4Au, 1, 0, 0x87u, 0, 0x36u, "", 0); pPrimaryWindow->CreateButton(0x1DCu, 0x142u, 0x4Du, 0x11u, 1, 100, 0, 0, 0, "", 0); pPrimaryWindow->CreateButton(0x22Bu, 0x142u, 0x4Du, 0x11u, 1, 101, 0, 0, 0, "", 0); - pBtn_CastSpell = pPrimaryWindow->CreateButton( - 0x1DCu, - 0x1C2u, - (uTextureID_50797C != -1 ? pIcons_LOD->pTextures[uTextureID_50797C].uTextureWidth : 24), - (uTextureID_50797C != -1 ? pIcons_LOD->pTextures[uTextureID_50797C].uTextureHeight : 26), + pBtn_CastSpell = pPrimaryWindow->CreateButton(0x1DCu, 0x1C2u, + (uTextureID_Btn_CastSpell != -1 ? pIcons_LOD->pTextures[uTextureID_Btn_CastSpell].uTextureWidth : 24), + (uTextureID_Btn_CastSpell != -1 ? pIcons_LOD->pTextures[uTextureID_Btn_CastSpell].uTextureHeight : 26), 1, 0, 0x69u, 0, 0x43u, pGlobalTXT_LocalizationStrings[38], - (Texture *)(uTextureID_50797C != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_50797C] : 0), + (Texture *)(uTextureID_Btn_CastSpell != -1 ? &pIcons_LOD->pTextures[uTextureID_Btn_CastSpell] : 0), 0); - pBtn_Rest = pPrimaryWindow->CreateButton( - 0x206u, - 0x1C2u, - (uTextureID_507978 != -1 ? pIcons_LOD->pTextures[uTextureID_507978].uTextureWidth : 24), - (uTextureID_507978 != -1 ? pIcons_LOD->pTextures[uTextureID_507978].uTextureHeight : 26), + pBtn_Rest = pPrimaryWindow->CreateButton(0x206u, 0x1C2u, + (uTextureID_Btn_Rest != -1 ? pIcons_LOD->pTextures[uTextureID_Btn_Rest].uTextureWidth : 24), + (uTextureID_Btn_Rest != -1 ? pIcons_LOD->pTextures[uTextureID_Btn_Rest].uTextureHeight : 26), 1, 0, 0x68u, 0, 0x52u, pGlobalTXT_LocalizationStrings[182], - (Texture *)(uTextureID_507978 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_507978] : 0), + (Texture *)(uTextureID_Btn_Rest != -1 ? &pIcons_LOD->pTextures[uTextureID_Btn_Rest] : 0), 0); - pBtn_QuickReference = pPrimaryWindow->CreateButton( - 0x230u, - 0x1C2u, - (dword_507974 != -1 ? pIcons_LOD->pTextures[dword_507974].uTextureWidth : 24), - (dword_507974 != -1 ? pIcons_LOD->pTextures[dword_507974].uTextureHeight : 26), + pBtn_QuickReference = pPrimaryWindow->CreateButton(0x230u, 0x1C2u, + (uTextureID_Btn_QuickReference != -1 ? pIcons_LOD->pTextures[uTextureID_Btn_QuickReference].uTextureWidth : 24), + (uTextureID_Btn_QuickReference != -1 ? pIcons_LOD->pTextures[uTextureID_Btn_QuickReference].uTextureHeight : 26), 1, 0, 0x6Au, 0, 0x5Au, pGlobalTXT_LocalizationStrings[173], - (Texture *)(dword_507974 != -1 ? &pIcons_LOD->pTextures[dword_507974] : 0), + (Texture *)(uTextureID_Btn_QuickReference != -1 ? &pIcons_LOD->pTextures[uTextureID_Btn_QuickReference] : 0), 0); - pBtn_GameSettings = pPrimaryWindow->CreateButton( - 0x25Au, - 0x1C2u, - (uTextureID_507970 != -1 ? pIcons_LOD->pTextures[uTextureID_507970].uTextureWidth : 24), - (uTextureID_507970 != -1 ? pIcons_LOD->pTextures[uTextureID_507970].uTextureHeight : 26), + pBtn_GameSettings = pPrimaryWindow->CreateButton(0x25Au, 0x1C2u, + (uTextureID_Btn_GameSettings != -1 ? pIcons_LOD->pTextures[uTextureID_Btn_GameSettings].uTextureWidth : 24), + (uTextureID_Btn_GameSettings != -1 ? pIcons_LOD->pTextures[uTextureID_Btn_GameSettings].uTextureHeight : 26), 1, 0, 0x6Bu, 0, 0, pGlobalTXT_LocalizationStrings[93], - (Texture *)(uTextureID_507970 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_507970] : 0), + (Texture *)(uTextureID_Btn_GameSettings != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_Btn_GameSettings] : 0), 0); - pBtn_NPCLeft = pPrimaryWindow->CreateButton( - 0x1D5u, - 0xB2u, - (uTextureID_507990 != -1 ? pIcons_LOD->pTextures[uTextureID_507990].uTextureWidth : 24), - (uTextureID_507990 != -1 ? pIcons_LOD->pTextures[uTextureID_507990].uTextureHeight : 26), + pBtn_NPCLeft = pPrimaryWindow->CreateButton(0x1D5u, 0xB2u, + (uTextureID_Btn_NPCLeft != -1 ? pIcons_LOD->pTextures[uTextureID_Btn_NPCLeft].uTextureWidth : 24), + (uTextureID_Btn_NPCLeft != -1 ? pIcons_LOD->pTextures[uTextureID_Btn_NPCLeft].uTextureHeight : 26), 1, 0, 0xBCu, 0, 0, "", - (Texture *)(uTextureID_507990 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_507990] : 0), + (Texture *)(uTextureID_Btn_NPCLeft != -1 ? &pIcons_LOD->pTextures[uTextureID_Btn_NPCLeft] : 0), 0); - pBtn_NPCRight = pPrimaryWindow->CreateButton( - 0x272u, - 0xB2u, - (uTextureID_50798C != -1 ? pIcons_LOD->pTextures[uTextureID_50798C].uTextureWidth : 24), - (uTextureID_50798C != -1 ? pIcons_LOD->pTextures[uTextureID_50798C].uTextureHeight : 26), + pBtn_NPCRight = pPrimaryWindow->CreateButton(0x272u, 0xB2u, + (uTextureID_Btn_NPCRight != -1 ? pIcons_LOD->pTextures[uTextureID_Btn_NPCRight].uTextureWidth : 24), + (uTextureID_Btn_NPCRight != -1 ? pIcons_LOD->pTextures[uTextureID_Btn_NPCRight].uTextureHeight : 26), 1, 0, 0xBCu, 1u, 0, "", - (Texture *)(uTextureID_50798C != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_50798C] : 0), + (Texture *)(uTextureID_Btn_NPCRight != -1 ? &pIcons_LOD->pTextures[uTextureID_Btn_NPCRight] : 0), 0); Load_isn_spells_21_27(); } @@ -6222,15 +6206,15 @@ pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079D0], "IB-InitG-c", 2); pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079C8], "IB-InitY-c", 2); pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079CC], "IB-InitR-c", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_507990], "IB-NPCLD-C", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_50798C], "IB-NPCRD-C", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_507980], "ib-autout-C", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_507984], "ib-autin-C", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_NPCLeft], "IB-NPCLD-C", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_NPCRight], "IB-NPCRD-C", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_ZoomIn], "ib-autout-C", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_ZoomOut], "ib-autin-C", 2); pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_50C98C], "IB-selec-C", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_50797C], "ib-m1d-c", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_507978], "ib-m2d-c", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_507974], "ib-m3d-c", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_507970], "ib-m4d-c", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_CastSpell], "ib-m1d-c", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_Rest], "ib-m2d-c", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_QuickReference], "ib-m3d-c", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_GameSettings], "ib-m4d-c", 2); pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_50796C], "isg-01-c", 2); pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_507968], "isg-02-c", 2); pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_507964], "isg-03-c", 2); @@ -6266,15 +6250,15 @@ dword_5079D0 = pIcons_LOD->LoadTexture("IB-InitG-c", TEXTURE_16BIT_PALETTE); dword_5079C8 = pIcons_LOD->LoadTexture("IB-InitY-c", TEXTURE_16BIT_PALETTE); dword_5079CC = pIcons_LOD->LoadTexture("IB-InitR-c", TEXTURE_16BIT_PALETTE); - uTextureID_507990 = pIcons_LOD->LoadTexture("IB-NPCLD-C", TEXTURE_16BIT_PALETTE); - uTextureID_50798C = pIcons_LOD->LoadTexture("IB-NPCRD-C", TEXTURE_16BIT_PALETTE); - uTextureID_507980 = pIcons_LOD->LoadTexture("ib-autout-C", TEXTURE_16BIT_PALETTE); - uTextureID_507984 = pIcons_LOD->LoadTexture("ib-autin-C", TEXTURE_16BIT_PALETTE); + uTextureID_Btn_NPCLeft = pIcons_LOD->LoadTexture("IB-NPCLD-C", TEXTURE_16BIT_PALETTE); + uTextureID_Btn_NPCRight = pIcons_LOD->LoadTexture("IB-NPCRD-C", TEXTURE_16BIT_PALETTE); + unsigned int uTextureID_Btn_ZoomIn = pIcons_LOD->LoadTexture("ib-autout-C", TEXTURE_16BIT_PALETTE); + uTextureID_Btn_ZoomOut = pIcons_LOD->LoadTexture("ib-autin-C", TEXTURE_16BIT_PALETTE); dword_50C98C = pIcons_LOD->LoadTexture("IB-selec-C", TEXTURE_16BIT_PALETTE); - uTextureID_50797C = pIcons_LOD->LoadTexture("ib-m1d-c", TEXTURE_16BIT_PALETTE); - uTextureID_507978 = pIcons_LOD->LoadTexture("ib-m2d-c", TEXTURE_16BIT_PALETTE); - dword_507974 = pIcons_LOD->LoadTexture("ib-m3d-c", TEXTURE_16BIT_PALETTE); - uTextureID_507970 = pIcons_LOD->LoadTexture("ib-m4d-c", TEXTURE_16BIT_PALETTE); + uTextureID_Btn_CastSpell = pIcons_LOD->LoadTexture("ib-m1d-c", TEXTURE_16BIT_PALETTE); + uTextureID_Btn_Rest = pIcons_LOD->LoadTexture("ib-m2d-c", TEXTURE_16BIT_PALETTE); + uTextureID_Btn_QuickReference = pIcons_LOD->LoadTexture("ib-m3d-c", TEXTURE_16BIT_PALETTE); + uTextureID_Btn_GameSettings = pIcons_LOD->LoadTexture("ib-m4d-c", TEXTURE_16BIT_PALETTE); uTextureID_506438 = pIcons_LOD->LoadTexture("ib-bcu-c", TEXTURE_16BIT_PALETTE); dword_50796C = pIcons_LOD->LoadTexture("isg-01-c", TEXTURE_16BIT_PALETTE); dword_507968 = pIcons_LOD->LoadTexture("isg-02-c", TEXTURE_16BIT_PALETTE); @@ -6307,15 +6291,15 @@ pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079D0], "IB-InitG-a", 2); pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079C8], "IB-InitY-a", 2); pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079CC], "IB-InitR-a", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_507990], "IB-NPCLD-a", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_50798C], "IB-NPCRD-a", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_507980], "ib-autout-a", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_507984], "ib-autin-a", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_NPCLeft], "IB-NPCLD-a", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_NPCRight], "IB-NPCRD-a", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_ZoomIn], "ib-autout-a", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_ZoomOut], "ib-autin-a", 2); pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_50C98C], "IB-selec-a", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_50797C], "ib-m1d-a", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_507978], "ib-m2d-a", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_507974], "ib-m3d-a", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_507970], "ib-m4d-a", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_CastSpell], "ib-m1d-a", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_Rest], "ib-m2d-a", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_QuickReference], "ib-m3d-a", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_GameSettings], "ib-m4d-a", 2); pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_50796C], "isg-01-a", 2); pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_507968], "isg-02-a", 2); pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_507964], "isg-03-a", 2); @@ -6351,15 +6335,15 @@ dword_5079D0 = pIcons_LOD->LoadTexture("IB-InitG-a", TEXTURE_16BIT_PALETTE); dword_5079C8 = pIcons_LOD->LoadTexture("IB-InitY-a", TEXTURE_16BIT_PALETTE); dword_5079CC = pIcons_LOD->LoadTexture("IB-InitR-a", TEXTURE_16BIT_PALETTE); - uTextureID_507990 = pIcons_LOD->LoadTexture("IB-NPCLD-A", TEXTURE_16BIT_PALETTE); - uTextureID_50798C = pIcons_LOD->LoadTexture("IB-NPCRD-A", TEXTURE_16BIT_PALETTE); + uTextureID_Btn_NPCLeft = pIcons_LOD->LoadTexture("IB-NPCLD-A", TEXTURE_16BIT_PALETTE); + uTextureID_Btn_NPCRight = pIcons_LOD->LoadTexture("IB-NPCRD-A", TEXTURE_16BIT_PALETTE); dword_50C98C = pIcons_LOD->LoadTexture("IB-selec-A", TEXTURE_16BIT_PALETTE); - uTextureID_50797C = pIcons_LOD->LoadTexture("ib-m1d-a", TEXTURE_16BIT_PALETTE); - uTextureID_507978 = pIcons_LOD->LoadTexture("ib-m2d-a", TEXTURE_16BIT_PALETTE); - dword_507974 = pIcons_LOD->LoadTexture("ib-m3d-a", TEXTURE_16BIT_PALETTE); - uTextureID_507970 = pIcons_LOD->LoadTexture("ib-m4d-a", TEXTURE_16BIT_PALETTE); - uTextureID_507980 = pIcons_LOD->LoadTexture("ib-autout-a", TEXTURE_16BIT_PALETTE); - uTextureID_507984 = pIcons_LOD->LoadTexture("ib-autin-a", TEXTURE_16BIT_PALETTE); + uTextureID_Btn_CastSpell = pIcons_LOD->LoadTexture("ib-m1d-a", TEXTURE_16BIT_PALETTE); + uTextureID_Btn_Rest = pIcons_LOD->LoadTexture("ib-m2d-a", TEXTURE_16BIT_PALETTE); + uTextureID_Btn_QuickReference = pIcons_LOD->LoadTexture("ib-m3d-a", TEXTURE_16BIT_PALETTE); + uTextureID_Btn_GameSettings = pIcons_LOD->LoadTexture("ib-m4d-a", TEXTURE_16BIT_PALETTE); + unsigned int uTextureID_Btn_ZoomIn = pIcons_LOD->LoadTexture("ib-autout-a", TEXTURE_16BIT_PALETTE); + uTextureID_Btn_ZoomOut = pIcons_LOD->LoadTexture("ib-autin-a", TEXTURE_16BIT_PALETTE); uTextureID_506438 = pIcons_LOD->LoadTexture("ib-bcu-a", TEXTURE_16BIT_PALETTE); dword_50796C = pIcons_LOD->LoadTexture("isg-01-a", TEXTURE_16BIT_PALETTE); dword_507968 = pIcons_LOD->LoadTexture("isg-02-a", TEXTURE_16BIT_PALETTE); @@ -6404,15 +6388,15 @@ pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079D0], "IB-InitG-b", 2); pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079C8], "IB-InitY-b", 2); pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079CC], "IB-InitR-b", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_507990], "IB-NPCLD-B", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_50798C], "IB-NPCRD-B", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_507980], "ib-autout-B", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_507984], "ib-autin-B", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_NPCLeft], "IB-NPCLD-B", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_NPCRight], "IB-NPCRD-B", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_ZoomIn], "ib-autout-B", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_ZoomOut], "ib-autin-B", 2); pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_50C98C], "IB-selec-B", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_50797C], "ib-m1d-b", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_507978], "ib-m2d-b", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_507974], "ib-m3d-b", 2); - pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_507970], "ib-m4d-b", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_CastSpell], "ib-m1d-b", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_Rest], "ib-m2d-b", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_QuickReference], "ib-m3d-b", 2); + pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_GameSettings], "ib-m4d-b", 2); pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_50796C], "isg-01-b", 2); pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_507968], "isg-02-b", 2); pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_507964], "isg-03-b", 2);
--- a/mm7_5.cpp Wed Feb 20 01:21:59 2013 +0200 +++ b/mm7_5.cpp Wed Feb 20 02:53:37 2013 +0200 @@ -3637,7 +3637,7 @@ if ( pCurrentScreen ) continue; pParty->uFlags |= 2u; - GUIWindow::Create(0x207u, 0x88u, 0, 0, (enum WindowType)90, (int)dword_507A14, 0); + GUIWindow::Create(0x207u, 0x88u, 0, 0, (enum WindowType)90, (int)pBtn_ZoomOut, 0); uNumSeconds = 131072; v118 = 2 * viewparams->uMinimapZoom; ++viewparams->field_28; @@ -3660,7 +3660,7 @@ if ( pCurrentScreen ) continue; pParty->uFlags |= 2u; - GUIWindow::Create(0x23Eu, 0x88u, 0, 0, (enum WindowType)90, (int)dword_507A18, 0); + GUIWindow::Create(0x23Eu, 0x88u, 0, 0, (enum WindowType)90, (int)pBtn_ZoomIn, 0); uNumSeconds = 32768; v118 = (unsigned __int64)((signed __int64)(signed int)viewparams->uMinimapZoom << 15) >> 16; --viewparams->field_28;
--- a/mm7_6.cpp Wed Feb 20 01:21:59 2013 +0200 +++ b/mm7_6.cpp Wed Feb 20 02:53:37 2013 +0200 @@ -2170,7 +2170,7 @@ } //----- (0042777D) -------------------------------------------------------- -bool __fastcall _42777D_CastSpell_UseWand_ShootArrow(int a1, unsigned int uPlayerID, unsigned int a4, __int16 a5, int a6) +void _42777D_CastSpell_UseWand_ShootArrow(int a1, unsigned int uPlayerID, unsigned int a4, __int16 a5, int a6) { bool result; // eax@2 __int16 v6; // bx@4 @@ -2355,18 +2355,19 @@ if ( v6 & 2 ) { if ( pGUIWindow_Settings ) - return result; + return; pGUIWindow_Settings = GUIWindow::Create(0, 0, 640, 480, (WindowType)(WINDOW_HouseInterior|0x2), (int)&pStru277[result], 0); pGUIWindow_Settings->CreateButton(0x34u, 0x1A6u, 0x23u, 0, 2, 0, 0x45u, 0, 0x31u, "", 0); pGUIWindow_Settings->CreateButton(0xA5u, 0x1A6u, 0x23u, 0, 2, 0, 0x45u, 1u, 0x32u, "", 0); pGUIWindow_Settings->CreateButton(0x118u, 0x1A6u, 0x23u, 0, 2, 0, 0x45u, 2u, 0x33u, "", 0); pGUIWindow_Settings->CreateButton(0x186u, 0x1A6u, 0x23u, 0, 2, 0, 0x45u, 3u, 0x34u, "", 0); - return sub_421B2C_PlaceInInventory_or_DropPickedItem(); + sub_421B2C_PlaceInInventory_or_DropPickedItem(); + return; } if ( v6 & 8 ) { if ( pGUIWindow_Settings ) - return result; + return; v17 = GUIWindow::Create(0, 0, 640, 480, (WindowType)(WINDOW_HouseInterior|0x2), (int)&pStru277[result], 0); v29 = 0; v28 = ""; @@ -2384,12 +2385,13 @@ v18 = v17; LABEL_56: v18->CreateButton(v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29); - return sub_421B2C_PlaceInInventory_or_DropPickedItem(); + sub_421B2C_PlaceInInventory_or_DropPickedItem(); + return; } if ( v6 & 0x40 ) { if ( pGUIWindow_Settings ) - return result; + return; v17 = GUIWindow::Create(0, 0, 640, 480, (WindowType)(WINDOW_HouseInterior|0x2), (int)&pStru277[result], 0); v29 = 0; v28 = ""; @@ -2401,20 +2403,21 @@ if ( (char)v6 < 0 ) { if ( pGUIWindow_Settings ) - return result; + return; ++pIcons_LOD->uTexturePacksCount; if ( !pIcons_LOD->uNumPrevLoadedFiles ) pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles; pGUIWindow_Settings = pStru277[result].sub_4219BE(); unk_50C9A0 = 1; some_active_character = uActiveCharacter; - return sub_421B2C_PlaceInInventory_or_DropPickedItem(); + sub_421B2C_PlaceInInventory_or_DropPickedItem(); + return; } if ( HIBYTE(v6) & 1 ) { if ( pGUIWindow_Settings ) - return result; - pGUIWindow_Settings = GUIWindow::Create(0, 0, 640, 480, (WindowType)(WINDOW_HouseInterior|0x2), 20 * result + 5292232, 0); + return; + pGUIWindow_Settings = GUIWindow::Create(0, 0, 640, 480, (WindowType)(WINDOW_HouseInterior|0x2), (int)&pStru277[result], 0); pGUIWindow_Settings->CreateButton(0x34u, 0x1A6u, 0x23u, 0, 2, 0, 0x8Du, 0, 0x31u, "", 0); pGUIWindow_Settings->CreateButton(0xA5u, 0x1A6u, 0x23u, 0, 2, 0, 0x8Du, 1u, 0x32u, "", 0); pGUIWindow_Settings->CreateButton(0x118u, 0x1A6u, 0x23u, 0, 2, 0, 0x8Du, 2u, 0x33u, "", 0); @@ -2435,50 +2438,38 @@ } if ( HIBYTE(v6) & 2 && !pGUIWindow_Settings ) { - pGUIWindow_Settings = GUIWindow::Create(0, 0, 640, 480, (WindowType)(WINDOW_HouseInterior|0x2), 20 * result + 5292232, 0); + pGUIWindow_Settings = GUIWindow::Create(0, 0, 640, 480, (WindowType)(WINDOW_HouseInterior|0x2), (int)&pStru277[result], 0); pBtn_NPCLeft = pGUIWindow_Settings->CreateButton( 0x1D5u, 0xB2u, - (uTextureID_507990 != -1 ? pIcons_LOD->pTextures[uTextureID_507990].uTextureWidth : 24), - (uTextureID_507990 != -1 ? pIcons_LOD->pTextures[uTextureID_507990].uTextureHeight : 26), + (uTextureID_Btn_NPCLeft != -1 ? pIcons_LOD->pTextures[uTextureID_Btn_NPCLeft].uTextureWidth : 24), + (uTextureID_Btn_NPCLeft != -1 ? pIcons_LOD->pTextures[uTextureID_Btn_NPCLeft].uTextureHeight : 26), 1, 0, 0xBCu, 0, 0, "", - (Texture *)(uTextureID_507990 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_507990] : 0), + (Texture *)(uTextureID_Btn_NPCLeft != -1 ? &pIcons_LOD->pTextures[uTextureID_Btn_NPCLeft] : 0), 0); pBtn_NPCRight = pGUIWindow_Settings->CreateButton( 0x272u, 0xB2u, - (uTextureID_50798C != -1 ? pIcons_LOD->pTextures[uTextureID_50798C].uTextureWidth : 24), - (uTextureID_50798C != -1 ? pIcons_LOD->pTextures[uTextureID_50798C].uTextureHeight : 26), + (uTextureID_Btn_NPCRight != -1 ? pIcons_LOD->pTextures[uTextureID_Btn_NPCRight].uTextureWidth : 24), + (uTextureID_Btn_NPCRight != -1 ? pIcons_LOD->pTextures[uTextureID_Btn_NPCRight].uTextureHeight : 26), 1, 0, 0xBCu, 1u, 0, "", - (Texture *)(uTextureID_50798C != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_50798C] : 0), + (Texture *)(uTextureID_Btn_NPCRight != -1 ? &pIcons_LOD->pTextures[uTextureID_Btn_NPCRight] : 0), 0); pGUIWindow_Settings->CreateButton(0x1EBu, 0x95u, 0x40u, 0x4Au, 1, 0, 0x8Fu, 4u, 0x35u, "", 0); - result = (bool)pGUIWindow_Settings->CreateButton( - 0x231u, - 0x95u, - 0x40u, - 0x4Au, - 1, - 0, - 0x8Fu, - 5u, - 0x36u, - "", - 0); + pGUIWindow_Settings->CreateButton(0x231u, 0x95u, 0x40u, 0x4Au, 1, 0, 0x8Fu, 5u, 0x36u, "", 0); } } } - return result; }
--- a/mm7_data.cpp Wed Feb 20 01:21:59 2013 +0200 +++ b/mm7_data.cpp Wed Feb 20 02:53:37 2013 +0200 @@ -1589,14 +1589,14 @@ int dword_507964; // weak int dword_507968; // weak int dword_50796C; // weak -int dword_507974; // weak +int uTextureID_Btn_QuickReference; // weak int dword_5079B4; // weak int dword_5079C8; // weak int dword_5079CC; // weak int dword_5079D0; // weak int dword_5079D8; // weak -struct GUIButton *dword_507A14; // idb -struct GUIButton *dword_507A18; // idb +struct GUIButton *pBtn_ZoomOut; // idb +struct GUIButton *pBtn_ZoomIn; // idb unsigned int uGameUIFontShadow; unsigned int uGameUIFontMain; int dword_507B00_spell_info_to_draw_in_popup; // weak
--- a/mm7_data.h Wed Feb 20 01:21:59 2013 +0200 +++ b/mm7_data.h Wed Feb 20 02:53:37 2013 +0200 @@ -1198,14 +1198,14 @@ extern int dword_507964; // weak extern int dword_507968; // weak extern int dword_50796C; // weak -extern int dword_507974; // weak +extern int uTextureID_Btn_QuickReference; // weak extern int dword_5079B4; // weak extern int dword_5079C8; // weak extern int dword_5079CC; // weak extern int dword_5079D0; // weak extern int dword_5079D8; // weak -extern struct GUIButton *dword_507A14; // idb -extern struct GUIButton *dword_507A18; // idb +extern struct GUIButton *pBtn_ZoomOut; // idb +extern struct GUIButton *pBtn_ZoomIn; // idb extern unsigned int uGameUIFontShadow; extern unsigned int uGameUIFontMain; extern int dword_507B00_spell_info_to_draw_in_popup; // weak @@ -1930,7 +1930,7 @@ void __cdecl sub_426947(); int __fastcall sub_4269A2_GivePartyExp(unsigned int a1); bool __fastcall sub_427769_spell(unsigned int uSpellID); -bool __fastcall _42777D_CastSpell_UseWand_ShootArrow(int a1, unsigned int uPlayerID, unsigned int a4, __int16 a5, int a6); +void _42777D_CastSpell_UseWand_ShootArrow(int a1, unsigned int uPlayerID, unsigned int a4, __int16 a5, int a6); int __fastcall sub_42EBBE(int, int); // weak void _42ECB5_PlayerAttacksActor(); void __thiscall InitializeTurnBasedAnimations(void *);