1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-21 06:21:16 +00:00

Doc misc 5 (#1223)

* Annotate global equip and upgrade masks data

* Trivial respawn doc stuff

Move the respawn mode enum up to use the _MAX enum value in the save context struct

* Comment on the `sceneFlags[127]` debug-strings-suggested out-of-bounds access

* Reword `room_inf[127]` comments (attempt)
This commit is contained in:
Dragorn421 2022-05-17 00:14:08 +02:00 committed by GitHub
parent d4b6b31b15
commit f6c472ae5e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 108 additions and 51 deletions

View file

@ -1406,8 +1406,14 @@ void func_80A053F0(Actor* thisx, GlobalContext* globalCtx) {
} else {
this->actionFunc(this, globalCtx);
thisx->shape.rot.y = this->unk_2BC;
nREG(80) = HIGH_SCORE(HS_HBA);
// `gSaveContext.sceneFlags[127].chest` (like in the debug string) instead of `HIGH_SCORE(HS_HBA)` matches too,
// but, with how the `SaveContext` struct is currently defined, it is an out-of-bounds read in the `sceneFlags`
// array.
// It is theorized the original `room_inf` (currently `sceneFlags`) was an array of length 128, not broken up
// like currently into structs. Structs are currently used because they're easier to work with and still match.
// There is another occurrence of this elsewhere.
nREG(80) = HIGH_SCORE(HS_HBA);
if ((nREG(81) != 0) && (HIGH_SCORE(HS_HBA) != 0)) {
LOG_NUM("z_common_data.memory.information.room_inf[127][ 0 ]", HIGH_SCORE(HS_HBA), "../z_en_elf.c", 2595);
}