mirror of https://github.com/sm64pc/sm64pc.git
more emcc memes and fix beta trampoline
This commit is contained in:
parent
28b3348b52
commit
2ba29b9703
|
@ -722,6 +722,7 @@ UNUSED static void bhv_cmd_set_int_random_from_table(s32 tableSize) {
|
|||
|
||||
// Does not increment gCurBhvCommand or return a bhv status
|
||||
}
|
||||
|
||||
#else
|
||||
// Command 0x??: Sets the specified field to a random entry in the given table, up to size 16.
|
||||
// Bytes: ?? FF SS SS V1 V1 V2 V2 V3 V3 V4 V4... ...V15 V15 V16 V16 (no macro exists)
|
||||
|
|
|
@ -108,7 +108,11 @@ void set_warp_transition_rgb(u8 red, u8 green, u8 blue) {
|
|||
gWarpTransBlue = blue;
|
||||
}
|
||||
|
||||
#ifndef TARGET_WEB
|
||||
static int scale_x_to_correct_aspect_center(int x) {
|
||||
#else
|
||||
UNUSED static int scale_x_to_correct_aspect_center(int x) {
|
||||
#endif
|
||||
f32 aspect = GFX_DIMENSIONS_ASPECT_RATIO;
|
||||
return x + (SCREEN_HEIGHT * aspect / 2) - (SCREEN_WIDTH / 2);
|
||||
}
|
||||
|
|
|
@ -97,13 +97,11 @@ void bhv_beta_trampoline_top_loop(void) {
|
|||
o->oPosY = o->oHomeY;
|
||||
#ifdef QOL_FIXES
|
||||
o->oPosY =
|
||||
(o->oPosY > (o->oHomeY - 150.0f + 75.0f)) ?
|
||||
(o->oPosY - 10) :
|
||||
(o->oHomeY - 150.0f + 65.0f);
|
||||
(o->oPosY < (o->oHomeY - 10.0f)) ?
|
||||
(o->oPosY + 10.0f) :
|
||||
o->oHomeY;
|
||||
|
||||
o->oBetaTrampolineAdditiveYVel =
|
||||
((o->oBehParams2ndByte >> 4) / 2.0f) +
|
||||
((o->oHomeY - o->oPosY) / ((o->oBehParams2ndByte & 0x0F) / 2.0f));
|
||||
o->oBetaTrampolineAdditiveYVel = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -3227,6 +3227,9 @@ void update_camera(struct Camera *c) {
|
|||
case CAMERA_MODE_FREE_ROAM:
|
||||
mode_lakitu_camera(c);
|
||||
break;
|
||||
#ifdef QOL_FIXES
|
||||
|
||||
#endif
|
||||
case CAMERA_MODE_BOSS_FIGHT:
|
||||
mode_boss_fight_camera(c);
|
||||
break;
|
||||
|
@ -7183,7 +7186,11 @@ static UNUSED void unused_cutscene_mario_dialog_looking_down(UNUSED struct Camer
|
|||
/**
|
||||
* Cause Mario to enter the normal dialog state.
|
||||
*/
|
||||
#ifndef TARGET_WEB
|
||||
static BAD_RETURN(s32) cutscene_mario_dialog(UNUSED struct Camera *c) {
|
||||
#else
|
||||
UNUSED static BAD_RETURN(s32) cutscene_mario_dialog(UNUSED struct Camera *c) {
|
||||
#endif
|
||||
gCutsceneTimer = cutscene_common_set_dialog_state(1);
|
||||
}
|
||||
|
||||
|
@ -8438,7 +8445,7 @@ BAD_RETURN(s32) cutscene_star_spawn(struct Camera *c) {
|
|||
sStatusFlags |= CAM_FLAG_SMOOTH_MOVEMENT;
|
||||
|
||||
if (gObjCutsceneDone) {
|
||||
// Set the timer to CUTSCENE_LOOP, which start the next shot.
|
||||
// Set the timer to CUTSCENE_LOOP, which starts the next shot.
|
||||
gCutsceneTimer = CUTSCENE_LOOP;
|
||||
}
|
||||
}
|
||||
|
@ -8582,7 +8589,7 @@ BAD_RETURN(s32) cutscene_red_coin_star(struct Camera *c) {
|
|||
cutscene_event(cutscene_red_coin_star_set_fov, c, 30, -1);
|
||||
|
||||
if (gObjCutsceneDone) {
|
||||
// Set the timer to CUTSCENE_LOOP, which start the next shot.
|
||||
// Set the timer to CUTSCENE_LOOP, which starts the next shot.
|
||||
gCutsceneTimer = CUTSCENE_LOOP;
|
||||
}
|
||||
}
|
||||
|
@ -9276,7 +9283,12 @@ BAD_RETURN(s32) cutscene_read_message(struct Camera *c) {
|
|||
// This could cause softlocks. If a message starts one frame after another one closes, the
|
||||
// cutscene will never end.
|
||||
if (get_dialog_id() == -1) {
|
||||
// this attempts to fix the softlock
|
||||
#ifndef QOL_FIXES
|
||||
gCutsceneTimer = CUTSCENE_LOOP;
|
||||
#else
|
||||
gCutsceneTimer = CUTSCENE_STOP;
|
||||
#endif
|
||||
retrieve_info_star(c);
|
||||
transition_next_state(c, 15);
|
||||
sStatusFlags |= CAM_FLAG_UNUSED_CUTSCENE_ACTIVE;
|
||||
|
@ -9286,6 +9298,9 @@ BAD_RETURN(s32) cutscene_read_message(struct Camera *c) {
|
|||
sModeOffsetYaw = sCutsceneVars[1].angle[1];
|
||||
cutscene_unsoften_music(c);
|
||||
}
|
||||
#ifdef QOL_FIXES
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
sStatusFlags |= CAM_FLAG_UNUSED_CUTSCENE_ACTIVE;
|
||||
}
|
||||
|
|
|
@ -790,7 +790,11 @@ s32 launch_mario_until_land(struct MarioState *m, s32 endAction, s32 animation,
|
|||
|
||||
s32 act_unlocking_key_door(struct MarioState *m) {
|
||||
#ifdef QOL_FIXES
|
||||
#ifndef TARGET_WEB
|
||||
f32 angle;
|
||||
#else
|
||||
f32 angle = 0.0f;
|
||||
#endif
|
||||
#endif
|
||||
m->faceAngle[1] = m->usedObj->oMoveAngleYaw;
|
||||
|
||||
|
|
Loading…
Reference in New Issue