splat update

This commit is contained in:
Ethan Roseman 2020-10-12 14:46:04 -04:00
parent 508df201dc
commit 3aa854c0c5
3 changed files with 19 additions and 8 deletions

View File

@ -70,6 +70,9 @@ submodules:
split:
rm -rf $(DATA_DIRS) && ./tools/n64splat/split.py baserom.z64 tools/splat.yaml .
splitld: tools/splat.yaml
./tools/n64splat/split.py baserom.z64 tools/splat.yaml . --modes ld
setup: clean submodules split
print-% : ; $(info $* is a $(flavor $*) variable set to [$($*)]) @true

View File

@ -9,14 +9,22 @@ s32 get_defeated(s32 mapID, s32 encounterID) {
}
void set_defeated(s32 mapID, s32 encounterID) {
EncounterStatus* currentEncounter = &gCurrentEncounter;
s32 encounterIdx;
EncounterStatus *currentEncounter = &gCurrentEncounter;
s32 encounterIdx = encounterID / 32;
s32 encounterShift;
encounterIdx = encounterID / 32;
encounterShift = encounterID % 32;
currentEncounter->defeatFlags[mapID][encounterIdx] |= (1 << encounterShift);
s32 flag;
flag = encounterID % 32;
encounterShift = flag;
flag = currentEncounter->defeatFlags[mapID][encounterIdx];
currentEncounter->defeatFlags[mapID][encounterIdx] = flag | (1 << encounterShift);
// TODO: The below should work but has regalloc issues:
/*EncounterStatus *currentEncounter = &gCurrentEncounter;
s32 encounterIdx = encounterID / 32;
s32 encounterShift = encounterID % 32;
currentEncounter->defeatFlags[mapID][encounterIdx] |= (1 << encounterShift);*/
}
INCLUDE_ASM(s32, "code_1a1f0_len_5390", func_8003EE98);

@ -1 +1 @@
Subproject commit 5d0ddef55b38563641d40dea7d0f662c1025e638
Subproject commit fce3c8907426d99597dd401f2843a9f54b199a31