Browse Source

🚚 Rename 'item_type' enum to 'ItemType'

pull/2862/head
Juliano Leal Goncalves 5 years ago committed by Anders Jenbo
parent
commit
6323539fcc
  1. 4
      Source/itemdat.h
  2. 2
      Source/items.cpp
  3. 2
      Source/items.h
  4. 2
      Source/loadsave.cpp

4
Source/itemdat.h

@ -222,7 +222,7 @@ enum item_cursor_graphic : uint8_t {
// clang-format on
};
enum item_type : int8_t {
enum ItemType : int8_t {
ITYPE_MISC,
ITYPE_SWORD,
ITYPE_AXE,
@ -428,7 +428,7 @@ struct ItemData {
enum item_class iClass;
enum item_equip_type iLoc;
enum item_cursor_graphic iCurs;
enum item_type itype;
enum ItemType itype;
enum unique_base_item iItemId;
const char *iName;
const char *iSName;

2
Source/items.cpp

@ -2898,7 +2898,7 @@ void CalcPlrItemVals(Player &player, bool loadgfx)
player._pBlockFlag = true;
}
item_type weaponItemType = item_type::ITYPE_NONE;
ItemType weaponItemType = ItemType::ITYPE_NONE;
bool holdsShield = false;
if (!player.InvBody[INVLOC_HAND_LEFT].isEmpty()
&& player.InvBody[INVLOC_HAND_LEFT]._iClass == ICLASS_WEAPON

2
Source/items.h

@ -175,7 +175,7 @@ struct Item {
/** Randomly generated identifier */
int32_t _iSeed;
uint16_t _iCreateInfo;
enum item_type _itype;
enum ItemType _itype;
Point position;
bool _iAnimFlag;
/*

2
Source/loadsave.cpp

@ -212,7 +212,7 @@ void LoadItemData(LoadHelper &file, Item &item)
item._iSeed = file.NextLE<int32_t>();
item._iCreateInfo = file.NextLE<uint16_t>();
file.Skip(2); // Alignment
item._itype = static_cast<item_type>(file.NextLE<uint32_t>());
item._itype = static_cast<ItemType>(file.NextLE<uint32_t>());
item.position.x = file.NextLE<int32_t>();
item.position.y = file.NextLE<int32_t>();
item._iAnimFlag = file.NextBool32();

Loading…
Cancel
Save