Add SaveInfo substruct to SaveContext (#1191)

* SaveInfo

* fix accesses in sram_NES.c

* some more fixing

* more fixes

* format

* fix unk

* namefixer

* format

* bss

* review

* weekeventregconvert

* namefixer

* bss
This commit is contained in:
Anghelo Carvajal
2023-04-18 18:54:32 -04:00
committed by GitHub
parent b8af819165
commit 3c107cb148
81 changed files with 1126 additions and 1051 deletions
+1 -1
View File
@@ -404,7 +404,7 @@ There remains one thing we need to fix before trying to compile it, namely `*(&g
/* 0x0F5C */ u32 regionsVisited; // "area_arrival"
```
so it's somewhere in `weekEventReg`. `0xF37 - 0xEF8 = 0x3F = 63`, and it's a byte array, so the access is actually `gSaveContext.save.weekEventReg[63] & 0x80`. Now it will compile. We also don't use `!= 0` for flag comparisons: just `if (gSaveContext.save.weekEventReg[63] & 0x80)` will do.
so it's somewhere in `weekEventReg`. `0xF37 - 0xEF8 = 0x3F = 63`, and it's a byte array, so the access is actually `gSaveContext.save.saveInfo.weekEventReg[63] & 0x80`. Now it will compile. We also don't use `!= 0` for flag comparisons: just `if (gSaveContext.save.saveInfo.weekEventReg[63] & 0x80)` will do.
Running `./diff.py -mwo3 func_80C102D4` and scrolling down, we discover that this doesn't match!