Some more cleanup

This commit is contained in:
Arceveti
2021-09-27 13:35:55 -07:00
parent 6155b6416a
commit ea0fd25a73
60 changed files with 731 additions and 1011 deletions

View File

@@ -182,7 +182,6 @@ index 7d9b5b4a..c7bb81b9 100755
BUILD_DIR/asm/decompress.o(.text); BUILD_DIR/asm/decompress.o(.text);
+ BUILD_DIR/asm/crash.o(.text); + BUILD_DIR/asm/crash.o(.text);
BUILD_DIR/src/game/camera.o(.text); BUILD_DIR/src/game/camera.o(.text);
BUILD_DIR/src/game/debug_course.o(.text);
BUILD_DIR/src/game/object_list_processor.o(.text); BUILD_DIR/src/game/object_list_processor.o(.text);
diff --git a/src/game/crash.c b/src/game/crash.c diff --git a/src/game/crash.c b/src/game/crash.c
new file mode 100644 new file mode 100644

View File

@@ -258,7 +258,7 @@ index 00000000..f432927c
+ dl_ia_text_end); // Reset back to default render settings. + dl_ia_text_end); // Reset back to default render settings.
+ gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); + gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW);
+ } else { + } else {
+ gDelayForErrorMessage += 1; + gDelayForErrorMessage++;
+ } + }
+ } + }
+ +

View File

@@ -394,14 +394,14 @@ index 6cbfd8e1..01dd4de8 100644
+ +
+ if (gPlayer1Controller->buttonPressed & R_JPAD) { + if (gPlayer1Controller->buttonPressed & R_JPAD) {
+ if (gCameraSpeed < 4) { + if (gCameraSpeed < 4) {
+ gCameraSpeed += 1; + gCameraSpeed++;
+ } else { + } else {
+ gCameraSpeed = 0; + gCameraSpeed = 0;
+ } + }
+ save_file_set_camera_speed(gCameraSpeed); + save_file_set_camera_speed(gCameraSpeed);
+ } else if (gPlayer1Controller->buttonPressed & L_JPAD) { + } else if (gPlayer1Controller->buttonPressed & L_JPAD) {
+ if (gCameraSpeed > 0) { + if (gCameraSpeed > 0) {
+ gCameraSpeed -= 1; + gCameraSpeed--;
+ } else { + } else {
+ gCameraSpeed = 4; + gCameraSpeed = 4;
+ } + }

View File

@@ -511,7 +511,7 @@ s32 adsr_update(struct AdsrState *adsr) {
} }
case ADSR_STATE_SUSTAIN: case ADSR_STATE_SUSTAIN:
adsr->delay -= 1; adsr->delay--;
if (adsr->delay == 0) { if (adsr->delay == 0) {
adsr->state = ADSR_STATE_RELEASE; adsr->state = ADSR_STATE_RELEASE;
} }

View File

@@ -1281,9 +1281,6 @@ static u8 get_sound_reverb(UNUSED u8 bank, UNUSED u8 soundIndex, u8 channelIndex
return reverb; return reverb;
} }
static void noop_8031EEC8(void) {
}
/** /**
* Called from the game loop thread to inform the audio thread that a new game * Called from the game loop thread to inform the audio thread that a new game
* frame has started. * frame has started.
@@ -1295,7 +1292,6 @@ void audio_signal_game_loop_tick(void) {
#if defined(VERSION_EU) || defined(VERSION_SH) #if defined(VERSION_EU) || defined(VERSION_SH)
maybe_tick_game_sound(); maybe_tick_game_sound();
#endif #endif
noop_8031EEC8();
} }
/** /**

View File

@@ -1488,7 +1488,7 @@ void func_sh_802f5310(s32 bankId, struct AudioBank *mem, struct PatchStruct *pat
if (D_SH_8034F68C != 0 && sp4C == 0) { if (D_SH_8034F68C != 0 && sp4C == 0) {
temp_s0 = D_SH_8034EC88[D_SH_8034F68C - 1].sample; temp_s0 = D_SH_8034EC88[D_SH_8034F68C - 1].sample;
temp = (temp_s0->size >> 12); temp = (temp_s0->size >> 12);
temp += 1; temp++;
count = (uintptr_t) temp_s0->sampleAddr; count = (uintptr_t) temp_s0->sampleAddr;
func_sh_802f4cb4( func_sh_802f4cb4(
count, count,
@@ -1540,7 +1540,7 @@ next:
sampleAddr = sample->sampleAddr; sampleAddr = sample->sampleAddr;
size = sample->size; size = sample->size;
unk = size >> 0xC; unk = size >> 0xC;
unk += 1; unk++;
added = ((sampleAddr + size) + sample->medium); added = ((sampleAddr + size) + sample->medium);
if (added != D_SH_8034EC88[D_SH_8034F68C - 1].endAndMediumIdentification) { if (added != D_SH_8034EC88[D_SH_8034F68C - 1].endAndMediumIdentification) {
D_SH_8034EC88[D_SH_8034F68C - 1].isFree = TRUE; D_SH_8034EC88[D_SH_8034F68C - 1].isFree = TRUE;

View File

@@ -173,7 +173,7 @@ static s32 lower_cell_index(s32 coord) {
//! Some wall checks are larger than the buffer, meaning wall checks can //! Some wall checks are larger than the buffer, meaning wall checks can
// miss walls that are near a cell border. // miss walls that are near a cell border.
if (coord % CELL_SIZE < 50) { if (coord % CELL_SIZE < 50) {
index -= 1; index--;
} }
if (index < 0) { if (index < 0) {
@@ -205,7 +205,7 @@ static s32 upper_cell_index(s32 coord) {
//! Some wall checks are larger than the buffer, meaning wall checks can //! Some wall checks are larger than the buffer, meaning wall checks can
// miss walls that are near a cell border. // miss walls that are near a cell border.
if (coord % CELL_SIZE > CELL_SIZE - 50) { if (coord % CELL_SIZE > CELL_SIZE - 50) {
index += 1; index++;
} }
if (index > NUM_CELLS_INDEX) { if (index > NUM_CELLS_INDEX) {
@@ -372,12 +372,12 @@ static void load_static_surfaces(TerrainData **data, TerrainData *vertexData, s3
s32 flags = surf_has_no_cam_collision(surfaceType); s32 flags = surf_has_no_cam_collision(surfaceType);
numSurfaces = *(*data); numSurfaces = *(*data);
*data += 1; (*data)++;
for (i = 0; i < numSurfaces; i++) { for (i = 0; i < numSurfaces; i++) {
if (*surfaceRooms != NULL) { if (*surfaceRooms != NULL) {
room = *(*surfaceRooms); room = *(*surfaceRooms);
*surfaceRooms += 1; (*surfaceRooms)++;
} }
surface = read_surface_data(vertexData, data); surface = read_surface_data(vertexData, data);
@@ -404,7 +404,7 @@ static void load_static_surfaces(TerrainData **data, TerrainData *vertexData, s3
#else #else
*data += 3; *data += 3;
if (hasForce) { if (hasForce) {
*data += 1; (*data)++;
} }
#endif #endif
} }

View File

@@ -76,7 +76,7 @@ void bhv_activated_back_and_forth_platform_update(void) {
// and one more frame of "lag" after it finally reaches 0 here, // and one more frame of "lag" after it finally reaches 0 here,
// Mario actually has to wait 22 frames before the platform starts moving. // Mario actually has to wait 22 frames before the platform starts moving.
if (o->oActivatedBackAndForthPlatformCountdown != 0) { if (o->oActivatedBackAndForthPlatformCountdown != 0) {
o->oActivatedBackAndForthPlatformCountdown -= 1; o->oActivatedBackAndForthPlatformCountdown--;
} else { } else {
// After the wait period is over, we start moving, by adding the velocity // After the wait period is over, we start moving, by adding the velocity
// to the positional offset. // to the positional offset.

View File

@@ -63,7 +63,7 @@ void bhv_animates_on_floor_switch_press_loop(void) {
} }
if (o->oFloorSwitchPressAnimationDoubleFrame < 9) { if (o->oFloorSwitchPressAnimationDoubleFrame < 9) {
o->oFloorSwitchPressAnimationDoubleFrame += 1; o->oFloorSwitchPressAnimationDoubleFrame++;
} }
} else if ((o->oFloorSwitchPressAnimationDoubleFrame -= 2) < 0) { } else if ((o->oFloorSwitchPressAnimationDoubleFrame -= 2) < 0) {
o->oFloorSwitchPressAnimationDoubleFrame = 0; o->oFloorSwitchPressAnimationDoubleFrame = 0;

View File

@@ -36,7 +36,7 @@ void bubba_act_0(void) {
} else if (o->oTimer > 30 && o->oDistanceToMario < 2000.0f) { } else if (o->oTimer > 30 && o->oDistanceToMario < 2000.0f) {
o->oAction = 1; o->oAction = 1;
} else if (o->oBubbaRandomTimer != 0) { } else if (o->oBubbaRandomTimer != 0) {
o->oBubbaRandomTimer -= 1; o->oBubbaRandomTimer--;
} else { } else {
o->oBubbaTargetYaw = obj_random_fixed_turn(0x2000); o->oBubbaTargetYaw = obj_random_fixed_turn(0x2000);
o->oBubbaRandomTimer = random_linear_offset(100, 100); o->oBubbaRandomTimer = random_linear_offset(100, 100);

View File

@@ -190,7 +190,7 @@ static void chain_chomp_sub_act_turn(void) {
o->oChainChompTargetPitch = obj_get_pitch_from_vel(); o->oChainChompTargetPitch = obj_get_pitch_from_vel();
} }
} else { } else {
o->oTimer -= 1; o->oTimer--;
} }
} else { } else {
o->oForwardVel = 0.0f; o->oForwardVel = 0.0f;
@@ -276,7 +276,7 @@ static void chain_chomp_released_lunge_around(void) {
if (o->oChainChompNumLunges == 0) { if (o->oChainChompNumLunges == 0) {
if (cur_obj_rotate_yaw_toward(o->oAngleToMario, 0x320)) { if (cur_obj_rotate_yaw_toward(o->oAngleToMario, 0x320)) {
if (o->oTimer > 60) { if (o->oTimer > 60) {
o->oChainChompNumLunges += 1; o->oChainChompNumLunges++;
// enable wall collision // enable wall collision
o->oWallHitboxRadius = 200.0f; o->oWallHitboxRadius = 200.0f;
} }

View File

@@ -24,7 +24,7 @@ void clam_act_0(void) {
cur_obj_play_sound_2(SOUND_GENERAL_CLAM_SHELL2); cur_obj_play_sound_2(SOUND_GENERAL_CLAM_SHELL2);
o->oAction = 1; o->oAction = 1;
} else if (o->oClamShakeTimer != 0) { } else if (o->oClamShakeTimer != 0) {
o->oClamShakeTimer -= 1; o->oClamShakeTimer--;
cur_obj_shake_y(3.0f); cur_obj_shake_y(3.0f);
} }
} }

View File

@@ -49,7 +49,7 @@ void bhv_coffin_spawner_loop(void) {
} }
} }
o->oAction += 1; o->oAction++;
} }
} else if (o->activeFlags & ACTIVE_FLAG_IN_DIFFERENT_ROOM) { } else if (o->activeFlags & ACTIVE_FLAG_IN_DIFFERENT_ROOM) {
o->oAction = COFFIN_SPAWNER_ACT_COFFINS_UNLOADED; o->oAction = COFFIN_SPAWNER_ACT_COFFINS_UNLOADED;

View File

@@ -9,7 +9,7 @@ void bhv_end_birds_1_loop(void) {
gCurrentObject->oIntroLakituEndBirds1DestX = -554.f; gCurrentObject->oIntroLakituEndBirds1DestX = -554.f;
gCurrentObject->oIntroLakituEndBirds1DestY = 3044.f; gCurrentObject->oIntroLakituEndBirds1DestY = 3044.f;
gCurrentObject->oIntroLakituEndBirds1DestZ = -1314.f; gCurrentObject->oIntroLakituEndBirds1DestZ = -1314.f;
gCurrentObject->oAction += 1; gCurrentObject->oAction = 1;
break; break;
case 1: case 1:
vec3f_set(pos, gCurrentObject->oIntroLakituEndBirds1DestX, gCurrentObject->oIntroLakituEndBirds1DestY, vec3f_set(pos, gCurrentObject->oIntroLakituEndBirds1DestX, gCurrentObject->oIntroLakituEndBirds1DestY,

View File

@@ -10,7 +10,7 @@ void bhv_end_birds_2_loop(void) {
switch (gCurrentObject->oAction) { switch (gCurrentObject->oAction) {
case 0: case 0:
cur_obj_scale(0.7f); cur_obj_scale(0.7f);
gCurrentObject->oAction += 1; gCurrentObject->oAction = 1;
break; break;
case 1: case 1:
vec3f_get_dist_and_angle(gCamera->pos, gCamera->focus, &dist, &pitch, &yaw); vec3f_get_dist_and_angle(gCamera->pos, gCamera->focus, &dist, &pitch, &yaw);

View File

@@ -77,7 +77,7 @@ static void enemy_lakitu_update_speed_and_angle(void) {
// Turn toward mario except right after throwing a spiny // Turn toward mario except right after throwing a spiny
if (o->oEnemyLakituFaceForwardCountdown != 0) { if (o->oEnemyLakituFaceForwardCountdown != 0) {
o->oEnemyLakituFaceForwardCountdown -= 1; o->oEnemyLakituFaceForwardCountdown--;
} else { } else {
obj_face_yaw_approach(o->oAngleToMario, 0x600); obj_face_yaw_approach(o->oAngleToMario, 0x600);
} }
@@ -96,7 +96,7 @@ static void enemy_lakitu_sub_act_no_spiny(void) {
cur_obj_init_animation_with_sound(1); cur_obj_init_animation_with_sound(1);
if (o->oEnemyLakituSpinyCooldown != 0) { if (o->oEnemyLakituSpinyCooldown != 0) {
o->oEnemyLakituSpinyCooldown -= 1; o->oEnemyLakituSpinyCooldown--;
} else if (o->oEnemyLakituNumSpinies < 3 && o->oDistanceToMario < 800.0f } else if (o->oEnemyLakituNumSpinies < 3 && o->oDistanceToMario < 800.0f
&& abs_angle_diff(o->oAngleToMario, o->oFaceAngleYaw) < 0x4000) { && abs_angle_diff(o->oAngleToMario, o->oFaceAngleYaw) < 0x4000) {
struct Object *spiny = spawn_object(o, MODEL_SPINY_BALL, bhvSpiny); struct Object *spiny = spawn_object(o, MODEL_SPINY_BALL, bhvSpiny);
@@ -105,7 +105,7 @@ static void enemy_lakitu_sub_act_no_spiny(void) {
spiny->oAction = SPINY_ACT_HELD_BY_LAKITU; spiny->oAction = SPINY_ACT_HELD_BY_LAKITU;
obj_init_animation_with_sound(spiny, spiny_egg_seg5_anims_050157E4, 0); obj_init_animation_with_sound(spiny, spiny_egg_seg5_anims_050157E4, 0);
o->oEnemyLakituNumSpinies += 1; o->oEnemyLakituNumSpinies++;
o->oSubAction = ENEMY_LAKITU_SUB_ACT_HOLD_SPINY; o->oSubAction = ENEMY_LAKITU_SUB_ACT_HOLD_SPINY;
o->oEnemyLakituSpinyCooldown = 30; o->oEnemyLakituSpinyCooldown = 30;
} }
@@ -120,7 +120,7 @@ static void enemy_lakitu_sub_act_hold_spiny(void) {
cur_obj_init_anim_extend(3); cur_obj_init_anim_extend(3);
if (o->oEnemyLakituSpinyCooldown != 0) { if (o->oEnemyLakituSpinyCooldown != 0) {
o->oEnemyLakituSpinyCooldown -= 1; o->oEnemyLakituSpinyCooldown--;
} }
// TODO: Check if anything interesting happens if we bypass this with speed // TODO: Check if anything interesting happens if we bypass this with speed
else if (o->oDistanceToMario > o->oDrawingDistance - 100.0f else if (o->oDistanceToMario > o->oDrawingDistance - 100.0f

View File

@@ -44,7 +44,7 @@ static void eyerok_boss_act_wake_up(void) {
if (o->oTimer > 5) { if (o->oTimer > 5) {
if (o->oSubAction == 0) { if (o->oSubAction == 0) {
seq_player_lower_volume(SEQ_PLAYER_LEVEL, 60, 40); seq_player_lower_volume(SEQ_PLAYER_LEVEL, 60, 40);
o->oSubAction += 1; o->oSubAction++;
} }
if (o->oEyerokBossOffsetFromHome == 0.0f && mario_ready_to_speak() != 0) { if (o->oEyerokBossOffsetFromHome == 0.0f && mario_ready_to_speak() != 0) {
@@ -79,18 +79,18 @@ static void eyerok_boss_act_fight(void) {
o->oEyerokBossAttackCountdown = 1; o->oEyerokBossAttackCountdown = 1;
} }
} else { } else {
o->oEyerokBossAttackCountdown -= 1; o->oEyerokBossAttackCountdown--;
} }
if (o->oEyerokBossAttackCountdown != 0 && o->oEyerokBossAttackCountdown != 1) { if (o->oEyerokBossAttackCountdown != 0 && o->oEyerokBossAttackCountdown != 1) {
o->oEyerokBossAttackPhase += 1; o->oEyerokBossAttackPhase++;
if ((o->oEyerokBossActiveHand = o->oEyerokBossAttackPhase & 0x1) == 0) { if ((o->oEyerokBossActiveHand = o->oEyerokBossAttackPhase & 0x1) == 0) {
o->oEyerokBossActiveHand = -1; o->oEyerokBossActiveHand = -1;
} }
} }
} }
} else { } else {
o->oEyerokBossAttackPhase += 1; o->oEyerokBossAttackPhase++;
if (eyerok_check_mario_relative_z(400)) { if (eyerok_check_mario_relative_z(400)) {
o->oEyerokBossAttackCountdown = -8; o->oEyerokBossAttackCountdown = -8;
@@ -120,7 +120,7 @@ static void eyerok_boss_act_die(void) {
if (cur_obj_update_dialog_with_cutscene(MARIO_DIALOG_LOOK_UP, DIALOG_FLAG_NONE, CUTSCENE_DIALOG, DIALOG_118)) { if (cur_obj_update_dialog_with_cutscene(MARIO_DIALOG_LOOK_UP, DIALOG_FLAG_NONE, CUTSCENE_DIALOG, DIALOG_118)) {
spawn_default_star(0.0f, -900.0f, -3700.0f); spawn_default_star(0.0f, -900.0f, -3700.0f);
} else { } else {
o->oTimer -= 1; o->oTimer--;
} }
} else if (o->oTimer > 120) { } else if (o->oTimer > 120) {
stop_background_music(SEQUENCE_ARGS(4, SEQ_EVENT_BOSS)); stop_background_music(SEQUENCE_ARGS(4, SEQ_EVENT_BOSS));
@@ -156,7 +156,7 @@ static s32 eyerok_hand_check_attacked(void) {
o->oAction = EYEROK_HAND_ACT_ATTACKED; o->oAction = EYEROK_HAND_ACT_ATTACKED;
o->oVelY = 30.0f; o->oVelY = 30.0f;
} else { } else {
o->parentObj->oEyerokBossNumHands -= 1; o->parentObj->oEyerokBossNumHands--;
o->oAction = EYEROK_HAND_ACT_DIE; o->oAction = EYEROK_HAND_ACT_DIE;
o->oVelY = 50.0f; o->oVelY = 50.0f;
} }
@@ -183,7 +183,7 @@ static void eyerok_hand_act_sleep(void) {
if (o->parentObj->oAction != EYEROK_BOSS_ACT_SLEEP if (o->parentObj->oAction != EYEROK_BOSS_ACT_SLEEP
&& ++o->oEyerokHandWakeUpTimer > -3 * o->oBehParams2ndByte) { && ++o->oEyerokHandWakeUpTimer > -3 * o->oBehParams2ndByte) {
if (cur_obj_check_if_near_animation_end()) { if (cur_obj_check_if_near_animation_end()) {
o->parentObj->oEyerokBossNumHands += 1; o->parentObj->oEyerokBossNumHands++;
o->oAction = EYEROK_HAND_ACT_IDLE; o->oAction = EYEROK_HAND_ACT_IDLE;
o->collisionData = segmented_to_virtual(&ssl_seg7_collision_07028274); o->collisionData = segmented_to_virtual(&ssl_seg7_collision_07028274);
} else { } else {
@@ -268,14 +268,14 @@ static void eyerok_hand_act_show_eye(void) {
if (!eyerok_hand_check_attacked()) { if (!eyerok_hand_check_attacked()) {
if (o->parentObj->oEyerokBossActiveHand == 0) { if (o->parentObj->oEyerokBossActiveHand == 0) {
if (o->oAnimState < 3) { if (o->oAnimState < 3) {
o->oAnimState += 1; o->oAnimState++;
} else if (cur_obj_check_if_near_animation_end()) { } else if (cur_obj_check_if_near_animation_end()) {
o->oAction = EYEROK_HAND_ACT_CLOSE; o->oAction = EYEROK_HAND_ACT_CLOSE;
} }
} else { } else {
if (o->oEyerokHandEyeShownTimer--) { if (o->oEyerokHandEyeShownTimer--) {
if (o->oEyerokHandAnimStateIndex != 0) { if (o->oEyerokHandAnimStateIndex != 0) {
o->oEyerokHandAnimStateIndex -= 1; o->oEyerokHandAnimStateIndex--;
} }
o->oAnimState = sEyerokAnimStatesList[o->oEyerokHandAnimStateIndex]; o->oAnimState = sEyerokAnimStatesList[o->oEyerokHandAnimStateIndex];
} else { } else {

View File

@@ -56,7 +56,7 @@ static void fire_piranha_plant_act_hide(void) {
0.04f * o->oFirePiranhaPlantNeutralScale)) { 0.04f * o->oFirePiranhaPlantNeutralScale)) {
cur_obj_become_intangible(); cur_obj_become_intangible();
if (o->oFirePiranhaPlantActive) { if (o->oFirePiranhaPlantActive) {
sNumActiveFirePiranhaPlants -= 1; sNumActiveFirePiranhaPlants--;
o->oFirePiranhaPlantActive = FALSE; o->oFirePiranhaPlantActive = FALSE;
if ((u16)(o->oBehParams >> 16) != 0 && o->oHealth == 0) { if ((u16)(o->oBehParams >> 16) != 0 && o->oHealth == 0) {
@@ -72,7 +72,7 @@ static void fire_piranha_plant_act_hide(void) {
cur_obj_play_sound_2(SOUND_OBJ_PIRANHA_PLANT_APPEAR); cur_obj_play_sound_2(SOUND_OBJ_PIRANHA_PLANT_APPEAR);
o->oFirePiranhaPlantActive = TRUE; o->oFirePiranhaPlantActive = TRUE;
sNumActiveFirePiranhaPlants += 1; sNumActiveFirePiranhaPlants++;
cur_obj_unhide(); cur_obj_unhide();
o->oAction = FIRE_PIRANHA_PLANT_ACT_GROW; o->oAction = FIRE_PIRANHA_PLANT_ACT_GROW;
@@ -127,7 +127,7 @@ void bhv_fire_piranha_plant_update(void) {
if (obj_check_attacks(&sFirePiranhaPlantHitbox, o->oAction)) { if (obj_check_attacks(&sFirePiranhaPlantHitbox, o->oAction)) {
if (--o->oHealth < 0) { if (--o->oHealth < 0) {
if (o->oFirePiranhaPlantActive) { if (o->oFirePiranhaPlantActive) {
sNumActiveFirePiranhaPlants -= 1; sNumActiveFirePiranhaPlants--;
} }
} else { } else {
cur_obj_init_animation_with_sound(2); cur_obj_init_animation_with_sound(2);

View File

@@ -45,7 +45,7 @@ static void fly_guy_act_idle(void) {
o->oAction = FLY_GUY_ACT_APPROACH_MARIO; o->oAction = FLY_GUY_ACT_APPROACH_MARIO;
} else { } else {
o->oFlyGuyUnusedJitter = o->oMoveAngleYaw + sFlyGuyJitterAmounts[o->oFlyGuyIdleTimer]; o->oFlyGuyUnusedJitter = o->oMoveAngleYaw + sFlyGuyJitterAmounts[o->oFlyGuyIdleTimer];
o->oFlyGuyIdleTimer += 1; o->oFlyGuyIdleTimer++;
} }
} }
} }
@@ -190,7 +190,7 @@ void bhv_fly_guy_update(void) {
} }
// Oscillate up and down // Oscillate up and down
o->oFlyGuyOscTimer += 1; o->oFlyGuyOscTimer++;
o->oPosY += coss(0x400 * o->oFlyGuyOscTimer) * 1.5f; o->oPosY += coss(0x400 * o->oFlyGuyOscTimer) * 1.5f;
switch (o->oAction) { switch (o->oAction) {

View File

@@ -270,7 +270,7 @@ void bhv_book_switch_loop(void) {
if (o->oAction != 0) { if (o->oAction != 0) {
if (o->parentObj->oBookSwitchManagerNumCorrectChoices == o->oBehParams2ndByte) { if (o->parentObj->oBookSwitchManagerNumCorrectChoices == o->oBehParams2ndByte) {
play_sound(SOUND_GENERAL2_RIGHT_ANSWER, gGlobalSoundSource); play_sound(SOUND_GENERAL2_RIGHT_ANSWER, gGlobalSoundSource);
o->parentObj->oBookSwitchManagerNumCorrectChoices += 1; o->parentObj->oBookSwitchManagerNumCorrectChoices++;
} else { } else {
rand01 = random_u16() & 0x1; rand01 = random_u16() & 0x1;
z = gMarioObject->oPosZ + 1.5f * gMarioStates[0].vel[2]; z = gMarioObject->oPosZ + 1.5f * gMarioStates[0].vel[2];

Some files were not shown because too many files have changed in this diff Show More