Merge pull request #68 from Reonu/revert_plus_plus
Revert "Some more cleanup"
This commit is contained in:
56 files changed
+193
-155
No files matched your search
@@ -258,7 +258,7 @@ index 00000000..f432927c
|
||||
+ dl_ia_text_end); // Reset back to default render settings.
|
||||
+ gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW);
|
||||
+ } else {
|
||||
+ gDelayForErrorMessage++;
|
||||
+ gDelayForErrorMessage += 1;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
|
||||
@@ -394,14 +394,14 @@ index 6cbfd8e1..01dd4de8 100644
|
||||
+
|
||||
+ if (gPlayer1Controller->buttonPressed & R_JPAD) {
|
||||
+ if (gCameraSpeed < 4) {
|
||||
+ gCameraSpeed++;
|
||||
+ gCameraSpeed += 1;
|
||||
+ } else {
|
||||
+ gCameraSpeed = 0;
|
||||
+ }
|
||||
+ save_file_set_camera_speed(gCameraSpeed);
|
||||
+ } else if (gPlayer1Controller->buttonPressed & L_JPAD) {
|
||||
+ if (gCameraSpeed > 0) {
|
||||
+ gCameraSpeed--;
|
||||
+ gCameraSpeed -= 1;
|
||||
+ } else {
|
||||
+ gCameraSpeed = 4;
|
||||
+ }
|
||||
|
||||
+1
-1
@@ -511,7 +511,7 @@ s32 adsr_update(struct AdsrState *adsr) {
|
||||
}
|
||||
|
||||
case ADSR_STATE_SUSTAIN:
|
||||
adsr->delay--;
|
||||
adsr->delay -= 1;
|
||||
if (adsr->delay == 0) {
|
||||
adsr->state = ADSR_STATE_RELEASE;
|
||||
}
|
||||
|
||||
@@ -1274,6 +1274,9 @@ static u8 get_sound_reverb(UNUSED u8 bank, UNUSED u8 soundIndex, u8 channelIndex
|
||||
return reverb;
|
||||
}
|
||||
|
||||
static void noop_8031EEC8(void) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Called from the game loop thread to inform the audio thread that a new game
|
||||
* frame has started.
|
||||
@@ -1285,6 +1288,7 @@ void audio_signal_game_loop_tick(void) {
|
||||
#if defined(VERSION_EU) || defined(VERSION_SH)
|
||||
maybe_tick_game_sound();
|
||||
#endif
|
||||
noop_8031EEC8();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+2
-2
@@ -1488,7 +1488,7 @@ void func_sh_802f5310(s32 bankId, struct AudioBank *mem, struct PatchStruct *pat
|
||||
if (D_SH_8034F68C != 0 && sp4C == 0) {
|
||||
temp_s0 = D_SH_8034EC88[D_SH_8034F68C - 1].sample;
|
||||
temp = (temp_s0->size >> 12);
|
||||
temp++;
|
||||
temp += 1;
|
||||
count = (uintptr_t) temp_s0->sampleAddr;
|
||||
func_sh_802f4cb4(
|
||||
count,
|
||||
@@ -1540,7 +1540,7 @@ next:
|
||||
sampleAddr = sample->sampleAddr;
|
||||
size = sample->size;
|
||||
unk = size >> 0xC;
|
||||
unk++;
|
||||
unk += 1;
|
||||
added = ((sampleAddr + size) + sample->medium);
|
||||
if (added != D_SH_8034EC88[D_SH_8034F68C - 1].endAndMediumIdentification) {
|
||||
D_SH_8034EC88[D_SH_8034F68C - 1].isFree = TRUE;
|
||||
|
||||
@@ -173,7 +173,7 @@ static s32 lower_cell_index(s32 coord) {
|
||||
//! Some wall checks are larger than the buffer, meaning wall checks can
|
||||
// miss walls that are near a cell border.
|
||||
if (coord % CELL_SIZE < 50) {
|
||||
index--;
|
||||
index -= 1;
|
||||
}
|
||||
|
||||
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
|
||||
// miss walls that are near a cell border.
|
||||
if (coord % CELL_SIZE > CELL_SIZE - 50) {
|
||||
index++;
|
||||
index += 1;
|
||||
}
|
||||
|
||||
if (index > (NUM_CELLS - 1)) {
|
||||
@@ -372,12 +372,12 @@ static void load_static_surfaces(TerrainData **data, TerrainData *vertexData, s3
|
||||
s32 flags = surf_has_no_cam_collision(surfaceType);
|
||||
|
||||
numSurfaces = *(*data);
|
||||
(*data)++;
|
||||
*data += 1;
|
||||
|
||||
for (i = 0; i < numSurfaces; i++) {
|
||||
if (*surfaceRooms != NULL) {
|
||||
room = *(*surfaceRooms);
|
||||
(*surfaceRooms)++;
|
||||
*surfaceRooms += 1;
|
||||
}
|
||||
|
||||
surface = read_surface_data(vertexData, data);
|
||||
@@ -404,7 +404,7 @@ static void load_static_surfaces(TerrainData **data, TerrainData *vertexData, s3
|
||||
#else
|
||||
*data += 3;
|
||||
if (hasForce) {
|
||||
(*data)++;
|
||||
*data += 1;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
// Mario actually has to wait 22 frames before the platform starts moving.
|
||||
if (o->oActivatedBackAndForthPlatformCountdown != 0) {
|
||||
o->oActivatedBackAndForthPlatformCountdown--;
|
||||
o->oActivatedBackAndForthPlatformCountdown -= 1;
|
||||
} else {
|
||||
// After the wait period is over, we start moving, by adding the velocity
|
||||
// to the positional offset.
|
||||
|
||||
@@ -63,7 +63,7 @@ void bhv_animates_on_floor_switch_press_loop(void) {
|
||||
}
|
||||
|
||||
if (o->oFloorSwitchPressAnimationDoubleFrame < 9) {
|
||||
o->oFloorSwitchPressAnimationDoubleFrame++;
|
||||
o->oFloorSwitchPressAnimationDoubleFrame += 1;
|
||||
}
|
||||
} else if ((o->oFloorSwitchPressAnimationDoubleFrame -= 2) < 0) {
|
||||
o->oFloorSwitchPressAnimationDoubleFrame = 0;
|
||||
|
||||
@@ -36,7 +36,7 @@ void bubba_act_0(void) {
|
||||
} else if (o->oTimer > 30 && o->oDistanceToMario < 2000.0f) {
|
||||
o->oAction = 1;
|
||||
} else if (o->oBubbaRandomTimer != 0) {
|
||||
o->oBubbaRandomTimer--;
|
||||
o->oBubbaRandomTimer -= 1;
|
||||
} else {
|
||||
o->oBubbaTargetYaw = obj_random_fixed_turn(0x2000);
|
||||
o->oBubbaRandomTimer = random_linear_offset(100, 100);
|
||||
|
||||
@@ -150,7 +150,7 @@ static void chain_chomp_sub_act_turn(void) {
|
||||
o->oChainChompTargetPitch = obj_get_pitch_from_vel();
|
||||
}
|
||||
} else {
|
||||
o->oTimer--;
|
||||
o->oTimer -= 1;
|
||||
}
|
||||
} else {
|
||||
o->oForwardVel = 0.0f;
|
||||
@@ -235,7 +235,7 @@ static void chain_chomp_released_lunge_around(void) {
|
||||
if (o->oChainChompNumLunges == 0) {
|
||||
if (cur_obj_rotate_yaw_toward(o->oAngleToMario, 0x320)) {
|
||||
if (o->oTimer > 60) {
|
||||
o->oChainChompNumLunges++;
|
||||
o->oChainChompNumLunges += 1;
|
||||
// enable wall collision
|
||||
o->oWallHitboxRadius = 200.0f;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ void clam_act_0(void) {
|
||||
cur_obj_play_sound_2(SOUND_GENERAL_CLAM_SHELL2);
|
||||
o->oAction = 1;
|
||||
} else if (o->oClamShakeTimer != 0) {
|
||||
o->oClamShakeTimer--;
|
||||
o->oClamShakeTimer -= 1;
|
||||
cur_obj_shake_y(3.0f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ void bhv_coffin_spawner_loop(void) {
|
||||
}
|
||||
}
|
||||
|
||||
o->oAction++;
|
||||
o->oAction += 1;
|
||||
}
|
||||
} else if (o->activeFlags & ACTIVE_FLAG_IN_DIFFERENT_ROOM) {
|
||||
o->oAction = COFFIN_SPAWNER_ACT_COFFINS_UNLOADED;
|
||||
|
||||
@@ -9,7 +9,7 @@ void bhv_end_birds_1_loop(void) {
|
||||
gCurrentObject->oIntroLakituEndBirds1DestX = -554.f;
|
||||
gCurrentObject->oIntroLakituEndBirds1DestY = 3044.f;
|
||||
gCurrentObject->oIntroLakituEndBirds1DestZ = -1314.f;
|
||||
gCurrentObject->oAction = 1;
|
||||
gCurrentObject->oAction += 1;
|
||||
break;
|
||||
case 1:
|
||||
vec3f_set(pos, gCurrentObject->oIntroLakituEndBirds1DestX, gCurrentObject->oIntroLakituEndBirds1DestY,
|
||||
|
||||
@@ -10,7 +10,7 @@ void bhv_end_birds_2_loop(void) {
|
||||
switch (gCurrentObject->oAction) {
|
||||
case 0:
|
||||
cur_obj_scale(0.7f);
|
||||
gCurrentObject->oAction = 1;
|
||||
gCurrentObject->oAction += 1;
|
||||
break;
|
||||
case 1:
|
||||
vec3f_get_dist_and_angle(gCamera->pos, gCamera->focus, &dist, &pitch, &yaw);
|
||||
|
||||
@@ -77,7 +77,7 @@ static void enemy_lakitu_update_speed_and_angle(void) {
|
||||
|
||||
// Turn toward mario except right after throwing a spiny
|
||||
if (o->oEnemyLakituFaceForwardCountdown != 0) {
|
||||
o->oEnemyLakituFaceForwardCountdown--;
|
||||
o->oEnemyLakituFaceForwardCountdown -= 1;
|
||||
} else {
|
||||
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);
|
||||
|
||||
if (o->oEnemyLakituSpinyCooldown != 0) {
|
||||
o->oEnemyLakituSpinyCooldown--;
|
||||
o->oEnemyLakituSpinyCooldown -= 1;
|
||||
} else if (o->oEnemyLakituNumSpinies < 3 && o->oDistanceToMario < 800.0f
|
||||
&& abs_angle_diff(o->oAngleToMario, o->oFaceAngleYaw) < 0x4000) {
|
||||
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;
|
||||
obj_init_animation_with_sound(spiny, spiny_egg_seg5_anims_050157E4, 0);
|
||||
|
||||
o->oEnemyLakituNumSpinies++;
|
||||
o->oEnemyLakituNumSpinies += 1;
|
||||
o->oSubAction = ENEMY_LAKITU_SUB_ACT_HOLD_SPINY;
|
||||
o->oEnemyLakituSpinyCooldown = 30;
|
||||
}
|
||||
@@ -120,7 +120,7 @@ static void enemy_lakitu_sub_act_hold_spiny(void) {
|
||||
cur_obj_init_anim_extend(3);
|
||||
|
||||
if (o->oEnemyLakituSpinyCooldown != 0) {
|
||||
o->oEnemyLakituSpinyCooldown--;
|
||||
o->oEnemyLakituSpinyCooldown -= 1;
|
||||
}
|
||||
// TODO: Check if anything interesting happens if we bypass this with speed
|
||||
else if (o->oDistanceToMario > o->oDrawingDistance - 100.0f
|
||||
|
||||
@@ -44,7 +44,7 @@ static void eyerok_boss_act_wake_up(void) {
|
||||
if (o->oTimer > 5) {
|
||||
if (o->oSubAction == 0) {
|
||||
seq_player_lower_volume(SEQ_PLAYER_LEVEL, 60, 40);
|
||||
o->oSubAction++;
|
||||
o->oSubAction += 1;
|
||||
}
|
||||
|
||||
if (o->oEyerokBossOffsetFromHome == 0.0f && mario_ready_to_speak() != 0) {
|
||||
@@ -79,18 +79,18 @@ static void eyerok_boss_act_fight(void) {
|
||||
o->oEyerokBossAttackCountdown = 1;
|
||||
}
|
||||
} else {
|
||||
o->oEyerokBossAttackCountdown--;
|
||||
o->oEyerokBossAttackCountdown -= 1;
|
||||
}
|
||||
|
||||
if (o->oEyerokBossAttackCountdown != 0 && o->oEyerokBossAttackCountdown != 1) {
|
||||
o->oEyerokBossAttackPhase++;
|
||||
o->oEyerokBossAttackPhase += 1;
|
||||
if ((o->oEyerokBossActiveHand = o->oEyerokBossAttackPhase & 0x1) == 0) {
|
||||
o->oEyerokBossActiveHand = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
o->oEyerokBossAttackPhase++;
|
||||
o->oEyerokBossAttackPhase += 1;
|
||||
|
||||
if (eyerok_check_mario_relative_z(400)) {
|
||||
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)) {
|
||||
spawn_default_star(0.0f, -900.0f, -3700.0f);
|
||||
} else {
|
||||
o->oTimer--;
|
||||
o->oTimer -= 1;
|
||||
}
|
||||
} else if (o->oTimer > 120) {
|
||||
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->oVelY = 30.0f;
|
||||
} else {
|
||||
o->parentObj->oEyerokBossNumHands--;
|
||||
o->parentObj->oEyerokBossNumHands -= 1;
|
||||
o->oAction = EYEROK_HAND_ACT_DIE;
|
||||
o->oVelY = 50.0f;
|
||||
}
|
||||
@@ -183,7 +183,7 @@ static void eyerok_hand_act_sleep(void) {
|
||||
if (o->parentObj->oAction != EYEROK_BOSS_ACT_SLEEP
|
||||
&& ++o->oEyerokHandWakeUpTimer > -3 * o->oBehParams2ndByte) {
|
||||
if (cur_obj_check_if_near_animation_end()) {
|
||||
o->parentObj->oEyerokBossNumHands++;
|
||||
o->parentObj->oEyerokBossNumHands += 1;
|
||||
o->oAction = EYEROK_HAND_ACT_IDLE;
|
||||
o->collisionData = segmented_to_virtual(&ssl_seg7_collision_07028274);
|
||||
} else {
|
||||
@@ -268,14 +268,14 @@ static void eyerok_hand_act_show_eye(void) {
|
||||
if (!eyerok_hand_check_attacked()) {
|
||||
if (o->parentObj->oEyerokBossActiveHand == 0) {
|
||||
if (o->oAnimState < 3) {
|
||||
o->oAnimState++;
|
||||
o->oAnimState += 1;
|
||||
} else if (cur_obj_check_if_near_animation_end()) {
|
||||
o->oAction = EYEROK_HAND_ACT_CLOSE;
|
||||
}
|
||||
} else {
|
||||
if (o->oEyerokHandEyeShownTimer--) {
|
||||
if (o->oEyerokHandAnimStateIndex != 0) {
|
||||
o->oEyerokHandAnimStateIndex--;
|
||||
o->oEyerokHandAnimStateIndex -= 1;
|
||||
}
|
||||
o->oAnimState = sEyerokAnimStatesList[o->oEyerokHandAnimStateIndex];
|
||||
} else {
|
||||
|
||||
@@ -56,7 +56,7 @@ static void fire_piranha_plant_act_hide(void) {
|
||||
0.04f * o->oFirePiranhaPlantNeutralScale)) {
|
||||
cur_obj_become_intangible();
|
||||
if (o->oFirePiranhaPlantActive) {
|
||||
sNumActiveFirePiranhaPlants--;
|
||||
sNumActiveFirePiranhaPlants -= 1;
|
||||
o->oFirePiranhaPlantActive = FALSE;
|
||||
|
||||
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);
|
||||
|
||||
o->oFirePiranhaPlantActive = TRUE;
|
||||
sNumActiveFirePiranhaPlants++;
|
||||
sNumActiveFirePiranhaPlants += 1;
|
||||
|
||||
cur_obj_unhide();
|
||||
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 (--o->oHealth < 0) {
|
||||
if (o->oFirePiranhaPlantActive) {
|
||||
sNumActiveFirePiranhaPlants--;
|
||||
sNumActiveFirePiranhaPlants -= 1;
|
||||
}
|
||||
} else {
|
||||
cur_obj_init_animation_with_sound(2);
|
||||
|
||||
@@ -45,7 +45,7 @@ static void fly_guy_act_idle(void) {
|
||||
o->oAction = FLY_GUY_ACT_APPROACH_MARIO;
|
||||
} else {
|
||||
o->oFlyGuyUnusedJitter = o->oMoveAngleYaw + sFlyGuyJitterAmounts[o->oFlyGuyIdleTimer];
|
||||
o->oFlyGuyIdleTimer++;
|
||||
o->oFlyGuyIdleTimer += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -190,7 +190,7 @@ void bhv_fly_guy_update(void) {
|
||||
}
|
||||
|
||||
// Oscillate up and down
|
||||
o->oFlyGuyOscTimer++;
|
||||
o->oFlyGuyOscTimer += 1;
|
||||
o->oPosY += coss(0x400 * o->oFlyGuyOscTimer) * 1.5f;
|
||||
|
||||
switch (o->oAction) {
|
||||
|
||||
@@ -270,7 +270,7 @@ void bhv_book_switch_loop(void) {
|
||||
if (o->oAction != 0) {
|
||||
if (o->parentObj->oBookSwitchManagerNumCorrectChoices == o->oBehParams2ndByte) {
|
||||
play_sound(SOUND_GENERAL2_RIGHT_ANSWER, gGlobalSoundSource);
|
||||
o->parentObj->oBookSwitchManagerNumCorrectChoices++;
|
||||
o->parentObj->oBookSwitchManagerNumCorrectChoices += 1;
|
||||
} else {
|
||||
rand01 = random_u16() & 0x1;
|
||||
z = gMarioObject->oPosZ + 1.5f * gMarioStates[0].vel[2];
|
||||
|
||||
@@ -95,7 +95,7 @@ void bhv_goomba_triplet_spawner_update(void) {
|
||||
}
|
||||
}
|
||||
|
||||
o->oAction++;
|
||||
o->oAction += 1;
|
||||
}
|
||||
} else if (o->oDistanceToMario > 4000.0f) {
|
||||
// If mario is too far away, enter the unloaded action. The goombas
|
||||
@@ -194,7 +194,7 @@ static void goomba_act_walk(void) {
|
||||
|
||||
o->oGoombaRelativeSpeed = 4.0f / 3.0f;
|
||||
if (o->oGoombaWalkTimer != 0) {
|
||||
o->oGoombaWalkTimer--;
|
||||
o->oGoombaWalkTimer -= 1;
|
||||
} else {
|
||||
if (random_u16() & 3) {
|
||||
o->oGoombaTargetYaw = obj_random_fixed_turn(0x2000);
|
||||
|
||||
@@ -59,7 +59,7 @@ void haunted_chair_act_0(void) {
|
||||
}
|
||||
} else if (o->oHauntedChairSpinTimer != 0) {
|
||||
if (o->oDistanceToMario < 500.0f) {
|
||||
o->oHauntedChairSpinTimer--;
|
||||
o->oHauntedChairSpinTimer -= 1;
|
||||
}
|
||||
o->oTimer = 0.0f;
|
||||
} else {
|
||||
|
||||
@@ -43,9 +43,9 @@ s32 intro_lakitu_set_pos_and_focus(struct Object *obj, struct CutsceneSplinePoin
|
||||
s32 splineFinished = 0;
|
||||
s16 splineSegment = obj->oIntroLakituSplineSegment;
|
||||
|
||||
if ((move_point_along_spline(newFocus, offset, &splineSegment, &(obj->oIntroLakituSplineSegmentProgress)) == 1)
|
||||
|| (move_point_along_spline(newOffset, focus, &splineSegment, &(obj->oIntroLakituSplineSegmentProgress)) == 1))
|
||||
splineFinished++;
|
||||
if ((move_point_along_spline(newFocus, offset, &splineSegment, &(o->oIntroLakituSplineSegmentProgress)) == 1)
|
||||
|| (move_point_along_spline(newOffset, focus, &splineSegment, &(o->oIntroLakituSplineSegmentProgress)) == 1))
|
||||
splineFinished += 1;
|
||||
|
||||
obj->oIntroLakituSplineSegment = splineSegment;
|
||||
intro_lakitu_set_offset_from_camera(obj, newOffset);
|
||||
@@ -64,11 +64,10 @@ void bhv_intro_lakitu_loop(void) {
|
||||
gCurrentObject->oIntroLakituSplineSegmentProgress = 0.f;
|
||||
gCurrentObject->oIntroLakituCloud =
|
||||
spawn_object_relative_with_scale(1, 0, 0, 0, 2.f, gCurrentObject, MODEL_MIST, bhvCloud);
|
||||
if (gCamera->cutscene == CUTSCENE_END_WAVING) {
|
||||
if (gCamera->cutscene == CUTSCENE_END_WAVING)
|
||||
gCurrentObject->oAction = 100;
|
||||
} else {
|
||||
gCurrentObject->oAction = 1;
|
||||
}
|
||||
else
|
||||
gCurrentObject->oAction += 1;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
@@ -83,7 +82,7 @@ void bhv_intro_lakitu_loop(void) {
|
||||
|
||||
if (intro_lakitu_set_pos_and_focus(gCurrentObject, gIntroLakituStartToPipeOffsetFromCamera,
|
||||
gIntroLakituStartToPipeFocus) == 1)
|
||||
gCurrentObject->oAction = 2;
|
||||
gCurrentObject->oAction += 1;
|
||||
|
||||
switch (gCurrentObject->oTimer) {
|
||||
#if defined(VERSION_US) || defined(VERSION_SH)
|
||||
@@ -120,7 +119,7 @@ void bhv_intro_lakitu_loop(void) {
|
||||
#else
|
||||
if (gCutsceneTimer > 720) {
|
||||
#endif
|
||||
gCurrentObject->oAction = 3;
|
||||
gCurrentObject->oAction += 1;
|
||||
gCurrentObject->oIntroLakituDistToBirdsX = 1400.f;
|
||||
gCurrentObject->oIntroLakituDistToBirdsZ = -4096.f;
|
||||
gCurrentObject->oIntroLakituEndBirds1DestZ = 2048.f;
|
||||
@@ -182,7 +181,7 @@ void bhv_intro_lakitu_loop(void) {
|
||||
gCurrentObject->oMoveAngleYaw = 0x9000;
|
||||
gCurrentObject->oFaceAnglePitch = gCurrentObject->oMoveAnglePitch / 2;
|
||||
gCurrentObject->oFaceAngleYaw = gCurrentObject->oMoveAngleYaw;
|
||||
gCurrentObject->oAction++;
|
||||
gCurrentObject->oAction += 1;
|
||||
break;
|
||||
|
||||
case 101:
|
||||
@@ -197,7 +196,7 @@ void bhv_intro_lakitu_loop(void) {
|
||||
0x200);
|
||||
}
|
||||
if (gCurrentObject->oTimer > 105) {
|
||||
gCurrentObject->oAction++;
|
||||
gCurrentObject->oAction += 1;
|
||||
gCurrentObject->oMoveAnglePitch = 0xE00;
|
||||
}
|
||||
gCurrentObject->oFaceAnglePitch = 0;
|
||||
|
||||
@@ -20,7 +20,7 @@ void intro_peach_set_pos_and_opacity(struct Object *obj, f32 targetOpacity, f32
|
||||
void bhv_intro_peach_loop(void) {
|
||||
switch (gCurrentObject->oAction) {
|
||||
case 0:
|
||||
gCurrentObject->oAction = 1;
|
||||
gCurrentObject->oAction += 1;
|
||||
gCurrentObject->oFaceAnglePitch = 0x400;
|
||||
gCurrentObject->oFaceAngleYaw = 0x7500;
|
||||
gCurrentObject->oFaceAngleRoll = -0x3700;
|
||||
@@ -34,13 +34,13 @@ void bhv_intro_peach_loop(void) {
|
||||
intro_peach_set_pos_and_opacity(gCurrentObject, 0.f, 0.f);
|
||||
|
||||
if (gCurrentObject->oTimer > 20)
|
||||
gCurrentObject->oAction = 2;
|
||||
gCurrentObject->oAction += 1;
|
||||
break;
|
||||
case 2:
|
||||
intro_peach_set_pos_and_opacity(gCurrentObject, 255.f, 3.f);
|
||||
|
||||
if ((gCurrentObject->oTimer > 100) && (get_dialog_id() == DIALOG_NONE))
|
||||
gCurrentObject->oAction = 3;
|
||||
gCurrentObject->oAction += 1;
|
||||
break;
|
||||
case 3:
|
||||
intro_peach_set_pos_and_opacity(gCurrentObject, 0.f, 8.f);
|
||||
|
||||
@@ -63,7 +63,7 @@ static void klepto_anim_dive(void) {
|
||||
obj_move_pitch_approach(o->oKleptoPitchToTarget, 600);
|
||||
if (klepto_set_and_check_if_anim_at_end() != 0) {
|
||||
if (o->oKleptoDiveTimer != 0) {
|
||||
o->oKleptoDiveTimer++;
|
||||
o->oKleptoDiveTimer += 1;
|
||||
} else if (o->oKleptoPitchToTarget > -100) {
|
||||
o->oKleptoDiveTimer = random_linear_offset(60, 60);
|
||||
}
|
||||
@@ -234,7 +234,7 @@ static void klepto_act_dive_at_mario(void) {
|
||||
o->oKleptoYawToTarget = o->oAngleToMario;
|
||||
|
||||
if (dy < 160.0f) {
|
||||
o->oSubAction++;
|
||||
o->oSubAction += 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -133,7 +133,7 @@ static void koopa_walk_start(void) {
|
||||
obj_forward_vel_approach(3.0f * o->oKoopaAgility, 0.3f * o->oKoopaAgility);
|
||||
|
||||
if (cur_obj_init_anim_and_check_if_end(11)) {
|
||||
o->oSubAction++;
|
||||
o->oSubAction += 1;
|
||||
o->oKoopaCountdown = random_linear_offset(30, 100);
|
||||
}
|
||||
}
|
||||
@@ -146,9 +146,9 @@ static void koopa_walk(void) {
|
||||
koopa_play_footstep_sound(2, 17);
|
||||
|
||||
if (o->oKoopaCountdown != 0) {
|
||||
o->oKoopaCountdown--;
|
||||
o->oKoopaCountdown -= 1;
|
||||
} else if (cur_obj_check_if_near_animation_end()) {
|
||||
o->oSubAction++;
|
||||
o->oSubAction += 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -244,7 +244,7 @@ static void koopa_shelled_act_lying(void) {
|
||||
cur_obj_init_anim_extend(5);
|
||||
koopa_dive_update_speed(0.3f);
|
||||
} else if (o->oKoopaCountdown != 0) {
|
||||
o->oKoopaCountdown--;
|
||||
o->oKoopaCountdown -= 1;
|
||||
cur_obj_extend_animation_if_at_end();
|
||||
} else if (cur_obj_init_anim_and_check_if_end(6)) {
|
||||
o->oAction = KOOPA_SHELLED_ACT_STOPPED;
|
||||
@@ -350,7 +350,7 @@ static void koopa_unshelled_act_run(void) {
|
||||
obj_bounce_off_walls_edges_objects(&o->oKoopaTargetYaw))) {
|
||||
// Otherwise run around randomly
|
||||
if (o->oKoopaUnshelledTimeUntilTurn != 0) {
|
||||
o->oKoopaUnshelledTimeUntilTurn--;
|
||||
o->oKoopaUnshelledTimeUntilTurn -= 1;
|
||||
} else {
|
||||
o->oKoopaTargetYaw = obj_random_fixed_turn(0x2000);
|
||||
}
|
||||
@@ -424,7 +424,7 @@ static void koopa_unshelled_act_dive(void) {
|
||||
}
|
||||
koopa_dive_update_speed(0.5f);
|
||||
} else if (o->oKoopaCountdown != 0) {
|
||||
o->oKoopaCountdown--;
|
||||
o->oKoopaCountdown -= 1;
|
||||
cur_obj_extend_animation_if_at_end();
|
||||
} else if (cur_obj_init_anim_and_check_if_end(6)) {
|
||||
o->oAction = KOOPA_UNSHELLED_ACT_RUN;
|
||||
@@ -491,7 +491,7 @@ static void koopa_the_quick_act_wait_before_race(void) {
|
||||
koopa_shelled_act_stopped();
|
||||
|
||||
if (o->oKoopaTheQuickInitTextboxCooldown != 0) {
|
||||
o->oKoopaTheQuickInitTextboxCooldown--;
|
||||
o->oKoopaTheQuickInitTextboxCooldown -= 1;
|
||||
} else if (cur_obj_can_mario_activate_textbox_2(400.0f, 400.0f)) {
|
||||
//! The next action doesn't execute until next frame, giving mario one
|
||||
// frame where he can jump, and thus no longer be ready to speak.
|
||||
@@ -650,10 +650,11 @@ static void koopa_the_quick_act_race(void) {
|
||||
break;
|
||||
|
||||
case KOOPA_THE_QUICK_SUB_ACT_JUMP:
|
||||
// We could perform a goomba double jump if we could deactivate ktq
|
||||
// We could perform a goomba double jump if we could deactivate
|
||||
// ktq
|
||||
if (o->oMoveFlags & OBJ_MOVE_MASK_ON_GROUND) {
|
||||
if (cur_obj_init_anim_and_check_if_end(13)) {
|
||||
o->oSubAction--;
|
||||
o->oSubAction -= 1;
|
||||
}
|
||||
|
||||
koopa_the_quick_detect_bowling_ball();
|
||||
|
||||
@@ -104,7 +104,7 @@ void bhv_monty_mole_hole_update(void) {
|
||||
sMontyMoleHoleList = link_objects_with_behavior(bhvMontyMoleHole);
|
||||
sMontyMoleKillStreak = 0;
|
||||
} else if (o->oMontyMoleHoleCooldown > 0) {
|
||||
o->oMontyMoleHoleCooldown--;
|
||||
o->oMontyMoleHoleCooldown -= 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -116,7 +116,7 @@ static void mr_blizzard_act_rise_from_ground(void) {
|
||||
|
||||
// If the timer is not 0, decrement by 1 until it reaches 0.
|
||||
if (o->oMrBlizzardTimer != 0) {
|
||||
o->oMrBlizzardTimer--;
|
||||
o->oMrBlizzardTimer -= 1;
|
||||
} else if ((o->oMrBlizzardGraphYOffset += o->oMrBlizzardGraphYVel) > 24.0f) {
|
||||
// Increments GraphYOffset by GraphYVel until it is greater than 24,
|
||||
// moving Mr. Blizzard's graphical position upward each frame.
|
||||
|
||||
@@ -156,7 +156,7 @@ void mr_i_act_2(void) {
|
||||
o->oMrISpinAngle = 120;
|
||||
if (o->oMrISpinAmount > 1 << 16)
|
||||
o->oAction = 3;
|
||||
o->oMrISpinAngle--;
|
||||
o->oMrISpinAngle -= 1;
|
||||
if (!o->oMrISpinAngle) {
|
||||
o->oMrISpinAngle = 120;
|
||||
o->oMrISpinAmount = 0;
|
||||
|
||||
@@ -55,12 +55,15 @@ void bhv_pokey_body_part_update(void) {
|
||||
// index by killing two body parts on the frame before a new part
|
||||
// spawns, but one of the body parts shifts upward immediately,
|
||||
// so not very interesting
|
||||
if (o->oBehParams2ndByte > 1 && !(o->parentObj->oPokeyAliveBodyPartFlags & (1 << (o->oBehParams2ndByte - 1)))) {
|
||||
o->parentObj->oPokeyAliveBodyPartFlags |= (1 << (o->oBehParams2ndByte - 1));
|
||||
if (o->oBehParams2ndByte > 1
|
||||
&& !(o->parentObj->oPokeyAliveBodyPartFlags & (1 << (o->oBehParams2ndByte - 1)))) {
|
||||
o->parentObj->oPokeyAliveBodyPartFlags =
|
||||
o->parentObj->oPokeyAliveBodyPartFlags | 1 << (o->oBehParams2ndByte - 1);
|
||||
|
||||
o->parentObj->oPokeyAliveBodyPartFlags &= ((1 << o->oBehParams2ndByte) ^ ~0);
|
||||
o->parentObj->oPokeyAliveBodyPartFlags =
|
||||
o->parentObj->oPokeyAliveBodyPartFlags & ((1 << o->oBehParams2ndByte) ^ ~0);
|
||||
|
||||
o->oBehParams2ndByte--;
|
||||
o->oBehParams2ndByte -= 1;
|
||||
}
|
||||
|
||||
// Set the bottom body part size, and gradually increase it.
|
||||
@@ -113,7 +116,7 @@ void bhv_pokey_body_part_update(void) {
|
||||
cur_obj_become_intangible();
|
||||
|
||||
if (--o->oPokeyBodyPartDeathDelayAfterHeadKilled < 0) {
|
||||
o->parentObj->oPokeyNumAliveBodyParts--;
|
||||
o->parentObj->oPokeyNumAliveBodyParts -= 1;
|
||||
obj_die_if_health_non_positive();
|
||||
}
|
||||
} else {
|
||||
@@ -197,8 +200,9 @@ static void pokey_act_wander(void) {
|
||||
MODEL_POKEY_BODY_PART, bhvPokeyBodyPart);
|
||||
|
||||
if (bodyPart != NULL) {
|
||||
o->oPokeyAliveBodyPartFlags |= (1 << o->oPokeyNumAliveBodyParts);
|
||||
o->oPokeyNumAliveBodyParts++;
|
||||
o->oPokeyAliveBodyPartFlags =
|
||||
o->oPokeyAliveBodyPartFlags | (1 << o->oPokeyNumAliveBodyParts);
|
||||
o->oPokeyNumAliveBodyParts += 1;
|
||||
o->oPokeyBottomBodyPartSize = 0.0f;
|
||||
|
||||
obj_scale(bodyPart, 0.0f);
|
||||
@@ -222,7 +226,7 @@ static void pokey_act_wander(void) {
|
||||
if (!(o->oPokeyTurningAwayFromWall =
|
||||
obj_bounce_off_walls_edges_objects(&o->oPokeyTargetYaw))) {
|
||||
if (o->oPokeyChangeTargetTimer != 0) {
|
||||
o->oPokeyChangeTargetTimer--;
|
||||
o->oPokeyChangeTargetTimer -= 1;
|
||||
} else if (o->oDistanceToMario > 2000.0f) {
|
||||
o->oPokeyTargetYaw = obj_random_fixed_turn(0x2000);
|
||||
o->oPokeyChangeTargetTimer = random_linear_offset(30, 50);
|
||||
|
||||
@@ -16,7 +16,7 @@ void bhv_recovery_heart_loop(void) {
|
||||
if (obj_check_if_collided_with_object(o, gMarioObject)) {
|
||||
if (o->oSpinningHeartPlayedSound == 0) {
|
||||
cur_obj_play_sound_2(SOUND_GENERAL_HEART_SPIN);
|
||||
o->oSpinningHeartPlayedSound++;
|
||||
o->oSpinningHeartPlayedSound += 1;
|
||||
}
|
||||
|
||||
o->oAngleVelYaw = (s32)(200.0f * gMarioStates[0].forwardVel) + 1000;
|
||||
|
||||
@@ -16,7 +16,7 @@ void bhv_bowser_shock_wave_loop(void) {
|
||||
cur_obj_scale(o->oBowserShockWaveScale);
|
||||
// Slightly reduce opacity each 3 frames
|
||||
if (gGlobalTimer % 3)
|
||||
o->oOpacity--;
|
||||
o->oOpacity -= 1;
|
||||
// Reduce opacity faster after 70 frames have passed
|
||||
if (o->oTimer > fadeFrames)
|
||||
o->oOpacity -= 5;
|
||||
|
||||
@@ -48,7 +48,7 @@ static void skeeter_act_idle(void) {
|
||||
&& obj_smooth_turn(&o->oSkeeterAngleVel, &o->oMoveAngleYaw, o->oSkeeterTargetAngle, 0.02f,
|
||||
5, 50, 200)) {
|
||||
if (o->oSkeeterWaitTime != 0) {
|
||||
o->oSkeeterWaitTime--;
|
||||
o->oSkeeterWaitTime -= 1;
|
||||
} else if (cur_obj_check_if_near_animation_end()) {
|
||||
cur_obj_play_sound_2(SOUND_OBJ_WALKING_WATER);
|
||||
o->oAction = SKEETER_ACT_LUNGE;
|
||||
@@ -116,7 +116,7 @@ static void skeeter_act_walk(void) {
|
||||
} else {
|
||||
o->oSkeeterTargetForwardVel = 10.0f;
|
||||
if (o->oSkeeterWaitTime != 0) {
|
||||
o->oSkeeterWaitTime--;
|
||||
o->oSkeeterWaitTime -= 1;
|
||||
} else if (cur_obj_check_if_near_animation_end() != 0) {
|
||||
if (random_u16() & 0x0003) {
|
||||
o->oSkeeterTargetAngle = obj_random_fixed_turn(0x2000);
|
||||
|
||||
@@ -105,7 +105,7 @@ void snufit_act_shoot(void) {
|
||||
if ((u16) o->oSnufitBodyScalePeriod == 0x8000 && o->oSnufitBodyBaseScale == 167) {
|
||||
o->oAction = SNUFIT_ACT_IDLE;
|
||||
} else if (o->oSnufitBullets < 3 && o->oTimer >= 3) {
|
||||
o->oSnufitBullets++;
|
||||
o->oSnufitBullets += 1;
|
||||
cur_obj_play_sound_2(SOUND_OBJ_SNUFIT_SHOOT);
|
||||
spawn_object_relative(0, 0, -20, 40, o, MODEL_BOWLING_BALL, bhvSnufitBalls);
|
||||
o->oSnufitRecoil = -30;
|
||||
|
||||
@@ -46,7 +46,7 @@ static s32 spiny_check_active(void) {
|
||||
// behave similar to a regular goomba.
|
||||
// It can also be used on a bob-omb respawner to change its model
|
||||
// to a butterfly or fish.
|
||||
o->parentObj->oEnemyLakituNumSpinies--;
|
||||
o->parentObj->oEnemyLakituNumSpinies -= 1;
|
||||
obj_mark_for_deletion(o);
|
||||
return FALSE;
|
||||
}
|
||||
@@ -85,7 +85,7 @@ static void spiny_act_walk(void) {
|
||||
obj_bounce_off_walls_edges_objects(&o->oSpinyTargetYaw))) {
|
||||
// Walk and occasionally randomly change direction
|
||||
if (o->oSpinyTimeUntilTurn != 0) {
|
||||
o->oSpinyTimeUntilTurn--;
|
||||
o->oSpinyTimeUntilTurn -= 1;
|
||||
} else {
|
||||
o->oSpinyTargetYaw = o->oMoveAngleYaw + (s16) random_sign() * 0x2000;
|
||||
o->oSpinyTimeUntilTurn = random_linear_offset(100, 100);
|
||||
@@ -171,7 +171,7 @@ static void spiny_act_thrown_by_lakitu(void) {
|
||||
|
||||
if (obj_check_attacks(&sSpinyHitbox, o->oAction)) {
|
||||
if (o->parentObj != o) {
|
||||
o->parentObj->oEnemyLakituNumSpinies--;
|
||||
o->parentObj->oEnemyLakituNumSpinies -= 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ static void swoop_act_move(void) {
|
||||
o->oFaceAngleRoll = 0;
|
||||
} else {
|
||||
if (o->oSwoopBonkCountdown != 0) {
|
||||
o->oSwoopBonkCountdown--;
|
||||
o->oSwoopBonkCountdown -= 1;
|
||||
} else if (o->oVelY != 0.0f) {
|
||||
// If we're not done swooping, turn toward mario. When between
|
||||
// 0 and 200 units above mario, increase speed and stop swooping
|
||||
|
||||
@@ -31,7 +31,7 @@ void bhv_thi_tiny_island_top_loop(void) {
|
||||
} else {
|
||||
gTHIWaterDrained |= 1;
|
||||
play_puzzle_jingle();
|
||||
o->oAction++;
|
||||
o->oAction += 1;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -51,7 +51,7 @@ void bhv_ttc_2d_rotator_update(void) {
|
||||
s32 startYaw = o->oFaceAngleYaw;
|
||||
|
||||
if (o->oTTC2DRotatorRandomDirTimer != 0) {
|
||||
o->oTTC2DRotatorRandomDirTimer--;
|
||||
o->oTTC2DRotatorRandomDirTimer -= 1;
|
||||
}
|
||||
|
||||
// Wait until rotated to target yaw
|
||||
|
||||
@@ -43,7 +43,7 @@ static void ttc_moving_bar_act_wait(void) {
|
||||
// This is zero except on the first cycle, and is used to desync the
|
||||
// bars from each other at the very beginning
|
||||
if (o->oTTCMovingBarStoppedTimer != 0) {
|
||||
o->oTTCMovingBarStoppedTimer--;
|
||||
o->oTTCMovingBarStoppedTimer -= 1;
|
||||
} else {
|
||||
if (gTTCSpeedSetting == TTC_SPEED_RANDOM) {
|
||||
// Set the delay for the next cycle
|
||||
@@ -70,7 +70,7 @@ static void ttc_moving_bar_act_pull_back(void) {
|
||||
if ((o->oTTCMovingBarSpeed += 0.73f) > 0.0f) {
|
||||
// Possibly pause after pulling back
|
||||
if (o->oTTCMovingBarStoppedTimer != 0) {
|
||||
o->oTTCMovingBarStoppedTimer--;
|
||||
o->oTTCMovingBarStoppedTimer -= 1;
|
||||
o->oTTCMovingBarSpeed = 0.0f;
|
||||
} else {
|
||||
// Begin extending
|
||||
|
||||
@@ -42,7 +42,7 @@ void bhv_ttc_pendulum_update(void) {
|
||||
|
||||
// Stay still for a while
|
||||
if (o->oTTCPendulumDelay != 0) {
|
||||
o->oTTCPendulumDelay--;
|
||||
o->oTTCPendulumDelay -= 1;
|
||||
} else {
|
||||
// Accelerate in the direction that moves angle to zero
|
||||
if (o->oTTCPendulumAngle * o->oTTCPendulumAccelDir > 0.0f) {
|
||||
|
||||
@@ -39,7 +39,7 @@ void bhv_water_bomb_spawner_update(void) {
|
||||
if (!o->oWaterBombSpawnerBombActive && latDistToMario < spawnerRadius
|
||||
&& gMarioObject->oPosY - o->oPosY < 1000.0f) {
|
||||
if (o->oWaterBombSpawnerTimeToSpawn != 0) {
|
||||
o->oWaterBombSpawnerTimeToSpawn--;
|
||||
o->oWaterBombSpawnerTimeToSpawn -= 1;
|
||||
} else {
|
||||
struct Object *waterBomb =
|
||||
spawn_object_relative(0, 0, 2000, 0, o, MODEL_WATER_BOMB, bhvWaterBomb);
|
||||
@@ -50,8 +50,10 @@ void bhv_water_bomb_spawner_update(void) {
|
||||
|
||||
waterBomb->oAction = WATER_BOMB_ACT_INIT;
|
||||
|
||||
waterBomb->oPosX = gMarioObject->oPosX + waterBombDistToMario * sins(gMarioObject->oMoveAngleYaw);
|
||||
waterBomb->oPosZ = gMarioObject->oPosZ + waterBombDistToMario * coss(gMarioObject->oMoveAngleYaw);
|
||||
waterBomb->oPosX =
|
||||
gMarioObject->oPosX + waterBombDistToMario * sins(gMarioObject->oMoveAngleYaw);
|
||||
waterBomb->oPosZ =
|
||||
gMarioObject->oPosZ + waterBombDistToMario * coss(gMarioObject->oMoveAngleYaw);
|
||||
|
||||
spawn_object(waterBomb, MODEL_WATER_BOMB_SHADOW, bhvWaterBombShadow);
|
||||
|
||||
|
||||
@@ -52,14 +52,14 @@ void water_bomb_cannon_act_1(void) {
|
||||
o->oAction = 2;
|
||||
} else if (o->oBehParams2ndByte == 0) {
|
||||
if (o->oWaterCannonIdleTimer != 0) {
|
||||
o->oWaterCannonIdleTimer--;
|
||||
o->oWaterCannonIdleTimer -= 1;
|
||||
} else {
|
||||
obj_move_pitch_approach(o->oWaterCannonTargetMovePitch, 0x80);
|
||||
obj_face_yaw_approach(o->oWaterCannonTargetFaceYaw, 0x100);
|
||||
|
||||
if ((s16) o->oFaceAngleYaw == (s16) o->oWaterCannonTargetFaceYaw) {
|
||||
if (o->oWaterCannonRotationTimer != 0) {
|
||||
o->oWaterCannonRotationTimer--;
|
||||
o->oWaterCannonRotationTimer -= 1;
|
||||
} else {
|
||||
cur_obj_play_sound_2(SOUND_OBJ_CANNON4);
|
||||
o->oWaterCannonIdleTimer = 70;
|
||||
|
||||
@@ -218,7 +218,7 @@ static void wiggler_act_walk(void) {
|
||||
obj_forward_vel_approach(sWigglerSpeeds[o->oHealth - 1], 1.0f);
|
||||
|
||||
if (o->oWigglerWalkAwayFromWallTimer != 0) {
|
||||
o->oWigglerWalkAwayFromWallTimer--;
|
||||
o->oWigglerWalkAwayFromWallTimer -= 1;
|
||||
} else {
|
||||
if (o->oDistanceToMario >= 25000.0f) {
|
||||
// If >1200 away from home, turn to home
|
||||
@@ -234,7 +234,7 @@ static void wiggler_act_walk(void) {
|
||||
if (o->oHealth < 4) {
|
||||
o->oWigglerTargetYaw = o->oAngleToMario;
|
||||
} else if (o->oWigglerTimeUntilRandomTurn != 0) {
|
||||
o->oWigglerTimeUntilRandomTurn--;
|
||||
o->oWigglerTimeUntilRandomTurn -= 1;
|
||||
} else {
|
||||
o->oWigglerTargetYaw = o->oMoveAngleYaw + 0x4000 * (s16) random_sign();
|
||||
o->oWigglerTimeUntilRandomTurn = random_linear_offset(30, 50);
|
||||
|
||||
+16
-10
@@ -3398,7 +3398,7 @@ s32 move_point_along_spline(Vec3f p, struct CutsceneSplinePoint spline[], s16 *s
|
||||
*splineSegment = 0;
|
||||
finished = 1;
|
||||
}
|
||||
(*progress)--;
|
||||
*progress -= 1;
|
||||
}
|
||||
return finished;
|
||||
}
|
||||
@@ -5495,17 +5495,17 @@ u32 surface_type_modes(struct Camera *c) {
|
||||
switch (sMarioGeometry.currFloorType) {
|
||||
case SURFACE_CLOSE_CAMERA:
|
||||
transition_to_camera_mode(c, CAMERA_MODE_CLOSE, 90);
|
||||
modeChanged++;
|
||||
modeChanged += 1;
|
||||
break;
|
||||
|
||||
case SURFACE_CAMERA_FREE_ROAM:
|
||||
transition_to_camera_mode(c, CAMERA_MODE_FREE_ROAM, 90);
|
||||
modeChanged++;
|
||||
modeChanged += 1;
|
||||
break;
|
||||
|
||||
case SURFACE_NO_CAM_COL_SLIPPERY:
|
||||
transition_to_camera_mode(c, CAMERA_MODE_CLOSE, 90);
|
||||
modeChanged++;
|
||||
modeChanged += 1;
|
||||
break;
|
||||
}
|
||||
return modeChanged;
|
||||
@@ -6352,12 +6352,12 @@ void copy_spline_segment(struct CutsceneSplinePoint dst[], struct CutsceneSpline
|
||||
s32 i = 0;
|
||||
|
||||
init_spline_point(&dst[i], src[j].index, src[j].speed, src[j].point);
|
||||
i++;
|
||||
i += 1;
|
||||
do {
|
||||
do {
|
||||
init_spline_point(&dst[i], src[j].index, src[j].speed, src[j].point);
|
||||
i++;
|
||||
j++;
|
||||
i += 1;
|
||||
j += 1;
|
||||
} while (src[j].index != -1);
|
||||
} while (j > 16);
|
||||
|
||||
@@ -7037,6 +7037,12 @@ 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 void cutscene_dance_unused(UNUSED struct Camera *c) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Slowly turn to the point 100 units in front of Mario
|
||||
*/
|
||||
@@ -8351,7 +8357,7 @@ void cutscene_read_message(struct Camera *c) {
|
||||
// Do nothing until message is gone.
|
||||
case 0:
|
||||
if (get_dialog_id() != DIALOG_NONE) {
|
||||
sCutsceneVars[0].angle[0]++;
|
||||
sCutsceneVars[0].angle[0] += 1;
|
||||
set_time_stop_flags(TIME_STOP_ENABLED | TIME_STOP_DIALOG);
|
||||
}
|
||||
break;
|
||||
@@ -10385,12 +10391,12 @@ void play_cutscene(struct Camera *c) {
|
||||
|
||||
if ((cutsceneDuration != 0) && !(gCutsceneTimer & CUTSCENE_STOP)) {
|
||||
if (gCutsceneTimer < CUTSCENE_LOOP) {
|
||||
gCutsceneTimer++;
|
||||
gCutsceneTimer += 1;
|
||||
}
|
||||
//! Because gCutsceneTimer is often set to 0x7FFF (CUTSCENE_LOOP), this conditional can only
|
||||
//! check for == due to overflow
|
||||
if (gCutsceneTimer == cutsceneDuration) {
|
||||
sCutsceneShot++;
|
||||
sCutsceneShot += 1;
|
||||
gCutsceneTimer = 0;
|
||||
}
|
||||
} else {
|
||||
|
||||
+9
-9
@@ -96,7 +96,7 @@ void print_text_array_info(s16 *printState, const char *str, s32 number) {
|
||||
|| (printState[DEBUG_PSTATE_MAX_X_CURSOR] < printState[DEBUG_PSTATE_Y_CURSOR])) {
|
||||
print_text(printState[DEBUG_PSTATE_X_CURSOR], printState[DEBUG_PSTATE_Y_CURSOR],
|
||||
"DPRINT OVER");
|
||||
printState[DEBUG_PSTATE_DISABLED] = TRUE;
|
||||
printState[DEBUG_PSTATE_DISABLED] += 1; // why not just = TRUE...
|
||||
} else {
|
||||
print_text_fmt_int(printState[DEBUG_PSTATE_X_CURSOR], printState[DEBUG_PSTATE_Y_CURSOR],
|
||||
str, number);
|
||||
@@ -201,7 +201,7 @@ void print_string_array_info(const char **strArr) {
|
||||
s32 i;
|
||||
|
||||
if (!sDebugStringArrPrinted) {
|
||||
sDebugStringArrPrinted = TRUE;
|
||||
sDebugStringArrPrinted += 1; // again, why not = TRUE...
|
||||
for (i = 0; i < 8; i++) {
|
||||
// sDebugPage is assumed to be 4 or 5 here.
|
||||
print_debug_top_down_mapinfo(strArr[i], gDebugInfo[sDebugPage][i]);
|
||||
@@ -240,7 +240,7 @@ void update_debug_dpadmask(void) {
|
||||
} else {
|
||||
sDebugInfoDPadMask = 0;
|
||||
}
|
||||
sDebugInfoDPadUpdID++;
|
||||
sDebugInfoDPadUpdID += 1;
|
||||
if (sDebugInfoDPadUpdID >= 8) {
|
||||
sDebugInfoDPadUpdID = 6; // rapidly set to 6 from 8 as long as dPadMask is being set.
|
||||
}
|
||||
@@ -249,7 +249,7 @@ void update_debug_dpadmask(void) {
|
||||
|
||||
void debug_unknown_level_select_check(void) {
|
||||
if (!sDebugLvSelectCheckFlag) {
|
||||
sDebugLvSelectCheckFlag = TRUE;
|
||||
sDebugLvSelectCheckFlag += 1; // again, just do = TRUE...
|
||||
|
||||
if (!gDebugLevelSelect) {
|
||||
gDebugInfoFlags = DEBUG_INFO_NOFLAGS;
|
||||
@@ -291,7 +291,7 @@ UNUSED static void check_debug_button_seq(void) {
|
||||
} else {
|
||||
if ((s16)(cButtonMask = (gPlayer1Controller->buttonPressed & C_BUTTONS))) {
|
||||
if (buttonArr[sDebugInfoButtonSeqID] == cButtonMask) {
|
||||
sDebugInfoButtonSeqID++;
|
||||
sDebugInfoButtonSeqID += 1;
|
||||
if (buttonArr[sDebugInfoButtonSeqID] == -1) {
|
||||
if (gDebugInfoFlags == DEBUG_INFO_FLAG_ALL) {
|
||||
gDebugInfoFlags = DEBUG_INFO_FLAG_LSELECT;
|
||||
@@ -314,11 +314,11 @@ UNUSED static void try_change_debug_page(void) {
|
||||
if (gDebugInfoFlags & DEBUG_INFO_FLAG_DPRINT) {
|
||||
if ((gPlayer1Controller->buttonPressed & L_JPAD)
|
||||
&& (gPlayer1Controller->buttonDown & (L_TRIG | R_TRIG))) {
|
||||
sDebugPage++;
|
||||
sDebugPage += 1;
|
||||
}
|
||||
if ((gPlayer1Controller->buttonPressed & R_JPAD)
|
||||
&& (gPlayer1Controller->buttonDown & (L_TRIG | R_TRIG))) {
|
||||
sDebugPage--;
|
||||
sDebugPage -= 1;
|
||||
}
|
||||
if (sDebugPage >= (DEBUG_PAGE_MAX + 1)) {
|
||||
sDebugPage = DEBUG_PAGE_MIN;
|
||||
@@ -351,14 +351,14 @@ void try_modify_debug_controls(void) {
|
||||
}
|
||||
|
||||
if (sDebugInfoDPadMask & U_JPAD) {
|
||||
sDebugSysCursor--;
|
||||
sDebugSysCursor -= 1;
|
||||
if (sDebugSysCursor < 0) {
|
||||
sDebugSysCursor = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (sDebugInfoDPadMask & D_JPAD) {
|
||||
sDebugSysCursor++;
|
||||
sDebugSysCursor += 1;
|
||||
if (sDebugSysCursor >= 8) {
|
||||
sDebugSysCursor = 7;
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ void envfx_update_flower(Vec3s centerPos) {
|
||||
(gEnvFxBuffer + i)->isAlive = 1;
|
||||
(gEnvFxBuffer + i)->animFrame = random_float() * 5.0f;
|
||||
} else if ((timer & 0x03) == 0) {
|
||||
(gEnvFxBuffer + i)->animFrame++;
|
||||
(gEnvFxBuffer + i)->animFrame += 1;
|
||||
if ((gEnvFxBuffer + i)->animFrame > 5) {
|
||||
(gEnvFxBuffer + i)->animFrame = 0;
|
||||
}
|
||||
@@ -154,7 +154,7 @@ void envfx_update_lava(Vec3s centerPos) {
|
||||
envfx_set_lava_bubble_position(i, centerPos);
|
||||
(gEnvFxBuffer + i)->isAlive = 1;
|
||||
} else if ((timer & 0x01) == 0) {
|
||||
(gEnvFxBuffer + i)->animFrame++;
|
||||
(gEnvFxBuffer + i)->animFrame += 1;
|
||||
if ((gEnvFxBuffer + i)->animFrame > 8) {
|
||||
(gEnvFxBuffer + i)->isAlive = 0;
|
||||
(gEnvFxBuffer + i)->animFrame = 0;
|
||||
|
||||
+27
-11
@@ -1435,8 +1435,8 @@ u32 interact_koopa_shell(struct MarioState *m, UNUSED u32 interactType, struct O
|
||||
if (interaction == INT_HIT_FROM_ABOVE || m->action == ACT_WALKING
|
||||
|| m->action == ACT_HOLD_WALKING) {
|
||||
m->interactObj = obj;
|
||||
m->usedObj = obj;
|
||||
m->riddenObj = obj;
|
||||
m->usedObj = obj;
|
||||
m->riddenObj = obj;
|
||||
|
||||
attack_object(obj, interaction);
|
||||
update_mario_sound_and_camera(m);
|
||||
@@ -1496,9 +1496,9 @@ u32 interact_pole(struct MarioState *m, UNUSED u32 interactType, struct Object *
|
||||
#endif
|
||||
|
||||
m->interactObj = obj;
|
||||
m->usedObj = obj;
|
||||
m->vel[1] = 0.0f;
|
||||
m->forwardVel = 0.0f;
|
||||
m->usedObj = obj;
|
||||
m->vel[1] = 0.0f;
|
||||
m->forwardVel = 0.0f;
|
||||
|
||||
marioObj->oMarioPoleUnk108 = 0;
|
||||
marioObj->oMarioPoleYawVel = 0;
|
||||
@@ -1644,10 +1644,22 @@ u32 mario_can_talk(struct MarioState *m, u32 arg) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
#ifdef VERSION_JP
|
||||
#define READ_MASK (INPUT_B_PRESSED)
|
||||
#else
|
||||
#define READ_MASK (INPUT_B_PRESSED | INPUT_A_PRESSED)
|
||||
#endif
|
||||
|
||||
#ifdef VERSION_JP
|
||||
#define SIGN_RANGE 0x38E3
|
||||
#else
|
||||
#define SIGN_RANGE 0x4000
|
||||
#endif
|
||||
|
||||
u32 check_read_sign(struct MarioState *m, struct Object *obj) {
|
||||
if ((m->input & (INPUT_B_PRESSED | INPUT_A_PRESSED)) && mario_can_talk(m, 0) && object_facing_mario(m, obj, 0x4000)) {
|
||||
if ((m->input & READ_MASK) && mario_can_talk(m, 0) && object_facing_mario(m, obj, SIGN_RANGE)) {
|
||||
s16 facingDYaw = (s16)(obj->oMoveAngleYaw + 0x8000) - m->faceAngle[1];
|
||||
if (facingDYaw >= -0x4000 && facingDYaw <= 0x4000) {
|
||||
if (facingDYaw >= -SIGN_RANGE && facingDYaw <= SIGN_RANGE) {
|
||||
f32 targetX = obj->oPosX + 105.0f * sins(obj->oMoveAngleYaw);
|
||||
f32 targetZ = obj->oPosZ + 105.0f * coss(obj->oMoveAngleYaw);
|
||||
|
||||
@@ -1665,7 +1677,7 @@ u32 check_read_sign(struct MarioState *m, struct Object *obj) {
|
||||
}
|
||||
|
||||
u32 check_npc_talk(struct MarioState *m, struct Object *obj) {
|
||||
if ((m->input & (INPUT_B_PRESSED | INPUT_A_PRESSED)) && mario_can_talk(m, 1)) {
|
||||
if ((m->input & READ_MASK) && mario_can_talk(m, 1)) {
|
||||
s16 facingDYaw = mario_obj_angle_to_object(m, obj) - m->faceAngle[1];
|
||||
if (facingDYaw >= -0x4000 && facingDYaw <= 0x4000) {
|
||||
obj->oInteractStatus = INT_STATUS_INTERACTED;
|
||||
@@ -1746,7 +1758,7 @@ void mario_process_interactions(struct MarioState *m) {
|
||||
}
|
||||
|
||||
if (m->invincTimer > 0 && !sDelayInvincTimer) {
|
||||
m->invincTimer--;
|
||||
m->invincTimer -= 1;
|
||||
}
|
||||
|
||||
//! If the kick/punch flags are set and an object collision changes Mario's
|
||||
@@ -1828,8 +1840,12 @@ void mario_handle_special_floors(struct MarioState *m) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (!(m->action & ACT_FLAG_AIR) && !(m->action & ACT_FLAG_SWIMMING) && (floorType == SURFACE_BURNING)) {
|
||||
check_lava_boost(m);
|
||||
if (!(m->action & ACT_FLAG_AIR) && !(m->action & ACT_FLAG_SWIMMING)) {
|
||||
switch (floorType) {
|
||||
case SURFACE_BURNING:
|
||||
check_lava_boost(m);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -877,7 +877,7 @@ void initiate_delayed_warp(void) {
|
||||
case WARP_OP_CREDITS_NEXT:
|
||||
sound_banks_disable(SEQ_PLAYER_SFX, SOUND_BANKS_ALL);
|
||||
|
||||
gCurrCreditsEntry++;
|
||||
gCurrCreditsEntry += 1;
|
||||
gCurrActNum = gCurrCreditsEntry->actNum & 0x07;
|
||||
if ((gCurrCreditsEntry + 1)->levelNum == LEVEL_NONE) {
|
||||
destWarpNode = WARP_NODE_CREDITS_END;
|
||||
@@ -913,7 +913,7 @@ void update_hud_values(void) {
|
||||
COND_BIT((gCurrCourseNum >= COURSE_MIN), gHudDisplay.flags, HUD_DISPLAY_FLAG_COIN_COUNT);
|
||||
|
||||
if (gHudDisplay.coins < gMarioState->numCoins) {
|
||||
if (gGlobalTimer & 0x1) {
|
||||
if (gGlobalTimer & 0x00000001) {
|
||||
u32 coinSound;
|
||||
if (gMarioState->action & (ACT_FLAG_SWIMMING | ACT_FLAG_METAL_WATER)) {
|
||||
coinSound = SOUND_GENERAL_COIN_WATER;
|
||||
@@ -921,7 +921,7 @@ void update_hud_values(void) {
|
||||
coinSound = SOUND_GENERAL_COIN;
|
||||
}
|
||||
|
||||
gHudDisplay.coins++;
|
||||
gHudDisplay.coins += 1;
|
||||
play_sound(coinSound, gMarioState->marioObj->header.gfx.cameraToObject);
|
||||
}
|
||||
}
|
||||
@@ -989,7 +989,7 @@ s32 play_mode_normal(void) {
|
||||
check_instant_warp();
|
||||
|
||||
if (sTimerRunning && gHudDisplay.timer < 17999) {
|
||||
gHudDisplay.timer++;
|
||||
gHudDisplay.timer += 1;
|
||||
}
|
||||
|
||||
area_update_objects();
|
||||
@@ -1324,6 +1324,7 @@ s32 lvl_set_current_level(UNUSED s16 arg0, s32 levelNum) {
|
||||
|
||||
if (gSavedCourseNum != gCurrCourseNum) {
|
||||
gSavedCourseNum = gCurrCourseNum;
|
||||
nop_change_course();
|
||||
disable_warp_checkpoint();
|
||||
}
|
||||
|
||||
|
||||
+8
-7
@@ -1165,10 +1165,11 @@ void squish_mario_model(struct MarioState *m) {
|
||||
if (m->squishTimer != 0xFF) {
|
||||
// If no longer squished, scale back to default.
|
||||
if (m->squishTimer == 0) {
|
||||
vec3_same(m->marioObj->header.gfx.scale, 1.0f);
|
||||
vec3f_set(m->marioObj->header.gfx.scale, 1.0f, 1.0f, 1.0f);
|
||||
}
|
||||
// If timer is less than 16, rubber-band Mario's size scale up and down.
|
||||
} else if (m->squishTimer <= 16) {
|
||||
m->squishTimer--;
|
||||
else if (m->squishTimer <= 16) {
|
||||
m->squishTimer -= 1;
|
||||
|
||||
m->marioObj->header.gfx.scale[1] =
|
||||
1.0f - ((sSquishScaleOverTime[15 - m->squishTimer] * 0.6f) / 100.0f);
|
||||
@@ -1177,7 +1178,7 @@ void squish_mario_model(struct MarioState *m) {
|
||||
|
||||
m->marioObj->header.gfx.scale[2] = m->marioObj->header.gfx.scale[0];
|
||||
} else {
|
||||
m->squishTimer--;
|
||||
m->squishTimer -= 1;
|
||||
|
||||
vec3f_set(m->marioObj->header.gfx.scale, 1.4f, 0.4f, 1.4f);
|
||||
}
|
||||
@@ -1239,13 +1240,13 @@ void update_mario_button_inputs(struct MarioState *m) {
|
||||
if (m->input & INPUT_A_PRESSED) {
|
||||
m->framesSinceA = 0;
|
||||
} else if (m->framesSinceA < 0xFF) {
|
||||
m->framesSinceA++;
|
||||
m->framesSinceA += 1;
|
||||
}
|
||||
|
||||
if (m->input & INPUT_B_PRESSED) {
|
||||
m->framesSinceB = 0;
|
||||
} else if (m->framesSinceB < 0xFF) {
|
||||
m->framesSinceB++;
|
||||
m->framesSinceB += 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1581,7 +1582,7 @@ u32 update_and_return_cap_flags(struct MarioState *m) {
|
||||
if ((m->capTimer <= 60)
|
||||
|| ((action != ACT_READING_AUTOMATIC_DIALOG) && (action != ACT_READING_NPC_DIALOG)
|
||||
&& (action != ACT_READING_SIGN) && (action != ACT_IN_CANNON))) {
|
||||
m->capTimer--;
|
||||
m->capTimer -= 1;
|
||||
}
|
||||
|
||||
if (m->capTimer == 0) {
|
||||
|
||||
@@ -1539,7 +1539,7 @@ s32 act_lava_boost(struct MarioState *m) {
|
||||
if (m->actionState < 2 && m->vel[1] < 0.0f) {
|
||||
m->vel[1] = -m->vel[1] * 0.4f;
|
||||
mario_set_forward_vel(m, m->forwardVel * 0.5f);
|
||||
m->actionState++;
|
||||
m->actionState += 1;
|
||||
} else {
|
||||
set_mario_action(m, ACT_LAVA_BOOST_LAND, 0);
|
||||
}
|
||||
|
||||
@@ -477,10 +477,12 @@ Gfx *geo_mario_hand_foot_scaler(s32 callContext, struct GraphNode *node, UNUSED
|
||||
scaleNode->scale = 1.0f;
|
||||
if (asGenerated->parameter == bodyState->punchState >> 6) {
|
||||
if (sMarioAttackAnimCounter != gAreaUpdateCounter && (bodyState->punchState & 0x3F) > 0) {
|
||||
bodyState->punchState--;
|
||||
bodyState->punchState -= 1;
|
||||
sMarioAttackAnimCounter = gAreaUpdateCounter;
|
||||
}
|
||||
scaleNode->scale = gMarioAttackScaleAnimation[asGenerated->parameter * 6 + (bodyState->punchState & 0x3F)] / 10.0f;
|
||||
scaleNode->scale =
|
||||
gMarioAttackScaleAnimation[asGenerated->parameter * 6 + (bodyState->punchState & 0x3F)]
|
||||
/ 10.0f;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
|
||||
@@ -141,7 +141,7 @@ static void platform_on_track_update_pos_or_spawn_ball(s32 ballIndex, f32 x, f32
|
||||
do {
|
||||
prevWaypoint = nextWaypoint;
|
||||
|
||||
nextWaypoint++;
|
||||
nextWaypoint += 1;
|
||||
if (nextWaypoint->flags == WAYPOINT_FLAGS_END) {
|
||||
if (ballIndex == 0) {
|
||||
o->oPlatformOnTrackPrevWaypointFlags = WAYPOINT_FLAGS_END;
|
||||
@@ -459,9 +459,10 @@ static s32 oscillate_toward(s32 *value, f32 *vel, s32 target, f32 velCloseToZero
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void obj_update_blinking(s32 *blinkTimer, s16 baseCycleLength, s16 cycleLengthRange, s16 blinkLength) {
|
||||
static void obj_update_blinking(s32 *blinkTimer, s16 baseCycleLength, s16 cycleLengthRange,
|
||||
s16 blinkLength) {
|
||||
if (*blinkTimer != 0) {
|
||||
(*blinkTimer)--;
|
||||
*blinkTimer -= 1;
|
||||
} else {
|
||||
*blinkTimer = random_linear_offset(baseCycleLength, cycleLengthRange);
|
||||
}
|
||||
|
||||
@@ -285,7 +285,7 @@ s32 update_objects_starting_at(struct ObjectNode *objList, struct ObjectNode *fi
|
||||
cur_obj_update();
|
||||
|
||||
firstObj = firstObj->next;
|
||||
count++;
|
||||
count += 1;
|
||||
}
|
||||
|
||||
return count;
|
||||
@@ -543,7 +543,7 @@ void update_non_terrain_objects(void) {
|
||||
s32 i = 2;
|
||||
while ((listIndex = sObjectListUpdateOrder[i]) != -1) {
|
||||
gObjectCounter += update_objects_in_list(&gObjectLists[listIndex]);
|
||||
i++;
|
||||
i += 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -556,7 +556,7 @@ void unload_deactivated_objects(void) {
|
||||
s32 i = 0;
|
||||
while ((listIndex = sObjectListUpdateOrder[i]) != -1) {
|
||||
unload_deactivated_objects_in_list(&gObjectLists[listIndex]);
|
||||
i++;
|
||||
i += 1;
|
||||
}
|
||||
|
||||
// TIME_STOP_UNKNOWN_0 was most likely intended to be used to track whether
|
||||
|
||||
@@ -220,7 +220,8 @@ struct Object *allocate_object(struct ObjectNode *objList) {
|
||||
// If no unimportant object exists, then the object pool is exhausted.
|
||||
if (unimportantObj == NULL) {
|
||||
// We've met with a terrible fate.
|
||||
while (TRUE) {}
|
||||
while (TRUE) {
|
||||
}
|
||||
} else {
|
||||
// If an unimportant object does exist, unload it and take its slot.
|
||||
unload_object(unimportantObj);
|
||||
|
||||
@@ -3003,7 +3003,7 @@ void Unknown801A5D90(struct ObjGroup *arg0) {
|
||||
sp23C = FALSE;
|
||||
|
||||
for (;;) {
|
||||
trackerNum++;
|
||||
trackerNum += 1;
|
||||
mt = get_memtracker_by_index(trackerNum);
|
||||
|
||||
if (mt->name != NULL) {
|
||||
|
||||
@@ -1062,7 +1062,7 @@ void animate_mario_head_normal(struct ObjAnimator *self) {
|
||||
|
||||
if (self->frame == 810.0f) {
|
||||
self->frame = 750.0f;
|
||||
self->nods--;
|
||||
self->nods -= 1;
|
||||
if (self->nods == 0) {
|
||||
state = 3;
|
||||
}
|
||||
|
||||
@@ -2211,7 +2211,7 @@ void print_file_select_strings(void) {
|
||||
sTextBaseAlpha += 10;
|
||||
}
|
||||
if (sMainMenuTimer < 1000) {
|
||||
sMainMenuTimer++;
|
||||
sMainMenuTimer += 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user