mirror of
https://github.com/pmret/papermario.git
synced 2024-11-08 20:12:30 +01:00
Renames for documentation purposes (#864)
* Renames for documentation purposes * Change wording (CANT_CHANGE_PARTNER => PARTNER_CHANGE_DISABLED) * Renaming (behaviour => behavior) and TRUE/FALSE * Remove unnecessary false comparison * Address review comments
This commit is contained in:
parent
f63ffa7e95
commit
25e4f67adb
105
include/enums.h
105
include/enums.h
@ -3315,39 +3315,61 @@ enum PlayerStatusFlags {
|
|||||||
PS_FLAGS_JUMPING = 0x00000002,
|
PS_FLAGS_JUMPING = 0x00000002,
|
||||||
PS_FLAGS_FALLING = 0x00000004,
|
PS_FLAGS_FALLING = 0x00000004,
|
||||||
PS_FLAGS_FLYING = 0x00000008,
|
PS_FLAGS_FLYING = 0x00000008,
|
||||||
PS_FLAGS_10 = 0x00000010,
|
PS_FLAGS_SLIDING = 0x00000010,
|
||||||
PS_FLAGS_20 = 0x00000020,
|
/* Paused either via the start menu, or through another menu that causes a pause (like the item menu) */
|
||||||
PS_FLAGS_40 = 0x00000040,
|
PS_FLAGS_PAUSED = 0x00000020,
|
||||||
PS_FLAGS_80 = 0x00000080,
|
PS_FLAGS_NO_CHANGE_PARTNER = 0x00000040,
|
||||||
PS_FLAGS_100 = 0x00000100,
|
PS_FLAGS_NO_PARTNER_USAGE = 0x00000080,
|
||||||
PS_FLAGS_200 = 0x00000200,
|
/* Prevents opening menus that would require a game-time pause (start menu, item menu, etc) */
|
||||||
PS_FLAGS_400 = 0x00000400,
|
PS_FLAGS_PAUSE_DISABLED = 0x00000100,
|
||||||
PS_FLAGS_800 = 0x00000800,
|
/* Doing either a spin jump or a tornado jump */
|
||||||
PS_FLAGS_1000 = 0x00001000,
|
PS_FLAGS_SPECIAL_JUMP = 0x00000200,
|
||||||
|
/* Landing from either a spin jump or a tornado jump */
|
||||||
|
PS_FLAGS_SPECIAL_LAND = 0x00000400,
|
||||||
|
/* Burning from touching a fire hazard of some kind */
|
||||||
|
PS_FLAGS_HIT_FIRE = 0x00000800,
|
||||||
|
PS_FLAGS_NO_STATIC_COLLISION = 0x00001000,
|
||||||
PS_FLAGS_INPUT_DISABLED = 0x00002000,
|
PS_FLAGS_INPUT_DISABLED = 0x00002000,
|
||||||
PS_FLAGS_4000 = 0x00004000,
|
/* Indicates that Mario's lateral movement is currently commandeered by a cutscene or script */
|
||||||
PS_FLAGS_8000 = 0x00008000,
|
PS_FLAGS_CUTSCENE_MOVEMENT = 0x00004000,
|
||||||
PS_FLAGS_20000 = 0x00020000, // spinning?
|
/* Either outta sight with Bow, or temporarily damage boosted - makes Mario ignore fire bars */
|
||||||
PS_FLAGS_40000 = 0x00040000, // physics and animations run at half speed
|
PS_FLAGS_HAZARD_INVINCIBILITY = 0x00008000,
|
||||||
PS_FLAGS_80000 = 0x00080000,
|
/* Spinning either through pressing Z or the tornado jump - causes a ghost trail to render */
|
||||||
PS_FLAGS_100000 = 0x00100000,
|
PS_FLAGS_SPINNING = 0x00020000,
|
||||||
PS_FLAGS_200000 = 0x00200000, // using hammer?
|
/* Slows Mario's physics and animations to half speed - responsible for the dramatic slowdown when starting an encounter by jumping on an enemy.
|
||||||
PS_FLAGS_400000 = 0x00400000, // taking quiz?
|
Also stops Mario from successfully completing a hammer. */
|
||||||
PS_FLAGS_800000 = 0x00800000,
|
PS_FLAGS_ENTERING_BATTLE = 0x00040000,
|
||||||
PS_FLAGS_1000000 = 0x01000000,
|
/* Occurs after hitting a heart block - temporarily prevents encounters from starting */
|
||||||
|
PS_FLAGS_ARMS_RAISED = 0x00080000,
|
||||||
|
/* Stops Mario's sprite yaw from being adjusted, usually so a cutscene can do it instead. */
|
||||||
|
PS_FLAGS_ROTATION_LOCKED = 0x00100000,
|
||||||
|
/* Forces Mario's sprite to either face exactly left or right, without transitioning. */
|
||||||
|
PS_FLAGS_NO_FLIPPING = 0x00200000,
|
||||||
|
/* Prevents Mario from moving laterally */
|
||||||
|
PS_FLAGS_MOVEMENT_LOCKED = 0x00400000,
|
||||||
|
/* Stops Mario from air steering or using a special jump during a scripted fall */
|
||||||
|
PS_FLAGS_SCRIPTED_FALL = 0x00800000,
|
||||||
|
/* Not fully sure about this one, but appears to mark the frame that the check for what to hammer occurs */
|
||||||
|
PS_FLAGS_HAMMER_CHECK = 0x01000000,
|
||||||
PS_FLAGS_HAS_CONVERSATION_NPC = 0x02000000,
|
PS_FLAGS_HAS_CONVERSATION_NPC = 0x02000000,
|
||||||
PS_FLAGS_CAMERA_DOESNT_FOLLOW = 0x04000000,
|
PS_FLAGS_CAMERA_DOESNT_FOLLOW = 0x04000000,
|
||||||
PS_FLAGS_8000000 = 0x08000000,
|
/* Mario just interacted with something (usually cleared on the same frame) */
|
||||||
PS_FLAGS_10000000 = 0x10000000,
|
PS_FLAGS_INTERACTED = 0x08000000,
|
||||||
PS_FLAGS_20000000 = 0x20000000, // done hammer?
|
/* Makes Mario face forwards, used when talking to NPCs, or when on Lakilester */
|
||||||
PS_FLAGS_40000000 = 0x40000000,
|
PS_FLAGS_FACE_FORWARDS = 0x10000000,
|
||||||
|
/* Freezes physics and animations - is usually reset at the start of a frame so often does nothing */
|
||||||
|
PS_FLAGS_TIME_STOPPED = 0x20000000,
|
||||||
|
/* Indicates that Mario needs his sprite redrawn */
|
||||||
|
PS_FLAGS_SPRITE_REDRAW = 0x40000000,
|
||||||
PS_FLAGS_ACTION_STATE_CHANGED = 0x80000000,
|
PS_FLAGS_ACTION_STATE_CHANGED = 0x80000000,
|
||||||
};
|
};
|
||||||
|
|
||||||
/// @see PlayerStatus::animFlags
|
/// @see PlayerStatus::animFlags
|
||||||
enum PlayerStatusAnimFlags {
|
enum PlayerStatusAnimFlags {
|
||||||
PA_FLAGS_HOLDING_WATT = 0x00000001,
|
/* Whether Mario is in the process of using Watt (but isn't necessarily holding them yet) */
|
||||||
PA_FLAGS_2 = 0x00000002,
|
PA_FLAGS_USING_WATT = 0x00000001,
|
||||||
|
/* Whether Watt is actually in Mario's hands at the moment */
|
||||||
|
PA_FLAGS_WATT_IN_HANDS = 0x00000002,
|
||||||
PA_FLAGS_INTERRUPT_USE_PARTNER = 0x00000004, ///< forces actions with bow, parakarry, watt, and lakilester to end (sushie not tested)
|
PA_FLAGS_INTERRUPT_USE_PARTNER = 0x00000004, ///< forces actions with bow, parakarry, watt, and lakilester to end (sushie not tested)
|
||||||
PA_FLAGS_FORCE_USE_PARTNER = 0x00000008, ///< triggers partner use when set
|
PA_FLAGS_FORCE_USE_PARTNER = 0x00000008, ///< triggers partner use when set
|
||||||
PA_FLAGS_INTERACT_PROMPT_AVAILABLE = 0x00000010, ///< ! prompt
|
PA_FLAGS_INTERACT_PROMPT_AVAILABLE = 0x00000010, ///< ! prompt
|
||||||
@ -3357,26 +3379,35 @@ enum PlayerStatusAnimFlags {
|
|||||||
PA_FLAGS_100 = 0x00000100,
|
PA_FLAGS_100 = 0x00000100,
|
||||||
PA_FLAGS_RAISED_ARMS = 0x00000200, ///< Sets action state to ACTION_STATE_RAISE_ARMS on idle
|
PA_FLAGS_RAISED_ARMS = 0x00000200, ///< Sets action state to ACTION_STATE_RAISE_ARMS on idle
|
||||||
PA_FLAGS_SHIVERING = 0x00000400,
|
PA_FLAGS_SHIVERING = 0x00000400,
|
||||||
PA_FLAGS_800 = 0x00000800,
|
PA_FLAGS_OPENED_HIDDEN_PANEL = 0x00000800,
|
||||||
PA_FLAGS_USING_PEACH_PHYSICS = 0x00001000,
|
PA_FLAGS_USING_PEACH_PHYSICS = 0x00001000,
|
||||||
PA_FLAGS_IN_DISGUISE = 0x00002000,
|
PA_FLAGS_IN_DISGUISE = 0x00002000,
|
||||||
PA_FLAGS_8BIT_MARIO = 0x00004000,
|
PA_FLAGS_8BIT_MARIO = 0x00004000,
|
||||||
PA_FLAGS_8000 = 0x00008000,
|
PA_FLAGS_NPC_COLLIDED = 0x00008000,
|
||||||
PA_FLAGS_SPINNING = 0x00010000,
|
PA_FLAGS_SPINNING = 0x00010000,
|
||||||
PA_FLAGS_20000 = 0x00020000,
|
/* Began an encounter by spinning into an enemy with the Dizzy Attack badge on */
|
||||||
PA_FLAGS_40000 = 0x00040000,
|
PA_FLAGS_DIZZY_ATTACK_ENCOUNTER = 0x00020000,
|
||||||
|
PA_FLAGS_INTERRUPT_SPIN = 0x00040000,
|
||||||
PA_FLAGS_80000 = 0x00080000,
|
PA_FLAGS_80000 = 0x00080000,
|
||||||
PA_FLAGS_100000 = 0x00100000, ///< set when using pipes
|
/* When Mario is in a transition to a new map, either through a loading zone or pipe */
|
||||||
PA_FLAGS_200000 = 0x00200000,
|
PA_FLAGS_CHANGING_MAP = 0x00100000,
|
||||||
PA_FLAGS_400000 = 0x00400000,
|
/* Occurs after PA_FLAGS_FORCE_USE_PARTNER. Some partners - namely Bow and Lakilester, unset this immediately.
|
||||||
PA_FLAGS_800000 = 0x00800000,
|
Not sure why - seems like it might contribute to being unable to *stop* using your partner during a cutscene. */
|
||||||
PA_FLAGS_1000000 = 0x01000000,
|
PA_FLAGS_PARTNER_USAGE_FORCED = 0x00200000,
|
||||||
|
PA_FLAGS_RIDING_PARTNER = 0x00400000,
|
||||||
|
PA_FLAGS_PUSHED_ALBINO_DINO = 0x00800000,
|
||||||
|
/* Changes how Mario is rendered. Seems to be intended to make Mario's depth render properly when using Bow behind a switch (two translucent objects on top of eachother), but it doesn't actually work. */
|
||||||
|
PA_FLAGS_MAP_HAS_SWITCH = 0x01000000,
|
||||||
PA_FLAGS_2000000 = 0x02000000,
|
PA_FLAGS_2000000 = 0x02000000,
|
||||||
PA_FLAGS_4000000 = 0x04000000,
|
PA_FLAGS_4000000 = 0x04000000,
|
||||||
PA_FLAGS_8000000 = 0x08000000,
|
PA_FLAGS_8000000 = 0x08000000,
|
||||||
PA_FLAGS_10000000 = 0x10000000,
|
/* Usually, if Mario falls for too long, he eventually gets reset to his last safe position. This prevents that. Used by some scripts. */
|
||||||
PA_FLAGS_20000000 = 0x20000000,
|
PA_FLAGS_NO_OOB_RESPAWN = 0x10000000,
|
||||||
PA_FLAGS_40000000 = 0x40000000,
|
/* This allows dismounting from Lakilester, even if in a precarious situation (like over spikes, lava, or water). */
|
||||||
|
PA_FLAGS_DISMOUNTING_ALLOWED = 0x20000000,
|
||||||
|
/* This flag is set when partner usage was interrupted by a script, and it prevents menu sounds (like the error sound) from playing for script-initiated player actions */
|
||||||
|
PA_FLAGS_PARTNER_USAGE_STOPPED = 0x40000000,
|
||||||
|
/* This one's really weird. Seems to have something to do with the direction Mario is facing, but I'm not sure what it's actually supposed to be achieving. */
|
||||||
PA_FLAGS_80000000 = 0x80000000,
|
PA_FLAGS_80000000 = 0x80000000,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -134,8 +134,8 @@ void func_80258E14(void*);
|
|||||||
|
|
||||||
void func_80254610(Actor*);
|
void func_80254610(Actor*);
|
||||||
|
|
||||||
void func_800E315C(s32 colliderID);
|
void player_handle_floor_collider_type(s32 colliderID);
|
||||||
f32 func_800E34D8(void);
|
f32 player_fall_distance(void);
|
||||||
void func_800E4AD8(s32 arg0);
|
void func_800E4AD8(s32 arg0);
|
||||||
f32 player_check_collision_below(f32, s32* colliderID);
|
f32 player_check_collision_below(f32, s32* colliderID);
|
||||||
s32 can_trigger_loading_zone(void);
|
s32 can_trigger_loading_zone(void);
|
||||||
@ -268,7 +268,7 @@ f32 atan2(f32 startX, f32 startZ, f32 endX, f32 endZ);
|
|||||||
f32 clamp_angle(f32 theta);
|
f32 clamp_angle(f32 theta);
|
||||||
s32 sign(s32 value);
|
s32 sign(s32 value);
|
||||||
|
|
||||||
s32 func_800E0208(void);
|
s32 game_scripts_disabled(void);
|
||||||
|
|
||||||
s32 battle_heap_create(void);
|
s32 battle_heap_create(void);
|
||||||
|
|
||||||
@ -757,7 +757,7 @@ void func_802B7140(void);
|
|||||||
void func_802B71C8(void);
|
void func_802B71C8(void);
|
||||||
void func_802B71D4(void);
|
void func_802B71D4(void);
|
||||||
void func_802B72C0_E22870(void);
|
void func_802B72C0_E22870(void);
|
||||||
s32 func_802BD7DC(void);
|
s32 lakilester_raycast_below(void);
|
||||||
void world_watt_sync_held_position(void);
|
void world_watt_sync_held_position(void);
|
||||||
void func_802BFB44_323694(f32 arg0);
|
void func_802BFB44_323694(f32 arg0);
|
||||||
|
|
||||||
@ -912,7 +912,7 @@ void collision_check_player_overlaps(void);
|
|||||||
void update_player_input(void);
|
void update_player_input(void);
|
||||||
void phys_update_action_state(void);
|
void phys_update_action_state(void);
|
||||||
void collision_main_lateral(void);
|
void collision_main_lateral(void);
|
||||||
void func_800EFD08(void);
|
void handle_floor_behavior(void);
|
||||||
void check_input_open_menus(void);
|
void check_input_open_menus(void);
|
||||||
void check_input_status_menu(void);
|
void check_input_status_menu(void);
|
||||||
|
|
||||||
@ -932,7 +932,7 @@ void partner_reset_data(void);
|
|||||||
s32 has_valid_conversation_npc(void);
|
s32 has_valid_conversation_npc(void);
|
||||||
s32 func_800E06D8(void);
|
s32 func_800E06D8(void);
|
||||||
void func_800E01DC(void);
|
void func_800E01DC(void);
|
||||||
void func_800E4F10(void);
|
void collision_lateral_peach(void);
|
||||||
void func_800E5520(void);
|
void func_800E5520(void);
|
||||||
void func_800E6B68(void);
|
void func_800E6B68(void);
|
||||||
void func_800E9810(void);
|
void func_800E9810(void);
|
||||||
|
@ -183,7 +183,7 @@ void func_80036430(void) {
|
|||||||
gMapTransitionAlpha = 255;
|
gMapTransitionAlpha = 255;
|
||||||
gMapTransitionFadeRate = 20;
|
gMapTransitionFadeRate = 20;
|
||||||
gMapTransitionState = 0x01;
|
gMapTransitionState = 0x01;
|
||||||
gPlayerStatus.flags |= PS_FLAGS_1000;
|
gPlayerStatus.flags |= PS_FLAGS_NO_STATIC_COLLISION;
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_8003646C(void) {
|
void func_8003646C(void) {
|
||||||
|
100
src/77480.c
100
src/77480.c
@ -35,7 +35,7 @@ void check_for_interactables(void);
|
|||||||
void func_800E0AD0(void);
|
void func_800E0AD0(void);
|
||||||
void func_800E0B14(void);
|
void func_800E0B14(void);
|
||||||
void update_partner_timers(void);
|
void update_partner_timers(void);
|
||||||
void func_800E0B90(void);
|
void player_sprite_behaviour(void);
|
||||||
s32 get_player_back_anim(s32 arg0);
|
s32 get_player_back_anim(s32 arg0);
|
||||||
void appendGfx_player(void* data);
|
void appendGfx_player(void* data);
|
||||||
void appendGfx_player_spin(void* data);
|
void appendGfx_player_spin(void* data);
|
||||||
@ -460,7 +460,7 @@ s32 player_raycast_general(s32 mode, f32 startX, f32 startY, f32 startZ, f32 dir
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 player_test_move_without_slipping(PlayerStatus* playerStatus, f32* x, f32* y, f32* z, f32 length, f32 yaw, s32* arg6) {
|
s32 player_test_move_without_slipping(PlayerStatus* playerStatus, f32* x, f32* y, f32* z, f32 length, f32 yaw, s32* hasClimbableStep) {
|
||||||
f32 sinTheta;
|
f32 sinTheta;
|
||||||
f32 cosTheta;
|
f32 cosTheta;
|
||||||
f32 hitX;
|
f32 hitX;
|
||||||
@ -494,7 +494,7 @@ s32 player_test_move_without_slipping(PlayerStatus* playerStatus, f32* x, f32* y
|
|||||||
|
|
||||||
raycastID = player_raycast_general(0, *x, *y + 0.1, *z, sinTheta, 0, cosTheta, &hitX, &hitY, &hitZ, &hitDepth, &hitNx, &hitNy, &hitNz);
|
raycastID = player_raycast_general(0, *x, *y + 0.1, *z, sinTheta, 0, cosTheta, &hitX, &hitY, &hitZ, &hitDepth, &hitNx, &hitNy, &hitNz);
|
||||||
if (raycastID >= 0 && hitDepth <= depth) {
|
if (raycastID >= 0 && hitDepth <= depth) {
|
||||||
*arg6 = 1;
|
*hasClimbableStep = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
depth = length + radius;
|
depth = length + radius;
|
||||||
@ -596,16 +596,16 @@ void update_player(void) {
|
|||||||
update_partner_timers();
|
update_partner_timers();
|
||||||
|
|
||||||
if ((playerStatus->timeInAir > 100) || (playerStatus->position.y < -2000.0f)) {
|
if ((playerStatus->timeInAir > 100) || (playerStatus->position.y < -2000.0f)) {
|
||||||
if (!(playerStatus->animFlags & PA_FLAGS_10000000)) {
|
if (!(playerStatus->animFlags & PA_FLAGS_NO_OOB_RESPAWN)) {
|
||||||
playerStatus->timeInAir = 0;
|
playerStatus->timeInAir = 0;
|
||||||
playerStatus->position.x = playerStatus->lastGoodPosition.x;
|
playerStatus->position.x = playerStatus->lastGoodPosition.x;
|
||||||
playerStatus->position.y = playerStatus->lastGoodPosition.y;
|
playerStatus->position.y = playerStatus->lastGoodPosition.y;
|
||||||
playerStatus->position.z = playerStatus->lastGoodPosition.z;
|
playerStatus->position.z = playerStatus->lastGoodPosition.z;
|
||||||
|
|
||||||
if (playerStatus->animFlags & PA_FLAGS_400000) {
|
if (playerStatus->animFlags & PA_FLAGS_RIDING_PARTNER) {
|
||||||
Npc* partner;
|
Npc* partner;
|
||||||
|
|
||||||
playerStatus->animFlags |= PA_FLAGS_20000000 | PA_FLAGS_INTERRUPT_USE_PARTNER;
|
playerStatus->animFlags |= PA_FLAGS_DISMOUNTING_ALLOWED | PA_FLAGS_INTERRUPT_USE_PARTNER;
|
||||||
partner = get_npc_unsafe(NPC_PARTNER);
|
partner = get_npc_unsafe(NPC_PARTNER);
|
||||||
partner->pos.x = playerStatus->lastGoodPosition.x;
|
partner->pos.x = playerStatus->lastGoodPosition.x;
|
||||||
partner->pos.y = playerStatus->lastGoodPosition.y + playerStatus->colliderHeight;
|
partner->pos.y = playerStatus->lastGoodPosition.y + playerStatus->colliderHeight;
|
||||||
@ -623,12 +623,12 @@ void update_player(void) {
|
|||||||
collisionStatus->floorBelow = 1;
|
collisionStatus->floorBelow = 1;
|
||||||
|
|
||||||
update_player_input();
|
update_player_input();
|
||||||
playerStatus->flags &= ~PS_FLAGS_400;
|
playerStatus->flags &= ~PS_FLAGS_SPECIAL_LAND;
|
||||||
update_player_blink();
|
update_player_blink();
|
||||||
|
|
||||||
if (playerStatus->flags & PS_FLAGS_1000) {
|
if (playerStatus->flags & PS_FLAGS_NO_STATIC_COLLISION) {
|
||||||
phys_update_action_state();
|
phys_update_action_state();
|
||||||
if (!func_800E0208()) {
|
if (!game_scripts_disabled()) {
|
||||||
collision_main_lateral();
|
collision_main_lateral();
|
||||||
}
|
}
|
||||||
} else if (playerStatus->actionState != ACTION_STATE_HIT_LAVA) {
|
} else if (playerStatus->actionState != ACTION_STATE_HIT_LAVA) {
|
||||||
@ -637,19 +637,19 @@ void update_player(void) {
|
|||||||
phys_update_lava_reset();
|
phys_update_lava_reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (playerStatus->flags & PS_FLAGS_4000) {
|
if (playerStatus->flags & PS_FLAGS_CUTSCENE_MOVEMENT) {
|
||||||
playerStatus->moveFrames--;
|
playerStatus->moveFrames--;
|
||||||
if (playerStatus->moveFrames <= 0) {
|
if (playerStatus->moveFrames <= 0) {
|
||||||
playerStatus->moveFrames = 0;
|
playerStatus->moveFrames = 0;
|
||||||
playerStatus->flags &= ~PS_FLAGS_4000;
|
playerStatus->flags &= ~PS_FLAGS_CUTSCENE_MOVEMENT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(playerStatus->animFlags & PA_FLAGS_USING_PEACH_PHYSICS)) {
|
if (!(playerStatus->animFlags & PA_FLAGS_USING_PEACH_PHYSICS)) {
|
||||||
func_800EFD08();
|
handle_floor_behavior();
|
||||||
}
|
}
|
||||||
|
|
||||||
func_800E0B90();
|
player_sprite_behaviour();
|
||||||
|
|
||||||
gameStatus = gGameStatusPtr;
|
gameStatus = gGameStatusPtr;
|
||||||
gameStatus->playerPos.x = playerStatus->position.x;
|
gameStatus->playerPos.x = playerStatus->position.x;
|
||||||
@ -671,7 +671,7 @@ void update_player(void) {
|
|||||||
playerStatus->pushVelocity.x = 0.0f;
|
playerStatus->pushVelocity.x = 0.0f;
|
||||||
playerStatus->pushVelocity.y = 0.0f;
|
playerStatus->pushVelocity.y = 0.0f;
|
||||||
playerStatus->pushVelocity.z = 0.0f;
|
playerStatus->pushVelocity.z = 0.0f;
|
||||||
playerStatus->flags &= ~PS_FLAGS_10;
|
playerStatus->flags &= ~PS_FLAGS_SLIDING;
|
||||||
playerStatus->animFlags &= ~PA_FLAGS_FORCE_USE_PARTNER;
|
playerStatus->animFlags &= ~PA_FLAGS_FORCE_USE_PARTNER;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -682,7 +682,7 @@ void check_input_use_partner(void) {
|
|||||||
|
|
||||||
if (!(playerStatus->animFlags & PA_FLAGS_8BIT_MARIO)) {
|
if (!(playerStatus->animFlags & PA_FLAGS_8BIT_MARIO)) {
|
||||||
if (playerStatus->animFlags & PA_FLAGS_FORCE_USE_PARTNER || playerStatus->inputEnabledCounter == 0) {
|
if (playerStatus->animFlags & PA_FLAGS_FORCE_USE_PARTNER || playerStatus->inputEnabledCounter == 0) {
|
||||||
if (playerStatus->pressedButtons & BUTTON_C_DOWN && !(playerStatus->flags & PS_FLAGS_80) &&
|
if (playerStatus->pressedButtons & BUTTON_C_DOWN && !(playerStatus->flags & PS_FLAGS_NO_PARTNER_USAGE) &&
|
||||||
!(playerStatus->pressedButtons & BUTTON_B) && !(playerStatus->animFlags & PA_FLAGS_USING_PEACH_PHYSICS) &&
|
!(playerStatus->pressedButtons & BUTTON_B) && !(playerStatus->animFlags & PA_FLAGS_USING_PEACH_PHYSICS) &&
|
||||||
actionState <= ACTION_STATE_RUN) {
|
actionState <= ACTION_STATE_RUN) {
|
||||||
|
|
||||||
@ -722,7 +722,7 @@ void phys_update_standard(void) {
|
|||||||
|
|
||||||
if (collision_main_above() < 0 && playerStatus->timeInAir == 0 &&
|
if (collision_main_above() < 0 && playerStatus->timeInAir == 0 &&
|
||||||
playerStatus->animFlags & PA_FLAGS_USING_PEACH_PHYSICS) {
|
playerStatus->animFlags & PA_FLAGS_USING_PEACH_PHYSICS) {
|
||||||
func_800E4F10();
|
collision_lateral_peach();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((playerStatus->actionState != ACTION_STATE_ENEMY_FIRST_STRIKE)
|
if ((playerStatus->actionState != ACTION_STATE_ENEMY_FIRST_STRIKE)
|
||||||
@ -731,7 +731,7 @@ void phys_update_standard(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (playerStatus->animFlags & PA_FLAGS_2) {
|
if (playerStatus->animFlags & PA_FLAGS_WATT_IN_HANDS) {
|
||||||
world_watt_sync_held_position();
|
world_watt_sync_held_position();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -844,7 +844,7 @@ void suggest_player_anim_clearUnkFlag(AnimID anim) {
|
|||||||
if (newAnim != -1) {
|
if (newAnim != -1) {
|
||||||
playerStatus->anim = newAnim;
|
playerStatus->anim = newAnim;
|
||||||
playerStatus->animNotifyValue = 0;
|
playerStatus->animNotifyValue = 0;
|
||||||
playerStatus->flags &= ~PS_FLAGS_10000000;
|
playerStatus->flags &= ~PS_FLAGS_FACE_FORWARDS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -853,7 +853,7 @@ void force_player_anim(AnimID anim) {
|
|||||||
|
|
||||||
playerStatus->anim = anim;
|
playerStatus->anim = anim;
|
||||||
playerStatus->animNotifyValue = 0;
|
playerStatus->animNotifyValue = 0;
|
||||||
playerStatus->flags &= ~PS_FLAGS_10000000;
|
playerStatus->flags &= ~PS_FLAGS_FACE_FORWARDS;
|
||||||
}
|
}
|
||||||
|
|
||||||
void suggest_player_anim_setUnkFlag(AnimID anim) {
|
void suggest_player_anim_setUnkFlag(AnimID anim) {
|
||||||
@ -863,7 +863,7 @@ void suggest_player_anim_setUnkFlag(AnimID anim) {
|
|||||||
if (newAnim != -1) {
|
if (newAnim != -1) {
|
||||||
playerStatus->anim = newAnim;
|
playerStatus->anim = newAnim;
|
||||||
playerStatus->animNotifyValue = 0;
|
playerStatus->animNotifyValue = 0;
|
||||||
playerStatus->flags |= PS_FLAGS_10000000;
|
playerStatus->flags |= PS_FLAGS_FACE_FORWARDS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -894,13 +894,13 @@ void update_player_blink(void) {
|
|||||||
if (!playerStatus->blinkTimer) {
|
if (!playerStatus->blinkTimer) {
|
||||||
if (outtaSight) {
|
if (outtaSight) {
|
||||||
playerStatus->alpha1 = 128;
|
playerStatus->alpha1 = 128;
|
||||||
playerStatus->flags |= PS_FLAGS_8000;
|
playerStatus->flags |= PS_FLAGS_HAZARD_INVINCIBILITY;
|
||||||
} else {
|
} else {
|
||||||
playerStatus->alpha1 = 255;
|
playerStatus->alpha1 = 255;
|
||||||
playerStatus->flags &= ~PS_FLAGS_8000;
|
playerStatus->flags &= ~PS_FLAGS_HAZARD_INVINCIBILITY;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
playerStatus->flags |= PS_FLAGS_8000;
|
playerStatus->flags |= PS_FLAGS_HAZARD_INVINCIBILITY;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -923,7 +923,7 @@ void disable_player_shadow(void) {
|
|||||||
s32 disable_player_static_collisions(void) {
|
s32 disable_player_static_collisions(void) {
|
||||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||||
|
|
||||||
playerStatus->flags |= PS_FLAGS_1000;
|
playerStatus->flags |= PS_FLAGS_NO_STATIC_COLLISION;
|
||||||
playerStatus->enableCollisionOverlapsCheck++;
|
playerStatus->enableCollisionOverlapsCheck++;
|
||||||
return playerStatus->enableCollisionOverlapsCheck;
|
return playerStatus->enableCollisionOverlapsCheck;
|
||||||
}
|
}
|
||||||
@ -933,7 +933,7 @@ s32 enable_player_static_collisions(void) {
|
|||||||
|
|
||||||
playerStatus->enableCollisionOverlapsCheck--;
|
playerStatus->enableCollisionOverlapsCheck--;
|
||||||
if (playerStatus->enableCollisionOverlapsCheck == 0) {
|
if (playerStatus->enableCollisionOverlapsCheck == 0) {
|
||||||
playerStatus->flags &= ~PS_FLAGS_1000;
|
playerStatus->flags &= ~PS_FLAGS_NO_STATIC_COLLISION;
|
||||||
}
|
}
|
||||||
return playerStatus->enableCollisionOverlapsCheck;
|
return playerStatus->enableCollisionOverlapsCheck;
|
||||||
}
|
}
|
||||||
@ -960,11 +960,11 @@ void func_800E01DC(void) {
|
|||||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||||
|
|
||||||
if (playerStatus->animFlags & PA_FLAGS_INTERACT_PROMPT_AVAILABLE) {
|
if (playerStatus->animFlags & PA_FLAGS_INTERACT_PROMPT_AVAILABLE) {
|
||||||
playerStatus->flags |= PS_FLAGS_8000000;
|
playerStatus->flags |= PS_FLAGS_INTERACTED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 func_800E0208(void) {
|
s32 game_scripts_disabled(void) {
|
||||||
s32 ret = FALSE;
|
s32 ret = FALSE;
|
||||||
|
|
||||||
if (gGameStatusPtr->disableScripts && (gGameStatusPtr->currentButtons[0] & BUTTON_R)) {
|
if (gGameStatusPtr->disableScripts && (gGameStatusPtr->currentButtons[0] & BUTTON_R)) {
|
||||||
@ -1033,7 +1033,7 @@ void check_for_pulse_stone(void) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gPlayerStatus.flags & PS_FLAGS_20 || gPlayerStatus.inputEnabledCounter) {
|
if (gPlayerStatus.flags & PS_FLAGS_PAUSED || gPlayerStatus.inputEnabledCounter) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1079,7 +1079,7 @@ void check_for_conversation_prompt(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (D_8010C940 == NULL) {
|
if (D_8010C940 == NULL) {
|
||||||
if (gPlayerStatus.inputEnabledCounter || gPlayerStatus.flags & PS_FLAGS_20) {
|
if (gPlayerStatus.inputEnabledCounter || gPlayerStatus.flags & PS_FLAGS_PAUSED) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1144,11 +1144,11 @@ s32 func_800E06D8(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (temp == wall) {
|
if (temp == wall) {
|
||||||
if (playerStatus->flags & PS_FLAGS_8000000) {
|
if (playerStatus->flags & PS_FLAGS_INTERACTED) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
playerStatus->flags &= ~PS_FLAGS_8000000;
|
playerStatus->flags &= ~PS_FLAGS_INTERACTED;
|
||||||
}
|
}
|
||||||
playerStatus->interactingWithID = -1;
|
playerStatus->interactingWithID = -1;
|
||||||
|
|
||||||
@ -1206,7 +1206,7 @@ void check_for_interactables(void) {
|
|||||||
phi_s2 = 0;
|
phi_s2 = 0;
|
||||||
} else {
|
} else {
|
||||||
playerStatus->interactingWithID = -1;
|
playerStatus->interactingWithID = -1;
|
||||||
playerStatus->flags &= ~PS_FLAGS_8000000;
|
playerStatus->flags &= ~PS_FLAGS_INTERACTED;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -1215,7 +1215,7 @@ void check_for_interactables(void) {
|
|||||||
if (!(curInteraction & COLLISION_WITH_NPC_BIT)) {
|
if (!(curInteraction & COLLISION_WITH_NPC_BIT)) {
|
||||||
if (!should_collider_allow_interact(curInteraction)) {
|
if (!should_collider_allow_interact(curInteraction)) {
|
||||||
playerStatus->interactingWithID = -1;
|
playerStatus->interactingWithID = -1;
|
||||||
playerStatus->flags &= ~PS_FLAGS_8000000;
|
playerStatus->flags &= ~PS_FLAGS_INTERACTED;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1223,18 +1223,18 @@ void check_for_interactables(void) {
|
|||||||
if (!phys_can_player_interact()) {
|
if (!phys_can_player_interact()) {
|
||||||
phi_s2 = 1;
|
phi_s2 = 1;
|
||||||
playerStatus->interactingWithID = -1;
|
playerStatus->interactingWithID = -1;
|
||||||
playerStatus->flags &= ~PS_FLAGS_8000000;
|
playerStatus->flags &= ~PS_FLAGS_INTERACTED;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
phi_s2 = 1;
|
phi_s2 = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (playerStatus->interactingWithID == curInteraction) {
|
if (playerStatus->interactingWithID == curInteraction) {
|
||||||
if ((playerStatus->flags & PS_FLAGS_8000000)) {
|
if ((playerStatus->flags & PS_FLAGS_INTERACTED)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
playerStatus->flags &= ~PS_FLAGS_8000000;
|
playerStatus->flags &= ~PS_FLAGS_INTERACTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
playerStatus->interactingWithID = curInteraction;
|
playerStatus->interactingWithID = curInteraction;
|
||||||
@ -1290,7 +1290,7 @@ void update_partner_timers(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_800E0B90(void) {
|
void player_sprite_behaviour(void) {
|
||||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||||
f32 cameraYaw = gCameras[gCurrentCameraID].currentYaw;
|
f32 cameraYaw = gCameras[gCurrentCameraID].currentYaw;
|
||||||
f32 camRelativeYaw = get_clamped_angle_diff(cameraYaw, playerStatus->currentYaw);
|
f32 camRelativeYaw = get_clamped_angle_diff(cameraYaw, playerStatus->currentYaw);
|
||||||
@ -1338,7 +1338,7 @@ void func_800E0B90(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (playerStatus->flags & PS_FLAGS_200000) {
|
if (playerStatus->flags & PS_FLAGS_NO_FLIPPING) {
|
||||||
angle = 0.0f;
|
angle = 0.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1351,15 +1351,15 @@ void func_800E0B90(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
trueAnim = playerStatus->anim;
|
trueAnim = playerStatus->anim;
|
||||||
if (playerStatus->flags & PS_FLAGS_20000) {
|
if (playerStatus->flags & PS_FLAGS_SPINNING) {
|
||||||
playerStatus->trueAnimation = trueAnim;
|
playerStatus->trueAnimation = trueAnim;
|
||||||
} else {
|
} else {
|
||||||
sprIndex = (trueAnim >> 0x10) & 0xFF;
|
sprIndex = (trueAnim >> 0x10) & 0xFF;
|
||||||
|
|
||||||
if (playerStatus->actionState != ACTION_STATE_TORNADO_JUMP && !(playerStatus->flags & PS_FLAGS_100000)) {
|
if (playerStatus->actionState != ACTION_STATE_TORNADO_JUMP && !(playerStatus->flags & PS_FLAGS_ROTATION_LOCKED)) {
|
||||||
playerStatus->spriteFacingAngle = angle + D_800F7B48;
|
playerStatus->spriteFacingAngle = angle + D_800F7B48;
|
||||||
trueAnim = playerStatus->anim;
|
trueAnim = playerStatus->anim;
|
||||||
if (!(playerStatus->flags & PS_FLAGS_10000000) &&
|
if (!(playerStatus->flags & PS_FLAGS_FACE_FORWARDS) &&
|
||||||
(sprIndex == SPR_Mario_1 || sprIndex == SPR_Mario_6 || sprIndex == SPR_Peach_A) &&
|
(sprIndex == SPR_Mario_1 || sprIndex == SPR_Mario_6 || sprIndex == SPR_Peach_A) &&
|
||||||
fabsf(get_clamped_angle_diff(cameraYaw, playerStatus->currentYaw)) < 60.0f)
|
fabsf(get_clamped_angle_diff(cameraYaw, playerStatus->currentYaw)) < 60.0f)
|
||||||
{
|
{
|
||||||
@ -1369,7 +1369,7 @@ void func_800E0B90(void) {
|
|||||||
playerStatus->currentYaw = playerStatus->targetYaw;
|
playerStatus->currentYaw = playerStatus->targetYaw;
|
||||||
} else {
|
} else {
|
||||||
trueAnim = playerStatus->anim;
|
trueAnim = playerStatus->anim;
|
||||||
if (!(playerStatus->flags & PS_FLAGS_10000000) &&
|
if (!(playerStatus->flags & PS_FLAGS_FACE_FORWARDS) &&
|
||||||
(sprIndex == SPR_Mario_1 || sprIndex == SPR_Mario_6 || sprIndex == SPR_Peach_A) &&
|
(sprIndex == SPR_Mario_1 || sprIndex == SPR_Mario_6 || sprIndex == SPR_Peach_A) &&
|
||||||
playerStatus->spriteFacingAngle < 350.0f && playerStatus->spriteFacingAngle > 190.0f)
|
playerStatus->spriteFacingAngle < 350.0f && playerStatus->spriteFacingAngle > 190.0f)
|
||||||
{
|
{
|
||||||
@ -1380,14 +1380,14 @@ void func_800E0B90(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
timescale = 1.0f;
|
timescale = 1.0f;
|
||||||
if (playerStatus->flags & PS_FLAGS_40000) {
|
if (playerStatus->flags & PS_FLAGS_ENTERING_BATTLE) {
|
||||||
timescale = 0.5f;
|
timescale = 0.5f;
|
||||||
}
|
}
|
||||||
if (playerStatus->flags & PS_FLAGS_20000000) {
|
if (playerStatus->flags & PS_FLAGS_TIME_STOPPED) {
|
||||||
timescale = 0.0f;
|
timescale = 0.0f;
|
||||||
}
|
}
|
||||||
playerStatus->animNotifyValue = spr_update_player_sprite(0, playerStatus->trueAnimation, timescale);
|
playerStatus->animNotifyValue = spr_update_player_sprite(0, playerStatus->trueAnimation, timescale);
|
||||||
playerStatus->flags |= PS_FLAGS_40000000;
|
playerStatus->flags |= PS_FLAGS_SPRITE_REDRAW;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 get_player_back_anim(s32 anim) {
|
s32 get_player_back_anim(s32 anim) {
|
||||||
@ -1451,14 +1451,14 @@ void render_player_model(void) {
|
|||||||
s8 renderModeTemp;
|
s8 renderModeTemp;
|
||||||
void (*appendGfx)(void*);
|
void (*appendGfx)(void*);
|
||||||
|
|
||||||
if (playerStatus->flags & PS_FLAGS_40000000) {
|
if (playerStatus->flags & PS_FLAGS_SPRITE_REDRAW) {
|
||||||
playerStatus->flags &= ~PS_FLAGS_40000000;
|
playerStatus->flags &= ~PS_FLAGS_SPRITE_REDRAW;
|
||||||
get_screen_coords(gCurrentCamID, playerStatus->position.x, playerStatus->position.y,
|
get_screen_coords(gCurrentCamID, playerStatus->position.x, playerStatus->position.y,
|
||||||
playerStatus->position.z, &x, &y, &z);
|
playerStatus->position.z, &x, &y, &z);
|
||||||
if (!(playerStatus->flags & PS_FLAGS_20000)) {
|
if (!(playerStatus->flags & PS_FLAGS_SPINNING)) {
|
||||||
if (playerStatus->alpha1 != playerStatus->alpha2) {
|
if (playerStatus->alpha1 != playerStatus->alpha2) {
|
||||||
if (playerStatus->alpha1 < 254) {
|
if (playerStatus->alpha1 < 254) {
|
||||||
if (!(playerStatus->animFlags & PA_FLAGS_1000000)) {
|
if (!(playerStatus->animFlags & PA_FLAGS_MAP_HAS_SWITCH)) {
|
||||||
renderModeTemp = RENDER_MODE_SURFACE_XLU_LAYER1;
|
renderModeTemp = RENDER_MODE_SURFACE_XLU_LAYER1;
|
||||||
} else {
|
} else {
|
||||||
renderModeTemp = RENDER_MODE_SURFACE_XLU_LAYER2;
|
renderModeTemp = RENDER_MODE_SURFACE_XLU_LAYER2;
|
||||||
@ -1486,7 +1486,7 @@ void render_player_model(void) {
|
|||||||
rtPtr->renderMode = playerStatus->renderMode;
|
rtPtr->renderMode = playerStatus->renderMode;
|
||||||
|
|
||||||
|
|
||||||
if (!(playerStatus->flags & PS_FLAGS_20000)) {
|
if (!(playerStatus->flags & PS_FLAGS_SPINNING)) {
|
||||||
appendGfx = appendGfx_player;
|
appendGfx = appendGfx_player;
|
||||||
} else {
|
} else {
|
||||||
appendGfx = appendGfx_player_spin;
|
appendGfx = appendGfx_player_spin;
|
||||||
|
@ -22,7 +22,7 @@ void update_player_input(void) {
|
|||||||
playerStatus->heldButtonsBuffer[inputBufPos] = playerStatus->heldButtons;
|
playerStatus->heldButtonsBuffer[inputBufPos] = playerStatus->heldButtons;
|
||||||
playerStatus->inputBufPos = inputBufPos;
|
playerStatus->inputBufPos = inputBufPos;
|
||||||
|
|
||||||
if (playerStatus->flags & (PS_FLAGS_INPUT_DISABLED | PS_FLAGS_1000)) {
|
if (playerStatus->flags & (PS_FLAGS_INPUT_DISABLED | PS_FLAGS_NO_STATIC_COLLISION)) {
|
||||||
playerStatus->stickAxis[0] = 0;
|
playerStatus->stickAxis[0] = 0;
|
||||||
playerStatus->stickAxis[1] = 0;
|
playerStatus->stickAxis[1] = 0;
|
||||||
playerStatus->currentButtons = 0;
|
playerStatus->currentButtons = 0;
|
||||||
@ -31,7 +31,7 @@ void update_player_input(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (playerStatus->animFlags & PA_FLAGS_FORCE_USE_PARTNER) {
|
if (playerStatus->animFlags & PA_FLAGS_FORCE_USE_PARTNER) {
|
||||||
playerStatus->animFlags |= PA_FLAGS_200000;
|
playerStatus->animFlags |= PA_FLAGS_PARTNER_USAGE_FORCED;
|
||||||
playerStatus->pressedButtons |= 4;
|
playerStatus->pressedButtons |= 4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
26
src/7E9D0.c
26
src/7E9D0.c
@ -212,8 +212,8 @@ void phys_update_action_state(void) {
|
|||||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||||
PlayerSpinState* playerSpinState = &gPlayerSpinState;
|
PlayerSpinState* playerSpinState = &gPlayerSpinState;
|
||||||
|
|
||||||
if (!(playerStatus->flags & PS_FLAGS_40000)) {
|
if (!(playerStatus->flags & PS_FLAGS_ENTERING_BATTLE)) {
|
||||||
playerStatus->flags &= ~PS_FLAGS_20000000;
|
playerStatus->flags &= ~PS_FLAGS_TIME_STOPPED;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (playerStatus->animFlags & PA_FLAGS_USING_PEACH_PHYSICS) {
|
if (playerStatus->animFlags & PA_FLAGS_USING_PEACH_PHYSICS) {
|
||||||
@ -259,7 +259,7 @@ void phys_update_action_state(void) {
|
|||||||
cond = FALSE;
|
cond = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((partnerActionStatus->partnerActionState == PARTNER_ACTION_NONE) && !(playerStatus->flags & PS_FLAGS_20) && cond) {
|
if ((partnerActionStatus->partnerActionState == PARTNER_ACTION_NONE) && !(playerStatus->flags & PS_FLAGS_PAUSED) && cond) {
|
||||||
set_action_state(ACTION_STATE_TALK);
|
set_action_state(ACTION_STATE_TALK);
|
||||||
}
|
}
|
||||||
check_input_spin();
|
check_input_spin();
|
||||||
@ -283,7 +283,7 @@ void phys_peach_update(void) {
|
|||||||
func_800E24F8();
|
func_800E24F8();
|
||||||
|
|
||||||
do {
|
do {
|
||||||
if (!(playerStatus->flags & PS_FLAGS_20) && check_conversation_trigger()) {
|
if (!(playerStatus->flags & PS_FLAGS_PAUSED) && check_conversation_trigger()) {
|
||||||
set_action_state(ACTION_STATE_TALK);
|
set_action_state(ACTION_STATE_TALK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -320,8 +320,8 @@ void set_action_state(s32 actionState) {
|
|||||||
PlayerData* playerData = &gPlayerData;
|
PlayerData* playerData = &gPlayerData;
|
||||||
PlayerSpinState* spinState = &gPlayerSpinState;
|
PlayerSpinState* spinState = &gPlayerSpinState;
|
||||||
|
|
||||||
if (playerStatus->flags & PS_FLAGS_200) {
|
if (playerStatus->flags & PS_FLAGS_SPECIAL_JUMP) {
|
||||||
playerStatus->flags &= ~PS_FLAGS_200;
|
playerStatus->flags &= ~PS_FLAGS_SPECIAL_JUMP;
|
||||||
enable_player_input();
|
enable_player_input();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -360,16 +360,16 @@ void set_action_state(s32 actionState) {
|
|||||||
if (partner == PARTNER_SUSHIE || partner == PARTNER_LAKILESTER || partner == PARTNER_PARAKARRY) {
|
if (partner == PARTNER_SUSHIE || partner == PARTNER_LAKILESTER || partner == PARTNER_PARAKARRY) {
|
||||||
if (gPartnerActionStatus.partnerActionState != PARTNER_ACTION_NONE) {
|
if (gPartnerActionStatus.partnerActionState != PARTNER_ACTION_NONE) {
|
||||||
playerStatus->animFlags |= PA_FLAGS_INTERRUPT_USE_PARTNER;
|
playerStatus->animFlags |= PA_FLAGS_INTERRUPT_USE_PARTNER;
|
||||||
playerStatus->flags |= PS_FLAGS_800;
|
playerStatus->flags |= PS_FLAGS_HIT_FIRE;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (actionState == ACTION_STATE_SLIDING) {
|
if (actionState == ACTION_STATE_SLIDING) {
|
||||||
playerStatus->flags |= PS_FLAGS_10;
|
playerStatus->flags |= PS_FLAGS_SLIDING;
|
||||||
playerStatus->moveFrames = 0;
|
playerStatus->moveFrames = 0;
|
||||||
playerStatus->flags &= ~PS_FLAGS_4000;
|
playerStatus->flags &= ~PS_FLAGS_CUTSCENE_MOVEMENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
playerStatus->prevActionState = playerStatus->actionState;
|
playerStatus->prevActionState = playerStatus->actionState;
|
||||||
@ -387,7 +387,7 @@ void set_action_state(s32 actionState) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
playerStatus->flags &= ~PS_FLAGS_20000;
|
playerStatus->flags &= ~PS_FLAGS_SPINNING;
|
||||||
playerStatus->animFlags &= ~PA_FLAGS_SPINNING;
|
playerStatus->animFlags &= ~PA_FLAGS_SPINNING;
|
||||||
|
|
||||||
if (spinState->spinSoundID != 0) {
|
if (spinState->spinSoundID != 0) {
|
||||||
@ -437,7 +437,7 @@ void start_bounce_b(void) {
|
|||||||
playerStatus->gravityIntegrator[1] = -1.0f;
|
playerStatus->gravityIntegrator[1] = -1.0f;
|
||||||
playerStatus->gravityIntegrator[2] = 0;
|
playerStatus->gravityIntegrator[2] = 0;
|
||||||
playerStatus->gravityIntegrator[3] = 0;
|
playerStatus->gravityIntegrator[3] = 0;
|
||||||
playerStatus->flags |= PS_FLAGS_800000;
|
playerStatus->flags |= PS_FLAGS_SCRIPTED_FALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 check_input_hammer(void) {
|
s32 check_input_hammer(void) {
|
||||||
@ -511,8 +511,8 @@ void check_input_spin(void) {
|
|||||||
PlayerSpinState* spinState = &gPlayerSpinState;
|
PlayerSpinState* spinState = &gPlayerSpinState;
|
||||||
PlayerSpinState* temp2 = spinState;
|
PlayerSpinState* temp2 = spinState;
|
||||||
|
|
||||||
if (!((playerStatus->flags & (PS_FLAGS_1000 | PS_FLAGS_4000)) ||
|
if (!((playerStatus->flags & (PS_FLAGS_NO_STATIC_COLLISION | PS_FLAGS_CUTSCENE_MOVEMENT)) ||
|
||||||
(playerStatus->animFlags & PA_FLAGS_HOLDING_WATT) ||
|
(playerStatus->animFlags & PA_FLAGS_USING_WATT) ||
|
||||||
(playerStatus->currentButtons & BUTTON_C_DOWN) ||
|
(playerStatus->currentButtons & BUTTON_C_DOWN) ||
|
||||||
is_ability_active(ABILITY_SLOW_GO))) {
|
is_ability_active(ABILITY_SLOW_GO))) {
|
||||||
|
|
||||||
|
@ -51,12 +51,12 @@ s32 can_trigger_loading_zone(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void move_player(s32 duration, f32 heading, f32 speed) {
|
void move_player(s32 duration, f32 heading, f32 speed) {
|
||||||
gPlayerStatus.flags |= PS_FLAGS_4000;
|
gPlayerStatus.flags |= PS_FLAGS_CUTSCENE_MOVEMENT;
|
||||||
gPlayerStatus.heading = heading;
|
gPlayerStatus.heading = heading;
|
||||||
gPlayerStatus.moveFrames = duration;
|
gPlayerStatus.moveFrames = duration;
|
||||||
gPlayerStatus.currentSpeed = speed;
|
gPlayerStatus.currentSpeed = speed;
|
||||||
|
|
||||||
if (!(gPlayerStatus.animFlags & PA_FLAGS_400000)) {
|
if (!(gPlayerStatus.animFlags & PA_FLAGS_RIDING_PARTNER)) {
|
||||||
set_action_state(speed > gPlayerStatus.walkSpeed ? ACTION_STATE_RUN : ACTION_STATE_WALK);
|
set_action_state(speed > gPlayerStatus.walkSpeed ? ACTION_STATE_RUN : ACTION_STATE_WALK);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -117,7 +117,7 @@ s32 collision_main_above(void) {
|
|||||||
return hitResult;
|
return hitResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_800E29C8(void) {
|
void handle_switch_hit(void) {
|
||||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||||
s32 colliderID;
|
s32 colliderID;
|
||||||
f32 groundPosY;
|
f32 groundPosY;
|
||||||
@ -147,11 +147,11 @@ void func_800E29C8(void) {
|
|||||||
if (dist2D(JumpedOnSwitchX, JumpedOnSwitchZ, playerStatus->position.x, playerStatus->position.z) <= 22.0f) {
|
if (dist2D(JumpedOnSwitchX, JumpedOnSwitchZ, playerStatus->position.x, playerStatus->position.z) <= 22.0f) {
|
||||||
add_vec2D_polar(&playerStatus->position.x, &playerStatus->position.z, 5.0f, playerStatus->targetYaw);
|
add_vec2D_polar(&playerStatus->position.x, &playerStatus->position.z, 5.0f, playerStatus->targetYaw);
|
||||||
}
|
}
|
||||||
groundPosY = player_check_collision_below(func_800E34D8(), &colliderID);
|
groundPosY = player_check_collision_below(player_fall_distance(), &colliderID);
|
||||||
func_800E315C(colliderID);
|
player_handle_floor_collider_type(colliderID);
|
||||||
playerStatus->position.y = groundPosY;
|
playerStatus->position.y = groundPosY;
|
||||||
if (colliderID >= 0) {
|
if (colliderID >= 0) {
|
||||||
if (!(playerStatus->animFlags & PA_FLAGS_HOLDING_WATT)) {
|
if (!(playerStatus->animFlags & PA_FLAGS_USING_WATT)) {
|
||||||
anim = ANIM_Mario_10009;
|
anim = ANIM_Mario_10009;
|
||||||
} else {
|
} else {
|
||||||
anim = ANIM_Mario_6000B;
|
anim = ANIM_Mario_6000B;
|
||||||
@ -205,7 +205,7 @@ void phys_update_jump(void) {
|
|||||||
func_800E2BB0();
|
func_800E2BB0();
|
||||||
return;
|
return;
|
||||||
case ACTION_STATE_LANDING_ON_SWITCH:
|
case ACTION_STATE_LANDING_ON_SWITCH:
|
||||||
func_800E29C8();
|
handle_switch_hit();
|
||||||
return;
|
return;
|
||||||
case ACTION_STATE_BOUNCE:
|
case ACTION_STATE_BOUNCE:
|
||||||
integrate_gravity();
|
integrate_gravity();
|
||||||
@ -242,7 +242,7 @@ void phys_update_jump(void) {
|
|||||||
record_jump_apex();
|
record_jump_apex();
|
||||||
set_action_state(ACTION_STATE_HOP);
|
set_action_state(ACTION_STATE_HOP);
|
||||||
integrate_gravity();
|
integrate_gravity();
|
||||||
if (playerStatus->flags & PS_FLAGS_40000) {
|
if (playerStatus->flags & PS_FLAGS_ENTERING_BATTLE) {
|
||||||
playerStatus->gravityIntegrator[1] *= 0.5f;
|
playerStatus->gravityIntegrator[1] *= 0.5f;
|
||||||
playerStatus->gravityIntegrator[2] *= 0.5f;
|
playerStatus->gravityIntegrator[2] *= 0.5f;
|
||||||
playerStatus->gravityIntegrator[3] *= 0.5f;
|
playerStatus->gravityIntegrator[3] *= 0.5f;
|
||||||
@ -285,7 +285,7 @@ void phys_init_integrator_for_current_state(void) {
|
|||||||
case ACTION_STATE_HIT_FIRE:
|
case ACTION_STATE_HIT_FIRE:
|
||||||
case ACTION_STATE_HIT_LAVA:
|
case ACTION_STATE_HIT_LAVA:
|
||||||
params = GravityParamsStartJump;
|
params = GravityParamsStartJump;
|
||||||
if (!(playerStatus->flags & PS_FLAGS_40000)) {
|
if (!(playerStatus->flags & PS_FLAGS_ENTERING_BATTLE)) {
|
||||||
playerStatus->gravityIntegrator[0] = *params++;
|
playerStatus->gravityIntegrator[0] = *params++;
|
||||||
playerStatus->gravityIntegrator[1] = *params++;
|
playerStatus->gravityIntegrator[1] = *params++;
|
||||||
playerStatus->gravityIntegrator[2] = *params++;
|
playerStatus->gravityIntegrator[2] = *params++;
|
||||||
@ -309,7 +309,7 @@ void gravity_use_fall_parms(void) {
|
|||||||
do {} while (0);
|
do {} while (0);
|
||||||
playerStatus = &gPlayerStatus;
|
playerStatus = &gPlayerStatus;
|
||||||
|
|
||||||
if (playerStatus->flags & PS_FLAGS_40000) {
|
if (playerStatus->flags & PS_FLAGS_ENTERING_BATTLE) {
|
||||||
playerStatus->gravityIntegrator[0] = *params++ / 12.0f;
|
playerStatus->gravityIntegrator[0] = *params++ / 12.0f;
|
||||||
playerStatus->gravityIntegrator[1] = *params++ / 12.0f;
|
playerStatus->gravityIntegrator[1] = *params++ / 12.0f;
|
||||||
playerStatus->gravityIntegrator[2] = *params++ / 12.0f;
|
playerStatus->gravityIntegrator[2] = *params++ / 12.0f;
|
||||||
@ -327,12 +327,12 @@ void phys_update_falling(void) {
|
|||||||
gPlayerStatus.actionState != ACTION_STATE_BOUNCE)
|
gPlayerStatus.actionState != ACTION_STATE_BOUNCE)
|
||||||
{
|
{
|
||||||
s32 colliderID;
|
s32 colliderID;
|
||||||
gPlayerStatus.position.y = player_check_collision_below(func_800E34D8(), &colliderID);
|
gPlayerStatus.position.y = player_check_collision_below(player_fall_distance(), &colliderID);
|
||||||
func_800E315C(colliderID);
|
player_handle_floor_collider_type(colliderID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_800E315C(s32 colliderID) {
|
void player_handle_floor_collider_type(s32 colliderID) {
|
||||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||||
PartnerActionStatus* partnerActionStatus = &gPartnerActionStatus;
|
PartnerActionStatus* partnerActionStatus = &gPartnerActionStatus;
|
||||||
|
|
||||||
@ -383,7 +383,7 @@ void phys_player_land(void) {
|
|||||||
|
|
||||||
playerStatus->timeInAir = 0;
|
playerStatus->timeInAir = 0;
|
||||||
playerStatus->peakJumpTime = 0;
|
playerStatus->peakJumpTime = 0;
|
||||||
playerStatus->flags &= ~PS_FLAGS_800000;
|
playerStatus->flags &= ~PS_FLAGS_SCRIPTED_FALL;
|
||||||
playerStatus->landPos.x = playerStatus->position.x;
|
playerStatus->landPos.x = playerStatus->position.x;
|
||||||
playerStatus->landPos.z = playerStatus->position.z;
|
playerStatus->landPos.z = playerStatus->position.z;
|
||||||
playerStatus->flags &= ~PS_FLAGS_AIRBORNE;
|
playerStatus->flags &= ~PS_FLAGS_AIRBORNE;
|
||||||
@ -416,7 +416,7 @@ void phys_player_land(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (playerStatus->flags & PS_FLAGS_4000) {
|
if (playerStatus->flags & PS_FLAGS_CUTSCENE_MOVEMENT) {
|
||||||
set_action_state(ACTION_STATE_RUN);
|
set_action_state(ACTION_STATE_RUN);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -445,7 +445,7 @@ void phys_player_land(void) {
|
|||||||
f32 integrate_gravity(void) {
|
f32 integrate_gravity(void) {
|
||||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||||
|
|
||||||
if (playerStatus->flags & PS_FLAGS_40000) {
|
if (playerStatus->flags & PS_FLAGS_ENTERING_BATTLE) {
|
||||||
playerStatus->gravityIntegrator[2] += playerStatus->gravityIntegrator[3] / 1.7f;
|
playerStatus->gravityIntegrator[2] += playerStatus->gravityIntegrator[3] / 1.7f;
|
||||||
playerStatus->gravityIntegrator[1] += playerStatus->gravityIntegrator[2] / 1.7f;
|
playerStatus->gravityIntegrator[1] += playerStatus->gravityIntegrator[2] / 1.7f;
|
||||||
playerStatus->gravityIntegrator[0] += playerStatus->gravityIntegrator[1] / 1.7f;
|
playerStatus->gravityIntegrator[0] += playerStatus->gravityIntegrator[1] / 1.7f;
|
||||||
@ -457,10 +457,10 @@ f32 integrate_gravity(void) {
|
|||||||
return playerStatus->gravityIntegrator[0];
|
return playerStatus->gravityIntegrator[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
f32 func_800E34D8(void) {
|
f32 player_fall_distance(void) {
|
||||||
f32 velocity = integrate_gravity();
|
f32 velocity = integrate_gravity();
|
||||||
|
|
||||||
if (func_800E0208()) {
|
if (game_scripts_disabled()) {
|
||||||
velocity = 0.0f;
|
velocity = 0.0f;
|
||||||
}
|
}
|
||||||
return velocity;
|
return velocity;
|
||||||
@ -508,9 +508,9 @@ void collision_main_lateral(void) {
|
|||||||
f32 zBump;
|
f32 zBump;
|
||||||
|
|
||||||
gCollisionStatus.pushingAgainstWall = -1;
|
gCollisionStatus.pushingAgainstWall = -1;
|
||||||
if (playerStatus->flags & PS_FLAGS_4000) {
|
if (playerStatus->flags & PS_FLAGS_CUTSCENE_MOVEMENT) {
|
||||||
speed = playerStatus->currentSpeed;
|
speed = playerStatus->currentSpeed;
|
||||||
if (playerStatus->flags & PS_FLAGS_40000) {
|
if (playerStatus->flags & PS_FLAGS_ENTERING_BATTLE) {
|
||||||
speed *= 0.5f;
|
speed *= 0.5f;
|
||||||
}
|
}
|
||||||
add_vec2D_polar(&playerStatus->position.x, &playerStatus->position.z, speed, playerStatus->heading);
|
add_vec2D_polar(&playerStatus->position.x, &playerStatus->position.z, speed, playerStatus->heading);
|
||||||
@ -601,7 +601,7 @@ void collision_main_lateral(void) {
|
|||||||
f32 new_var;
|
f32 new_var;
|
||||||
|
|
||||||
speed = 0.0f;
|
speed = 0.0f;
|
||||||
if (!(playerStatus->flags & (PS_FLAGS_800000 | PS_FLAGS_INPUT_DISABLED))) {
|
if (!(playerStatus->flags & (PS_FLAGS_SCRIPTED_FALL | PS_FLAGS_INPUT_DISABLED))) {
|
||||||
player_input_to_move_vector(&yaw, &speed);
|
player_input_to_move_vector(&yaw, &speed);
|
||||||
if (!(playerStatus->animFlags & PA_FLAGS_SPINNING)) {
|
if (!(playerStatus->animFlags & PA_FLAGS_SPINNING)) {
|
||||||
speed *= 0.03125f;
|
speed *= 0.03125f;
|
||||||
@ -611,7 +611,7 @@ void collision_main_lateral(void) {
|
|||||||
if (playerStatus->actionState == ACTION_STATE_LAUNCH) {
|
if (playerStatus->actionState == ACTION_STATE_LAUNCH) {
|
||||||
speed *= 1.5;
|
speed *= 1.5;
|
||||||
}
|
}
|
||||||
if (playerStatus->flags & PS_FLAGS_40000) {
|
if (playerStatus->flags & PS_FLAGS_ENTERING_BATTLE) {
|
||||||
speed *= 0.5f;
|
speed *= 0.5f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -635,7 +635,7 @@ void collision_main_lateral(void) {
|
|||||||
|
|
||||||
sin_cos_rad(DEG_TO_RAD(playerStatus->targetYaw), &sinTheta, &cosTheta);
|
sin_cos_rad(DEG_TO_RAD(playerStatus->targetYaw), &sinTheta, &cosTheta);
|
||||||
speed = playerStatus->currentSpeed;
|
speed = playerStatus->currentSpeed;
|
||||||
if (playerStatus->flags & PS_FLAGS_40000) {
|
if (playerStatus->flags & PS_FLAGS_ENTERING_BATTLE) {
|
||||||
speed *= 0.5f;
|
speed *= 0.5f;
|
||||||
}
|
}
|
||||||
playerX = xBump + (speed * sinTheta);
|
playerX = xBump + (speed * sinTheta);
|
||||||
@ -680,7 +680,7 @@ void collision_main_lateral(void) {
|
|||||||
playerStatus->colliderDiameter, yaw2);
|
playerStatus->colliderDiameter, yaw2);
|
||||||
}
|
}
|
||||||
collisionStatus->currentWall = result;
|
collisionStatus->currentWall = result;
|
||||||
if (!(playerStatus->flags & PS_FLAGS_400000) && playerStatus->actionState != ACTION_STATE_HAMMER) {
|
if (!(playerStatus->flags & PS_FLAGS_MOVEMENT_LOCKED) && playerStatus->actionState != ACTION_STATE_HAMMER) {
|
||||||
|
|
||||||
if (speed == 0.0f) {
|
if (speed == 0.0f) {
|
||||||
collision_check_player_intersecting_world(0, 0,
|
collision_check_player_intersecting_world(0, 0,
|
||||||
@ -899,7 +899,7 @@ void phys_main_collision_below(void) {
|
|||||||
playerStatus->groundAnglesXZ.y = hitDirZ;
|
playerStatus->groundAnglesXZ.y = hitDirZ;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (func_800E0208()) {
|
if (game_scripts_disabled()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -911,7 +911,7 @@ void phys_main_collision_below(void) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((!(playerStatus->flags & PS_FLAGS_10) ||
|
if ((!(playerStatus->flags & PS_FLAGS_SLIDING) ||
|
||||||
(phys_adjust_cam_on_landing(), !phys_should_player_be_sliding()) ||
|
(phys_adjust_cam_on_landing(), !phys_should_player_be_sliding()) ||
|
||||||
(set_action_state(ACTION_STATE_SLIDING), (playerStatus->actionState != ACTION_STATE_SLIDING))))
|
(set_action_state(ACTION_STATE_SLIDING), (playerStatus->actionState != ACTION_STATE_SLIDING))))
|
||||||
{
|
{
|
||||||
@ -995,7 +995,7 @@ void collision_lava_reset_check_additional_overlaps(void) {
|
|||||||
f32 temp_f0;
|
f32 temp_f0;
|
||||||
|
|
||||||
if (playerStatus->animFlags & PA_FLAGS_USING_PEACH_PHYSICS) {
|
if (playerStatus->animFlags & PA_FLAGS_USING_PEACH_PHYSICS) {
|
||||||
func_800E4F10();
|
collision_lateral_peach();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1056,20 +1056,21 @@ void collision_lava_reset_check_additional_overlaps(void) {
|
|||||||
playerStatus->position.z = z;
|
playerStatus->position.z = z;
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_800E4F10(void) {
|
void collision_lateral_peach(void) {
|
||||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||||
s32 tempB = 0;
|
s32 climbableStep = FALSE;
|
||||||
f32 yaw = playerStatus->targetYaw;
|
f32 yaw = playerStatus->targetYaw;
|
||||||
f32 x = playerStatus->position.x;
|
f32 x = playerStatus->position.x;
|
||||||
f32 y = playerStatus->position.y;
|
f32 y = playerStatus->position.y;
|
||||||
f32 z = playerStatus->position.z;
|
f32 z = playerStatus->position.z;
|
||||||
s32 temp = player_test_move_without_slipping(&gPlayerStatus, &x, &y, &z, 0, yaw, &tempB);
|
s32 wall = player_test_move_without_slipping(&gPlayerStatus, &x, &y, &z, 0, yaw, &climbableStep);
|
||||||
|
|
||||||
playerStatus->position.x = x;
|
playerStatus->position.x = x;
|
||||||
playerStatus->position.z = z;
|
playerStatus->position.z = z;
|
||||||
|
|
||||||
if (tempB != 0 &&
|
// If there was a climbable step in this direction, but no wall, we can climb up it
|
||||||
temp < 0 &&
|
if (climbableStep &&
|
||||||
|
wall < 0 &&
|
||||||
playerStatus->actionState != ACTION_STATE_STEP_UP_PEACH &&
|
playerStatus->actionState != ACTION_STATE_STEP_UP_PEACH &&
|
||||||
playerStatus->currentSpeed != 0.0f)
|
playerStatus->currentSpeed != 0.0f)
|
||||||
{
|
{
|
||||||
@ -1078,8 +1079,8 @@ void func_800E4F10(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void check_input_midair_jump(void) {
|
void check_input_midair_jump(void) {
|
||||||
if (!(gPlayerStatus.flags & (PS_FLAGS_800000 | PS_FLAGS_10 | PS_FLAGS_FLYING)) &&
|
if (!(gPlayerStatus.flags & (PS_FLAGS_SCRIPTED_FALL | PS_FLAGS_SLIDING | PS_FLAGS_FLYING)) &&
|
||||||
!(gPlayerStatus.animFlags & (PA_FLAGS_8BIT_MARIO | PA_FLAGS_HOLDING_WATT)) &&
|
!(gPlayerStatus.animFlags & (PA_FLAGS_8BIT_MARIO | PA_FLAGS_USING_WATT)) &&
|
||||||
gPlayerStatus.peakJumpTime >= 6 &&
|
gPlayerStatus.peakJumpTime >= 6 &&
|
||||||
gPlayerStatus.timeInAir < 18 &&
|
gPlayerStatus.timeInAir < 18 &&
|
||||||
gPlayerStatus.pressedButtons & A_BUTTON) {
|
gPlayerStatus.pressedButtons & A_BUTTON) {
|
||||||
|
@ -41,12 +41,12 @@ s32 func_800E6904(void) {
|
|||||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||||
s32 actionState = playerStatus->actionState;
|
s32 actionState = playerStatus->actionState;
|
||||||
|
|
||||||
if (playerStatus->animFlags & PA_FLAGS_100000) {
|
if (playerStatus->animFlags & PA_FLAGS_CHANGING_MAP) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (partnerActionStatus->partnerActionState == PARTNER_ACTION_NONE) {
|
if (partnerActionStatus->partnerActionState == PARTNER_ACTION_NONE) {
|
||||||
if (!(playerStatus->flags & PS_FLAGS_1000) &&
|
if (!(playerStatus->flags & PS_FLAGS_NO_STATIC_COLLISION) &&
|
||||||
(actionState == ACTION_STATE_IDLE || actionState == ACTION_STATE_WALK || actionState == ACTION_STATE_RUN))
|
(actionState == ACTION_STATE_IDLE || actionState == ACTION_STATE_WALK || actionState == ACTION_STATE_RUN))
|
||||||
{
|
{
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -72,8 +72,8 @@ s32 can_pause(s32 currentButtons, s32 pressedButtons) {
|
|||||||
PartnerActionStatus* partnerActionStatus = &gPartnerActionStatus;
|
PartnerActionStatus* partnerActionStatus = &gPartnerActionStatus;
|
||||||
s32 actionState = gPlayerStatus.actionState;
|
s32 actionState = gPlayerStatus.actionState;
|
||||||
|
|
||||||
if (!(gPlayerStatus.animFlags & PA_FLAGS_100000) &&
|
if (!(gPlayerStatus.animFlags & PA_FLAGS_CHANGING_MAP) &&
|
||||||
!(gPlayerStatus.flags & PS_FLAGS_100) &&
|
!(gPlayerStatus.flags & PS_FLAGS_PAUSE_DISABLED) &&
|
||||||
!(currentButtons & (BUTTON_Z | BUTTON_R)) &&
|
!(currentButtons & (BUTTON_Z | BUTTON_R)) &&
|
||||||
(pressedButtons & (BUTTON_START | BUTTON_C_LEFT | BUTTON_C_RIGHT)) &&
|
(pressedButtons & (BUTTON_START | BUTTON_C_LEFT | BUTTON_C_RIGHT)) &&
|
||||||
((gGameStatusPtr->mapShop == NULL) || !(gGameStatusPtr->mapShop->flags & 1)) &&
|
((gGameStatusPtr->mapShop == NULL) || !(gGameStatusPtr->mapShop->flags & 1)) &&
|
||||||
@ -82,7 +82,7 @@ s32 can_pause(s32 currentButtons, s32 pressedButtons) {
|
|||||||
{
|
{
|
||||||
if (!(gPlayerStatus.animFlags & PA_FLAGS_8BIT_MARIO)) {
|
if (!(gPlayerStatus.animFlags & PA_FLAGS_8BIT_MARIO)) {
|
||||||
if (partnerActionStatus->partnerActionState == PARTNER_ACTION_NONE) {
|
if (partnerActionStatus->partnerActionState == PARTNER_ACTION_NONE) {
|
||||||
if (!(gPlayerStatus.flags & PS_FLAGS_1000)) {
|
if (!(gPlayerStatus.flags & PS_FLAGS_NO_STATIC_COLLISION)) {
|
||||||
if (actionState == ACTION_STATE_IDLE ||
|
if (actionState == ACTION_STATE_IDLE ||
|
||||||
actionState == ACTION_STATE_WALK ||
|
actionState == ACTION_STATE_WALK ||
|
||||||
actionState == ACTION_STATE_RUN)
|
actionState == ACTION_STATE_RUN)
|
||||||
@ -102,7 +102,7 @@ s32 can_pause(s32 currentButtons, s32 pressedButtons) {
|
|||||||
}
|
}
|
||||||
} else if (partnerActionStatus->actingPartner == PARTNER_LAKILESTER) {
|
} else if (partnerActionStatus->actingPartner == PARTNER_LAKILESTER) {
|
||||||
if (actionState == ACTION_STATE_RIDE) {
|
if (actionState == ACTION_STATE_RIDE) {
|
||||||
if (func_802BD7DC()) {
|
if (lakilester_raycast_below()) {
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
sfx_play_sound(SOUND_MENU_ERROR);
|
sfx_play_sound(SOUND_MENU_ERROR);
|
||||||
@ -235,11 +235,11 @@ void check_input_open_menus(void) {
|
|||||||
block_17:
|
block_17:
|
||||||
switch (D_8010CCF8) {
|
switch (D_8010CCF8) {
|
||||||
case 0:
|
case 0:
|
||||||
if (playerStatus->flags & PS_FLAGS_40) {
|
if (playerStatus->flags & PS_FLAGS_NO_CHANGE_PARTNER) {
|
||||||
sfx_play_sound(SOUND_MENU_ERROR);
|
sfx_play_sound(SOUND_MENU_ERROR);
|
||||||
if (D_8010C9C0) {
|
if (D_8010C9C0) {
|
||||||
func_800E6860();
|
func_800E6860();
|
||||||
playerStatus->flags &= ~PS_FLAGS_20;
|
playerStatus->flags &= ~PS_FLAGS_PAUSED;
|
||||||
gOverrideFlags &= ~GLOBAL_OVERRIDES_40;
|
gOverrideFlags &= ~GLOBAL_OVERRIDES_40;
|
||||||
set_time_freeze_mode(TIME_FREEZE_NORMAL);
|
set_time_freeze_mode(TIME_FREEZE_NORMAL);
|
||||||
}
|
}
|
||||||
@ -264,7 +264,7 @@ block_17:
|
|||||||
popup->initialPos = 0;
|
popup->initialPos = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
playerStatus->flags |= PS_FLAGS_20;
|
playerStatus->flags |= PS_FLAGS_PAUSED;
|
||||||
disable_player_input();
|
disable_player_input();
|
||||||
partner_disable_input();
|
partner_disable_input();
|
||||||
D_8010CCFA = 3;
|
D_8010CCFA = 3;
|
||||||
@ -273,7 +273,7 @@ block_17:
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
flags = ~PS_FLAGS_20;
|
flags = ~PS_FLAGS_PAUSED;
|
||||||
if ((func_800E6904() == 0) || is_picking_up_item() || D_8010CCFE < playerStatus->inputEnabledCounter) {
|
if ((func_800E6904() == 0) || is_picking_up_item() || D_8010CCFE < playerStatus->inputEnabledCounter) {
|
||||||
playerStatus->flags &= flags;
|
playerStatus->flags &= flags;
|
||||||
enable_player_input();
|
enable_player_input();
|
||||||
@ -281,7 +281,7 @@ block_17:
|
|||||||
D_8010CD00 = 0;
|
D_8010CD00 = 0;
|
||||||
if (D_8010C9C0) {
|
if (D_8010C9C0) {
|
||||||
func_800E6860();
|
func_800E6860();
|
||||||
playerStatus->flags &= ~PS_FLAGS_20;
|
playerStatus->flags &= ~PS_FLAGS_PAUSED;
|
||||||
gOverrideFlags &= ~GLOBAL_OVERRIDES_40;
|
gOverrideFlags &= ~GLOBAL_OVERRIDES_40;
|
||||||
set_time_freeze_mode(TIME_FREEZE_NORMAL);
|
set_time_freeze_mode(TIME_FREEZE_NORMAL);
|
||||||
}
|
}
|
||||||
@ -356,7 +356,7 @@ block_17:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
func_800E6860();
|
func_800E6860();
|
||||||
playerStatus->flags &= ~PS_FLAGS_20;
|
playerStatus->flags &= ~PS_FLAGS_PAUSED;
|
||||||
gOverrideFlags &= ~GLOBAL_OVERRIDES_40;
|
gOverrideFlags &= ~GLOBAL_OVERRIDES_40;
|
||||||
set_time_freeze_mode(TIME_FREEZE_NORMAL);
|
set_time_freeze_mode(TIME_FREEZE_NORMAL);
|
||||||
}
|
}
|
||||||
@ -366,7 +366,7 @@ block_17:
|
|||||||
if (D_8010CCFA == 0) {
|
if (D_8010CCFA == 0) {
|
||||||
func_800E6860();
|
func_800E6860();
|
||||||
D_8010CD00 = 0;
|
D_8010CD00 = 0;
|
||||||
playerStatus->flags &= ~PS_FLAGS_20;
|
playerStatus->flags &= ~PS_FLAGS_PAUSED;
|
||||||
gOverrideFlags &= ~GLOBAL_OVERRIDES_40;
|
gOverrideFlags &= ~GLOBAL_OVERRIDES_40;
|
||||||
enable_player_input();
|
enable_player_input();
|
||||||
partner_enable_input();
|
partner_enable_input();
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "effects.h"
|
#include "effects.h"
|
||||||
|
|
||||||
void func_800EFE2C(void);
|
void surface_standard_behavior(void);
|
||||||
void func_800F0248(void);
|
void surface_flowers_behavior(void);
|
||||||
void func_800F0490(void);
|
void surface_cloud_behavior(void);
|
||||||
void func_800F0864(void);
|
void surface_snow_behavior(void);
|
||||||
void func_800F09EC(void);
|
void surface_hedges_behavior(void);
|
||||||
void func_800F0B3C(void);
|
void surface_water_behavior(void);
|
||||||
|
|
||||||
s32 D_80109480 = 0;
|
s32 D_80109480 = 0;
|
||||||
f32 D_80109484 = 0.0f;
|
f32 D_80109484 = 0.0f;
|
||||||
@ -32,7 +32,8 @@ extern s32 D_8010CFF4;
|
|||||||
void func_800EFD00(void) {
|
void func_800EFD00(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_800EFD08(void) {
|
// Particles (dust, flowers, snow) and etc
|
||||||
|
void handle_floor_behavior(void) {
|
||||||
s32 colliderType = 0;
|
s32 colliderType = 0;
|
||||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||||
|
|
||||||
@ -54,27 +55,27 @@ void func_800EFD08(void) {
|
|||||||
|
|
||||||
switch (colliderType) {
|
switch (colliderType) {
|
||||||
case SURFACE_TYPE_FLOWERS:
|
case SURFACE_TYPE_FLOWERS:
|
||||||
func_800F0248();
|
surface_flowers_behavior();
|
||||||
break;
|
break;
|
||||||
case SURFACE_TYPE_CLOUD:
|
case SURFACE_TYPE_CLOUD:
|
||||||
func_800F0490();
|
surface_cloud_behavior();
|
||||||
break;
|
break;
|
||||||
case SURFACE_TYPE_SNOW:
|
case SURFACE_TYPE_SNOW:
|
||||||
func_800F0864();
|
surface_snow_behavior();
|
||||||
break;
|
break;
|
||||||
case SURFACE_TYPE_HEDGES:
|
case SURFACE_TYPE_HEDGES:
|
||||||
func_800F09EC();
|
surface_hedges_behavior();
|
||||||
break;
|
break;
|
||||||
case SURFACE_TYPE_WATER:
|
case SURFACE_TYPE_WATER:
|
||||||
func_800F0B3C();
|
surface_water_behavior();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
func_800EFE2C();
|
surface_standard_behavior();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_800EFE2C(void) {
|
void surface_standard_behavior(void) {
|
||||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||||
f32 sinTheta, cosTheta;
|
f32 sinTheta, cosTheta;
|
||||||
f32 x, y, z;
|
f32 x, y, z;
|
||||||
@ -99,7 +100,7 @@ void func_800EFE2C(void) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
} else if (
|
} else if (
|
||||||
(playerStatus->actionState == ACTION_STATE_SPIN_POUND || playerStatus->actionState == ACTION_STATE_TORNADO_POUND) && (playerStatus->flags & PS_FLAGS_400))
|
(playerStatus->actionState == ACTION_STATE_SPIN_POUND || playerStatus->actionState == ACTION_STATE_TORNADO_POUND) && (playerStatus->flags & PS_FLAGS_SPECIAL_LAND))
|
||||||
{
|
{
|
||||||
x = playerStatus->position.x;
|
x = playerStatus->position.x;
|
||||||
y = playerStatus->position.y + 0.0f;
|
y = playerStatus->position.y + 0.0f;
|
||||||
@ -165,7 +166,7 @@ void func_800EFE2C(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_800F0248(void) {
|
void surface_flowers_behavior(void) {
|
||||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||||
f32 sin, cos, x, y, z;
|
f32 sin, cos, x, y, z;
|
||||||
f32 t1;
|
f32 t1;
|
||||||
@ -209,7 +210,7 @@ void func_800F0248(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_800F0490(void) {
|
void surface_cloud_behavior(void) {
|
||||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||||
f32 sinTheta, cosTheta;
|
f32 sinTheta, cosTheta;
|
||||||
f32 xTemp, xTemp2;
|
f32 xTemp, xTemp2;
|
||||||
@ -220,7 +221,7 @@ void func_800F0490(void) {
|
|||||||
D_801094A0 += 0.1f;
|
D_801094A0 += 0.1f;
|
||||||
|
|
||||||
if (((playerStatus->actionState == ACTION_STATE_LAND && (playerStatus->flags & PS_FLAGS_ACTION_STATE_CHANGED)) ||
|
if (((playerStatus->actionState == ACTION_STATE_LAND && (playerStatus->flags & PS_FLAGS_ACTION_STATE_CHANGED)) ||
|
||||||
((playerStatus->actionState == ACTION_STATE_SPIN_POUND || playerStatus->actionState == ACTION_STATE_TORNADO_POUND) && (playerStatus->flags & PS_FLAGS_400))) &&
|
((playerStatus->actionState == ACTION_STATE_SPIN_POUND || playerStatus->actionState == ACTION_STATE_TORNADO_POUND) && (playerStatus->flags & PS_FLAGS_SPECIAL_LAND))) &&
|
||||||
D_8010CFF4 >= 10)
|
D_8010CFF4 >= 10)
|
||||||
{
|
{
|
||||||
fx_cloud_puff(
|
fx_cloud_puff(
|
||||||
@ -264,7 +265,7 @@ void func_800F0490(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_800F0864(void) {
|
void surface_snow_behavior(void) {
|
||||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||||
f32 sin, cos;
|
f32 sin, cos;
|
||||||
|
|
||||||
@ -292,7 +293,7 @@ void func_800F0864(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_800F09EC(void) {
|
void surface_hedges_behavior(void) {
|
||||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||||
f32 sin, cos;
|
f32 sin, cos;
|
||||||
|
|
||||||
@ -318,7 +319,7 @@ void func_800F09EC(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_800F0B3C(void) {
|
void surface_water_behavior(void) {
|
||||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||||
f32 sin, cos;
|
f32 sin, cos;
|
||||||
|
|
||||||
|
@ -2419,7 +2419,7 @@ void update_item_entity_temp(ItemEntity* itemEntity) {
|
|||||||
if (!(itemEntity->flags & ITEM_ENTITY_FLAGS_2000000)) {
|
if (!(itemEntity->flags & ITEM_ENTITY_FLAGS_2000000)) {
|
||||||
s32 actionState = playerStatus->actionState;
|
s32 actionState = playerStatus->actionState;
|
||||||
|
|
||||||
if (!(playerStatus->animFlags & PA_FLAGS_10000000) &&
|
if (!(playerStatus->animFlags & PA_FLAGS_NO_OOB_RESPAWN) &&
|
||||||
((playerStatus->timeInAir == 0 &&
|
((playerStatus->timeInAir == 0 &&
|
||||||
actionState != ACTION_STATE_JUMP &&
|
actionState != ACTION_STATE_JUMP &&
|
||||||
actionState != ACTION_STATE_FALLING) ||
|
actionState != ACTION_STATE_FALLING) ||
|
||||||
@ -2607,7 +2607,7 @@ block_47: // TODO required to match
|
|||||||
item_entity_disable_shadow(itemEntity);
|
item_entity_disable_shadow(itemEntity);
|
||||||
if (func_800DFCF4() &&
|
if (func_800DFCF4() &&
|
||||||
playerStatus->actionState != ACTION_STATE_USE_SPINNING_FLOWER &&
|
playerStatus->actionState != ACTION_STATE_USE_SPINNING_FLOWER &&
|
||||||
!(playerStatus->animFlags & PA_FLAGS_10000000))
|
!(playerStatus->animFlags & PA_FLAGS_NO_OOB_RESPAWN))
|
||||||
{
|
{
|
||||||
set_action_state(ACTION_STATE_IDLE);
|
set_action_state(ACTION_STATE_IDLE);
|
||||||
}
|
}
|
||||||
|
@ -176,7 +176,7 @@ void func_802B7728_E20838(void) {
|
|||||||
actionState = playerStatus->actionState;
|
actionState = playerStatus->actionState;
|
||||||
if ((func_802B7450_E20560() == 0) ||
|
if ((func_802B7450_E20560() == 0) ||
|
||||||
(playerStatus->inputEnabledCounter != 0) ||
|
(playerStatus->inputEnabledCounter != 0) ||
|
||||||
(playerStatus->flags & PS_FLAGS_20) ||
|
(playerStatus->flags & PS_FLAGS_PAUSED) ||
|
||||||
!(actionState == ACTION_STATE_IDLE || actionState == ACTION_STATE_WALK || actionState == ACTION_STATE_RUN))
|
!(actionState == ACTION_STATE_IDLE || actionState == ACTION_STATE_WALK || actionState == ACTION_STATE_RUN))
|
||||||
{
|
{
|
||||||
D_802B7CB8_E20DC8->unk_23 = 3;
|
D_802B7CB8_E20DC8->unk_23 = 3;
|
||||||
|
@ -41,7 +41,7 @@ s32 func_802B704C(void) {
|
|||||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||||
|
|
||||||
if (!is_starting_conversation()) {
|
if (!is_starting_conversation()) {
|
||||||
if (!(playerStatus->flags & PS_FLAGS_20)) {
|
if (!(playerStatus->flags & PS_FLAGS_PAUSED)) {
|
||||||
if (playerStatus->animFlags & PA_FLAGS_USING_PULSE_STONE) {
|
if (playerStatus->animFlags & PA_FLAGS_USING_PULSE_STONE) {
|
||||||
if (!has_valid_conversation_npc()) {
|
if (!has_valid_conversation_npc()) {
|
||||||
if (!func_800E06D8()) {
|
if (!func_800E06D8()) {
|
||||||
|
@ -115,7 +115,7 @@ void func_802B735C_E2290C(void) {
|
|||||||
{
|
{
|
||||||
cond = gGameStatusPtr->keepUsingPartnerOnMapChange;
|
cond = gGameStatusPtr->keepUsingPartnerOnMapChange;
|
||||||
} else {
|
} else {
|
||||||
cond = playerStatus->flags & (PS_FLAGS_INPUT_DISABLED | PS_FLAGS_1000);
|
cond = playerStatus->flags & (PS_FLAGS_INPUT_DISABLED | PS_FLAGS_NO_STATIC_COLLISION);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!cond) {
|
if (!cond) {
|
||||||
@ -123,7 +123,7 @@ void func_802B735C_E2290C(void) {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
if (playerStatus->flags & PS_FLAGS_20) {
|
if (playerStatus->flags & PS_FLAGS_PAUSED) {
|
||||||
D_802B7C78_E23228->unk_24 = 3;
|
D_802B7C78_E23228->unk_24 = 3;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -140,7 +140,7 @@ void func_802B735C_E2290C(void) {
|
|||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
D_802B7C78_E23228->scale = 0.53f;
|
D_802B7C78_E23228->scale = 0.53f;
|
||||||
if (D_802B7C78_E23228->unk_18 >= 47 || playerStatus->flags & PS_FLAGS_20) {
|
if (D_802B7C78_E23228->unk_18 >= 47 || playerStatus->flags & PS_FLAGS_PAUSED) {
|
||||||
D_802B7C78_E23228->unk_28 -= 64;
|
D_802B7C78_E23228->unk_28 -= 64;
|
||||||
if (D_802B7C78_E23228->unk_28 < 0) {
|
if (D_802B7C78_E23228->unk_28 < 0) {
|
||||||
D_802B7C78_E23228->unk_28 = 0;
|
D_802B7C78_E23228->unk_28 = 0;
|
||||||
|
@ -243,7 +243,7 @@ ApiStatus N(DropBlock)(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
entity->collisionTimer = 0;
|
entity->collisionTimer = 0;
|
||||||
collisionStatus->lastWallHammered = entityIndex | COLLISION_WITH_ENTITY_BIT;
|
collisionStatus->lastWallHammered = entityIndex | COLLISION_WITH_ENTITY_BIT;
|
||||||
playerStatus->flags |= PS_FLAGS_1000000;
|
playerStatus->flags |= PS_FLAGS_HAMMER_CHECK;
|
||||||
entity->collisionFlags = ENTITY_COLLISION_PLAYER_HAMMER;
|
entity->collisionFlags = ENTITY_COLLISION_PLAYER_HAMMER;
|
||||||
playerStatus->actionState = ACTION_STATE_HAMMER;
|
playerStatus->actionState = ACTION_STATE_HAMMER;
|
||||||
entity->blueprint->fpHandleCollision(entity);
|
entity->blueprint->fpHandleCollision(entity);
|
||||||
|
@ -76,7 +76,7 @@ void func_80032970(Camera* camera, f32 arg1) {
|
|||||||
camera->unk_514 = 1.0f;
|
camera->unk_514 = 1.0f;
|
||||||
camera->unk_510 = 0.0f;
|
camera->unk_510 = 0.0f;
|
||||||
} else {
|
} else {
|
||||||
if (gPlayerStatusPtr->animFlags & PA_FLAGS_400000) {
|
if (gPlayerStatusPtr->animFlags & PA_FLAGS_RIDING_PARTNER) {
|
||||||
stickX = gPartnerActionStatus.stickX;
|
stickX = gPartnerActionStatus.stickX;
|
||||||
} else {
|
} else {
|
||||||
stickX = gPlayerStatusPtr->stickAxis[0];
|
stickX = gPlayerStatusPtr->stickAxis[0];
|
||||||
|
@ -91,10 +91,10 @@ void func_802B742C(void) {
|
|||||||
f32 unk10;
|
f32 unk10;
|
||||||
Npc* npc;
|
Npc* npc;
|
||||||
|
|
||||||
if (((playerStatus->flags & (PS_FLAGS_HAS_CONVERSATION_NPC | PS_FLAGS_40000 | PS_FLAGS_20))
|
if (((playerStatus->flags & (PS_FLAGS_HAS_CONVERSATION_NPC | PS_FLAGS_ENTERING_BATTLE | PS_FLAGS_PAUSED))
|
||||||
!= PS_FLAGS_HAS_CONVERSATION_NPC) ||
|
!= PS_FLAGS_HAS_CONVERSATION_NPC) ||
|
||||||
(gEncounterState == ENCOUNTER_STATE_CONVERSATION) ||
|
(gEncounterState == ENCOUNTER_STATE_CONVERSATION) ||
|
||||||
(playerStatus->animFlags & PA_FLAGS_HOLDING_WATT) ||
|
(playerStatus->animFlags & PA_FLAGS_USING_WATT) ||
|
||||||
(playerStatus->inputEnabledCounter != 0) ||
|
(playerStatus->inputEnabledCounter != 0) ||
|
||||||
(playerStatus->animFlags & PA_FLAGS_SPINNING))
|
(playerStatus->animFlags & PA_FLAGS_SPINNING))
|
||||||
{
|
{
|
||||||
|
@ -651,7 +651,7 @@ void update_encounters_neutral(void) {
|
|||||||
|
|
||||||
if (currentEncounter->battleTriggerCooldown != 0 ||
|
if (currentEncounter->battleTriggerCooldown != 0 ||
|
||||||
gGameStatusPtr->debugEnemyContact == 1 ||
|
gGameStatusPtr->debugEnemyContact == 1 ||
|
||||||
(playerStatus->flags & PS_FLAGS_80000) ||
|
(playerStatus->flags & PS_FLAGS_ARMS_RAISED) ||
|
||||||
(gOverrideFlags & GLOBAL_OVERRIDES_40) ||
|
(gOverrideFlags & GLOBAL_OVERRIDES_40) ||
|
||||||
gPartnerActionStatus.actingPartner == PARTNER_BOW ||
|
gPartnerActionStatus.actingPartner == PARTNER_BOW ||
|
||||||
(enemy->flags & ENEMY_FLAGS_1) ||
|
(enemy->flags & ENEMY_FLAGS_1) ||
|
||||||
@ -715,7 +715,7 @@ void update_encounters_neutral(void) {
|
|||||||
if (enemy->flags & ENEMY_FLAGS_IGNORE_HAMMER) {
|
if (enemy->flags & ENEMY_FLAGS_IGNORE_HAMMER) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (!(playerStatus->flags & PS_FLAGS_1000000)) {
|
if (!(playerStatus->flags & PS_FLAGS_HAMMER_CHECK)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (distance >= playerColRadius + colRadius || y > npcY + colHeight || npcY > y + playerColHeight) {
|
if (distance >= playerColRadius + colRadius || y > npcY + colHeight || npcY > y + playerColHeight) {
|
||||||
@ -896,14 +896,14 @@ void update_encounters_neutral(void) {
|
|||||||
testZ = playerStatus->position.z + ((npc->pos.z - playerStatus->position.z) * 0.5f);
|
testZ = playerStatus->position.z + ((npc->pos.z - playerStatus->position.z) * 0.5f);
|
||||||
fx_damage_stars(3, testX, testY, testZ, 0.0f, -1.0f, 0.0f, 3);
|
fx_damage_stars(3, testX, testY, testZ, 0.0f, -1.0f, 0.0f, 3);
|
||||||
currentEncounter->hitType = ENCOUNTER_TRIGGER_SPIN;
|
currentEncounter->hitType = ENCOUNTER_TRIGGER_SPIN;
|
||||||
playerStatus->animFlags |= PA_FLAGS_20000;
|
playerStatus->animFlags |= PA_FLAGS_DIZZY_ATTACK_ENCOUNTER;
|
||||||
enemy->encountered = ENCOUNTER_TRIGGER_SPIN;
|
enemy->encountered = ENCOUNTER_TRIGGER_SPIN;
|
||||||
currentEncounter->currentEncounter = encounter;
|
currentEncounter->currentEncounter = encounter;
|
||||||
currentEncounter->currentEnemy = enemy;
|
currentEncounter->currentEnemy = enemy;
|
||||||
currentEncounter->firstStrikeType = FIRST_STRIKE_NONE;
|
currentEncounter->firstStrikeType = FIRST_STRIKE_NONE;
|
||||||
} else {
|
} else {
|
||||||
currentEncounter->hitType = ENCOUNTER_TRIGGER_NONE;
|
currentEncounter->hitType = ENCOUNTER_TRIGGER_NONE;
|
||||||
playerStatus->animFlags &= ~PA_FLAGS_20000;
|
playerStatus->animFlags &= ~PA_FLAGS_DIZZY_ATTACK_ENCOUNTER;
|
||||||
enemy->encountered = ENCOUNTER_TRIGGER_NONE;
|
enemy->encountered = ENCOUNTER_TRIGGER_NONE;
|
||||||
currentEncounter->currentEncounter = encounter;
|
currentEncounter->currentEncounter = encounter;
|
||||||
currentEncounter->currentEnemy = enemy;
|
currentEncounter->currentEnemy = enemy;
|
||||||
@ -976,7 +976,7 @@ START_BATTLE:
|
|||||||
playerStatus->actionState != ACTION_STATE_TORNADO_POUND &&
|
playerStatus->actionState != ACTION_STATE_TORNADO_POUND &&
|
||||||
playerStatus->actionState != ACTION_STATE_SPIN_JUMP &&
|
playerStatus->actionState != ACTION_STATE_SPIN_JUMP &&
|
||||||
playerStatus->actionState != ACTION_STATE_SPIN_POUND) {
|
playerStatus->actionState != ACTION_STATE_SPIN_POUND) {
|
||||||
playerStatus->flags |= PS_FLAGS_40000;
|
playerStatus->flags |= PS_FLAGS_ENTERING_BATTLE;
|
||||||
}
|
}
|
||||||
if (!is_ability_active(ABILITY_CHILL_OUT) && currentEncounter->firstStrikeType == FIRST_STRIKE_ENEMY) {
|
if (!is_ability_active(ABILITY_CHILL_OUT) && currentEncounter->firstStrikeType == FIRST_STRIKE_ENEMY) {
|
||||||
set_action_state(ACTION_STATE_ENEMY_FIRST_STRIKE);
|
set_action_state(ACTION_STATE_ENEMY_FIRST_STRIKE);
|
||||||
@ -1032,7 +1032,7 @@ START_BATTLE:
|
|||||||
currentEncounter->unk_94 = 0;
|
currentEncounter->unk_94 = 0;
|
||||||
D_8009A678 = 1;
|
D_8009A678 = 1;
|
||||||
gEncounterSubState = ENCOUNTER_SUBSTATE_PRE_BATTLE_INIT;
|
gEncounterSubState = ENCOUNTER_SUBSTATE_PRE_BATTLE_INIT;
|
||||||
playerStatus->flags |= PS_FLAGS_40000;
|
playerStatus->flags |= PS_FLAGS_ENTERING_BATTLE;
|
||||||
break;
|
break;
|
||||||
case ENCOUNTER_TRIGGER_JUMP:
|
case ENCOUNTER_TRIGGER_JUMP:
|
||||||
currentEnemy = enemy = currentEncounter->currentEnemy;
|
currentEnemy = enemy = currentEncounter->currentEnemy;
|
||||||
@ -1085,7 +1085,7 @@ START_BATTLE:
|
|||||||
}
|
}
|
||||||
disable_player_input();
|
disable_player_input();
|
||||||
partner_disable_input();
|
partner_disable_input();
|
||||||
playerStatus->flags |= PS_FLAGS_40000;
|
playerStatus->flags |= PS_FLAGS_ENTERING_BATTLE;
|
||||||
if (cond2) {
|
if (cond2) {
|
||||||
start_bounce_a();
|
start_bounce_a();
|
||||||
}
|
}
|
||||||
@ -1146,7 +1146,7 @@ START_BATTLE:
|
|||||||
currentEncounter->fadeOutAmount = 0;
|
currentEncounter->fadeOutAmount = 0;
|
||||||
currentEncounter->unk_94 = 0;
|
currentEncounter->unk_94 = 0;
|
||||||
currentEncounter->scriptedBattle = FALSE;
|
currentEncounter->scriptedBattle = FALSE;
|
||||||
playerStatus->flags |= PS_FLAGS_40000;
|
playerStatus->flags |= PS_FLAGS_ENTERING_BATTLE;
|
||||||
sfx_play_sound(0);
|
sfx_play_sound(0);
|
||||||
gEncounterState = ENCOUNTER_STATE_PRE_BATTLE;
|
gEncounterState = ENCOUNTER_STATE_PRE_BATTLE;
|
||||||
D_8009A678 = 1;
|
D_8009A678 = 1;
|
||||||
@ -1228,7 +1228,7 @@ START_BATTLE:
|
|||||||
currentEncounter->fadeOutAmount = 0;
|
currentEncounter->fadeOutAmount = 0;
|
||||||
currentEncounter->unk_94 = 0;
|
currentEncounter->unk_94 = 0;
|
||||||
currentEncounter->scriptedBattle = FALSE;
|
currentEncounter->scriptedBattle = FALSE;
|
||||||
playerStatus->flags |= PS_FLAGS_40000;
|
playerStatus->flags |= PS_FLAGS_ENTERING_BATTLE;
|
||||||
sfx_play_sound(0);
|
sfx_play_sound(0);
|
||||||
gEncounterState = ENCOUNTER_STATE_PRE_BATTLE;
|
gEncounterState = ENCOUNTER_STATE_PRE_BATTLE;
|
||||||
D_8009A678 = 1;
|
D_8009A678 = 1;
|
||||||
@ -1592,7 +1592,7 @@ void update_encounters_post_battle(void) {
|
|||||||
currentEncounter->fadeOutAccel = 1;
|
currentEncounter->fadeOutAccel = 1;
|
||||||
currentEncounter->battleStartCountdown = 0;
|
currentEncounter->battleStartCountdown = 0;
|
||||||
D_8009A670 = FALSE;
|
D_8009A670 = FALSE;
|
||||||
gPlayerStatus.flags &= ~PS_FLAGS_40000;
|
gPlayerStatus.flags &= ~PS_FLAGS_ENTERING_BATTLE;
|
||||||
if (currentEncounter->hitType == ENCOUNTER_TRIGGER_SPIN) {
|
if (currentEncounter->hitType == ENCOUNTER_TRIGGER_SPIN) {
|
||||||
D_8009A670 = TRUE;
|
D_8009A670 = TRUE;
|
||||||
}
|
}
|
||||||
|
@ -356,7 +356,7 @@ s32 entity_block_handle_collision(Entity* entity) {
|
|||||||
if (!(entity->collisionFlags & ENTITY_COLLISION_PLAYER_HAMMER)) {
|
if (!(entity->collisionFlags & ENTITY_COLLISION_PLAYER_HAMMER)) {
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
if (!(playerStatus->flags & PS_FLAGS_1000000)) {
|
if (!(playerStatus->flags & PS_FLAGS_HAMMER_CHECK)) {
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -61,7 +61,7 @@ void entity_BlueWarpPipe_idle(Entity* entity) {
|
|||||||
if ((entity->collisionFlags & ENTITY_COLLISION_PLAYER_TOUCH_FLOOR) != 0) {
|
if ((entity->collisionFlags & ENTITY_COLLISION_PLAYER_TOUCH_FLOOR) != 0) {
|
||||||
gOverrideFlags |= GLOBAL_OVERRIDES_40;
|
gOverrideFlags |= GLOBAL_OVERRIDES_40;
|
||||||
|
|
||||||
if (!(playerStatus->flags & (PS_FLAGS_1000 | PS_FLAGS_INPUT_DISABLED))) {
|
if (!(playerStatus->flags & (PS_FLAGS_NO_STATIC_COLLISION | PS_FLAGS_INPUT_DISABLED))) {
|
||||||
s32 stickAxisX = abs(playerStatus->stickAxis[0]);
|
s32 stickAxisX = abs(playerStatus->stickAxis[0]);
|
||||||
s32 stickAxisZ = playerStatus->stickAxis[1];
|
s32 stickAxisZ = playerStatus->stickAxis[1];
|
||||||
|
|
||||||
|
@ -125,7 +125,7 @@ void entity_Chest_idle(Entity* entity) {
|
|||||||
|
|
||||||
rotation = clamp_angle(180.0f - entity->rotation.y);
|
rotation = clamp_angle(180.0f - entity->rotation.y);
|
||||||
angle = fabsf(rotation - clamp_angle(atan2(entity->position.x, entity->position.z, playerStatus->position.x, playerStatus->position.z)));
|
angle = fabsf(rotation - clamp_angle(atan2(entity->position.x, entity->position.z, playerStatus->position.x, playerStatus->position.z)));
|
||||||
if ((!(playerStatus->animFlags & PA_FLAGS_HOLDING_WATT)) &&
|
if ((!(playerStatus->animFlags & PA_FLAGS_USING_WATT)) &&
|
||||||
(!(entity->collisionFlags & ENTITY_COLLISION_PLAYER_TOUCH_FLOOR)) &&
|
(!(entity->collisionFlags & ENTITY_COLLISION_PLAYER_TOUCH_FLOOR)) &&
|
||||||
((angle <= 40.0f) || (angle >= 320.0f))) {
|
((angle <= 40.0f) || (angle >= 320.0f))) {
|
||||||
entity->flags |= ENTITY_FLAGS_SHOWS_INSPECT_PROMPT;
|
entity->flags |= ENTITY_FLAGS_SHOWS_INSPECT_PROMPT;
|
||||||
|
@ -125,7 +125,7 @@ void entity_HiddenPanel_flip_over(Entity* entity) {
|
|||||||
data->rotationSpeed = 65.0f;
|
data->rotationSpeed = 65.0f;
|
||||||
set_time_freeze_mode(TIME_FREEZE_PARTIAL);
|
set_time_freeze_mode(TIME_FREEZE_PARTIAL);
|
||||||
disable_player_static_collisions();
|
disable_player_static_collisions();
|
||||||
gPlayerStatusPtr->animFlags |= PA_FLAGS_800;
|
gPlayerStatusPtr->animFlags |= PA_FLAGS_OPENED_HIDDEN_PANEL;
|
||||||
if (data->needSpawnItem) {
|
if (data->needSpawnItem) {
|
||||||
data->needSpawnItem = FALSE;
|
data->needSpawnItem = FALSE;
|
||||||
data->spawnedItemIndex = make_item_entity_nodelay(data->itemID, entity->position.x, entity->position.y + 2.0, entity->position.z, ITEM_SPAWN_MODE_TOSS_NEVER_VANISH, data->pickupVar);
|
data->spawnedItemIndex = make_item_entity_nodelay(data->itemID, entity->position.x, entity->position.y + 2.0, entity->position.z, ITEM_SPAWN_MODE_TOSS_NEVER_VANISH, data->pickupVar);
|
||||||
@ -232,7 +232,7 @@ void entity_HiddenPanel_flip_over(Entity* entity) {
|
|||||||
exec_entity_commandlist(entity);
|
exec_entity_commandlist(entity);
|
||||||
if (data->unk_02) {
|
if (data->unk_02) {
|
||||||
set_time_freeze_mode(TIME_FREEZE_NORMAL);
|
set_time_freeze_mode(TIME_FREEZE_NORMAL);
|
||||||
gPlayerStatusPtr->animFlags &= ~PA_FLAGS_800;
|
gPlayerStatusPtr->animFlags &= ~PA_FLAGS_OPENED_HIDDEN_PANEL;
|
||||||
}
|
}
|
||||||
entity->flags &= ~ENTITY_FLAGS_DISABLE_COLLISION;
|
entity->flags &= ~ENTITY_FLAGS_DISABLE_COLLISION;
|
||||||
if (data->standingNpcIndex >= 0) {
|
if (data->standingNpcIndex >= 0) {
|
||||||
|
@ -33,7 +33,7 @@ void entity_ItemBlock_idle(Entity* entity) {
|
|||||||
void entity_HiddenItemBlock_idle(Entity* entity) {
|
void entity_HiddenItemBlock_idle(Entity* entity) {
|
||||||
s32 alpha = entity->alpha;
|
s32 alpha = entity->alpha;
|
||||||
|
|
||||||
if (gPlayerStatus.animFlags & PA_FLAGS_HOLDING_WATT) {
|
if (gPlayerStatus.animFlags & PA_FLAGS_USING_WATT) {
|
||||||
alpha += 32;
|
alpha += 32;
|
||||||
if (alpha > 192) {
|
if (alpha > 192) {
|
||||||
alpha = 192;
|
alpha = 192;
|
||||||
@ -211,7 +211,7 @@ s32 entity_TriggerBlock_start_bound_script(Entity* entity) {
|
|||||||
void entity_TriggerBlock_disable_player_input(void) {
|
void entity_TriggerBlock_disable_player_input(void) {
|
||||||
disable_player_input();
|
disable_player_input();
|
||||||
gPlayerStatus.currentSpeed = 0.0f;
|
gPlayerStatus.currentSpeed = 0.0f;
|
||||||
gPlayerStatus.flags |= PS_FLAGS_800000;
|
gPlayerStatus.flags |= PS_FLAGS_SCRIPTED_FALL;
|
||||||
set_action_state(ACTION_STATE_FALLING);
|
set_action_state(ACTION_STATE_FALLING);
|
||||||
gravity_use_fall_parms();
|
gravity_use_fall_parms();
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@ void entity_Signpost_idle(Entity* entity) {
|
|||||||
f32 val = fabsf(clamp_angle(180.0f - entity->rotation.y) - clamp_angle(atan2(entity->position.x, entity->position.z,
|
f32 val = fabsf(clamp_angle(180.0f - entity->rotation.y) - clamp_angle(atan2(entity->position.x, entity->position.z,
|
||||||
playerStatus->position.x, playerStatus->position.z)));
|
playerStatus->position.x, playerStatus->position.z)));
|
||||||
|
|
||||||
if (!(playerStatus->animFlags & PA_FLAGS_HOLDING_WATT) && !(entity->collisionFlags & ENTITY_COLLISION_PLAYER_TOUCH_FLOOR) && (val <= 40.0f || val >= 320.0f)) {
|
if (!(playerStatus->animFlags & PA_FLAGS_USING_WATT) && !(entity->collisionFlags & ENTITY_COLLISION_PLAYER_TOUCH_FLOOR) && (val <= 40.0f || val >= 320.0f)) {
|
||||||
entity->flags |= ENTITY_FLAGS_SHOWS_INSPECT_PROMPT;
|
entity->flags |= ENTITY_FLAGS_SHOWS_INSPECT_PROMPT;
|
||||||
if ((playerStatus->animFlags & PA_FLAGS_INTERACT_PROMPT_AVAILABLE) && (entity->collisionFlags & ENTITY_COLLISION_PLAYER_TOUCH_WALL)) {
|
if ((playerStatus->animFlags & PA_FLAGS_INTERACT_PROMPT_AVAILABLE) && (entity->collisionFlags & ENTITY_COLLISION_PLAYER_TOUCH_WALL)) {
|
||||||
entity_start_script(entity);
|
entity_start_script(entity);
|
||||||
|
@ -16,7 +16,7 @@ void entity_ScriptSpring_idle(Entity* entity) {
|
|||||||
if (playerStatus->actionState != ACTION_STATE_RIDE && (entity->collisionFlags & ENTITY_COLLISION_PLAYER_TOUCH_FLOOR)) {
|
if (playerStatus->actionState != ACTION_STATE_RIDE && (entity->collisionFlags & ENTITY_COLLISION_PLAYER_TOUCH_FLOOR)) {
|
||||||
playerStatus->camResetDelay = 5;
|
playerStatus->camResetDelay = 5;
|
||||||
playerStatus->flags &= ~PS_FLAGS_FALLING;
|
playerStatus->flags &= ~PS_FLAGS_FALLING;
|
||||||
playerStatus->flags |= PS_FLAGS_800000;
|
playerStatus->flags |= PS_FLAGS_SCRIPTED_FALL;
|
||||||
play_model_animation(entity->virtualModelIndex, Entity_ScriptSpring_AnimLaunch);
|
play_model_animation(entity->virtualModelIndex, Entity_ScriptSpring_AnimLaunch);
|
||||||
if (entity_start_script(entity)) {
|
if (entity_start_script(entity)) {
|
||||||
set_action_state(ACTION_STATE_USE_SPRING);
|
set_action_state(ACTION_STATE_USE_SPRING);
|
||||||
|
@ -438,7 +438,7 @@ void entity_base_switch_init(Entity* entity) {
|
|||||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||||
SwitchData* data = entity->dataBuf.swtch;
|
SwitchData* data = entity->dataBuf.swtch;
|
||||||
|
|
||||||
playerStatus->animFlags |= PA_FLAGS_1000000;
|
playerStatus->animFlags |= PA_FLAGS_MAP_HAS_SWITCH;
|
||||||
data->baseScale.x = 1.0f;
|
data->baseScale.x = 1.0f;
|
||||||
data->baseScale.y = 1.0f;
|
data->baseScale.y = 1.0f;
|
||||||
data->baseScale.z = 1.0f;
|
data->baseScale.z = 1.0f;
|
||||||
|
@ -39,7 +39,7 @@ void entity_ArrowSign_init(Entity* entity) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
s32 entity_ArrowSign_handle_collision(Entity* entity) {
|
s32 entity_ArrowSign_handle_collision(Entity* entity) {
|
||||||
if (!(gPlayerStatus.animFlags & PA_FLAGS_HOLDING_WATT) &&
|
if (!(gPlayerStatus.animFlags & PA_FLAGS_USING_WATT) &&
|
||||||
(entity->collisionFlags & ENTITY_COLLISION_PLAYER_TOUCH_WALL)) {
|
(entity->collisionFlags & ENTITY_COLLISION_PLAYER_TOUCH_WALL)) {
|
||||||
entity_start_script(entity);
|
entity_start_script(entity);
|
||||||
}
|
}
|
||||||
|
@ -279,7 +279,7 @@ void entity_CymbalPlant_idle(Entity* entity) {
|
|||||||
playerStatus->animFlags |= PA_FLAGS_INTERRUPT_USE_PARTNER;
|
playerStatus->animFlags |= PA_FLAGS_INTERRUPT_USE_PARTNER;
|
||||||
}
|
}
|
||||||
func_800EF300();
|
func_800EF300();
|
||||||
playerStatus->animFlags |= PA_FLAGS_40000;
|
playerStatus->animFlags |= PA_FLAGS_INTERRUPT_SPIN;
|
||||||
data->timer = 4;
|
data->timer = 4;
|
||||||
data->unk_01++;
|
data->unk_01++;
|
||||||
data->state++;
|
data->state++;
|
||||||
@ -293,14 +293,14 @@ void entity_CymbalPlant_idle(Entity* entity) {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
playerStatus->animFlags |= PA_FLAGS_40000;
|
playerStatus->animFlags |= PA_FLAGS_INTERRUPT_SPIN;
|
||||||
if (--data->timer == 0) {
|
if (--data->timer == 0) {
|
||||||
start_rumble(128, 10);
|
start_rumble(128, 10);
|
||||||
data->timer = 30;
|
data->timer = 30;
|
||||||
data->state++;
|
data->state++;
|
||||||
yaw = playerStatus->spriteFacingAngle;
|
yaw = playerStatus->spriteFacingAngle;
|
||||||
playerStatus->spriteFacingAngle = 80.0f;
|
playerStatus->spriteFacingAngle = 80.0f;
|
||||||
playerStatus->flags |= PS_FLAGS_100000;
|
playerStatus->flags |= PS_FLAGS_ROTATION_LOCKED;
|
||||||
D_802BCE20 = yaw;
|
D_802BCE20 = yaw;
|
||||||
}
|
}
|
||||||
func_802BB98C_E2E2BC(entity);
|
func_802BB98C_E2E2BC(entity);
|
||||||
@ -330,7 +330,7 @@ void entity_CymbalPlant_idle(Entity* entity) {
|
|||||||
data->state++;
|
data->state++;
|
||||||
func_802DDEE4(0, -1, 0, 0, 0, 0, 0, 0);
|
func_802DDEE4(0, -1, 0, 0, 0, 0, 0, 0);
|
||||||
enable_player_input();
|
enable_player_input();
|
||||||
playerStatus->flags &= ~PS_FLAGS_100000;
|
playerStatus->flags &= ~PS_FLAGS_ROTATION_LOCKED;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
|
@ -209,7 +209,7 @@ void entity_Tweester_idle(Entity* entity) {
|
|||||||
|
|
||||||
if (get_time_freeze_mode() == TIME_FREEZE_NORMAL &&
|
if (get_time_freeze_mode() == TIME_FREEZE_NORMAL &&
|
||||||
!is_picking_up_item() &&
|
!is_picking_up_item() &&
|
||||||
!(playerStatus->flags & PS_FLAGS_20) &&
|
!(playerStatus->flags & PS_FLAGS_PAUSED) &&
|
||||||
(playerData->currentPartner != PARTNER_GOOMBARIO ||
|
(playerData->currentPartner != PARTNER_GOOMBARIO ||
|
||||||
playerStatus->inputEnabledCounter == 0 ||
|
playerStatus->inputEnabledCounter == 0 ||
|
||||||
playerStatus->actionState == ACTION_STATE_USE_TWEESTER
|
playerStatus->actionState == ACTION_STATE_USE_TWEESTER
|
||||||
@ -274,7 +274,7 @@ void entity_Tweester_idle(Entity* entity) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!is_picking_up_item() &&
|
if (!is_picking_up_item() &&
|
||||||
!(playerStatus->flags & PS_FLAGS_20) &&
|
!(playerStatus->flags & PS_FLAGS_PAUSED) &&
|
||||||
playerStatus->actionState != ACTION_STATE_USE_TWEESTER &&
|
playerStatus->actionState != ACTION_STATE_USE_TWEESTER &&
|
||||||
playerStatus->blinkTimer == 0 &&
|
playerStatus->blinkTimer == 0 &&
|
||||||
fabs(dist2D(entity->position.x, entity->position.z, playerStatus->position.x, playerStatus->position.z)) <= 50.0
|
fabs(dist2D(entity->position.x, entity->position.z, playerStatus->position.x, playerStatus->position.z)) <= 50.0
|
||||||
|
@ -44,7 +44,7 @@ ApiStatus DisablePlayerInput(Evt* script, s32 isInitialCall) {
|
|||||||
close_status_menu();
|
close_status_menu();
|
||||||
func_800E984C();
|
func_800E984C();
|
||||||
if (playerStatus->actionState == ACTION_STATE_SPIN) {
|
if (playerStatus->actionState == ACTION_STATE_SPIN) {
|
||||||
playerStatus->animFlags |= PA_FLAGS_40000;
|
playerStatus->animFlags |= PA_FLAGS_INTERRUPT_SPIN;
|
||||||
}
|
}
|
||||||
gOverrideFlags |= GLOBAL_OVERRIDES_40;
|
gOverrideFlags |= GLOBAL_OVERRIDES_40;
|
||||||
} else {
|
} else {
|
||||||
@ -253,11 +253,11 @@ s32 player_jump(Evt* script, s32 isInitialCall, s32 mode) {
|
|||||||
|
|
||||||
playerNpc->jumpVelocity = (playerNpc->jumpScale * (playerNpc->duration - 1) / 2) + (yTemp / playerNpc->duration);
|
playerNpc->jumpVelocity = (playerNpc->jumpScale * (playerNpc->duration - 1) / 2) + (yTemp / playerNpc->duration);
|
||||||
playerStatus->flags |= PS_FLAGS_FLYING;
|
playerStatus->flags |= PS_FLAGS_FLYING;
|
||||||
playerStatus->animFlags |= PA_FLAGS_10000000;
|
playerStatus->animFlags |= PA_FLAGS_NO_OOB_RESPAWN;
|
||||||
|
|
||||||
if (mode == 0) {
|
if (mode == 0) {
|
||||||
if (!(playerStatus->animFlags & PA_FLAGS_8BIT_MARIO)) {
|
if (!(playerStatus->animFlags & PA_FLAGS_8BIT_MARIO)) {
|
||||||
if (!(playerStatus->animFlags & PA_FLAGS_HOLDING_WATT)) {
|
if (!(playerStatus->animFlags & PA_FLAGS_USING_WATT)) {
|
||||||
anim = ANIM_Mario_AnimMidairStill;
|
anim = ANIM_Mario_AnimMidairStill;
|
||||||
} else {
|
} else {
|
||||||
anim = ANIM_Mario_60009;
|
anim = ANIM_Mario_60009;
|
||||||
@ -278,7 +278,7 @@ s32 player_jump(Evt* script, s32 isInitialCall, s32 mode) {
|
|||||||
|
|
||||||
if (mode == 0 && jumpVelocity > 0.0f && playerNpc->jumpVelocity <= 0.0f) {
|
if (mode == 0 && jumpVelocity > 0.0f && playerNpc->jumpVelocity <= 0.0f) {
|
||||||
if (!(playerStatus->animFlags & PA_FLAGS_8BIT_MARIO)) {
|
if (!(playerStatus->animFlags & PA_FLAGS_8BIT_MARIO)) {
|
||||||
if (!(playerStatus->animFlags & PA_FLAGS_HOLDING_WATT)) {
|
if (!(playerStatus->animFlags & PA_FLAGS_USING_WATT)) {
|
||||||
anim = ANIM_Mario_AnimMidair;
|
anim = ANIM_Mario_AnimMidair;
|
||||||
} else {
|
} else {
|
||||||
anim = ANIM_Mario_6000A;
|
anim = ANIM_Mario_6000A;
|
||||||
@ -300,11 +300,11 @@ s32 player_jump(Evt* script, s32 isInitialCall, s32 mode) {
|
|||||||
playerNpc->duration--;
|
playerNpc->duration--;
|
||||||
if (playerNpc->duration == 0) {
|
if (playerNpc->duration == 0) {
|
||||||
playerStatus->flags &= ~PS_FLAGS_FLYING;
|
playerStatus->flags &= ~PS_FLAGS_FLYING;
|
||||||
playerStatus->animFlags &= ~PA_FLAGS_10000000;
|
playerStatus->animFlags &= ~PA_FLAGS_NO_OOB_RESPAWN;
|
||||||
|
|
||||||
if (mode == 0) {
|
if (mode == 0) {
|
||||||
if (!(playerStatus->animFlags & PA_FLAGS_8BIT_MARIO)) {
|
if (!(playerStatus->animFlags & PA_FLAGS_8BIT_MARIO)) {
|
||||||
if (!(playerStatus->animFlags & PA_FLAGS_HOLDING_WATT)) {
|
if (!(playerStatus->animFlags & PA_FLAGS_USING_WATT)) {
|
||||||
anim = ANIM_Mario_10009;
|
anim = ANIM_Mario_10009;
|
||||||
} else {
|
} else {
|
||||||
anim = ANIM_Mario_6000B;
|
anim = ANIM_Mario_6000B;
|
||||||
@ -323,8 +323,8 @@ s32 player_jump(Evt* script, s32 isInitialCall, s32 mode) {
|
|||||||
|
|
||||||
if (colliderID >= 0) {
|
if (colliderID >= 0) {
|
||||||
playerStatus->position.y = yTemp;
|
playerStatus->position.y = yTemp;
|
||||||
func_800E315C(colliderID);
|
player_handle_floor_collider_type(colliderID);
|
||||||
func_800EFD08();
|
handle_floor_behavior();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -568,7 +568,7 @@ ApiStatus UseExitHeading(Evt* script, s32 isInitialCall) {
|
|||||||
script->varTable[3] = (playerStatus->position.z - (var1 * cosTheta)) - (exitTangentFrac * sinTheta);
|
script->varTable[3] = (playerStatus->position.z - (var1 * cosTheta)) - (exitTangentFrac * sinTheta);
|
||||||
script->varTable[2] = (*mapSettings->entryList)[entryID].y;
|
script->varTable[2] = (*mapSettings->entryList)[entryID].y;
|
||||||
*varTableVar5 = var1 / 15;
|
*varTableVar5 = var1 / 15;
|
||||||
playerStatus->animFlags |= PA_FLAGS_100000;
|
playerStatus->animFlags |= PA_FLAGS_CHANGING_MAP;
|
||||||
playerStatus->flags |= PS_FLAGS_CAMERA_DOESNT_FOLLOW;
|
playerStatus->flags |= PS_FLAGS_CAMERA_DOESNT_FOLLOW;
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
@ -801,7 +801,7 @@ ApiStatus Disable8bitMario(Evt* script, s32 isInitialCall) {
|
|||||||
playerStatus->colliderHeight = 19;
|
playerStatus->colliderHeight = 19;
|
||||||
playerStatus->colliderDiameter = 26;
|
playerStatus->colliderDiameter = 26;
|
||||||
playerStatus->animFlags |= PA_FLAGS_8BIT_MARIO
|
playerStatus->animFlags |= PA_FLAGS_8BIT_MARIO
|
||||||
| PA_FLAGS_40000
|
| PA_FLAGS_INTERRUPT_SPIN
|
||||||
| PA_FLAGS_INTERRUPT_USE_PARTNER;
|
| PA_FLAGS_INTERRUPT_USE_PARTNER;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -531,7 +531,7 @@ void update_npcs(void) {
|
|||||||
f32 x, y, z;
|
f32 x, y, z;
|
||||||
f32 hitYaw, hitPitch, hitLength;
|
f32 hitYaw, hitPitch, hitLength;
|
||||||
|
|
||||||
playerStatus->animFlags &= ~PA_FLAGS_8000;
|
playerStatus->animFlags &= ~PA_FLAGS_NPC_COLLIDED;
|
||||||
if (!(gOverrideFlags & (GLOBAL_OVERRIDES_800 | GLOBAL_OVERRIDES_400))) {
|
if (!(gOverrideFlags & (GLOBAL_OVERRIDES_800 | GLOBAL_OVERRIDES_400))) {
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
|
@ -232,7 +232,7 @@ void action_update_hammer(void) {
|
|||||||
s32 soundID;
|
s32 soundID;
|
||||||
|
|
||||||
playerStatus->flags &= ~PS_FLAGS_ACTION_STATE_CHANGED;
|
playerStatus->flags &= ~PS_FLAGS_ACTION_STATE_CHANGED;
|
||||||
playerStatus->flags |= PS_FLAGS_200000;
|
playerStatus->flags |= PS_FLAGS_NO_FLIPPING;
|
||||||
HammerHit->timer = 0;
|
HammerHit->timer = 0;
|
||||||
playerStatus->actionSubstate = SUBSTATE_HAMMER_0;
|
playerStatus->actionSubstate = SUBSTATE_HAMMER_0;
|
||||||
playerStatus->currentSpeed = 0.0f;
|
playerStatus->currentSpeed = 0.0f;
|
||||||
@ -268,9 +268,10 @@ void action_update_hammer(void) {
|
|||||||
HammerHit->unk_14 = 0;
|
HammerHit->unk_14 = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
playerStatus->flags &= ~PS_FLAGS_1000000;
|
playerStatus->flags &= ~PS_FLAGS_HAMMER_CHECK;
|
||||||
if (HammerHit->timer < 3 && (playerStatus->flags & PS_FLAGS_40000)) {
|
if (HammerHit->timer < 3 && (playerStatus->flags & PS_FLAGS_ENTERING_BATTLE)) {
|
||||||
playerStatus->flags |= PS_FLAGS_20000000;
|
// This is probably to stop Mario from triggering multiple battles at once by hammering while one is starting.
|
||||||
|
playerStatus->flags |= PS_FLAGS_TIME_STOPPED;
|
||||||
} else if (HammerHit->timer < 2) {
|
} else if (HammerHit->timer < 2) {
|
||||||
HammerHit->timer++;
|
HammerHit->timer++;
|
||||||
} else {
|
} else {
|
||||||
@ -381,9 +382,9 @@ void func_802B6820_E256F0(void) {
|
|||||||
|
|
||||||
if (collisionStatus->lastWallHammered >= 0 && (collisionStatus->lastWallHammered & COLLISION_WITH_ENTITY_BIT)) {
|
if (collisionStatus->lastWallHammered >= 0 && (collisionStatus->lastWallHammered & COLLISION_WITH_ENTITY_BIT)) {
|
||||||
get_entity_by_index(collisionStatus->lastWallHammered)->collisionTimer = 0;
|
get_entity_by_index(collisionStatus->lastWallHammered)->collisionTimer = 0;
|
||||||
playerStatus->flags |= PS_FLAGS_1000000;
|
playerStatus->flags |= PS_FLAGS_HAMMER_CHECK;
|
||||||
} else if (HammerHit->hitID < 0) {
|
} else if (HammerHit->hitID < 0) {
|
||||||
playerStatus->flags |= PS_FLAGS_1000000;
|
playerStatus->flags |= PS_FLAGS_HAMMER_CHECK;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (HammerHit->hitID < 0 && gPlayerData.hammerLevel >= 2) {
|
if (HammerHit->hitID < 0 && gPlayerData.hammerLevel >= 2) {
|
||||||
@ -403,7 +404,7 @@ void func_802B6820_E256F0(void) {
|
|||||||
HammerHit->unk_14 = 1;
|
HammerHit->unk_14 = 1;
|
||||||
}
|
}
|
||||||
if (HammerHit->timer == 6) {
|
if (HammerHit->timer == 6) {
|
||||||
playerStatus->flags &= ~PS_FLAGS_200000;
|
playerStatus->flags &= ~PS_FLAGS_NO_FLIPPING;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (playerStatus->animNotifyValue == 1) {
|
if (playerStatus->animNotifyValue == 1) {
|
||||||
@ -414,9 +415,9 @@ void func_802B6820_E256F0(void) {
|
|||||||
HammerHit->unk_14 = 0;
|
HammerHit->unk_14 = 0;
|
||||||
ten = 10; // required to match
|
ten = 10; // required to match
|
||||||
if (HammerHit->unk_1C != 0 || HammerHit->timer > ten) {
|
if (HammerHit->unk_1C != 0 || HammerHit->timer > ten) {
|
||||||
playerStatus->flags &= ~PS_FLAGS_1000000;
|
playerStatus->flags &= ~PS_FLAGS_HAMMER_CHECK;
|
||||||
set_action_state(ACTION_STATE_IDLE);
|
set_action_state(ACTION_STATE_IDLE);
|
||||||
}
|
}
|
||||||
playerStatus->flags &= ~PS_FLAGS_200000;
|
playerStatus->flags &= ~PS_FLAGS_NO_FLIPPING;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@ void action_update_hit_fire(void) {
|
|||||||
playerStatus->flags &= ~PS_FLAGS_ACTION_STATE_CHANGED;
|
playerStatus->flags &= ~PS_FLAGS_ACTION_STATE_CHANGED;
|
||||||
|
|
||||||
playerStatus->animFlags |= PA_FLAGS_INTERRUPT_USE_PARTNER;
|
playerStatus->animFlags |= PA_FLAGS_INTERRUPT_USE_PARTNER;
|
||||||
playerStatus->flags |= (PS_FLAGS_800 | PS_FLAGS_FLYING);
|
playerStatus->flags |= (PS_FLAGS_HIT_FIRE | PS_FLAGS_FLYING);
|
||||||
|
|
||||||
suggest_player_anim_setUnkFlag(ANIM_Mario_Scared);
|
suggest_player_anim_setUnkFlag(ANIM_Mario_Scared);
|
||||||
|
|
||||||
@ -36,7 +36,7 @@ void action_update_hit_fire(void) {
|
|||||||
sin_cos_rad(DEG_TO_RAD(ReturnAngle), &dx, &dy);
|
sin_cos_rad(DEG_TO_RAD(ReturnAngle), &dx, &dy);
|
||||||
speed = playerStatus->currentSpeed;
|
speed = playerStatus->currentSpeed;
|
||||||
|
|
||||||
if (playerStatus->flags & PS_FLAGS_40000) {
|
if (playerStatus->flags & PS_FLAGS_ENTERING_BATTLE) {
|
||||||
speed *= 0.5;
|
speed *= 0.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -53,13 +53,13 @@ void action_update_hit_fire(void) {
|
|||||||
} else {
|
} else {
|
||||||
s32 colliderID;
|
s32 colliderID;
|
||||||
|
|
||||||
playerStatus->position.y = player_check_collision_below(func_800E34D8(), &colliderID);
|
playerStatus->position.y = player_check_collision_below(player_fall_distance(), &colliderID);
|
||||||
if (colliderID >= 0) {
|
if (colliderID >= 0) {
|
||||||
colliderID = get_collider_flags(colliderID); //TODO surfaceType
|
colliderID = get_collider_flags(colliderID); //TODO surfaceType
|
||||||
set_action_state(ACTION_STATE_LAND);
|
set_action_state(ACTION_STATE_LAND);
|
||||||
playerStatus->blinkTimer = 60;
|
playerStatus->blinkTimer = 60;
|
||||||
playerStatus->hazardType = HAZARD_TYPE_NONE;
|
playerStatus->hazardType = HAZARD_TYPE_NONE;
|
||||||
playerStatus->flags &= ~PS_FLAGS_800;
|
playerStatus->flags &= ~PS_FLAGS_HIT_FIRE;
|
||||||
gOverrideFlags &= ~GLOBAL_OVERRIDES_40;
|
gOverrideFlags &= ~GLOBAL_OVERRIDES_40;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -30,9 +30,9 @@ void action_update_hit_lava(void) {
|
|||||||
|
|
||||||
if (playerStatus->flags & PS_FLAGS_ACTION_STATE_CHANGED) {
|
if (playerStatus->flags & PS_FLAGS_ACTION_STATE_CHANGED) {
|
||||||
playerStatus->flags &= ~PS_FLAGS_ACTION_STATE_CHANGED;
|
playerStatus->flags &= ~PS_FLAGS_ACTION_STATE_CHANGED;
|
||||||
playerStatus->flags |= (PS_FLAGS_800000 | PS_FLAGS_FLYING);
|
playerStatus->flags |= (PS_FLAGS_SCRIPTED_FALL | PS_FLAGS_FLYING);
|
||||||
playerStatus->animFlags |= PA_FLAGS_INTERRUPT_USE_PARTNER;
|
playerStatus->animFlags |= PA_FLAGS_INTERRUPT_USE_PARTNER;
|
||||||
playerStatus->flags |= PS_FLAGS_800;
|
playerStatus->flags |= PS_FLAGS_HIT_FIRE;
|
||||||
if (playerStatus->hazardType == HAZARD_TYPE_LAVA) {
|
if (playerStatus->hazardType == HAZARD_TYPE_LAVA) {
|
||||||
playerStatus->actionSubstate = SUBSTATE_DELAY_INIT_SINK;
|
playerStatus->actionSubstate = SUBSTATE_DELAY_INIT_SINK;
|
||||||
playerStatus->currentStateTime = 2;
|
playerStatus->currentStateTime = 2;
|
||||||
@ -167,7 +167,7 @@ void action_update_hit_lava(void) {
|
|||||||
if (playerStatus->hazardType == HAZARD_TYPE_LAVA && (playerStatus->timeInAir % 2) == 0) {
|
if (playerStatus->hazardType == HAZARD_TYPE_LAVA && (playerStatus->timeInAir % 2) == 0) {
|
||||||
fx_smoke_burst(0, playerStatus->position.x, playerStatus->position.y, playerStatus->position.z, 0.7f, 18);
|
fx_smoke_burst(0, playerStatus->position.x, playerStatus->position.y, playerStatus->position.z, 0.7f, 18);
|
||||||
}
|
}
|
||||||
playerStatus->position.y = player_check_collision_below(func_800E34D8(), &completeAxes);
|
playerStatus->position.y = player_check_collision_below(player_fall_distance(), &completeAxes);
|
||||||
if (completeAxes >= 0) {
|
if (completeAxes >= 0) {
|
||||||
exec_ShakeCamX(0, 2, 1, 0.8f);
|
exec_ShakeCamX(0, 2, 1, 0.8f);
|
||||||
start_rumble(256, 50);
|
start_rumble(256, 50);
|
||||||
@ -175,7 +175,7 @@ void action_update_hit_lava(void) {
|
|||||||
gCameras[CAM_DEFAULT].moveFlags &= ~CAMERA_MOVE_FLAGS_2;
|
gCameras[CAM_DEFAULT].moveFlags &= ~CAMERA_MOVE_FLAGS_2;
|
||||||
sfx_play_sound_at_player(SOUND_3FB, 0);
|
sfx_play_sound_at_player(SOUND_3FB, 0);
|
||||||
suggest_player_anim_setUnkFlag(ANIM_Mario_8001A);
|
suggest_player_anim_setUnkFlag(ANIM_Mario_8001A);
|
||||||
playerStatus->flags &= ~PS_FLAGS_800;
|
playerStatus->flags &= ~PS_FLAGS_HIT_FIRE;
|
||||||
playerStatus->flags &= ~PS_FLAGS_FLYING;
|
playerStatus->flags &= ~PS_FLAGS_FLYING;
|
||||||
playerStatus->hazardType = HAZARD_TYPE_NONE;
|
playerStatus->hazardType = HAZARD_TYPE_NONE;
|
||||||
playerStatus->gravityIntegrator[0] = 6.0f;
|
playerStatus->gravityIntegrator[0] = 6.0f;
|
||||||
@ -194,7 +194,7 @@ void action_update_hit_lava(void) {
|
|||||||
case SUBSTATE_DELAY_DONE:
|
case SUBSTATE_DELAY_DONE:
|
||||||
if (--playerStatus->currentStateTime <= 0) {
|
if (--playerStatus->currentStateTime <= 0) {
|
||||||
set_action_state(ACTION_STATE_LAND);
|
set_action_state(ACTION_STATE_LAND);
|
||||||
playerStatus->flags &= ~PS_FLAGS_800000;
|
playerStatus->flags &= ~PS_FLAGS_SCRIPTED_FALL;
|
||||||
gOverrideFlags &= ~GLOBAL_OVERRIDES_40;
|
gOverrideFlags &= ~GLOBAL_OVERRIDES_40;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -50,7 +50,7 @@ void action_update_idle(void) {
|
|||||||
if (playerStatus->flags & PS_FLAGS_ACTION_STATE_CHANGED) {
|
if (playerStatus->flags & PS_FLAGS_ACTION_STATE_CHANGED) {
|
||||||
|
|
||||||
playerStatus->flags &= ~(PS_FLAGS_ACTION_STATE_CHANGED
|
playerStatus->flags &= ~(PS_FLAGS_ACTION_STATE_CHANGED
|
||||||
| PS_FLAGS_80000 | PS_FLAGS_AIRBORNE);
|
| PS_FLAGS_ARMS_RAISED | PS_FLAGS_AIRBORNE);
|
||||||
wasMoving = TRUE;
|
wasMoving = TRUE;
|
||||||
playerStatus->actionSubstate = SUBSTATE_IDLE_DEFAULT;
|
playerStatus->actionSubstate = SUBSTATE_IDLE_DEFAULT;
|
||||||
playerStatus->currentStateTime = 0;
|
playerStatus->currentStateTime = 0;
|
||||||
@ -61,7 +61,7 @@ void action_update_idle(void) {
|
|||||||
|
|
||||||
if (playerStatus->animFlags & PA_FLAGS_8BIT_MARIO) {
|
if (playerStatus->animFlags & PA_FLAGS_8BIT_MARIO) {
|
||||||
anim = ANIM_Mario_90002;
|
anim = ANIM_Mario_90002;
|
||||||
} else if (!(playerStatus->animFlags & PA_FLAGS_HOLDING_WATT)) {
|
} else if (!(playerStatus->animFlags & PA_FLAGS_USING_WATT)) {
|
||||||
anim = ANIM_Mario_10002;
|
anim = ANIM_Mario_10002;
|
||||||
} else if (playerStatus->prevActionState == ACTION_STATE_IDLE) {
|
} else if (playerStatus->prevActionState == ACTION_STATE_IDLE) {
|
||||||
anim = ANIM_Mario_60005;
|
anim = ANIM_Mario_60005;
|
||||||
@ -124,7 +124,7 @@ void action_update_idle_peach(void) {
|
|||||||
if (!(playerStatus->animFlags & PA_FLAGS_IN_DISGUISE)) {
|
if (!(playerStatus->animFlags & PA_FLAGS_IN_DISGUISE)) {
|
||||||
switch (playerStatus->actionSubstate) {
|
switch (playerStatus->actionSubstate) {
|
||||||
case SUBSTATE_IDLE_DEFAULT:
|
case SUBSTATE_IDLE_DEFAULT:
|
||||||
if (!(playerStatus->flags & (PS_FLAGS_1000 | PS_FLAGS_INPUT_DISABLED))
|
if (!(playerStatus->flags & (PS_FLAGS_NO_STATIC_COLLISION | PS_FLAGS_INPUT_DISABLED))
|
||||||
&& (playerStatus->peachItemHeld == 0)) {
|
&& (playerStatus->peachItemHeld == 0)) {
|
||||||
if (playerStatus->currentStateTime > 1800) {
|
if (playerStatus->currentStateTime > 1800) {
|
||||||
// begin first yawm
|
// begin first yawm
|
||||||
@ -153,7 +153,7 @@ void action_update_idle_peach(void) {
|
|||||||
break;
|
break;
|
||||||
case SUBSTATE_IDLE_SLEEP:
|
case SUBSTATE_IDLE_SLEEP:
|
||||||
// peach is asleep
|
// peach is asleep
|
||||||
if (playerStatus->flags & (PS_FLAGS_1000 | PS_FLAGS_INPUT_DISABLED)) {
|
if (playerStatus->flags & (PS_FLAGS_NO_STATIC_COLLISION | PS_FLAGS_INPUT_DISABLED)) {
|
||||||
suggest_player_anim_clearUnkFlag(ANIM_Peach_A0001);
|
suggest_player_anim_clearUnkFlag(ANIM_Peach_A0001);
|
||||||
playerStatus->actionSubstate = SUBSTATE_IDLE_DEFAULT;
|
playerStatus->actionSubstate = SUBSTATE_IDLE_DEFAULT;
|
||||||
} else if (playerStatus->animNotifyValue != 0) {
|
} else if (playerStatus->animNotifyValue != 0) {
|
||||||
|
@ -26,7 +26,7 @@ void initialize_jump(void) {
|
|||||||
|
|
||||||
if (playerStatus->animFlags & PA_FLAGS_8BIT_MARIO) {
|
if (playerStatus->animFlags & PA_FLAGS_8BIT_MARIO) {
|
||||||
anim = ANIM_Mario_90005;
|
anim = ANIM_Mario_90005;
|
||||||
} else if (!(playerStatus->animFlags & (PA_FLAGS_HOLDING_WATT | PA_FLAGS_2))) {
|
} else if (!(playerStatus->animFlags & (PA_FLAGS_USING_WATT | PA_FLAGS_WATT_IN_HANDS))) {
|
||||||
anim = ANIM_Mario_AnimMidairStill;
|
anim = ANIM_Mario_AnimMidairStill;
|
||||||
} else {
|
} else {
|
||||||
anim = ANIM_Mario_60009;
|
anim = ANIM_Mario_60009;
|
||||||
@ -63,7 +63,7 @@ void action_update_jump(void) {
|
|||||||
|
|
||||||
if (playerStatus->animFlags & PA_FLAGS_8BIT_MARIO) {
|
if (playerStatus->animFlags & PA_FLAGS_8BIT_MARIO) {
|
||||||
anim = ANIM_Mario_90005;
|
anim = ANIM_Mario_90005;
|
||||||
} else if (!(playerStatus->animFlags & (PA_FLAGS_HOLDING_WATT | PA_FLAGS_2))) {
|
} else if (!(playerStatus->animFlags & (PA_FLAGS_USING_WATT | PA_FLAGS_WATT_IN_HANDS))) {
|
||||||
anim = ANIM_Mario_AnimMidairStill;
|
anim = ANIM_Mario_AnimMidairStill;
|
||||||
} else {
|
} else {
|
||||||
anim = ANIM_Mario_60009;
|
anim = ANIM_Mario_60009;
|
||||||
@ -84,7 +84,7 @@ void action_update_landing_on_switch(void) {
|
|||||||
JumpedOnSwitchX = entity->position.x;
|
JumpedOnSwitchX = entity->position.x;
|
||||||
JumpedOnSwitchZ = entity->position.z;
|
JumpedOnSwitchZ = entity->position.z;
|
||||||
initialize_jump();
|
initialize_jump();
|
||||||
playerStatus->flags |= (PS_FLAGS_800000 | PS_FLAGS_80000);
|
playerStatus->flags |= (PS_FLAGS_SCRIPTED_FALL | PS_FLAGS_ARMS_RAISED);
|
||||||
disable_player_input();
|
disable_player_input();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -98,7 +98,7 @@ void action_update_landing_on_switch(void) {
|
|||||||
playerStatus->flags &= ~(PS_FLAGS_ACTION_STATE_CHANGED | PS_FLAGS_JUMPING | PS_FLAGS_FLYING);
|
playerStatus->flags &= ~(PS_FLAGS_ACTION_STATE_CHANGED | PS_FLAGS_JUMPING | PS_FLAGS_FLYING);
|
||||||
playerStatus->flags |= PS_FLAGS_FALLING;
|
playerStatus->flags |= PS_FLAGS_FALLING;
|
||||||
|
|
||||||
if (!(playerStatus->animFlags & (PA_FLAGS_HOLDING_WATT | PA_FLAGS_2))) {
|
if (!(playerStatus->animFlags & (PA_FLAGS_USING_WATT | PA_FLAGS_WATT_IN_HANDS))) {
|
||||||
anim = ANIM_Mario_AnimMidair;
|
anim = ANIM_Mario_AnimMidair;
|
||||||
} else {
|
} else {
|
||||||
anim = ANIM_Mario_6000A;
|
anim = ANIM_Mario_6000A;
|
||||||
@ -127,7 +127,7 @@ void action_update_falling(void) {
|
|||||||
|
|
||||||
if (playerStatus->animFlags & PA_FLAGS_8BIT_MARIO) {
|
if (playerStatus->animFlags & PA_FLAGS_8BIT_MARIO) {
|
||||||
anim = ANIM_Mario_90005;
|
anim = ANIM_Mario_90005;
|
||||||
} else if (!(playerStatus->animFlags & (PA_FLAGS_HOLDING_WATT | PA_FLAGS_2))) {
|
} else if (!(playerStatus->animFlags & (PA_FLAGS_USING_WATT | PA_FLAGS_WATT_IN_HANDS))) {
|
||||||
anim = ANIM_Mario_AnimMidair;
|
anim = ANIM_Mario_AnimMidair;
|
||||||
} else {
|
} else {
|
||||||
anim = ANIM_Mario_6000A;
|
anim = ANIM_Mario_6000A;
|
||||||
|
@ -36,7 +36,7 @@ void action_update_knockback(void) {
|
|||||||
|
|
||||||
speed = playerStatus->currentSpeed;
|
speed = playerStatus->currentSpeed;
|
||||||
|
|
||||||
if (playerStatus->flags & PS_FLAGS_40000) {
|
if (playerStatus->flags & PS_FLAGS_ENTERING_BATTLE) {
|
||||||
speed *= 0.5f;
|
speed *= 0.5f;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -55,7 +55,7 @@ void action_update_knockback(void) {
|
|||||||
} else {
|
} else {
|
||||||
s32 colliderID;
|
s32 colliderID;
|
||||||
|
|
||||||
playerStatus->position.y = player_check_collision_below(func_800E34D8(), &colliderID);
|
playerStatus->position.y = player_check_collision_below(player_fall_distance(), &colliderID);
|
||||||
|
|
||||||
if (colliderID >= 0) {
|
if (colliderID >= 0) {
|
||||||
colliderID = get_collider_flags(colliderID); //TODO surfaceType
|
colliderID = get_collider_flags(colliderID); //TODO surfaceType
|
||||||
|
@ -25,8 +25,8 @@ void action_update_land(void) {
|
|||||||
if (playerStatus->flags & PS_FLAGS_ACTION_STATE_CHANGED) {
|
if (playerStatus->flags & PS_FLAGS_ACTION_STATE_CHANGED) {
|
||||||
playerStatus->flags &= ~(
|
playerStatus->flags &= ~(
|
||||||
PS_FLAGS_ACTION_STATE_CHANGED |
|
PS_FLAGS_ACTION_STATE_CHANGED |
|
||||||
PS_FLAGS_800000 |
|
PS_FLAGS_SCRIPTED_FALL |
|
||||||
PS_FLAGS_80000 |
|
PS_FLAGS_ARMS_RAISED |
|
||||||
PS_FLAGS_AIRBORNE
|
PS_FLAGS_AIRBORNE
|
||||||
);
|
);
|
||||||
playerStatus->actionSubstate = SUBSTATE_INIT;
|
playerStatus->actionSubstate = SUBSTATE_INIT;
|
||||||
@ -37,7 +37,7 @@ void action_update_land(void) {
|
|||||||
|
|
||||||
if (playerStatus->animFlags & PA_FLAGS_8BIT_MARIO) {
|
if (playerStatus->animFlags & PA_FLAGS_8BIT_MARIO) {
|
||||||
anim = ANIM_Mario_90002;
|
anim = ANIM_Mario_90002;
|
||||||
} else if (!(playerStatus->animFlags & PA_FLAGS_HOLDING_WATT)) {
|
} else if (!(playerStatus->animFlags & PA_FLAGS_USING_WATT)) {
|
||||||
anim = ANIM_Mario_10009;
|
anim = ANIM_Mario_10009;
|
||||||
} else {
|
} else {
|
||||||
anim = ANIM_Mario_6000B;
|
anim = ANIM_Mario_6000B;
|
||||||
@ -52,7 +52,7 @@ void action_update_land(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
collisionStatus->lastTouchedFloor = -1;
|
collisionStatus->lastTouchedFloor = -1;
|
||||||
playerStatus->animFlags &= ~PA_FLAGS_40000;
|
playerStatus->animFlags &= ~PA_FLAGS_INTERRUPT_SPIN;
|
||||||
camera->moveFlags &= ~CAMERA_MOVE_FLAGS_4;
|
camera->moveFlags &= ~CAMERA_MOVE_FLAGS_4;
|
||||||
}
|
}
|
||||||
playerStatus->actionSubstate++; // SUBSTATE_DONE
|
playerStatus->actionSubstate++; // SUBSTATE_DONE
|
||||||
@ -87,8 +87,8 @@ void action_update_step_down_land(void) {
|
|||||||
if (playerStatus->flags & PS_FLAGS_ACTION_STATE_CHANGED) {
|
if (playerStatus->flags & PS_FLAGS_ACTION_STATE_CHANGED) {
|
||||||
playerStatus->flags &= ~(
|
playerStatus->flags &= ~(
|
||||||
PS_FLAGS_ACTION_STATE_CHANGED |
|
PS_FLAGS_ACTION_STATE_CHANGED |
|
||||||
PS_FLAGS_800000 |
|
PS_FLAGS_SCRIPTED_FALL |
|
||||||
PS_FLAGS_80000 |
|
PS_FLAGS_ARMS_RAISED |
|
||||||
PS_FLAGS_AIRBORNE
|
PS_FLAGS_AIRBORNE
|
||||||
);
|
);
|
||||||
playerStatus->actionSubstate = SUBSTATE_INIT;
|
playerStatus->actionSubstate = SUBSTATE_INIT;
|
||||||
|
@ -11,7 +11,7 @@ s32 action_update_ride(void) {
|
|||||||
|
|
||||||
if (playerStatus->flags & PS_FLAGS_ACTION_STATE_CHANGED) {
|
if (playerStatus->flags & PS_FLAGS_ACTION_STATE_CHANGED) {
|
||||||
playerStatus->flags &= ~(
|
playerStatus->flags &= ~(
|
||||||
PS_FLAGS_ACTION_STATE_CHANGED | PS_FLAGS_80000 | PS_FLAGS_AIRBORNE
|
PS_FLAGS_ACTION_STATE_CHANGED | PS_FLAGS_ARMS_RAISED | PS_FLAGS_AIRBORNE
|
||||||
);
|
);
|
||||||
playerStatus->actionSubstate = 0;
|
playerStatus->actionSubstate = 0;
|
||||||
playerStatus->currentStateTime = 0;
|
playerStatus->currentStateTime = 0;
|
||||||
@ -21,7 +21,7 @@ s32 action_update_ride(void) {
|
|||||||
playerStatus->pitch = 0.0f;
|
playerStatus->pitch = 0.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (playerStatus->animFlags & PA_FLAGS_400000) {
|
if (playerStatus->animFlags & PA_FLAGS_RIDING_PARTNER) {
|
||||||
if (partnerActionStatus->actingPartner == PARTNER_LAKILESTER) {
|
if (partnerActionStatus->actingPartner == PARTNER_LAKILESTER) {
|
||||||
return func_802BD100_317020(oldFlags);
|
return func_802BD100_317020(oldFlags);
|
||||||
}
|
}
|
||||||
@ -55,7 +55,7 @@ void action_update_state_23(void) {
|
|||||||
|
|
||||||
if (playerStatus->flags & PS_FLAGS_ACTION_STATE_CHANGED) {
|
if (playerStatus->flags & PS_FLAGS_ACTION_STATE_CHANGED) {
|
||||||
playerStatus->flags &= ~(PS_FLAGS_ACTION_STATE_CHANGED
|
playerStatus->flags &= ~(PS_FLAGS_ACTION_STATE_CHANGED
|
||||||
| PS_FLAGS_80000 | PS_FLAGS_AIRBORNE);
|
| PS_FLAGS_ARMS_RAISED | PS_FLAGS_AIRBORNE);
|
||||||
playerStatus->actionSubstate = 0;
|
playerStatus->actionSubstate = 0;
|
||||||
playerStatus->currentStateTime = 0;
|
playerStatus->currentStateTime = 0;
|
||||||
playerStatus->timeInAir = 0;
|
playerStatus->timeInAir = 0;
|
||||||
@ -126,7 +126,7 @@ void action_update_launch(void) {
|
|||||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||||
|
|
||||||
if (playerStatus->flags & PS_FLAGS_ACTION_STATE_CHANGED) {
|
if (playerStatus->flags & PS_FLAGS_ACTION_STATE_CHANGED) {
|
||||||
playerStatus->flags &= ~(PS_FLAGS_ACTION_STATE_CHANGED | PS_FLAGS_80000 | PS_FLAGS_AIRBORNE);
|
playerStatus->flags &= ~(PS_FLAGS_ACTION_STATE_CHANGED | PS_FLAGS_ARMS_RAISED | PS_FLAGS_AIRBORNE);
|
||||||
playerStatus->actionSubstate = 0;
|
playerStatus->actionSubstate = 0;
|
||||||
playerStatus->currentStateTime = 0;
|
playerStatus->currentStateTime = 0;
|
||||||
playerStatus->timeInAir = 0;
|
playerStatus->timeInAir = 0;
|
||||||
@ -172,7 +172,7 @@ void action_update_raise_arms(void) {
|
|||||||
|
|
||||||
if (playerStatus->flags & PS_FLAGS_ACTION_STATE_CHANGED) {
|
if (playerStatus->flags & PS_FLAGS_ACTION_STATE_CHANGED) {
|
||||||
playerStatus->flags &= ~PS_FLAGS_ACTION_STATE_CHANGED;
|
playerStatus->flags &= ~PS_FLAGS_ACTION_STATE_CHANGED;
|
||||||
playerStatus->flags |= PS_FLAGS_80000;
|
playerStatus->flags |= PS_FLAGS_ARMS_RAISED;
|
||||||
playerStatus->currentStateTime = 0;
|
playerStatus->currentStateTime = 0;
|
||||||
playerStatus->actionSubstate = 0;
|
playerStatus->actionSubstate = 0;
|
||||||
playerStatus->currentSpeed = 0.0f;
|
playerStatus->currentSpeed = 0.0f;
|
||||||
@ -182,7 +182,7 @@ void action_update_raise_arms(void) {
|
|||||||
|
|
||||||
if (!(playerStatus->animFlags & PA_FLAGS_RAISED_ARMS)) {
|
if (!(playerStatus->animFlags & PA_FLAGS_RAISED_ARMS)) {
|
||||||
set_action_state(ACTION_STATE_IDLE);
|
set_action_state(ACTION_STATE_IDLE);
|
||||||
playerStatus->flags &= ~PS_FLAGS_80000;
|
playerStatus->flags &= ~PS_FLAGS_ARMS_RAISED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -208,7 +208,7 @@ void action_update_pushing_block(void) {
|
|||||||
|
|
||||||
check_input_jump();
|
check_input_jump();
|
||||||
|
|
||||||
if (playerStatus->animFlags & PA_FLAGS_800000) {
|
if (playerStatus->animFlags & PA_FLAGS_PUSHED_ALBINO_DINO) {
|
||||||
if (playerStatus->currentStateTime != 0) {
|
if (playerStatus->currentStateTime != 0) {
|
||||||
playerStatus->currentStateTime--;
|
playerStatus->currentStateTime--;
|
||||||
if (playerStatus->currentStateTime == 0) {
|
if (playerStatus->currentStateTime == 0) {
|
||||||
|
@ -145,7 +145,7 @@ void action_update_sliding(void) {
|
|||||||
if (playerStatus->currentSpeed <= 0.0f) {
|
if (playerStatus->currentSpeed <= 0.0f) {
|
||||||
playerStatus->currentSpeed = 0.0f;
|
playerStatus->currentSpeed = 0.0f;
|
||||||
}
|
}
|
||||||
playerStatus->position.y = player_check_collision_below(func_800E34D8(), &hitID);
|
playerStatus->position.y = player_check_collision_below(player_fall_distance(), &hitID);
|
||||||
if (hitID >= 0) {
|
if (hitID >= 0) {
|
||||||
SlideLaunchSpeed = -1;
|
SlideLaunchSpeed = -1;
|
||||||
suggest_player_anim_setUnkFlag(ANIM_Mario_80003);
|
suggest_player_anim_setUnkFlag(ANIM_Mario_80003);
|
||||||
|
@ -108,7 +108,7 @@ void action_update_parasol(void) {
|
|||||||
transformation->revertTime = 12;
|
transformation->revertTime = 12;
|
||||||
disguiseNpc = get_npc_by_index(PeachDisguiseNpcIndex);
|
disguiseNpc = get_npc_by_index(PeachDisguiseNpcIndex);
|
||||||
disguiseNpc->flags |= NPC_FLAG_40000;
|
disguiseNpc->flags |= NPC_FLAG_40000;
|
||||||
playerStatus->flags |= PS_FLAGS_100000;
|
playerStatus->flags |= PS_FLAGS_ROTATION_LOCKED;
|
||||||
sfx_play_sound_at_player(SOUND_FD, 0);
|
sfx_play_sound_at_player(SOUND_FD, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -141,7 +141,7 @@ void action_update_parasol(void) {
|
|||||||
case SUBSTATE_PUT_AWAY:
|
case SUBSTATE_PUT_AWAY:
|
||||||
if (playerStatus->animNotifyValue != 0) {
|
if (playerStatus->animNotifyValue != 0) {
|
||||||
playerStatus->currentStateTime = 12;
|
playerStatus->currentStateTime = 12;
|
||||||
playerStatus->flags |= PS_FLAGS_100000;
|
playerStatus->flags |= PS_FLAGS_ROTATION_LOCKED;
|
||||||
playerStatus->actionSubstate++; // SUBSTATE_DISGUISE_BEGIN
|
playerStatus->actionSubstate++; // SUBSTATE_DISGUISE_BEGIN
|
||||||
sfx_play_sound_at_player(SOUND_FD, 0);
|
sfx_play_sound_at_player(SOUND_FD, 0);
|
||||||
}
|
}
|
||||||
@ -228,7 +228,7 @@ void action_update_parasol(void) {
|
|||||||
set_time_freeze_mode(TIME_FREEZE_NORMAL);
|
set_time_freeze_mode(TIME_FREEZE_NORMAL);
|
||||||
disguiseNpc = get_npc_by_index(PeachDisguiseNpcIndex);
|
disguiseNpc = get_npc_by_index(PeachDisguiseNpcIndex);
|
||||||
disguiseNpc->flags &= ~NPC_FLAG_40000;
|
disguiseNpc->flags &= ~NPC_FLAG_40000;
|
||||||
playerStatus->flags &= ~PS_FLAGS_100000;
|
playerStatus->flags &= ~PS_FLAGS_ROTATION_LOCKED;
|
||||||
set_action_state(ACTION_STATE_IDLE);
|
set_action_state(ACTION_STATE_IDLE);
|
||||||
enable_player_static_collisions();
|
enable_player_static_collisions();
|
||||||
}
|
}
|
||||||
@ -308,7 +308,7 @@ void action_update_parasol(void) {
|
|||||||
case SUBSTATE_REVERT_DONE:
|
case SUBSTATE_REVERT_DONE:
|
||||||
if (--playerStatus->currentStateTime == 0) {
|
if (--playerStatus->currentStateTime == 0) {
|
||||||
set_time_freeze_mode(TIME_FREEZE_NORMAL);
|
set_time_freeze_mode(TIME_FREEZE_NORMAL);
|
||||||
playerStatus->flags &= ~PS_FLAGS_100000;
|
playerStatus->flags &= ~PS_FLAGS_ROTATION_LOCKED;
|
||||||
set_action_state(ACTION_STATE_IDLE);
|
set_action_state(ACTION_STATE_IDLE);
|
||||||
enable_player_static_collisions();
|
enable_player_static_collisions();
|
||||||
}
|
}
|
||||||
|
@ -35,10 +35,10 @@ void action_update_spin(void) {
|
|||||||
|
|
||||||
// initialization
|
// initialization
|
||||||
if (playerStatus->flags & PS_FLAGS_ACTION_STATE_CHANGED) {
|
if (playerStatus->flags & PS_FLAGS_ACTION_STATE_CHANGED) {
|
||||||
playerStatus->flags &= ~(PS_FLAGS_ACTION_STATE_CHANGED | PS_FLAGS_80000);
|
playerStatus->flags &= ~(PS_FLAGS_ACTION_STATE_CHANGED | PS_FLAGS_ARMS_RAISED);
|
||||||
playerStatus->animFlags &= ~PA_FLAGS_40000;
|
playerStatus->animFlags &= ~PA_FLAGS_INTERRUPT_SPIN;
|
||||||
playerStatus->animFlags |= PA_FLAGS_SPINNING;
|
playerStatus->animFlags |= PA_FLAGS_SPINNING;
|
||||||
playerStatus->flags |= PS_FLAGS_20000;
|
playerStatus->flags |= PS_FLAGS_SPINNING;
|
||||||
playerStatus->currentStateTime = 0;
|
playerStatus->currentStateTime = 0;
|
||||||
playerStatus->actionSubstate = SUBSTATE_SPIN_0;
|
playerStatus->actionSubstate = SUBSTATE_SPIN_0;
|
||||||
playerSpinState->stopSoundTimer = 0;
|
playerSpinState->stopSoundTimer = 0;
|
||||||
@ -143,7 +143,7 @@ void action_update_spin(void) {
|
|||||||
// check for spin cancel
|
// check for spin cancel
|
||||||
if (!firstCall && (check_input_hammer() || check_input_jump())) {
|
if (!firstCall && (check_input_hammer() || check_input_jump())) {
|
||||||
playerStatus->animFlags &= ~PA_FLAGS_SPINNING;
|
playerStatus->animFlags &= ~PA_FLAGS_SPINNING;
|
||||||
playerStatus->flags &= ~PS_FLAGS_20000;
|
playerStatus->flags &= ~PS_FLAGS_SPINNING;
|
||||||
sfx_stop_sound(playerSpinState->spinSoundID);
|
sfx_stop_sound(playerSpinState->spinSoundID);
|
||||||
player_input_to_move_vector(&angle, &magnitude);
|
player_input_to_move_vector(&angle, &magnitude);
|
||||||
playerStatus->targetYaw = angle;
|
playerStatus->targetYaw = angle;
|
||||||
@ -172,7 +172,7 @@ void action_update_spin(void) {
|
|||||||
if ((playerStatus->currentStateTime) == 0) {
|
if ((playerStatus->currentStateTime) == 0) {
|
||||||
playerSpinState->stopSoundTimer = 4;
|
playerSpinState->stopSoundTimer = 4;
|
||||||
set_action_state(ACTION_STATE_IDLE);
|
set_action_state(ACTION_STATE_IDLE);
|
||||||
playerStatus->flags &= ~PS_FLAGS_20000;
|
playerStatus->flags &= ~PS_FLAGS_SPINNING;
|
||||||
playerStatus->animFlags &= ~PA_FLAGS_SPINNING;
|
playerStatus->animFlags &= ~PA_FLAGS_SPINNING;
|
||||||
sfx_stop_sound(playerSpinState->spinSoundID);
|
sfx_stop_sound(playerSpinState->spinSoundID);
|
||||||
}
|
}
|
||||||
@ -181,7 +181,7 @@ void action_update_spin(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (playerStatus->actionSubstate == SUBSTATE_SPIN_0) {
|
if (playerStatus->actionSubstate == SUBSTATE_SPIN_0) {
|
||||||
if (playerStatus->animFlags & PA_FLAGS_40000) {
|
if (playerStatus->animFlags & PA_FLAGS_INTERRUPT_SPIN) {
|
||||||
playerStatus->actionSubstate = SUBSTATE_SPIN_1;
|
playerStatus->actionSubstate = SUBSTATE_SPIN_1;
|
||||||
} else if (gCollisionStatus.pushingAgainstWall >= 0) {
|
} else if (gCollisionStatus.pushingAgainstWall >= 0) {
|
||||||
playerSpinState->hitWallTime++;
|
playerSpinState->hitWallTime++;
|
||||||
@ -255,21 +255,21 @@ void action_update_spin(void) {
|
|||||||
if (playerSpinState->hasBufferedSpin) {
|
if (playerSpinState->hasBufferedSpin) {
|
||||||
playerStatus->currentStateTime = 2;
|
playerStatus->currentStateTime = 2;
|
||||||
playerStatus->actionSubstate = SUBSTATE_SPIN_2;
|
playerStatus->actionSubstate = SUBSTATE_SPIN_2;
|
||||||
playerStatus->flags &= ~PS_FLAGS_20000;
|
playerStatus->flags &= ~PS_FLAGS_SPINNING;
|
||||||
suggest_player_anim_clearUnkFlag(ANIM_Mario_10002);
|
suggest_player_anim_clearUnkFlag(ANIM_Mario_10002);
|
||||||
} else if (angle < playerStatus->spriteFacingAngle) {
|
} else if (angle < playerStatus->spriteFacingAngle) {
|
||||||
if (playerStatus->spriteFacingAngle >= 180.0f && angle < 180.0f) {
|
if (playerStatus->spriteFacingAngle >= 180.0f && angle < 180.0f) {
|
||||||
playerStatus->spriteFacingAngle = 180.0f;
|
playerStatus->spriteFacingAngle = 180.0f;
|
||||||
playerStatus->currentStateTime = 2;
|
playerStatus->currentStateTime = 2;
|
||||||
playerStatus->actionSubstate = SUBSTATE_SPIN_2;
|
playerStatus->actionSubstate = SUBSTATE_SPIN_2;
|
||||||
playerStatus->flags &= ~PS_FLAGS_20000;
|
playerStatus->flags &= ~PS_FLAGS_SPINNING;
|
||||||
suggest_player_anim_clearUnkFlag(ANIM_Mario_10002);
|
suggest_player_anim_clearUnkFlag(ANIM_Mario_10002);
|
||||||
}
|
}
|
||||||
} else if (playerStatus->spriteFacingAngle <= 0.0f && angle < 90.0f) {
|
} else if (playerStatus->spriteFacingAngle <= 0.0f && angle < 90.0f) {
|
||||||
playerStatus->spriteFacingAngle = 0.0f;
|
playerStatus->spriteFacingAngle = 0.0f;
|
||||||
playerStatus->currentStateTime = 2;
|
playerStatus->currentStateTime = 2;
|
||||||
playerStatus->actionSubstate = SUBSTATE_SPIN_2;
|
playerStatus->actionSubstate = SUBSTATE_SPIN_2;
|
||||||
playerStatus->flags &= ~PS_FLAGS_20000;
|
playerStatus->flags &= ~PS_FLAGS_SPINNING;
|
||||||
suggest_player_anim_clearUnkFlag(ANIM_Mario_10002);
|
suggest_player_anim_clearUnkFlag(ANIM_Mario_10002);
|
||||||
}
|
}
|
||||||
playerStatus->spriteFacingAngle = clamp_angle(playerStatus->spriteFacingAngle);
|
playerStatus->spriteFacingAngle = clamp_angle(playerStatus->spriteFacingAngle);
|
||||||
|
@ -37,7 +37,7 @@ void action_update_spin_jump(void) {
|
|||||||
playerStatus->gravityIntegrator[0] = 5.2f;
|
playerStatus->gravityIntegrator[0] = 5.2f;
|
||||||
suggest_player_anim_clearUnkFlag(ANIM_Mario_1000A);
|
suggest_player_anim_clearUnkFlag(ANIM_Mario_1000A);
|
||||||
disable_player_input();
|
disable_player_input();
|
||||||
playerStatus->flags |= PS_FLAGS_200;
|
playerStatus->flags |= PS_FLAGS_SPECIAL_JUMP;
|
||||||
gCameras[CAM_DEFAULT].moveFlags |= CAMERA_MOVE_IGNORE_PLAYER_Y;
|
gCameras[CAM_DEFAULT].moveFlags |= CAMERA_MOVE_IGNORE_PLAYER_Y;
|
||||||
sfx_play_sound_at_player(SOUND_SPIN_JUMP, 0);
|
sfx_play_sound_at_player(SOUND_SPIN_JUMP, 0);
|
||||||
}
|
}
|
||||||
@ -96,7 +96,7 @@ void action_update_spin_jump(void) {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SUBSTATE_DESCEND:
|
case SUBSTATE_DESCEND:
|
||||||
velocity = func_800E34D8();
|
velocity = player_fall_distance();
|
||||||
playerStatus->position.y = player_check_collision_below(velocity, &belowColliderID);
|
playerStatus->position.y = player_check_collision_below(velocity, &belowColliderID);
|
||||||
if (velocity < -100.0f) {
|
if (velocity < -100.0f) {
|
||||||
playerStatus->gravityIntegrator[3] = 0.0f;
|
playerStatus->gravityIntegrator[3] = 0.0f;
|
||||||
@ -116,7 +116,7 @@ void action_update_spin_jump(void) {
|
|||||||
if (surfaceType == SURFACE_TYPE_LAVA) {
|
if (surfaceType == SURFACE_TYPE_LAVA) {
|
||||||
playerStatus->hazardType = HAZARD_TYPE_LAVA;
|
playerStatus->hazardType = HAZARD_TYPE_LAVA;
|
||||||
set_action_state(ACTION_STATE_HIT_LAVA);
|
set_action_state(ACTION_STATE_HIT_LAVA);
|
||||||
playerStatus->flags |= PS_FLAGS_800;
|
playerStatus->flags |= PS_FLAGS_HIT_FIRE;
|
||||||
playerStatus->flags &= ~PS_FLAGS_FLYING;
|
playerStatus->flags &= ~PS_FLAGS_FLYING;
|
||||||
return;
|
return;
|
||||||
} else if (surfaceType == SURFACE_TYPE_SPIKES) {
|
} else if (surfaceType == SURFACE_TYPE_SPIKES) {
|
||||||
@ -140,7 +140,7 @@ void action_update_spin_jump(void) {
|
|||||||
panels = &gCurrentHiddenPanels;
|
panels = &gCurrentHiddenPanels;
|
||||||
panels->tryFlipTrigger = TRUE;
|
panels->tryFlipTrigger = TRUE;
|
||||||
panels->flipTriggerPosY = playerStatus->position.y;
|
panels->flipTriggerPosY = playerStatus->position.y;
|
||||||
playerStatus->flags |= PS_FLAGS_400;
|
playerStatus->flags |= PS_FLAGS_SPECIAL_LAND;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ void action_update_step_up(void) {
|
|||||||
playerStatus->flags &= ~PS_FLAGS_ACTION_STATE_CHANGED;
|
playerStatus->flags &= ~PS_FLAGS_ACTION_STATE_CHANGED;
|
||||||
phys_adjust_cam_on_landing();
|
phys_adjust_cam_on_landing();
|
||||||
if (!(playerStatus->animFlags & PA_FLAGS_USING_PEACH_PHYSICS)) {
|
if (!(playerStatus->animFlags & PA_FLAGS_USING_PEACH_PHYSICS)) {
|
||||||
if (!(playerStatus->animFlags & PA_FLAGS_HOLDING_WATT)) {
|
if (!(playerStatus->animFlags & PA_FLAGS_USING_WATT)) {
|
||||||
anim = ANIM_Mario_Walking;
|
anim = ANIM_Mario_Walking;
|
||||||
} else {
|
} else {
|
||||||
anim = ANIM_Mario_60000;
|
anim = ANIM_Mario_60000;
|
||||||
@ -103,7 +103,7 @@ void action_update_step_up_peach(void) {
|
|||||||
try_player_footstep_sounds(1);
|
try_player_footstep_sounds(1);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!(playerStatus->flags & PS_FLAGS_4000)) {
|
if (!(playerStatus->flags & PS_FLAGS_CUTSCENE_MOVEMENT)) {
|
||||||
set_action_state(ACTION_STATE_IDLE);
|
set_action_state(ACTION_STATE_IDLE);
|
||||||
} else if (playerStatus->currentSpeed >= playerStatus->runSpeed) {
|
} else if (playerStatus->currentSpeed >= playerStatus->runSpeed) {
|
||||||
set_action_state(ACTION_STATE_RUN);
|
set_action_state(ACTION_STATE_RUN);
|
||||||
|
@ -30,7 +30,7 @@ void action_update_tornado_jump(void) {
|
|||||||
|
|
||||||
if (playerStatus->flags & PS_FLAGS_ACTION_STATE_CHANGED) {
|
if (playerStatus->flags & PS_FLAGS_ACTION_STATE_CHANGED) {
|
||||||
playerStatus->flags &= ~PS_FLAGS_ACTION_STATE_CHANGED;
|
playerStatus->flags &= ~PS_FLAGS_ACTION_STATE_CHANGED;
|
||||||
playerStatus->flags |= (PS_FLAGS_20000 | PS_FLAGS_FLYING | PS_FLAGS_JUMPING);
|
playerStatus->flags |= (PS_FLAGS_SPINNING | PS_FLAGS_FLYING | PS_FLAGS_JUMPING);
|
||||||
phys_clear_spin_history();
|
phys_clear_spin_history();
|
||||||
playerStatus->actionSubstate = SUBSTATE_ASCEND;
|
playerStatus->actionSubstate = SUBSTATE_ASCEND;
|
||||||
playerStatus->currentSpeed = 0.0f;
|
playerStatus->currentSpeed = 0.0f;
|
||||||
@ -40,7 +40,7 @@ void action_update_tornado_jump(void) {
|
|||||||
playerStatus->gravityIntegrator[3] = -0.75f;
|
playerStatus->gravityIntegrator[3] = -0.75f;
|
||||||
suggest_player_anim_setUnkFlag(ANIM_Mario_80000);
|
suggest_player_anim_setUnkFlag(ANIM_Mario_80000);
|
||||||
disable_player_input();
|
disable_player_input();
|
||||||
playerStatus->flags |= PS_FLAGS_200;
|
playerStatus->flags |= PS_FLAGS_SPECIAL_JUMP;
|
||||||
gCameras[CAM_DEFAULT].moveFlags |= CAMERA_MOVE_IGNORE_PLAYER_Y;
|
gCameras[CAM_DEFAULT].moveFlags |= CAMERA_MOVE_IGNORE_PLAYER_Y;
|
||||||
cameraRelativeYaw = clamp_angle(playerStatus->targetYaw - gCameras[gCurrentCameraID].currentYaw);
|
cameraRelativeYaw = clamp_angle(playerStatus->targetYaw - gCameras[gCurrentCameraID].currentYaw);
|
||||||
if (cameraRelativeYaw <= 180.0f) {
|
if (cameraRelativeYaw <= 180.0f) {
|
||||||
@ -94,7 +94,7 @@ void action_update_tornado_jump(void) {
|
|||||||
sfx_play_sound_at_player(SOUND_TORNADO_JUMP, 0);
|
sfx_play_sound_at_player(SOUND_TORNADO_JUMP, 0);
|
||||||
}
|
}
|
||||||
if (colliderBelow >= 0) {
|
if (colliderBelow >= 0) {
|
||||||
playerStatus->flags &= ~(PS_FLAGS_20000 | PS_FLAGS_FLYING);
|
playerStatus->flags &= ~(PS_FLAGS_SPINNING | PS_FLAGS_FLYING);
|
||||||
set_action_state(ACTION_STATE_LAND);
|
set_action_state(ACTION_STATE_LAND);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -116,11 +116,11 @@ void action_update_tornado_jump(void) {
|
|||||||
if (collisionStatus->currentFloor & COLLISION_WITH_ENTITY_BIT) {
|
if (collisionStatus->currentFloor & COLLISION_WITH_ENTITY_BIT) {
|
||||||
entityType = get_entity_type(collisionStatus->currentFloor);
|
entityType = get_entity_type(collisionStatus->currentFloor);
|
||||||
if (entityType == ENTITY_TYPE_SIMPLE_SPRING || entityType == ENTITY_TYPE_SCRIPT_SPRING) {
|
if (entityType == ENTITY_TYPE_SIMPLE_SPRING || entityType == ENTITY_TYPE_SCRIPT_SPRING) {
|
||||||
playerStatus->flags &= ~(PS_FLAGS_20000 | PS_FLAGS_FLYING);
|
playerStatus->flags &= ~(PS_FLAGS_SPINNING | PS_FLAGS_FLYING);
|
||||||
set_action_state(ACTION_STATE_LAND);
|
set_action_state(ACTION_STATE_LAND);
|
||||||
return;
|
return;
|
||||||
} else if (entityType == ENTITY_TYPE_BLUE_SWITCH || entityType == ENTITY_TYPE_RED_SWITCH) {
|
} else if (entityType == ENTITY_TYPE_BLUE_SWITCH || entityType == ENTITY_TYPE_RED_SWITCH) {
|
||||||
playerStatus->flags &= ~(PS_FLAGS_20000 | PS_FLAGS_FLYING);
|
playerStatus->flags &= ~(PS_FLAGS_SPINNING | PS_FLAGS_FLYING);
|
||||||
phys_player_land();
|
phys_player_land();
|
||||||
exec_ShakeCam1(0, 0, 4);
|
exec_ShakeCam1(0, 0, 4);
|
||||||
sfx_play_sound_at_player(SOUND_14A, 0);
|
sfx_play_sound_at_player(SOUND_14A, 0);
|
||||||
@ -128,7 +128,7 @@ void action_update_tornado_jump(void) {
|
|||||||
|
|
||||||
gCurrentHiddenPanels.tryFlipTrigger = TRUE;
|
gCurrentHiddenPanels.tryFlipTrigger = TRUE;
|
||||||
gCurrentHiddenPanels.flipTriggerPosY = playerStatus->position.y;
|
gCurrentHiddenPanels.flipTriggerPosY = playerStatus->position.y;
|
||||||
playerStatus->flags |= PS_FLAGS_400;
|
playerStatus->flags |= PS_FLAGS_SPECIAL_LAND;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -136,13 +136,13 @@ void action_update_tornado_jump(void) {
|
|||||||
surfaceType = get_collider_flags(colliderBelow) & COLLIDER_FLAGS_SURFACE_TYPE_MASK;
|
surfaceType = get_collider_flags(colliderBelow) & COLLIDER_FLAGS_SURFACE_TYPE_MASK;
|
||||||
if (surfaceType == SURFACE_TYPE_LAVA) {
|
if (surfaceType == SURFACE_TYPE_LAVA) {
|
||||||
playerStatus->hazardType = HAZARD_TYPE_LAVA;
|
playerStatus->hazardType = HAZARD_TYPE_LAVA;
|
||||||
playerStatus->flags &= ~(PS_FLAGS_20000 | PS_FLAGS_FLYING);
|
playerStatus->flags &= ~(PS_FLAGS_SPINNING | PS_FLAGS_FLYING);
|
||||||
set_action_state(ACTION_STATE_HIT_LAVA);
|
set_action_state(ACTION_STATE_HIT_LAVA);
|
||||||
playerStatus->flags |= PS_FLAGS_800;
|
playerStatus->flags |= PS_FLAGS_HIT_FIRE;
|
||||||
return;
|
return;
|
||||||
} else if (surfaceType == SURFACE_TYPE_SPIKES) {
|
} else if (surfaceType == SURFACE_TYPE_SPIKES) {
|
||||||
set_action_state(ACTION_STATE_HIT_LAVA);
|
set_action_state(ACTION_STATE_HIT_LAVA);
|
||||||
playerStatus->flags &= ~(PS_FLAGS_20000 | PS_FLAGS_FLYING);
|
playerStatus->flags &= ~(PS_FLAGS_SPINNING | PS_FLAGS_FLYING);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
playerStatus->currentStateTime = 8;
|
playerStatus->currentStateTime = 8;
|
||||||
@ -155,13 +155,13 @@ void action_update_tornado_jump(void) {
|
|||||||
|
|
||||||
gCurrentHiddenPanels.tryFlipTrigger = TRUE;
|
gCurrentHiddenPanels.tryFlipTrigger = TRUE;
|
||||||
gCurrentHiddenPanels.flipTriggerPosY = playerStatus->position.y;
|
gCurrentHiddenPanels.flipTriggerPosY = playerStatus->position.y;
|
||||||
playerStatus->flags |= PS_FLAGS_400;
|
playerStatus->flags |= PS_FLAGS_SPECIAL_LAND;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SUBSTATE_IMPACT:
|
case SUBSTATE_IMPACT:
|
||||||
if (--playerStatus->currentStateTime == 0) {
|
if (--playerStatus->currentStateTime == 0) {
|
||||||
playerStatus->actionSubstate++;
|
playerStatus->actionSubstate++;
|
||||||
playerStatus->flags &= ~(PS_FLAGS_20000 | PS_FLAGS_FLYING);
|
playerStatus->flags &= ~(PS_FLAGS_SPINNING | PS_FLAGS_FLYING);
|
||||||
set_action_state(ACTION_STATE_LAND);
|
set_action_state(ACTION_STATE_LAND);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -61,7 +61,7 @@ void action_update_use_spinning_flower(void) {
|
|||||||
D_802B6EDC = 3.0f;
|
D_802B6EDC = 3.0f;
|
||||||
disable_player_static_collisions();
|
disable_player_static_collisions();
|
||||||
disable_player_input();
|
disable_player_input();
|
||||||
playerStatus->flags |= PS_FLAGS_100000;
|
playerStatus->flags |= PS_FLAGS_ROTATION_LOCKED;
|
||||||
entityID = gCollisionStatus.currentFloor;
|
entityID = gCollisionStatus.currentFloor;
|
||||||
|
|
||||||
TempPointer = &SpinningFlower_EntityIndex;
|
TempPointer = &SpinningFlower_EntityIndex;
|
||||||
@ -74,7 +74,7 @@ void action_update_use_spinning_flower(void) {
|
|||||||
} else {
|
} else {
|
||||||
SpinningFlower_EntityIndex = -1;
|
SpinningFlower_EntityIndex = -1;
|
||||||
}
|
}
|
||||||
if (!(playerStatus->animFlags & (PA_FLAGS_HOLDING_WATT | PA_FLAGS_2))) {
|
if (!(playerStatus->animFlags & (PA_FLAGS_USING_WATT | PA_FLAGS_WATT_IN_HANDS))) {
|
||||||
suggest_player_anim_clearUnkFlag(ANIM_Mario_1002B);
|
suggest_player_anim_clearUnkFlag(ANIM_Mario_1002B);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -127,10 +127,10 @@ void action_update_use_spinning_flower(void) {
|
|||||||
D_802B6EF4 = playerStatus->position.y;
|
D_802B6EF4 = playerStatus->position.y;
|
||||||
playerStatus->actionSubstate++;
|
playerStatus->actionSubstate++;
|
||||||
D_802B6EF0 = 1.6f;
|
D_802B6EF0 = 1.6f;
|
||||||
playerStatus->flags |= PS_FLAGS_800000;
|
playerStatus->flags |= PS_FLAGS_SCRIPTED_FALL;
|
||||||
}
|
}
|
||||||
if (gGameStatusPtr->pressedButtons[0] & BUTTON_Z &&
|
if (gGameStatusPtr->pressedButtons[0] & BUTTON_Z &&
|
||||||
!(playerStatus->animFlags & (PA_FLAGS_HOLDING_WATT | PA_FLAGS_2))) {
|
!(playerStatus->animFlags & (PA_FLAGS_USING_WATT | PA_FLAGS_WATT_IN_HANDS))) {
|
||||||
suggest_player_anim_setUnkFlag(ANIM_Mario_AnimMidairStill);
|
suggest_player_anim_setUnkFlag(ANIM_Mario_AnimMidairStill);
|
||||||
playerStatus->actionSubstate = SUBSTATE_SPIN_UP;
|
playerStatus->actionSubstate = SUBSTATE_SPIN_UP;
|
||||||
playerStatus->currentStateTime = 30;
|
playerStatus->currentStateTime = 30;
|
||||||
@ -143,7 +143,7 @@ void action_update_use_spinning_flower(void) {
|
|||||||
gOverrideFlags |= GLOBAL_OVERRIDES_40;
|
gOverrideFlags |= GLOBAL_OVERRIDES_40;
|
||||||
if (--D_802B6EE4 < 0.0f) {
|
if (--D_802B6EE4 < 0.0f) {
|
||||||
D_802B6EE4 = 0.0f;
|
D_802B6EE4 = 0.0f;
|
||||||
playerStatus->flags &= ~PS_FLAGS_100000;
|
playerStatus->flags &= ~PS_FLAGS_ROTATION_LOCKED;
|
||||||
}
|
}
|
||||||
playerStatus->spriteFacingAngle = clamp_angle(playerStatus->spriteFacingAngle + D_802B6EE4);
|
playerStatus->spriteFacingAngle = clamp_angle(playerStatus->spriteFacingAngle + D_802B6EE4);
|
||||||
sin_cos_rad(DEG_TO_RAD(SpinningFlower_AngleToCenter - 60.0f), &dx, &dz);
|
sin_cos_rad(DEG_TO_RAD(SpinningFlower_AngleToCenter - 60.0f), &dx, &dz);
|
||||||
@ -159,7 +159,7 @@ void action_update_use_spinning_flower(void) {
|
|||||||
gCameras[CAM_DEFAULT].targetPos.y = playerStatus->position.y;
|
gCameras[CAM_DEFAULT].targetPos.y = playerStatus->position.y;
|
||||||
gCameras[CAM_DEFAULT].targetPos.z = playerStatus->position.z;
|
gCameras[CAM_DEFAULT].targetPos.z = playerStatus->position.z;
|
||||||
if (entityID >= 0) {
|
if (entityID >= 0) {
|
||||||
playerStatus->flags &= ~PS_FLAGS_100000;
|
playerStatus->flags &= ~PS_FLAGS_ROTATION_LOCKED;
|
||||||
enable_player_input();
|
enable_player_input();
|
||||||
enable_player_static_collisions();
|
enable_player_static_collisions();
|
||||||
set_action_state(ACTION_STATE_LAND);
|
set_action_state(ACTION_STATE_LAND);
|
||||||
@ -277,8 +277,8 @@ void action_update_use_spinning_flower(void) {
|
|||||||
case SUBSTATE_FINISH:
|
case SUBSTATE_FINISH:
|
||||||
enable_player_static_collisions();
|
enable_player_static_collisions();
|
||||||
enable_player_input();
|
enable_player_input();
|
||||||
playerStatus->flags &= ~PS_FLAGS_100000;
|
playerStatus->flags &= ~PS_FLAGS_ROTATION_LOCKED;
|
||||||
playerStatus->flags |= PS_FLAGS_800000;
|
playerStatus->flags |= PS_FLAGS_SCRIPTED_FALL;
|
||||||
start_falling();
|
start_falling();
|
||||||
enable_partner_ai();
|
enable_partner_ai();
|
||||||
gOverrideFlags &= ~GLOBAL_OVERRIDES_40;
|
gOverrideFlags &= ~GLOBAL_OVERRIDES_40;
|
||||||
|
@ -19,7 +19,7 @@ void action_update_use_tweester(void) {
|
|||||||
playerStatus->flags &= ~PS_FLAGS_ACTION_STATE_CHANGED;
|
playerStatus->flags &= ~PS_FLAGS_ACTION_STATE_CHANGED;
|
||||||
disable_player_static_collisions();
|
disable_player_static_collisions();
|
||||||
disable_player_input();
|
disable_player_input();
|
||||||
playerStatus->flags |= (PS_FLAGS_100000 | PS_FLAGS_FLYING);
|
playerStatus->flags |= (PS_FLAGS_ROTATION_LOCKED | PS_FLAGS_FLYING);
|
||||||
suggest_player_anim_clearUnkFlag(ANIM_Mario_8001F);
|
suggest_player_anim_clearUnkFlag(ANIM_Mario_8001F);
|
||||||
playerStatus->actionSubstate = SUBSTATE_LAUNCH;
|
playerStatus->actionSubstate = SUBSTATE_LAUNCH;
|
||||||
mem_clear(PlayerTweesterPhysics, sizeof(*PlayerTweesterPhysics));
|
mem_clear(PlayerTweesterPhysics, sizeof(*PlayerTweesterPhysics));
|
||||||
@ -69,7 +69,7 @@ void action_update_use_tweester(void) {
|
|||||||
playerStatus->blinkTimer = 50;
|
playerStatus->blinkTimer = 50;
|
||||||
enable_player_static_collisions();
|
enable_player_static_collisions();
|
||||||
enable_player_input();
|
enable_player_input();
|
||||||
playerStatus->flags &= ~(PS_FLAGS_100000 | PS_FLAGS_FLYING);
|
playerStatus->flags &= ~(PS_FLAGS_ROTATION_LOCKED | PS_FLAGS_FLYING);
|
||||||
set_action_state(ACTION_STATE_IDLE);
|
set_action_state(ACTION_STATE_IDLE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -43,18 +43,18 @@ void action_update_walk(void) {
|
|||||||
|
|
||||||
if (playerStatus->flags & PS_FLAGS_ACTION_STATE_CHANGED) {
|
if (playerStatus->flags & PS_FLAGS_ACTION_STATE_CHANGED) {
|
||||||
playerStatus->flags &= ~(
|
playerStatus->flags &= ~(
|
||||||
PS_FLAGS_ACTION_STATE_CHANGED | PS_FLAGS_800000 | PS_FLAGS_80000);
|
PS_FLAGS_ACTION_STATE_CHANGED | PS_FLAGS_SCRIPTED_FALL | PS_FLAGS_ARMS_RAISED);
|
||||||
playerStatus->unk_60 = 0;
|
playerStatus->unk_60 = 0;
|
||||||
changedAnim = TRUE;
|
changedAnim = TRUE;
|
||||||
|
|
||||||
if (!(playerStatus->flags & PS_FLAGS_4000)) {
|
if (!(playerStatus->flags & PS_FLAGS_CUTSCENE_MOVEMENT)) {
|
||||||
playerStatus->currentSpeed = playerStatus->walkSpeed;
|
playerStatus->currentSpeed = playerStatus->walkSpeed;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (playerStatus->animFlags & PA_FLAGS_8BIT_MARIO) {
|
if (playerStatus->animFlags & PA_FLAGS_8BIT_MARIO) {
|
||||||
anim = ANIM_Mario_90003;
|
anim = ANIM_Mario_90003;
|
||||||
}
|
}
|
||||||
else if (!(playerStatus->animFlags & PA_FLAGS_HOLDING_WATT)) {
|
else if (!(playerStatus->animFlags & PA_FLAGS_USING_WATT)) {
|
||||||
anim = ANIM_Mario_Walking;
|
anim = ANIM_Mario_Walking;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -63,7 +63,7 @@ void action_update_walk(void) {
|
|||||||
suggest_player_anim_clearUnkFlag(anim);
|
suggest_player_anim_clearUnkFlag(anim);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (playerStatus->flags & PS_FLAGS_4000) {
|
if (playerStatus->flags & PS_FLAGS_CUTSCENE_MOVEMENT) {
|
||||||
playerStatus->targetYaw = playerStatus->heading;
|
playerStatus->targetYaw = playerStatus->heading;
|
||||||
try_player_footstep_sounds(8);
|
try_player_footstep_sounds(8);
|
||||||
return;
|
return;
|
||||||
@ -128,18 +128,18 @@ void action_update_run(void) {
|
|||||||
|
|
||||||
if (playerStatus->flags & PS_FLAGS_ACTION_STATE_CHANGED) {
|
if (playerStatus->flags & PS_FLAGS_ACTION_STATE_CHANGED) {
|
||||||
playerStatus->flags &= ~(PS_FLAGS_ACTION_STATE_CHANGED |
|
playerStatus->flags &= ~(PS_FLAGS_ACTION_STATE_CHANGED |
|
||||||
PS_FLAGS_800000 | PS_FLAGS_80000);
|
PS_FLAGS_SCRIPTED_FALL | PS_FLAGS_ARMS_RAISED);
|
||||||
D_8010C980 = 0;
|
D_8010C980 = 0;
|
||||||
playerStatus->unk_60 = 0;
|
playerStatus->unk_60 = 0;
|
||||||
phi_s3 = 1;
|
phi_s3 = 1;
|
||||||
|
|
||||||
if (!(playerStatus->flags & PS_FLAGS_4000)) {
|
if (!(playerStatus->flags & PS_FLAGS_CUTSCENE_MOVEMENT)) {
|
||||||
playerStatus->currentSpeed = playerStatus->runSpeed;
|
playerStatus->currentSpeed = playerStatus->runSpeed;
|
||||||
}
|
}
|
||||||
if (playerStatus->animFlags & PA_FLAGS_8BIT_MARIO) {
|
if (playerStatus->animFlags & PA_FLAGS_8BIT_MARIO) {
|
||||||
anim = ANIM_Mario_90003;
|
anim = ANIM_Mario_90003;
|
||||||
} else {
|
} else {
|
||||||
if (!(playerStatus->animFlags & PA_FLAGS_HOLDING_WATT)) {
|
if (!(playerStatus->animFlags & PA_FLAGS_USING_WATT)) {
|
||||||
anim = ANIM_Mario_Running;
|
anim = ANIM_Mario_Running;
|
||||||
} else {
|
} else {
|
||||||
anim = ANIM_Mario_60002;
|
anim = ANIM_Mario_60002;
|
||||||
@ -148,7 +148,7 @@ void action_update_run(void) {
|
|||||||
suggest_player_anim_clearUnkFlag(anim);
|
suggest_player_anim_clearUnkFlag(anim);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (playerStatus->flags & PS_FLAGS_4000) {
|
if (playerStatus->flags & PS_FLAGS_CUTSCENE_MOVEMENT) {
|
||||||
playerStatus->targetYaw = playerStatus->heading;
|
playerStatus->targetYaw = playerStatus->heading;
|
||||||
try_player_footstep_sounds(4);
|
try_player_footstep_sounds(4);
|
||||||
return;
|
return;
|
||||||
@ -224,13 +224,13 @@ static void action_update_walk_peach(void) {
|
|||||||
if (playerStatus->flags & PS_FLAGS_ACTION_STATE_CHANGED) {
|
if (playerStatus->flags & PS_FLAGS_ACTION_STATE_CHANGED) {
|
||||||
playerStatus->flags &= ~PS_FLAGS_ACTION_STATE_CHANGED;
|
playerStatus->flags &= ~PS_FLAGS_ACTION_STATE_CHANGED;
|
||||||
playerStatus->unk_60 = 0;
|
playerStatus->unk_60 = 0;
|
||||||
if (!(playerStatus->flags & PS_FLAGS_4000)) {
|
if (!(playerStatus->flags & PS_FLAGS_CUTSCENE_MOVEMENT)) {
|
||||||
playerStatus->currentSpeed = playerStatus->walkSpeed;
|
playerStatus->currentSpeed = playerStatus->walkSpeed;
|
||||||
}
|
}
|
||||||
func_802B6550_E23C30();
|
func_802B6550_E23C30();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (playerStatus->flags & PS_FLAGS_4000) {
|
if (playerStatus->flags & PS_FLAGS_CUTSCENE_MOVEMENT) {
|
||||||
playerStatus->targetYaw = playerStatus->heading;
|
playerStatus->targetYaw = playerStatus->heading;
|
||||||
try_player_footstep_sounds(8);
|
try_player_footstep_sounds(8);
|
||||||
return;
|
return;
|
||||||
@ -261,7 +261,7 @@ static void action_update_run_peach(void) {
|
|||||||
if (playerStatus->flags & PS_FLAGS_ACTION_STATE_CHANGED) {
|
if (playerStatus->flags & PS_FLAGS_ACTION_STATE_CHANGED) {
|
||||||
playerStatus->flags &= ~PS_FLAGS_ACTION_STATE_CHANGED;
|
playerStatus->flags &= ~PS_FLAGS_ACTION_STATE_CHANGED;
|
||||||
playerStatus->unk_60 = 0;
|
playerStatus->unk_60 = 0;
|
||||||
if (!(playerStatus->flags & PS_FLAGS_4000)) {
|
if (!(playerStatus->flags & PS_FLAGS_CUTSCENE_MOVEMENT)) {
|
||||||
playerStatus->currentSpeed = playerStatus->runSpeed;
|
playerStatus->currentSpeed = playerStatus->runSpeed;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -281,7 +281,7 @@ static void action_update_run_peach(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (playerStatus->flags & PS_FLAGS_4000) {
|
if (playerStatus->flags & PS_FLAGS_CUTSCENE_MOVEMENT) {
|
||||||
playerStatus->targetYaw = playerStatus->heading;
|
playerStatus->targetYaw = playerStatus->heading;
|
||||||
try_player_footstep_sounds(4);
|
try_player_footstep_sounds(4);
|
||||||
return;
|
return;
|
||||||
|
@ -10,7 +10,7 @@ API_CALLABLE(N(AwaitPlayerFallDist)) {
|
|||||||
suggest_player_anim_clearUnkFlag(ANIM_Mario_AnimMidairStill);
|
suggest_player_anim_clearUnkFlag(ANIM_Mario_AnimMidairStill);
|
||||||
}
|
}
|
||||||
|
|
||||||
fallSpeed = func_800E34D8();
|
fallSpeed = player_fall_distance();
|
||||||
playerStatus->position.y = player_check_collision_below(fallSpeed, &colliderID);
|
playerStatus->position.y = player_check_collision_below(fallSpeed, &colliderID);
|
||||||
script->functionTemp[0] += fabsf(fallSpeed);
|
script->functionTemp[0] += fabsf(fallSpeed);
|
||||||
|
|
||||||
|
@ -107,7 +107,7 @@ API_CALLABLE(N(func_802400F4_BF4894)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!(playerStatus->position.y > -10.0f)) {
|
if (!(playerStatus->position.y > -10.0f)) {
|
||||||
f32 temp_f20 = func_800E34D8();
|
f32 temp_f20 = player_fall_distance();
|
||||||
s32 colliderID;
|
s32 colliderID;
|
||||||
|
|
||||||
playerStatus->position.y = player_check_collision_below(temp_f20, &colliderID);
|
playerStatus->position.y = player_check_collision_below(temp_f20, &colliderID);
|
||||||
|
@ -57,7 +57,7 @@ EvtScript N(EVS_Main) = {
|
|||||||
EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE)
|
EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE)
|
||||||
EVT_CALL(SetNpcPos, NPC_PARTNER, NPC_DISPOSE_LOCATION)
|
EVT_CALL(SetNpcPos, NPC_PARTNER, NPC_DISPOSE_LOCATION)
|
||||||
EVT_END_IF
|
EVT_END_IF
|
||||||
EVT_CALL(SetPlayerFlagBits, PS_FLAGS_200000, TRUE)
|
EVT_CALL(SetPlayerFlagBits, PS_FLAGS_NO_FLIPPING, TRUE)
|
||||||
EVT_CALL(InterpPlayerYaw, 90, 0)
|
EVT_CALL(InterpPlayerYaw, 90, 0)
|
||||||
EVT_WAIT(2)
|
EVT_WAIT(2)
|
||||||
EVT_CALL(RandInt, 4, LVar0)
|
EVT_CALL(RandInt, 4, LVar0)
|
||||||
|
@ -10,7 +10,7 @@ SlideParams N(SlideData) = {
|
|||||||
|
|
||||||
API_CALLABLE(N(SetPlayerSliding)) {
|
API_CALLABLE(N(SetPlayerSliding)) {
|
||||||
gPlayerStatus.slideParams = script->varTablePtr[0];
|
gPlayerStatus.slideParams = script->varTablePtr[0];
|
||||||
gPlayerStatus.flags |= PS_FLAGS_10;
|
gPlayerStatus.flags |= PS_FLAGS_SLIDING;
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
API_CALLABLE(N(SetPlayerSliding)) {
|
API_CALLABLE(N(SetPlayerSliding)) {
|
||||||
gPlayerStatus.slideParams = script->varTablePtr[0];
|
gPlayerStatus.slideParams = script->varTablePtr[0];
|
||||||
gPlayerStatus.flags |= PS_FLAGS_10;
|
gPlayerStatus.flags |= PS_FLAGS_SLIDING;
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ SlideParams N(SlideData) = {
|
|||||||
|
|
||||||
API_CALLABLE(N(SetPlayerSliding)) {
|
API_CALLABLE(N(SetPlayerSliding)) {
|
||||||
gPlayerStatus.slideParams = script->varTablePtr[0];
|
gPlayerStatus.slideParams = script->varTablePtr[0];
|
||||||
gPlayerStatus.flags |= PS_FLAGS_10;
|
gPlayerStatus.flags |= PS_FLAGS_SLIDING;
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -114,7 +114,7 @@ EvtScript N(EVS_Scene_MeetParakarry) = {
|
|||||||
EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(1.0))
|
EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(1.0))
|
||||||
EVT_END_THREAD
|
EVT_END_THREAD
|
||||||
EVT_SUB(LVar0, 15)
|
EVT_SUB(LVar0, 15)
|
||||||
EVT_CALL(SetPlayerFlagBits, PS_FLAGS_200000, TRUE)
|
EVT_CALL(SetPlayerFlagBits, PS_FLAGS_NO_FLIPPING, TRUE)
|
||||||
EVT_CALL(InterpPlayerYaw, 270, 0)
|
EVT_CALL(InterpPlayerYaw, 270, 0)
|
||||||
EVT_WAIT(1)
|
EVT_WAIT(1)
|
||||||
EVT_CALL(SetPlayerAnimation, ANIM_Mario_DeadStill)
|
EVT_CALL(SetPlayerAnimation, ANIM_Mario_DeadStill)
|
||||||
@ -131,7 +131,7 @@ EvtScript N(EVS_Scene_MeetParakarry) = {
|
|||||||
EVT_CALL(GetNpcPos, NPC_Parakarry, LVar0, LVar1, LVar2)
|
EVT_CALL(GetNpcPos, NPC_Parakarry, LVar0, LVar1, LVar2)
|
||||||
EVT_ADD(LVar1, 20)
|
EVT_ADD(LVar1, 20)
|
||||||
EVT_CALL(NpcJump1, NPC_Parakarry, LVar0, LVar1, LVar2, 8)
|
EVT_CALL(NpcJump1, NPC_Parakarry, LVar0, LVar1, LVar2, 8)
|
||||||
EVT_CALL(SetPlayerFlagBits, PS_FLAGS_200000, FALSE)
|
EVT_CALL(SetPlayerFlagBits, PS_FLAGS_NO_FLIPPING, FALSE)
|
||||||
EVT_CALL(InterpPlayerYaw, 90, 0)
|
EVT_CALL(InterpPlayerYaw, 90, 0)
|
||||||
EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002)
|
EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002)
|
||||||
EVT_WAIT(30)
|
EVT_WAIT(30)
|
||||||
|
@ -185,9 +185,9 @@ EvtScript N(EVS_NpcDefeat_Fuzzipede) = {
|
|||||||
EVT_CALL(DisablePlayerPhysics, TRUE)
|
EVT_CALL(DisablePlayerPhysics, TRUE)
|
||||||
EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND)
|
EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND)
|
||||||
EVT_CALL(SetPlayerPos, -40, 0, 0)
|
EVT_CALL(SetPlayerPos, -40, 0, 0)
|
||||||
EVT_CALL(SetPlayerFlagBits, PS_FLAGS_200000, TRUE)
|
EVT_CALL(SetPlayerFlagBits, PS_FLAGS_NO_FLIPPING, TRUE)
|
||||||
EVT_CALL(InterpPlayerYaw, 90, 0)
|
EVT_CALL(InterpPlayerYaw, 90, 0)
|
||||||
EVT_CALL(SetPlayerFlagBits, PS_FLAGS_200000, FALSE)
|
EVT_CALL(SetPlayerFlagBits, PS_FLAGS_NO_FLIPPING, FALSE)
|
||||||
EVT_CALL(SetNpcPos, NPC_SELF, 30, 0, 0)
|
EVT_CALL(SetNpcPos, NPC_SELF, 30, 0, 0)
|
||||||
EVT_CALL(SetNpcYaw, NPC_SELF, 270)
|
EVT_CALL(SetNpcYaw, NPC_SELF, 270)
|
||||||
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -5, 0, 0)
|
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -5, 0, 0)
|
||||||
|
@ -24,6 +24,6 @@ ApiStatus func_80240040_ABB2D0(Evt* script, s32 isInitialCall) {
|
|||||||
status->slideParams = &D_8024162C_ABC8BC;
|
status->slideParams = &D_8024162C_ABC8BC;
|
||||||
}
|
}
|
||||||
|
|
||||||
status->flags |= PS_FLAGS_10;
|
status->flags |= PS_FLAGS_SLIDING;
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
@ -224,7 +224,7 @@ EvtScript N(EVS_Scene_MarioRevived) = {
|
|||||||
EVT_CALL(N(func_80240388_8AC318))
|
EVT_CALL(N(func_80240388_8AC318))
|
||||||
EVT_CALL(N(func_80240000_8ABF90), 255, 255, 255, 60, 60, 60, 0)
|
EVT_CALL(N(func_80240000_8ABF90), 255, 255, 255, 60, 60, 60, 0)
|
||||||
EVT_CALL(FadeOutMusic, 0, 500)
|
EVT_CALL(FadeOutMusic, 0, 500)
|
||||||
EVT_CALL(SetPlayerFlagBits, PS_FLAGS_200000, TRUE)
|
EVT_CALL(SetPlayerFlagBits, PS_FLAGS_NO_FLIPPING, TRUE)
|
||||||
EVT_CALL(InterpPlayerYaw, 90, 0)
|
EVT_CALL(InterpPlayerYaw, 90, 0)
|
||||||
EVT_CALL(DisablePlayerInput, TRUE)
|
EVT_CALL(DisablePlayerInput, TRUE)
|
||||||
EVT_CALL(DisablePlayerPhysics, TRUE)
|
EVT_CALL(DisablePlayerPhysics, TRUE)
|
||||||
|
@ -31,7 +31,7 @@ EvtScript N(EVS_Main) = {
|
|||||||
EVT_CALL(DisablePlayerInput, TRUE)
|
EVT_CALL(DisablePlayerInput, TRUE)
|
||||||
EVT_CALL(DisablePlayerPhysics, TRUE)
|
EVT_CALL(DisablePlayerPhysics, TRUE)
|
||||||
EVT_CALL(SetPlayerPos, -2, 0, 0)
|
EVT_CALL(SetPlayerPos, -2, 0, 0)
|
||||||
EVT_CALL(SetPlayerFlagBits, PS_FLAGS_200000, TRUE)
|
EVT_CALL(SetPlayerFlagBits, PS_FLAGS_NO_FLIPPING, TRUE)
|
||||||
EVT_CALL(InterpPlayerYaw, 90, 0)
|
EVT_CALL(InterpPlayerYaw, 90, 0)
|
||||||
EVT_WAIT(1)
|
EVT_WAIT(1)
|
||||||
EVT_CALL(SetPlayerAnimation, ANIM_Mario_10024)
|
EVT_CALL(SetPlayerAnimation, ANIM_Mario_10024)
|
||||||
|
@ -138,7 +138,7 @@ EvtScript N(EVS_RideZipline) = {
|
|||||||
EVT_END_IF
|
EVT_END_IF
|
||||||
EVT_CALL(PlaySound, SOUND_2087)
|
EVT_CALL(PlaySound, SOUND_2087)
|
||||||
EVT_LABEL(10)
|
EVT_LABEL(10)
|
||||||
EVT_CALL(SetPlayerFlagBits, PS_FLAGS_800000, TRUE)
|
EVT_CALL(SetPlayerFlagBits, PS_FLAGS_SCRIPTED_FALL, TRUE)
|
||||||
EVT_SET(MF_RidingZipline1, FALSE)
|
EVT_SET(MF_RidingZipline1, FALSE)
|
||||||
EVT_CALL(StopSound, SOUND_80000019)
|
EVT_CALL(StopSound, SOUND_80000019)
|
||||||
EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_40, FALSE)
|
EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_40, FALSE)
|
||||||
|
@ -132,7 +132,7 @@ EvtScript N(EVS_RideZipline) = {
|
|||||||
EVT_END_IF
|
EVT_END_IF
|
||||||
EVT_CALL(PlaySound, SOUND_2087)
|
EVT_CALL(PlaySound, SOUND_2087)
|
||||||
EVT_LABEL(10)
|
EVT_LABEL(10)
|
||||||
EVT_CALL(SetPlayerFlagBits, PS_FLAGS_800000, TRUE)
|
EVT_CALL(SetPlayerFlagBits, PS_FLAGS_SCRIPTED_FALL, TRUE)
|
||||||
EVT_SET(MF_Zipline_GoingDown, FALSE)
|
EVT_SET(MF_Zipline_GoingDown, FALSE)
|
||||||
EVT_CALL(StopSound, SOUND_80000019)
|
EVT_CALL(StopSound, SOUND_80000019)
|
||||||
EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_40, FALSE)
|
EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_40, FALSE)
|
||||||
|
@ -106,9 +106,9 @@ EvtScript N(EVS_Scene_ReachedMansion) = {
|
|||||||
EVT_CALL(SetPlayerPos, -701, 0, -34)
|
EVT_CALL(SetPlayerPos, -701, 0, -34)
|
||||||
EVT_CALL(SetNpcPos, NPC_PARTNER, -701, 0, -34)
|
EVT_CALL(SetNpcPos, NPC_PARTNER, -701, 0, -34)
|
||||||
EVT_CALL(DisablePlayerPhysics, FALSE)
|
EVT_CALL(DisablePlayerPhysics, FALSE)
|
||||||
EVT_CALL(SetPlayerFlagBits, PS_FLAGS_200000, TRUE)
|
EVT_CALL(SetPlayerFlagBits, PS_FLAGS_NO_FLIPPING, TRUE)
|
||||||
EVT_CALL(PlayerMoveTo, -407, 103, 120)
|
EVT_CALL(PlayerMoveTo, -407, 103, 120)
|
||||||
EVT_CALL(SetPlayerFlagBits, PS_FLAGS_200000, FALSE)
|
EVT_CALL(SetPlayerFlagBits, PS_FLAGS_NO_FLIPPING, FALSE)
|
||||||
EVT_WAIT(10)
|
EVT_WAIT(10)
|
||||||
EVT_THREAD
|
EVT_THREAD
|
||||||
EVT_WAIT(15)
|
EVT_WAIT(15)
|
||||||
|
@ -10,7 +10,7 @@ ApiStatus func_80240000_DCCCD0(void) {
|
|||||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||||
PlayerData* playerData = &gPlayerData;
|
PlayerData* playerData = &gPlayerData;
|
||||||
|
|
||||||
if (playerStatus->flags & PS_FLAGS_20) {
|
if (playerStatus->flags & PS_FLAGS_PAUSED) {
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -164,7 +164,7 @@ ApiStatus func_80240F2C_D7FC8C(Evt* script, s32 isInitialCall) {
|
|||||||
ApiStatus func_80240FD0_D7FD30(Evt* script, s32 isInitialCall) {
|
ApiStatus func_80240FD0_D7FD30(Evt* script, s32 isInitialCall) {
|
||||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||||
|
|
||||||
playerStatus->animFlags |= PA_FLAGS_800000;
|
playerStatus->animFlags |= PA_FLAGS_PUSHED_ALBINO_DINO;
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ ApiStatus func_8024059C_D3AB6C(Evt* script, s32 isInitialCall) {
|
|||||||
ApiStatus func_8024072C_D3ACFC(Evt* script, s32 isInitialCall) {
|
ApiStatus func_8024072C_D3ACFC(Evt* script, s32 isInitialCall) {
|
||||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||||
|
|
||||||
if (playerStatus->flags & (PS_FLAGS_INPUT_DISABLED | PS_FLAGS_1000)) {
|
if (playerStatus->flags & (PS_FLAGS_INPUT_DISABLED | PS_FLAGS_NO_STATIC_COLLISION)) {
|
||||||
script->varTable[0] = 1;
|
script->varTable[0] = 1;
|
||||||
} else {
|
} else {
|
||||||
script->varTable[0] = 0;
|
script->varTable[0] = 0;
|
||||||
|
@ -44,7 +44,7 @@ BombTrigger N(BombPos_CellWall) = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
EvtScript N(EVS_BombWall_Cell) = {
|
EvtScript N(EVS_BombWall_Cell) = {
|
||||||
EVT_CALL(SetPlayerFlagBits, PS_FLAGS_40 | PS_FLAGS_80, TRUE)
|
EVT_CALL(SetPlayerFlagBits, PS_FLAGS_NO_CHANGE_PARTNER | PS_FLAGS_NO_PARTNER_USAGE, TRUE)
|
||||||
EVT_PLAY_EFFECT(EFFECT_BOMBETTE_BREAKING, 0, 19, 19, 1, 10, 30)
|
EVT_PLAY_EFFECT(EFFECT_BOMBETTE_BREAKING, 0, 19, 19, 1, 10, 30)
|
||||||
EVT_CALL(SetGroupEnabled, MODEL_ana, 1)
|
EVT_CALL(SetGroupEnabled, MODEL_ana, 1)
|
||||||
EVT_LOOP(10)
|
EVT_LOOP(10)
|
||||||
@ -90,7 +90,7 @@ EvtScript N(EVS_BombWall_Cell) = {
|
|||||||
EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0)
|
EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0)
|
||||||
EVT_WAIT(10)
|
EVT_WAIT(10)
|
||||||
EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH1_00E3)
|
EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH1_00E3)
|
||||||
EVT_CALL(SetPlayerFlagBits, PS_FLAGS_40 | PS_FLAGS_80, FALSE)
|
EVT_CALL(SetPlayerFlagBits, PS_FLAGS_NO_CHANGE_PARTNER | PS_FLAGS_NO_PARTNER_USAGE, FALSE)
|
||||||
EVT_CALL(EnablePartnerAI)
|
EVT_CALL(EnablePartnerAI)
|
||||||
EVT_CALL(DisablePlayerInput, FALSE)
|
EVT_CALL(DisablePlayerInput, FALSE)
|
||||||
EVT_THREAD
|
EVT_THREAD
|
||||||
|
@ -661,10 +661,10 @@ EvtScript N(EVS_Quizmo_NPC_Interact) = {
|
|||||||
EVT_USE_ARRAY(EVT_PTR(N(Quizmo_ScriptArray)))
|
EVT_USE_ARRAY(EVT_PTR(N(Quizmo_ScriptArray)))
|
||||||
EVT_SET(GF_Quizmo_ChangedLocation, TRUE)
|
EVT_SET(GF_Quizmo_ChangedLocation, TRUE)
|
||||||
EVT_CALL(DisablePlayerPhysics, TRUE)
|
EVT_CALL(DisablePlayerPhysics, TRUE)
|
||||||
EVT_CALL(SetPlayerFlagBits, PS_FLAGS_400000, 1)
|
EVT_CALL(SetPlayerFlagBits, PS_FLAGS_MOVEMENT_LOCKED, 1)
|
||||||
EVT_EXEC_WAIT(N(EVS_Quizmo_QuizMain))
|
EVT_EXEC_WAIT(N(EVS_Quizmo_QuizMain))
|
||||||
EVT_CALL(DisablePlayerPhysics, FALSE)
|
EVT_CALL(DisablePlayerPhysics, FALSE)
|
||||||
EVT_CALL(SetPlayerFlagBits, PS_FLAGS_400000, 0)
|
EVT_CALL(SetPlayerFlagBits, PS_FLAGS_MOVEMENT_LOCKED, 0)
|
||||||
EVT_RETURN
|
EVT_RETURN
|
||||||
EVT_END
|
EVT_END
|
||||||
};
|
};
|
||||||
|
@ -92,7 +92,7 @@ void N(worker_reflect_player_wall)(void) {
|
|||||||
|
|
||||||
spr_update_player_sprite(2, anim, 1.0f);
|
spr_update_player_sprite(2, anim, 1.0f);
|
||||||
|
|
||||||
if (!(playerStatus->flags & PS_FLAGS_20000)) {
|
if (!(playerStatus->flags & PS_FLAGS_SPINNING)) {
|
||||||
if (playerStatus->alpha1 != D_802D9D70) {
|
if (playerStatus->alpha1 != D_802D9D70) {
|
||||||
if (playerStatus->alpha1 < 254) {
|
if (playerStatus->alpha1 < 254) {
|
||||||
renderMode = RENDER_MODE_SURFACE_XLU_LAYER1;
|
renderMode = RENDER_MODE_SURFACE_XLU_LAYER1;
|
||||||
@ -167,7 +167,7 @@ void N(worker_reflect_player_floor)(void) {
|
|||||||
|
|
||||||
spr_update_player_sprite(1, playerStatus->trueAnimation, 1.0f);
|
spr_update_player_sprite(1, playerStatus->trueAnimation, 1.0f);
|
||||||
|
|
||||||
if (!(playerStatus->flags & PS_FLAGS_20000)) {
|
if (!(playerStatus->flags & PS_FLAGS_SPINNING)) {
|
||||||
if (playerStatus->alpha1 != D_802D9D71) {
|
if (playerStatus->alpha1 != D_802D9D71) {
|
||||||
if (playerStatus->alpha1 < 254) {
|
if (playerStatus->alpha1 < 254) {
|
||||||
renderMode = RENDER_MODE_SURFACE_XLU_LAYER1;
|
renderMode = RENDER_MODE_SURFACE_XLU_LAYER1;
|
||||||
@ -187,7 +187,7 @@ void N(worker_reflect_player_floor)(void) {
|
|||||||
renderTaskPtr->appendGfxArg = playerStatus;
|
renderTaskPtr->appendGfxArg = playerStatus;
|
||||||
renderTaskPtr->distance = -screenZ;
|
renderTaskPtr->distance = -screenZ;
|
||||||
renderTaskPtr->appendGfx = (void (*)(void*)) (
|
renderTaskPtr->appendGfx = (void (*)(void*)) (
|
||||||
!(playerStatus->flags & PS_FLAGS_20000)
|
!(playerStatus->flags & PS_FLAGS_SPINNING)
|
||||||
? N(appendGfx_reflect_player_floor_basic)
|
? N(appendGfx_reflect_player_floor_basic)
|
||||||
: N(appendGfx_reflect_player_floor_fancy)
|
: N(appendGfx_reflect_player_floor_fancy)
|
||||||
);
|
);
|
||||||
|
@ -1134,10 +1134,10 @@ EvtScript N(EVS_Quizmo_NPC_Interact) = {
|
|||||||
EVT_USE_ARRAY(EVT_PTR(N(Quizmo_ScriptArray)))
|
EVT_USE_ARRAY(EVT_PTR(N(Quizmo_ScriptArray)))
|
||||||
EVT_SET(GF_Quizmo_ChangedLocation, TRUE)
|
EVT_SET(GF_Quizmo_ChangedLocation, TRUE)
|
||||||
EVT_CALL(DisablePlayerPhysics, TRUE)
|
EVT_CALL(DisablePlayerPhysics, TRUE)
|
||||||
EVT_CALL(SetPlayerFlagBits, PS_FLAGS_400000, 1)
|
EVT_CALL(SetPlayerFlagBits, PS_FLAGS_MOVEMENT_LOCKED, 1)
|
||||||
EVT_EXEC_WAIT(N(EVS_Quizmo_QuizMain))
|
EVT_EXEC_WAIT(N(EVS_Quizmo_QuizMain))
|
||||||
EVT_CALL(DisablePlayerPhysics, FALSE)
|
EVT_CALL(DisablePlayerPhysics, FALSE)
|
||||||
EVT_CALL(SetPlayerFlagBits, PS_FLAGS_400000, 0)
|
EVT_CALL(SetPlayerFlagBits, PS_FLAGS_MOVEMENT_LOCKED, 0)
|
||||||
EVT_RETURN
|
EVT_RETURN
|
||||||
EVT_END
|
EVT_END
|
||||||
};
|
};
|
||||||
|
@ -67,7 +67,7 @@ ApiStatus N(FireBarAI_Main)(Evt* script, s32 isInitialCall) {
|
|||||||
npc->pos.z = data->centerPos.z + dZ;
|
npc->pos.z = data->centerPos.z + dZ;
|
||||||
npc->yaw = atan2(npc->pos.x, npc->pos.z, playerStatus->position.x, playerStatus->position.z);
|
npc->yaw = atan2(npc->pos.x, npc->pos.z, playerStatus->position.x, playerStatus->position.z);
|
||||||
}
|
}
|
||||||
if (!(data->flags & 2) && !(playerStatus->flags & PS_FLAGS_8000)) {
|
if (!(data->flags & 2) && !(playerStatus->flags & PS_FLAGS_HAZARD_INVINCIBILITY)) {
|
||||||
dY = playerStatus->position.y - npc->pos.y;
|
dY = playerStatus->position.y - npc->pos.y;
|
||||||
if (partnerActionStatus->partnerActionState == PARTNER_ACTION_USE) {
|
if (partnerActionStatus->partnerActionState == PARTNER_ACTION_USE) {
|
||||||
if (partnerActionStatus->actingPartner == PARTNER_LAKILESTER) {
|
if (partnerActionStatus->actingPartner == PARTNER_LAKILESTER) {
|
||||||
@ -84,7 +84,7 @@ ApiStatus N(FireBarAI_Main)(Evt* script, s32 isInitialCall) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (playerStatus->flags & PS_FLAGS_8000) {
|
if (playerStatus->flags & PS_FLAGS_HAZARD_INVINCIBILITY) {
|
||||||
hitDetected = -1;
|
hitDetected = -1;
|
||||||
}
|
}
|
||||||
data->yaw += data->rotationRate;
|
data->yaw += data->rotationRate;
|
||||||
|
@ -154,11 +154,11 @@ EvtScript N(EVS_Pipe_ExitVertical_Impl) = {
|
|||||||
EVT_SET(LVar0, LVarA)
|
EVT_SET(LVar0, LVarA)
|
||||||
EVT_CALL(N(Pipe_GetEntryPos))
|
EVT_CALL(N(Pipe_GetEntryPos))
|
||||||
EVT_CALL(SetPlayerPos, LVar1, LVar2, LVar3)
|
EVT_CALL(SetPlayerPos, LVar1, LVar2, LVar3)
|
||||||
EVT_CALL(SetPlayerFlagBits, PS_FLAGS_200000, TRUE)
|
EVT_CALL(SetPlayerFlagBits, PS_FLAGS_NO_FLIPPING, TRUE)
|
||||||
EVT_CALL(N(Pipe_GetCameraYaw))
|
EVT_CALL(N(Pipe_GetCameraYaw))
|
||||||
EVT_CALL(InterpPlayerYaw, LVar0, 0)
|
EVT_CALL(InterpPlayerYaw, LVar0, 0)
|
||||||
EVT_WAIT(2)
|
EVT_WAIT(2)
|
||||||
EVT_CALL(SetPlayerFlagBits, PS_FLAGS_200000, FALSE)
|
EVT_CALL(SetPlayerFlagBits, PS_FLAGS_NO_FLIPPING, FALSE)
|
||||||
EVT_CALL(PlaySound, SOUND_ENTER_PIPE)
|
EVT_CALL(PlaySound, SOUND_ENTER_PIPE)
|
||||||
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
|
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
|
||||||
EVT_THREAD
|
EVT_THREAD
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#include "npc.h"
|
#include "npc.h"
|
||||||
|
|
||||||
API_CALLABLE(N(Pipe_SetAnimFlag)) {
|
API_CALLABLE(N(Pipe_SetAnimFlag)) {
|
||||||
gPlayerStatusPtr->animFlags |= PA_FLAGS_100000;
|
gPlayerStatusPtr->animFlags |= PA_FLAGS_CHANGING_MAP;
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -153,11 +153,11 @@ EvtScript N(Pipe_ScriptD) = {
|
|||||||
EVT_SET(LVar0, LVarA)
|
EVT_SET(LVar0, LVarA)
|
||||||
EVT_CALL(N(Pipe_GetEntryPos))
|
EVT_CALL(N(Pipe_GetEntryPos))
|
||||||
EVT_CALL(SetPlayerPos, LVar1, LVar2, LVar3)
|
EVT_CALL(SetPlayerPos, LVar1, LVar2, LVar3)
|
||||||
EVT_CALL(SetPlayerFlagBits, PA_FLAGS_200000, TRUE)
|
EVT_CALL(SetPlayerFlagBits, PS_FLAGS_NO_FLIPPING, TRUE)
|
||||||
EVT_CALL(N(Pipe_GetCameraYaw))
|
EVT_CALL(N(Pipe_GetCameraYaw))
|
||||||
EVT_CALL(InterpPlayerYaw, LVar0, 0)
|
EVT_CALL(InterpPlayerYaw, LVar0, 0)
|
||||||
EVT_WAIT(2)
|
EVT_WAIT(2)
|
||||||
EVT_CALL(SetPlayerFlagBits, PA_FLAGS_200000, FALSE)
|
EVT_CALL(SetPlayerFlagBits, PS_FLAGS_NO_FLIPPING, FALSE)
|
||||||
EVT_CALL(PlaySound, SOUND_ENTER_PIPE)
|
EVT_CALL(PlaySound, SOUND_ENTER_PIPE)
|
||||||
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
|
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
|
||||||
EVT_THREAD
|
EVT_THREAD
|
||||||
|
@ -21,7 +21,7 @@ ApiStatus N(UnkFunc11)(Evt* script, s32 isInitialCall) {
|
|||||||
(playerStatus->actionState != ACTION_STATE_RUN))
|
(playerStatus->actionState != ACTION_STATE_RUN))
|
||||||
{
|
{
|
||||||
script->varTable[0] = 0;
|
script->varTable[0] = 0;
|
||||||
} else if (playerStatus->animFlags & PA_FLAGS_HOLDING_WATT) {
|
} else if (playerStatus->animFlags & PA_FLAGS_USING_WATT) {
|
||||||
script->varTable[0] = 0;
|
script->varTable[0] = 0;
|
||||||
} else {
|
} else {
|
||||||
script->varTable[0] = 1;
|
script->varTable[0] = 1;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
#include "sprite/npc/WorldBow.h"
|
#include "sprite/npc/WorldBow.h"
|
||||||
|
|
||||||
BSS s32 D_802BE0C0;
|
BSS s32 D_802BE0C0;
|
||||||
BSS s32 D_802BE0C4;
|
BSS s32 D_802BE0C4; // This seems to have something to do with input being disabled
|
||||||
BSS TweesterPhysics BowTweesterPhysics;
|
BSS TweesterPhysics BowTweesterPhysics;
|
||||||
BSS s32 D_802BE0E4;
|
BSS s32 D_802BE0E4;
|
||||||
BSS s32 D_802BE0E8;
|
BSS s32 D_802BE0E8;
|
||||||
@ -164,10 +164,10 @@ ApiStatus BowUseAbility(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
if (isInitialCall) {
|
if (isInitialCall) {
|
||||||
func_802BD4FC_323E4C(bow);
|
func_802BD4FC_323E4C(bow);
|
||||||
if (!(playerStatus->animFlags & PA_FLAGS_100000)) {
|
if (!(playerStatus->animFlags & PA_FLAGS_CHANGING_MAP)) {
|
||||||
if (func_800EA52C(PARTNER_BOW)) {
|
if (func_800EA52C(PARTNER_BOW)) {
|
||||||
if (playerStatus->animFlags & PA_FLAGS_200000) {
|
if (playerStatus->animFlags & PA_FLAGS_PARTNER_USAGE_FORCED) {
|
||||||
playerStatus->animFlags &= ~PA_FLAGS_200000;
|
playerStatus->animFlags &= ~PA_FLAGS_PARTNER_USAGE_FORCED;
|
||||||
script->functionTemp[2] = disable_player_input();
|
script->functionTemp[2] = disable_player_input();
|
||||||
D_802BE0C4 = TRUE;
|
D_802BE0C4 = TRUE;
|
||||||
script->functionTemp[0] = 20;
|
script->functionTemp[0] = 20;
|
||||||
@ -188,7 +188,7 @@ ApiStatus BowUseAbility(Evt* script, s32 isInitialCall) {
|
|||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
playerStatus->flags |= PS_FLAGS_100;
|
playerStatus->flags |= PS_FLAGS_PAUSE_DISABLED;
|
||||||
script->functionTemp[1] = 3;
|
script->functionTemp[1] = 3;
|
||||||
script->functionTemp[2] = disable_player_input();
|
script->functionTemp[2] = disable_player_input();
|
||||||
D_802BE0C4 = TRUE;
|
D_802BE0C4 = TRUE;
|
||||||
@ -201,7 +201,7 @@ ApiStatus BowUseAbility(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
enable_player_input();
|
enable_player_input();
|
||||||
D_802BE0C4 = FALSE;
|
D_802BE0C4 = FALSE;
|
||||||
playerStatus->flags &= ~PS_FLAGS_100;
|
playerStatus->flags &= ~PS_FLAGS_PAUSE_DISABLED;
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
script->functionTemp[1]--;
|
script->functionTemp[1]--;
|
||||||
@ -211,7 +211,7 @@ ApiStatus BowUseAbility(Evt* script, s32 isInitialCall) {
|
|||||||
enable_player_input();
|
enable_player_input();
|
||||||
D_802BE0C4 = FALSE;
|
D_802BE0C4 = FALSE;
|
||||||
}
|
}
|
||||||
playerStatus->flags &= ~PS_FLAGS_100;
|
playerStatus->flags &= ~PS_FLAGS_PAUSE_DISABLED;
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
script->functionTemp[0] = 20;
|
script->functionTemp[0] = 20;
|
||||||
@ -221,8 +221,8 @@ ApiStatus BowUseAbility(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
switch (script->functionTemp[0]) {
|
switch (script->functionTemp[0]) {
|
||||||
case 20:
|
case 20:
|
||||||
if (playerStatus->flags & PS_FLAGS_800) {
|
if (playerStatus->flags & PS_FLAGS_HIT_FIRE) {
|
||||||
playerStatus->flags &= ~PS_FLAGS_100;
|
playerStatus->flags &= ~PS_FLAGS_PAUSE_DISABLED;
|
||||||
if (D_802BE0C4) {
|
if (D_802BE0C4) {
|
||||||
enable_player_input();
|
enable_player_input();
|
||||||
D_802BE0C4 = FALSE;
|
D_802BE0C4 = FALSE;
|
||||||
@ -237,7 +237,7 @@ ApiStatus BowUseAbility(Evt* script, s32 isInitialCall) {
|
|||||||
bow->flags &= ~(NPC_FLAG_JUMPING | NPC_FLAG_GRAVITY);
|
bow->flags &= ~(NPC_FLAG_JUMPING | NPC_FLAG_GRAVITY);
|
||||||
partnerActionStatus->partnerActionState = 1;
|
partnerActionStatus->partnerActionState = 1;
|
||||||
partnerActionStatus->actingPartner = 9;
|
partnerActionStatus->actingPartner = 9;
|
||||||
playerStatus->flags |= PS_FLAGS_8000;
|
playerStatus->flags |= PS_FLAGS_HAZARD_INVINCIBILITY;
|
||||||
func_800EF4E0();
|
func_800EF4E0();
|
||||||
bow->moveToPos.x = playerStatus->position.x;
|
bow->moveToPos.x = playerStatus->position.x;
|
||||||
bow->moveToPos.y = playerStatus->position.y + (playerStatus->colliderHeight * 0.5f);
|
bow->moveToPos.y = playerStatus->position.y + (playerStatus->colliderHeight * 0.5f);
|
||||||
@ -254,7 +254,7 @@ ApiStatus BowUseAbility(Evt* script, s32 isInitialCall) {
|
|||||||
script->functionTemp[0]++;
|
script->functionTemp[0]++;
|
||||||
break;
|
break;
|
||||||
case 21:
|
case 21:
|
||||||
if (collisionStatus->currentFloor >= 0 && !(playerStatus->animFlags & PA_FLAGS_100000)) {
|
if (collisionStatus->currentFloor >= 0 && !(playerStatus->animFlags & PA_FLAGS_CHANGING_MAP)) {
|
||||||
bow->moveToPos.x = playerStatus->position.x;
|
bow->moveToPos.x = playerStatus->position.x;
|
||||||
bow->moveToPos.y = playerStatus->position.y + (playerStatus->colliderHeight * 0.5f);
|
bow->moveToPos.y = playerStatus->position.y + (playerStatus->colliderHeight * 0.5f);
|
||||||
bow->moveToPos.z = playerStatus->position.z;
|
bow->moveToPos.z = playerStatus->position.z;
|
||||||
@ -284,7 +284,7 @@ ApiStatus BowUseAbility(Evt* script, s32 isInitialCall) {
|
|||||||
playerStatus->alpha1 = 128;
|
playerStatus->alpha1 = 128;
|
||||||
bow->renderMode = RENDER_MODE_SURFACE_XLU_LAYER2;
|
bow->renderMode = RENDER_MODE_SURFACE_XLU_LAYER2;
|
||||||
script->functionTemp[0]++;
|
script->functionTemp[0]++;
|
||||||
playerStatus->flags &= ~PS_FLAGS_100;
|
playerStatus->flags &= ~PS_FLAGS_PAUSE_DISABLED;
|
||||||
bow->flags |= NPC_FLAG_40;
|
bow->flags |= NPC_FLAG_40;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -311,7 +311,7 @@ ApiStatus BowUseAbility(Evt* script, s32 isInitialCall) {
|
|||||||
distance = dist2D(0.0f, 0.0f, partnerActionStatus->stickX, partnerActionStatus->stickY);
|
distance = dist2D(0.0f, 0.0f, partnerActionStatus->stickX, partnerActionStatus->stickY);
|
||||||
if ((collisionStatus->currentFloor < 0) || distance > 10.0f ||
|
if ((collisionStatus->currentFloor < 0) || distance > 10.0f ||
|
||||||
partnerActionStatus->pressedButtons & (BUTTON_B | BUTTON_C_DOWN) ||
|
partnerActionStatus->pressedButtons & (BUTTON_B | BUTTON_C_DOWN) ||
|
||||||
playerStatus->flags & PS_FLAGS_800) {
|
playerStatus->flags & PS_FLAGS_HIT_FIRE) {
|
||||||
if (func_802BD540_323E90() < 0) {
|
if (func_802BD540_323E90() < 0) {
|
||||||
script->functionTemp[0]++;
|
script->functionTemp[0]++;
|
||||||
script->functionTemp[1] = 3;
|
script->functionTemp[1] = 3;
|
||||||
@ -357,19 +357,19 @@ void func_802BDDF0_324740(Npc* bow) {
|
|||||||
enable_player_input();
|
enable_player_input();
|
||||||
}
|
}
|
||||||
|
|
||||||
playerStatus->flags &= ~(PS_FLAGS_8000 | PS_FLAGS_JUMPING);
|
playerStatus->flags &= ~(PS_FLAGS_HAZARD_INVINCIBILITY | PS_FLAGS_JUMPING);
|
||||||
bow->flags &= ~(NPC_FLAG_40 | NPC_FLAG_2);
|
bow->flags &= ~(NPC_FLAG_40 | NPC_FLAG_2);
|
||||||
D_802BE0C4 = FALSE;
|
D_802BE0C4 = FALSE;
|
||||||
actionState = ACTION_STATE_IDLE;
|
actionState = ACTION_STATE_IDLE;
|
||||||
|
|
||||||
if (playerStatus->flags & PS_FLAGS_800) {
|
if (playerStatus->flags & PS_FLAGS_HIT_FIRE) {
|
||||||
actionState = ACTION_STATE_HIT_LAVA;
|
actionState = ACTION_STATE_HIT_LAVA;
|
||||||
}
|
}
|
||||||
|
|
||||||
set_action_state(actionState);
|
set_action_state(actionState);
|
||||||
partnerActionStatus->partnerActionState = 0;
|
partnerActionStatus->partnerActionState = 0;
|
||||||
partnerActionStatus->actingPartner = 0;
|
partnerActionStatus->actingPartner = 0;
|
||||||
playerStatus->flags &= ~PS_FLAGS_100;
|
playerStatus->flags &= ~PS_FLAGS_PAUSE_DISABLED;
|
||||||
partner_clear_player_tracking(bow);
|
partner_clear_player_tracking(bow);
|
||||||
D_802BE0C0 = FALSE;
|
D_802BE0C0 = FALSE;
|
||||||
}
|
}
|
||||||
|
@ -200,7 +200,7 @@ ApiStatus func_802BD638_31B658(Evt* script, s32 isInitialCall) {
|
|||||||
if (currentEncounter->unk_08 == 0) {
|
if (currentEncounter->unk_08 == 0) {
|
||||||
if (isInitialCall) {
|
if (isInitialCall) {
|
||||||
func_802BD5F4_31B614(kooper);
|
func_802BD5F4_31B614(kooper);
|
||||||
if (playerStatus->animFlags & PA_FLAGS_100000) {
|
if (playerStatus->animFlags & PA_FLAGS_CHANGING_MAP) {
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -278,7 +278,7 @@ ApiStatus func_802BD638_31B658(Evt* script, s32 isInitialCall) {
|
|||||||
}
|
}
|
||||||
disable_npc_blur(kooper);
|
disable_npc_blur(kooper);
|
||||||
if (script->functionTemp[2] < playerStatus->inputEnabledCounter) {
|
if (script->functionTemp[2] < playerStatus->inputEnabledCounter) {
|
||||||
if (!(playerStatus->animFlags & PA_FLAGS_100000)) {
|
if (!(playerStatus->animFlags & PA_FLAGS_CHANGING_MAP)) {
|
||||||
suggest_player_anim_clearUnkFlag(ANIM_Mario_10002);
|
suggest_player_anim_clearUnkFlag(ANIM_Mario_10002);
|
||||||
} else {
|
} else {
|
||||||
suggest_player_anim_clearUnkFlag(ANIM_Mario_Running);
|
suggest_player_anim_clearUnkFlag(ANIM_Mario_Running);
|
||||||
|
@ -27,9 +27,9 @@ void func_802BD100_320C50(void) {
|
|||||||
f32 playerSpeedCopy;
|
f32 playerSpeedCopy;
|
||||||
s32 temp_v0_2;
|
s32 temp_v0_2;
|
||||||
|
|
||||||
if (playerFlags & PS_FLAGS_4000) {
|
if (playerFlags & PS_FLAGS_CUTSCENE_MOVEMENT) {
|
||||||
playerSpeedCopy = playerStatus->currentSpeed;
|
playerSpeedCopy = playerStatus->currentSpeed;
|
||||||
if (playerFlags & PS_FLAGS_40000) {
|
if (playerFlags & PS_FLAGS_ENTERING_BATTLE) {
|
||||||
playerSpeedCopy *= 0.5f;
|
playerSpeedCopy *= 0.5f;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -196,7 +196,8 @@ void func_802BD6BC_32120C(f32* outAngle, f32* outMagnitude) {
|
|||||||
*outMagnitude = magnitude;
|
*outMagnitude = magnitude;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 func_802BD7DC(void) {
|
// Returns whether or not it is safe to dismount Lakilester
|
||||||
|
s32 lakilester_raycast_below(void) {
|
||||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||||
Camera* currentCamera;
|
Camera* currentCamera;
|
||||||
f32 hitDirX, hitDirZ;
|
f32 hitDirX, hitDirZ;
|
||||||
@ -207,8 +208,8 @@ s32 func_802BD7DC(void) {
|
|||||||
s32 raycastResult;
|
s32 raycastResult;
|
||||||
s32 ret;
|
s32 ret;
|
||||||
|
|
||||||
if (playerStatus->animFlags & PA_FLAGS_20000000) {
|
if (playerStatus->animFlags & PA_FLAGS_DISMOUNTING_ALLOWED) {
|
||||||
playerStatus->animFlags &= ~PA_FLAGS_20000000;
|
playerStatus->animFlags &= ~PA_FLAGS_DISMOUNTING_ALLOWED;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -546,20 +547,20 @@ ApiStatus func_802BE724_322274(Evt* script, s32 isInitialCall) {
|
|||||||
f32 yaw, camYaw;
|
f32 yaw, camYaw;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
playerStatus->animFlags &= ~PA_FLAGS_400000;
|
playerStatus->animFlags &= ~PA_FLAGS_RIDING_PARTNER;
|
||||||
|
|
||||||
if (isInitialCall) {
|
if (isInitialCall) {
|
||||||
func_802BD678_3211C8(npc);
|
func_802BD678_3211C8(npc);
|
||||||
if (!(playerStatus->animFlags & PA_FLAGS_100000)) {
|
if (!(playerStatus->animFlags & PA_FLAGS_CHANGING_MAP)) {
|
||||||
npc->flags = npc->flags & ~PA_FLAGS_40;
|
npc->flags = npc->flags & ~PA_FLAGS_40;
|
||||||
npc->moveToPos.x = npc->pos.x;
|
npc->moveToPos.x = npc->pos.x;
|
||||||
npc->moveToPos.y = npc->pos.y;
|
npc->moveToPos.y = npc->pos.y;
|
||||||
npc->moveToPos.z = npc->pos.z;
|
npc->moveToPos.z = npc->pos.z;
|
||||||
|
|
||||||
if (gGameStatusPtr->keepUsingPartnerOnMapChange ||
|
if (gGameStatusPtr->keepUsingPartnerOnMapChange ||
|
||||||
(playerStatus->animFlags & PA_FLAGS_200000)) {
|
(playerStatus->animFlags & PA_FLAGS_PARTNER_USAGE_FORCED)) {
|
||||||
if (playerStatus->animFlags & PA_FLAGS_200000) {
|
if (playerStatus->animFlags & PA_FLAGS_PARTNER_USAGE_FORCED) {
|
||||||
playerStatus->animFlags &= ~PA_FLAGS_200000;
|
playerStatus->animFlags &= ~PA_FLAGS_PARTNER_USAGE_FORCED;
|
||||||
}
|
}
|
||||||
D_802BFF14 = 100;
|
D_802BFF14 = 100;
|
||||||
} else {
|
} else {
|
||||||
@ -574,14 +575,14 @@ ApiStatus func_802BE724_322274(Evt* script, s32 isInitialCall) {
|
|||||||
playerStatus->actionState == ACTION_STATE_RUN ||
|
playerStatus->actionState == ACTION_STATE_RUN ||
|
||||||
playerStatus->actionState == ACTION_STATE_FALLING) {
|
playerStatus->actionState == ACTION_STATE_FALLING) {
|
||||||
|
|
||||||
playerStatus->flags |= PS_FLAGS_100;
|
playerStatus->flags |= PS_FLAGS_PAUSE_DISABLED;
|
||||||
} else {
|
} else {
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
partnerActionStatus->partnerAction_unk_1 = 0;
|
partnerActionStatus->partnerAction_unk_1 = 0;
|
||||||
playerStatus->flags &= ~PS_FLAGS_100;
|
playerStatus->flags &= ~PS_FLAGS_PAUSE_DISABLED;
|
||||||
npc->flags &= ~(NPC_FLAG_40 | NPC_FLAG_ENABLE_HIT_SCRIPT);
|
npc->flags &= ~(NPC_FLAG_40 | NPC_FLAG_ENABLE_HIT_SCRIPT);
|
||||||
npc->flags |= NPC_FLAG_100;
|
npc->flags |= NPC_FLAG_100;
|
||||||
set_action_state(ACTION_STATE_RIDE);
|
set_action_state(ACTION_STATE_RIDE);
|
||||||
@ -622,10 +623,10 @@ ApiStatus func_802BE724_322274(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
switch (D_802BFF14) {
|
switch (D_802BFF14) {
|
||||||
case 40:
|
case 40:
|
||||||
if (playerStatus->flags & PS_FLAGS_800 ||
|
if (playerStatus->flags & PS_FLAGS_HIT_FIRE ||
|
||||||
playerStatus->inputEnabledCounter) {
|
playerStatus->inputEnabledCounter) {
|
||||||
|
|
||||||
playerStatus->flags &= ~PS_FLAGS_100;
|
playerStatus->flags &= ~PS_FLAGS_PAUSE_DISABLED;
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
script->functionTemp[1] = 3;
|
script->functionTemp[1] = 3;
|
||||||
@ -634,8 +635,8 @@ ApiStatus func_802BE724_322274(Evt* script, s32 isInitialCall) {
|
|||||||
D_802BFF14 += 1;
|
D_802BFF14 += 1;
|
||||||
break;
|
break;
|
||||||
case 41:
|
case 41:
|
||||||
if (playerStatus->flags & PS_FLAGS_800) {
|
if (playerStatus->flags & PS_FLAGS_HIT_FIRE) {
|
||||||
playerStatus->flags &= ~PS_FLAGS_100;
|
playerStatus->flags &= ~PS_FLAGS_PAUSE_DISABLED;
|
||||||
if (D_802BFF04 != 0) {
|
if (D_802BFF04 != 0) {
|
||||||
enable_player_input();
|
enable_player_input();
|
||||||
D_802BFF04 = 0;
|
D_802BFF04 = 0;
|
||||||
@ -643,12 +644,12 @@ ApiStatus func_802BE724_322274(Evt* script, s32 isInitialCall) {
|
|||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (playerStatus->animFlags & PA_FLAGS_100000) {
|
if (playerStatus->animFlags & PA_FLAGS_CHANGING_MAP) {
|
||||||
if (script->functionTemp[2] < playerStatus->inputEnabledCounter) {
|
if (script->functionTemp[2] < playerStatus->inputEnabledCounter) {
|
||||||
enable_player_input();
|
enable_player_input();
|
||||||
D_802BFF04 = 0;
|
D_802BFF04 = 0;
|
||||||
}
|
}
|
||||||
playerStatus->flags &= ~PS_FLAGS_100;
|
playerStatus->flags &= ~PS_FLAGS_PAUSE_DISABLED;
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -656,7 +657,7 @@ ApiStatus func_802BE724_322274(Evt* script, s32 isInitialCall) {
|
|||||||
if (script->functionTemp[2] < playerStatus->inputEnabledCounter) {
|
if (script->functionTemp[2] < playerStatus->inputEnabledCounter) {
|
||||||
enable_player_input();
|
enable_player_input();
|
||||||
D_802BFF04 = 0;
|
D_802BFF04 = 0;
|
||||||
playerStatus->flags &= ~PS_FLAGS_100;
|
playerStatus->flags &= ~PS_FLAGS_PAUSE_DISABLED;
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
D_802BFF14 = 100;
|
D_802BFF14 = 100;
|
||||||
@ -714,7 +715,7 @@ ApiStatus func_802BE724_322274(Evt* script, s32 isInitialCall) {
|
|||||||
D_802BFF14++;
|
D_802BFF14++;
|
||||||
/* fallthrough */
|
/* fallthrough */
|
||||||
case 103:
|
case 103:
|
||||||
if (!(playerStatus->flags & PS_FLAGS_800)) {
|
if (!(playerStatus->flags & PS_FLAGS_HIT_FIRE)) {
|
||||||
npc->pos.x += (npc->moveToPos.x - npc->pos.x) / npc->duration;
|
npc->pos.x += (npc->moveToPos.x - npc->pos.x) / npc->duration;
|
||||||
npc->pos.z += (npc->moveToPos.z - npc->pos.z) / npc->duration;
|
npc->pos.z += (npc->moveToPos.z - npc->pos.z) / npc->duration;
|
||||||
npc->pos.y += (npc->moveToPos.y - npc->pos.y) / npc->duration;
|
npc->pos.y += (npc->moveToPos.y - npc->pos.y) / npc->duration;
|
||||||
@ -747,26 +748,26 @@ ApiStatus func_802BE724_322274(Evt* script, s32 isInitialCall) {
|
|||||||
disable_player_shadow();
|
disable_player_shadow();
|
||||||
partnerActionStatus->actingPartner = PARTNER_LAKILESTER;
|
partnerActionStatus->actingPartner = PARTNER_LAKILESTER;
|
||||||
partnerActionStatus->partnerActionState = PARTNER_ACTION_LAKILESTER_1;
|
partnerActionStatus->partnerActionState = PARTNER_ACTION_LAKILESTER_1;
|
||||||
playerStatus->flags &= ~PS_FLAGS_100;
|
playerStatus->flags &= ~PS_FLAGS_PAUSE_DISABLED;
|
||||||
gGameStatusPtr->keepUsingPartnerOnMapChange = 0;
|
gGameStatusPtr->keepUsingPartnerOnMapChange = 0;
|
||||||
D_802BFF18 = 0;
|
D_802BFF18 = 0;
|
||||||
D_802BFF0C = 2;
|
D_802BFF0C = 2;
|
||||||
func_802BFB44_323694(2.0f);
|
func_802BFB44_323694(2.0f);
|
||||||
D_802BFF14 = 104;
|
D_802BFF14 = 104;
|
||||||
playerStatus->animFlags |= PA_FLAGS_400000;
|
playerStatus->animFlags |= PA_FLAGS_RIDING_PARTNER;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
D_802BFF14 = 10;
|
D_802BFF14 = 10;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 104:
|
case 104:
|
||||||
if (playerStatus->flags & PS_FLAGS_800) {
|
if (playerStatus->flags & PS_FLAGS_HIT_FIRE) {
|
||||||
D_802BFF14 = 10;
|
D_802BFF14 = 10;
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
npc->duration--;
|
npc->duration--;
|
||||||
if (npc->duration != 0) {
|
if (npc->duration != 0) {
|
||||||
if (partnerActionStatus->pressedButtons & (B_BUTTON | D_CBUTTONS) && func_802BD7DC()) {
|
if (partnerActionStatus->pressedButtons & (B_BUTTON | D_CBUTTONS) && lakilester_raycast_below()) {
|
||||||
D_802BFF14 = 3;
|
D_802BFF14 = 3;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -777,7 +778,7 @@ ApiStatus func_802BE724_322274(Evt* script, s32 isInitialCall) {
|
|||||||
}
|
}
|
||||||
case 1:
|
case 1:
|
||||||
func_802BDDD8_321928(npc);
|
func_802BDDD8_321928(npc);
|
||||||
playerStatus->animFlags |= PA_FLAGS_400000;
|
playerStatus->animFlags |= PA_FLAGS_RIDING_PARTNER;
|
||||||
D_802BFF18++;
|
D_802BFF18++;
|
||||||
npc->pos.y = npc->moveToPos.y + 2.0f;
|
npc->pos.y = npc->moveToPos.y + 2.0f;
|
||||||
|
|
||||||
@ -789,15 +790,15 @@ ApiStatus func_802BE724_322274(Evt* script, s32 isInitialCall) {
|
|||||||
playerStatus->targetYaw = npc->yaw;
|
playerStatus->targetYaw = npc->yaw;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(playerStatus->flags & PS_FLAGS_800)) {
|
if (!(playerStatus->flags & PS_FLAGS_HIT_FIRE)) {
|
||||||
if (partnerActionStatus->pressedButtons & (B_BUTTON | D_CBUTTONS)) {
|
if (partnerActionStatus->pressedButtons & (B_BUTTON | D_CBUTTONS)) {
|
||||||
if (func_802BD7DC()) {
|
if (lakilester_raycast_below()) {
|
||||||
D_802BFF14 = 3;
|
D_802BFF14 = 3;
|
||||||
} else {
|
} else {
|
||||||
if (!(playerStatus->animFlags & PA_FLAGS_40000000)) {
|
if (!(playerStatus->animFlags & PA_FLAGS_PARTNER_USAGE_STOPPED)) {
|
||||||
sfx_play_sound_at_npc(SOUND_MENU_ERROR, 0, NPC_PARTNER);
|
sfx_play_sound_at_npc(SOUND_MENU_ERROR, 0, NPC_PARTNER);
|
||||||
}
|
}
|
||||||
playerStatus->animFlags &= ~PA_FLAGS_40000000;
|
playerStatus->animFlags &= ~PA_FLAGS_PARTNER_USAGE_STOPPED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -807,8 +808,8 @@ ApiStatus func_802BE724_322274(Evt* script, s32 isInitialCall) {
|
|||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
npc->flags &= ~NPC_FLAG_40;
|
npc->flags &= ~NPC_FLAG_40;
|
||||||
playerStatus->flags |= PS_FLAGS_100;
|
playerStatus->flags |= PS_FLAGS_PAUSE_DISABLED;
|
||||||
func_802BD7DC();
|
lakilester_raycast_below();
|
||||||
camYaw = camera->currentYaw;
|
camYaw = camera->currentYaw;
|
||||||
if (playerStatus->spriteFacingAngle >= 90.0f && playerStatus->spriteFacingAngle < 270.0f) {
|
if (playerStatus->spriteFacingAngle >= 90.0f && playerStatus->spriteFacingAngle < 270.0f) {
|
||||||
yaw = (180.0f + camYaw) - 90.0f;
|
yaw = (180.0f + camYaw) - 90.0f;
|
||||||
@ -880,7 +881,7 @@ ApiStatus func_802BE724_322274(Evt* script, s32 isInitialCall) {
|
|||||||
enable_player_shadow();
|
enable_player_shadow();
|
||||||
gGameStatusPtr->keepUsingPartnerOnMapChange = 0;
|
gGameStatusPtr->keepUsingPartnerOnMapChange = 0;
|
||||||
|
|
||||||
if (playerStatus->flags & PS_FLAGS_800) {
|
if (playerStatus->flags & PS_FLAGS_HIT_FIRE) {
|
||||||
partnerActionStatus->actingPartner = PARTNER_NONE;
|
partnerActionStatus->actingPartner = PARTNER_NONE;
|
||||||
partnerActionStatus->partnerActionState = PARTNER_ACTION_NONE;
|
partnerActionStatus->partnerActionState = PARTNER_ACTION_NONE;
|
||||||
|
|
||||||
@ -891,7 +892,7 @@ ApiStatus func_802BE724_322274(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
partner_clear_player_tracking(npc);
|
partner_clear_player_tracking(npc);
|
||||||
set_action_state(ACTION_STATE_HIT_FIRE);
|
set_action_state(ACTION_STATE_HIT_FIRE);
|
||||||
playerStatus->flags &= ~PS_FLAGS_100;
|
playerStatus->flags &= ~PS_FLAGS_PAUSE_DISABLED;
|
||||||
return ApiStatus_DONE1;
|
return ApiStatus_DONE1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -905,7 +906,7 @@ ApiStatus func_802BE724_322274(Evt* script, s32 isInitialCall) {
|
|||||||
npc->flags &= ~(NPC_FLAG_40 | NPC_FLAG_400000 | NPC_FLAG_ENABLE_HIT_SCRIPT);
|
npc->flags &= ~(NPC_FLAG_40 | NPC_FLAG_400000 | NPC_FLAG_ENABLE_HIT_SCRIPT);
|
||||||
partnerActionStatus->actingPartner = PARTNER_NONE;
|
partnerActionStatus->actingPartner = PARTNER_NONE;
|
||||||
partnerActionStatus->partnerActionState = PARTNER_ACTION_NONE;
|
partnerActionStatus->partnerActionState = PARTNER_ACTION_NONE;
|
||||||
playerStatus->flags &= ~PS_FLAGS_100;
|
playerStatus->flags &= ~PS_FLAGS_PAUSE_DISABLED;
|
||||||
if (D_802BFF04 != 0) {
|
if (D_802BFF04 != 0) {
|
||||||
D_802BFF04 = 0;
|
D_802BFF04 = 0;
|
||||||
enable_player_input();
|
enable_player_input();
|
||||||
@ -937,14 +938,14 @@ ApiStatus func_802BF4F0_323040(Evt* script, s32 isInitialCall) {
|
|||||||
if (isInitialCall) {
|
if (isInitialCall) {
|
||||||
D_802BFF00 = (D_802BFF0C == 0) ? 3 : 0;
|
D_802BFF00 = (D_802BFF0C == 0) ? 3 : 0;
|
||||||
partner_init_put_away(lakilester);
|
partner_init_put_away(lakilester);
|
||||||
func_802BD7DC();
|
lakilester_raycast_below();
|
||||||
playerStatus->animFlags &= ~PA_FLAGS_400000;
|
playerStatus->animFlags &= ~PA_FLAGS_RIDING_PARTNER;
|
||||||
playerStatus->flags |= PS_FLAGS_100;
|
playerStatus->flags |= PS_FLAGS_PAUSE_DISABLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (D_802BFF00) {
|
switch (D_802BFF00) {
|
||||||
case 0:
|
case 0:
|
||||||
func_802BD7DC();
|
lakilester_raycast_below();
|
||||||
yaw = cam->currentYaw;
|
yaw = cam->currentYaw;
|
||||||
if ((playerStatus->spriteFacingAngle >= 90.0f) && (playerStatus->spriteFacingAngle < 270.0f)) {
|
if ((playerStatus->spriteFacingAngle >= 90.0f) && (playerStatus->spriteFacingAngle < 270.0f)) {
|
||||||
lakilester->yaw = (yaw + 180.0f) - 90.0f;
|
lakilester->yaw = (yaw + 180.0f) - 90.0f;
|
||||||
@ -1011,7 +1012,7 @@ ApiStatus func_802BF4F0_323040(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
enable_player_shadow();
|
enable_player_shadow();
|
||||||
|
|
||||||
if (playerStatus->flags & PS_FLAGS_800) {
|
if (playerStatus->flags & PS_FLAGS_HIT_FIRE) {
|
||||||
partnerActionStatus->actingPartner = PARTNER_NONE;
|
partnerActionStatus->actingPartner = PARTNER_NONE;
|
||||||
partnerActionStatus->partnerActionState = PARTNER_ACTION_NONE;
|
partnerActionStatus->partnerActionState = PARTNER_ACTION_NONE;
|
||||||
if (D_802BFF04) {
|
if (D_802BFF04) {
|
||||||
@ -1038,7 +1039,7 @@ ApiStatus func_802BF4F0_323040(Evt* script, s32 isInitialCall) {
|
|||||||
case 4:
|
case 4:
|
||||||
partnerActionStatus->actingPartner = PARTNER_NONE;
|
partnerActionStatus->actingPartner = PARTNER_NONE;
|
||||||
partnerActionStatus->partnerActionState = PARTNER_ACTION_NONE;
|
partnerActionStatus->partnerActionState = PARTNER_ACTION_NONE;
|
||||||
playerStatus->flags &= ~PS_FLAGS_100;
|
playerStatus->flags &= ~PS_FLAGS_PAUSE_DISABLED;
|
||||||
|
|
||||||
if (D_802BFF04) {
|
if (D_802BFF04) {
|
||||||
D_802BFF04 = FALSE;
|
D_802BFF04 = FALSE;
|
||||||
@ -1154,7 +1155,7 @@ s32 func_802BFBA0_3236F0(Evt* script, s32 isInitialCall) {
|
|||||||
sfx_play_sound_at_npc(SOUND_295, 0, -4);
|
sfx_play_sound_at_npc(SOUND_295, 0, -4);
|
||||||
playerStatus->anim = ANIM_Mario_8000E;
|
playerStatus->anim = ANIM_Mario_8000E;
|
||||||
playerStatus->animNotifyValue = 0;
|
playerStatus->animNotifyValue = 0;
|
||||||
playerStatus->flags |= PS_FLAGS_10000000;
|
playerStatus->flags |= PS_FLAGS_FACE_FORWARDS;
|
||||||
func_802BFB44_323694(2.0f);
|
func_802BFB44_323694(2.0f);
|
||||||
gGameStatusPtr->keepUsingPartnerOnMapChange = 1;
|
gGameStatusPtr->keepUsingPartnerOnMapChange = 1;
|
||||||
npc->flags |= NPC_FLAG_100;
|
npc->flags |= NPC_FLAG_100;
|
||||||
|
@ -155,7 +155,7 @@ s32 func_802BD558_319AC8(void) {
|
|||||||
if (surfaceType == SURFACE_TYPE_SPIKES || surfaceType == SURFACE_TYPE_LAVA) {
|
if (surfaceType == SURFACE_TYPE_SPIKES || surfaceType == SURFACE_TYPE_LAVA) {
|
||||||
gPlayerStatus.hazardType = HAZARD_TYPE_SPIKES;
|
gPlayerStatus.hazardType = HAZARD_TYPE_SPIKES;
|
||||||
D_802BEBC0_31CBE0 = 0x15;
|
D_802BEBC0_31CBE0 = 0x15;
|
||||||
gPlayerStatus.flags |= PS_FLAGS_800;
|
gPlayerStatus.flags |= PS_FLAGS_HIT_FIRE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return raycastResult;
|
return raycastResult;
|
||||||
@ -180,7 +180,7 @@ ApiStatus func_802BD660_319BD0(Evt* evt, s32 isInitialCall) {
|
|||||||
if (gCurrentEncounter.unk_08 == 0) {
|
if (gCurrentEncounter.unk_08 == 0) {
|
||||||
if (isInitialCall) {
|
if (isInitialCall) {
|
||||||
func_802BD514_319A84(parakarry);
|
func_802BD514_319A84(parakarry);
|
||||||
if (!(playerStatus->animFlags & PA_FLAGS_100000)) {
|
if (!(playerStatus->animFlags & PA_FLAGS_CHANGING_MAP)) {
|
||||||
if (partnerActionStatus->partnerAction_unk_1 == 0) {
|
if (partnerActionStatus->partnerAction_unk_1 == 0) {
|
||||||
if (!func_800EA52C(PARTNER_PARAKARRY)) {
|
if (!func_800EA52C(PARTNER_PARAKARRY)) {
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
@ -365,7 +365,7 @@ ApiStatus func_802BD660_319BD0(Evt* evt, s32 isInitialCall) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (testMove == 0 && !(playerStatus->animFlags & PA_FLAGS_8000)) {
|
if (testMove == 0 && !(playerStatus->animFlags & PA_FLAGS_NPC_COLLIDED)) {
|
||||||
add_vec2D_polar(¶karry->pos.x, ¶karry->pos.z, parakarry->moveSpeed, parakarry->yaw);
|
add_vec2D_polar(¶karry->pos.x, ¶karry->pos.z, parakarry->moveSpeed, parakarry->yaw);
|
||||||
add_vec2D_polar(&playerStatus->position.x, &playerStatus->position.z, parakarry->moveSpeed, parakarry->yaw);
|
add_vec2D_polar(&playerStatus->position.x, &playerStatus->position.z, parakarry->moveSpeed, parakarry->yaw);
|
||||||
parakarry->planarFlyDist += parakarry->moveSpeed;
|
parakarry->planarFlyDist += parakarry->moveSpeed;
|
||||||
@ -380,7 +380,7 @@ ApiStatus func_802BD660_319BD0(Evt* evt, s32 isInitialCall) {
|
|||||||
if (surfaceType == SURFACE_TYPE_SPIKES || surfaceType == SURFACE_TYPE_LAVA) {
|
if (surfaceType == SURFACE_TYPE_SPIKES || surfaceType == SURFACE_TYPE_LAVA) {
|
||||||
playerStatus->hazardType = HAZARD_TYPE_SPIKES;
|
playerStatus->hazardType = HAZARD_TYPE_SPIKES;
|
||||||
D_802BEBC0_31CBE0 = 0x15;
|
D_802BEBC0_31CBE0 = 0x15;
|
||||||
playerStatus->flags |= PS_FLAGS_800;
|
playerStatus->flags |= PS_FLAGS_HIT_FIRE;
|
||||||
}
|
}
|
||||||
|
|
||||||
playerStatus->position.y += (y - playerStatus->position.y) * 0.25f;
|
playerStatus->position.y += (y - playerStatus->position.y) * 0.25f;
|
||||||
@ -415,7 +415,7 @@ ApiStatus func_802BD660_319BD0(Evt* evt, s32 isInitialCall) {
|
|||||||
gCollisionStatus.currentFloor = func_802BD558_319AC8();
|
gCollisionStatus.currentFloor = func_802BD558_319AC8();
|
||||||
if (playerStatus->actionState != ACTION_STATE_HIT_FIRE && playerStatus->actionState != ACTION_STATE_HIT_LAVA && playerStatus->actionState != ACTION_STATE_KNOCKBACK) {
|
if (playerStatus->actionState != ACTION_STATE_HIT_FIRE && playerStatus->actionState != ACTION_STATE_HIT_LAVA && playerStatus->actionState != ACTION_STATE_KNOCKBACK) {
|
||||||
suggest_player_anim_setUnkFlag(ANIM_Mario_8000D);
|
suggest_player_anim_setUnkFlag(ANIM_Mario_8000D);
|
||||||
if (!(playerStatus->flags & PS_FLAGS_800)) {
|
if (!(playerStatus->flags & PS_FLAGS_HIT_FIRE)) {
|
||||||
if (partnerActionStatus->pressedButtons & (BUTTON_A | BUTTON_B | BUTTON_C_DOWN)) {
|
if (partnerActionStatus->pressedButtons & (BUTTON_A | BUTTON_B | BUTTON_C_DOWN)) {
|
||||||
if (partnerActionStatus->pressedButtons & buttonTemp) { // TODO find a way to remove this while still loading 0x15 instead of moving it from register
|
if (partnerActionStatus->pressedButtons & buttonTemp) { // TODO find a way to remove this while still loading 0x15 instead of moving it from register
|
||||||
if (!parakarry->pos.x) {
|
if (!parakarry->pos.x) {
|
||||||
@ -439,7 +439,7 @@ ApiStatus func_802BD660_319BD0(Evt* evt, s32 isInitialCall) {
|
|||||||
|
|
||||||
parakarry->pos.y += parakarry->jumpVelocity;
|
parakarry->pos.y += parakarry->jumpVelocity;
|
||||||
playerStatus->position.y += parakarry->jumpVelocity;
|
playerStatus->position.y += parakarry->jumpVelocity;
|
||||||
if (!(playerStatus->animFlags & PA_FLAGS_8000)) {
|
if (!(playerStatus->animFlags & PA_FLAGS_NPC_COLLIDED)) {
|
||||||
parakarry->moveSpeed += 0.1;
|
parakarry->moveSpeed += 0.1;
|
||||||
if (parakarry->moveSpeed > 2.0) {
|
if (parakarry->moveSpeed > 2.0) {
|
||||||
parakarry->moveSpeed = 2.0f;
|
parakarry->moveSpeed = 2.0f;
|
||||||
@ -455,7 +455,7 @@ ApiStatus func_802BD660_319BD0(Evt* evt, s32 isInitialCall) {
|
|||||||
if (parakarry->planarFlyDist > 80.0f) {
|
if (parakarry->planarFlyDist > 80.0f) {
|
||||||
parakarry->animationSpeed += 0.5;
|
parakarry->animationSpeed += 0.5;
|
||||||
}
|
}
|
||||||
if (!(playerStatus->animFlags & PA_FLAGS_8000)) {
|
if (!(playerStatus->animFlags & PA_FLAGS_NPC_COLLIDED)) {
|
||||||
x = playerStatus->position.x;
|
x = playerStatus->position.x;
|
||||||
y = playerStatus->position.y;
|
y = playerStatus->position.y;
|
||||||
z = playerStatus->position.z;
|
z = playerStatus->position.z;
|
||||||
@ -552,13 +552,13 @@ ApiStatus func_802BD660_319BD0(Evt* evt, s32 isInitialCall) {
|
|||||||
if (D_802BEBB8 != 0) {
|
if (D_802BEBB8 != 0) {
|
||||||
enable_player_static_collisions();
|
enable_player_static_collisions();
|
||||||
}
|
}
|
||||||
if (!(playerStatus->flags & PS_FLAGS_800)) {
|
if (!(playerStatus->flags & PS_FLAGS_HIT_FIRE)) {
|
||||||
if (D_802BEBC0_31CBE0 == 0x14) {
|
if (D_802BEBC0_31CBE0 == 0x14) {
|
||||||
start_bounce_b();
|
start_bounce_b();
|
||||||
} else if (D_802BEBC0_31CBE0 == 0x15) {
|
} else if (D_802BEBC0_31CBE0 == 0x15) {
|
||||||
start_falling();
|
start_falling();
|
||||||
gravity_use_fall_parms();
|
gravity_use_fall_parms();
|
||||||
playerStatus->flags |= PS_FLAGS_800000;
|
playerStatus->flags |= PS_FLAGS_SCRIPTED_FALL;
|
||||||
} else {
|
} else {
|
||||||
set_action_state(ACTION_STATE_IDLE);
|
set_action_state(ACTION_STATE_IDLE);
|
||||||
}
|
}
|
||||||
|
@ -247,7 +247,7 @@ s32 SushiePutAway(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
if (isInitialCall) {
|
if (isInitialCall) {
|
||||||
partner_init_put_away(sushie);
|
partner_init_put_away(sushie);
|
||||||
gPlayerStatusPtr->animFlags &= ~PA_FLAGS_400000;
|
gPlayerStatusPtr->animFlags &= ~PA_FLAGS_RIDING_PARTNER;
|
||||||
}
|
}
|
||||||
|
|
||||||
return partner_put_away(sushie) ? ApiStatus_DONE1 : ApiStatus_BLOCK;
|
return partner_put_away(sushie) ? ApiStatus_DONE1 : ApiStatus_BLOCK;
|
||||||
|
@ -215,18 +215,18 @@ ApiStatus func_802BD754_31D2C4(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
if (isInitialCall) {
|
if (isInitialCall) {
|
||||||
func_802BD710_31D280(npc);
|
func_802BD710_31D280(npc);
|
||||||
if (!(playerStatus->animFlags & PA_FLAGS_100000)) {
|
if (!(playerStatus->animFlags & PA_FLAGS_CHANGING_MAP)) {
|
||||||
if (partnerActionStatus->partnerAction_unk_1 == 0) {
|
if (partnerActionStatus->partnerAction_unk_1 == 0) {
|
||||||
if ((partnerActionStatus->partnerActionState != ACTION_STATE_IDLE) ||
|
if ((partnerActionStatus->partnerActionState != ACTION_STATE_IDLE) ||
|
||||||
(func_800EA52C(PARTNER_WATT) && !is_starting_conversation()))
|
(func_800EA52C(PARTNER_WATT) && !is_starting_conversation()))
|
||||||
{
|
{
|
||||||
if (gGameStatusPtr->keepUsingPartnerOnMapChange) {
|
if (gGameStatusPtr->keepUsingPartnerOnMapChange) {
|
||||||
if (playerStatus->animFlags & (PA_FLAGS_HOLDING_WATT | PA_FLAGS_2)) {
|
if (playerStatus->animFlags & (PA_FLAGS_USING_WATT | PA_FLAGS_WATT_IN_HANDS)) {
|
||||||
D_802BE304 = 20;
|
D_802BE304 = 20;
|
||||||
} else {
|
} else {
|
||||||
D_802BE304 = 40;
|
D_802BE304 = 40;
|
||||||
}
|
}
|
||||||
} else if (playerStatus->animFlags & PA_FLAGS_HOLDING_WATT) {
|
} else if (playerStatus->animFlags & PA_FLAGS_USING_WATT) {
|
||||||
D_802BE304 = 2;
|
D_802BE304 = 2;
|
||||||
} else {
|
} else {
|
||||||
D_802BE304 = 40;
|
D_802BE304 = 40;
|
||||||
@ -236,7 +236,7 @@ ApiStatus func_802BD754_31D2C4(Evt* script, s32 isInitialCall) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
partnerActionStatus->partnerAction_unk_1 = 0;
|
partnerActionStatus->partnerAction_unk_1 = 0;
|
||||||
playerStatus->animFlags |= (PA_FLAGS_HOLDING_WATT | PA_FLAGS_2);
|
playerStatus->animFlags |= (PA_FLAGS_USING_WATT | PA_FLAGS_WATT_IN_HANDS);
|
||||||
func_802BE014_31DB84();
|
func_802BE014_31DB84();
|
||||||
npc->currentAnim = ANIM_WorldWatt_Idle;
|
npc->currentAnim = ANIM_WorldWatt_Idle;
|
||||||
D_802BE304 = 1;
|
D_802BE304 = 1;
|
||||||
@ -259,7 +259,7 @@ ApiStatus func_802BD754_31D2C4(Evt* script, s32 isInitialCall) {
|
|||||||
case 41:
|
case 41:
|
||||||
if (script->functionTemp[1] == 0) {
|
if (script->functionTemp[1] == 0) {
|
||||||
if (script->functionTemp[2] >= playerStatus->inputEnabledCounter) {
|
if (script->functionTemp[2] >= playerStatus->inputEnabledCounter) {
|
||||||
if (!(playerStatus->animFlags & PA_FLAGS_100000)) {
|
if (!(playerStatus->animFlags & PA_FLAGS_CHANGING_MAP)) {
|
||||||
if (func_800EA52C(PARTNER_WATT)) {
|
if (func_800EA52C(PARTNER_WATT)) {
|
||||||
if (!is_starting_conversation()) {
|
if (!is_starting_conversation()) {
|
||||||
D_802BE304 = 20;
|
D_802BE304 = 20;
|
||||||
@ -277,7 +277,7 @@ ApiStatus func_802BD754_31D2C4(Evt* script, s32 isInitialCall) {
|
|||||||
switch (D_802BE304) {
|
switch (D_802BE304) {
|
||||||
case 20:
|
case 20:
|
||||||
if (gGameStatusPtr->keepUsingPartnerOnMapChange) {
|
if (gGameStatusPtr->keepUsingPartnerOnMapChange) {
|
||||||
playerStatus->animFlags |= PA_FLAGS_HOLDING_WATT;
|
playerStatus->animFlags |= PA_FLAGS_USING_WATT;
|
||||||
D_802BE30C = 1;
|
D_802BE30C = 1;
|
||||||
npc->flags |= NPC_FLAG_100 | NPC_FLAG_ENABLE_HIT_SCRIPT;
|
npc->flags |= NPC_FLAG_100 | NPC_FLAG_ENABLE_HIT_SCRIPT;
|
||||||
npc->flags &= ~(NPC_FLAG_JUMPING | NPC_FLAG_GRAVITY);
|
npc->flags &= ~(NPC_FLAG_JUMPING | NPC_FLAG_GRAVITY);
|
||||||
@ -291,13 +291,13 @@ ApiStatus func_802BD754_31D2C4(Evt* script, s32 isInitialCall) {
|
|||||||
add_vec2D_polar(&npc->moveToPos.x, &npc->moveToPos.z, 15.0f, playerStatus->targetYaw);
|
add_vec2D_polar(&npc->moveToPos.x, &npc->moveToPos.z, 15.0f, playerStatus->targetYaw);
|
||||||
npc->yaw = playerStatus->targetYaw;
|
npc->yaw = playerStatus->targetYaw;
|
||||||
npc->currentAnim = ANIM_WorldWatt_Idle;
|
npc->currentAnim = ANIM_WorldWatt_Idle;
|
||||||
playerStatus->animFlags |= PA_FLAGS_2;
|
playerStatus->animFlags |= PA_FLAGS_WATT_IN_HANDS;
|
||||||
func_802BE014_31DB84();
|
func_802BE014_31DB84();
|
||||||
npc_set_palswap_mode_A(npc, 1);
|
npc_set_palswap_mode_A(npc, 1);
|
||||||
script->functionTemp[1] = 2;
|
script->functionTemp[1] = 2;
|
||||||
D_802BE304 = 1;
|
D_802BE304 = 1;
|
||||||
} else {
|
} else {
|
||||||
playerStatus->animFlags |= PA_FLAGS_HOLDING_WATT;
|
playerStatus->animFlags |= PA_FLAGS_USING_WATT;
|
||||||
D_802BE30C = 1;
|
D_802BE30C = 1;
|
||||||
npc->flags &= ~(NPC_FLAG_JUMPING | NPC_FLAG_GRAVITY);
|
npc->flags &= ~(NPC_FLAG_JUMPING | NPC_FLAG_GRAVITY);
|
||||||
gGameStatusPtr->keepUsingPartnerOnMapChange = 0;
|
gGameStatusPtr->keepUsingPartnerOnMapChange = 0;
|
||||||
@ -323,7 +323,7 @@ ApiStatus func_802BD754_31D2C4(Evt* script, s32 isInitialCall) {
|
|||||||
npc->yaw = playerStatus->targetYaw;
|
npc->yaw = playerStatus->targetYaw;
|
||||||
npc->currentAnim = ANIM_WorldWatt_Idle;
|
npc->currentAnim = ANIM_WorldWatt_Idle;
|
||||||
partnerActionStatus->actingPartner = PARTNER_WATT;
|
partnerActionStatus->actingPartner = PARTNER_WATT;
|
||||||
playerStatus->animFlags |= PA_FLAGS_2;
|
playerStatus->animFlags |= PA_FLAGS_WATT_IN_HANDS;
|
||||||
func_802BE014_31DB84();
|
func_802BE014_31DB84();
|
||||||
script->functionTemp[1] = 2;
|
script->functionTemp[1] = 2;
|
||||||
D_802BE304 = 1;
|
D_802BE304 = 1;
|
||||||
@ -331,7 +331,7 @@ ApiStatus func_802BD754_31D2C4(Evt* script, s32 isInitialCall) {
|
|||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
world_watt_sync_held_position();
|
world_watt_sync_held_position();
|
||||||
if ((playerStatus->flags & PS_FLAGS_800)) {
|
if ((playerStatus->flags & PS_FLAGS_HIT_FIRE)) {
|
||||||
D_802BE304 = 2;
|
D_802BE304 = 2;
|
||||||
} else {
|
} else {
|
||||||
s32 actionState = playerStatus->actionState;
|
s32 actionState = playerStatus->actionState;
|
||||||
@ -355,7 +355,7 @@ ApiStatus func_802BD754_31D2C4(Evt* script, s32 isInitialCall) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (D_802BE304 == 2) {
|
if (D_802BE304 == 2) {
|
||||||
playerStatus->animFlags &= ~(PA_FLAGS_2 | PA_FLAGS_HOLDING_WATT);
|
playerStatus->animFlags &= ~(PA_FLAGS_WATT_IN_HANDS | PA_FLAGS_USING_WATT);
|
||||||
npc->currentAnim = ANIM_WorldWatt_Idle;
|
npc->currentAnim = ANIM_WorldWatt_Idle;
|
||||||
partner_clear_player_tracking(npc);
|
partner_clear_player_tracking(npc);
|
||||||
D_802BE30C = 0;
|
D_802BE30C = 0;
|
||||||
@ -364,7 +364,7 @@ ApiStatus func_802BD754_31D2C4(Evt* script, s32 isInitialCall) {
|
|||||||
gGameStatusPtr->keepUsingPartnerOnMapChange = FALSE;
|
gGameStatusPtr->keepUsingPartnerOnMapChange = FALSE;
|
||||||
D_802BE304 = 20;
|
D_802BE304 = 20;
|
||||||
npc_set_palswap_mode_A(npc, 0);
|
npc_set_palswap_mode_A(npc, 0);
|
||||||
if (!(playerStatus->flags & PS_FLAGS_800)) {
|
if (!(playerStatus->flags & PS_FLAGS_HIT_FIRE)) {
|
||||||
set_action_state(0);
|
set_action_state(0);
|
||||||
}
|
}
|
||||||
return ApiStatus_DONE1;
|
return ApiStatus_DONE1;
|
||||||
@ -396,7 +396,7 @@ s32 WattPutAway(Evt* script, s32 isInitialCall) {
|
|||||||
force_player_anim(ANIM_Mario_10002);
|
force_player_anim(ANIM_Mario_10002);
|
||||||
wattActionStatus->actingPartner = PARTNER_NONE;
|
wattActionStatus->actingPartner = PARTNER_NONE;
|
||||||
wattActionStatus->partnerActionState = PARTNER_ACTION_NONE;
|
wattActionStatus->partnerActionState = PARTNER_ACTION_NONE;
|
||||||
playerStatus->animFlags &= ~(PA_FLAGS_2 | PA_FLAGS_HOLDING_WATT);
|
playerStatus->animFlags &= ~(PA_FLAGS_WATT_IN_HANDS | PA_FLAGS_USING_WATT);
|
||||||
gGameStatusPtr->keepUsingPartnerOnMapChange = 0;
|
gGameStatusPtr->keepUsingPartnerOnMapChange = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -461,7 +461,7 @@ ApiStatus func_802BDE88_31D9F8(Evt* script, s32 isInitialCall) {
|
|||||||
world_watt_sync_held_position();
|
world_watt_sync_held_position();
|
||||||
watt->flags &= ~NPC_FLAG_GRAVITY;
|
watt->flags &= ~NPC_FLAG_GRAVITY;
|
||||||
watt->flags |= NPC_FLAG_100;
|
watt->flags |= NPC_FLAG_100;
|
||||||
playerStatus->animFlags |= (PA_FLAGS_2 | PA_FLAGS_HOLDING_WATT);
|
playerStatus->animFlags |= (PA_FLAGS_WATT_IN_HANDS | PA_FLAGS_USING_WATT);
|
||||||
gGameStatusPtr->keepUsingPartnerOnMapChange = 1;
|
gGameStatusPtr->keepUsingPartnerOnMapChange = 1;
|
||||||
wattActionStatus->partnerActionState = PARTNER_ACTION_WATT_SHINE;
|
wattActionStatus->partnerActionState = PARTNER_ACTION_WATT_SHINE;
|
||||||
wattActionStatus->actingPartner = PARTNER_WATT;
|
wattActionStatus->actingPartner = PARTNER_WATT;
|
||||||
|
@ -543,7 +543,7 @@ s32 func_800EA52C(s32 partnerID) {
|
|||||||
u32 playerActionState = playerStatus->actionState;
|
u32 playerActionState = playerStatus->actionState;
|
||||||
s32 ret = FALSE;
|
s32 ret = FALSE;
|
||||||
|
|
||||||
if (playerStatus->flags & PS_FLAGS_800) {
|
if (playerStatus->flags & PS_FLAGS_HIT_FIRE) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -645,7 +645,7 @@ void _use_partner_ability(void) {
|
|||||||
if (playerStatus->animFlags & PA_FLAGS_INTERRUPT_USE_PARTNER) {
|
if (playerStatus->animFlags & PA_FLAGS_INTERRUPT_USE_PARTNER) {
|
||||||
playerStatus->animFlags &= ~PA_FLAGS_INTERRUPT_USE_PARTNER;
|
playerStatus->animFlags &= ~PA_FLAGS_INTERRUPT_USE_PARTNER;
|
||||||
partnerActionStatus->pressedButtons |= BUTTON_B | BUTTON_C_DOWN;
|
partnerActionStatus->pressedButtons |= BUTTON_B | BUTTON_C_DOWN;
|
||||||
playerStatus->animFlags |= PA_FLAGS_40000000;
|
playerStatus->animFlags |= PA_FLAGS_PARTNER_USAGE_STOPPED;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (D_8010CFE8 != 0) {
|
if (D_8010CFE8 != 0) {
|
||||||
@ -1083,8 +1083,8 @@ void partner_handle_after_battle(void) {
|
|||||||
D_8010CFE8 = 1;
|
D_8010CFE8 = 1;
|
||||||
|
|
||||||
if (playerData->currentPartner != PARTNER_WATT && actionStatus->actingPartner == PARTNER_WATT) {
|
if (playerData->currentPartner != PARTNER_WATT && actionStatus->actingPartner == PARTNER_WATT) {
|
||||||
gPlayerStatusPtr->animFlags &= ~PA_FLAGS_HOLDING_WATT;
|
gPlayerStatusPtr->animFlags &= ~PA_FLAGS_USING_WATT;
|
||||||
gPlayerStatusPtr->animFlags &= ~PA_FLAGS_2;
|
gPlayerStatusPtr->animFlags &= ~PA_FLAGS_WATT_IN_HANDS;
|
||||||
actionStatus->actingPartner = PARTNER_NONE;
|
actionStatus->actingPartner = PARTNER_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1196,9 +1196,9 @@ void partner_walking_update_motion(Npc* partner) {
|
|||||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||||
PartnerActionStatus* actionStatus = &gPartnerActionStatus;
|
PartnerActionStatus* actionStatus = &gPartnerActionStatus;
|
||||||
|
|
||||||
if (gGameStatusPtr->multiplayerEnabled == 0 || playerStatus->flags & (PS_FLAGS_INPUT_DISABLED | PS_FLAGS_1000)
|
if (gGameStatusPtr->multiplayerEnabled == 0 || playerStatus->flags & (PS_FLAGS_INPUT_DISABLED | PS_FLAGS_NO_STATIC_COLLISION)
|
||||||
|| actionStatus->inputDisabled != 0 || actionStatus->partnerAction_unk_2 != 0) {
|
|| actionStatus->inputDisabled != 0 || actionStatus->partnerAction_unk_2 != 0) {
|
||||||
if (!(playerStatus->animFlags & PA_FLAGS_800)) {
|
if (!(playerStatus->animFlags & PA_FLAGS_OPENED_HIDDEN_PANEL)) {
|
||||||
partner_walking_follow_player(partner);
|
partner_walking_follow_player(partner);
|
||||||
}
|
}
|
||||||
if (actionStatus->pressedButtons & (BUTTON_Z | BUTTON_B | BUTTON_C_LEFT | BUTTON_C_DOWN)) {
|
if (actionStatus->pressedButtons & (BUTTON_Z | BUTTON_B | BUTTON_C_LEFT | BUTTON_C_DOWN)) {
|
||||||
@ -1212,7 +1212,7 @@ void partner_walking_update_motion(Npc* partner) {
|
|||||||
partner->pos.z = playerStatus->position.z;
|
partner->pos.z = playerStatus->position.z;
|
||||||
partner->jumpVelocity = 0.0f;
|
partner->jumpVelocity = 0.0f;
|
||||||
partner->jumpScale = 0.0f;
|
partner->jumpScale = 0.0f;
|
||||||
partner->flags = partner->flags & ~PA_FLAGS_800;
|
partner->flags = partner->flags & ~PA_FLAGS_OPENED_HIDDEN_PANEL;
|
||||||
}
|
}
|
||||||
|
|
||||||
partner_do_player_collision(partner);
|
partner_do_player_collision(partner);
|
||||||
@ -1789,11 +1789,11 @@ void partner_flying_update_motion(Npc* partner) {
|
|||||||
f32 var_f2;
|
f32 var_f2;
|
||||||
|
|
||||||
if (gGameStatusPtr->multiplayerEnabled == 0 ||
|
if (gGameStatusPtr->multiplayerEnabled == 0 ||
|
||||||
(playerStatus->flags & (PS_FLAGS_INPUT_DISABLED | PS_FLAGS_1000)) ||
|
(playerStatus->flags & (PS_FLAGS_INPUT_DISABLED | PS_FLAGS_NO_STATIC_COLLISION)) ||
|
||||||
partnerActionStatus->inputDisabled ||
|
partnerActionStatus->inputDisabled ||
|
||||||
partnerActionStatus->partnerAction_unk_2 != 0)
|
partnerActionStatus->partnerAction_unk_2 != 0)
|
||||||
{
|
{
|
||||||
if (!(playerStatus->animFlags & PA_FLAGS_800) || D_800F8020 == 0) {
|
if (!(playerStatus->animFlags & PA_FLAGS_OPENED_HIDDEN_PANEL) || D_800F8020 == 0) {
|
||||||
partner_flying_follow_player(partner);
|
partner_flying_follow_player(partner);
|
||||||
}
|
}
|
||||||
if (partnerActionStatus->pressedButtons & (BUTTON_B | BUTTON_Z | BUTTON_C_DOWN | BUTTON_C_LEFT)) {
|
if (partnerActionStatus->pressedButtons & (BUTTON_B | BUTTON_Z | BUTTON_C_DOWN | BUTTON_C_LEFT)) {
|
||||||
@ -2118,7 +2118,7 @@ void partner_flying_follow_player(Npc* partner) {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 15:
|
case 15:
|
||||||
if (!(playerStatus->animFlags & PA_FLAGS_100000)) {
|
if (!(playerStatus->animFlags & PA_FLAGS_CHANGING_MAP)) {
|
||||||
switch (D_8010CFCE) {
|
switch (D_8010CFCE) {
|
||||||
case 0:
|
case 0:
|
||||||
temp_f0_15 = clamp_angle(func_800E5348() + 180.0f);
|
temp_f0_15 = clamp_angle(func_800E5348() + 180.0f);
|
||||||
|
@ -186,7 +186,7 @@ ApiStatus func_802803C8(Evt* script, s32 isInitialCall) {
|
|||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((playerStatus->flags & PS_FLAGS_100)) {
|
if ((playerStatus->flags & PS_FLAGS_PAUSE_DISABLED)) {
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -227,7 +227,7 @@ ApiStatus func_80283174(Evt* script, s32 isInitialCall) {
|
|||||||
if (playerStatus->actionState == ACTION_STATE_PUSHING_BLOCK
|
if (playerStatus->actionState == ACTION_STATE_PUSHING_BLOCK
|
||||||
|| playerStatus->actionState == ACTION_STATE_WALK
|
|| playerStatus->actionState == ACTION_STATE_WALK
|
||||||
|| playerStatus->actionState == ACTION_STATE_RUN) {
|
|| playerStatus->actionState == ACTION_STATE_RUN) {
|
||||||
if (playerStatus->animFlags & PA_FLAGS_HOLDING_WATT) {
|
if (playerStatus->animFlags & PA_FLAGS_USING_WATT) {
|
||||||
script->varTable[13] = FALSE;
|
script->varTable[13] = FALSE;
|
||||||
} else {
|
} else {
|
||||||
script->varTable[13] = TRUE;
|
script->varTable[13] = TRUE;
|
||||||
|
Loading…
Reference in New Issue
Block a user