Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
128 commits
Select commit Hold shift + click to select a range
e53040e
Adds Silver Rupee Shuffle option to menu
leggettc18 Feb 10, 2024
3fc40fa
Sets up hook to override silver rupee behavior.
leggettc18 Feb 10, 2024
e7113b1
Initial scaffolding of tracking silver rupee counts.
leggettc18 Feb 10, 2024
69d4e43
Adding RCs, RGs, and Silver Rupee Counts.
leggettc18 Feb 11, 2024
cd27dc5
Add RAND_INF flags for all silver rupees.
leggettc18 Feb 11, 2024
c1bd869
Actually start randomizing silver rupees
leggettc18 Feb 11, 2024
cf60071
Added location data for remaining vanilla silver rupees.
leggettc18 Feb 13, 2024
e532baf
Added item data and text.
leggettc18 Feb 13, 2024
5224e00
Should be enough to make Silver Rupee GetItem work
leggettc18 Feb 13, 2024
43f3166
Adds vanilla silver rupees to pool when option is on.
leggettc18 Feb 13, 2024
397b710
Fix linker error
leggettc18 Feb 13, 2024
f93aaac
Merge branch 'develop-rando' of https://github.com/HarbourMasters/Shi…
leggettc18 Feb 17, 2024
fff2ec0
Shuffle vanilla silver rupees
leggettc18 Feb 24, 2024
6e01572
Add hint text for vanilla silver rupees.
leggettc18 Feb 24, 2024
4795da1
Merge branch 'develop-rando' of https://github.com/HarbourMasters/Shi…
leggettc18 Feb 24, 2024
f7e549e
Hint text for Vanilla Silver Rupees
leggettc18 Feb 25, 2024
36eb9c3
Fix hint generation bugs on develop-rando
leggettc18 Mar 6, 2024
f26d954
Merge branch 'rando-hint-bugfixes' into rando-silver-rupee-shuffle
leggettc18 Mar 9, 2024
cae433d
Added Silver Rupee Counts to the GetItem Message
leggettc18 Mar 10, 2024
9f036f4
Shuffled silver rupees now give you 5 rupees when collected.
leggettc18 Mar 10, 2024
8e28316
Adds Magical Silver Rupee
leggettc18 Mar 19, 2024
6cb373d
Makes the Own Dungeon, Any Dungeon, and Overworld options work.
leggettc18 Mar 19, 2024
7501852
Merge branch 'develop-rando' of https://github.com/HarbourMasters/Shi…
leggettc18 Mar 29, 2024
ddc7d1a
Adds Master Quest Silver Rupee location data.
leggettc18 Mar 29, 2024
38be38d
Adds RCQUEST to the Position struct
leggettc18 Mar 30, 2024
c1d56a7
Adds RCQUEST to the Position struct
leggettc18 Mar 30, 2024
cc4771b
Changes a few of the longer names
leggettc18 Mar 30, 2024
76b778a
Shows all of the silver rupee flags in the save editor
leggettc18 Mar 30, 2024
ca3ecab
Merge branch 'develop-rando' of https://github.com/HarbourMasters/Shi…
leggettc18 Apr 9, 2024
4a25a07
Adds remaining code for Master Quest Rupees to work
leggettc18 Apr 10, 2024
f02cb56
Fix bug with uncollected silver rupees getting killed when room is cl…
leggettc18 Apr 16, 2024
7876d9e
Fix save bleed bug with Silver Rupee Counts.
leggettc18 Apr 17, 2024
bd73faa
Merge branch 'develop-rando' of https://github.com/HarbourMasters/Shi…
leggettc18 Apr 20, 2024
c6c79e1
Merge branch 'develop-rando' into rando-silver-rupee-shuffle
leggettc18 Jul 4, 2024
e247739
Merge branch 'develop-rando' of https://github.com/HarbourMasters/Shi…
leggettc18 Jul 15, 2024
039f4fe
Fix post-merge-conflict-resolution build errors.
leggettc18 Jul 15, 2024
5e56877
Fix text issue with silver rupee text
leggettc18 Jul 15, 2024
783c183
Fix ice trap models
leggettc18 Jul 17, 2024
ed92bb7
Enable freestanding items other than heart pieces and keys
boomshroom Aug 8, 2024
edcf859
Add option to disable freestanding rupee & heart shuffle
boomshroom Aug 8, 2024
a535f59
Add items to pool
boomshroom Aug 8, 2024
fb8e2bd
Actually add shuffle setting
boomshroom Aug 8, 2024
9c3827e
Define overworld locations
boomshroom Aug 8, 2024
f5bf045
Add logic for overworld freestanding checks
boomshroom Aug 8, 2024
0cac9ca
Add freestanding items for child dungeons.
boomshroom Aug 8, 2024
57cd692
Merge branch 'develop-rando' of https://github.com/HarbourMasters/Shi…
leggettc18 Aug 9, 2024
4b7b341
Fix some post-merge issues
leggettc18 Aug 9, 2024
6c09f18
Improve formatting of Silver Rupee GetItem messages.
leggettc18 Aug 9, 2024
169580e
Add checks for Ice Cavern and Bottom of the Well
boomshroom Aug 13, 2024
ae17244
Add checks for Forest Temple and Gerudo Training Grounds
boomshroom Aug 14, 2024
2a58e47
Add checks for Fire Temple and Water Temple
boomshroom Aug 14, 2024
2f463c1
Add Shadow Temple checks
boomshroom Aug 15, 2024
ead0bba
Define Spirit Temple and Ganon's Castle hearts
boomshroom Aug 15, 2024
f8c438e
Add remaining checks to dungeon definitions
boomshroom Aug 15, 2024
00b8c86
Fix missing logic
boomshroom Aug 15, 2024
5ec64f8
Merge remote-tracking branch 'origin/develop-rando' into shuffle_free…
boomshroom Aug 15, 2024
066004a
Add freestanding checks to Save Flags Editor
boomshroom Aug 16, 2024
7affcb4
Fix flags for Zora Fountain underwater rupees
boomshroom Aug 16, 2024
0075f26
Add option to enable freestanding shuffle for either dungeons or over…
boomshroom Aug 16, 2024
6dfb5c7
Add missing MQ checks and fix mac & windows compile error
boomshroom Aug 16, 2024
bcc10ea
Improve description and add hint text
boomshroom Aug 16, 2024
56a8f2d
Merge remote-tracking branch 'origin/develop-rando' into shuffle_free…
boomshroom Aug 18, 2024
298cec2
Update logic for Bombchu fixes
boomshroom Aug 18, 2024
01245ae
Bump LUS (#4301)
Archez Aug 18, 2024
54cc685
Merge remote-tracking branch 'origin/develop-rando' into shuffle_free…
boomshroom Aug 23, 2024
1e9092c
Add missing Spirit Temple MQ hearts
boomshroom Aug 23, 2024
e07fc59
Add git info to title screen & gameplay stats (#4053)
Pepe20129 Aug 23, 2024
5819cd4
Add missing settings entries
boomshroom Aug 28, 2024
e430514
Merge remote-tracking branch 'origin/develop-rando' into shuffle_free…
boomshroom Aug 29, 2024
b50d14d
Actually add Forest Temple trick to the tricks menu.
boomshroom Aug 29, 2024
48663d7
Change Recommended VS build tools from 142 to 143 (#4315)
Malkierian Aug 30, 2024
1f85420
Additions for the German translation in two files (#4304)
Extloga Sep 2, 2024
075b28c
Define VB for fairy group spawning
boomshroom Sep 4, 2024
a263d45
Add skeleton of new files for fairy shuffle
boomshroom Sep 4, 2024
792515d
Add option to enable/disable fairy shuffle
boomshroom Sep 4, 2024
e655f2e
Add field to fairy entities to hold randomizer data
boomshroom Sep 4, 2024
59222c8
Expose the current grotto id, or find it if not shuffled
boomshroom Sep 5, 2024
987f4ce
Initialise fairy groups if detected
boomshroom Sep 5, 2024
d4f2c0d
Randomize first set of fairies
boomshroom Sep 5, 2024
8d13e1d
Make randomized fairies collectible
boomshroom Sep 5, 2024
3c9bc5f
VBify fairy healing customization
boomshroom Sep 5, 2024
0e5c64b
Add remaining grotto fairies
boomshroom Sep 5, 2024
e1df531
Add remaining fairy group spawns
boomshroom Sep 5, 2024
e1d1557
Override bean sprouts spawning fairies
boomshroom Sep 6, 2024
96055ff
Define bean sprout fairy checks
boomshroom Sep 6, 2024
41d10c3
Add HasItem and CanUse entries for magic beans.
boomshroom Sep 6, 2024
1598ce3
Define logic for bean sprout fairies
boomshroom Sep 6, 2024
12c4bb4
Enabling looking up fairies by z coordinate
boomshroom Sep 6, 2024
fb5e1bc
Add Temple of Time Gossip Stones
boomshroom Sep 6, 2024
3552242
Disable quick age change around gossip stones to simplify logic
boomshroom Sep 7, 2024
16da42c
Add remaining gossip stone fairies
boomshroom Sep 8, 2024
4e4fa63
Finish gossip stone fairies
boomshroom Sep 9, 2024
174554c
Add Desert Colossus Oasis
boomshroom Sep 10, 2024
d5dc2bd
Restrict fairy type
boomshroom Sep 10, 2024
b5037a0
Gui window rework (#4307)
Malkierian Sep 10, 2024
0e83131
Add overworld special fairy spots
boomshroom Sep 12, 2024
c507d4d
Early Eyeball Frog (#4120)
inspectredc Sep 12, 2024
d31b791
Add mini-dungeon fairy song spots
boomshroom Sep 13, 2024
727202c
Add remaining dungeons except Shadow
boomshroom Sep 13, 2024
97d2acc
Add Shadow Temple fairies
boomshroom Sep 13, 2024
ac0dd73
Add fairy check flags to the save editor
boomshroom Sep 13, 2024
ffb5e8e
Filter fairy checks from check tracker
boomshroom Sep 13, 2024
8356a3a
Add hints for fairy checks
boomshroom Sep 14, 2024
74b0e70
Merge branch 'develop-rando' into rando-silver-rupee-shuffle
leggettc18 Sep 14, 2024
42a5700
Fixes hint text issue
leggettc18 Sep 15, 2024
7f503c3
Concurrency Fix (#4318)
Malkierian Sep 15, 2024
19dc4dc
Bump LUS (#4341)
Archez Sep 15, 2024
8bd2f38
Merge remote-tracking branch 'origin/develop' into merge-develop-rand…
Archez Sep 15, 2024
8359d2a
Update entrance tracker settings window for modern menu changes
Archez Sep 15, 2024
e75400a
Merge pull request #4343 from Archez/merge-develop-rando-sep14
Archez Sep 15, 2024
38c7632
Re-adds missing hint text
leggettc18 Sep 15, 2024
1b51750
remove a return 0 (#4347)
Pepper0ni Sep 17, 2024
6cd387d
Fix Deku Mouth for Entrance Rando and Mido Rando Functionality (#4342)
Malkierian Sep 17, 2024
cd92e70
Refactor GetAccessibleLocations (#3871)
Pepper0ni Sep 17, 2024
9c11718
Add 146 ice trap messages (#4281)
Pepe20129 Sep 17, 2024
4148d59
Check Tracker Re-update (#4322)
Malkierian Sep 17, 2024
fab6387
Rearrangement of the currencies in randomizer.cpp (#4338)
Extloga Sep 17, 2024
da6e4ca
Remove erroneous Entrance_OverrideBlueWarp (#4340)
garrettjoecox Sep 17, 2024
ee02e50
Fix issues with faster heavy block lift (#4335)
garrettjoecox Sep 19, 2024
2434eb8
Fix for LACS awarding everywhere (#4348)
garrettjoecox Sep 19, 2024
74c93b0
Stop disabling dampe checkbox, as it's no longer forced to on for ran…
garrettjoecox Sep 19, 2024
702578a
freestanding_shuffle merge
Caladius Sep 19, 2024
9608f71
Partially fix some color related stuff
leggettc18 Sep 19, 2024
c38547b
Merge branch 'develop-rando' of https://github.com/HarbourMasters/Shi…
leggettc18 Sep 19, 2024
cf26087
Fairy Shuffle Merge
Caladius Sep 20, 2024
59351bc
Fairy Shuffle
Caladius Sep 20, 2024
fab4ac6
Add Silver Rupees
Caladius Sep 20, 2024
e3004ff
ganons fix
Caladius Sep 21, 2024
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
31 changes: 31 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,37 @@ include(CMake/lus-cvars.cmake)
set(PROJECT_BUILD_NAME "MacReady Golf" CACHE STRING "" FORCE)
set(PROJECT_TEAM "github.com/harbourmasters" CACHE STRING "" FORCE)

execute_process(
COMMAND git branch --show-current
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE GIT_BRANCH
OUTPUT_STRIP_TRAILING_WHITESPACE
)

set(CMAKE_PROJECT_GIT_BRANCH "${GIT_BRANCH}" CACHE STRING "Git branch" FORCE)

execute_process(
COMMAND git rev-parse HEAD
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE GIT_COMMIT_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE
)

set(CMAKE_PROJECT_GIT_COMMIT_HASH "${GIT_COMMIT_HASH}" CACHE STRING "Git commit hash" FORCE)

execute_process(
COMMAND git describe --tags --abbrev=0 --exact-match HEAD
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE GIT_COMMIT_TAG
OUTPUT_STRIP_TRAILING_WHITESPACE
)

if(NOT GIT_COMMIT_TAG)
set(GIT_COMMIT_TAG "" CACHE STRING "Git commit tag" FORCE)
endif()

set(CMAKE_PROJECT_GIT_COMMIT_TAG "${GIT_COMMIT_TAG}" CACHE STRING "Git commit tag" FORCE)

set_property(DIRECTORY ${CMAKE_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT soh)
add_compile_options($<$<CXX_COMPILER_ID:MSVC>:/MP>)
add_compile_options($<$<CXX_COMPILER_ID:MSVC>:/utf-8>)
Expand Down
17 changes: 5 additions & 12 deletions docs/BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,17 @@ Requires:
* At least 8GB of RAM (machines with 4GB have seen complier failures)
* Visual Studio 2022 Community Edition with the C++ feature set
* One of the Windows SDKs that comes with Visual Studio, for example the current Windows 10 version 10.0.19041.0
* The `MSVC v142 - VS 2019 C++ build tools` component of Visual Studio
* The `MSVC v143 - VS 2022 C++ build tools` component of Visual Studio
* Python 3 (can be installed manually or as part of Visual Studio)
* Git (can be installed manually or as part of Visual Studio)
* Cmake (can be installed via chocolatey or manually)

During installation, check the "Desktop development with C++" feature set:

![image](https://user-images.githubusercontent.com/30329717/183511274-d11aceea-7900-46ec-acb6-3f2cc110021a.png)
Doing so should also check one of the Windows SDKs by default. Then, in the installation details in the right-hand column, make sure you also check the v142 toolset.
Doing so should also check one of the Windows SDKs by default. Then, in the installation details in the right-hand column, make sure you also check the v143 toolset. This is often done by default.

You can also find the v142 toolset by searching through the individual components tab:

![image](https://user-images.githubusercontent.com/30329717/183521169-ead6a73b-a1bf-4e99-aab8-441746d8f08e.png)
While you're there, you can also install Python 3 and Git if needed.
It is recommended that you install Python and Git standalone, the install process in VS Installer has given some issues in the past.

1. Clone the Ship of Harkinian repository

Expand All @@ -33,9 +30,7 @@ _Note: Instructions assume using powershell_
cd Shipwright

# Setup cmake project
& 'C:\Program Files\CMake\bin\cmake' -S . -B "build/x64" -G "Visual Studio 17 2022" -T v142 -A x64 # -DCMAKE_BUILD_TYPE:STRING=Release (if you're packaging)
# or for VS2019
& 'C:\Program Files\CMake\bin\cmake' -S . -B "build/x64" -G "Visual Studio 16 2019" -T v142 -A x64
& 'C:\Program Files\CMake\bin\cmake' -S . -B "build/x64" -G "Visual Studio 17 2022" -T v143 -A x64 # -DCMAKE_BUILD_TYPE:STRING=Release (if you're packaging)
# Extract assets & generate OTR (run this anytime you need to regenerate OTR)
& 'C:\Program Files\CMake\bin\cmake.exe' --build .\build\x64 --target ExtractAssets # --config Release (if you're packaging)
# Compile project
Expand All @@ -60,9 +55,7 @@ With the cmake build system you have two options for working on the project:
To develop using Visual Studio you only need to use cmake to generate the solution file:
```powershell
# Generates Ship.sln at `build/x64` for Visual Studio 2022
& 'C:\Program Files\CMake\bin\cmake' -S . -B "build/x64" -G "Visual Studio 17 2022" -T v142 -A x64
# or for Visual Studio 2019
& 'C:\Program Files\CMake\bin\cmake' -S . -B "build/x64" -G "Visual Studio 16 2019" -T v142 -A x64
& 'C:\Program Files\CMake\bin\cmake' -S . -B "build/x64" -G "Visual Studio 17 2022" -T v143 -A x64
```

#### Visual Studio Code or another editor
Expand Down
2 changes: 1 addition & 1 deletion libultraship
Submodule libultraship updated 58 files
+1 −1 .github/workflows/tidy-format-validation.yml
+6 −4 cmake/dependencies/common.cmake
+1 −0 include/libultraship/libultra/gbi.h
+2 −2 include/libultraship/libultra/os.h
+3 −0 src/CMakeLists.txt
+10 −10 src/Context.cpp
+6 −9 src/Context.h
+3 −5 src/audio/Audio.cpp
+3 −1 src/audio/Audio.h
+0 −2 src/audio/AudioPlayer.cpp
+32 −4 src/audio/AudioPlayer.h
+1 −7 src/audio/SDLAudioPlayer.cpp
+2 −2 src/audio/SDLAudioPlayer.h
+0 −6 src/audio/WasapiAudioPlayer.cpp
+6 −6 src/audio/WasapiAudioPlayer.h
+1 −1 src/config/Config.cpp
+2 −2 src/controller/controldeck/ControlDeck.cpp
+2 −3 src/controller/controldevice/controller/mapping/keyboard/KeyboardKeyToAxisDirectionMapping.cpp
+2 −2 src/controller/controldevice/controller/mapping/keyboard/KeyboardKeyToButtonMapping.cpp
+4 −3 src/controller/controldevice/controller/mapping/keyboard/KeyboardScancodes.h
+2 −0 src/controller/controldevice/controller/mapping/sdl/SDLAxisDirectionToAnyMapping.cpp
+8 −0 src/controller/controldevice/controller/mapping/sdl/SDLButtonToAnyMapping.cpp
+2 −2 src/controller/controldevice/controller/mapping/sdl/SDLButtonToButtonMapping.cpp
+1 −1 src/controller/controldevice/controller/mapping/sdl/SDLGyroMapping.cpp
+4 −1 src/graphic/Fast3D/Fast3dWindow.cpp
+3 −3 src/graphic/Fast3D/debug/GfxDebugger.cpp
+2 −3 src/graphic/Fast3D/debug/GfxDebugger.h
+11 −6 src/graphic/Fast3D/gfx_dxgi.cpp
+51 −19 src/graphic/Fast3D/gfx_pc.cpp
+2 −1 src/graphic/Fast3D/gfx_pc.h
+10 −4 src/graphic/Fast3D/gfx_sdl2.cpp
+1 −0 src/graphic/Fast3D/lus_gbi.h
+1 −1 src/public/bridge/gfxdebuggerbridge.cpp
+1 −0 src/resource/ResourceType.h
+1 −1 src/resource/archive/Archive.cpp
+1 −1 src/resource/factory/DisplayListFactory.cpp
+15 −0 src/resource/factory/LightFactory.cpp
+11 −0 src/resource/factory/LightFactory.h
+11 −0 src/resource/type/Light.cpp
+65 −0 src/resource/type/Light.h
+12 −0 src/utils/binarytools/BinaryReader.cpp
+1 −0 src/utils/binarytools/BinaryReader.h
+10 −0 src/window/Window.cpp
+3 −0 src/window/Window.h
+44 −13 src/window/gui/ConsoleWindow.cpp
+1 −1 src/window/gui/ConsoleWindow.h
+335 −62 src/window/gui/GfxDebuggerWindow.cpp
+1 −1 src/window/gui/GfxDebuggerWindow.h
+126 −72 src/window/gui/Gui.cpp
+11 −2 src/window/gui/Gui.h
+6 −46 src/window/gui/GuiElement.cpp
+3 −8 src/window/gui/GuiElement.h
+46 −1 src/window/gui/GuiMenuBar.cpp
+10 −1 src/window/gui/GuiMenuBar.h
+67 −2 src/window/gui/GuiWindow.cpp
+12 −1 src/window/gui/GuiWindow.h
+3 −5 src/window/gui/InputEditorWindow.cpp
+0 −2 src/window/gui/StatsWindow.cpp
5 changes: 4 additions & 1 deletion soh/include/variables.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ extern "C"
extern u16 gBuildVersionMajor;
extern u16 gBuildVersionMinor;
extern u16 gBuildVersionPatch;
extern u8 gBuildTeam[];
extern u8 gGitBranch[];
extern u8 gGitCommitHash[];
extern u8 gGitCommitTag[];
extern u8 gBuildTeam[];
extern u8 gBuildDate[];
extern u8 gBuildMakeOption[];
extern OSMesgQueue gPiMgrCmdQ;
Expand Down
1 change: 0 additions & 1 deletion soh/include/z64actor.h
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,6 @@ typedef struct EnItem00 {
/* 0x15C */ f32 scale;
/* 0x160 */ ColliderCylinder collider;
// #region SOH [Randomizer]
GetItemEntry randoGiEntry;
RandomizerCheck randoCheck;
RandomizerInf randoInf;
/* */ s16 ogParams;
Expand Down
4 changes: 2 additions & 2 deletions soh/include/z64save.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ typedef enum { // Pre-existing IDs for save sections in base code
SECTION_ID_STATS,
SECTION_ID_ENTRANCES,
SECTION_ID_SCENES,
SECTION_ID_TRACKER_DATA,
SECTION_ID_MAX
} SaveFuncIDs;

Expand Down Expand Up @@ -279,11 +280,10 @@ typedef struct {
/* */ u8 pendingIceTrapCount;
/* */ SohStats sohStats;
/* */ FaroresWindData backupFW;
/* */ RandomizerCheckTrackerData checkTrackerData[RC_MAX];
// #endregion
// #region SOH [Randomizer]
// Upstream TODO: Move these to their own struct or name to more obviously specific to Randomizer
/* */ u16 randomizerInf[RAND_INF_MAX / 16];
/* */ u16 randomizerInf[26];
/* */ u8 mqDungeonCount;
/* */ u16 adultTradeItems;
/* */ u8 triforcePiecesCollected;
Expand Down
2 changes: 2 additions & 0 deletions soh/soh/CrashHandlerExt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ extern "C" void CrashHandler_PrintSohData(char* buffer, size_t* pos) {
char intCharBuffer[16];
append_line(buffer, pos, "Build Information:");
WRITE_VAR_LINE(buffer, pos, "Game Version: ", (const char*)gBuildVersion);
WRITE_VAR_LINE(buffer, pos, "Git Branch: ", (const char*)gGitBranch);
WRITE_VAR_LINE(buffer, pos, "Git Commit: ", (const char*)gGitCommitHash);
WRITE_VAR_LINE(buffer, pos, "Build Date: ", (const char*)gBuildDate);

if (gPlayState != nullptr) {
Expand Down
58 changes: 58 additions & 0 deletions soh/soh/Enhancements/TimeSavers/FasterHeavyBlockLift.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#include "soh/Enhancements/game-interactor/GameInteractor.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include "soh/OTRGlobals.h"
#include "spdlog/spdlog.h"

extern "C" {
#include "z64save.h"
#include "macros.h"
#include "variables.h"
#include "functions.h"
extern PlayState* gPlayState;
extern SaveContext gSaveContext;
}

/**
* This primarily handles speeding up the heavy block lifts (OGC and in the Fire Trial) but also handles skipping
* the one point cutscene since the two options are so similar in what they do.
*/
void FasterHeavyBlockLift_Register() {
REGISTER_VB_SHOULD(VB_PLAY_ONEPOINT_ACTOR_CS, {
Actor* actor = static_cast<Actor*>(opt);

if (
actor->id == ACTOR_BG_HEAVY_BLOCK &&
(CVarGetInteger(CVAR_ENHANCEMENT("FasterHeavyBlockLift"), 0) || CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.OnePoint"), IS_RANDO))
) {
*should = false;
}
});

REGISTER_VB_SHOULD(VB_FREEZE_LINK_FOR_BLOCK_THROW, {
if (CVarGetInteger(CVAR_ENHANCEMENT("FasterHeavyBlockLift"), 0) || CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.OnePoint"), IS_RANDO)) {
*should = false;
}
});

REGISTER_VB_SHOULD(VB_PLAY_THROW_ANIMATION, {
Player *player = GET_PLAYER(gPlayState);
Actor* interactRangeActor = player->interactRangeActor;
s32 interactActorId = interactRangeActor->id;
LinkAnimationHeader* anim = static_cast<LinkAnimationHeader*>(opt);

// Same actor is used for small and large silver rocks, use actor params to identify large ones
bool isLargeSilverRock = interactActorId == ACTOR_EN_ISHI && interactRangeActor->params & 1 == 1;
if (CVarGetInteger(CVAR_ENHANCEMENT("FasterHeavyBlockLift"), 0) && (isLargeSilverRock || interactActorId == ACTOR_BG_HEAVY_BLOCK)) {
*should = false;
LinkAnimation_PlayOnceSetSpeed(gPlayState, &player->skelAnime, anim, 5.0f);
}
});

REGISTER_VB_SHOULD(VB_MOVE_THROWN_ACTOR, {
if (CVarGetInteger(CVAR_ENHANCEMENT("FasterHeavyBlockLift"), 0)) {
Actor* heldActor = static_cast<Actor*>(opt);

heldActor->shape.rot.x -= 3510;
}
});
}
27 changes: 14 additions & 13 deletions soh/soh/Enhancements/TimeSavers/SkipCutscene/Story/SkipBlueWarp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@ extern "C" {
*/
void SkipBlueWarp_ShouldPlayTransitionCS(GIVanillaBehavior _, bool* should, void* opt) {
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Story"), IS_RANDO)) {
uint8_t isBlueWarp = 0;
uint8_t isBlueWarpCutscene = 0;
// Deku Tree Blue warp
if (gSaveContext.entranceIndex == ENTR_KOKIRI_FOREST_0 && gSaveContext.cutsceneIndex == 0xFFF1) {
gSaveContext.entranceIndex = ENTR_KOKIRI_FOREST_11;
isBlueWarp = 1;
isBlueWarpCutscene = 1;
// Dodongo's Cavern Blue warp
} else if (gSaveContext.entranceIndex == ENTR_DEATH_MOUNTAIN_TRAIL_0 && gSaveContext.cutsceneIndex == 0xFFF1) {
gSaveContext.entranceIndex = ENTR_DEATH_MOUNTAIN_TRAIL_5;
isBlueWarp = 1;
isBlueWarpCutscene = 1;
// Jabu Jabu's Blue warp
} else if (gSaveContext.entranceIndex == ENTR_ZORAS_FOUNTAIN_0 && gSaveContext.cutsceneIndex == 0xFFF0) {
gSaveContext.entranceIndex = ENTR_ZORAS_FOUNTAIN_0;
isBlueWarp = 1;
isBlueWarpCutscene = 1;
// Forest Temple Blue warp
} else if (gSaveContext.entranceIndex == ENTR_CHAMBER_OF_THE_SAGES_0 && gSaveContext.cutsceneIndex == 0x0 && gSaveContext.chamberCutsceneNum == CHAMBER_CS_FOREST) {
// Normally set in the blue warp cutscene
Expand All @@ -43,44 +43,45 @@ void SkipBlueWarp_ShouldPlayTransitionCS(GIVanillaBehavior _, bool* should, void
gSaveContext.entranceIndex = ENTR_KOKIRI_FOREST_12;
}

isBlueWarp = 1;
isBlueWarpCutscene = 1;
// Fire Temple Blue warp
} else if (gSaveContext.entranceIndex == ENTR_KAKARIKO_VILLAGE_0 && gSaveContext.cutsceneIndex == 0xFFF3) {
// Normally set in the blue warp cutscene
Flags_SetEventChkInf(EVENTCHKINF_DEATH_MOUNTAIN_ERUPTED);

gSaveContext.entranceIndex = ENTR_DEATH_MOUNTAIN_CRATER_5;
isBlueWarp = 1;
isBlueWarpCutscene = 1;
// Water Temple Blue warp
} else if (gSaveContext.entranceIndex == ENTR_CHAMBER_OF_THE_SAGES_0 && gSaveContext.cutsceneIndex == 0x0 && gSaveContext.chamberCutsceneNum == CHAMBER_CS_WATER) {
// Normally set in the blue warp cutscene
gSaveContext.dayTime = gSaveContext.skyboxTime = 0x4800;
Flags_SetEventChkInf(EVENTCHKINF_RAISED_LAKE_HYLIA_WATER);

gSaveContext.entranceIndex = ENTR_LAKE_HYLIA_9;
isBlueWarp = 1;
isBlueWarpCutscene = 1;
// Spirit Temple Blue warp
} else if (gSaveContext.entranceIndex == ENTR_CHAMBER_OF_THE_SAGES_0 && gSaveContext.cutsceneIndex == 0x0 && gSaveContext.chamberCutsceneNum == CHAMBER_CS_SPIRIT) {
gSaveContext.entranceIndex = ENTR_DESERT_COLOSSUS_8;
isBlueWarp = 1;
isBlueWarpCutscene = 1;
// Shadow Temple Blue warp
} else if (gSaveContext.entranceIndex == ENTR_CHAMBER_OF_THE_SAGES_0 && gSaveContext.cutsceneIndex == 0x0 && gSaveContext.chamberCutsceneNum == CHAMBER_CS_SHADOW) {
gSaveContext.entranceIndex = ENTR_GRAVEYARD_8;
isBlueWarp = 1;
isBlueWarpCutscene = 1;
}

if (isBlueWarp) {
if (isBlueWarpCutscene) {
if (gSaveContext.entranceIndex != ENTR_LAKE_HYLIA_9) {
// Normally set in the blue warp cutscene
gSaveContext.dayTime = gSaveContext.skyboxTime = 0x8000;
}

*should = false;
gSaveContext.cutsceneIndex = 0;
}

if (IS_RANDO && (RAND_GET_OPTION(RSK_SHUFFLE_DUNGEON_ENTRANCES) != RO_DUNGEON_ENTRANCE_SHUFFLE_OFF || RAND_GET_OPTION(RSK_SHUFFLE_BOSS_ENTRANCES) != RO_BOSS_ROOM_ENTRANCE_SHUFFLE_OFF)) {
Entrance_OverrideBlueWarp();
}
// This is outside the above condition because we want to handle both first and following visits to the blue warp
if (IS_RANDO && (RAND_GET_OPTION(RSK_SHUFFLE_DUNGEON_ENTRANCES) != RO_DUNGEON_ENTRANCE_SHUFFLE_OFF || RAND_GET_OPTION(RSK_SHUFFLE_BOSS_ENTRANCES) != RO_BOSS_ROOM_ENTRANCE_SHUFFLE_OFF)) {
Entrance_OverrideBlueWarp();
}
}
}
Expand Down
1 change: 1 addition & 0 deletions soh/soh/Enhancements/TimeSavers/TimeSavers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ void TimeSavers_Register() {
SkipIntro_Register();
// SkipMiscInteractions
MoveMidoInKokiriForest_Register();
FasterHeavyBlockLift_Register();
}
1 change: 1 addition & 0 deletions soh/soh/Enhancements/TimeSavers/TimeSavers.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ void TimeSavers_Register();
void SkipIntro_Register();
// SkipMiscInteractions
void MoveMidoInKokiriForest_Register();
void FasterHeavyBlockLift_Register();

#endif // TIME_SAVERS_H
7 changes: 0 additions & 7 deletions soh/soh/Enhancements/audio/AudioEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -424,12 +424,6 @@ void AudioEditor::InitElement() {
void AudioEditor::DrawElement() {
AudioCollection::Instance->InitializeShufflePool();

ImGui::SetNextWindowSize(ImVec2(820, 630), ImGuiCond_FirstUseEver);
if (!ImGui::Begin("Audio Editor", &mIsVisible)) {
ImGui::End();
return;
}

float buttonSegments = ImGui::GetContentRegionAvail().x / 4;
if (ImGui::Button("Randomize All Groups", ImVec2(buttonSegments, 30.0f))) {
AudioEditor_RandomizeAll();
Expand Down Expand Up @@ -700,7 +694,6 @@ void AudioEditor::DrawElement() {

ImGui::EndTabBar();
}
ImGui::End();
}

std::vector<SeqType> allTypes = { SEQ_BGM_WORLD, SEQ_BGM_EVENT, SEQ_BGM_BATTLE, SEQ_OCARINA, SEQ_FANFARE, SEQ_INSTRUMENT, SEQ_SFX, SEQ_VOICE };
Expand Down
Loading