Skip to content

Commit

Permalink
Renaming enum values p1
Browse files Browse the repository at this point in the history
  • Loading branch information
captainurist committed Oct 14, 2023
1 parent 072c0cd commit ace7c53
Show file tree
Hide file tree
Showing 15 changed files with 179 additions and 179 deletions.
14 changes: 7 additions & 7 deletions src/Bin/CodeGen/CodeGen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,24 +86,24 @@ int runItemIdCodeGen(CodeGenOptions options, GameResourceManager *resourceManage
if (!contains(description, "off-balance"))
enumName += "_FIXED";

if (desc.uEquipType == EQUIP_REAGENT) {
if (desc.uEquipType == ITEM_TYPE_REAGENT) {
enumName = "REAGENT_" + enumName;
} else if (desc.uEquipType == EQUIP_POTION) {
} else if (desc.uEquipType == ITEM_TYPE_POTION) {
if (!enumName.starts_with("POTION_"))
enumName = "POTION_" + enumName;
if (enumName.ends_with("_POTION"))
enumName = enumName.substr(0, enumName.size() - 7);
} else if (desc.uEquipType == EQUIP_SPELL_SCROLL) {
} else if (desc.uEquipType == ITEM_TYPE_SPELL_SCROLL) {
enumName = "SCROLL_" + enumName;
} else if (desc.uEquipType == EQUIP_BOOK) {
} else if (desc.uEquipType == ITEM_TYPE_BOOK) {
enumName = "SPELLBOOK_" + enumName;
} else if (desc.uEquipType == EQUIP_MESSAGE_SCROLL) {
} else if (desc.uEquipType == ITEM_TYPE_MESSAGE_SCROLL) {
if (enumName.ends_with("_RECIPE")) {
enumName = "RECIPE_" + enumName.substr(0, enumName.size() - 7);
} else if (!enumName.starts_with("MESSAGE_")) {
enumName = "MESSAGE_" + enumName;
}
} else if (desc.uEquipType == EQUIP_GOLD) {
} else if (desc.uEquipType == ITEM_TYPE_GOLD) {
if (description == "A small pile of gold coins.") {
enumName = "GOLD_SMALL";
} else if (description == "A pile of gold coins.") {
Expand All @@ -113,7 +113,7 @@ int runItemIdCodeGen(CodeGenOptions options, GameResourceManager *resourceManage
} else {
throw Exception("Unrecognized gold pile description '{}'", description);
}
} else if (desc.uEquipType == EQUIP_GEM) {
} else if (desc.uEquipType == ITEM_TYPE_GEM) {
enumName = "GEM_" + enumName;
}

Expand Down
2 changes: 1 addition & 1 deletion src/Engine/Graphics/Indoor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,7 @@ void PrepareToLoadBLV(bool bLoading) {
if (pSpriteObjects[i].uObjectDescID) {
if (pSpriteObjects[i].containing_item.uItemID != ITEM_NULL) {
if (pSpriteObjects[i].containing_item.uItemID != ITEM_POTION_BOTTLE &&
pItemTable->pItems[pSpriteObjects[i].containing_item.uItemID].uEquipType == EQUIP_POTION &&
pItemTable->pItems[pSpriteObjects[i].containing_item.uItemID].uEquipType == ITEM_TYPE_POTION &&
!pSpriteObjects[i].containing_item.potionPower)
pSpriteObjects[i].containing_item.potionPower = grng->random(15) + 5;
pItemTable->SetSpecialBonus(&pSpriteObjects[i].containing_item);
Expand Down
2 changes: 1 addition & 1 deletion src/Engine/Graphics/Outdoor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1188,7 +1188,7 @@ void OutdoorLocation::ArrangeSpriteObjects() {
}
if (pSpriteObjects[i].containing_item.uItemID != ITEM_NULL) {
if (pSpriteObjects[i].containing_item.uItemID != ITEM_POTION_BOTTLE &&
pItemTable->pItems[pSpriteObjects[i].containing_item.uItemID].uEquipType == EQUIP_POTION &&
pItemTable->pItems[pSpriteObjects[i].containing_item.uItemID].uEquipType == ITEM_TYPE_POTION &&
!pSpriteObjects[i].containing_item.potionPower)
pSpriteObjects[i].containing_item.potionPower = grng->random(15) + 5;
pItemTable->SetSpecialBonus(&pSpriteObjects[i].containing_item);
Expand Down
2 changes: 1 addition & 1 deletion src/Engine/Graphics/Viewport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ void ViewingParams::_443365() {
}

void ItemInteraction(unsigned int item_id) {
if (pItemTable->pItems[pSpriteObjects[item_id].containing_item.uItemID].uEquipType == EQUIP_GOLD) {
if (pItemTable->pItems[pSpriteObjects[item_id].containing_item.uItemID].uEquipType == ITEM_TYPE_GOLD) {
pParty->partyFindsGold(pSpriteObjects[item_id].containing_item.goldAmount, GOLD_RECEIVE_SHARE);
} else {
if (pParty->pPickedItem.uItemID != ITEM_NULL) {
Expand Down
60 changes: 30 additions & 30 deletions src/Engine/Objects/Character.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,28 +117,28 @@ static constexpr IndexedArray<int, CHARACTER_SKILL_MASTERY_FIRST, CHARACTER_SKIL
}; // dword_4EDEC4 //the zeroth element isn't accessed, it just
// helps avoid -1 indexing, originally 4 element array off by one

static constexpr IndexedArray<ItemSlot, EQUIP_FIRST, EQUIP_LAST> pEquipTypeToBodyAnchor = { // 4E8398
{EQUIP_SINGLE_HANDED, ITEM_SLOT_MAIN_HAND},
{EQUIP_TWO_HANDED, ITEM_SLOT_MAIN_HAND},
{EQUIP_BOW, ITEM_SLOT_BOW},
{EQUIP_ARMOUR, ITEM_SLOT_ARMOUR},
{EQUIP_SHIELD, ITEM_SLOT_OFF_HAND},
{EQUIP_HELMET, ITEM_SLOT_HELMET},
{EQUIP_BELT, ITEM_SLOT_BELT},
{EQUIP_CLOAK, ITEM_SLOT_CLOAK},
{EQUIP_GAUNTLETS, ITEM_SLOT_GAUTNLETS},
{EQUIP_BOOTS, ITEM_SLOT_BOOTS},
{EQUIP_RING, ITEM_SLOT_RING1},
{EQUIP_AMULET, ITEM_SLOT_AMULET},
{EQUIP_WAND, ITEM_SLOT_MAIN_HAND},
{EQUIP_REAGENT, ITEM_SLOT_INVALID},
{EQUIP_POTION, ITEM_SLOT_INVALID},
{EQUIP_SPELL_SCROLL, ITEM_SLOT_INVALID},
{EQUIP_BOOK, ITEM_SLOT_INVALID},
{EQUIP_MESSAGE_SCROLL, ITEM_SLOT_INVALID},
{EQUIP_GOLD, ITEM_SLOT_INVALID},
{EQUIP_GEM, ITEM_SLOT_INVALID},
{EQUIP_NONE, ITEM_SLOT_INVALID}
static constexpr IndexedArray<ItemSlot, ITEM_TYPE_FIRST, ITEM_TYPE_LAST> pEquipTypeToBodyAnchor = { // 4E8398
{ITEM_TYPE_SINGLE_HANDED, ITEM_SLOT_MAIN_HAND},
{ITEM_TYPE_TWO_HANDED, ITEM_SLOT_MAIN_HAND},
{ITEM_TYPE_BOW, ITEM_SLOT_BOW},
{ITEM_TYPE_ARMOUR, ITEM_SLOT_ARMOUR},
{ITEM_TYPE_SHIELD, ITEM_SLOT_OFF_HAND},
{ITEM_TYPE_HELMET, ITEM_SLOT_HELMET},
{ITEM_TYPE_BELT, ITEM_SLOT_BELT},
{ITEM_TYPE_CLOAK, ITEM_SLOT_CLOAK},
{ITEM_TYPE_GAUNTLETS, ITEM_SLOT_GAUTNLETS},
{ITEM_TYPE_BOOTS, ITEM_SLOT_BOOTS},
{ITEM_TYPE_RING, ITEM_SLOT_RING1},
{ITEM_TYPE_AMULET, ITEM_SLOT_AMULET},
{ITEM_TYPE_WAND, ITEM_SLOT_MAIN_HAND},
{ITEM_TYPE_REAGENT, ITEM_SLOT_INVALID},
{ITEM_TYPE_POTION, ITEM_SLOT_INVALID},
{ITEM_TYPE_SPELL_SCROLL, ITEM_SLOT_INVALID},
{ITEM_TYPE_BOOK, ITEM_SLOT_INVALID},
{ITEM_TYPE_MESSAGE_SCROLL, ITEM_SLOT_INVALID},
{ITEM_TYPE_GOLD, ITEM_SLOT_INVALID},
{ITEM_TYPE_GEM, ITEM_SLOT_INVALID},
{ITEM_TYPE_NONE, ITEM_SLOT_INVALID}
};

static constexpr unsigned char pBaseHealthByClass[12] = {40, 35, 35, 30, 30, 30,
Expand Down Expand Up @@ -848,7 +848,7 @@ bool Character::CanRepair(ItemGen *pItem) const {
// TODO(Nik-RE-dev): is check for boots correct?
if (CheckHiredNPCSpeciality(Smith) && pItem->isWeapon() ||
CheckHiredNPCSpeciality(Armorer) && pItem->isArmor() ||
CheckHiredNPCSpeciality(Alchemist) && pItem->GetItemEquipType() >= EQUIP_BOOTS)
CheckHiredNPCSpeciality(Alchemist) && pItem->GetItemEquipType() >= ITEM_TYPE_BOOTS)
return true; // check against hired help

if (val.mastery() == CHARACTER_SKILL_MASTERY_GRANDMASTER) // gm repair
Expand Down Expand Up @@ -1569,10 +1569,10 @@ StealResult Character::StealFromActor(unsigned int uActorID, int _steal_perm, in
if (carriedItemId != ITEM_NULL) { // load item into tempitem
actroPtr->carriedItemId = ITEM_NULL;
tempItem.uItemID = carriedItemId;
if (pItemTable->pItems[carriedItemId].uEquipType == EQUIP_WAND) {
if (pItemTable->pItems[carriedItemId].uEquipType == ITEM_TYPE_WAND) {
tempItem.uNumCharges = grng->random(6) + pItemTable->pItems[carriedItemId].uDamageMod + 1;
tempItem.uMaxCharges = tempItem.uNumCharges;
} else if (pItemTable->pItems[carriedItemId].uEquipType == EQUIP_POTION && carriedItemId != ITEM_POTION_BOTTLE) {
} else if (pItemTable->pItems[carriedItemId].uEquipType == ITEM_TYPE_POTION && carriedItemId != ITEM_POTION_BOTTLE) {
tempItem.potionPower = 2 * grng->random(4) + 2;
}
} else {
Expand Down Expand Up @@ -1735,7 +1735,7 @@ int Character::ReceiveSpecialAttackEffect(SPECIAL_ATTACK_TYPE attType, Actor *pA
this->pEquipment.uArmor - 1;

if ((i == ITEM_SLOT_OFF_HAND || i == ITEM_SLOT_MAIN_HAND) &&
GetEquippedItemEquipType(i) == EQUIP_SHIELD)
GetEquippedItemEquipType(i) == ITEM_TYPE_SHIELD)
itemstobreaklist[itemstobreakcounter++] =
this->pEquipment.pIndices[i] - 1;
}
Expand All @@ -1759,9 +1759,9 @@ int Character::ReceiveSpecialAttackEffect(SPECIAL_ATTACK_TYPE attType, Actor *pA

if ((i == ITEM_SLOT_OFF_HAND || i == ITEM_SLOT_MAIN_HAND) &&
(GetEquippedItemEquipType(i) ==
EQUIP_SINGLE_HANDED ||
ITEM_TYPE_SINGLE_HANDED ||
GetEquippedItemEquipType(i) ==
EQUIP_TWO_HANDED))
ITEM_TYPE_TWO_HANDED))
itemstobreaklist[itemstobreakcounter++] =
this->pEquipment.pIndices[i] - 1;
}
Expand Down Expand Up @@ -2017,7 +2017,7 @@ int Character::GetAttackRecoveryTime(bool bRangedAttack) const {

uint shield_recovery = 0;
if (HasItemEquipped(ITEM_SLOT_OFF_HAND)) {
if (GetEquippedItemEquipType(ITEM_SLOT_OFF_HAND) == EQUIP_SHIELD) {
if (GetEquippedItemEquipType(ITEM_SLOT_OFF_HAND) == ITEM_TYPE_SHIELD) {
CharacterSkillType skill_type = GetOffHandItem()->GetPlayerSkillType();
uint shield_base_recovery = base_recovery_times_per_weapon_type[skill_type];
float multiplier = GetArmorRecoveryMultiplierFromSkillLevel(skill_type, 1.0f, 0, 0, 0);
Expand Down Expand Up @@ -7464,7 +7464,7 @@ MerchantPhrase Character::SelectPhrasesTransaction(ItemGen *pItem, BuildingType
case BUILDING_ALCHEMY_SHOP:
if (idemId >= ITEM_ARTIFACT_HERMES_SANDALS && !isRecipe(idemId))
return MERCHANT_PHRASE_INVALID_ACTION;
if (equipType != EQUIP_REAGENT && equipType != EQUIP_POTION && equipType != EQUIP_MESSAGE_SCROLL)
if (equipType != ITEM_TYPE_REAGENT && equipType != ITEM_TYPE_POTION && equipType != ITEM_TYPE_MESSAGE_SCROLL)
return MERCHANT_PHRASE_INCOMPATIBLE_ITEM;
break;
default:
Expand Down
4 changes: 2 additions & 2 deletions src/Engine/Objects/ItemEnchantment.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ struct ItemEnchantmentTable { // Bonus|Sta|Of
// Name|Arm|Shld|Helm|Belt|Cape|Gaunt|Boot|Ring|Amul
std::string pBonusStat;
std::string pOfName;
IndexedArray<unsigned char, EQUIP_FIRST_NORMAL_ENCHANTABLE, EQUIP_LAST_NORMAL_ENCHANTABLE> chancesByItemType;
IndexedArray<unsigned char, ITEM_TYPE_FIRST_NORMAL_ENCHANTABLE, ITEM_TYPE_LAST_NORMAL_ENCHANTABLE> chancesByItemType;
};

struct ItemSpecialEnchantmentTable { // 1Ch
Expand All @@ -32,7 +32,7 @@ struct ItemSpecialEnchantmentTable { // 1Ch

std::string pBonusStatement; // 0
std::string pNameAdd; // 4
IndexedArray<char, EQUIP_FIRST_SPECIAL_ENCHANTABLE, EQUIP_LAST_SPECIAL_ENCHANTABLE> to_item_apply; // 8
IndexedArray<char, ITEM_TYPE_FIRST_SPECIAL_ENCHANTABLE, ITEM_TYPE_LAST_SPECIAL_ENCHANTABLE> to_item_apply; // 8
int iValue; // 14
int iTreasureLevel; // 18
};
68 changes: 34 additions & 34 deletions src/Engine/Objects/ItemEnums.h
Original file line number Diff line number Diff line change
Expand Up @@ -1003,7 +1003,7 @@ enum class ItemId : int32_t {
ITEM_FIRST_REAL_POTION = ITEM_POTION_CURE_WOUNDS,
ITEM_LAST_REAL_POTION = ITEM_POTION_REJUVENATION,

// TODO(captainurist): ITEM_POTION_BOTTLE equip type is EQUIP_POTION, but we don't have an empty bottle in the range below. Not good.
// TODO(captainurist): ITEM_POTION_BOTTLE equip type is ITEM_TYPE_POTION, but we don't have an empty bottle in the range below. Not good.
ITEM_FIRST_POTION = ITEM_POTION_CATALYST,
ITEM_LAST_POTION = ITEM_POTION_REJUVENATION,

Expand Down Expand Up @@ -1183,36 +1183,36 @@ inline SpellId spellForWand(ItemId wand) {
}

enum class ItemType : uint8_t {
EQUIP_SINGLE_HANDED = 0,
EQUIP_TWO_HANDED = 1,
EQUIP_BOW = 2,
EQUIP_ARMOUR = 3,
EQUIP_SHIELD = 4,
EQUIP_HELMET = 5,
EQUIP_BELT = 6,
EQUIP_CLOAK = 7,
EQUIP_GAUNTLETS = 8,
EQUIP_BOOTS = 9,
EQUIP_RING = 10,
EQUIP_AMULET = 11,
EQUIP_WAND = 12,
EQUIP_REAGENT = 13,
EQUIP_POTION = 14,
EQUIP_SPELL_SCROLL = 15,
EQUIP_BOOK = 16,
EQUIP_MESSAGE_SCROLL = 17,
EQUIP_GOLD = 18,
EQUIP_GEM = 19,
EQUIP_NONE = 20, // Ores, quest items.

EQUIP_FIRST = EQUIP_SINGLE_HANDED,
EQUIP_LAST = EQUIP_NONE,

EQUIP_FIRST_SPECIAL_ENCHANTABLE = EQUIP_SINGLE_HANDED,
EQUIP_LAST_SPECIAL_ENCHANTABLE = EQUIP_AMULET,

EQUIP_FIRST_NORMAL_ENCHANTABLE = EQUIP_ARMOUR,
EQUIP_LAST_NORMAL_ENCHANTABLE = EQUIP_AMULET,
ITEM_TYPE_SINGLE_HANDED = 0,
ITEM_TYPE_TWO_HANDED = 1,
ITEM_TYPE_BOW = 2,
ITEM_TYPE_ARMOUR = 3,
ITEM_TYPE_SHIELD = 4,
ITEM_TYPE_HELMET = 5,
ITEM_TYPE_BELT = 6,
ITEM_TYPE_CLOAK = 7,
ITEM_TYPE_GAUNTLETS = 8,
ITEM_TYPE_BOOTS = 9,
ITEM_TYPE_RING = 10,
ITEM_TYPE_AMULET = 11,
ITEM_TYPE_WAND = 12,
ITEM_TYPE_REAGENT = 13,
ITEM_TYPE_POTION = 14,
ITEM_TYPE_SPELL_SCROLL = 15,
ITEM_TYPE_BOOK = 16,
ITEM_TYPE_MESSAGE_SCROLL = 17,
ITEM_TYPE_GOLD = 18,
ITEM_TYPE_GEM = 19,
ITEM_TYPE_NONE = 20, // Ores, quest items.

ITEM_TYPE_FIRST = ITEM_TYPE_SINGLE_HANDED,
ITEM_TYPE_LAST = ITEM_TYPE_NONE,

ITEM_TYPE_FIRST_SPECIAL_ENCHANTABLE = ITEM_TYPE_SINGLE_HANDED,
ITEM_TYPE_LAST_SPECIAL_ENCHANTABLE = ITEM_TYPE_AMULET,

ITEM_TYPE_FIRST_NORMAL_ENCHANTABLE = ITEM_TYPE_ARMOUR,
ITEM_TYPE_LAST_NORMAL_ENCHANTABLE = ITEM_TYPE_AMULET,
};
using enum ItemType;

Expand All @@ -1222,7 +1222,7 @@ using enum ItemType;
* armor, rings, amulets, etc.
*/
inline bool isPassiveEquipment(ItemType type) {
return type >= EQUIP_ARMOUR && type <= EQUIP_AMULET;
return type >= ITEM_TYPE_ARMOUR && type <= ITEM_TYPE_AMULET;
}

/**
Expand All @@ -1231,7 +1231,7 @@ inline bool isPassiveEquipment(ItemType type) {
* equipment except amulets and rings.
*/
inline bool isArmor(ItemType type) {
return type >= EQUIP_ARMOUR && type <= EQUIP_BOOTS;
return type >= ITEM_TYPE_ARMOUR && type <= ITEM_TYPE_BOOTS;
}

/**
Expand All @@ -1240,7 +1240,7 @@ inline bool isArmor(ItemType type) {
* considered weapons.
*/
inline bool isWeapon(ItemType type) {
return type >= EQUIP_SINGLE_HANDED && type <= EQUIP_BOW;
return type >= ITEM_TYPE_SINGLE_HANDED && type <= ITEM_TYPE_BOW;
}

/**
Expand Down
10 changes: 5 additions & 5 deletions src/Engine/Objects/Items.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ std::string ItemGen::GetDisplayName() {
//----- (004564B3) --------------------------------------------------------
std::string ItemGen::GetIdentifiedName() {
ItemType equip_type = GetItemEquipType();
if ((equip_type == EQUIP_REAGENT) || (equip_type == EQUIP_POTION) ||
(equip_type == EQUIP_GOLD)) {
if ((equip_type == ITEM_TYPE_REAGENT) || (equip_type == ITEM_TYPE_POTION) ||
(equip_type == ITEM_TYPE_GOLD)) {
return pItemTable->pItems[uItemID].name;
}

Expand Down Expand Up @@ -688,7 +688,7 @@ bool ItemGen::IsRegularEnchanmentForAttribute(CharacterAttributeType attrToGet)
ItemType ItemGen::GetItemEquipType() const {
// to avoid nzi - is this safe??
if (this->uItemID == ITEM_NULL)
return EQUIP_NONE;
return ITEM_TYPE_NONE;
else
return pItemTable->pItems[this->uItemID].uEquipType;
}
Expand Down Expand Up @@ -725,14 +725,14 @@ std::string GetItemTextureFilename(ItemId item_id, int index, int shoulder) {
int texture_id = std::to_underlying(valueOr(itemTextureIdByItemId, item_id, item_id));

switch (pItemTable->pItems[item_id].uEquipType) {
case EQUIP_ARMOUR:
case ITEM_TYPE_ARMOUR:
if (shoulder == 0)
return fmt::format("item{:03}v{}", texture_id, index);
else if (shoulder == 1)
return fmt::format("item{:03}v{}a1", texture_id, index);
else // shoulder == 2
return fmt::format("item{:03}v{}a2", texture_id, index);
case EQUIP_CLOAK:
case ITEM_TYPE_CLOAK:
if (shoulder == 0)
return fmt::format("item{:03}v{}", texture_id, index);
else // shoulder == 1
Expand Down
20 changes: 10 additions & 10 deletions src/Engine/Objects/Items.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,32 +67,32 @@ struct ItemGen { // 0x24
bool canSellRepairIdentifyAt(HouseId houseId);

bool isGold() const {
return GetItemEquipType() == EQUIP_GOLD;
return GetItemEquipType() == ITEM_TYPE_GOLD;
}
bool isShield() const {
return GetItemEquipType() == EQUIP_SHIELD;
return GetItemEquipType() == ITEM_TYPE_SHIELD;
}
bool isWand() const {
return GetItemEquipType() == EQUIP_WAND;
return GetItemEquipType() == ITEM_TYPE_WAND;
}
bool isPotion() const {
return GetItemEquipType() == EQUIP_POTION;
return GetItemEquipType() == ITEM_TYPE_POTION;
}
bool isBook() const {
return GetItemEquipType() == EQUIP_BOOK;
return GetItemEquipType() == ITEM_TYPE_BOOK;
}
bool isReagent() const {
return GetItemEquipType() == EQUIP_REAGENT;
return GetItemEquipType() == ITEM_TYPE_REAGENT;
}
bool isSpellScroll() const {
return GetItemEquipType() == EQUIP_SPELL_SCROLL;
return GetItemEquipType() == ITEM_TYPE_SPELL_SCROLL;
}
bool isMessageScroll() const {
return GetItemEquipType() == EQUIP_MESSAGE_SCROLL;
return GetItemEquipType() == ITEM_TYPE_MESSAGE_SCROLL;
}

bool isMeleeWeapon() const {
return GetItemEquipType() == EQUIP_SINGLE_HANDED || GetItemEquipType() == EQUIP_TWO_HANDED;
return GetItemEquipType() == ITEM_TYPE_SINGLE_HANDED || GetItemEquipType() == ITEM_TYPE_TWO_HANDED;
}
bool isWeapon() const {
return ::isWeapon(GetItemEquipType());
Expand Down Expand Up @@ -132,7 +132,7 @@ struct ItemDesc { // 30h
int16_t field_1A = 0; // 16
int16_t uEquipX = 0; // 18 1c
int16_t uEquipY = 0; // 1a 1e
ItemType uEquipType = EQUIP_NONE; // 1c 20
ItemType uEquipType = ITEM_TYPE_NONE; // 1c 20
CharacterSkillType uSkillType = CHARACTER_SKILL_MISC; // 1d 21
uint8_t uDamageDice = 0; // 1e 22
uint8_t uDamageRoll = 0; // 1f 23
Expand Down
2 changes: 1 addition & 1 deletion src/Engine/SaveLoad.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ void LoadGame(unsigned int uSlot) {
int pItemID = pParty->pCharacters[i]
.pInventoryItemList[uEquipIdx - 1]
.uItemID;
if (pItemTable->pItems[pItemID].uEquipType == EQUIP_WAND &&
if (pItemTable->pItems[pItemID].uEquipType == ITEM_TYPE_WAND &&
pItemID) { // жезл
__debugbreak(); // looks like offset in player's inventory
// and wand_lut much like case in 0042ECB5
Expand Down
Loading

0 comments on commit ace7c53

Please sign in to comment.