Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
4 changes: 4 additions & 0 deletions include/sm64.h
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,10 @@ enum MarioActionFlags {
ACT_FLAG_THROWING = /* 0x80000000 */ (1 << 31),
};

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

#define ACT_UNINITIALIZED 0x00000000 // (0x000)

// group 0x000: stationary actions
Expand Down
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
Loading