diff --git a/include/types.h b/include/types.h index d484a401..d39e629a 100644 --- a/include/types.h +++ b/include/types.h @@ -8,17 +8,6 @@ #include "macros.h" #include "config.h" - -// Certain functions are marked as having return values, but do not -// actually return a value. This causes undefined behavior, which we'd rather -// avoid on modern GCC. This only impacts -O2 and can matter for both the function -// itself and functions that call it. -#ifdef AVOID_UB - #define BAD_RETURN(cmd) void -#else - #define BAD_RETURN(cmd) cmd -#endif - struct Config { f32 audioFrequency; diff --git a/src/audio/load.h b/src/audio/load.h index 002974d9..506e4202 100644 --- a/src/audio/load.h +++ b/src/audio/load.h @@ -104,7 +104,7 @@ struct AudioBankSample *func_sh_802f4978(s32 bankId, s32 idx); s32 func_sh_802f47c8(s32 bankId, u8 idx, s8 *io); void *func_sh_802f3f08(s32 poolIdx, s32 arg1, s32 arg2, s32 arg3, OSMesgQueue *retQueue); void func_sh_802f41e4(s32 audioResetStatus); -BAD_RETURN(s32) func_sh_802f3368(s32 bankId); +void func_sh_802f3368(s32 bankId); void *func_sh_802f3764(s32 arg0, s32 idx, s32 *arg2); s32 func_sh_802f3024(s32 bankId, s32 instId, s32 arg2); void func_sh_802f30f4(s32 arg0, s32 arg1, s32 arg2, OSMesgQueue *arg3); diff --git a/src/audio/load_sh.c b/src/audio/load_sh.c index 240722ed..28ff6c66 100644 --- a/src/audio/load_sh.c +++ b/src/audio/load_sh.c @@ -127,7 +127,7 @@ void func_sh_802f4dcc(s32 audioResetStatus); void func_sh_802f4e50(struct PendingDmaAudioBank *audioBank, s32 audioResetStatus); void func_sh_802f50ec(struct PendingDmaAudioBank *arg0, size_t len); void func_sh_802f517c(uintptr_t devAddr, void *vAddr, size_t nbytes, s32 arg3); -BAD_RETURN(s32) func_sh_802f5310(s32 bankId, struct AudioBank *mem, struct PatchStruct *patchInfo, s32 arg3); +void func_sh_802f5310(s32 bankId, struct AudioBank *mem, struct PatchStruct *patchInfo, s32 arg3); s32 func_sh_802f573c(s32 audioResetStatus); void *func_sh_802f3564(s32 seqId); s32 func_sh_802f3ec4(s32 arg0, uintptr_t *arg1); @@ -452,7 +452,7 @@ void func_sh_802f3288(s32 idx) { } } -BAD_RETURN(s32) func_sh_802f3368(s32 bankId) { +void func_sh_802f3368(s32 bankId) { struct SoundMultiPool *pool = &gBankLoadedPool; struct TemporaryPool *temporary = &pool->temporary; struct PersistentPool *persistent; @@ -1428,7 +1428,7 @@ void patch_sound(struct AudioBankSound *sound, struct AudioBank *memBase, struct #undef PATCH } -BAD_RETURN(s32) func_sh_802f5310(s32 bankId, struct AudioBank *mem, struct PatchStruct *patchInfo, s32 arg3) { +void func_sh_802f5310(s32 bankId, struct AudioBank *mem, struct PatchStruct *patchInfo, s32 arg3) { UNUSED u32 pad[2]; u8 *addr; UNUSED u32 pad1[3]; diff --git a/src/game/camera.c b/src/game/camera.c index 930644b2..4ccd3704 100644 --- a/src/game/camera.c +++ b/src/game/camera.c @@ -666,7 +666,7 @@ void unused_set_camera_pitch_shake_env(s16 shake) { * posOff and focOff are sometimes the same address, which just ignores the pos calculation *! Doesn't return anything, but required to match on -O2 */ -BAD_RETURN(f32) calc_y_to_curr_floor(f32 *posOff, f32 posMul, f32 posBound, f32 *focOff, f32 focMul, f32 focBound) { +void calc_y_to_curr_floor(f32 *posOff, f32 posMul, f32 posBound, f32 *focOff, f32 focMul, f32 focBound) { f32 floorHeight = sMarioGeometry.currFloorHeight; f32 waterHeight; UNUSED s32 filler; @@ -5681,12 +5681,12 @@ void check_blocking_area_processing(const u8 *mode) { } } -BAD_RETURN(s32) cam_rr_exit_building_side(struct Camera *c) { +void cam_rr_exit_building_side(struct Camera *c) { set_camera_mode_8_directions(c); s8DirModeBaseYaw = DEGREES(90); } -BAD_RETURN(s32) cam_rr_exit_building_top(struct Camera *c) { +void cam_rr_exit_building_top(struct Camera *c) { set_camera_mode_8_directions(c); if (c->pos[1] < 6343.f) { c->pos[1] = 7543.f; @@ -5696,13 +5696,13 @@ BAD_RETURN(s32) cam_rr_exit_building_top(struct Camera *c) { } } -BAD_RETURN(s32) cam_rr_enter_building_window(struct Camera *c) { +void cam_rr_enter_building_window(struct Camera *c) { if (c->mode != CAMERA_MODE_FIXED) { set_camera_mode_fixed(c, -2974, 478, -3975); } } -BAD_RETURN(s32) cam_rr_enter_building(struct Camera *c) { +void cam_rr_enter_building(struct Camera *c) { if (c->mode != CAMERA_MODE_FIXED) { set_camera_mode_fixed(c, -2953, 798, -3943); } @@ -5712,7 +5712,7 @@ BAD_RETURN(s32) cam_rr_enter_building(struct Camera *c) { } } -BAD_RETURN(s32) cam_rr_enter_building_side(struct Camera *c) { +void cam_rr_enter_building_side(struct Camera *c) { if (c->mode != CAMERA_MODE_FIXED) { sStatusFlags &= ~CAM_FLAG_SMOOTH_MOVEMENT; c->mode = CAMERA_MODE_FIXED; @@ -5722,7 +5722,7 @@ BAD_RETURN(s32) cam_rr_enter_building_side(struct Camera *c) { /** * Fix the camera in place as Mario gets exits out the MC cave into the waterfall. */ -BAD_RETURN(s32) cam_cotmc_exit_waterfall(UNUSED struct Camera *c) { +void cam_cotmc_exit_waterfall(UNUSED struct Camera *c) { gCameraMovementFlags |= CAM_MOVE_FIX_IN_PLACE; } @@ -5730,7 +5730,7 @@ BAD_RETURN(s32) cam_cotmc_exit_waterfall(UNUSED struct Camera *c) { * Sets 8 directional mode and blocks the next trigger from processing. * Activated when Mario is walking in front of the snowman's head. */ -BAD_RETURN(s32) cam_sl_snowman_head_8dir(struct Camera *c) { +void cam_sl_snowman_head_8dir(struct Camera *c) { sStatusFlags |= CAM_FLAG_BLOCK_AREA_PROCESSING; transition_to_camera_mode(c, CAMERA_MODE_8_DIRECTIONS, 60); s8DirModeBaseYaw = 0x1D27; @@ -5740,7 +5740,7 @@ BAD_RETURN(s32) cam_sl_snowman_head_8dir(struct Camera *c) { * Sets free roam mode in SL, called by a trigger that covers a large area and surrounds the 8 direction * trigger. */ -BAD_RETURN(s32) cam_sl_free_roam(struct Camera *c) { +void cam_sl_free_roam(struct Camera *c) { transition_to_camera_mode(c, CAMERA_MODE_FREE_ROAM, 60); } @@ -5758,7 +5758,7 @@ void move_camera_through_floor_while_descending(struct Camera *c, f32 height) { } } -BAD_RETURN(s32) cam_hmc_enter_maze(struct Camera *c) { +void cam_hmc_enter_maze(struct Camera *c) { s16 pitch, yaw; f32 dist; @@ -5774,26 +5774,26 @@ BAD_RETURN(s32) cam_hmc_enter_maze(struct Camera *c) { } } -BAD_RETURN(s32) cam_hmc_elevator_black_hole(struct Camera *c) { +void cam_hmc_elevator_black_hole(struct Camera *c) { move_camera_through_floor_while_descending(c, 1536.f); } -BAD_RETURN(s32) cam_hmc_elevator_maze_emergency_exit(struct Camera *c) { +void cam_hmc_elevator_maze_emergency_exit(struct Camera *c) { move_camera_through_floor_while_descending(c, 2355.f); } -BAD_RETURN(s32) cam_hmc_elevator_lake(struct Camera *c) { +void cam_hmc_elevator_lake(struct Camera *c) { move_camera_through_floor_while_descending(c, 1843.f); } -BAD_RETURN(s32) cam_hmc_elevator_maze(struct Camera *c) { +void cam_hmc_elevator_maze(struct Camera *c) { move_camera_through_floor_while_descending(c, 1843.f); } /** * Starts the "Enter Pyramid Top" cutscene. */ -BAD_RETURN(s32) cam_ssl_enter_pyramid_top(UNUSED struct Camera *c) { +void cam_ssl_enter_pyramid_top(UNUSED struct Camera *c) { start_object_cutscene_without_focus(CUTSCENE_ENTER_PYRAMID_TOP); } @@ -5801,7 +5801,7 @@ BAD_RETURN(s32) cam_ssl_enter_pyramid_top(UNUSED struct Camera *c) { * Change to close mode in the center of the pyramid. Outside this trigger, the default mode is outwards * radial. */ -BAD_RETURN(s32) cam_ssl_pyramid_center(struct Camera *c) { +void cam_ssl_pyramid_center(struct Camera *c) { sStatusFlags |= CAM_FLAG_BLOCK_AREA_PROCESSING; transition_to_camera_mode(c, CAMERA_MODE_CLOSE, 90); } @@ -5809,7 +5809,7 @@ BAD_RETURN(s32) cam_ssl_pyramid_center(struct Camera *c) { /** * Changes the mode back to outward radial in the boss room inside the pyramid. */ -BAD_RETURN(s32) cam_ssl_boss_room(struct Camera *c) { +void cam_ssl_boss_room(struct Camera *c) { sStatusFlags |= CAM_FLAG_BLOCK_AREA_PROCESSING; transition_to_camera_mode(c, CAMERA_MODE_OUTWARD_RADIAL, 90); } @@ -5817,7 +5817,7 @@ BAD_RETURN(s32) cam_ssl_boss_room(struct Camera *c) { /** * Moves the camera to through the tunnel by forcing sModeOffsetYaw */ -BAD_RETURN(s32) cam_thi_move_cam_through_tunnel(UNUSED struct Camera *c) { +void cam_thi_move_cam_through_tunnel(UNUSED struct Camera *c) { if (sModeOffsetYaw < DEGREES(60)) { sModeOffsetYaw = DEGREES(60); } @@ -5826,7 +5826,7 @@ BAD_RETURN(s32) cam_thi_move_cam_through_tunnel(UNUSED struct Camera *c) { /** * Aligns the camera to look through the tunnel */ -BAD_RETURN(s32) cam_thi_look_through_tunnel(UNUSED struct Camera *c) { +void cam_thi_look_through_tunnel(UNUSED struct Camera *c) { // ~82.5 degrees if (sModeOffsetYaw > 0x3AAA) { sModeOffsetYaw = 0x3AAA; @@ -5838,7 +5838,7 @@ BAD_RETURN(s32) cam_thi_look_through_tunnel(UNUSED struct Camera *c) { * * @see sCamBOB for bounds. */ -BAD_RETURN(s32) cam_bob_tower(struct Camera *c) { +void cam_bob_tower(struct Camera *c) { sStatusFlags |= CAM_FLAG_BLOCK_AREA_PROCESSING; transition_to_camera_mode(c, CAMERA_MODE_RADIAL, 90); } @@ -5851,7 +5851,7 @@ BAD_RETURN(s32) cam_bob_tower(struct Camera *c) { * * @see sCamBOB */ -BAD_RETURN(s32) cam_bob_default_free_roam(struct Camera *c) { +void cam_bob_default_free_roam(struct Camera *c) { transition_to_camera_mode(c, CAMERA_MODE_FREE_ROAM, 90); } @@ -5859,7 +5859,7 @@ BAD_RETURN(s32) cam_bob_default_free_roam(struct Camera *c) { * Starts the pool entrance cutscene if Mario is not exiting the pool. * Used in both the castle and HMC. */ -BAD_RETURN(s32) cam_castle_hmc_start_pool_cutscene(struct Camera *c) { +void cam_castle_hmc_start_pool_cutscene(struct Camera *c) { if ((sMarioCamState->action != ACT_SPECIAL_DEATH_EXIT) && (sMarioCamState->action != ACT_SPECIAL_EXIT_AIRBORNE)) { start_cutscene(c, CUTSCENE_ENTER_POOL); @@ -5870,7 +5870,7 @@ BAD_RETURN(s32) cam_castle_hmc_start_pool_cutscene(struct Camera *c) { * Sets the fixed mode pos offset so that the camera faces the doorway when Mario is near the entrance * to the castle lobby */ -BAD_RETURN(s32) cam_castle_lobby_entrance(UNUSED struct Camera *c) { +void cam_castle_lobby_entrance(UNUSED struct Camera *c) { vec3f_set(sCastleEntranceOffset, -813.f - sFixedModeBasePosition[0], 378.f - sFixedModeBasePosition[1], 1103.f - sFixedModeBasePosition[2]); } @@ -5878,7 +5878,7 @@ BAD_RETURN(s32) cam_castle_lobby_entrance(UNUSED struct Camera *c) { /** * Make the camera look up the stairs from the 2nd to 3rd floor of the castle */ -BAD_RETURN(s32) cam_castle_look_upstairs(struct Camera *c) { +void cam_castle_look_upstairs(struct Camera *c) { struct Surface *floor; f32 floorHeight = find_floor(c->pos[0], c->pos[1], c->pos[2], &floor); @@ -5892,7 +5892,7 @@ BAD_RETURN(s32) cam_castle_look_upstairs(struct Camera *c) { /** * Make the camera look down the stairs towards the basement star door */ -BAD_RETURN(s32) cam_castle_basement_look_downstairs(struct Camera *c) { +void cam_castle_basement_look_downstairs(struct Camera *c) { struct Surface *floor; f32 floorHeight = find_floor(c->pos[0], c->pos[1], c->pos[2], &floor); @@ -5906,7 +5906,7 @@ BAD_RETURN(s32) cam_castle_basement_look_downstairs(struct Camera *c) { * Enter the fixed-mode castle lobby. A trigger for this is placed in every entrance so that the camera * changes to fixed mode. */ -BAD_RETURN(s32) cam_castle_enter_lobby(struct Camera *c) { +void cam_castle_enter_lobby(struct Camera *c) { if (c->mode != CAMERA_MODE_FIXED) { sStatusFlags &= ~CAM_FLAG_SMOOTH_MOVEMENT; set_fixed_cam_axis_sa_lobby(c->mode); @@ -5917,7 +5917,7 @@ BAD_RETURN(s32) cam_castle_enter_lobby(struct Camera *c) { /** * Starts spiral stairs mode. */ -BAD_RETURN(s32) cam_castle_enter_spiral_stairs(struct Camera *c) { +void cam_castle_enter_spiral_stairs(struct Camera *c) { transition_to_camera_mode(c, CAMERA_MODE_SPIRAL_STAIRS, 20); } @@ -5925,7 +5925,7 @@ BAD_RETURN(s32) cam_castle_enter_spiral_stairs(struct Camera *c) { * unused, starts close mode if the camera is in spiral stairs mode. * This was replaced with cam_castle_close_mode */ -static UNUSED BAD_RETURN(s32) cam_castle_leave_spiral_stairs(struct Camera *c) { +static UNUSED void cam_castle_leave_spiral_stairs(struct Camera *c) { if (c->mode == CAMERA_MODE_SPIRAL_STAIRS) { transition_to_camera_mode(c, CAMERA_MODE_CLOSE, 30); } else { @@ -5937,7 +5937,7 @@ static UNUSED BAD_RETURN(s32) cam_castle_leave_spiral_stairs(struct Camera *c) { * The default mode when outside of the lobby and spiral staircase. A trigger for this is placed at * every door leaving the lobby and spiral staircase. */ -BAD_RETURN(s32) cam_castle_close_mode(struct Camera *c) { +void cam_castle_close_mode(struct Camera *c) { set_camera_mode_close_cam(&c->mode); } @@ -5945,7 +5945,7 @@ BAD_RETURN(s32) cam_castle_close_mode(struct Camera *c) { * Functions the same as cam_castle_close_mode, but sets doorStatus so that the camera will enter * fixed-mode when Mario leaves the room. */ -BAD_RETURN(s32) cam_castle_leave_lobby_sliding_door(struct Camera *c) { +void cam_castle_leave_lobby_sliding_door(struct Camera *c) { cam_castle_close_mode(c); c->doorStatus = DOOR_ENTER_LOBBY; } @@ -5953,19 +5953,19 @@ BAD_RETURN(s32) cam_castle_leave_lobby_sliding_door(struct Camera *c) { /** * Just calls cam_castle_enter_lobby */ -BAD_RETURN(s32) cam_castle_enter_lobby_sliding_door(struct Camera *c) { +void cam_castle_enter_lobby_sliding_door(struct Camera *c) { cam_castle_enter_lobby(c); } -BAD_RETURN(s32) cam_bbh_room_6(struct Camera *c) { +void cam_bbh_room_6(struct Camera *c) { parallel_tracking_init(c, sBBHLibraryParTrackPath); } -BAD_RETURN(s32) cam_bbh_fall_off_roof(struct Camera *c) { +void cam_bbh_fall_off_roof(struct Camera *c) { set_camera_mode_close_cam(&c->mode); } -BAD_RETURN(s32) cam_bbh_fall_into_pool(struct Camera *c) { +void cam_bbh_fall_into_pool(struct Camera *c) { Vec3f dir; set_camera_mode_close_cam(&c->mode); vec3f_set(dir, 0.f, 0.f, 300.f); @@ -5975,24 +5975,24 @@ BAD_RETURN(s32) cam_bbh_fall_into_pool(struct Camera *c) { sStatusFlags &= ~CAM_FLAG_SMOOTH_MOVEMENT; } -BAD_RETURN(s32) cam_bbh_room_1(struct Camera *c) { +void cam_bbh_room_1(struct Camera *c) { set_camera_mode_fixed(c, 956, 440, 1994); } -BAD_RETURN(s32) cam_bbh_leave_front_door(struct Camera *c) { +void cam_bbh_leave_front_door(struct Camera *c) { c->doorStatus = DOOR_LEAVING_SPECIAL; cam_bbh_room_1(c); } -BAD_RETURN(s32) cam_bbh_room_2_lower(struct Camera *c) { +void cam_bbh_room_2_lower(struct Camera *c) { set_camera_mode_fixed(c, 2591, 400, 1284); } -BAD_RETURN(s32) cam_bbh_room_4(struct Camera *c) { +void cam_bbh_room_4(struct Camera *c) { set_camera_mode_fixed(c, 3529, 340, -1384); } -BAD_RETURN(s32) cam_bbh_room_8(struct Camera *c) { +void cam_bbh_room_8(struct Camera *c) { set_camera_mode_fixed(c, -500, 740, -1306); } @@ -6000,7 +6000,7 @@ BAD_RETURN(s32) cam_bbh_room_8(struct Camera *c) { * In BBH's room 5's library (the first floor room with the vanish cap/boo painting) * set the camera mode to fixed and position to (-2172, 200, 675) */ -BAD_RETURN(s32) cam_bbh_room_5_library(struct Camera *c) { +void cam_bbh_room_5_library(struct Camera *c) { set_camera_mode_fixed(c, -2172, 200, 675); } @@ -6009,53 +6009,53 @@ BAD_RETURN(s32) cam_bbh_room_5_library(struct Camera *c) { * set the camera mode to to the hidden room's position * if coming from the library. */ -BAD_RETURN(s32) cam_bbh_room_5_library_to_hidden_transition(struct Camera *c) { +void cam_bbh_room_5_library_to_hidden_transition(struct Camera *c) { if (set_camera_mode_fixed(c, -2172, 200, 675) == 1) { transition_next_state(c, 20); } } -BAD_RETURN(s32) cam_bbh_room_5_hidden_to_library_transition(struct Camera *c) { +void cam_bbh_room_5_hidden_to_library_transition(struct Camera *c) { if (set_camera_mode_fixed(c, -1542, 320, -307) == 1) { transition_next_state(c, 20); } } -BAD_RETURN(s32) cam_bbh_room_5_hidden(struct Camera *c) { +void cam_bbh_room_5_hidden(struct Camera *c) { c->doorStatus = DOOR_LEAVING_SPECIAL; set_camera_mode_fixed(c, -1542, 320, -307); } -BAD_RETURN(s32) cam_bbh_room_3(struct Camera *c) { +void cam_bbh_room_3(struct Camera *c) { set_camera_mode_fixed(c, -1893, 320, 2327); } -BAD_RETURN(s32) cam_bbh_room_7_mr_i(struct Camera *c) { +void cam_bbh_room_7_mr_i(struct Camera *c) { set_camera_mode_fixed(c, 1371, 360, -1302); } -BAD_RETURN(s32) cam_bbh_room_7_mr_i_to_coffins_transition(struct Camera *c) { +void cam_bbh_room_7_mr_i_to_coffins_transition(struct Camera *c) { if (set_camera_mode_fixed(c, 1371, 360, -1302) == 1) { transition_next_state(c, 20); } } -BAD_RETURN(s32) cam_bbh_room_7_coffins_to_mr_i_transition(struct Camera *c) { +void cam_bbh_room_7_coffins_to_mr_i_transition(struct Camera *c) { if (set_camera_mode_fixed(c, 2115, 260, -772) == 1) { transition_next_state(c, 20); } } -BAD_RETURN(s32) cam_bbh_elevator_room_lower(struct Camera *c) { +void cam_bbh_elevator_room_lower(struct Camera *c) { c->doorStatus = DOOR_LEAVING_SPECIAL; set_camera_mode_close_cam(&c->mode); } -BAD_RETURN(s32) cam_bbh_room_0_back_entrance(struct Camera *c) { +void cam_bbh_room_0_back_entrance(struct Camera *c) { set_camera_mode_close_cam(&c->mode); } -BAD_RETURN(s32) cam_bbh_elevator(struct Camera *c) { +void cam_bbh_elevator(struct Camera *c) { if (c->mode == CAMERA_MODE_FIXED) { set_camera_mode_close_cam(&c->mode); c->pos[1] = -405.f; @@ -6063,65 +6063,65 @@ BAD_RETURN(s32) cam_bbh_elevator(struct Camera *c) { } } -BAD_RETURN(s32) cam_bbh_room_12_upper(struct Camera *c) { +void cam_bbh_room_12_upper(struct Camera *c) { c->doorStatus = DOOR_LEAVING_SPECIAL; set_camera_mode_fixed(c, -2932, 296, 4429); } -BAD_RETURN(s32) cam_bbh_enter_front_door(struct Camera *c) { +void cam_bbh_enter_front_door(struct Camera *c) { set_camera_mode_close_cam(&c->mode); } -BAD_RETURN(s32) cam_bbh_room_2_library(struct Camera *c) { +void cam_bbh_room_2_library(struct Camera *c) { set_camera_mode_fixed(c, 3493, 440, 617); } -BAD_RETURN(s32) cam_bbh_room_2_library_to_trapdoor_transition(struct Camera *c) { +void cam_bbh_room_2_library_to_trapdoor_transition(struct Camera *c) { if (set_camera_mode_fixed(c, 3493, 440, 617) == 1) { transition_next_state(c, 20); } } -BAD_RETURN(s32) cam_bbh_room_2_trapdoor(struct Camera *c) { +void cam_bbh_room_2_trapdoor(struct Camera *c) { set_camera_mode_fixed(c, 3502, 440, 1217); } -BAD_RETURN(s32) cam_bbh_room_2_trapdoor_transition(struct Camera *c) { +void cam_bbh_room_2_trapdoor_transition(struct Camera *c) { if (set_camera_mode_fixed(c, 3502, 440, 1217) == 1) { transition_next_state(c, 20); } } -BAD_RETURN(s32) cam_bbh_room_9_attic(struct Camera *c) { +void cam_bbh_room_9_attic(struct Camera *c) { set_camera_mode_fixed(c, -670, 460, 372); } -BAD_RETURN(s32) cam_bbh_room_9_attic_transition(struct Camera *c) { +void cam_bbh_room_9_attic_transition(struct Camera *c) { if (set_camera_mode_fixed(c, -670, 460, 372) == 1) { transition_next_state(c, 20); } } -BAD_RETURN(s32) cam_bbh_room_9_mr_i_transition(struct Camera *c) { +void cam_bbh_room_9_mr_i_transition(struct Camera *c) { if (set_camera_mode_fixed(c, 131, 380, -263) == 1) { transition_next_state(c, 20); } } -BAD_RETURN(s32) cam_bbh_room_13_balcony(struct Camera *c) { +void cam_bbh_room_13_balcony(struct Camera *c) { set_camera_mode_fixed(c, 210, 420, 3109); } -BAD_RETURN(s32) cam_bbh_room_0(struct Camera *c) { +void cam_bbh_room_0(struct Camera *c) { c->doorStatus = DOOR_LEAVING_SPECIAL; set_camera_mode_fixed(c, -204, 807, 204); } -BAD_RETURN(s32) cam_ccm_enter_slide_shortcut(UNUSED struct Camera *c) { +void cam_ccm_enter_slide_shortcut(UNUSED struct Camera *c) { sStatusFlags |= CAM_FLAG_CCM_SLIDE_SHORTCUT; } -BAD_RETURN(s32) cam_ccm_leave_slide_shortcut(UNUSED struct Camera *c) { +void cam_ccm_leave_slide_shortcut(UNUSED struct Camera *c) { sStatusFlags &= ~CAM_FLAG_CCM_SLIDE_SHORTCUT; } @@ -7051,7 +7051,7 @@ static UNUSED void unused_cutscene_mario_dialog_looking_down(UNUSED struct Camer /** * Cause Mario to enter the normal dialog state. */ -static BAD_RETURN(s32) cutscene_mario_dialog(UNUSED struct Camera *c) { +static void cutscene_mario_dialog(UNUSED struct Camera *c) { gCutsceneTimer = cutscene_common_set_dialog_state(MARIO_DIALOG_LOOK_FRONT); } @@ -7063,7 +7063,7 @@ static UNUSED void unused_cutscene_mario_dialog_looking_up(UNUSED struct Camera /** * Lower the volume (US only) and start the peach letter background music */ -BAD_RETURN(s32) cutscene_intro_peach_start_letter_music(UNUSED struct Camera *c) { +void cutscene_intro_peach_start_letter_music(UNUSED struct Camera *c) { #if defined(VERSION_US) || defined(VERSION_SH) seq_player_lower_volume(SEQ_PLAYER_LEVEL, 60, 40); #endif @@ -7073,7 +7073,7 @@ BAD_RETURN(s32) cutscene_intro_peach_start_letter_music(UNUSED struct Camera *c) /** * Raise the volume (not in JP) and start the flying music. */ -BAD_RETURN(s32) cutscene_intro_peach_start_flying_music(UNUSED struct Camera *c) { +void cutscene_intro_peach_start_flying_music(UNUSED struct Camera *c) { #ifndef VERSION_JP seq_player_unlower_volume(SEQ_PLAYER_LEVEL, 60); #endif @@ -7085,7 +7085,7 @@ BAD_RETURN(s32) cutscene_intro_peach_start_flying_music(UNUSED struct Camera *c) * Lower the volume for the letter background music. In US, this happens on the same frame as the music * starts. */ -BAD_RETURN(s32) cutscene_intro_peach_eu_lower_volume(UNUSED struct Camera *c) { +void cutscene_intro_peach_eu_lower_volume(UNUSED struct Camera *c) { seq_player_lower_volume(SEQ_PLAYER_LEVEL, 60, 40); } #endif @@ -7207,7 +7207,7 @@ void pan_camera(struct Camera *c, s16 incPitch, s16 incYaw) { vec3f_set_dist_and_angle(c->pos, c->focus, distCamToFocus, pitch, yaw); } -BAD_RETURN(s32) cutscene_shake_explosion(UNUSED struct Camera *c) { +void cutscene_shake_explosion(UNUSED struct Camera *c) { set_environmental_camera_shake(SHAKE_ENV_EXPLOSION); cutscene_set_fov_shake_preset(1); } @@ -7249,16 +7249,16 @@ void cutscene_unsoften_music(UNUSED struct Camera *c) { UNUSED static void stub_camera_5(UNUSED struct Camera *c) { } -BAD_RETURN(s32) cutscene_unused_start(UNUSED struct Camera *c) { +void cutscene_unused_start(UNUSED struct Camera *c) { } -BAD_RETURN(s32) cutscene_unused_loop(UNUSED struct Camera *c) { +void cutscene_unused_loop(UNUSED struct Camera *c) { } /** * Set the camera position and focus for when Mario falls from the sky. */ -BAD_RETURN(s32) cutscene_ending_mario_fall_start(struct Camera *c) { +void cutscene_ending_mario_fall_start(struct Camera *c) { vec3f_set(c->focus, -26.f, 0.f, -137.f); vec3f_set(c->pos, 165.f, 4725.f, 324.f); } @@ -7266,7 +7266,7 @@ BAD_RETURN(s32) cutscene_ending_mario_fall_start(struct Camera *c) { /** * Focus on Mario when he's falling from the sky. */ -BAD_RETURN(s32) cutscene_ending_mario_fall_focus_mario(struct Camera *c) { +void cutscene_ending_mario_fall_focus_mario(struct Camera *c) { Vec3f offset; vec3f_set(offset, 0.f, 80.f, 0.f); @@ -7281,7 +7281,7 @@ BAD_RETURN(s32) cutscene_ending_mario_fall_focus_mario(struct Camera *c) { /** * Mario falls from the sky after the grand star cutscene. */ -BAD_RETURN(s32) cutscene_ending_mario_fall(struct Camera *c) { +void cutscene_ending_mario_fall(struct Camera *c) { cutscene_event(cutscene_ending_mario_fall_start, c, 0, 0); cutscene_event(cutscene_ending_mario_fall_focus_mario, c, 0, -1); player2_rotate_cam(c, -0x2000, 0x2000, -0x2000, 0x2000); @@ -7290,7 +7290,7 @@ BAD_RETURN(s32) cutscene_ending_mario_fall(struct Camera *c) { /** * Closeup of Mario as the wing cap fades and Mario looks up. */ -BAD_RETURN(s32) cutscene_ending_mario_land_closeup(struct Camera *c) { +void cutscene_ending_mario_land_closeup(struct Camera *c) { vec3f_set(c->focus, 85.f, 826.f, 250.f); vec3f_set(c->pos, -51.f, 988.f, -202.f); player2_rotate_cam(c, -0x2000, 0x2000, -0x2000, 0x2000); @@ -7299,7 +7299,7 @@ BAD_RETURN(s32) cutscene_ending_mario_land_closeup(struct Camera *c) { /** * Reset the spline progress and cvar9. */ -BAD_RETURN(s32) cutscene_ending_reset_spline(UNUSED struct Camera *c) { +void cutscene_ending_reset_spline(UNUSED struct Camera *c) { sCutsceneVars[9].point[0] = 0.f; cutscene_reset_spline(); } @@ -7307,7 +7307,7 @@ BAD_RETURN(s32) cutscene_ending_reset_spline(UNUSED struct Camera *c) { /** * Follow sEndingFlyToWindowPos/Focus up to the window. */ -BAD_RETURN(s32) cutscene_ending_fly_up_to_window(struct Camera *c) { +void cutscene_ending_fly_up_to_window(struct Camera *c) { move_point_along_spline(c->pos, sEndingFlyToWindowPos, &sCutsceneSplineSegment, &sCutsceneSplineSegmentProgress); move_point_along_spline(c->focus, sEndingFlyToWindowFocus, &sCutsceneSplineSegment, &sCutsceneSplineSegmentProgress); } @@ -7315,7 +7315,7 @@ BAD_RETURN(s32) cutscene_ending_fly_up_to_window(struct Camera *c) { /** * Move the camera up to the window as the star power frees peach. */ -BAD_RETURN(s32) cutscene_ending_stars_free_peach(struct Camera *c) { +void cutscene_ending_stars_free_peach(struct Camera *c) { cutscene_event(cutscene_ending_reset_spline, c, 0, 0); cutscene_event(cutscene_ending_fly_up_to_window, c, 0, -1); player2_rotate_cam(c, -0x2000, 0x2000, -0x2000, 0x2000); @@ -7324,7 +7324,7 @@ BAD_RETURN(s32) cutscene_ending_stars_free_peach(struct Camera *c) { /** * Move the camera to the ground as Mario lands. */ -BAD_RETURN(s32) cutscene_ending_mario_land(struct Camera *c) { +void cutscene_ending_mario_land(struct Camera *c) { vec3f_set(c->focus, sEndingFlyToWindowFocus[0].point[0], sEndingFlyToWindowFocus[0].point[1] + 80.f, sEndingFlyToWindowFocus[0].point[2]); vec3f_set(c->pos, sEndingFlyToWindowPos[0].point[0], sEndingFlyToWindowPos[0].point[1], sEndingFlyToWindowPos[0].point[2] + 150.f); player2_rotate_cam(c, -0x800, 0x2000, -0x2000, 0x2000); @@ -7333,7 +7333,7 @@ BAD_RETURN(s32) cutscene_ending_mario_land(struct Camera *c) { /** * Move the camera closer to peach appearing. */ -BAD_RETURN(s32) cutscene_ending_peach_appear_closeup(struct Camera *c) { +void cutscene_ending_peach_appear_closeup(struct Camera *c) { vec3f_set(c->pos, 179.f, 2463.f, -1216.f); c->pos[1] = gCutsceneFocus->oPosY + 35.f; vec3f_set(c->focus, gCutsceneFocus->oPosX, gCutsceneFocus->oPosY + 125.f, gCutsceneFocus->oPosZ); @@ -7342,7 +7342,7 @@ BAD_RETURN(s32) cutscene_ending_peach_appear_closeup(struct Camera *c) { /** * Peach fades in, the camera focuses on her. */ -BAD_RETURN(s32) cutscene_ending_peach_appears(struct Camera *c) { +void cutscene_ending_peach_appears(struct Camera *c) { cutscene_event(cutscene_ending_peach_appear_closeup, c, 0, 0); approach_f32_asymptotic_bool(&c->pos[1], gCutsceneFocus->oPosY + 35.f, 0.02f); approach_f32_asymptotic_bool(&c->focus[1], gCutsceneFocus->oPosY + 125.f, 0.15f); @@ -7352,7 +7352,7 @@ BAD_RETURN(s32) cutscene_ending_peach_appears(struct Camera *c) { /** * Reset spline progress, set cvar2 y offset. */ -BAD_RETURN(s32) cutscene_ending_peach_descends_start(UNUSED struct Camera *c) { +void cutscene_ending_peach_descends_start(UNUSED struct Camera *c) { cutscene_reset_spline(); sCutsceneVars[2].point[1] = 150.f; } @@ -7360,7 +7360,7 @@ BAD_RETURN(s32) cutscene_ending_peach_descends_start(UNUSED struct Camera *c) { /** * Follow the sEndingPeachDescentCamPos spline, which rotates around peach. */ -BAD_RETURN(s32) cutscene_ending_follow_peach_descent(struct Camera *c) { +void cutscene_ending_follow_peach_descent(struct Camera *c) { move_point_along_spline(c->pos, sEndingPeachDescentCamPos, &sCutsceneSplineSegment, &sCutsceneSplineSegmentProgress); c->pos[1] += gCutsceneFocus->oPosY + sCutsceneVars[3].point[1]; } @@ -7368,14 +7368,14 @@ BAD_RETURN(s32) cutscene_ending_follow_peach_descent(struct Camera *c) { /** * Decrease cvar2's y offset while the camera flies backwards to Mario. */ -BAD_RETURN(s32) cutscene_ending_peach_descent_lower_focus(UNUSED struct Camera *c) { +void cutscene_ending_peach_descent_lower_focus(UNUSED struct Camera *c) { camera_approach_f32_symmetric_bool(&(sCutsceneVars[2].point[1]), 90.f, 0.5f); } /** * Keep following the sEndingPeachDescentCamPos spline, which leads back to Mario. */ -BAD_RETURN(s32) cutscene_ending_peach_descent_back_to_mario(struct Camera *c) { +void cutscene_ending_peach_descent_back_to_mario(struct Camera *c) { Vec3f pos; move_point_along_spline(pos, sEndingPeachDescentCamPos, &sCutsceneSplineSegment, &sCutsceneSplineSegmentProgress); @@ -7388,7 +7388,7 @@ BAD_RETURN(s32) cutscene_ending_peach_descent_back_to_mario(struct Camera *c) { * Peach starts floating to the ground. Rotate the camera around her, then fly backwards to Mario when * she lands. */ -BAD_RETURN(s32) cutscene_ending_peach_descends(struct Camera *c) { +void cutscene_ending_peach_descends(struct Camera *c) { cutscene_event(cutscene_ending_peach_descends_start, c, 0, 0); cutscene_event(cutscene_ending_follow_peach_descent, c, 0, 299); cutscene_event(cutscene_ending_peach_descent_back_to_mario, c, 300, -1); @@ -7402,7 +7402,7 @@ BAD_RETURN(s32) cutscene_ending_peach_descends(struct Camera *c) { * Mario runs across the bridge to peach, and takes off his cap. * Follow the sEndingMarioToPeach* splines while Mario runs across. */ -BAD_RETURN(s32) cutscene_ending_mario_to_peach(struct Camera *c) { +void cutscene_ending_mario_to_peach(struct Camera *c) { cutscene_event(cutscene_ending_reset_spline, c, 0, 0); move_point_along_spline(c->pos, sEndingMarioToPeachPos, &sCutsceneSplineSegment, &sCutsceneSplineSegmentProgress); move_point_along_spline(c->focus, sEndingMarioToPeachFocus, &sCutsceneSplineSegment, &sCutsceneSplineSegmentProgress); @@ -7412,14 +7412,14 @@ BAD_RETURN(s32) cutscene_ending_mario_to_peach(struct Camera *c) { /** * Make the focus follow the sEndingLookUpAtCastle spline. */ -BAD_RETURN(s32) cutscene_ending_look_up_at_castle(UNUSED struct Camera *c) { +void cutscene_ending_look_up_at_castle(UNUSED struct Camera *c) { move_point_along_spline(c->focus, sEndingLookUpAtCastle, &sCutsceneSplineSegment, &sCutsceneSplineSegmentProgress); } /** * Peach opens her eyes and the camera looks at the castle window again. */ -BAD_RETURN(s32) cutscene_ending_peach_wakeup(struct Camera *c) { +void cutscene_ending_peach_wakeup(struct Camera *c) { cutscene_event(cutscene_ending_reset_spline, c, 0, 0); cutscene_event(cutscene_ending_look_up_at_castle, c, 0, 0); cutscene_event(cutscene_ending_look_up_at_castle, c, 250, -1); @@ -7432,7 +7432,7 @@ BAD_RETURN(s32) cutscene_ending_peach_wakeup(struct Camera *c) { /** * Side view of peach and Mario. Peach thanks Mario for saving her. */ -BAD_RETURN(s32) cutscene_ending_dialog(struct Camera *c) { +void cutscene_ending_dialog(struct Camera *c) { vec3f_set(c->focus, 11.f, 983.f, -1273.f); vec3f_set(c->pos, -473.f, 970.f, -1152.f); player2_rotate_cam(c, -0x800, 0x2000, -0x2000, 0x2000); @@ -7441,7 +7441,7 @@ BAD_RETURN(s32) cutscene_ending_dialog(struct Camera *c) { /** * Zoom in and move the camera close to Mario and peach. */ -BAD_RETURN(s32) cutscene_ending_kiss_closeup(struct Camera *c) { +void cutscene_ending_kiss_closeup(struct Camera *c) { set_fov_function(CAM_FOV_SET_29); vec3f_set(c->focus, 350.f, 1034.f, -1216.f); vec3f_set(c->pos, -149.f, 1021.f, -1216.f); @@ -7450,7 +7450,7 @@ BAD_RETURN(s32) cutscene_ending_kiss_closeup(struct Camera *c) { /** * Fly back and zoom out for Mario's spin after the kiss. */ -BAD_RETURN(s32) cutscene_ending_kiss_here_we_go(struct Camera *c) { +void cutscene_ending_kiss_here_we_go(struct Camera *c) { Vec3f pos, foc; set_fov_function(CAM_FOV_DEFAULT); @@ -7464,7 +7464,7 @@ BAD_RETURN(s32) cutscene_ending_kiss_here_we_go(struct Camera *c) { /** * Peach kisses Mario on the nose. */ -BAD_RETURN(s32) cutscene_ending_kiss(struct Camera *c) { +void cutscene_ending_kiss(struct Camera *c) { cutscene_event(cutscene_ending_kiss_closeup, c, 0, 0); cutscene_event(cutscene_ending_kiss_here_we_go, c, 155, -1); player2_rotate_cam(c, -0x800, 0x2000, -0x2000, 0x2000); @@ -7473,7 +7473,7 @@ BAD_RETURN(s32) cutscene_ending_kiss(struct Camera *c) { /** * Make the focus follow sEndingLookAtSkyFocus. */ -BAD_RETURN(s32) cutscene_ending_look_at_sky(struct Camera *c) { +void cutscene_ending_look_at_sky(struct Camera *c) { move_point_along_spline(c->focus, sEndingLookAtSkyFocus, &sCutsceneSplineSegment, &sCutsceneSplineSegmentProgress); vec3f_set(c->pos, 699.f, 1680.f, -703.f); } @@ -7482,14 +7482,14 @@ BAD_RETURN(s32) cutscene_ending_look_at_sky(struct Camera *c) { * Zoom in the fov. The fovFunc was just set to default, so it wants to approach 45. But while this is * called, it will stay at about 37.26f */ -BAD_RETURN(s32) cutscene_ending_zoom_fov(UNUSED struct Camera *c) { +void cutscene_ending_zoom_fov(UNUSED struct Camera *c) { sFOVState.fov = 37.f; } /** * Peach suggests baking a cake for Mario. Mario looks back at the camera before going inside the castle. */ -BAD_RETURN(s32) cutscene_ending_cake_for_mario(struct Camera *c) { +void cutscene_ending_cake_for_mario(struct Camera *c) { cutscene_event(cutscene_ending_reset_spline, c, 0, 0); cutscene_event(cutscene_ending_look_at_sky, c, 0, 0); cutscene_event(cutscene_ending_zoom_fov, c, 0, 499); @@ -7503,7 +7503,7 @@ BAD_RETURN(s32) cutscene_ending_cake_for_mario(struct Camera *c) { /** * Stop the ending cutscene, reset the fov. */ -BAD_RETURN(s32) cutscene_ending_stop(struct Camera *c) { +void cutscene_ending_stop(struct Camera *c) { set_fov_function(CAM_FOV_SET_45); c->cutscene = 0; gCutsceneTimer = CUTSCENE_STOP; @@ -7514,7 +7514,7 @@ BAD_RETURN(s32) cutscene_ending_stop(struct Camera *c) { * cvar0 is a relative offset from Mario. * cvar1 is the is the camera's goal position. */ -BAD_RETURN(s32) cutscene_grand_star_start(UNUSED struct Camera *c) { +void cutscene_grand_star_start(UNUSED struct Camera *c) { vec3f_set(sCutsceneVars[0].point, 0.f, 150.f, -600.f); offset_rotated(sCutsceneVars[1].point, sMarioCamState->pos, sCutsceneVars[0].point, sMarioCamState->faceAngle); sCutsceneVars[1].point[1] = 457.f; @@ -7523,7 +7523,7 @@ BAD_RETURN(s32) cutscene_grand_star_start(UNUSED struct Camera *c) { /** * Make the camera fly to the front of Mario. */ -BAD_RETURN(s32) cutscene_grand_star_front_of_mario(struct Camera *c) { +void cutscene_grand_star_front_of_mario(struct Camera *c) { f32 goalDist; s16 goalPitch, goalYaw; f32 dist; @@ -7540,7 +7540,7 @@ BAD_RETURN(s32) cutscene_grand_star_front_of_mario(struct Camera *c) { /** * Started shortly after Mario starts the triple jump. Stores Mario's face angle and zeros cvar2. */ -BAD_RETURN(s32) cutscene_grand_star_mario_jump(UNUSED struct Camera *c) { +void cutscene_grand_star_mario_jump(UNUSED struct Camera *c) { vec3s_set(sCutsceneVars[0].angle, 0, sMarioCamState->faceAngle[1], 0); vec3f_set(sCutsceneVars[2].point, 0.f, 0.f, 0.f); } @@ -7548,7 +7548,7 @@ BAD_RETURN(s32) cutscene_grand_star_mario_jump(UNUSED struct Camera *c) { /** * Accelerate cvar2 to point back and to the left (relative to the camera). */ -BAD_RETURN(s32) cutscene_grand_star_accel_cvar2(UNUSED struct Camera *c) { +void cutscene_grand_star_accel_cvar2(UNUSED struct Camera *c) { camera_approach_f32_symmetric_bool(&sCutsceneVars[2].point[2], -40.f, 2.0f); sCutsceneVars[2].point[0] = 5.0f; } @@ -7556,7 +7556,7 @@ BAD_RETURN(s32) cutscene_grand_star_accel_cvar2(UNUSED struct Camera *c) { /** * Decrease cvar2 offset, follow Mario by directly updating the camera's pos. */ -BAD_RETURN(s32) cutscene_grand_star_approach_mario(struct Camera *c) { +void cutscene_grand_star_approach_mario(struct Camera *c) { camera_approach_f32_symmetric_bool(&sCutsceneVars[2].point[2], 0.f, 2.f); sCutsceneVars[2].point[0] = 0.f; approach_f32_asymptotic_bool(&c->pos[0], sMarioCamState->pos[0], 0.01f); @@ -7567,11 +7567,11 @@ BAD_RETURN(s32) cutscene_grand_star_approach_mario(struct Camera *c) { * Offset the camera's position by cvar2. Before Mario triple jumps, this moves back and to the left. * After the triple jump, cvar2 decelerates to 0. */ -BAD_RETURN(s32) cutscene_grand_star_move_cvar2(struct Camera *c) { +void cutscene_grand_star_move_cvar2(struct Camera *c) { offset_rotated(c->pos, c->pos, sCutsceneVars[2].point, sCutsceneVars[0].angle); } -BAD_RETURN(s32) cutscene_grand_star_focus_mario(struct Camera *c) { +void cutscene_grand_star_focus_mario(struct Camera *c) { Vec3f foc; vec3f_set(foc, sMarioCamState->pos[0], (sMarioCamState->pos[1] - 307.f) * 0.5f + 407.f, sMarioCamState->pos[2]); @@ -7581,7 +7581,7 @@ BAD_RETURN(s32) cutscene_grand_star_focus_mario(struct Camera *c) { /** * The first part of the grand star cutscene, after Mario has collected the grand star. */ -BAD_RETURN(s32) cutscene_grand_star(struct Camera *c) { +void cutscene_grand_star(struct Camera *c) { sStatusFlags |= CAM_FLAG_SMOOTH_MOVEMENT; cutscene_event(cutscene_grand_star_start, c, 0, 0); cutscene_event(cutscene_grand_star_front_of_mario, c, 0, 109); @@ -7595,7 +7595,7 @@ BAD_RETURN(s32) cutscene_grand_star(struct Camera *c) { /** * Zero the cvars that are used when Mario is flying. */ -BAD_RETURN(s32) cutscene_grand_star_fly_start(struct Camera *c) { +void cutscene_grand_star_fly_start(struct Camera *c) { //! cvar7 is unused in grand star vec3f_set(sCutsceneVars[7].point, 0.5f, 0.5f, 0.5f); //! cvar6 is unused in grand star @@ -7609,7 +7609,7 @@ BAD_RETURN(s32) cutscene_grand_star_fly_start(struct Camera *c) { /** * Decrease the cvar offsets so that Lakitu flies closer to Mario. */ -BAD_RETURN(s32) cutscene_grand_star_fly_move_to_mario(UNUSED struct Camera *c) { +void cutscene_grand_star_fly_move_to_mario(UNUSED struct Camera *c) { Vec3f posOff; vec3f_set(posOff, -600.f, 0.f, -400.f); @@ -7625,7 +7625,7 @@ BAD_RETURN(s32) cutscene_grand_star_fly_move_to_mario(UNUSED struct Camera *c) { * cvar5 is the focus offset from Mario. * cvar8.point[0] is the approach velocity. */ -BAD_RETURN(s32) cutscene_grand_star_fly_mario_offscreen(UNUSED struct Camera *c) { +void cutscene_grand_star_fly_mario_offscreen(UNUSED struct Camera *c) { camera_approach_f32_symmetric_bool(&sCutsceneVars[8].point[0], 15.f, 0.1f); camera_approach_f32_symmetric_bool(&sCutsceneVars[4].point[0], -2000.f, sCutsceneVars[8].point[0]); @@ -7642,7 +7642,7 @@ BAD_RETURN(s32) cutscene_grand_star_fly_mario_offscreen(UNUSED struct Camera *c) * cvar4 is the position offset. * cvar5 is the focus offset. */ -BAD_RETURN(s32) cutscene_grand_star_fly_app_cvars(struct Camera *c) { +void cutscene_grand_star_fly_app_cvars(struct Camera *c) { Vec3f goalPos, goalFoc; f32 dist; s16 pitch, yaw; @@ -7669,7 +7669,7 @@ BAD_RETURN(s32) cutscene_grand_star_fly_app_cvars(struct Camera *c) { * * cvar8.point[2] is Lakitu's speed. */ -BAD_RETURN(s32) cutscene_grand_star_fly(struct Camera *c) { +void cutscene_grand_star_fly(struct Camera *c) { sStatusFlags |= CAM_FLAG_SMOOTH_MOVEMENT; cutscene_event(cutscene_grand_star_fly_start, c, 0, 0); cutscene_event(cutscene_grand_star_fly_move_to_mario, c, 0, 140); @@ -7697,7 +7697,7 @@ void focus_in_front_of_mario(struct Camera *c, f32 dist, f32 speed) { * Approach Mario and look up. Since Mario faces the camera when he collects the star, there's no need * to worry about the camera's yaw. */ -BAD_RETURN(s32) cutscene_dance_move_to_mario(struct Camera *c) { +void cutscene_dance_move_to_mario(struct Camera *c) { s16 pitch, yaw; f32 dist; @@ -7707,39 +7707,39 @@ BAD_RETURN(s32) cutscene_dance_move_to_mario(struct Camera *c) { vec3f_set_dist_and_angle(sMarioCamState->pos, c->pos, dist, pitch, yaw); } -BAD_RETURN(s32) cutscene_dance_rotate(struct Camera *c) { +void cutscene_dance_rotate(struct Camera *c) { rotate_and_move_vec3f(c->pos, sMarioCamState->pos, 0, 0, 0x200); } -BAD_RETURN(s32) cutscene_dance_rotate_move_back(struct Camera *c) { +void cutscene_dance_rotate_move_back(struct Camera *c) { rotate_and_move_vec3f(c->pos, sMarioCamState->pos, -15.f, 0, 0); } -BAD_RETURN(s32) cutscene_dance_rotate_move_towards_mario(struct Camera *c) { +void cutscene_dance_rotate_move_towards_mario(struct Camera *c) { rotate_and_move_vec3f(c->pos, sMarioCamState->pos, 20.f, 0, 0); } /** * Speculated to be dance-related due to its proximity to the other dance functions */ -UNUSED static BAD_RETURN(s32) cutscene_dance_unused(UNUSED struct Camera *c) { +UNUSED static void cutscene_dance_unused(UNUSED struct Camera *c) { } /** * Slowly turn to the point 100 units in front of Mario */ -BAD_RETURN(s32) cutscene_dance_default_focus_mario(struct Camera *c) { +void cutscene_dance_default_focus_mario(struct Camera *c) { focus_in_front_of_mario(c, -100.f, 0.2f); } /** * Focus twice as far away as default dance, and move faster. */ -BAD_RETURN(s32) cutscene_dance_rotate_focus_mario(struct Camera *c) { +void cutscene_dance_rotate_focus_mario(struct Camera *c) { focus_in_front_of_mario(c, -200.f, 0.03f); } -BAD_RETURN(s32) cutscene_dance_shake_fov(UNUSED struct Camera *c) { +void cutscene_dance_shake_fov(UNUSED struct Camera *c) { set_fov_shake(0x200, 0x28, 0x8000); } @@ -7748,7 +7748,7 @@ BAD_RETURN(s32) cutscene_dance_shake_fov(UNUSED struct Camera *c) { * In the default dance: the camera moves closer to Mario, then stays in place. * In the rotate dance: the camera moves closer and rotates clockwise around Mario. */ -BAD_RETURN(s32) cutscene_dance_default_rotate(struct Camera *c) { +void cutscene_dance_default_rotate(struct Camera *c) { sStatusFlags |= CAM_FLAG_SMOOTH_MOVEMENT; sYawSpeed = 0; set_fov_function(CAM_FOV_DEFAULT); @@ -7779,7 +7779,7 @@ BAD_RETURN(s32) cutscene_dance_default_rotate(struct Camera *c) { /** * If the camera's yaw is out of the range of `absYaw` +- `yawMax`, then set the yaw to `absYaw` */ -BAD_RETURN(s32) star_dance_bound_yaw(struct Camera *c, s16 absYaw, s16 yawMax) { +void star_dance_bound_yaw(struct Camera *c, s16 absYaw, s16 yawMax) { s16 dummyPitch, yaw; f32 distCamToMario; s16 yawFromAbs; @@ -7802,7 +7802,7 @@ BAD_RETURN(s32) star_dance_bound_yaw(struct Camera *c, s16 absYaw, s16 yawMax) { * Start the closeup dance cutscene by restricting the camera's yaw in certain areas. * Store the camera's focus in cvar9. */ -BAD_RETURN(s32) cutscene_dance_closeup_start(struct Camera *c) { +void cutscene_dance_closeup_start(struct Camera *c) { UNUSED s32 pad[2]; if ((gLastCompletedStarNum == 4) && (gCurrCourseNum == COURSE_JRB)) { @@ -7823,7 +7823,7 @@ BAD_RETURN(s32) cutscene_dance_closeup_start(struct Camera *c) { /** * Focus the camera on Mario eye height. */ -BAD_RETURN(s32) cutscene_dance_closeup_focus_mario(struct Camera *c) { +void cutscene_dance_closeup_focus_mario(struct Camera *c) { Vec3f marioPos; vec3f_set(marioPos, sMarioCamState->pos[0], sMarioCamState->pos[1] + 125.f, sMarioCamState->pos[2]); @@ -7834,7 +7834,7 @@ BAD_RETURN(s32) cutscene_dance_closeup_focus_mario(struct Camera *c) { /** * Fly above Mario, looking down. */ -BAD_RETURN(s32) cutscene_dance_closeup_fly_above(struct Camera *c) { +void cutscene_dance_closeup_fly_above(struct Camera *c) { s16 pitch, yaw; f32 dist; s16 goalPitch = 0x1800; @@ -7854,7 +7854,7 @@ BAD_RETURN(s32) cutscene_dance_closeup_fly_above(struct Camera *c) { /** * Fly closer right when Mario gives the peace sign. */ -BAD_RETURN(s32) cutscene_dance_closeup_fly_closer(struct Camera *c) { +void cutscene_dance_closeup_fly_closer(struct Camera *c) { s16 pitch, yaw; f32 dist; @@ -7868,21 +7868,21 @@ BAD_RETURN(s32) cutscene_dance_closeup_fly_closer(struct Camera *c) { /** * Zoom in by increasing fov to 80 degrees. Most dramatic zoom in the game. */ -BAD_RETURN(s32) cutscene_dance_closeup_zoom(UNUSED struct Camera *c) { +void cutscene_dance_closeup_zoom(UNUSED struct Camera *c) { set_fov_function(CAM_FOV_APP_80); } /** * Shake fov, starts on the first frame Mario has the peace sign up. */ -BAD_RETURN(s32) cutscene_dance_closeup_shake_fov(UNUSED struct Camera *c) { +void cutscene_dance_closeup_shake_fov(UNUSED struct Camera *c) { set_fov_shake(0x300, 0x30, 0x8000); } /** * The camera moves in for a closeup on Mario. Used for stars that are underwater or in tight places. */ -BAD_RETURN(s32) cutscene_dance_closeup(struct Camera *c) { +void cutscene_dance_closeup(struct Camera *c) { sStatusFlags |= CAM_FLAG_SMOOTH_MOVEMENT; if (sMarioCamState->action == ACT_STAR_DANCE_WATER) { @@ -7907,7 +7907,7 @@ BAD_RETURN(s32) cutscene_dance_closeup(struct Camera *c) { /** * cvar8.point[2] is the amount to increase distance from Mario */ -BAD_RETURN(s32) cutscene_dance_fly_away_start(struct Camera *c) { +void cutscene_dance_fly_away_start(struct Camera *c) { Vec3f areaCenter; vec3f_copy(sCutsceneVars[9].point, c->focus); @@ -7934,7 +7934,7 @@ BAD_RETURN(s32) cutscene_dance_fly_away_start(struct Camera *c) { } } -BAD_RETURN(s32) cutscene_dance_fly_away_approach_mario(struct Camera *c) { +void cutscene_dance_fly_away_approach_mario(struct Camera *c) { s16 pitch, yaw; f32 dist; @@ -7945,7 +7945,7 @@ BAD_RETURN(s32) cutscene_dance_fly_away_approach_mario(struct Camera *c) { vec3f_set_dist_and_angle(sMarioCamState->pos, c->pos, dist, pitch, yaw); } -BAD_RETURN(s32) cutscene_dance_fly_away_focus_mario(struct Camera *c) { +void cutscene_dance_fly_away_focus_mario(struct Camera *c) { Vec3f marioPos; vec3f_set(marioPos, sMarioCamState->pos[0], sMarioCamState->pos[1] + 125.f, sMarioCamState->pos[2]); @@ -7966,7 +7966,7 @@ void cutscene_pan_cvar9(struct Camera *c) { /** * Move backwards and rotate slowly around Mario. */ -BAD_RETURN(s32) cutscene_dance_fly_rotate_around_mario(struct Camera *c) { +void cutscene_dance_fly_rotate_around_mario(struct Camera *c) { cutscene_pan_cvar9(c); rotate_and_move_vec3f(c->pos, sMarioCamState->pos, sCutsceneVars[8].point[2], 0, 0); } @@ -7974,18 +7974,18 @@ BAD_RETURN(s32) cutscene_dance_fly_rotate_around_mario(struct Camera *c) { /** * Rotate quickly while Lakitu flies up. */ -BAD_RETURN(s32) cutscene_dance_fly_away_rotate_while_flying(struct Camera *c) { +void cutscene_dance_fly_away_rotate_while_flying(struct Camera *c) { rotate_and_move_vec3f(c->pos, sMarioCamState->pos, 0, 0, 0x80); } -BAD_RETURN(s32) cutscene_dance_fly_away_shake_fov(UNUSED struct Camera *c) { +void cutscene_dance_fly_away_shake_fov(UNUSED struct Camera *c) { set_fov_shake(0x400, 0x30, 0x8000); } /** * After collecting the star, Lakitu flies upwards out of the course. */ -BAD_RETURN(s32) cutscene_dance_fly_away(struct Camera *c) { +void cutscene_dance_fly_away(struct Camera *c) { sStatusFlags |= CAM_FLAG_SMOOTH_MOVEMENT; cutscene_event(cutscene_dance_fly_away_start, c, 0, 0); cutscene_event(cutscene_dance_fly_away_focus_mario, c, 0, 30); @@ -8001,7 +8001,7 @@ BAD_RETURN(s32) cutscene_dance_fly_away(struct Camera *c) { * Jump the camera pos and focus to cvar 8 and 7. * Called every frame, starting after 10, so when these cvars are updated, the camera will jump. */ -BAD_RETURN(s32) cutscene_key_dance_jump_cvar(struct Camera *c) { +void cutscene_key_dance_jump_cvar(struct Camera *c) { offset_rotated(c->pos, sMarioCamState->pos, sCutsceneVars[8].point, sMarioCamState->faceAngle); offset_rotated(c->focus, sMarioCamState->pos, sCutsceneVars[7].point, sMarioCamState->faceAngle); } @@ -8009,7 +8009,7 @@ BAD_RETURN(s32) cutscene_key_dance_jump_cvar(struct Camera *c) { /** * Jump to a closeup view of Mario and the key. */ -BAD_RETURN(s32) cutscene_key_dance_jump_closeup(UNUSED struct Camera *c) { +void cutscene_key_dance_jump_closeup(UNUSED struct Camera *c) { vec3f_set(sCutsceneVars[8].point, 38.f, 171.f, -248.f); vec3f_set(sCutsceneVars[7].point, -57.f, 51.f, 187.f); } @@ -8017,7 +8017,7 @@ BAD_RETURN(s32) cutscene_key_dance_jump_closeup(UNUSED struct Camera *c) { /** * Jump to a view from the lower left (Mario's right). */ -BAD_RETURN(s32) cutscene_key_dance_jump_lower_left(UNUSED struct Camera *c) { +void cutscene_key_dance_jump_lower_left(UNUSED struct Camera *c) { vec3f_set(sCutsceneVars[8].point, -178.f, 62.f, -132.f); vec3f_set(sCutsceneVars[7].point, 299.f, 91.f, 58.f); } @@ -8025,7 +8025,7 @@ BAD_RETURN(s32) cutscene_key_dance_jump_lower_left(UNUSED struct Camera *c) { /** * Jump to a rotated view from above. */ -BAD_RETURN(s32) cutscene_key_dance_jump_above(UNUSED struct Camera *c) { +void cutscene_key_dance_jump_above(UNUSED struct Camera *c) { gLakituState.keyDanceRoll = 0x2800; vec3f_set(sCutsceneVars[8].point, 89.f, 373.f, -304.f); vec3f_set(sCutsceneVars[7].point, 0.f, 127.f, 0.f); @@ -8034,21 +8034,21 @@ BAD_RETURN(s32) cutscene_key_dance_jump_above(UNUSED struct Camera *c) { /** * Finally, jump to a further view, slightly to Mario's left. */ -BAD_RETURN(s32) cutscene_key_dance_jump_last(UNUSED struct Camera *c) { +void cutscene_key_dance_jump_last(UNUSED struct Camera *c) { gLakituState.keyDanceRoll = 0; vec3f_set(sCutsceneVars[8].point, 135.f, 158.f, -673.f); vec3f_set(sCutsceneVars[7].point, -20.f, 135.f, -198.f); } -BAD_RETURN(s32) cutscene_key_dance_shake_fov(UNUSED struct Camera *c) { +void cutscene_key_dance_shake_fov(UNUSED struct Camera *c) { set_fov_shake(0x180, 0x30, 0x8000); } -BAD_RETURN(s32) cutscene_key_dance_handheld_shake(UNUSED struct Camera *c) { +void cutscene_key_dance_handheld_shake(UNUSED struct Camera *c) { set_handheld_shake(HAND_CAM_SHAKE_CUTSCENE); } -BAD_RETURN(s32) cutscene_key_dance_focus_mario(struct Camera *c) { +void cutscene_key_dance_focus_mario(struct Camera *c) { focus_in_front_of_mario(c, 0, 0.2f); } @@ -8056,7 +8056,7 @@ BAD_RETURN(s32) cutscene_key_dance_focus_mario(struct Camera *c) { * Cutscene that plays when Mario collects a key from bowser. It's basically a sequence of four jump * cuts. */ -BAD_RETURN(s32) cutscene_key_dance(struct Camera *c) { +void cutscene_key_dance(struct Camera *c) { cutscene_event(cutscene_dance_move_to_mario, c, 0, 10); cutscene_event(cutscene_key_dance_focus_mario, c, 0, 10); cutscene_event(cutscene_key_dance_jump_closeup, c, 0, 0); @@ -8068,14 +8068,14 @@ BAD_RETURN(s32) cutscene_key_dance(struct Camera *c) { cutscene_event(cutscene_key_dance_handheld_shake, c, 52, -1); } -BAD_RETURN(s32) cutscene_bowser_area_shake_fov(UNUSED struct Camera *c) { +void cutscene_bowser_area_shake_fov(UNUSED struct Camera *c) { cutscene_set_fov_shake_preset(2); } /** * Set oBowserCamAct to 1, which causes bowser to start walking. */ -BAD_RETURN(s32) cutscene_bowser_area_start_bowser_walking(UNUSED struct Camera *c) { +void cutscene_bowser_area_start_bowser_walking(UNUSED struct Camera *c) { gSecondCameraFocus->oBowserCamAct = BOWSER_CAM_ACT_WALK; } @@ -8084,7 +8084,7 @@ BAD_RETURN(s32) cutscene_bowser_area_start_bowser_walking(UNUSED struct Camera * * @bug cvar2.point is (0,0,0) on the first frame, but because of the warp transition, this behavior * isn't seen. After the first frame, cvar2.point is bowser's position. */ -BAD_RETURN(s32) cutscene_bowser_arena_set_pos(struct Camera *c) { +void cutscene_bowser_arena_set_pos(struct Camera *c) { vec3f_set_dist_and_angle(sCutsceneVars[2].point, c->pos, sCutsceneVars[3].point[2], sCutsceneVars[3].angle[0], sCutsceneVars[3].angle[1]); vec3f_set(sCutsceneVars[2].point, gSecondCameraFocus->oPosX, gSecondCameraFocus->oPosY, @@ -8095,7 +8095,7 @@ BAD_RETURN(s32) cutscene_bowser_arena_set_pos(struct Camera *c) { * Apply a sine wave to the focus's y coordinate. * The y offset starts at 120, then decreases to 0 before reaching ~240 on the last frame. */ -BAD_RETURN(s32) cutscene_bowser_arena_focus_sine(UNUSED struct Camera *c) { +void cutscene_bowser_arena_focus_sine(UNUSED struct Camera *c) { //! unused initialization f32 yOff = 150.0f; @@ -8108,7 +8108,7 @@ BAD_RETURN(s32) cutscene_bowser_arena_focus_sine(UNUSED struct Camera *c) { /** * Set the camera focus according to cvar0 and cvar2. */ -BAD_RETURN(s32) cutscene_bowser_arena_set_focus(struct Camera *c) { +void cutscene_bowser_arena_set_focus(struct Camera *c) { offset_rotated(c->focus, sCutsceneVars[2].point, sCutsceneVars[0].point, sCutsceneVars[2].angle); } @@ -8116,7 +8116,7 @@ BAD_RETURN(s32) cutscene_bowser_arena_set_focus(struct Camera *c) { * Adjust the cvar offsets, making the camera look up, move slightly further back, and focus a little * further in front of bowser. */ -BAD_RETURN(s32) cutscene_bowser_arena_adjust_offsets(UNUSED struct Camera *c) { +void cutscene_bowser_arena_adjust_offsets(UNUSED struct Camera *c) { approach_s16_asymptotic_bool(&sCutsceneVars[3].angle[0], 0x6C8, 30); approach_f32_asymptotic_bool(&sCutsceneVars[0].point[2], -200.f, 0.02f); approach_f32_asymptotic_bool(&sCutsceneVars[3].point[2], 550.f, 0.02f); @@ -8125,14 +8125,14 @@ BAD_RETURN(s32) cutscene_bowser_arena_adjust_offsets(UNUSED struct Camera *c) { /** * Decrease cvar0's z offset, making the camera focus pan left towards bowser. */ -BAD_RETURN(s32) cutscene_bowser_arena_pan_left(UNUSED struct Camera *c) { +void cutscene_bowser_arena_pan_left(UNUSED struct Camera *c) { approach_f32_asymptotic_bool(&sCutsceneVars[0].point[2], 0.f, 0.05f); } /** * Duplicate of cutscene_mario_dialog(). */ -BAD_RETURN(s32) cutscene_bowser_arena_mario_dialog(UNUSED struct Camera *c) { +void cutscene_bowser_arena_mario_dialog(UNUSED struct Camera *c) { cutscene_common_set_dialog_state(MARIO_DIALOG_LOOK_FRONT); } @@ -8147,7 +8147,7 @@ void cutscene_stop_dialog(UNUSED struct Camera *c) { * * cvar0 is the focus offset from bowser */ -BAD_RETURN(s32) cutscene_bowser_arena_start(struct Camera *c) { +void cutscene_bowser_arena_start(struct Camera *c) { sCutsceneVars[3].point[2] = 430.f; sCutsceneVars[3].angle[1] = gSecondCameraFocus->oMoveAngleYaw - DEGREES(45); sCutsceneVars[3].angle[0] = 0xD90; @@ -8168,7 +8168,7 @@ BAD_RETURN(s32) cutscene_bowser_arena_start(struct Camera *c) { /** * Create the dialog box depending on which bowser fight Mario is in. */ -BAD_RETURN(s32) bowser_fight_intro_dialog(UNUSED struct Camera *c) { +void bowser_fight_intro_dialog(UNUSED struct Camera *c) { s16 dialog; switch (gCurrLevelNum) { @@ -8188,7 +8188,7 @@ BAD_RETURN(s32) bowser_fight_intro_dialog(UNUSED struct Camera *c) { /** * Create the dialog box and wait until it's gone. */ -BAD_RETURN(s32) cutscene_bowser_arena_dialog(struct Camera *c) { +void cutscene_bowser_arena_dialog(struct Camera *c) { cutscene_event(bowser_fight_intro_dialog, c, 0, 0); if (get_dialog_id() == DIALOG_NONE) { @@ -8199,7 +8199,7 @@ BAD_RETURN(s32) cutscene_bowser_arena_dialog(struct Camera *c) { /** * End the bowser arena cutscene. */ -BAD_RETURN(s32) cutscene_bowser_arena_end(struct Camera *c) { +void cutscene_bowser_arena_end(struct Camera *c) { cutscene_stop_dialog(c); c->cutscene = 0; transition_next_state(c, 20); @@ -8211,7 +8211,7 @@ BAD_RETURN(s32) cutscene_bowser_arena_end(struct Camera *c) { /** * Cutscene that plays when Mario enters a bowser fight. */ -BAD_RETURN(s32) cutscene_bowser_arena(struct Camera *c) { +void cutscene_bowser_arena(struct Camera *c) { //! This does nothing, but may have been used in development cutscene_spawn_obj(2, 0); @@ -8232,14 +8232,14 @@ BAD_RETURN(s32) cutscene_bowser_arena(struct Camera *c) { } } -BAD_RETURN(s32) cutscene_star_spawn_store_info(struct Camera *c) { +void cutscene_star_spawn_store_info(struct Camera *c) { store_info_star(c); } /** * Focus on the top of the star. */ -BAD_RETURN(s32) cutscene_star_spawn_focus_star(struct Camera *c) { +void cutscene_star_spawn_focus_star(struct Camera *c) { UNUSED f32 hMul; Vec3f starPos; UNUSED f32 vMul; @@ -8254,7 +8254,7 @@ BAD_RETURN(s32) cutscene_star_spawn_focus_star(struct Camera *c) { /** * Use boss fight mode's update function to move the focus back. */ -BAD_RETURN(s32) cutscene_star_spawn_update_boss_fight(struct Camera *c) { +void cutscene_star_spawn_update_boss_fight(struct Camera *c) { Vec3f pos, focus; update_boss_fight_camera(c, focus, pos); @@ -8265,7 +8265,7 @@ BAD_RETURN(s32) cutscene_star_spawn_update_boss_fight(struct Camera *c) { /** * Fly back to the camera's previous pos and focus. */ -BAD_RETURN(s32) cutscene_star_spawn_fly_back(struct Camera *c) { +void cutscene_star_spawn_fly_back(struct Camera *c) { retrieve_info_star(c); transition_next_state(c, 15); } @@ -8273,7 +8273,7 @@ BAD_RETURN(s32) cutscene_star_spawn_fly_back(struct Camera *c) { /** * Plays when a star spawns (ie from a box). */ -BAD_RETURN(s32) cutscene_star_spawn(struct Camera *c) { +void cutscene_star_spawn(struct Camera *c) { cutscene_event(cutscene_star_spawn_store_info, c, 0, 0); cutscene_event(cutscene_star_spawn_focus_star, c, 0, -1); sStatusFlags |= CAM_FLAG_SMOOTH_MOVEMENT; @@ -8287,7 +8287,7 @@ BAD_RETURN(s32) cutscene_star_spawn(struct Camera *c) { /** * Move the camera back to Mario. */ -BAD_RETURN(s32) cutscene_star_spawn_back(struct Camera *c) { +void cutscene_star_spawn_back(struct Camera *c) { if ((c->mode == CAMERA_MODE_BOSS_FIGHT) && (set_cam_angle(0) == CAM_ANGLE_LAKITU)) { cutscene_event(cutscene_star_spawn_update_boss_fight, c, 0, -1); } else { @@ -8298,13 +8298,13 @@ BAD_RETURN(s32) cutscene_star_spawn_back(struct Camera *c) { sStatusFlags |= CAM_FLAG_UNUSED_CUTSCENE_ACTIVE; } -BAD_RETURN(s32) cutscene_star_spawn_end(struct Camera *c) { +void cutscene_star_spawn_end(struct Camera *c) { sStatusFlags |= CAM_FLAG_SMOOTH_MOVEMENT; gCutsceneTimer = CUTSCENE_STOP; c->cutscene = 0; } -BAD_RETURN(s32) cutscene_exit_waterfall_warp(struct Camera *c) { +void cutscene_exit_waterfall_warp(struct Camera *c) { //! hardcoded position vec3f_set(c->pos, -3899.f, 39.f, -5671.f); } @@ -8312,7 +8312,7 @@ BAD_RETURN(s32) cutscene_exit_waterfall_warp(struct Camera *c) { /** * Look at Mario, used by cutscenes that play when Mario exits a course to castle grounds. */ -BAD_RETURN(s32) cutscene_exit_to_castle_grounds_focus_mario(struct Camera *c) { +void cutscene_exit_to_castle_grounds_focus_mario(struct Camera *c) { vec3f_copy(c->focus, sMarioCamState->pos); c->focus[1] = c->pos[1] + (sMarioCamState->pos[1] + 125.f - c->pos[1]) * 0.5f; approach_vec3f_asymptotic(c->focus, sMarioCamState->pos, 0.05f, 0.4f, 0.05f); @@ -8321,7 +8321,7 @@ BAD_RETURN(s32) cutscene_exit_to_castle_grounds_focus_mario(struct Camera *c) { /** * Cutscene that plays when Mario leaves CotMC through the waterfall. */ -BAD_RETURN(s32) cutscene_exit_waterfall(struct Camera *c) { +void cutscene_exit_waterfall(struct Camera *c) { cutscene_event(cutscene_exit_waterfall_warp, c, 0, 0); cutscene_event(cutscene_exit_to_castle_grounds_focus_mario, c, 0, -1); update_camera_yaw(c); @@ -8330,14 +8330,14 @@ BAD_RETURN(s32) cutscene_exit_waterfall(struct Camera *c) { /** * End the cutscene, used by cutscenes that play when Mario exits a course to castle grounds. */ -BAD_RETURN(s32) cutscene_exit_to_castle_grounds_end(struct Camera *c) { +void cutscene_exit_to_castle_grounds_end(struct Camera *c) { sStatusFlags |= CAM_FLAG_SMOOTH_MOVEMENT; gCutsceneTimer = CUTSCENE_STOP; c->cutscene = 0; update_camera_yaw(c); } -BAD_RETURN(s32) cutscene_exit_fall_to_castle_grounds_warp(struct Camera *c) { +void cutscene_exit_fall_to_castle_grounds_warp(struct Camera *c) { //! hardcoded position vec3f_set(c->pos, 5830.f, 32.f, 3985.f); } @@ -8345,7 +8345,7 @@ BAD_RETURN(s32) cutscene_exit_fall_to_castle_grounds_warp(struct Camera *c) { /** * Cutscene that plays when Mario falls from WMOTR. */ -BAD_RETURN(s32) cutscene_exit_fall_to_castle_grounds(struct Camera *c) { +void cutscene_exit_fall_to_castle_grounds(struct Camera *c) { cutscene_event(cutscene_exit_fall_to_castle_grounds_warp, c, 0, 0); cutscene_event(cutscene_exit_to_castle_grounds_focus_mario, c, 0, -1); update_camera_yaw(c); @@ -8354,7 +8354,7 @@ BAD_RETURN(s32) cutscene_exit_fall_to_castle_grounds(struct Camera *c) { /** * Start the red coin star spawning cutscene. */ -BAD_RETURN(s32) cutscene_red_coin_star_start(struct Camera *c) { +void cutscene_red_coin_star_start(struct Camera *c) { object_pos_to_vec3f(sCutsceneVars[1].point, gCutsceneFocus); store_info_star(c); // Store the default fov for after the cutscene @@ -8364,7 +8364,7 @@ BAD_RETURN(s32) cutscene_red_coin_star_start(struct Camera *c) { /** * Look towards the star's x and z position */ -BAD_RETURN(s32) cutscene_red_coin_star_focus_xz(struct Camera *c) { +void cutscene_red_coin_star_focus_xz(struct Camera *c) { approach_f32_asymptotic_bool(&c->focus[0], gCutsceneFocus->oPosX, 0.15f); approach_f32_asymptotic_bool(&c->focus[2], gCutsceneFocus->oPosZ, 0.15f); } @@ -8372,21 +8372,21 @@ BAD_RETURN(s32) cutscene_red_coin_star_focus_xz(struct Camera *c) { /** * Look towards the star's y position. Only active before the camera warp. */ -BAD_RETURN(s32) cutscene_red_coin_star_focus_y(struct Camera *c) { +void cutscene_red_coin_star_focus_y(struct Camera *c) { approach_f32_asymptotic_bool(&c->focus[1], gCutsceneFocus->oPosY, 0.1f); } /** * Look 80% up towards the star. Only active after the camera warp. */ -BAD_RETURN(s32) cutscene_red_coin_star_look_up_at_star(struct Camera *c) { +void cutscene_red_coin_star_look_up_at_star(struct Camera *c) { c->focus[1] = sCutsceneVars[1].point[1] + (gCutsceneFocus->oPosY - sCutsceneVars[1].point[1]) * 0.8f; } /** * Warp the camera near the star's spawn point */ -BAD_RETURN(s32) cutscene_red_coin_star_warp(struct Camera *c) { +void cutscene_red_coin_star_warp(struct Camera *c) { f32 dist; s16 pitch, yaw, posYaw; struct Object *o = gCutsceneFocus; @@ -8409,11 +8409,11 @@ BAD_RETURN(s32) cutscene_red_coin_star_warp(struct Camera *c) { /** * Zoom out while looking at the star. */ -BAD_RETURN(s32) cutscene_red_coin_star_set_fov(UNUSED struct Camera *c) { +void cutscene_red_coin_star_set_fov(UNUSED struct Camera *c) { sFOVState.fov = 60.f; } -BAD_RETURN(s32) cutscene_red_coin_star(struct Camera *c) { +void cutscene_red_coin_star(struct Camera *c) { sStatusFlags |= CAM_FLAG_SMOOTH_MOVEMENT; cutscene_event(cutscene_red_coin_star_start, c, 0, 0); cutscene_event(cutscene_red_coin_star_warp, c, 30, 30); @@ -8431,7 +8431,7 @@ BAD_RETURN(s32) cutscene_red_coin_star(struct Camera *c) { /** * End the red coin star spawning cutscene */ -BAD_RETURN(s32) cutscene_red_coin_star_end(struct Camera *c) { +void cutscene_red_coin_star_end(struct Camera *c) { retrieve_info_star(c); gCutsceneTimer = CUTSCENE_STOP; c->cutscene = 0; @@ -8507,7 +8507,7 @@ void cutscene_goto_cvar_pos(struct Camera *c, f32 goalDist, s16 goalPitch, s16 r /** * Store the camera's pos and focus, and copy the cannon's position to cvars. */ -BAD_RETURN(s32) cutscene_prepare_cannon_start(struct Camera *c) { +void cutscene_prepare_cannon_start(struct Camera *c) { store_info_cannon(c); vec3f_copy(sCutsceneVars[0].point, c->focus); sCutsceneVars[2].point[0] = 30.f; @@ -8519,7 +8519,7 @@ BAD_RETURN(s32) cutscene_prepare_cannon_start(struct Camera *c) { /** * Fly towards the cannon door. */ -BAD_RETURN(s32) cutscene_prepare_cannon_fly_to_cannon(struct Camera *c) { +void cutscene_prepare_cannon_fly_to_cannon(struct Camera *c) { cutscene_goto_cvar_pos(c, 300.f, 0x2000, 0, sCutsceneVars[5].angle[1]); camera_approach_s16_symmetric_bool(&sCutsceneVars[5].angle[1], 0x400, 17); set_handheld_shake(HAND_CAM_SHAKE_CUTSCENE); @@ -8536,7 +8536,7 @@ void cannon_approach_prev(f32 *value, f32 target) { /** * Fly or warp back to the previous pos and focus, stored in sCameraStoreCutscene. */ -BAD_RETURN(s32) cutscene_prepare_cannon_fly_back(struct Camera *c) { +void cutscene_prepare_cannon_fly_back(struct Camera *c) { f32 distToPrevPos = calc_abs_dist(c->pos, sCameraStoreCutscene.pos); if (distToPrevPos < 8000.f) { @@ -8560,7 +8560,7 @@ BAD_RETURN(s32) cutscene_prepare_cannon_fly_back(struct Camera *c) { /** * Cutscene that plays when the cannon is opened. */ -BAD_RETURN(s32) cutscene_prepare_cannon(struct Camera *c) { +void cutscene_prepare_cannon(struct Camera *c) { sStatusFlags |= CAM_FLAG_SMOOTH_MOVEMENT; cutscene_event(cutscene_prepare_cannon_start, c, 0, 0); cutscene_event(cutscene_prepare_cannon_fly_to_cannon, c, 0, 140); @@ -8570,7 +8570,7 @@ BAD_RETURN(s32) cutscene_prepare_cannon(struct Camera *c) { /** * Stop the cannon opening cutscene. */ -BAD_RETURN(s32) cutscene_prepare_cannon_end(struct Camera *c) { +void cutscene_prepare_cannon_end(struct Camera *c) { gCutsceneTimer = CUTSCENE_STOP; c->cutscene = 0; retrieve_info_cannon(c); @@ -8598,7 +8598,7 @@ void death_goto_mario(struct Camera *c) { cutscene_goto_cvar_pos(c, 400.f, 0x1000, 0x300, 0); } -BAD_RETURN(s32) cutscene_death_standing_start(struct Camera *c) { +void cutscene_death_standing_start(struct Camera *c) { vec3f_copy(sCutsceneVars[0].point, c->focus); vec3f_copy(sCutsceneVars[3].point, sMarioCamState->pos); sCutsceneVars[3].point[1] += 70.f; @@ -8607,7 +8607,7 @@ BAD_RETURN(s32) cutscene_death_standing_start(struct Camera *c) { /** * Fly to Mario and turn on handheld shake. */ -BAD_RETURN(s32) cutscene_death_standing_goto_mario(struct Camera *c) { +void cutscene_death_standing_goto_mario(struct Camera *c) { death_goto_mario(c); set_handheld_shake(HAND_CAM_SHAKE_HIGH); } @@ -8615,20 +8615,20 @@ BAD_RETURN(s32) cutscene_death_standing_goto_mario(struct Camera *c) { /** * Cutscene that plays when Mario dies while standing. */ -BAD_RETURN(s32) cutscene_death_standing(struct Camera *c) { +void cutscene_death_standing(struct Camera *c) { cutscene_event(cutscene_death_standing_start, c, 0, 0); cutscene_event(cutscene_death_standing_goto_mario, c, 0, -1); sStatusFlags |= CAM_FLAG_SMOOTH_MOVEMENT; } -BAD_RETURN(s32) cutscene_death_stomach_start(struct Camera *c) { +void cutscene_death_stomach_start(struct Camera *c) { Vec3f offset = { 0, 40.f, -60.f }; offset_rotated(sCutsceneVars[3].point, sMarioCamState->pos, offset, sMarioCamState->faceAngle); vec3f_copy(sCutsceneVars[0].point, c->focus); } -BAD_RETURN(s32) cutscene_death_stomach_goto_mario(struct Camera *c) { +void cutscene_death_stomach_goto_mario(struct Camera *c) { cutscene_goto_cvar_pos(c, 400.f, 0x1800, 0, -0x400); } @@ -8642,28 +8642,28 @@ UNUSED static void unused_water_death_move_to_side_of_mario(struct Camera *c) { /** * Cutscene that plays when Mario dies on his stomach. */ -BAD_RETURN(s32) cutscene_death_stomach(struct Camera *c) { +void cutscene_death_stomach(struct Camera *c) { cutscene_event(cutscene_death_stomach_start, c, 0, 0); cutscene_event(cutscene_death_stomach_goto_mario, c, 0, -1); sStatusFlags |= CAM_FLAG_SMOOTH_MOVEMENT; set_handheld_shake(HAND_CAM_SHAKE_CUTSCENE); } -BAD_RETURN(s32) cutscene_bbh_death_start(struct Camera *c) { +void cutscene_bbh_death_start(struct Camera *c) { Vec3f dir = { 0, 40.f, 60.f }; offset_rotated(sCutsceneVars[3].point, sMarioCamState->pos, dir, sMarioCamState->faceAngle); vec3f_copy(sCutsceneVars[0].point, c->focus); } -BAD_RETURN(s32) cutscene_bbh_death_goto_mario(struct Camera *c) { +void cutscene_bbh_death_goto_mario(struct Camera *c) { cutscene_goto_cvar_pos(c, 400.f, 0x1800, 0, 0x400); } /** * Cutscene that plays when Mario dies in BBH. */ -BAD_RETURN(s32) cutscene_bbh_death(struct Camera *c) { +void cutscene_bbh_death(struct Camera *c) { cutscene_event(cutscene_bbh_death_start, c, 0, 0); cutscene_event(cutscene_bbh_death_goto_mario, c, 0, -1); sStatusFlags |= CAM_FLAG_SMOOTH_MOVEMENT; @@ -8673,14 +8673,14 @@ BAD_RETURN(s32) cutscene_bbh_death(struct Camera *c) { /** * Copy the camera's focus to cvar0 */ -BAD_RETURN(s32) cutscene_quicksand_death_start(struct Camera *c) { +void cutscene_quicksand_death_start(struct Camera *c) { vec3f_copy(sCutsceneVars[0].point, c->focus); } /** * Fly closer to Mario. In WATER_DEATH, move to Mario's side. */ -BAD_RETURN(s32) cutscene_quicksand_death_goto_mario(struct Camera *c) { +void cutscene_quicksand_death_goto_mario(struct Camera *c) { cutscene_goto_cvar_pos(c, 400.f, 0x2800, 0x200, 0); if (c->cutscene == CUTSCENE_WATER_DEATH) { @@ -8691,7 +8691,7 @@ BAD_RETURN(s32) cutscene_quicksand_death_goto_mario(struct Camera *c) { /** * Cutscene that plays when Mario dies in quicksand. */ -BAD_RETURN(s32) cutscene_quicksand_death(struct Camera *c) { +void cutscene_quicksand_death(struct Camera *c) { sCutsceneVars[3].point[0] = sMarioCamState->pos[0]; sCutsceneVars[3].point[1] = sMarioCamState->pos[1] + 20.f; sCutsceneVars[3].point[2] = sMarioCamState->pos[2]; @@ -8705,7 +8705,7 @@ BAD_RETURN(s32) cutscene_quicksand_death(struct Camera *c) { /** * Fly away from Mario near the end of the cutscene. */ -BAD_RETURN(s32) cutscene_suffocation_fly_away(UNUSED struct Camera *c) { +void cutscene_suffocation_fly_away(UNUSED struct Camera *c) { Vec3f target; Vec3f offset = { 0, 20.f, 120.f }; @@ -8716,7 +8716,7 @@ BAD_RETURN(s32) cutscene_suffocation_fly_away(UNUSED struct Camera *c) { /** * Keep Lakitu above the gas level. */ -BAD_RETURN(s32) cutscene_suffocation_stay_above_gas(struct Camera *c) { +void cutscene_suffocation_stay_above_gas(struct Camera *c) { UNUSED f32 unused1; f32 gasLevel; UNUSED f32 unused2; @@ -8734,7 +8734,7 @@ BAD_RETURN(s32) cutscene_suffocation_stay_above_gas(struct Camera *c) { /** * Quickly rotate around Mario. */ -BAD_RETURN(s32) cutscene_suffocation_rotate(struct Camera *c) { +void cutscene_suffocation_rotate(struct Camera *c) { f32 dist; s16 pitch, yaw; @@ -8746,7 +8746,7 @@ BAD_RETURN(s32) cutscene_suffocation_rotate(struct Camera *c) { /** * Cutscene that plays when Mario dies from suffocation (ie due to HMC gas). */ -BAD_RETURN(s32) cutscene_suffocation(struct Camera *c) { +void cutscene_suffocation(struct Camera *c) { cutscene_event(cutscene_death_stomach_start, c, 0, 0); cutscene_event(cutscene_suffocation_rotate, c, 0, -1); cutscene_event(cutscene_suffocation_stay_above_gas, c, 0, -1); @@ -8755,7 +8755,7 @@ BAD_RETURN(s32) cutscene_suffocation(struct Camera *c) { set_handheld_shake(HAND_CAM_SHAKE_HIGH); } -BAD_RETURN(s32) cutscene_enter_pool_start(struct Camera *c) { +void cutscene_enter_pool_start(struct Camera *c) { vec3f_copy(sCutsceneVars[3].point, sMarioCamState->pos); if (gCurrLevelNum == LEVEL_CASTLE) { // entering HMC @@ -8768,13 +8768,13 @@ BAD_RETURN(s32) cutscene_enter_pool_start(struct Camera *c) { vec3f_copy(sCutsceneVars[0].point, c->focus); } -BAD_RETURN(s32) cutscene_enter_pool_loop(struct Camera *c) { +void cutscene_enter_pool_loop(struct Camera *c) { UNUSED u32 pad[2]; cutscene_goto_cvar_pos(c, 1200.f, 0x2000, 0x200, 0); } -BAD_RETURN(s32) cutscene_enter_pool(struct Camera *c) { +void cutscene_enter_pool(struct Camera *c) { cutscene_event(cutscene_enter_pool_start, c, 0, 0); cutscene_event(cutscene_enter_pool_loop, c, 0, -1); sStatusFlags |= CAM_FLAG_SMOOTH_MOVEMENT; @@ -8784,7 +8784,7 @@ BAD_RETURN(s32) cutscene_enter_pool(struct Camera *c) { * Store the camera focus in cvar1. * Store the area's center position (which happens to be the pyramid, in SSL) in cvar3. */ -BAD_RETURN(s32) cutscene_pyramid_top_explode_start(struct Camera *c) { +void cutscene_pyramid_top_explode_start(struct Camera *c) { reset_pan_distance(c); store_info_cannon(c); @@ -8795,14 +8795,14 @@ BAD_RETURN(s32) cutscene_pyramid_top_explode_start(struct Camera *c) { /** * Zoom in on the pyramid. */ -BAD_RETURN(s32) cutscene_pyramid_top_explode_zoom_in(UNUSED struct Camera *c) { +void cutscene_pyramid_top_explode_zoom_in(UNUSED struct Camera *c) { set_fov_function(CAM_FOV_APP_30); } /** * Look at the pyramid top. */ -BAD_RETURN(s32) cutscene_pyramid_top_explode_focus(struct Camera *c) { +void cutscene_pyramid_top_explode_focus(struct Camera *c) { approach_vec3f_asymptotic(c->focus, sCutsceneVars[3].point, 0.02f, 0.02f, 0.02f); sStatusFlags |= CAM_FLAG_SMOOTH_MOVEMENT; } @@ -8810,7 +8810,7 @@ BAD_RETURN(s32) cutscene_pyramid_top_explode_focus(struct Camera *c) { /** * Store the old pos and focus, then warp to the pyramid top. */ -BAD_RETURN(s32) cutscene_pyramid_top_explode_warp(struct Camera *c) { +void cutscene_pyramid_top_explode_warp(struct Camera *c) { s16 pitch, yaw; f32 dist; @@ -8829,7 +8829,7 @@ BAD_RETURN(s32) cutscene_pyramid_top_explode_warp(struct Camera *c) { /** * Close up view of the spinning pyramid top as it rises. */ -BAD_RETURN(s32) cutscene_pyramid_top_explode_closeup(struct Camera *c) { +void cutscene_pyramid_top_explode_closeup(struct Camera *c) { s16 pitch, yaw; f32 dist; @@ -8846,14 +8846,14 @@ BAD_RETURN(s32) cutscene_pyramid_top_explode_closeup(struct Camera *c) { /** * Shake the camera during the closeup. */ -BAD_RETURN(s32) cutscene_pyramid_top_explode_cam_shake(UNUSED struct Camera *c) { +void cutscene_pyramid_top_explode_cam_shake(UNUSED struct Camera *c) { set_environmental_camera_shake(SHAKE_ENV_PYRAMID_EXPLODE); } /** * Warp back to the old position, and start a heavy camera shake. */ -BAD_RETURN(s32) cutscene_pyramid_top_explode_warp_back(struct Camera *c) { +void cutscene_pyramid_top_explode_warp_back(struct Camera *c) { UNUSED u32 pad[2]; vec3f_copy(c->pos, sCutsceneVars[4].point); @@ -8864,7 +8864,7 @@ BAD_RETURN(s32) cutscene_pyramid_top_explode_warp_back(struct Camera *c) { /** * An unused cutscene for when the pyramid explodes. */ -BAD_RETURN(s32) cutscene_pyramid_top_explode(struct Camera *c) { +void cutscene_pyramid_top_explode(struct Camera *c) { cutscene_event(cutscene_pyramid_top_explode_start, c, 0, 0); cutscene_event(cutscene_pyramid_top_explode_focus, c, 0, 30); cutscene_event(cutscene_pyramid_top_explode_warp, c, 31, 31); @@ -8877,7 +8877,7 @@ BAD_RETURN(s32) cutscene_pyramid_top_explode(struct Camera *c) { /** * End the pyramid top explosion cutscene. */ -BAD_RETURN(s32) cutscene_pyramid_top_explode_end(struct Camera *c) { +void cutscene_pyramid_top_explode_end(struct Camera *c) { cutscene_stop_dialog(c); stop_cutscene_and_retrieve_stored_info(c); // Move the camera back to Mario @@ -8887,7 +8887,7 @@ BAD_RETURN(s32) cutscene_pyramid_top_explode_end(struct Camera *c) { /** * Store the camera focus in cvar0, and store the top of the pyramid in cvar3. */ -BAD_RETURN(s32) cutscene_enter_pyramid_top_start(struct Camera *c) { +void cutscene_enter_pyramid_top_start(struct Camera *c) { vec3f_copy(sCutsceneVars[0].point, c->focus); vec3f_set(sCutsceneVars[3].point, c->areaCenX, 1280.f, c->areaCenZ); } @@ -8895,7 +8895,7 @@ BAD_RETURN(s32) cutscene_enter_pyramid_top_start(struct Camera *c) { /** * Cutscene that plays when Mario enters the top of the pyramid. */ -BAD_RETURN(s32) cutscene_enter_pyramid_top(struct Camera *c) { +void cutscene_enter_pyramid_top(struct Camera *c) { cutscene_event(cutscene_enter_pyramid_top_start, c, 0, 0); // Move to cvar3 cutscene_goto_cvar_pos(c, 200.f, 0x3000, 0, 0); @@ -8923,7 +8923,7 @@ UNUSED static void unused_cutscene_goto_cvar(struct Camera *c) { * cvar9.point is gCutsceneFocus's position * cvar9.angle[1] is the yaw between Mario and the gCutsceneFocus */ -BAD_RETURN(s32) cutscene_dialog_start(struct Camera *c) { +void cutscene_dialog_start(struct Camera *c) { UNUSED f32 unused1; UNUSED s16 unused2; s16 yaw; @@ -8965,7 +8965,7 @@ BAD_RETURN(s32) cutscene_dialog_start(struct Camera *c) { * Move closer to Mario and the object, adjusting to their difference in height. * The camera's generally ends up looking over Mario's shoulder. */ -BAD_RETURN(s32) cutscene_dialog_move_mario_shoulder(struct Camera *c) { +void cutscene_dialog_move_mario_shoulder(struct Camera *c) { f32 dist; s16 pitch, yaw; Vec3f focus, pos; @@ -8999,7 +8999,7 @@ BAD_RETURN(s32) cutscene_dialog_move_mario_shoulder(struct Camera *c) { /** * Create the dialog with sCutsceneDialogID */ -BAD_RETURN(s32) cutscene_dialog_create_dialog_box(struct Camera *c) { +void cutscene_dialog_create_dialog_box(struct Camera *c) { if (c->cutscene == CUTSCENE_RACE_DIALOG) { create_dialog_box_with_response(sCutsceneDialogID); } else { @@ -9013,7 +9013,7 @@ BAD_RETURN(s32) cutscene_dialog_create_dialog_box(struct Camera *c) { /** * Cutscene that plays when Mario talks to an object. */ -BAD_RETURN(s32) cutscene_dialog(struct Camera *c) { +void cutscene_dialog(struct Camera *c) { cutscene_event(cutscene_dialog_start, c, 0, 0); cutscene_event(cutscene_dialog_move_mario_shoulder, c, 0, -1); cutscene_event(cutscene_dialog_create_dialog_box, c, 10, 10); @@ -9039,14 +9039,14 @@ BAD_RETURN(s32) cutscene_dialog(struct Camera *c) { /** * Sets the CAM_FLAG_UNUSED_CUTSCENE_ACTIVE flag, which does nothing. */ -BAD_RETURN(s32) cutscene_dialog_set_flag(UNUSED struct Camera *c) { +void cutscene_dialog_set_flag(UNUSED struct Camera *c) { sStatusFlags |= CAM_FLAG_UNUSED_CUTSCENE_ACTIVE; } /** * Ends the dialog cutscene. */ -BAD_RETURN(s32) cutscene_dialog_end(struct Camera *c) { +void cutscene_dialog_end(struct Camera *c) { sStatusFlags |= CAM_FLAG_UNUSED_CUTSCENE_ACTIVE; c->cutscene = 0; clear_time_stop_flags(TIME_STOP_ENABLED | TIME_STOP_DIALOG); @@ -9057,7 +9057,7 @@ BAD_RETURN(s32) cutscene_dialog_end(struct Camera *c) { * * In this cutscene, cvar0.angle[0] is used as a state variable. */ -BAD_RETURN(s32) cutscene_read_message_start(struct Camera *c) { +void cutscene_read_message_start(struct Camera *c) { cutscene_soften_music(c); transition_next_state(c, 30); reset_pan_distance(c); @@ -9081,7 +9081,7 @@ UNUSED static void unused_cam_to_mario(struct Camera *c) { /** * Cutscene that plays when Mario is reading a message (a sign or message on the wall) */ -BAD_RETURN(s32) cutscene_read_message(struct Camera *c) { +void cutscene_read_message(struct Camera *c) { UNUSED u32 pad[2]; cutscene_event(cutscene_read_message_start, c, 0, 0); @@ -9120,14 +9120,14 @@ BAD_RETURN(s32) cutscene_read_message(struct Camera *c) { /** * Set CAM_FLAG_UNUSED_CUTSCENE_ACTIVE, which does nothing. */ -BAD_RETURN(s32) cutscene_read_message_set_flag(UNUSED struct Camera *c) { +void cutscene_read_message_set_flag(UNUSED struct Camera *c) { sStatusFlags |= CAM_FLAG_UNUSED_CUTSCENE_ACTIVE; } /** * End the message cutscene. */ -BAD_RETURN(s32) cutscene_read_message_end(struct Camera *c) { +void cutscene_read_message_end(struct Camera *c) { sStatusFlags |= CAM_FLAG_UNUSED_CUTSCENE_ACTIVE; c->cutscene = 0; } @@ -9138,7 +9138,7 @@ BAD_RETURN(s32) cutscene_read_message_end(struct Camera *c) { * cvar6 is the focus offset * cvar5 is the position offset */ -BAD_RETURN(s32) cutscene_exit_succ_start(UNUSED struct Camera *c) { +void cutscene_exit_succ_start(UNUSED struct Camera *c) { vec3f_copy(sCutsceneVars[7].point, sMarioCamState->pos); vec3s_copy(sCutsceneVars[7].angle, sMarioCamState->faceAngle); vec3f_set(sCutsceneVars[6].point, 6.f, 363.f, 543.f); @@ -9148,7 +9148,7 @@ BAD_RETURN(s32) cutscene_exit_succ_start(UNUSED struct Camera *c) { /** * Set the camera pos depending on which level Mario exited. */ -BAD_RETURN(s32) cutscene_non_painting_set_cam_pos(struct Camera *c) { +void cutscene_non_painting_set_cam_pos(struct Camera *c) { UNUSED u32 unused1; struct Surface *floor; UNUSED Vec3f unused2; @@ -9180,7 +9180,7 @@ BAD_RETURN(s32) cutscene_non_painting_set_cam_pos(struct Camera *c) { /** * Update the camera focus depending on which level Mario exited. */ -BAD_RETURN(s32) cutscene_non_painting_set_cam_focus(struct Camera *c) { +void cutscene_non_painting_set_cam_focus(struct Camera *c) { offset_rotated(c->focus, sCutsceneVars[7].point, sCutsceneVars[6].point, sCutsceneVars[7].angle); if ((gPrevLevel == LEVEL_COTMC) || (gPrevLevel == LEVEL_HMC) || (gPrevLevel == LEVEL_RR) @@ -9196,7 +9196,7 @@ BAD_RETURN(s32) cutscene_non_painting_set_cam_focus(struct Camera *c) { /** * Focus slightly left of Mario. Perhaps to keep the bowser painting in view? */ -BAD_RETURN(s32) cutscene_exit_bowser_succ_focus_left(UNUSED struct Camera *c) { +void cutscene_exit_bowser_succ_focus_left(UNUSED struct Camera *c) { approach_f32_asymptotic_bool(&sCutsceneVars[6].point[0], -24.f, 0.05f); } @@ -9204,7 +9204,7 @@ BAD_RETURN(s32) cutscene_exit_bowser_succ_focus_left(UNUSED struct Camera *c) { * Instead of focusing on the key, just start a pitch shake. Clever! * The shake lasts 32 frames. */ -BAD_RETURN(s32) cutscene_exit_bowser_key_toss_shake(struct Camera *c) { +void cutscene_exit_bowser_key_toss_shake(struct Camera *c) { //! Unnecessary check. if (c->cutscene == CUTSCENE_EXIT_BOWSER_SUCC) { set_camera_pitch_shake(0x800, 0x40, 0x800); @@ -9214,14 +9214,14 @@ BAD_RETURN(s32) cutscene_exit_bowser_key_toss_shake(struct Camera *c) { /** * Start a camera shake when Mario lands on the ground. */ -BAD_RETURN(s32) cutscene_exit_succ_shake_landing(UNUSED struct Camera *c) { +void cutscene_exit_succ_shake_landing(UNUSED struct Camera *c) { set_environmental_camera_shake(SHAKE_ENV_EXPLOSION); } /** * Cutscene that plays when Mario beats bowser and exits the level. */ -BAD_RETURN(s32) cutscene_exit_bowser_succ(struct Camera *c) { +void cutscene_exit_bowser_succ(struct Camera *c) { cutscene_event(cutscene_exit_succ_start, c, 0, 0); cutscene_event(cutscene_non_painting_set_cam_pos, c, 0, -1); cutscene_event(cutscene_exit_bowser_succ_focus_left, c, 18, -1); @@ -9233,7 +9233,7 @@ BAD_RETURN(s32) cutscene_exit_bowser_succ(struct Camera *c) { /** * End a non-painting exit cutscene. Used by BBH and bowser courses. */ -BAD_RETURN(s32) cutscene_non_painting_end(struct Camera *c) { +void cutscene_non_painting_end(struct Camera *c) { c->cutscene = 0; if (c->defMode == CAMERA_MODE_CLOSE) { @@ -9251,14 +9251,14 @@ BAD_RETURN(s32) cutscene_non_painting_end(struct Camera *c) { /** * Override the position offset. */ -BAD_RETURN(s32) cutscene_exit_non_painting_succ_override_cvar(UNUSED struct Camera *c) { +void cutscene_exit_non_painting_succ_override_cvar(UNUSED struct Camera *c) { vec3f_set(sCutsceneVars[5].point, 137.f, 246.f, 1115.f); } /** * Cutscene that plays when Mario collects a star and leaves a non-painting course, like HMC or BBH. */ -BAD_RETURN(s32) cutscene_exit_non_painting_succ(struct Camera *c) { +void cutscene_exit_non_painting_succ(struct Camera *c) { cutscene_event(cutscene_exit_succ_start, c, 0, 0); cutscene_event(cutscene_exit_non_painting_succ_override_cvar, c, 0, 0); cutscene_event(cutscene_non_painting_set_cam_pos, c, 0, -1); @@ -9273,7 +9273,7 @@ BAD_RETURN(s32) cutscene_exit_non_painting_succ(struct Camera *c) { * Set cvar6 to the focus offset from Mario. * set cvar5 to the pos offset from Mario. (This is always overwritten) */ -BAD_RETURN(s32) cutscene_non_painting_death_start(UNUSED struct Camera *c) { +void cutscene_non_painting_death_start(UNUSED struct Camera *c) { vec3f_copy(sCutsceneVars[7].point, sMarioCamState->pos); vec3s_copy(sCutsceneVars[7].angle, sMarioCamState->faceAngle); vec3f_set(sCutsceneVars[6].point, -42.f, 350.f, 727.f); @@ -9289,7 +9289,7 @@ BAD_RETURN(s32) cutscene_non_painting_death_start(UNUSED struct Camera *c) { * This cutscene is unused, dying in bowser's arena spawns Mario near the warp pipe, not back in the * hub. */ -BAD_RETURN(s32) cutscene_exit_bowser_death(struct Camera *c) { +void cutscene_exit_bowser_death(struct Camera *c) { cutscene_event(cutscene_non_painting_death_start, c, 0, 0); cutscene_event(cutscene_non_painting_set_cam_pos, c, 0, -1); cutscene_event(cutscene_non_painting_set_cam_focus, c, 0, -1); @@ -9299,7 +9299,7 @@ BAD_RETURN(s32) cutscene_exit_bowser_death(struct Camera *c) { * Set the offset from Mario depending on the course Mario exited. * This overrides cutscene_non_painting_death_start() */ -BAD_RETURN(s32) cutscene_non_painting_death_override_offset(UNUSED struct Camera *c) { +void cutscene_non_painting_death_override_offset(UNUSED struct Camera *c) { switch (gPrevLevel) { case LEVEL_HMC: vec3f_set(sCutsceneVars[5].point, 187.f, 369.f, -197.f); @@ -9316,7 +9316,7 @@ BAD_RETURN(s32) cutscene_non_painting_death_override_offset(UNUSED struct Camera /** * Cutscene played when Mario dies in a non-painting course, like HMC or BBH. */ -BAD_RETURN(s32) cutscene_non_painting_death(struct Camera *c) { +void cutscene_non_painting_death(struct Camera *c) { cutscene_event(cutscene_non_painting_death_start, c, 0, 0); cutscene_event(cutscene_non_painting_death_override_offset, c, 0, 0); cutscene_event(cutscene_non_painting_set_cam_pos, c, 0, -1); @@ -9332,7 +9332,7 @@ BAD_RETURN(s32) cutscene_non_painting_death(struct Camera *c) { * between that yaw and Mario's faceAngle plus 0x1200. The reason for taking the high byte is * because cvar1 rotates until is reaches 0, so it's important that it's a multiple of 0x100. */ -BAD_RETURN(s32) cutscene_cap_switch_press_start(struct Camera *c) { +void cutscene_cap_switch_press_start(struct Camera *c) { UNUSED s16 unused1; s16 yaw; UNUSED u32 pad[2]; @@ -9348,7 +9348,7 @@ BAD_RETURN(s32) cutscene_cap_switch_press_start(struct Camera *c) { * Rotate around Mario. As each cvar stops updating, the rotation slows until the camera ends up in * front of Mario. */ -BAD_RETURN(s32) cutscene_cap_switch_press_rotate_around_mario(struct Camera *c) { +void cutscene_cap_switch_press_rotate_around_mario(struct Camera *c) { f32 dist; s16 pitch, yaw; UNUSED s16 unusedYaw = sMarioCamState->faceAngle[1] + 0x1000; @@ -9374,14 +9374,14 @@ BAD_RETURN(s32) cutscene_cap_switch_press_rotate_around_mario(struct Camera *c) /** * Move the camera slightly downwards. */ -BAD_RETURN(s32) cutscene_cap_switch_press_lower_cam(struct Camera *c) { +void cutscene_cap_switch_press_lower_cam(struct Camera *c) { rotate_and_move_vec3f(c->pos, sMarioCamState->pos, 0, -0x20, 0); } /** * Move the camera closer to Mario. */ -BAD_RETURN(s32) cutscene_cap_switch_press_approach_mario(struct Camera *c) { +void cutscene_cap_switch_press_approach_mario(struct Camera *c) { s16 pitch, yaw; f32 dist; @@ -9398,7 +9398,7 @@ BAD_RETURN(s32) cutscene_cap_switch_press_approach_mario(struct Camera *c) { /** * Pan the camera left so that Mario is on the right side of the screen when the camera stops spinning. */ -BAD_RETURN(s32) cutscene_cap_switch_press_pan_left(struct Camera *c) { +void cutscene_cap_switch_press_pan_left(struct Camera *c) { vec3f_copy(c->focus, sMarioCamState->pos); c->focus[1] += 110.f; camera_approach_s16_symmetric_bool(&sCutsceneVars[0].angle[1], 0x800, 0x20); @@ -9408,11 +9408,11 @@ BAD_RETURN(s32) cutscene_cap_switch_press_pan_left(struct Camera *c) { /** * Create a dialog box with the cap switch's text. */ -BAD_RETURN(s32) cutscene_cap_switch_press_create_dialog(UNUSED struct Camera *c) { +void cutscene_cap_switch_press_create_dialog(UNUSED struct Camera *c) { create_dialog_box_with_response(gCutsceneFocus->oBehParams2ndByte + DIALOG_010); } -static UNUSED BAD_RETURN(s32) unused_cap_switch_retrieve_info(struct Camera *c) { +static UNUSED void unused_cap_switch_retrieve_info(struct Camera *c) { retrieve_info_star(c); transition_next_state(c, 30); } @@ -9420,7 +9420,7 @@ static UNUSED BAD_RETURN(s32) unused_cap_switch_retrieve_info(struct Camera *c) /** * Cutscene that plays when Mario presses a cap switch. */ -BAD_RETURN(s32) cutscene_cap_switch_press(struct Camera *c) { +void cutscene_cap_switch_press(struct Camera *c) { f32 dist; s16 pitch, yaw; @@ -9456,7 +9456,7 @@ BAD_RETURN(s32) cutscene_cap_switch_press(struct Camera *c) { * cvar2 is the goal position * cvar3 is the goal focus */ -BAD_RETURN(s32) cutscene_unlock_key_door_start(struct Camera *c) { +void cutscene_unlock_key_door_start(struct Camera *c) { Vec3f posOff, focusOff; vec3f_copy(sCutsceneVars[0].point, c->pos); @@ -9471,7 +9471,7 @@ BAD_RETURN(s32) cutscene_unlock_key_door_start(struct Camera *c) { * Move the camera to the cvars position and focus, closer to Mario. * Gives a better view of the key. */ -BAD_RETURN(s32) cutscene_unlock_key_door_approach_mario(struct Camera *c) { +void cutscene_unlock_key_door_approach_mario(struct Camera *c) { approach_vec3f_asymptotic(c->pos, sCutsceneVars[2].point, 0.1f, 0.1f, 0.1f); approach_vec3f_asymptotic(c->focus, sCutsceneVars[3].point, 0.1f, 0.1f, 0.1f); } @@ -9479,17 +9479,17 @@ BAD_RETURN(s32) cutscene_unlock_key_door_approach_mario(struct Camera *c) { /** * Move the camera focus up a bit, focusing on the key in the lock. */ -BAD_RETURN(s32) cutscene_unlock_key_door_focus_lock(UNUSED struct Camera *c) { +void cutscene_unlock_key_door_focus_lock(UNUSED struct Camera *c) { approach_f32_asymptotic_bool(&sCutsceneVars[3].point[1], sMarioCamState->pos[1] + 140.f, 0.07f); } -BAD_RETURN(s32) cutscene_unlock_key_door_stub(UNUSED struct Camera *c) { +void cutscene_unlock_key_door_stub(UNUSED struct Camera *c) { } /** * Move back to the previous pos and focus, stored in cvar0 and cvar1. */ -BAD_RETURN(s32) cutscene_unlock_key_door_fly_back(struct Camera *c) { +void cutscene_unlock_key_door_fly_back(struct Camera *c) { approach_vec3f_asymptotic(c->pos, sCutsceneVars[0].point, 0.1f, 0.1f, 0.1f); approach_vec3f_asymptotic(c->focus, sCutsceneVars[1].point, 0.1f, 0.1f, 0.1f); } @@ -9497,14 +9497,14 @@ BAD_RETURN(s32) cutscene_unlock_key_door_fly_back(struct Camera *c) { /** * Shake the camera's fov when the key is put in the lock. */ -BAD_RETURN(s32) cutscene_unlock_key_door_fov_shake(UNUSED struct Camera *c) { +void cutscene_unlock_key_door_fov_shake(UNUSED struct Camera *c) { cutscene_set_fov_shake_preset(1); } /** * Cutscene that plays when Mario unlocks a key door. */ -BAD_RETURN(s32) cutscene_unlock_key_door(UNUSED struct Camera *c) { +void cutscene_unlock_key_door(UNUSED struct Camera *c) { cutscene_event(cutscene_unlock_key_door_start, c, 0, 0); cutscene_event(cutscene_unlock_key_door_approach_mario, c, 0, 123); cutscene_event(cutscene_unlock_key_door_fly_back, c, 124, -1); @@ -9547,12 +9547,12 @@ s32 intro_peach_move_camera_start_to_pipe(struct Camera *c, struct CutsceneSplin /** * Create a dialog box with the letter text */ -BAD_RETURN(s32) peach_letter_text(UNUSED struct Camera *c) { +void peach_letter_text(UNUSED struct Camera *c) { create_dialog_box(DIALOG_020); } #ifndef VERSION_JP -BAD_RETURN(s32) play_sound_peach_reading_letter(UNUSED struct Camera *c) { +void play_sound_peach_reading_letter(UNUSED struct Camera *c) { play_sound(SOUND_PEACH_DEAR_MARIO, gGlobalSoundSource); } #endif @@ -9561,7 +9561,7 @@ BAD_RETURN(s32) play_sound_peach_reading_letter(UNUSED struct Camera *c) { * Move the camera from peach reading the letter all the way to Mario's warp pipe. Follow the * sIntroStartToPipe splines. */ -BAD_RETURN(s32) cutscene_intro_peach_start_to_pipe_spline(struct Camera *c) { +void cutscene_intro_peach_start_to_pipe_spline(struct Camera *c) { if (intro_peach_move_camera_start_to_pipe(c, sIntroStartToPipePosition, sIntroStartToPipeFocus) != 0) { gCameraMovementFlags &= ~CAM_MOVE_C_UP_MODE; gCutsceneTimer = CUTSCENE_LOOP; @@ -9571,7 +9571,7 @@ BAD_RETURN(s32) cutscene_intro_peach_start_to_pipe_spline(struct Camera *c) { /** * Loop the cutscene until Mario exits the dialog. */ -BAD_RETURN(s32) cutscene_intro_peach_dialog(struct Camera *c) { +void cutscene_intro_peach_dialog(struct Camera *c) { if (get_dialog_id() == DIALOG_NONE) { vec3f_copy(gLakituState.goalPos, c->pos); vec3f_copy(gLakituState.goalFocus, c->focus); @@ -9581,19 +9581,19 @@ BAD_RETURN(s32) cutscene_intro_peach_dialog(struct Camera *c) { } } -BAD_RETURN(s32) cutscene_intro_peach_follow_pipe_spline(struct Camera *c) { +void cutscene_intro_peach_follow_pipe_spline(struct Camera *c) { move_point_along_spline(c->pos, sIntroPipeToDialogPosition, &sCutsceneSplineSegment, &sCutsceneSplineSegmentProgress); move_point_along_spline(c->focus, sIntroPipeToDialogFocus, &sCutsceneSplineSegment, &sCutsceneSplineSegmentProgress); } -BAD_RETURN(s32) cutscene_intro_peach_clear_cutscene_status(UNUSED struct Camera *c) { +void cutscene_intro_peach_clear_cutscene_status(UNUSED struct Camera *c) { sMarioCamState->cameraEvent = 0; } /** * Set fov to 8 degrees, then zoom out to 30. */ -BAD_RETURN(s32) cutscene_intro_peach_zoom_fov(UNUSED struct Camera *c) { +void cutscene_intro_peach_zoom_fov(UNUSED struct Camera *c) { sFOVState.fov = 8.f; set_fov_function(CAM_FOV_ZOOM_30); } @@ -9601,7 +9601,7 @@ BAD_RETURN(s32) cutscene_intro_peach_zoom_fov(UNUSED struct Camera *c) { /** * Reset the spline progress, turn on handheld shake. */ -BAD_RETURN(s32) cutscene_intro_peach_reset_spline(UNUSED struct Camera *c) { +void cutscene_intro_peach_reset_spline(UNUSED struct Camera *c) { sCutsceneSplineSegment = 0; sCutsceneSplineSegmentProgress = 0.1f; //! @bug since this event is only called for one frame, this handheld shake is turned off on the @@ -9613,16 +9613,16 @@ BAD_RETURN(s32) cutscene_intro_peach_reset_spline(UNUSED struct Camera *c) { * Turn off handheld shake. This was likely written before handheld shake was changed to turn off every * frame, as it's the only instance of HAND_CAM_SHAKE_OFF. */ -BAD_RETURN(s32) cutscene_intro_peach_handheld_shake_off(UNUSED struct Camera *c) { +void cutscene_intro_peach_handheld_shake_off(UNUSED struct Camera *c) { set_handheld_shake(HAND_CAM_SHAKE_OFF); } -BAD_RETURN(s32) intro_pipe_exit_text(UNUSED struct Camera *c) { +void intro_pipe_exit_text(UNUSED struct Camera *c) { create_dialog_box(DIALOG_033); } #ifndef VERSION_JP -BAD_RETURN(s32) play_sound_intro_turn_on_hud(UNUSED struct Camera *c) { +void play_sound_intro_turn_on_hud(UNUSED struct Camera *c) { play_sound_rbutton_changed(); } #endif @@ -9630,7 +9630,7 @@ BAD_RETURN(s32) play_sound_intro_turn_on_hud(UNUSED struct Camera *c) { /** * Fly to the pipe. Near the end, the camera jumps to Lakitu's position and the hud turns on. */ -BAD_RETURN(s32) cutscene_intro_peach_fly_to_pipe(struct Camera *c) { +void cutscene_intro_peach_fly_to_pipe(struct Camera *c) { cutscene_event(play_sound_intro_turn_on_hud, c, 818, 818); cutscene_spawn_obj(6, 1); cutscene_event(cutscene_intro_peach_start_flying_music, c, 0, 0); @@ -9643,7 +9643,7 @@ BAD_RETURN(s32) cutscene_intro_peach_fly_to_pipe(struct Camera *c) { /** * Lakitu flies around the warp pipe, then Mario jumps out. */ -BAD_RETURN(s32) cutscene_intro_peach_mario_appears(struct Camera *c) { +void cutscene_intro_peach_mario_appears(struct Camera *c) { UNUSED u32 pad[2]; sMarioCamState->cameraEvent = 0; @@ -9666,14 +9666,14 @@ BAD_RETURN(s32) cutscene_intro_peach_mario_appears(struct Camera *c) { /** * Reset the fov. This gives the effect of peach zooming out as she fades. */ -BAD_RETURN(s32) cutscene_intro_peach_reset_fov(UNUSED struct Camera *c) { +void cutscene_intro_peach_reset_fov(UNUSED struct Camera *c) { set_fov_function(CAM_FOV_DEFAULT); } /** * Peach reads the letter to Mario. */ -BAD_RETURN(s32) cutscene_intro_peach_letter(struct Camera *c) { +void cutscene_intro_peach_letter(struct Camera *c) { cutscene_spawn_obj(5, 0); cutscene_event(cutscene_intro_peach_zoom_fov, c, 0, 0); cutscene_event(cutscene_intro_peach_start_letter_music, c, 65, 65); @@ -9694,7 +9694,7 @@ BAD_RETURN(s32) cutscene_intro_peach_letter(struct Camera *c) { /** * Reset the spline progress. */ -BAD_RETURN(s32) cutscene_end_waving_start(UNUSED struct Camera *c) { +void cutscene_end_waving_start(UNUSED struct Camera *c) { cutscene_reset_spline(); } @@ -9741,7 +9741,7 @@ struct CutsceneSplinePoint gEndWavingFocus[] = { { 0, 0, { -156, 1718, 5086 } }, { 0, 0, { -156, 1718, 5086 } }, { 0, 0, { -156, 1718, 5086 } } }; -BAD_RETURN(s32) cutscene_end_waving(struct Camera *c) { +void cutscene_end_waving(struct Camera *c) { cutscene_event(cutscene_end_waving_start, c, 0, 0); move_point_along_spline(c->pos, gEndWavingPos, &sCutsceneSplineSegment, &sCutsceneSplineSegmentProgress); move_point_along_spline(c->focus, gEndWavingFocus, &sCutsceneSplineSegment, &sCutsceneSplineSegmentProgress); @@ -9751,7 +9751,7 @@ BAD_RETURN(s32) cutscene_end_waving(struct Camera *c) { /** * Called on the first frame of the credits. Resets the spline progress. */ -BAD_RETURN(s32) cutscene_credits_reset_spline(UNUSED struct Camera *c) { +void cutscene_credits_reset_spline(UNUSED struct Camera *c) { cutscene_reset_spline(); } @@ -9799,7 +9799,7 @@ extern struct CutsceneSplinePoint sCcmOutsideCreditsSplineFocus[]; /** * Follow splines through the courses of the game. */ -BAD_RETURN(s32) cutscene_credits(struct Camera *c) { +void cutscene_credits(struct Camera *c) { struct CutsceneSplinePoint *focus, *pos; cutscene_event(cutscene_credits_reset_spline, c, 0, 0); @@ -9908,7 +9908,7 @@ BAD_RETURN(s32) cutscene_credits(struct Camera *c) { /** * Set the camera pos relative to Mario. */ -BAD_RETURN(s32) cutscene_sliding_doors_open_start(struct Camera *c) { +void cutscene_sliding_doors_open_start(struct Camera *c) { f32 dist; s16 pitch, yaw; @@ -9929,7 +9929,7 @@ BAD_RETURN(s32) cutscene_sliding_doors_open_start(struct Camera *c) { * cvar0.angle: Mario's angle * cvar0.point: offset from Mario */ -BAD_RETURN(s32) cutscene_sliding_doors_open_set_cvars(UNUSED struct Camera *c) { +void cutscene_sliding_doors_open_set_cvars(UNUSED struct Camera *c) { vec3f_copy(sCutsceneVars[1].point, sMarioCamState->pos); vec3s_copy(sCutsceneVars[0].angle, sMarioCamState->faceAngle); vec3f_set(sCutsceneVars[0].point, 80.f, 325.f, 200.f); @@ -9939,21 +9939,21 @@ BAD_RETURN(s32) cutscene_sliding_doors_open_set_cvars(UNUSED struct Camera *c) { * Decrease the cvar0 y offset to 75, which would simulate Lakitu flying under the doorway. * However, the initial y offset is too high for Lakitu to reach 75 in time. */ -BAD_RETURN(s32) cutscene_sliding_doors_go_under_doorway(UNUSED struct Camera *c) { +void cutscene_sliding_doors_go_under_doorway(UNUSED struct Camera *c) { camera_approach_f32_symmetric_bool(&sCutsceneVars[0].point[1], 75.f, 10.f); } /** * Approach a y offset of 125 again. */ -BAD_RETURN(s32) cutscene_sliding_doors_fly_back_up(UNUSED struct Camera *c) { +void cutscene_sliding_doors_fly_back_up(UNUSED struct Camera *c) { camera_approach_f32_symmetric_bool(&sCutsceneVars[0].point[1], 125.f, 10.f); } /** * Follow Mario through the door, by approaching cvar1.point. */ -BAD_RETURN(s32) cutscene_sliding_doors_follow_mario(struct Camera *c) { +void cutscene_sliding_doors_follow_mario(struct Camera *c) { Vec3f pos; UNUSED u32 pad[5]; @@ -9980,7 +9980,7 @@ BAD_RETURN(s32) cutscene_sliding_doors_follow_mario(struct Camera *c) { * Plays when Mario opens the sliding doors. * Note: the star door unlocking event is not a cutscene, it's handled by Mario separately. */ -BAD_RETURN(s32) cutscene_sliding_doors_open(struct Camera *c) { +void cutscene_sliding_doors_open(struct Camera *c) { UNUSED u32 pad[2]; reset_pan_distance(c); @@ -9994,20 +9994,20 @@ BAD_RETURN(s32) cutscene_sliding_doors_open(struct Camera *c) { /** * Ends the double door cutscene. */ -BAD_RETURN(s32) cutscene_double_doors_end(struct Camera *c) { +void cutscene_double_doors_end(struct Camera *c) { set_flag_post_door(c); c->cutscene = 0; sStatusFlags |= CAM_FLAG_SMOOTH_MOVEMENT; } -BAD_RETURN(s32) cutscene_enter_painting_stub(UNUSED struct Camera *c) { +void cutscene_enter_painting_stub(UNUSED struct Camera *c) { } /** * Plays when Mario enters a painting. The camera flies up to the painting's center, then it slowly * zooms in until the star select screen appears. */ -BAD_RETURN(s32) cutscene_enter_painting(struct Camera *c) { +void cutscene_enter_painting(struct Camera *c) { struct Surface *floor, *highFloor; Vec3f paintingPos, focus, focusOffset; Vec3s paintingAngle; @@ -10067,7 +10067,7 @@ BAD_RETURN(s32) cutscene_enter_painting(struct Camera *c) { * cvar1 is the camera's position relative to Mario * cvar2 is the camera's focus relative to Mario */ -BAD_RETURN(s32) cutscene_exit_painting_start(struct Camera *c) { +void cutscene_exit_painting_start(struct Camera *c) { struct Surface *floor; f32 floorHeight; @@ -10096,7 +10096,7 @@ BAD_RETURN(s32) cutscene_exit_painting_start(struct Camera *c) { /** * Decrease cvar2's x and z offset, moving closer to Mario. */ -BAD_RETURN(s32) cutscene_exit_painting_move_to_mario(struct Camera *c) { +void cutscene_exit_painting_move_to_mario(struct Camera *c) { Vec3f pos; //! Tricky math: Since offset_rotated() flips Z offsets, you'd expect a positive Z offset to move @@ -10115,7 +10115,7 @@ BAD_RETURN(s32) cutscene_exit_painting_move_to_mario(struct Camera *c) { /** * Move the camera down to the floor Mario lands on. */ -BAD_RETURN(s32) cutscene_exit_painting_move_to_floor(struct Camera *c) { +void cutscene_exit_painting_move_to_floor(struct Camera *c) { struct Surface *floor; Vec3f floorHeight; @@ -10135,7 +10135,7 @@ BAD_RETURN(s32) cutscene_exit_painting_move_to_floor(struct Camera *c) { /** * Cutscene played when Mario leaves a painting, either due to death or collecting a star. */ -BAD_RETURN(s32) cutscene_exit_painting(struct Camera *c) { +void cutscene_exit_painting(struct Camera *c) { cutscene_event(cutscene_exit_painting_start, c, 0, 0); cutscene_event(cutscene_exit_painting_move_to_mario, c, 5, -1); cutscene_event(cutscene_exit_painting_move_to_floor, c, 5, -1); @@ -10151,7 +10151,7 @@ BAD_RETURN(s32) cutscene_exit_painting(struct Camera *c) { /** * Unused. Warp the camera to Mario. */ -BAD_RETURN(s32) cutscene_unused_exit_start(struct Camera *c) { +void cutscene_unused_exit_start(struct Camera *c) { UNUSED Vec3f unused1; UNUSED Vec3s unused2; Vec3f offset; @@ -10166,7 +10166,7 @@ BAD_RETURN(s32) cutscene_unused_exit_start(struct Camera *c) { /** * Unused. Focus on Mario as he exits. */ -BAD_RETURN(s32) cutscene_unused_exit_focus_mario(struct Camera *c) { +void cutscene_unused_exit_focus_mario(struct Camera *c) { Vec3f focus; vec3f_set(focus, sMarioCamState->pos[0], sMarioCamState->pos[1] + 125.f, sMarioCamState->pos[2]); @@ -10178,7 +10178,7 @@ BAD_RETURN(s32) cutscene_unused_exit_focus_mario(struct Camera *c) { /** * Give control back to the player. */ -BAD_RETURN(s32) cutscene_exit_painting_end(struct Camera *c) { +void cutscene_exit_painting_end(struct Camera *c) { c->mode = CAMERA_MODE_CLOSE; c->cutscene = 0; gCutsceneTimer = CUTSCENE_STOP; @@ -10190,7 +10190,7 @@ BAD_RETURN(s32) cutscene_exit_painting_end(struct Camera *c) { /** * End the cutscene, starting cannon mode. */ -BAD_RETURN(s32) cutscene_enter_cannon_end(struct Camera *c) { +void cutscene_enter_cannon_end(struct Camera *c) { sStatusFlags &= ~CAM_FLAG_SMOOTH_MOVEMENT; sStatusFlags |= CAM_FLAG_BLOCK_SMOOTH_MOVEMENT; c->mode = CAMERA_MODE_INSIDE_CANNON; @@ -10201,7 +10201,7 @@ BAD_RETURN(s32) cutscene_enter_cannon_end(struct Camera *c) { /** * Rotate around the cannon as it rises out of the hole. */ -BAD_RETURN(s32) cutscene_enter_cannon_raise(struct Camera *c) { +void cutscene_enter_cannon_raise(struct Camera *c) { struct Object *o; UNUSED u32 pad[2]; f32 floorHeight; @@ -10246,7 +10246,7 @@ BAD_RETURN(s32) cutscene_enter_cannon_raise(struct Camera *c) { /** * Start the cannon entering cutscene */ -BAD_RETURN(s32) cutscene_enter_cannon_start(struct Camera *c) { +void cutscene_enter_cannon_start(struct Camera *c) { UNUSED u32 cvar3Start; UNUSED u32 cvar4Start; struct Object *o; @@ -10275,7 +10275,7 @@ BAD_RETURN(s32) cutscene_enter_cannon_start(struct Camera *c) { /** * Store the camera's pos and focus for the door cutscene */ -BAD_RETURN(s32) cutscene_door_start(struct Camera *c) { +void cutscene_door_start(struct Camera *c) { vec3f_copy(sCutsceneVars[0].point, c->pos); vec3f_copy(sCutsceneVars[1].point, c->focus); } @@ -10283,7 +10283,7 @@ BAD_RETURN(s32) cutscene_door_start(struct Camera *c) { /** * Fix the camera in place while the door opens. */ -BAD_RETURN(s32) cutscene_door_fix_cam(struct Camera *c) { +void cutscene_door_fix_cam(struct Camera *c) { vec3f_copy(c->pos, sCutsceneVars[0].point); vec3f_copy(c->focus, sCutsceneVars[1].point); } @@ -10291,7 +10291,7 @@ BAD_RETURN(s32) cutscene_door_fix_cam(struct Camera *c) { /** * Loop until Mario is no longer using the door. */ -BAD_RETURN(s32) cutscene_door_loop(struct Camera *c) { +void cutscene_door_loop(struct Camera *c) { //! bitwise AND instead of boolean if ((sMarioCamState->action != ACT_PULLING_DOOR) & (sMarioCamState->action != ACT_PUSHING_DOOR)) { gCutsceneTimer = CUTSCENE_STOP; @@ -10302,7 +10302,7 @@ BAD_RETURN(s32) cutscene_door_loop(struct Camera *c) { /** * Warp the camera behind Mario. */ -BAD_RETURN(s32) cutscene_door_move_behind_mario(struct Camera *c) { +void cutscene_door_move_behind_mario(struct Camera *c) { Vec3f camOffset; s16 doorRotation; @@ -10324,7 +10324,7 @@ BAD_RETURN(s32) cutscene_door_move_behind_mario(struct Camera *c) { /** * Follow Mario through the door. */ -BAD_RETURN(s32) cutscene_door_follow_mario(struct Camera *c) { +void cutscene_door_follow_mario(struct Camera *c) { s16 pitch, yaw; f32 dist; @@ -10338,7 +10338,7 @@ BAD_RETURN(s32) cutscene_door_follow_mario(struct Camera *c) { /** * Ends the door cutscene. Sets the camera mode to close mode unless the default is free roam. */ -BAD_RETURN(s32) cutscene_door_end(struct Camera *c) { +void cutscene_door_end(struct Camera *c) { if (c->defMode == CAMERA_MODE_FREE_ROAM) { c->mode = CAMERA_MODE_FREE_ROAM; } else { @@ -10356,7 +10356,7 @@ BAD_RETURN(s32) cutscene_door_end(struct Camera *c) { /** * Used for entering a room that uses a specific camera mode, like the castle lobby or BBH */ -BAD_RETURN(s32) cutscene_door_mode(struct Camera *c) { +void cutscene_door_mode(struct Camera *c) { UNUSED u32 pad[2]; reset_pan_distance(c); diff --git a/src/game/camera.h b/src/game/camera.h index aac94161..4ce0da7a 100644 --- a/src/game/camera.h +++ b/src/game/camera.h @@ -346,7 +346,7 @@ struct HandheldShakePoint * A function that is called by CameraTriggers and cutscene shots. * These are concurrent: multiple CameraEvents can occur on the same frame. */ -typedef BAD_RETURN(s32) (*CameraEvent)(struct Camera *c); +typedef void (*CameraEvent)(struct Camera *c); /** * The same type as a CameraEvent, but because these are generally longer, and happen in sequential * order, they're are called "shots," a term taken from cinematography. diff --git a/src/game/mario_actions_submerged.c b/src/game/mario_actions_submerged.c index 84c2df9a..fd9cdea3 100644 --- a/src/game/mario_actions_submerged.c +++ b/src/game/mario_actions_submerged.c @@ -196,7 +196,7 @@ static u32 perform_water_step(struct MarioState *m) { return stepResult; } -static BAD_RETURN(u32) update_water_pitch(struct MarioState *m) { +static void update_water_pitch(struct MarioState *m) { struct Object *marioObj = m->marioObj; if (marioObj->header.gfx.angle[0] > 0) { diff --git a/src/game/mario_step.h b/src/game/mario_step.h index c723c048..5cfcb1a4 100644 --- a/src/game/mario_step.h +++ b/src/game/mario_step.h @@ -22,7 +22,7 @@ void stub_mario_step_2(void); void mario_bonk_reflection(struct MarioState *, u32); void transfer_bully_speed(struct BullyCollisionData *obj1, struct BullyCollisionData *obj2); -BAD_RETURN(s32) init_bully_collision_data(struct BullyCollisionData *data, f32 posX, f32 posZ, +void init_bully_collision_data(struct BullyCollisionData *data, f32 posX, f32 posZ, f32 forwardVel, s16 yaw, f32 conversionRatio, f32 radius); u32 mario_update_quicksand(struct MarioState *, f32); u32 mario_push_off_steep_floor(struct MarioState *, u32, u32); diff --git a/src/game/obj_behaviors_2.c b/src/game/obj_behaviors_2.c index d17a3790..747de21b 100644 --- a/src/game/obj_behaviors_2.c +++ b/src/game/obj_behaviors_2.c @@ -126,7 +126,7 @@ static s32 obj_is_near_to_and_facing_mario(f32 maxDist, s16 maxAngleDiff) { //! Although having no return value, this function //! must be u32 to match other functions on -O2. -static BAD_RETURN(u32) obj_perform_position_op(s32 op) { +static void obj_perform_position_op(s32 op) { switch (op) { case POS_OP_SAVE_POSITION: sObjSavedPosX = o->oPosX; diff --git a/src/game/object_helpers.h b/src/game/object_helpers.h index ea4200ad..5bb46567 100644 --- a/src/game/object_helpers.h +++ b/src/game/object_helpers.h @@ -135,8 +135,8 @@ s32 count_objects_with_behavior(const BehaviorScript *behavior); struct Object *cur_obj_find_nearby_held_actor(const BehaviorScript *behavior, f32 maxDist); void cur_obj_change_action(s32 action); void cur_obj_set_vel_from_mario_vel(f32 f12,f32 f14); -BAD_RETURN(s16) cur_obj_reverse_animation(void); -BAD_RETURN(s32) cur_obj_extend_animation_if_at_end(void); +void cur_obj_reverse_animation(void); +void cur_obj_extend_animation_if_at_end(void); s32 cur_obj_check_if_near_animation_end(void); s32 cur_obj_check_if_at_animation_end(void); s32 cur_obj_check_anim_frame(s32 frame); diff --git a/src/game/save_file.c b/src/game/save_file.c index 525682de..dde6eedf 100644 --- a/src/game/save_file.c +++ b/src/game/save_file.c @@ -337,7 +337,7 @@ void save_file_erase(s32 fileIndex) { } //! Needs to be s32 to match on -O2, despite no return value. -BAD_RETURN(s32) save_file_copy(s32 srcFileIndex, s32 destFileIndex) { +void save_file_copy(s32 srcFileIndex, s32 destFileIndex) { UNUSED s32 pad; touch_high_score_ages(destFileIndex); diff --git a/src/game/save_file.h b/src/game/save_file.h index 64cf0c63..46f3cc9d 100644 --- a/src/game/save_file.h +++ b/src/game/save_file.h @@ -154,7 +154,7 @@ extern s8 gSaveFileModified; void save_file_do_save(s32 fileIndex); void save_file_erase(s32 fileIndex); -BAD_RETURN(s32) save_file_copy(s32 srcFileIndex, s32 destFileIndex); +void save_file_copy(s32 srcFileIndex, s32 destFileIndex); void save_file_load_all(void); void save_file_reload(void); void save_file_collect_star_or_key(s16 coinScore, s16 starIndex);