Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion soh/assets/custom/accessibility/texts/filechoose_eng.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,7 @@
"quest_sel_vanilla": "Quest - Original",
"quest_sel_mq": "Quest - Master Quest",
"quest_sel_randomizer": "Quest - Randomizer",
"quest_sel_boss_rush": "Quest - Boss Rush"
"quest_sel_boss_rush": "Quest - Boss Rush",
"quest_sel_speedrun": "Quest - Speedrun",
"quest_sel_speedrun_mq": "Quest - Speedrun Master Quest"
}
4 changes: 3 additions & 1 deletion soh/assets/custom/accessibility/texts/filechoose_fra.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,7 @@
"quest_sel_vanilla": "Quête - Originale",
"quest_sel_mq": "Quête - Master Quest",
"quest_sel_randomizer": "Quête - Randomizer",
"quest_sel_boss_rush": "Quête - Boss Rush"
"quest_sel_boss_rush": "Quête - Boss Rush",
"quest_sel_speedrun": "Quête - Speedrun",
"quest_sel_speedrun_mq": "Quête - Speedrun Master Quest"
}
4 changes: 3 additions & 1 deletion soh/assets/custom/accessibility/texts/filechoose_ger.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,7 @@
"quest_sel_vanilla": "Quest - Original",
"quest_sel_mq": "Quest - Master Quest",
"quest_sel_randomizer": "Quest - Randomizer",
"quest_sel_boss_rush": "Quest - Boss Rush"
"quest_sel_boss_rush": "Quest - Boss Rush",
"quest_sel_speedrun": "Quest - Speedrun",
"quest_sel_speedrun_mq": "Quest - Speedrun Master Quest"
}
104 changes: 104 additions & 0 deletions soh/assets/custom/presets/Speedrun - 1 Base.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
{
"blocks": {
"enhancements": {
"gCheats": {
"HookshotReachMultiplier": 1.0,
"MoonJumpOnL": 0,
"SpeedModifier": {
"Value": 1.0
}
},
"gEnhancements": {
"3DSceneRender": 0,
"AlwaysShowDungeonMinimapIcon": 0,
"AskToEquip": 0,
"AssignableTunicsAndBoots": 0,
"BetterAmmoRendering": 0,
"BetterFarore": 0,
"BombchuBowlingFirstPrize": 4,
"BombchusOOB": 1,
"BowArrowCycle": 1,
"CustomizeBombchuBowling": 1,
"CustomizeFishing": 1,
"CustomizeOcarinaGame": 0,
"DampeWin": 1,
"DisableBlackBars": 0,
"DisableBombBillboarding": 0,
"DisableCritWiggle": 1,
"DisableFixedCamera": 0,
"DisableGrottoRotation": 0,
"DisableLOD": 1,
"DisableLinkSwordTrail": 0,
"DpadEquips": 0,
"DpadNoDropOcarinaInput": 1,
"DrawLineupTick": 0,
"DynamicWalletIcon": 1,
"EarlyEyeballFrog": 1,
"EquipmentAlwaysVisible": 0,
"EquipmentCanBeRemoved": 0,
"FastBoomerang": 0,
"FasterPauseMenu": 0,
"FileSelectMoreInfo": 1,
"FirstPersonGauntlets": 0,
"FishNeverEscape": 1,
"FixDampeGoingBackwards": 1,
"FixDaruniaDanceSpeed": 1,
"FixSawSoftlock": 1,
"FixVineFall": 0,
"GravediggingTourFix": 1,
"HoverFishing": 1,
"HyperBosses": 0,
"HyperEnemies": 0,
"IncludeHeldInputsBufferWindow": 1,
"InjectItemCounts": {
"GoldSkulltula": 1,
"HeartContainer": 1,
"HeartPiece": 1
},
"ItemUnequip": 0,
"MinimalUI": 0,
"MweepSpeed": 1.0,
"N64WeirdFrames": 1,
"NewDrops": 0,
"NoHUDHeartAnimation": 0,
"NoInputForCredits": 1,
"OcarinaGame": {
"StartingNotes": 8
},
"PauseAnyCursor": 2,
"PauseBufferWindow": 5,
"PauseMenuAnimatedLink": 0,
"QuickBongoKill": 1,
"QuickPutaway": 1,
"RedGanonBlood": 1,
"RememberMapToggleState": 0,
"ReworkedTargeting": {
"Enabled": 0
},
"ScaleAdultEquipmentAsChild": 1,
"SceneSpecificDirtPathFix": 1,
"ShowDoorLocksOnBothSides": 0,
"SkipArrowAnimation": 1,
"SkipText": 0,
"SlowTextSpeed": 1,
"StaticExplosionRadius": 0,
"StrengthDisabled": 0,
"SwordToggle": 0,
"TextSpeed": 1,
"TimeFlowFileSelect": 0,
"TimeSavers": {
"SkipCutscene": {
"Intro": 1
}
},
"ToTMedallionsColors": 0,
"ToggleStrength": 0,
"VisualAgony": 0,
"WideShutterDoorRange": 1
},
"gRandoEnhancements": null
}
},
"fileType": 2,
"presetName": "Speedrun - Base"
}
163 changes: 163 additions & 0 deletions soh/assets/custom/presets/Speedrun - 2 Faster Quest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
{
"blocks": {
"enhancements": {
"gCheats": {
"EasyFrameAdvance": 0,
"HookshotReachMultiplier": 1.0,
"MoonJumpOnL": 0,
"SpeedModifier": {
"Value": 1.0
}
},
"gEnhancements": {
"3DSceneRender": 0,
"AlwaysShowDungeonMinimapIcon": 0,
"AskToEquip": 0,
"AssignableTunicsAndBoots": 0,
"BetterAmmoRendering": 0,
"BetterFarore": 0,
"BombchuBowlingFirstPrize": 4,
"BombchuBowlingNoBigCucco": 1,
"BombchuBowlingNoSmallCucco": 1,
"BombchusOOB": 1,
"BowArrowCycle": 1,
"BushDropFix": 1,
"ClimbSpeed": 0,
"CrawlSpeed": 1,
"CreditsFix": 1,
"CustomizeBombchuBowling": 1,
"CustomizeFishing": 1,
"CustomizeFrogsOcarinaGame": 0,
"CustomizeOcarinaGame": 0,
"DampeAllNight": 1,
"DampeWin": 1,
"DisableBlackBars": 0,
"DisableBombBillboarding": 0,
"DisableCritWiggle": 1,
"DisableFixedCamera": 0,
"DisableGrottoRotation": 0,
"DisableLOD": 1,
"DisableLinkSwordTrail": 0,
"DpadEquips": 0,
"DpadNoDropOcarinaInput": 1,
"DrawLineupTick": 0,
"DynamicWalletIcon": 1,
"EarlyEyeballFrog": 1,
"EnemySpawnsOverWaterboxes": 1,
"EquipmentAlwaysVisible": 0,
"EquipmentCanBeRemoved": 0,
"FastBoomerang": 0,
"FastBottles": 0,
"FastChests": 1,
"FastDrops": 1,
"FastFarores": 0,
"FastOcarinaPlayback": 1,
"FasterBeanSkull": 1,
"FasterBlockPush": 0,
"FasterBottleEmpty": 0,
"FasterHeavyBlockLift": 1,
"FasterPauseMenu": 0,
"FasterRupeeAccumulator": 1,
"FasterShadowShip": 1,
"FileSelectMoreInfo": 1,
"FirstPersonGauntlets": 0,
"FishNeverEscape": 1,
"FixBrokenGiantsKnife": 1,
"FixDampeGoingBackwards": 1,
"FixDaruniaDanceSpeed": 1,
"FixDungeonMinimapIcon": 1,
"FixEyesOpenWhileSleeping": 1,
"FixFloorSwitches": 1,
"FixHammerHand": 1,
"FixHangingLedgeSwingRate": 1,
"FixMenuLR": 1,
"FixSawSoftlock": 1,
"FixTexturesOOB": 1,
"FixVineFall": 0,
"FixZoraHintDialogue": 1,
"ForgeTime": 0,
"FrogsUnlimitedFailTime": 0,
"GerudoWarriorClothingFix": 1,
"GoronPot": 0,
"GravediggingTourFix": 1,
"GuaranteeFishingBite": 1,
"HoverFishing": 1,
"HyperBosses": 0,
"HyperEnemies": 0,
"IncludeHeldInputsBufferWindow": 1,
"InjectItemCounts": {
"GoldSkulltula": 1,
"HeartContainer": 1,
"HeartPiece": 1
},
"InstantPutaway": 0,
"InstantScarecrow": 1,
"ItemUnequip": 0,
"LoachesAlwaysAppear": 0,
"MinimalUI": 0,
"MweepSpeed": 5.0,
"N64WeirdFrames": 1,
"NaviTextFix": 1,
"NewDrops": 0,
"NoHUDHeartAnimation": 0,
"NoInputForCredits": 1,
"OcarinaGame": {
"StartingNotes": 8
},
"PauseAnyCursor": 2,
"PauseBufferWindow": 5,
"PauseMenuAnimatedLink": 0,
"PulsateBossIcon": 0,
"QuickBongoKill": 1,
"QuickPutaway": 1,
"QuitFishingAtDoor": 1,
"RedGanonBlood": 1,
"RememberMapToggleState": 0,
"ReworkedTargeting": {
"Enabled": 0
},
"ScaleAdultEquipmentAsChild": 1,
"SceneSpecificDirtPathFix": 1,
"SeparateArrows": 0,
"ShowDoorLocksOnBothSides": 0,
"SilverRupeeJingleExtend": 1,
"SkipArrowAnimation": 1,
"SkipKeepConfirmation": 0,
"SkipSaveConfirmation": 1,
"SkipSwimDeepEndAnim": 0,
"SkipText": 1,
"SkulltulaFreeze": 0,
"SlowTextSpeed": 5,
"StaticExplosionRadius": 0,
"StrengthDisabled": 0,
"SwordToggle": 0,
"TextSpeed": 5,
"TimeFlowFileSelect": 0,
"TimeSavers": {
"DisableTitleCard": 1,
"SkipCutscene": {
"BossIntro": 1,
"Entrances": 1,
"GlitchAiding": 1,
"Intro": 1,
"LearnSong": 1,
"OnePoint": 0,
"QuickBossDeaths": 1,
"Story": 1
},
"SkipForcedDialog": 3,
"SkipMiscInteractions": 1,
"SkipOwlInteractions": 1,
"SleepingWaterfall": 1
},
"ToTMedallionsColors": 0,
"ToggleStrength": 0,
"VisualAgony": 0,
"WideShutterDoorRange": 1
},
"gRandoEnhancements": null
}
},
"fileType": 2,
"presetName": "Speedrun - Faster Quest"
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions soh/assets/soh_assets.h
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,9 @@ static const ALIGN_ASSET(2) char gFileSelBossRushSettingsJPNText[] = dgFileSelBo
#define dgFileSelRANDButtonTex "__OTR__textures/title_static/gFileSelRANDButtonTex"
static const ALIGN_ASSET(2) char gFileSelRANDButtonTex[] = dgFileSelRANDButtonTex;

#define dgFileSelRUNButtonTex "__OTR__textures/title_static/gFileSelRUNButtonTex"
static const ALIGN_ASSET(2) char gFileSelRUNButtonTex[] = dgFileSelRUNButtonTex;

#define dgFileSelLangEnglishENGTex "__OTR__textures/title_static/gFileSelLangEnglishENGTex"
static const ALIGN_ASSET(2) char gFileSelLangEnglishENGTex[] = dgFileSelLangEnglishENGTex;

Expand Down
4 changes: 4 additions & 0 deletions soh/include/z64.h
Original file line number Diff line number Diff line change
Expand Up @@ -1607,6 +1607,10 @@ typedef struct FileChooseContext {
uint8_t randomizerIndex;
int16_t randomizerUIAlpha;
uint16_t randomizerArrowOffset;
uint8_t speedrunIndex;
uint8_t speedrunOffset;
int16_t speedrunUIAlpha;
uint16_t speedrunArrowOffset;
} FileChooseContext; // size = 0x1CAE0

// Macros for `EntranceInfo.field`
Expand Down
10 changes: 8 additions & 2 deletions soh/include/z64save.h
Original file line number Diff line number Diff line change
Expand Up @@ -403,12 +403,18 @@ typedef enum {
/* 01 */ QUEST_MASTER,
/* 02 */ QUEST_RANDOMIZER,
/* 03 */ QUEST_BOSSRUSH,
/* 04 */ QUEST_SPEEDRUN,
/* 05 */ QUEST_SPEEDRUN_MASTER,
} Quest;

#define IS_VANILLA (gSaveContext.ship.quest.id == QUEST_NORMAL)
#define IS_MASTER_QUEST (gSaveContext.ship.quest.id == QUEST_MASTER)
// Speedrun plays the same dungeons as the quest it mirrors, so it counts as vanilla/master quest respectively.
#define IS_VANILLA (gSaveContext.ship.quest.id == QUEST_NORMAL || gSaveContext.ship.quest.id == QUEST_SPEEDRUN)
#define IS_MASTER_QUEST \
(gSaveContext.ship.quest.id == QUEST_MASTER || gSaveContext.ship.quest.id == QUEST_SPEEDRUN_MASTER)
#define IS_RANDO (gSaveContext.ship.quest.id == QUEST_RANDOMIZER)
#define IS_BOSS_RUSH (gSaveContext.ship.quest.id == QUEST_BOSSRUSH)
#define IS_SPEEDRUN \
(gSaveContext.ship.quest.id == QUEST_SPEEDRUN || gSaveContext.ship.quest.id == QUEST_SPEEDRUN_MASTER)

typedef enum {
/* 0x00 */ BTN_ENABLED,
Expand Down
33 changes: 33 additions & 0 deletions soh/soh/Enhancements/Presets/Presets.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#include "Presets.h"
#include <algorithm>
#include <cctype>
#include <climits>
#include <string>
#include <tuple>
#include <fstream>
#include <spdlog/common.h>
#include <ship/config/Config.h>
Expand Down Expand Up @@ -158,6 +162,35 @@ void applyPreset(std::string presetName, std::vector<PresetSection> includeSecti
OTRGlobals::Instance->ScaleImGui();
}

std::vector<std::pair<std::string, std::string>> GetSpeedrunPresets() {
static const std::string prefix = "Speedrun - ";
// {order, display name, preset name}
std::vector<std::tuple<int, std::string, std::string>> found;

for (auto& [name, info] : presets) {
if (info.fileName.rfind(prefix, 0) == 0) {
std::string display = info.fileName.substr(prefix.size());
// A leading digit orders the list and is hidden, so "Speedrun - 1 Base" shows as "Base". Presets without
// a digit sort last, by name.
int order = INT_MAX;
if (!display.empty() && isdigit((unsigned char)display[0])) {
order = display[0] - '0';
display.erase(0, 2);
}
found.emplace_back(order, display, name);
}
}

std::sort(found.begin(), found.end());

std::vector<std::pair<std::string, std::string>> result;
for (auto& [order, display, name] : found) {
result.emplace_back(display, name);
}

return result;
}

void DrawPresetSelector(std::vector<PresetSection> includeSections, std::string presetLoc, bool disabled) {
std::vector<std::string> includedPresets;
for (auto& [name, info] : presets) {
Expand Down
4 changes: 4 additions & 0 deletions soh/soh/Enhancements/Presets/Presets.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#pragma once

#include <string>
#include <utility>
#include <vector>

enum PresetSection {
Expand All @@ -16,3 +17,6 @@ enum PresetSection {

void DrawPresetSelector(std::vector<PresetSection> includeSections, std::string currentIndex, bool disabled);
void applyPreset(std::string presetName, std::vector<PresetSection> includeSections = {});

// {display name, preset name} of every preset whose file is named "Speedrun - <display name>"
std::vector<std::pair<std::string, std::string>> GetSpeedrunPresets();
Loading
Loading