From 19af4481c08d44fe4bff85eb4662bfb559c4dbfb Mon Sep 17 00:00:00 2001 From: Archez Date: Tue, 20 Feb 2024 09:31:24 -0500 Subject: [PATCH 1/2] fix object unload using wrong index (#3949) --- soh/soh/z_scene_otr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/soh/soh/z_scene_otr.cpp b/soh/soh/z_scene_otr.cpp index 33104326e..be1840ecd 100644 --- a/soh/soh/z_scene_otr.cpp +++ b/soh/soh/z_scene_otr.cpp @@ -178,7 +178,7 @@ bool Scene_CommandObjectList(PlayState* play, LUS::ISceneCommand* cmd) { // Loop until a mismatch in the object lists // Then clear all object ids past that in the context object list and kill actors for those objects for (i = play->objectCtx.unk_09, k = 0; i < play->objectCtx.num; i++, k++) { - if (i >= cmdObj->objects.size() || play->objectCtx.status[i].id != cmdObj->objects[k]) { + if (k >= cmdObj->objects.size() || play->objectCtx.status[i].id != cmdObj->objects[k]) { for (j = i; j < play->objectCtx.num; j++) { play->objectCtx.status[j].id = OBJECT_INVALID; } From ef9fc0a9ec8716201dfaeb2d28d059171a066b7a Mon Sep 17 00:00:00 2001 From: Archez Date: Tue, 20 Feb 2024 09:38:10 -0500 Subject: [PATCH 2/2] fix endianess issue with camera setting data (#3950) --- soh/src/code/z_camera_data.inc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/soh/src/code/z_camera_data.inc b/soh/src/code/z_camera_data.inc index b9e0ba864..90b1874c7 100644 --- a/soh/src/code/z_camera_data.inc +++ b/soh/src/code/z_camera_data.inc @@ -16,9 +16,11 @@ typedef struct { union { u32 unk_00; struct { - u32 unk_bit0 : 1; - u32 unk_bit1 : 1; - u32 validModes : 30; + // SoH [Port] These bitfield values are unused and led to shifting in validModes for little endian systems + // Removing those so that validModes can be a complete 32 bit value + // u32 unk_bit0 : 1; + // u32 unk_bit1 : 1; + u32 validModes; }; }; CameraMode* cameraModes;