Skip to content
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/game/mario.c
Original file line number Diff line number Diff line change
Expand Up @@ -966,7 +966,7 @@ u32 set_mario_action(struct MarioState *m, u32 action, u32 actionArg) {
m->actionState = 0;
m->actionTimer = 0;

return TRUE;
return ACTION_CONTINUE;
}

/**
Expand Down Expand Up @@ -1021,7 +1021,7 @@ s32 set_jump_from_landing(struct MarioState *m) {

m->doubleJumpTimer = 0;

return TRUE;
return ACTION_CONTINUE;
}

/**
Expand All @@ -1044,7 +1044,7 @@ s32 set_jumping_action(struct MarioState *m, u32 action, u32 actionArg) {
set_mario_action(m, action, actionArg);
}

return TRUE;
return ACTION_CONTINUE;
}

/**
Expand Down Expand Up @@ -1083,7 +1083,7 @@ s32 check_common_action_exits(struct MarioState *m) {
return set_mario_action(m, ACT_BEGIN_SLIDING, 0);
}

return FALSE;
return ACTION_FINISH;
}

/**
Expand All @@ -1095,7 +1095,7 @@ s32 check_common_hold_action_exits(struct MarioState *m) {
if (m->input & INPUT_OFF_FLOOR ) return set_mario_action(m, ACT_HOLD_FREEFALL, 0);
if (m->input & INPUT_NONZERO_ANALOG) return set_mario_action(m, ACT_HOLD_WALKING, 0);
if (m->input & INPUT_ABOVE_SLIDE ) return set_mario_action(m, ACT_HOLD_BEGIN_SLIDING, 0);
return FALSE;
return ACTION_FINISH;
}

/**
Expand Down
5 changes: 5 additions & 0 deletions src/game/mario.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
#include "macros.h"
#include "types.h"

// Continues running action logic, e.g. after Mario's action changes
#define ACTION_CONTINUE TRUE
// Finishes running action logic for the current frame
#define ACTION_FINISH FALSE

Comment thread
gheskett marked this conversation as resolved.
Outdated
s32 is_anim_at_end(struct MarioState *m);
s32 is_anim_past_end(struct MarioState *m);
s16 set_mario_animation(struct MarioState *m, s32 targetAnimID);
Expand Down
Loading