Mercurial > mm7
changeset 2289:60293358b4b3
byte_5111F6 to byte_5111F6_OwnedArtifacts, changed magic numbers to enums in GetItemTextureFilename
author | Grumpy7 |
---|---|
date | Sun, 16 Mar 2014 03:08:26 +0100 |
parents | 406605240b0a |
children | d65414f65bd4 69661f22ff03 |
files | Items.cpp UI/UICharacter.cpp mm7_data.cpp mm7_data.h |
diffstat | 4 files changed, 54 insertions(+), 54 deletions(-) [+] |
line wrap: on
line diff
--- a/Items.cpp Sun Mar 16 02:59:52 2014 +0100 +++ b/Items.cpp Sun Mar 16 03:08:26 2014 +0100 @@ -2124,72 +2124,72 @@ { switch ( item_id ) { - case 516: - if (byte_5111F6[2] != 0) + case ITEM_RELIC_HARECS_LEATHER: + if (byte_5111F6_OwnedArtifacts[2] != 0) item_id = 234; break; - case 505: - if (byte_5111F6[1] != 0) + case ITEM_ARTIFACT_YORUBA: + if (byte_5111F6_OwnedArtifacts[1] != 0) item_id = 236; break; - case 504: - if (byte_5111F6[0] != 0) + case ITEM_ARTIFACT_GOVERNORS_ARMOR: + if (byte_5111F6_OwnedArtifacts[0] != 0) item_id = 235; break; - case 533: - if (byte_5111F6[16] != 0) + case ITEM_ELVEN_CHAINMAIL: + if (byte_5111F6_OwnedArtifacts[16] != 0) item_id = 73; break; - case 512: - if (byte_5111F6[3] != 0) + case ITEM_ARTIFACT_LEAGUE_BOOTS: + if (byte_5111F6_OwnedArtifacts[3] != 0) item_id = 312; break; - case 521: - if (byte_5111F6[4] != 0) + case ITEM_RELIC_TALEDONS_HELM: + if (byte_5111F6_OwnedArtifacts[4] != 0) item_id = 239; break; - case 522: - if (byte_5111F6[5] != 0) + case ITEM_RELIC_SCHOLARS_CAP: + if (byte_5111F6_OwnedArtifacts[5] != 0) item_id = 240; break; - case 523: - if (byte_5111F6[6] != 0) + case ITEM_RELIC_PHYNAXIAN_CROWN: + if (byte_5111F6_OwnedArtifacts[6] != 0) item_id = 241; break; - case 532: - if (byte_5111F6[7] != 0) + case ITEM_ARTIFACT_MINDS_EYE: + if (byte_5111F6_OwnedArtifacts[7] != 0) item_id = 93; break; - case 544: - if (byte_5111F6[8] != 0) + case ITEM_RARE_SHADOWS_MASK: + if (byte_5111F6_OwnedArtifacts[8] != 0) item_id = 344; break; - case 524: - if (byte_5111F6[9] != 0) + case ITEM_RILIC_TITANS_BELT: + if (byte_5111F6_OwnedArtifacts[9] != 0) item_id = 324; break; - case 535: - if (byte_5111F6[10] != 0) + case ITEM_ARTIFACT_HEROS_BELT: + if (byte_5111F6_OwnedArtifacts[10] != 0) item_id = 104; break; - case 525: - if (byte_5111F6[11] != 0) + case ITEM_RELIC_TWILIGHT: + if (byte_5111F6_OwnedArtifacts[11] != 0) item_id = 325; break; - case 530: - if (byte_5111F6[12] != 0) + case ITEM_ARTIFACT_CLOAK_OF_THE_SHEEP: + if (byte_5111F6_OwnedArtifacts[12] != 0) item_id = 330; break; - case 547: - if (byte_5111F6[13] != 0) + case ITEM_RARE_SUN_CLOAK: + if (byte_5111F6_OwnedArtifacts[13] != 0) item_id = 347; break; - case 548: - if (byte_5111F6[14] != 0) + case ITEM_RARE_MOON_CLOAK: + if (byte_5111F6_OwnedArtifacts[14] != 0) item_id = 348; break; - case 550: - if (byte_5111F6[15] != 0) + case ITEM_RARE_VAMPIRES_CAPE: + if (byte_5111F6_OwnedArtifacts[15] != 0) item_id = 350; break; default:
--- a/UI/UICharacter.cpp Sun Mar 16 02:59:52 2014 +0100 +++ b/UI/UICharacter.cpp Sun Mar 16 03:08:26 2014 +0100 @@ -1764,28 +1764,28 @@ } } } - memset(byte_5111F6.data(), 0, sizeof(byte_5111F6)); + memset(byte_5111F6_OwnedArtifacts.data(), 0, sizeof(byte_5111F6_OwnedArtifacts)); for (uint i = 0; i < 4; ++i) { Player* player = &pParty->pPlayers[i]; - if (player->HasItem(ITEM_ARTIFACT_GOVERNORS_ARMOR, 1)) byte_5111F6[0] = 1; - if (player->HasItem(ITEM_ARTIFACT_YORUBA, 1)) byte_5111F6[1] = 1; - if (player->HasItem(ITEM_RELIC_HARECS_LEATHER, 1)) byte_5111F6[2] = 1; - if (player->HasItem(ITEM_ARTIFACT_LEAGUE_BOOTS, 1)) byte_5111F6[3] = 1; - if (player->HasItem(ITEM_RELIC_TALEDONS_HELM, 1)) byte_5111F6[4] = 1; - if (player->HasItem(ITEM_RELIC_SCHOLARS_CAP, 1)) byte_5111F6[5] = 1; - if (player->HasItem(ITEM_RELIC_PHYNAXIAN_CROWN, 1)) byte_5111F6[6] = 1; - if (player->HasItem(ITEM_ARTIFACT_MINDS_EYE, 1)) byte_5111F6[7] = 1; - if (player->HasItem(ITEM_RARE_SHADOWS_MASK, 1)) byte_5111F6[8] = 1; - if (player->HasItem(ITEM_RILIC_TITANS_BELT, 1)) byte_5111F6[9] = 1; - if (player->HasItem(ITEM_ARTIFACT_HEROS_BELT, 1)) byte_5111F6[10] = 1; - if (player->HasItem(ITEM_RELIC_TWILIGHT, 1)) byte_5111F6[11] = 1; - if (player->HasItem(ITEM_ARTIFACT_CLOAK_OF_THE_SHEEP, 1)) byte_5111F6[12] = 1; - if (player->HasItem(ITEM_RARE_SUN_CLOAK, 1)) byte_5111F6[13] = 1; - if (player->HasItem(ITEM_RARE_MOON_CLOAK, 1)) byte_5111F6[14] = 1; - if (player->HasItem(ITEM_RARE_VAMPIRES_CAPE, 1)) byte_5111F6[15] = 1; - if (player->HasItem(ITEM_ELVEN_CHAINMAIL, 1)) byte_5111F6[16] = 1; + if (player->HasItem(ITEM_ARTIFACT_GOVERNORS_ARMOR, 1)) byte_5111F6_OwnedArtifacts[0] = 1; + if (player->HasItem(ITEM_ARTIFACT_YORUBA, 1)) byte_5111F6_OwnedArtifacts[1] = 1; + if (player->HasItem(ITEM_RELIC_HARECS_LEATHER, 1)) byte_5111F6_OwnedArtifacts[2] = 1; + if (player->HasItem(ITEM_ARTIFACT_LEAGUE_BOOTS, 1)) byte_5111F6_OwnedArtifacts[3] = 1; + if (player->HasItem(ITEM_RELIC_TALEDONS_HELM, 1)) byte_5111F6_OwnedArtifacts[4] = 1; + if (player->HasItem(ITEM_RELIC_SCHOLARS_CAP, 1)) byte_5111F6_OwnedArtifacts[5] = 1; + if (player->HasItem(ITEM_RELIC_PHYNAXIAN_CROWN, 1)) byte_5111F6_OwnedArtifacts[6] = 1; + if (player->HasItem(ITEM_ARTIFACT_MINDS_EYE, 1)) byte_5111F6_OwnedArtifacts[7] = 1; + if (player->HasItem(ITEM_RARE_SHADOWS_MASK, 1)) byte_5111F6_OwnedArtifacts[8] = 1; + if (player->HasItem(ITEM_RILIC_TITANS_BELT, 1)) byte_5111F6_OwnedArtifacts[9] = 1; + if (player->HasItem(ITEM_ARTIFACT_HEROS_BELT, 1)) byte_5111F6_OwnedArtifacts[10] = 1; + if (player->HasItem(ITEM_RELIC_TWILIGHT, 1)) byte_5111F6_OwnedArtifacts[11] = 1; + if (player->HasItem(ITEM_ARTIFACT_CLOAK_OF_THE_SHEEP, 1)) byte_5111F6_OwnedArtifacts[12] = 1; + if (player->HasItem(ITEM_RARE_SUN_CLOAK, 1)) byte_5111F6_OwnedArtifacts[13] = 1; + if (player->HasItem(ITEM_RARE_MOON_CLOAK, 1)) byte_5111F6_OwnedArtifacts[14] = 1; + if (player->HasItem(ITEM_RARE_VAMPIRES_CAPE, 1)) byte_5111F6_OwnedArtifacts[15] = 1; + if (player->HasItem(ITEM_ELVEN_CHAINMAIL, 1)) byte_5111F6_OwnedArtifacts[16] = 1; } for (uint i = 0; i < 2; ++i)
--- a/mm7_data.cpp Sun Mar 16 02:59:52 2014 +0100 +++ b/mm7_data.cpp Sun Mar 16 03:08:26 2014 +0100 @@ -871,7 +871,7 @@ char pStartingMapName[32]; // idb std::array<unsigned __int8, 5> IsPlayerWearingWatersuit; std::array<char, 54> party_has_equipment; -std::array<char, 17> byte_5111F6; +std::array<char, 17> byte_5111F6_OwnedArtifacts; unsigned int uNumBlueFacesInBLVMinimap; std::array<unsigned __int16, 50> pBlueFacesInBLVMinimapIDs;
--- a/mm7_data.h Sun Mar 16 02:59:52 2014 +0100 +++ b/mm7_data.h Sun Mar 16 03:08:26 2014 +0100 @@ -493,7 +493,7 @@ extern char pStartingMapName[32]; // idb extern std::array<unsigned __int8, 5> IsPlayerWearingWatersuit; extern std::array<char, 54> party_has_equipment; -extern std::array<char, 17> byte_5111F6; +extern std::array<char, 17> byte_5111F6_OwnedArtifacts; extern std::array<unsigned int, 16> papredoll_dbrds; extern int bRingsShownInCharScreen; // weak