sort bank contents before sending to client

This commit is contained in:
Martin Michelsen
2023-12-04 18:43:37 -08:00
parent 33bbb15bf0
commit 2360beb77b
5 changed files with 29 additions and 1 deletions
+6
View File
@@ -111,13 +111,17 @@ struct ItemData { // 0x14 bytes
union {
parray<uint8_t, 12> data1;
parray<le_uint16_t, 6> data1w;
parray<be_uint16_t, 6> data1wb;
parray<le_uint32_t, 3> data1d;
parray<be_uint32_t, 3> data1db;
} __attribute__((packed));
le_uint32_t id;
union {
parray<uint8_t, 4> data2;
parray<le_uint16_t, 2> data2w;
parray<be_uint16_t, 2> data2wb;
le_uint32_t data2d;
be_uint32_t data2db;
} __attribute__((packed));
ItemData();
@@ -128,6 +132,8 @@ struct ItemData { // 0x14 bytes
bool operator==(const ItemData& other) const;
bool operator!=(const ItemData& other) const;
bool operator<(const ItemData& other) const;
void clear();
static ItemData from_data(const std::string& data);