Skip to content

Commit 4d5bc51

Browse files
committed
Change items_size -> item_ids count field
1 parent 914b8e2 commit 4d5bc51

4 files changed

Lines changed: 7 additions & 9 deletions

File tree

generator/csv/fields.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -884,7 +884,7 @@ SaveActor,super_guard,f,Boolean,0x5F,False,0,1,bool
884884
SaveActor,battler_animation,f,Ref<BattlerAnimation>,0x60,0,0,1,Integer - RPG2003
885885
SaveInventory,party_size,f,Int32,0x01,-1,0,0,?
886886
SaveInventory,party,f,Vector<Int16>,0x02,,1,0,?
887-
SaveInventory,items_size,f,Int32,0x0B,-1,0,0,?
887+
SaveInventory,item_ids,t,Count<Int16>,0x0B,0,1,0,?
888888
SaveInventory,item_ids,f,Vector<Int16>,0x0C,,1,0,short[]: item list
889889
SaveInventory,item_counts,f,Vector<UInt8>,0x0D,,1,0,?
890890
SaveInventory,item_usage,f,Vector<UInt8>,0x0E,,1,0,?

src/generated/lsd_chunks.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ namespace LSD_Reader {
585585
/** ? */
586586
party = 0x02,
587587
/** ? */
588-
items_size = 0x0B,
588+
item_ids_size = 0x0B,
589589
/** short[]: item list */
590590
item_ids = 0x0C,
591591
/** ? */

src/generated/lsd_saveinventory.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,10 @@ Field<RPG::SaveInventory> const* Struct<RPG::SaveInventory>::fields[] = {
3535
1,
3636
0
3737
),
38-
new TypedField<RPG::SaveInventory, int32_t>(
39-
&RPG::SaveInventory::items_size,
40-
LSD_Reader::ChunkSaveInventory::items_size,
41-
"items_size",
42-
0,
38+
new CountField<RPG::SaveInventory, int16_t>(
39+
&RPG::SaveInventory::item_ids,
40+
LSD_Reader::ChunkSaveInventory::item_ids_size,
41+
1,
4342
0
4443
),
4544
new TypedField<RPG::SaveInventory, std::vector<int16_t>>(

src/generated/rpg_saveinventory.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ namespace RPG {
2525
void Setup();
2626
int32_t party_size = -1;
2727
std::vector<int16_t> party;
28-
int32_t items_size = -1;
2928
std::vector<int16_t> item_ids;
3029
std::vector<uint8_t> item_counts;
3130
std::vector<uint8_t> item_usage;
@@ -49,7 +48,7 @@ namespace RPG {
4948
inline bool operator==(const SaveInventory& l, const SaveInventory& r) {
5049
return l.party_size == r.party_size
5150
&& l.party == r.party
52-
&& l.items_size == r.items_size
51+
&& l.item_ids == r.item_ids
5352
&& l.item_ids == r.item_ids
5453
&& l.item_counts == r.item_counts
5554
&& l.item_usage == r.item_usage

0 commit comments

Comments
 (0)