Merge remote-tracking branch 'origin/dev' into console-rework

This commit is contained in:
EmeraldLockdown 2026-03-25 22:39:56 -05:00
commit 13373ba74a
4 changed files with 12 additions and 11 deletions

View file

@ -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);

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;