More options, more fixes

This commit is contained in:
Mors 2021-04-11 22:51:09 +03:00
parent f4303676a5
commit cd80816c54
18 changed files with 94 additions and 56 deletions

View file

@ -90,27 +90,31 @@ If these don't help, you can ask for help on our Discord server. **Don't ask for
### v1.1.0 (??/04/2021):
**Launcher:**
- Added the new settings to the launcher.
- Made it so that the launcher now can change button prompts depending on if you're using a keyboard or gamepad.
- Made it take longer to reload all the settings from presets to prevent accidental reloads.
- Added the C-buttons to the list of reassignable buttons for controllers.
- Removed some keys from the key selection options.
**Game itself:**
- Added the "Graphics Backend" setting, which makes it possible to switch between Direct3D11 and Direct3D12 without rebuilding.
- Added "Increase Underwater Shell Time", which makes the underwater shells last longer.
- Added the "Improved Hanging" setting, which makes movement when hanging on ceilings faster, and removes the requirement of holding A.
- Added the "Restore Mother Penguin's Sad Eyes" setting, which restores the unused, sad looking eye texture for the mother penguin.
- Added a bunch of mouse related settings. You can now control the camera and navigate some of the menus using your mouse.
- Added "Casual Mode", which makes Mario not lose any health when underwater, and reduces all damage taken by half.
- Added a bunch of mouse related settings. You can now control the camera and some of the menus with your mouse.
- Added a key which makes Mario walk slower. This is to compensate for the lack of analog controls with a keyboard.
- Added "Paper Mode", which makes Mario thin like a paper.
- Added "Wireframe Mode". Guess what this one does.
- Added a key which makes Mario walk slower. This is to compensate for the lack of analog controls with a keyboard.
- Split the "Analog Stick Deadzone" setting into two, one for each analog stick.
- Changed the "Improved Metal Mario" setting to "Improved Powerups". It now also makes underwater shells last longer and makes Metal Mario's interactions with enemies and hazards more consistent.
- Changed the "Restore the Unused Trapdoor Sound" to "Restore Unused Sound Effects". It also now brings back the sound effects that were supposed to play during the Bowser defeat cutscenes.
- Added more options for the "Infinite Lives Mode" and "Encore Mode" settings, allowing further customizability.
- Made Mario lose health slower when underwater during hard mode.
- Tweaked wall jumping to be stronger when wall sliding is enabled.
- Ground pound diving is also made faster now.
- Made Metal Mario more consistent with the "Improved Metal Mario" setting.
- Made the window center on the screen at game start.
- Made it so that when Hard Mode is active Mario loses health slower underwater, and faster in toxic gas.
- Tweaked both the "Wall Sliding" and "Odyssey Ground Pound Dive" settings.
- Fixed various issues regarding the "Manual Camera" setting.
- Made the game window be centered on main display at the game start.
- Reverted the level select level order back to original and fixed a crash casued by missing characters.
- Added Linux support thanks to [TheEssem](https://github.com/TheEssem).
- Fixed other various minor bugs.
- Fixed various issues.
### v1.0.1 (06/04/2021):
**Launcher:**

View file

@ -77,7 +77,7 @@ static void sequence_channel_process_sound(struct SequenceChannel *seqChannel) {
}
#endif
void sequence_player_process_sound(struct SequencePlayer *seqPlayer) {
void sequence_player_process_sound(struct SequencePlayer *seqPlayer, float seqVol) {
s32 i;
if (seqPlayer->fadeTimer != 0) {
@ -86,8 +86,8 @@ void sequence_player_process_sound(struct SequencePlayer *seqPlayer) {
seqPlayer->recalculateVolume = TRUE;
#endif
if (seqPlayer->fadeVolume > US_FLOAT2(1)) {
seqPlayer->fadeVolume = US_FLOAT2(1);
if (seqPlayer->fadeVolume > US_FLOAT2(1) * seqVol) {
seqPlayer->fadeVolume = US_FLOAT2(1) * seqVol;
}
if (seqPlayer->fadeVolume < 0) {
seqPlayer->fadeVolume = 0;

View file

@ -33,7 +33,7 @@
#define BSWAP16(x) (((x) & 0xff) << 8 | (((x) >> 8) & 0xff))
#endif
void sequence_player_process_sound(struct SequencePlayer *seqPlayer);
void sequence_player_process_sound(struct SequencePlayer *seqPlayer, float seqVol);
void note_vibrato_update(struct Note *note);
void note_vibrato_init(struct Note *note);
void adsr_init(struct AdsrState *adsr, struct AdsrEnvelope *envelope, s16 *volOut);

View file

@ -2045,10 +2045,10 @@ void process_sequences(UNUSED s32 iterationsRemaining) {
if (gSequencePlayers[i].enabled == TRUE) {
#ifdef VERSION_EU
sequence_player_process_sequence(&gSequencePlayers[i], configSeqVolume[i]);
sequence_player_process_sound(&gSequencePlayers[i]);
sequence_player_process_sound(&gSequencePlayers[i], configSeqVolume[i]);
#else
sequence_player_process_sequence(gSequencePlayers + i, configSeqVolume[i]);
sequence_player_process_sound(gSequencePlayers + i);
sequence_player_process_sound(gSequencePlayers + i, configSeqVolume[i]);
#endif
}
}

View file

@ -27,7 +27,7 @@ void bhv_castle_floor_trap_open_detect(void) {
void bhv_castle_floor_trap_open(void) {
if (o->oTimer == 0) {
if (gTrapdoorSound) {
if (gUnusedSounds) {
play_sound(SOUND_GENERAL_CASTLE_TRAP_OPEN, gDefaultSoundArgs);
}
else {

View file

@ -291,18 +291,27 @@ Gfx *geo_switch_tuxie_mother_eyes(s32 run, struct GraphNode *node, UNUSED Mat4 *
if (run == TRUE) {
obj = (struct Object *) gCurGraphNodeObject;
switchCase = (struct GraphNodeSwitchCase *) node;
switchCase->selectedCase = 0;
// timer logic for blinking. uses cases 0-2.
timer = gGlobalTimer % 50;
if (timer < 43)
// Sad penguin eyes. Very sad times.
// Blinking looks weird with these eyes so it's disabled.
if ((gPenguinSadEyes) && (obj->oAction != 2) && (obj->behavior == segmented_to_virtual(bhvTuxiesMother))) {
switchCase->selectedCase = 4;
}
else {
switchCase->selectedCase = 0;
else if (timer < 45)
switchCase->selectedCase = 1;
else if (timer < 47)
switchCase->selectedCase = 2;
else
switchCase->selectedCase = 1;
// timer logic for blinking. uses cases 0-2.
timer = gGlobalTimer % 50;
if (timer < 43)
switchCase->selectedCase = 0;
else if (timer < 45)
switchCase->selectedCase = 1;
else if (timer < 47)
switchCase->selectedCase = 2;
else
switchCase->selectedCase = 1;
}
/** make Tuxie's Mother have angry eyes if Mario takes the correct baby
* after giving it back. The easiest way to check this is to see if she's

View file

@ -1329,9 +1329,9 @@ void mode_manual_camera(struct Camera *c, f32 yOff) {
lakitu_zoom(800.f, 0x900);
c->nextYaw = update_manual_camera(c, c->focus, pos, yOff);
c->pos[0] = pos[0];
c->pos[1] = pos[1];
c->pos[2] = pos[2];
sAreaYawChange = sAreaYaw - oldAreaYaw;
set_camera_height(c, pos[1]);
}
/**

View file

@ -1381,10 +1381,11 @@ s32 lvl_set_current_level(UNUSED s16 arg0, s32 levelNum) {
}
level = 8;
}
if (level > 7)
if (level >= 7)
return 1;
gCurrActNum = level;
gDialogCourseActNum = gCurrActNum;
set_mario_initial_action(gMarioState, MARIO_SPAWN_SPIN_AIRBORNE, sWarpDest.arg);
return 0;
}

View file

@ -1499,7 +1499,7 @@ void update_mario_health(struct MarioState *m) {
if (((u32) m->healCounter | (u32) m->hurtCounter) == 0) {
if ((m->input & INPUT_IN_POISON_GAS) && !(m->action & ACT_FLAG_INTANGIBLE)) {
if (!(m->flags & MARIO_METAL_CAP) && !gDebugLevelSelect) {
m->health -= 4;
m->health -= (save_file_get_flags() & SAVE_FLAG_HARD_MODE) ? 8 : 4;
}
} else {
if ((m->action & ACT_FLAG_SWIMMING) && !(m->action & ACT_FLAG_INTANGIBLE) && (!mario_has_improved_metal_cap(m))) {
@ -1555,7 +1555,7 @@ void update_mario_health(struct MarioState *m) {
}
// Play a noise to alert the player when Mario is close to drowning.
if (((m->action & ACT_GROUP_MASK) == ACT_GROUP_SUBMERGED) && (m->health < 0x300) && (!(save_file_get_flags() & SAVE_FLAG_DAREDEVIL_MODE))) {
if (((m->action & ACT_GROUP_MASK) == ACT_GROUP_SUBMERGED) && (m->health < 0x300) && (!(save_file_get_flags() & SAVE_FLAG_DAREDEVIL_MODE)) && (!mario_has_improved_metal_cap(m))) {
play_sound(SOUND_MOVING_ALMOST_DROWNING, gDefaultSoundArgs);
#ifdef VERSION_SH
if (!gRumblePakTimer) {
@ -1850,7 +1850,7 @@ s32 execute_mario_action(UNUSED struct Object *o) {
}
u32 mario_has_improved_metal_cap(struct MarioState *m) {
return (gImprovedMetalCap) && (m->flags & MARIO_METAL_CAP);
return (gImprovePowerups) && (m->flags & MARIO_METAL_CAP);
}
/**************************************************

View file

@ -347,7 +347,12 @@ s32 perform_hanging_step(struct MarioState *m, Vec3f nextPos) {
s32 update_hang_moving(struct MarioState *m) {
s32 stepResult;
Vec3f nextPos;
f32 maxSpeed = 4.0f;
f32 maxSpeed;
if (gImprovedHanging)
maxSpeed = 8.0f;
else
maxSpeed = 4.0f;
m->forwardVel += 1.0f;
if (m->forwardVel > maxSpeed) {
@ -399,7 +404,8 @@ s32 act_start_hanging(struct MarioState *m) {
return set_mario_action(m, ACT_HANGING, 0);
}
if (!(m->input & INPUT_A_DOWN)) {
if ((!(m->input & INPUT_A_DOWN) && !gImprovedHanging)
|| ((m->input & INPUT_A_PRESSED) && gImprovedHanging)) {
return set_mario_action(m, ACT_FREEFALL, 0);
}
@ -428,7 +434,8 @@ s32 act_hanging(struct MarioState *m) {
return set_mario_action(m, ACT_HANG_MOVING, m->actionArg);
}
if (!(m->input & INPUT_A_DOWN)) {
if ((!(m->input & INPUT_A_DOWN) && !gImprovedHanging)
|| ((m->input & INPUT_A_PRESSED) && gImprovedHanging)) {
return set_mario_action(m, ACT_FREEFALL, 0);
}
@ -452,7 +459,8 @@ s32 act_hanging(struct MarioState *m) {
}
s32 act_hang_moving(struct MarioState *m) {
if (!(m->input & INPUT_A_DOWN)) {
if ((!(m->input & INPUT_A_DOWN) && !gImprovedHanging)
|| ((m->input & INPUT_A_PRESSED) && gImprovedHanging)) {
return set_mario_action(m, ACT_FREEFALL, 0);
}
@ -483,9 +491,12 @@ s32 act_hang_moving(struct MarioState *m) {
return set_mario_action(m, ACT_HANGING, m->actionArg);
}
}
if (update_hang_moving(m) == HANG_LEFT_CEIL) {
set_mario_action(m, ACT_FREEFALL, 0);
if (gImprovedHanging)
update_hang_moving(m);
else {
if (update_hang_moving(m) == HANG_LEFT_CEIL) {
set_mario_action(m, ACT_FREEFALL, 0);
}
}
return FALSE;

View file

@ -1148,15 +1148,23 @@ s32 act_exit_land_save_dialog(struct MarioState *m) {
case -1:
spawn_obj_at_mario_rel_yaw(m, MODEL_BOWSER_KEY_CUTSCENE, bhvBowserKeyCourseExit, -32768);
//! fall through
if (gUnusedSounds)
break;
case 67:
play_sound(SOUND_ACTION_KEY_SWISH, m->marioObj->header.gfx.cameraToObject);
//! fall through
if (gUnusedSounds)
break;
case 83:
play_sound(SOUND_ACTION_PAT_BACK, m->marioObj->header.gfx.cameraToObject);
//! fall through
if (gUnusedSounds)
break;
case 111:
play_sound(SOUND_ACTION_UNKNOWN45C, m->marioObj->header.gfx.cameraToObject);
// no break
if (gUnusedSounds)
break;
}
handle_save_menu(m);
break;

View file

@ -778,7 +778,7 @@ static s32 act_water_shell_swimming(struct MarioState *m) {
return set_mario_action(m, ACT_WATER_THROW, 0);
}
if (m->actionTimer++ == gIncreaseShellTime ? 480 : 240) {
if (m->actionTimer++ == gImprovePowerups ? 480 : 240) {
m->heldObj->oInteractStatus = INT_STATUS_STOP_RIDING;
m->heldObj = NULL;
stop_shell_music();

View file

@ -581,7 +581,7 @@ void apply_gravity(struct MarioState *m) {
m->vel[1] /= 4.0f;
} else if (m->action & ACT_FLAG_METAL_WATER) {
m->vel[1] -= 1.6f;
if (gImprovedMetalCap) {
if (gImprovePowerups) {
if (m->vel[1] < -24.0f) {
m->vel[1] = -24.0f;
}

View file

@ -150,7 +150,7 @@
#define DIK_MAIL 0xEC /* Mail */
#define DIK_MEDIASELECT 0xED /* Media Select */
char* gTitleString = "Super Mario 64 Plus v1.0.1";
char* gTitleString = "Super Mario 64 Plus v1.1.0";
s8 configFullscreen = 1;
unsigned int configCustomFullscreenResolution = 0;
@ -176,6 +176,7 @@ s8 configForce4by3 = 0;
s8 gImprovedControls = 1;
s8 gBackwardSpeedCap = 1;
s8 gImprovedHanging = 1;
s8 gDpadControls = 1;
s8 gFullAirControl = 0;
s8 gDisableBLJ = 0;
@ -184,10 +185,7 @@ s8 gDisableFallDamage = 0;
s8 gFixVariousBugs = 1;
s8 gRespawnBlueCoinSwitch = 1;
s8 gRemoveAnnoyingWarps = 1;
s8 gIncreaseShellTime = 1;
// TODO (Mors): Turn this into a "updated powerups" option eventually.
// Vanish Mario would fall slower, and Wing Mario would have completely revamped flying.
s8 gImprovedMetalCap = 1;
s8 gImprovePowerups = 1;
s8 gDisableBooDialogue = 1;
s8 gTalkEasier = 1;
s8 gQuitOption = 1;
@ -232,7 +230,8 @@ s8 gOdysseyDive = 0;
s8 gFlashbackPound = 0;
s8 gPyramidCutscene = 1;
s8 gTrapdoorSound = 1;
s8 gUnusedSounds = 1;
s8 gPenguinSadEyes = 1;
s8 gTwirlTripleJump = 0;
s8 gSpawnSparkles = 0;
s8 gReplaceKeysWithStars = 0;

View file

@ -25,6 +25,7 @@ extern s8 configForce4by3;
extern s8 gImprovedControls;
extern s8 gBackwardSpeedCap;
extern s8 gImprovedHanging;
extern s8 gDpadControls;
extern s8 gFullAirControl;
extern s8 gDisableBLJ;
@ -33,8 +34,7 @@ extern s8 gDisableFallDamage;
extern s8 gFixVariousBugs;
extern s8 gRespawnBlueCoinSwitch;
extern s8 gRemoveAnnoyingWarps;
extern s8 gIncreaseShellTime;
extern s8 gImprovedMetalCap;
extern s8 gImprovePowerups;
extern s8 gDisableBooDialogue;
extern s8 gTalkEasier;
extern s8 gQuitOption;
@ -79,7 +79,8 @@ extern s8 gOdysseyDive;
extern s8 gFlashbackPound;
extern s8 gPyramidCutscene;
extern s8 gTrapdoorSound;
extern s8 gUnusedSounds;
extern s8 gPenguinSadEyes;
extern s8 gTwirlTripleJump;
extern s8 gSpawnSparkles;
extern s8 gReplaceKeysWithStars;

View file

@ -63,6 +63,7 @@ static const struct ConfigOption options[] = {
{ .name = "CONTROLS", .type = CONFIG_TYPE_SECTION },
{ .name = "improved_controls", .type = CONFIG_TYPE_BOOL, .boolValue = &gImprovedControls },
{ .name = "backward_speed_cap", .type = CONFIG_TYPE_BOOL, .boolValue = &gBackwardSpeedCap },
{ .name = "improved_hanging", .type = CONFIG_TYPE_BOOL, .boolValue = &gImprovedHanging },
{ .name = "dpad_controls", .type = CONFIG_TYPE_BOOL, .boolValue = &gDpadControls },
{ .name = "full_air_control", .type = CONFIG_TYPE_BOOL, .boolValue = &gFullAirControl },
{ .name = "disable_blj", .type = CONFIG_TYPE_BOOL, .boolValue = &gDisableBLJ },
@ -72,8 +73,7 @@ static const struct ConfigOption options[] = {
{ .name = "fix_various_bugs", .type = CONFIG_TYPE_BOOL, .boolValue = &gFixVariousBugs },
{ .name = "make_blue_coin_switches_respawn", .type = CONFIG_TYPE_BOOL, .boolValue = &gRespawnBlueCoinSwitch },
{ .name = "remove_annoying_warps", .type = CONFIG_TYPE_BOOL, .boolValue = &gRemoveAnnoyingWarps },
{ .name = "increase_underwater_shell_time", .type = CONFIG_TYPE_BOOL, .boolValue = &gIncreaseShellTime },
{ .name = "improve_metal_mario", .type = CONFIG_TYPE_BOOL, .boolValue = &gImprovedMetalCap },
{ .name = "improve_powerups", .type = CONFIG_TYPE_BOOL, .boolValue = &gImprovePowerups },
{ .name = "disable_repeat_boo_messages", .type = CONFIG_TYPE_BOOL, .boolValue = &gDisableBooDialogue },
{ .name = "make_it_easier_to_talk_to_the_npcs", .type = CONFIG_TYPE_BOOL, .boolValue = &gTalkEasier },
{ .name = "add_a_quit_option", .type = CONFIG_TYPE_BOOL, .boolValue = &gQuitOption },
@ -123,7 +123,8 @@ static const struct ConfigOption options[] = {
{ .name = "RESTORATIONS", .type = CONFIG_TYPE_SECTION },
{ .name = "enable_the_unused_pyramid_cutscene", .type = CONFIG_TYPE_BOOL, .boolValue = &gPyramidCutscene },
{ .name = "enable_the_unused_trapdoor_sound", .type = CONFIG_TYPE_BOOL, .boolValue = &gTrapdoorSound },
{ .name = "restore_unused_sound_effects", .type = CONFIG_TYPE_BOOL, .boolValue = &gUnusedSounds },
{ .name = "restore_mother_penguins_sad_eyes", .type = CONFIG_TYPE_BOOL, .boolValue = &gPenguinSadEyes },
{ .name = "replace_triple_jump_with_twirl", .type = CONFIG_TYPE_BOOL, .boolValue = &gTwirlTripleJump },
{ .name = "make_mario_sparkle_at_level_start", .type = CONFIG_TYPE_BOOL, .boolValue = &gSpawnSparkles },
{ .name = "replace_keys_with_stars_when_collected", .type = CONFIG_TYPE_BOOL, .boolValue = &gReplaceKeysWithStars },

View file

@ -49,6 +49,9 @@ void keyboard_on_mouse_move(long x, long y) {
}
void keyboard_on_mouse_press(s8 left, s8 right, s8 middle, s8 wheel) {
if (!gMouseCam)
return;
if (left > 0)
keyboard_buttons_down |= configMouseLeft;
if (left < 0)

View file

@ -13,7 +13,8 @@
#include "game/settings.h"
#define DEADZONE 4960
#define DEADZONE_LEFT gControllerLeftDeadzone * 10
#define DEADZONE_RIGHT gControllerRightDeadzone * 10
static bool init_ok;
static SDL_GameController *sdl_cntrl;
@ -83,7 +84,7 @@ static void controller_sdl_read(OSContPad *pad) {
if (gImprovedCamera) {
uint32_t magnitude_sq2 = (uint32_t)(rightx * rightx);
if (magnitude_sq2 > (uint32_t)(DEADZONE * DEADZONE)) {
if (magnitude_sq2 > (uint32_t)(DEADZONE_RIGHT * DEADZONE_RIGHT)) {
pad->stick2_x = rightx / 409;
}
}
@ -94,7 +95,7 @@ static void controller_sdl_read(OSContPad *pad) {
if (gVerticalCamera) {
uint32_t magnitude_sq2 = (uint32_t)(righty * righty);
if (magnitude_sq2 > (uint32_t)(DEADZONE * DEADZONE)) {
if (magnitude_sq2 > (uint32_t)(DEADZONE_RIGHT * DEADZONE_RIGHT)) {
pad->stick2_y = righty / 409;
}
}
@ -107,7 +108,7 @@ static void controller_sdl_read(OSContPad *pad) {
if (rtrig > 30 * 256) pad->button |= R_TRIG;
uint32_t magnitude_sq = (uint32_t)(leftx * leftx) + (uint32_t)(lefty * lefty);
if (magnitude_sq > (uint32_t)(DEADZONE * DEADZONE)) {
if (magnitude_sq > (uint32_t)(DEADZONE_LEFT * DEADZONE_LEFT)) {
// Game expects stick coordinates within -80..80
// 32768 / 409 = ~80
pad->stick_x = leftx / 409;