From b5d021b231492c1f921ea8af2570a5d86550e2fc Mon Sep 17 00:00:00 2001 From: Isaac0-dev <62234577+Isaac0-dev@users.noreply.github.com> Date: Tue, 24 Mar 2026 10:10:11 +1000 Subject: [PATCH 1/2] fixed dynos animations on held objects [build] --- data/dynos_mgr_anim.cpp | 4 ++-- src/engine/graph_node.c | 2 +- src/game/mario_misc.c | 16 ++++++++-------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/data/dynos_mgr_anim.cpp b/data/dynos_mgr_anim.cpp index af7f319f4..21db5f690 100644 --- a/data/dynos_mgr_anim.cpp +++ b/data/dynos_mgr_anim.cpp @@ -8,7 +8,7 @@ extern "C" { #include "behavior_data.h" #include "pc/lua/smlua_hooks.h" -s8 geo_get_processing_mario_index(void); +s8 geo_get_processing_mario_index(struct Object *obj); } // @@ -77,7 +77,7 @@ void DynOS_Anim_Swap(void *aPtr) { // Animation index s32 _AnimIndex = -1; - s8 index = geo_get_processing_mario_index(); + s8 index = geo_get_processing_mario_index(_Object); if (index != -1) { _AnimIndex = RetrieveCurrentMarioAnimationIndex(index); diff --git a/src/engine/graph_node.c b/src/engine/graph_node.c index c9c0023f6..89d9126cb 100644 --- a/src/engine/graph_node.c +++ b/src/engine/graph_node.c @@ -508,7 +508,7 @@ struct GraphNodeBackground *init_graph_node_background(struct DynamicPool *pool, : (backgroundFunc && background >= BACKGROUND_CUSTOM); if (invalidBackground) { - LOG_ERROR("invalid background id"); + LOG_ERROR("invalid background id %d", background); background = BACKGROUND_HAUNTED; } diff --git a/src/game/mario_misc.c b/src/game/mario_misc.c index 7cb509211..435863e2f 100644 --- a/src/game/mario_misc.c +++ b/src/game/mario_misc.c @@ -334,13 +334,13 @@ static Gfx *make_gfx_mario_alpha(struct GraphNodeGenerated *node, s16 alpha) { } // Calculates if the processing geo is a mirror mario -static s8 geo_get_processing_mirror_mario_index() { - ptrdiff_t ptrDiff = (struct GraphNodeObject *) gCurGraphNodeProcessingObject - gMirrorMario; +static s8 geo_get_processing_mirror_mario_index(struct Object *obj) { + ptrdiff_t ptrDiff = (struct GraphNodeObject *) obj - gMirrorMario; return (ptrDiff >= 0 && ptrDiff < MAX_PLAYERS) ? ptrDiff : -1; } static u8 geo_get_processing_object_index(void) { - s8 index = geo_get_processing_mirror_mario_index(); + s8 index = geo_get_processing_mirror_mario_index(gCurGraphNodeProcessingObject); if (index != -1) { return index; } @@ -351,19 +351,19 @@ static u8 geo_get_processing_object_index(void) { return (index >= MAX_PLAYERS) ? 0 : index; } -s8 geo_get_processing_mario_index(void) { - if (gCurGraphNodeProcessingObject == NULL) { return -1; } +s8 geo_get_processing_mario_index(struct Object *obj) { + if (obj == NULL) { return -1; } - s8 index = geo_get_processing_mirror_mario_index(); + s8 index = geo_get_processing_mirror_mario_index(obj); if (index != -1) { return index; } - if (gCurGraphNodeProcessingObject->behavior != bhvMario) { + if (obj->behavior != bhvMario) { return -1; } - index = gCurGraphNodeProcessingObject->oBehParams - 1; + index = obj->oBehParams - 1; return (index >= MAX_PLAYERS) ? -1 : index; } From 43c697edf7e9c6b984f58e1c7bc23ebb154675ed Mon Sep 17 00:00:00 2001 From: EmeraldLockdown <86802223+EmeraldLoc@users.noreply.github.com> Date: Wed, 25 Mar 2026 21:52:21 -0500 Subject: [PATCH 2/2] Fix issue with mouse buttons being applied to pad (#1156) --- src/pc/controller/controller_sdl2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pc/controller/controller_sdl2.c b/src/pc/controller/controller_sdl2.c index 95dafbed1..251d8a85f 100644 --- a/src/pc/controller/controller_sdl2.c +++ b/src/pc/controller/controller_sdl2.c @@ -196,6 +196,7 @@ static void controller_sdl_read(OSContPad *pad) { if (mouse & SDL_BUTTON(mouse_binds[i][0])) buttons_down |= mouse_binds[i][1]; } + pad->button |= buttons_down; // remember buttons that changed from 0 to 1 last_mouse = (mouse_prev ^ mouse) & mouse;