Conversation
There was a problem hiding this comment.
GitHub merges got messy so I'm only reviewing unk_02097268 and trusting that other changes were from previous PRs.
Just a few suggestions, then you need to deal with merge conflicts and it should be good to go.
Also: Are there any holdbacks in naming this safari_zone_objects.c?
| SafariZone *safariZone = Save_SafariZone_Get(saveData); | ||
| SAFARIZONE_AREASET *areaSet = SafariZone_GetAreaSet(safariZone, 0); | ||
|
|
||
| static const u16 ffff = 0xFFFF; |
There was a problem hiding this comment.
needed to match
| int i; | ||
| int j; | ||
| int numAreas; | ||
| ENC_SLOT *allEncounterSlots[SAFARI_ZONE_MAX_AREAS_PER_SET][NUM_SAFARI_ENCOUNTER_TYPES]; |
There was a problem hiding this comment.
ENC_SLOT -> EncounterSlot
Didn't this get fixed in the last PR?
There was a problem hiding this comment.
fixed by resolving conflicts
| u8 areas[SAFARI_ZONE_MAX_AREAS_PER_SET]; | ||
| PhoneCallPersistentState *callPersistentState = SaveData_GetPhoneCallPersistentState(saveData); | ||
| SafariZone *safariZone = Save_SafariZone_Get(saveData); | ||
| SAFARIZONE_AREASET *areaSet = SafariZone_GetAreaSet(safariZone, 0); |
There was a problem hiding this comment.
SAFARIZONE_AREASET -> SafariZoneAreaSet
| for (i = 0; i < SAFARI_ZONE_MAX_AREAS_PER_SET; ++i) { | ||
| // (((ffff >> i) & 1) * 4) + 1 | ||
| // fancy way of saying | ||
| // mapHasWater ? 5 : 1 |
There was a problem hiding this comment.
Does this not match if you make i (and maybe j) into an 8 bit? This seems like it isn't the written code even if gamefreak does do weird stuff sometimes.
There was a problem hiding this comment.
it does not match by any simpler method. i did use the leaks to guide this, it's actually from a scrapped feature
| ret[i].level_max = ret[i].level_min = slot->level; | ||
| } | ||
|
|
||
| { |
There was a problem hiding this comment.
Is the scope required to match?
There was a problem hiding this comment.
turns out, it's not
adrienntindall
left a comment
There was a problem hiding this comment.
Gamefreak's kind of wild for this one
Safari zone objects code
Must come after #444