92% match Inventory::Save

This commit is contained in:
Aetias
2023-12-27 13:22:21 +01:00
parent e5cfa5950c
commit 7fb155ff77
2 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -42,7 +42,7 @@ MW_LD := $(TOOLS_DIR)/mwccarm/$(MW_VER)/mwldarm.exe
MW_LICENSE := $(TOOLS_DIR)/mwccarm/license.dat
ASM_FLAGS := -proc arm5te -d $(REGION) -i asm -msgstyle gcc
CC_FLAGS := -O2 -enum int -i include -nolink -d $(REGION)
CC_FLAGS := -O2 -enum int -i include -nolink -d $(REGION) -char signed
LD_FLAGS := -proc arm946e -nostdlib -interworking -nodead -m Entry -map closure,unused -o main.bin -msgstyle gcc
ifeq ($(NONMATCHING),1)
+4 -3
View File
@@ -39,11 +39,12 @@ NONMATCH void Inventory::Save(SaveInventory *save) {
for (s32 i = 0; i < Gem_COUNT; ++i) {
save->numGems[i] = this->mNumGems[i];
}
for (s32 i = 0; i < ShipPart_COUNT; ++i) {
for (s32 i = 0, j = 0; i < ShipPart_COUNT; ++i, j = 0) {
save->equippedShipParts[i] = this->mEquippedShipParts[i];
for (s32 j = 0; j < ShipType_COUNT; ++j) {
do {
save->shipParts[i].parts[j] = this->mShipParts[i].parts[j];
}
++j;
} while (j < ShipType_COUNT);
}
save->shipPartPricesShown = this->mShipPartPricesShown;
for (s32 i = 0; i < Treasure_COUNT; ++i) {