Misc fixes

Proper Mario Head Skip (Game over now returns to title screen)

Better tree particle snow check

Add 2 qol fixes (one was missing)
This commit is contained in:
AloXado320 2021-07-08 11:22:22 -05:00
parent 4b26081f80
commit ae6ea6c008
5 changed files with 18 additions and 6 deletions

View file

@ -111,5 +111,7 @@
#define QOL_FIX_RED_COIN_STAR_MARKER_POSITION (0 || QOL_FIXES)
/// Fixes monty mole hide in hole check
#define QOL_FIX_HIDE_IN_HOLE_NULL_CHECK (0 || QOL_FIXES)
/// Fixes cutscene door Mario action check
#define QOL_FIX_CUTSCENE_DOOR_CHECK (0 || QOL_FIXES)
#endif // QOL_DEFINES_H

View file

@ -117,14 +117,12 @@ const LevelScript level_intro_mario_head_dizzy[] = {
JUMP(script_intro_L4),
};
#else
extern const LevelScript script_intro_L1[];
const LevelScript level_intro_mario_head_regular[] = {
JUMP(script_intro_L1),
EXIT_AND_EXECUTE(/*seg*/ 0x14, _menuSegmentRomStart, _menuSegmentRomEnd, level_main_menu_entry_1),
};
const LevelScript level_intro_mario_head_dizzy[] = {
JUMP(script_intro_L1),
EXIT_AND_EXECUTE(/*seg*/ 0x14, _introSegmentRomStart, _introSegmentRomEnd, level_intro_splash_screen),
};
#endif

View file

@ -43,7 +43,8 @@ void bhv_snow_leaf_particle_spawn_init(void) {
gMarioObject->oActiveParticleFlags &= ~0x2000;
#if QOL_FIX_HARDCODED_TREE_PARTICLES
nearestTree = cur_obj_nearest_object_with_behavior(bhvTree);
isSnow = (obj_has_model(nearestTree, MODEL_CCM_SNOW_TREE) || obj_has_model(nearestTree, MODEL_SL_SNOW_TREE));
isSnow = (obj_has_model(nearestTree, MODEL_CCM_SNOW_TREE) || obj_has_model(nearestTree, MODEL_SL_SNOW_TREE)
|| (gMarioState->area->terrainType & TERRAIN_MASK) == TERRAIN_SNOW);
#else
if (gCurrLevelNum == LEVEL_CCM || gCurrLevelNum == LEVEL_SL)
isSnow = 1;

View file

@ -10383,8 +10383,13 @@ 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) {
#if QOL_FIX_CUTSCENE_DOOR_CHECK
if ((sMarioCamState->action != ACT_PULLING_DOOR) && (sMarioCamState->action != ACT_PUSHING_DOOR))
#else
//! bitwise AND instead of boolean
if ((sMarioCamState->action != ACT_PULLING_DOOR) & (sMarioCamState->action != ACT_PUSHING_DOOR)) {
if ((sMarioCamState->action != ACT_PULLING_DOOR) & (sMarioCamState->action != ACT_PUSHING_DOOR))
#endif
{
gCutsceneTimer = CUTSCENE_STOP;
c->cutscene = 0;
}

View file

@ -2033,10 +2033,16 @@ void generate_yellow_sparkles(s16 x, s16 y, s16 z, f32 radius) {
spawn_object_abs_with_rot(gCurrentObject, 0, MODEL_NONE, bhvSparkleSpawn, x + offsetX, y + offsetY,
z + offsetZ, 0, 0, 0);
#if QOL_FIX_YELLOW_SPARKLES_OFFSET
offsetX = offsetX * 4 / 3;
offsetY = offsetY * 4 / 3;
offsetZ = offsetZ * 4 / 3;
#else
//! copy paste error
offsetX = offsetX * 4 / 3;
offsetX = offsetY * 4 / 3;
offsetX = offsetZ * 4 / 3;
#endif
spawn_object_abs_with_rot(gCurrentObject, 0, MODEL_NONE, bhvSparkleSpawn, x - offsetX, y - offsetY,
z - offsetZ, 0, 0, 0);