Merge branch 'master' into experimental

This commit is contained in:
Fazana
2021-09-16 18:03:01 +01:00
7 changed files with 27 additions and 6 deletions

View File

@@ -43,6 +43,7 @@ This is a fork of the ultrasm64 repo by CrashOveride which includes the followin
- Tighter hanging controls (mario will face the direction of the analog stick directly while hanging from a ceiling) *
- reonucam3: custom camera by me. This is included as a .patch file in the enhancements folder, you need to apply it if you want this camera.
This video shows a rundown of the features: https://youtu.be/TQNkznX9Z3k
- Ability to disable Mario getting suck in snow or sand
**Hacker QOL:**
- Global, non-level based, star IDs (off by default) *

View File

@@ -82,6 +82,8 @@
#define NO_FALL_DAMAGE
// Disables the scream that mario makes when falling off a great height (this is separate from actual fall damage)
//#define NO_FALL_DAMAGE_SOUND
// Disables Mario getting stuck in snow and sand when falling
//#define NO_GETTING_BURIED
// Number of coins to spawn the "100 coin" star. If you remove the define altogether, then there won't be a 100 coin star at all.
#define X_COIN_STAR 100
// Platform displacement 2 also known as momentum patch. Makes Mario keep the momemtum from moving platforms. Doesn't break treadmills anymore!
@@ -102,6 +104,8 @@
#define MULTILANG (0 || VERSION_EU)
// Enables Puppy Camera 2, a rewritten camera that can be freely configured and modified.
//#define PUPPYCAM
// Allows Mario's shadow to be transparent on top of transparent surfaces, such as water, lava, and ice
#define FIX_SHADOW_TRANSPARENCY
// Automatically calculate the optimal collision distance for an object based on its vertices.
#define AUTO_COLLISION_DISTANCE
// Makes obj_resolve_object_collisions work consistently

View File

@@ -52,14 +52,10 @@ const LevelScript level_intro_splash_screen[] = {
const LevelScript level_intro_mario_head_regular[] = {
INIT_LEVEL(),
#ifndef KEEP_MARIO_HEAD
EXIT_AND_EXECUTE(/*seg*/ 0x14, _menuSegmentRomStart, _menuSegmentRomEnd, level_main_menu_entry_1),
#endif
#ifdef KEEP_MARIO_HEAD
BLACKOUT(/*active*/ TRUE),
FIXED_LOAD(/*loadAddr*/ _goddardSegmentStart, /*romStart*/ _goddardSegmentRomStart, /*romEnd*/ _goddardSegmentRomEnd),
#ifdef KEEP_MARIO_HEAD
LOAD_MARIO_HEAD(/*loadHeadID*/ REGULAR_FACE),
#endif
LOAD_RAW(/*seg*/ 0x13, _behaviorSegmentRomStart, _behaviorSegmentRomEnd),
LOAD_YAY0_TEXTURE(/*seg*/ 0x0A, _title_screen_bg_yay0SegmentRomStart, _title_screen_bg_yay0SegmentRomEnd),
@@ -74,6 +70,7 @@ const LevelScript level_intro_mario_head_regular[] = {
SET_MENU_MUSIC(/*seq*/ SEQ_MENU_TITLE_SCREEN),
TRANSITION(/*transType*/ WARP_TRANSITION_FADE_FROM_STAR, /*time*/ 20, /*color*/ 0x00, 0x00, 0x00),
SLEEP(/*frames*/ 20),
#endif
CALL_LOOP(/*arg*/ LVL_INTRO_REGULAR, /*func*/ lvl_intro_update),
JUMP_IF(/*op*/ OP_EQ, /*arg*/ 100, script_intro_L1),
JUMP_IF(/*op*/ OP_EQ, /*arg*/ 101, script_intro_L2),

View File

@@ -952,6 +952,9 @@ void cur_obj_update(void) {
gCurrentObject->oPrevAction = gCurrentObject->oAction);
}
// Execute various code based on object flags.
objFlags = gCurrentObject->oFlags;
if (objFlags & OBJ_FLAG_SET_FACE_ANGLE_TO_MOVE_ANGLE) {
obj_set_face_angle_to_move_angle(gCurrentObject);
}

View File

@@ -123,6 +123,9 @@ s32 should_get_stuck_in_ground(struct MarioState *m) {
s32 flags = floor->flags;
s32 type = floor->type;
#ifdef NO_GETTING_BURIED
return FALSE;
#else
if (floor != NULL && (terrainType == TERRAIN_SNOW || terrainType == TERRAIN_SAND)
&& type != SURFACE_BURNING && SURFACE_IS_NOT_HARD(type)) {
if (!(flags & 0x01) && m->peakHeight - m->pos[1] > 1000.0f && floor->normal.y >= 0.8660254f) {
@@ -131,6 +134,7 @@ s32 should_get_stuck_in_ground(struct MarioState *m) {
}
return FALSE;
#endif
}
s32 check_fall_damage_or_get_stuck(struct MarioState *m, u32 hardFallAction) {

View File

@@ -784,13 +784,17 @@ static void geo_process_shadow(struct GraphNodeShadow *node) {
mtxf_mul(gMatStack[gMatStackIndex], mtxf, *gCurGraphNodeCamera->matrixPtr);
mtxf_to_mtx(mtx, gMatStack[gMatStackIndex]);
gMatStackFixed[gMatStackIndex] = mtx;
#ifdef FIX_SHADOW_TRANSPARENCY
geo_append_display_list((void *) VIRTUAL_TO_PHYSICAL(shadowList), ((gShadowAboveWaterOrLava || gShadowAboveCustomWater || gMarioOnIceOrCarpet) ? LAYER_TRANSPARENT : LAYER_TRANSPARENT_DECAL));
#else
if (gShadowAboveWaterOrLava == TRUE) {
geo_append_display_list((void *) VIRTUAL_TO_PHYSICAL(shadowList), LAYER_ALPHA);
} else if (gMarioOnIceOrCarpet == 1 || gShadowAboveCustomWater == 1) {
} else if (gMarioOnIceOrCarpet == TRUE || gShadowAboveCustomWater == TRUE) {
geo_append_display_list((void *) VIRTUAL_TO_PHYSICAL(shadowList), LAYER_TRANSPARENT);
} else {
geo_append_display_list((void *) VIRTUAL_TO_PHYSICAL(shadowList), LAYER_TRANSPARENT_DECAL);
}
#endif
gMatStackIndex--;
}
}

View File

@@ -235,12 +235,20 @@ s32 lvl_intro_update(s16 arg, UNUSED s32 unusedArg) {
case LVL_INTRO_PLAY_ITS_A_ME_MARIO:
retVar = intro_play_its_a_me_mario();
break;
#ifdef KEEP_MARIO_HEAD
case LVL_INTRO_REGULAR:
retVar = intro_regular();
break;
case LVL_INTRO_GAME_OVER:
retVar = intro_game_over();
break;
#else
case LVL_INTRO_REGULAR:
// fall through
case LVL_INTRO_GAME_OVER:
retVar = (100 + gDebugLevelSelect);
break;
#endif
case LVL_INTRO_LEVEL_SELECT:
retVar = intro_level_select();
break;