fix ToolV4 structure
This commit is contained in:
@@ -381,7 +381,7 @@ const ItemParameterTable::ToolV4& ItemParameterTable::get_tool(uint8_t data1_1,
|
|||||||
def_v4.amount = def_v3.amount.load();
|
def_v4.amount = def_v3.amount.load();
|
||||||
def_v4.tech = def_v3.tech.load();
|
def_v4.tech = def_v3.tech.load();
|
||||||
def_v4.cost = def_v3.cost.load();
|
def_v4.cost = def_v3.cost.load();
|
||||||
def_v4.item_flag = def_v3.item_flag;
|
def_v4.item_flag = def_v3.item_flag.load();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
throw logic_error("table is not v2, v3, or v4");
|
throw logic_error("table is not v2, v3, or v4");
|
||||||
|
|||||||
@@ -207,12 +207,12 @@ public:
|
|||||||
struct Tool {
|
struct Tool {
|
||||||
using U16T = typename std::conditional<IsBigEndian, be_uint16_t, le_uint16_t>::type;
|
using U16T = typename std::conditional<IsBigEndian, be_uint16_t, le_uint16_t>::type;
|
||||||
using S32T = typename std::conditional<IsBigEndian, be_int32_t, le_int32_t>::type;
|
using S32T = typename std::conditional<IsBigEndian, be_int32_t, le_int32_t>::type;
|
||||||
|
using U32T = typename std::conditional<IsBigEndian, be_uint32_t, le_uint32_t>::type;
|
||||||
BaseT base;
|
BaseT base;
|
||||||
U16T amount = 0;
|
U16T amount = 0;
|
||||||
U16T tech = 0;
|
U16T tech = 0;
|
||||||
S32T cost = 0;
|
S32T cost = 0;
|
||||||
uint8_t item_flag = 0;
|
U32T item_flag = 0;
|
||||||
parray<uint8_t, 3> unused;
|
|
||||||
} __attribute__((packed));
|
} __attribute__((packed));
|
||||||
struct ToolV2 : Tool<ItemBaseV2<false>, false> {
|
struct ToolV2 : Tool<ItemBaseV2<false>, false> {
|
||||||
} __attribute__((packed));
|
} __attribute__((packed));
|
||||||
|
|||||||
Reference in New Issue
Block a user