Merge remote-tracking branch 'origin/develop' into merge-develop-rika

This commit is contained in:
Archez
2024-07-11 22:05:15 -04:00
68 changed files with 1285 additions and 1681 deletions
+1 -1
View File
@@ -32,7 +32,7 @@ endif()
set(GFX_DEBUG_DISASSEMBLER ON)
# Tell LUS we're using F3DEX_GBI_2 (in a way that doesn't break libgfxd)
set(USE_F3DEX2 ON)
set(GBI_UCODE F3DEX_GBI_2)
################################################################################
# Set target arch type if empty. Visual studio solution generator provides it.
+229
View File
@@ -0,0 +1,229 @@
# Building 2 Ship 2 Harkinian
## Windows
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
* 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.
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.
1. Clone the 2 Ship 2 Harkinian repository
_Note: Be sure to either clone with the ``--recursive`` flag or do ``git submodule init`` after cloning to pull in the libultraship submodule!_
2. Place one or more [compatible](#compatible-roms) roms in the `OTRExporter` directory with namings of your choice
_Note: Instructions assume using powershell_
```powershell
# Navigate to the 2ship2harkinian repo within powershell. ie: cd "C:\yourpath\2ship2harkinian"
cd 2ship2harkinian
# 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
# 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
& 'C:\Program Files\CMake\bin\cmake.exe' --build .\build\x64 # --config Release (if you're packaging)
# Now you can run the executable in .\build\x64
# If you need to clean the project you can run
& 'C:\Program Files\CMake\bin\cmake.exe' --build .\build\x64 --target clean
# If you need to regenerate the asset headers to check them into source
& 'C:\Program Files\CMake\bin\cmake.exe' --build .\build\x64 --target ExtractAssetHeaders
# If you need a newer 2ship.o2r only
& 'C:\Program Files\CMake\bin\cmake.exe' --build .\build\x64 --target Generate2ShipOtr
```
### Developing 2S2H
With the cmake build system you have two options for working on the project:
#### Visual Studio
To develop using Visual Studio you only need to use cmake to generate the solution file:
```powershell
# Generates 2s2h.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
```
#### Visual Studio Code or another editor
To develop using Visual Studio Code or another editor you only need to open the repository in it.
To build you'll need to follow the instructions from the building section.
_Note: If you're using Visual Studio Code, the [cpack plugin](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools) makes it very easy to just press run and debug._
_Experimental: You can also use another build system entirely rather than MSVC like [Ninja](https://ninja-build.org/) for possibly better performance._
### Generating the distributable
After compiling the project you can generate the distributable by running:
```powershell
# Go to build folder
cd "build/x64"
# Generate
& 'C:\Program Files\CMake\bin\cpack.exe' -G ZIP
```
## Linux
### Install dependencies
#### Debian/Ubuntu
```sh
# using gcc
apt-get install gcc g++ git cmake ninja-build lsb-release libsdl2-dev libpng-dev libsdl2-net-dev libzip-dev zipcmp zipmerge ziptool nlohmann-json3-dev libtinyxml2-dev libspdlog-dev libboost-dev libopengl-dev
# or using clang
apt-get install clang git cmake ninja-build lsb-release libsdl2-dev libpng-dev libsdl2-net-dev libzip-dev zipcmp zipmerge ziptool nlohmann-json3-dev libtinyxml2-dev libspdlog-dev libboost-dev libopengl-dev
```
#### Arch
```sh
# using gcc
pacman -S gcc git cmake ninja lsb-release sdl2 libpng libzip nlohmann-json tinyxml2 spdlog sdl2_net boost
# or using clang
pacman -S clang git cmake ninja lsb-release sdl2 libpng libzip nlohmann-json tinyxml2 spdlog sdl2_net boost
```
#### Fedora
```sh
# using gcc
dnf install gcc gcc-c++ git cmake ninja-build lsb_release SDL2-devel libpng-devel libzip-devel libzip-tools nlohmann-json-devel tinyxml2-devel spdlog-devel boost-devel
# or using clang
dnf install clang git cmake ninja-build lsb_release SDL2-devel libpng-devel libzip-devel libzip-tools nlohmann-json-devel tinyxml2-devel spdlog-devel boost-devel
```
#### openSUSE
```sh
# using gcc
zypper in gcc gcc-c++ git cmake ninja SDL2-devel libpng16-devel libzip-devel libzip-tools nlohmann_json-devel tinyxml2-devel spdlog-devel
# or using clang
zypper in clang libstdc++-devel git cmake ninja SDL2-devel libpng16-devel libzip-devel libzip-tools nlohmann_json-devel tinyxml2-devel spdlog-devel
```
### Build
_Note: If you're using Visual Studio Code, the [CMake Tools plugin](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools) makes it very easy to just press run and debug._
```bash
# Clone the repo and enter the directory
git clone https://github.com/HarbourMasters/2ship2harkinian.git
cd 2ship2harkinian
# Clone the submodules
git submodule update --init
# Generate Ninja project
cmake -H. -Bbuild-cmake -GNinja # -DCMAKE_BUILD_TYPE:STRING=Release (if you're packaging) -DPython3_EXECUTABLE=$(which python3) (if you are using non-standard Python installations such as PyEnv)
# Generate 2ship.o2r
cmake --build build-cmake --target Generate2ShipOtr
# Compile the project
cmake --build build-cmake # --config Release (if you're packaging)
# Now you can run the executable in ./build-cmake/mm/2s2h.elf
# To develop the project open the repository in VSCode (or your preferred editor)
```
### Generate a distributable
After compiling the project you can generate a distributable by running of the following:
```bash
# Go to build folder
cd build-cmake
# Generate
cpack -G DEB
cpack -G ZIP
cpack -G External (creates appimage)
```
### Additional CMake Targets
#### Clean
```bash
# If you need to clean the project you can run
cmake --build build-cmake --target clean
```
#### Regenerate Asset Headers
```bash
# If you need to regenerate the asset headers to check them into source
cp <path to your ROM> OTRExporter
cmake --build build-cmake --target ExtractAssetHeaders
```
## macOS
Requires Xcode (or xcode-tools) && `sdl2, libpng, glew, ninja, cmake, nlohmann-json, libzip` (can be installed via homebrew, macports, etc)
**Important: For maximum performance make sure you have ninja build tools installed!**
_Note: If you're using Visual Studio Code, the [cpack plugin](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools) makes it very easy to just press run and debug._
```bash
# Clone the repo
git clone https://github.com/HarbourMasters/2ship2harkinian.git
cd 2ship2harkinian
# Clone the submodule libultraship
git submodule update --init
# Copy the baserom to the OTRExporter folder
cp <path to your ROM> OTRExporter
# Generate Ninja project
cmake -H. -Bbuild-cmake -GNinja # -DCMAKE_BUILD_TYPE:STRING=Release (if you're packaging)
# Extract assets & generate OTR (run this anytime you need to regenerate OTR)
cmake --build build-cmake --target ExtractAssets
# Compile the project
cmake --build build-cmake # --config Release (if you're packaging)
# Now you can run the executable file:
./build-cmake/mm/2s2h-macos
# To develop the project open the repository in VSCode (or your preferred editor)
# If you need to clean the project you can run
cmake --build build-cmake --target clean
# If you need to regenerate the asset headers to check them into source
cmake --build build-cmake --target ExtractAssetHeaders
# If you need a newer 2ship.o2r only
cmake --build build-cmake --target Generate2ShipOtr
```
### Generating a distributable
After compiling the project you can generate a distributable by running of the following:
```bash
# Go to build folder
cd build-cmake
# Generate
cpack
```
# Compatible Roms
See [`supportedHashes.json`](supportedHashes.json)
## Getting CI to work on your fork
The CI works via [Github Actions](https://github.com/features/actions) where we mostly make use of machines hosted by Github; except for the very first step of the CI process called "Extract assets". This steps extracts assets from the game file and generates an "assets" folder in `mm/`.
To get this step working on your fork, you'll need to add a machine to your own repository as a self-hosted runner via "Settings > Actions > Runners" in your repository settings. Make sure to add the 'asset-builder' tag to your newly added runner to assign it to run this step. To setup your runner as a service read the docs [here](https://docs.github.com/en/actions/hosting-your-own-runners/configuring-the-self-hosted-runner-application-as-a-service?platform=linux).
### Runner on Windows
You'll have to enable the ability to run unsigned scripts through PowerShell. To do this, open Powershell as administrator and run `set-executionpolicy remotesigned`. Most dependencies get installed as part of the CI process. You will also need to separately install 7z and add it to the PATH so `7z` can be run as a command. [Chocolatey](https://chocolatey.org/) or other package managers can be used to install it easily.
### Runner on UNIX systems
If you're on macOS or Linux take a look at `macports-deps.txt` or `apt-deps.txt` to see the dependencies expected to be on your machine.
+1 -1
View File
@@ -7,4 +7,4 @@
"name": "NTSC-U GC",
"sha1": "9743aa026e9269b339eb0e3044cd5830a440c1fd"
}
]
]
+93 -19
View File
@@ -10,8 +10,10 @@
#include "2s2h/Enhancements/Enhancements.h"
#include "2s2h/Enhancements/Graphics/MotionBlur.h"
#include "2s2h/Enhancements/Graphics/PlayAsKafei.h"
#include "2s2h/Enhancements/Modes/TimeMovesWhenYouMove.h"
#include "2s2h/DeveloperTools/DeveloperTools.h"
#include "2s2h/DeveloperTools/WarpPoint.h"
#include "2s2h/Enhancements/Cheats/Cheats.h"
#include "2s2h/Enhancements/Player/Player.h"
#include "HudEditor.h"
extern "C" {
@@ -38,10 +40,9 @@ static const std::unordered_map<Ship::AudioBackend, const char*> audioBackendsMa
};
static std::unordered_map<Ship::WindowBackend, const char*> windowBackendsMap = {
{ Ship::WindowBackend::DX11, "DirectX" },
{ Ship::WindowBackend::SDL_OPENGL, "OpenGL" },
{ Ship::WindowBackend::SDL_METAL, "Metal" },
{ Ship::WindowBackend::GX2, "GX2" }
{ Ship::WindowBackend::FAST3D_DXGI_DX11, "DirectX" },
{ Ship::WindowBackend::FAST3D_SDL_OPENGL, "OpenGL" },
{ Ship::WindowBackend::FAST3D_SDL_METAL, "Metal" },
};
static const std::unordered_map<int32_t, const char*> clockTypeOptions = {
@@ -63,7 +64,7 @@ Ship::WindowBackend configWindowBackend;
void UpdateWindowBackendObjects() {
Ship::WindowBackend runningWindowBackend = Ship::Context::GetInstance()->GetWindow()->GetWindowBackend();
int32_t configWindowBackendId = Ship::Context::GetInstance()->GetConfig()->GetInt("Window.Backend.Id", -1);
if (configWindowBackendId != -1 && configWindowBackendId < static_cast<int>(Ship::WindowBackend::BACKEND_COUNT)) {
if (Ship::Context::GetInstance()->GetWindow()->IsAvailableWindowBackend(configWindowBackendId)) {
configWindowBackend = static_cast<Ship::WindowBackend>(configWindowBackendId);
} else {
configWindowBackend = runningWindowBackend;
@@ -211,19 +212,21 @@ void DrawSettingsMenu() {
{ // FPS Slider
constexpr unsigned int minFps = 20;
static unsigned int maxFps;
if (Ship::Context::GetInstance()->GetWindow()->GetWindowBackend() == Ship::WindowBackend::DX11) {
if (Ship::Context::GetInstance()->GetWindow()->GetWindowBackend() ==
Ship::WindowBackend::FAST3D_DXGI_DX11) {
maxFps = 360;
} else {
maxFps = Ship::Context::GetInstance()->GetWindow()->GetCurrentRefreshRate();
}
unsigned int currentFps =
std::max(std::min(OTRGlobals::Instance->GetInterpolationFPS(), maxFps), minFps);
bool matchingRefreshRate =
CVarGetInteger("gMatchRefreshRate", 0) &&
Ship::Context::GetInstance()->GetWindow()->GetWindowBackend() != Ship::WindowBackend::DX11;
bool matchingRefreshRate = CVarGetInteger("gMatchRefreshRate", 0) &&
Ship::Context::GetInstance()->GetWindow()->GetWindowBackend() !=
Ship::WindowBackend::FAST3D_DXGI_DX11;
UIWidgets::CVarSliderInt((currentFps == 20) ? "FPS: Original (20)" : "FPS: %d", "gInterpolationFPS",
minFps, maxFps, 20, { .disabled = matchingRefreshRate });
if (Ship::Context::GetInstance()->GetWindow()->GetWindowBackend() == Ship::WindowBackend::DX11) {
if (Ship::Context::GetInstance()->GetWindow()->GetWindowBackend() ==
Ship::WindowBackend::FAST3D_DXGI_DX11) {
UIWidgets::Tooltip(
"Uses Matrix Interpolation to create extra frames, resulting in smoother graphics. This is "
"purely visual and does not impact game logic, execution of glitches etc.\n\n A higher target "
@@ -235,7 +238,8 @@ void DrawSettingsMenu() {
}
} // END FPS Slider
if (Ship::Context::GetInstance()->GetWindow()->GetWindowBackend() == Ship::WindowBackend::DX11) {
if (Ship::Context::GetInstance()->GetWindow()->GetWindowBackend() ==
Ship::WindowBackend::FAST3D_DXGI_DX11) {
// UIWidgets::Spacer(0);
if (ImGui::Button("Match Refresh Rate")) {
int hz = Ship::Context::GetInstance()->GetWindow()->GetCurrentRefreshRate();
@@ -249,7 +253,8 @@ void DrawSettingsMenu() {
}
UIWidgets::Tooltip("Matches interpolation value to the current game's window refresh rate");
if (Ship::Context::GetInstance()->GetWindow()->GetWindowBackend() == Ship::WindowBackend::DX11) {
if (Ship::Context::GetInstance()->GetWindow()->GetWindowBackend() ==
Ship::WindowBackend::FAST3D_DXGI_DX11) {
UIWidgets::CVarSliderInt(CVarGetInteger("gExtraLatencyThreshold", 80) == 0 ? "Jitter fix: Off"
: "Jitter fix: >= %d FPS",
"gExtraLatencyThreshold", 0, 360, 80);
@@ -334,7 +339,6 @@ extern std::shared_ptr<HudEditorWindow> mHudEditorWindow;
void DrawEnhancementsMenu() {
if (UIWidgets::BeginMenu("Enhancements")) {
if (UIWidgets::BeginMenu("Camera")) {
ImGui::SeparatorText("Fixes");
UIWidgets::CVarCheckbox(
@@ -465,6 +469,10 @@ void DrawEnhancementsMenu() {
{ .tooltip = "Playing the Song Of Time will not reset the Sword back to Kokiri Sword." });
UIWidgets::CVarCheckbox("Do not reset Rupees", "gEnhancements.Cycle.DoNotResetRupees",
{ .tooltip = "Playing the Song Of Time will not reset the your rupees." });
UIWidgets::CVarCheckbox(
"Do not reset Time Speed", "gEnhancements.Cycle.DoNotResetTimeSpeed",
{ .tooltip =
"Playing the Song Of Time will not reset the current time speed set by Inverted Song of Time." });
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(255, 255, 0, 255));
ImGui::SeparatorText("Unstable");
@@ -477,7 +485,11 @@ void DrawEnhancementsMenu() {
ImGui::EndMenu();
}
if (UIWidgets::BeginMenu("Dialogues")) {
if (UIWidgets::BeginMenu("Dialogue")) {
UIWidgets::CVarCheckbox(
"Fast Bank Selection", "gEnhancements.Dialogue.FastBankSelection",
{ .tooltip = "Pressing the Z or R buttons while the Deposit/Withdrawl Rupees dialogue is open will set "
"the Rupees to Links current Rupees or 0 respectively." });
UIWidgets::CVarCheckbox(
"Fast Text", "gEnhancements.Dialogue.FastText",
{ .tooltip = "Speeds up text rendering, and enables holding of B progress to next message" });
@@ -492,6 +504,12 @@ void DrawEnhancementsMenu() {
ImGui::EndMenu();
}
if (UIWidgets::BeginMenu("Equipment")) {
UIWidgets::CVarCheckbox("Fast Magic Arrow Equip Animation", "gEnhancements.Equipment.MagicArrowEquipSpeed",
{ .tooltip = "Removes the animation for equipping Magic Arrows." });
ImGui::EndMenu();
}
if (UIWidgets::BeginMenu("Fixes")) {
UIWidgets::CVarCheckbox("Fix Ammo Count Color", "gFixes.FixAmmoCountEnvColor",
{ .tooltip = "Fixes a missing gDPSetEnvColor, which causes the ammo count to be "
@@ -501,6 +519,10 @@ void DrawEnhancementsMenu() {
{ .tooltip = "Fixes a crash that can occur when performing a HESS or Weirdshot.",
.defaultValue = true });
UIWidgets::CVarCheckbox("Fix Text Control Characters", "gEnhancements.Fixes.ControlCharacters",
{ .tooltip = "Fixes certain control characters not functioning properly "
"depending on their position within the text." });
ImGui::EndMenu();
}
@@ -515,11 +537,48 @@ void DrawEnhancementsMenu() {
"model and texture on the boot logo start screen" });
UIWidgets::CVarCheckbox("Bow Reticle", "gEnhancements.Graphics.BowReticle",
{ .tooltip = "Gives the bow a reticle when you draw an arrow" });
UIWidgets::CVarCheckbox(
"Disable Black Bar Letterboxes", "gEnhancements.Graphics.DisableBlackBars",
{ .tooltip = "Disables Black Bar Letterboxes during cutscenes and Z-targeting\nNote: there may be "
"minor visual glitches that were covered up by the black bars\nPlease disable this "
"setting before reporting a bug" });
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(255, 255, 0, 255));
ImGui::SeparatorText("Unstable");
ImGui::PopStyleColor();
UIWidgets::CVarCheckbox(
"Disable Scene Geometry Distance Check", "gEnhancements.Graphics.DisableSceneGeometryDistanceCheck",
{ .tooltip =
"Disables the distance check for scene geometry, allowing it to be drawn no matter how far "
"away it is from the player. This may have unintended side effects." });
// BENTODO: Not implemented yet
// UIWidgets::CVarCheckbox("Widescreen Actor Culling",
// "gEnhancements.Graphics.ActorCullingAccountsForWidescreen",
// { .tooltip = "Adjusts the culling planes to account for widescreen resolutions. "
// "This may have unintended side effects." });
if (UIWidgets::CVarSliderInt(
"Increase Actor Draw Distance: %dx", "gEnhancements.Graphics.IncreaseActorDrawDistance", 1, 5, 1,
{ .tooltip =
"Increase the range in which Actors are drawn. This may have unintended side effects." })) {
CVarSetInteger("gEnhancements.Graphics.IncreaseActorUpdateDistance",
MIN(CVarGetInteger("gEnhancements.Graphics.IncreaseActorDrawDistance", 1),
CVarGetInteger("gEnhancements.Graphics.IncreaseActorUpdateDistance", 1)));
}
if (UIWidgets::CVarSliderInt(
"Increase Actor Update Distance: %dx", "gEnhancements.Graphics.IncreaseActorUpdateDistance", 1, 5,
1,
{ .tooltip =
"Increase the range in which Actors are updated. This may have unintended side effects." })) {
CVarSetInteger("gEnhancements.Graphics.IncreaseActorDrawDistance",
MAX(CVarGetInteger("gEnhancements.Graphics.IncreaseActorDrawDistance", 1),
CVarGetInteger("gEnhancements.Graphics.IncreaseActorUpdateDistance", 1)));
}
ImGui::EndMenu();
}
if (UIWidgets::BeginMenu("Masks")) {
UIWidgets::CVarCheckbox("Blast Mask has Powder Keg Force", "gEnhancements.Masks.BlastMaskKeg");
UIWidgets::CVarCheckbox("Fast Transformation", "gEnhancements.Masks.FastTransformation");
UIWidgets::CVarCheckbox("Fierce Deity's Mask Anywhere", "gEnhancements.Masks.FierceDeitysAnywhere",
{ .tooltip = "Allow using Fierce Deity's mask outside of boss rooms." });
@@ -538,12 +597,22 @@ void DrawEnhancementsMenu() {
if (UIWidgets::BeginMenu("Modes")) {
UIWidgets::CVarCheckbox("Play As Kafei", "gModes.PlayAsKafei",
{ .tooltip = "Requires scene reload to take effect." });
if (UIWidgets::CVarCheckbox("Time Moves When You Move", "gModes.TimeMovesWhenYouMove")) {
RegisterTimeMovesWhenYouMove();
}
ImGui::EndMenu();
}
if (UIWidgets::BeginMenu("Player Movement")) {
UIWidgets::CVarSliderInt("Climb speed", "gEnhancements.PlayerMovement.ClimbSpeed", 1, 5, 1,
if (UIWidgets::BeginMenu("Player")) {
UIWidgets::CVarSliderInt("Climb speed", "gEnhancements.Player.ClimbSpeed", 1, 5, 1,
{ .tooltip = "Increases the speed at which Link climbs vines and ladders." });
if (UIWidgets::CVarCheckbox("Fast Deku Flower Launch", "gEnhancements.Player.FastFlowerLaunch",
{ .tooltip =
"Speeds up the time it takes to be able to get maximum height from "
"launching out of a deku flower" })) {
RegisterFastFlowerLaunch();
}
UIWidgets::CVarCheckbox("Instant Putaway", "gEnhancements.Player.InstantPutaway",
{ .tooltip = "Allows Link to instantly puts away held item without waiting." });
ImGui::EndMenu();
}
@@ -592,13 +661,18 @@ void DrawCheatsMenu() {
UIWidgets::CVarCheckbox("Infinite Magic", "gCheats.InfiniteMagic");
UIWidgets::CVarCheckbox("Infinite Rupees", "gCheats.InfiniteRupees");
UIWidgets::CVarCheckbox("Infinite Consumables", "gCheats.InfiniteConsumables");
if (UIWidgets::CVarCheckbox(
"Longer Deku Flower Glide", "gCheats.LongerFlowerGlide",
{ .tooltip = "Allows Deku Link to glide longer, no longer dropping after a certain distance" })) {
RegisterLongerFlowerGlide();
}
UIWidgets::CVarCheckbox("No Clip", "gCheats.NoClip");
UIWidgets::CVarCheckbox("Unbreakable Razor Sword", "gCheats.UnbreakableRazorSword");
UIWidgets::CVarCheckbox("Unrestricted Items", "gCheats.UnrestrictedItems");
if (UIWidgets::CVarCheckbox("Moon Jump on L", "gCheats.MoonJumpOnL",
{ .tooltip = "Holding L makes you float into the air" })) {
RegisterMoonJumpOnL();
}
UIWidgets::CVarCheckbox("No Clip", "gCheats.NoClip");
ImGui::EndMenu();
}
+3
View File
@@ -17,6 +17,7 @@ HudEditorElement hudEditorElements[HUD_EDITOR_ELEMENT_MAX] = {
HUD_EDITOR_ELEMENT(HUD_EDITOR_ELEMENT_D_PAD, "D-Pad", "DPad", 271, 55, 255, 255, 255, 255),
HUD_EDITOR_ELEMENT(HUD_EDITOR_ELEMENT_MINIMAP, "Minimap", "Minimap", 295, 220, 0, 255, 255, 160),
HUD_EDITOR_ELEMENT(HUD_EDITOR_ELEMENT_START, "Start Button", "Start", 136, 17, 255, 130, 60, 255),
HUD_EDITOR_ELEMENT(HUD_EDITOR_ELEMENT_CARROT, "Horse Carrots", "Carrots", 160, 64, 236, 92, 41, 255),
HUD_EDITOR_ELEMENT(HUD_EDITOR_ELEMENT_CLOCK, "Three Day Clock", "Clock", 160, 206, 255, 255, 255, 255),
HUD_EDITOR_ELEMENT(HUD_EDITOR_ELEMENT_HEARTS, "Hearts", "Hearts", 30, 26, 255, 70, 50, 255),
HUD_EDITOR_ELEMENT(HUD_EDITOR_ELEMENT_MAGIC_METER, "Magic", "Magic", 18, 34, 0, 200, 0, 255),
@@ -206,6 +207,8 @@ void HudEditorWindow::DrawElement() {
HUD_EDITOR_ELEMENT_MODE_MOVABLE_RIGHT);
CVarSetInteger(hudEditorElements[HUD_EDITOR_ELEMENT_START].modeCvar,
HUD_EDITOR_ELEMENT_MODE_MOVABLE_RIGHT);
CVarSetInteger(hudEditorElements[HUD_EDITOR_ELEMENT_CARROT].modeCvar,
HUD_EDITOR_ELEMENT_MODE_MOVABLE_43);
CVarSetInteger(hudEditorElements[HUD_EDITOR_ELEMENT_CLOCK].modeCvar,
HUD_EDITOR_ELEMENT_MODE_MOVABLE_43);
CVarSetInteger(hudEditorElements[HUD_EDITOR_ELEMENT_HEARTS].modeCvar,
+1
View File
@@ -32,6 +32,7 @@ typedef enum {
HUD_EDITOR_ELEMENT_D_PAD,
HUD_EDITOR_ELEMENT_MINIMAP,
HUD_EDITOR_ELEMENT_START,
HUD_EDITOR_ELEMENT_CARROT,
HUD_EDITOR_ELEMENT_CLOCK,
HUD_EDITOR_ELEMENT_HEARTS,
HUD_EDITOR_ELEMENT_MAGIC_METER,
+12 -17
View File
@@ -20,7 +20,6 @@
#else
#include <time.h>
#endif
#include <Array.h>
#include <AudioPlayer.h>
#include "variables.h"
#include "z64.h"
@@ -57,7 +56,6 @@ CrowdControl* CrowdControl::Instance;
#include "2s2h/SaveManager/SaveManager.h"
// Resource Types/Factories
#include "resource/type/Array.h"
#include "resource/type/Blob.h"
#include "resource/type/DisplayList.h"
#include "resource/type/Matrix.h"
@@ -65,6 +63,7 @@ CrowdControl* CrowdControl::Instance;
#include "resource/type/Vertex.h"
#include "2s2h/resource/type/2shResourceType.h"
#include "2s2h/resource/type/Animation.h"
#include "2s2h/resource/type/Array.h"
#include "2s2h/resource/type/AudioSample.h"
#include "2s2h/resource/type/AudioSequence.h"
#include "2s2h/resource/type/AudioSoundFont.h"
@@ -75,13 +74,13 @@ CrowdControl* CrowdControl::Instance;
#include "2s2h/resource/type/Scene.h"
#include "2s2h/resource/type/Skeleton.h"
#include "2s2h/resource/type/SkeletonLimb.h"
#include "resource/factory/ArrayFactory.h"
#include "resource/factory/BlobFactory.h"
#include "resource/factory/DisplayListFactory.h"
#include "resource/factory/MatrixFactory.h"
#include "resource/factory/TextureFactory.h"
#include "resource/factory/VertexFactory.h"
#include "2s2h/resource/importer/AnimationFactory.h"
#include "2s2h/resource/importer/ArrayFactory.h"
#include "2s2h/resource/importer/AudioSampleFactory.h"
#include "2s2h/resource/importer/AudioSequenceFactory.h"
#include "2s2h/resource/importer/AudioSoundFontFactory.h"
@@ -179,10 +178,10 @@ OTRGlobals::OTRGlobals() {
"DisplayList", static_cast<uint32_t>(LUS::ResourceType::DisplayList), 0);
loader->RegisterResourceFactory(std::make_shared<LUS::ResourceFactoryBinaryMatrixV0>(), RESOURCE_FORMAT_BINARY,
"Matrix", static_cast<uint32_t>(LUS::ResourceType::Matrix), 0);
loader->RegisterResourceFactory(std::make_shared<LUS::ResourceFactoryBinaryArrayV0>(), RESOURCE_FORMAT_BINARY,
"Array", static_cast<uint32_t>(LUS::ResourceType::Array), 0);
loader->RegisterResourceFactory(std::make_shared<LUS::ResourceFactoryBinaryBlobV0>(), RESOURCE_FORMAT_BINARY,
"Blob", static_cast<uint32_t>(LUS::ResourceType::Blob), 0);
loader->RegisterResourceFactory(std::make_shared<SOH::ResourceFactoryBinaryArrayV0>(), RESOURCE_FORMAT_BINARY,
"Array", static_cast<uint32_t>(SOH::ResourceType::SOH_Array), 0);
loader->RegisterResourceFactory(std::make_shared<SOH::ResourceFactoryBinaryAnimationV0>(), RESOURCE_FORMAT_BINARY,
"Animation", static_cast<uint32_t>(SOH::ResourceType::SOH_Animation), 0);
loader->RegisterResourceFactory(std::make_shared<SOH::ResourceFactoryBinaryPlayerAnimationV0>(),
@@ -292,7 +291,7 @@ bool OTRGlobals::HasOriginal() {
}
uint32_t OTRGlobals::GetInterpolationFPS() {
if (Ship::Context::GetInstance()->GetWindow()->GetWindowBackend() == Ship::WindowBackend::DX11) {
if (Ship::Context::GetInstance()->GetWindow()->GetWindowBackend() == Ship::WindowBackend::FAST3D_DXGI_DX11) {
return CVarGetInteger("gInterpolationFPS", 20);
}
@@ -309,9 +308,6 @@ struct ExtensionEntry {
std::string ext;
};
extern uintptr_t clearMtx;
extern "C" Mtx gMtxClear;
extern "C" MtxF gMtxFClear;
extern "C" void OTRMessage_Init();
extern "C" void AudioMgr_CreateNextAudioBuffer(s16* samples, u32 num_samples);
extern "C" void AudioPlayer_Play(const uint8_t* buf, uint32_t len);
@@ -478,7 +474,6 @@ extern "C" void InitOTR() {
GfxPatcher_ApplyNecessaryAuthenticPatches();
DebugConsole_Init();
clearMtx = (uintptr_t)&gMtxClear;
OTRMessage_Init();
OTRAudio_Init();
// OTRExtScanner();
@@ -949,8 +944,8 @@ extern "C" char* ResourceMgr_LoadTexOrDListByName(const char* filePath) {
if (res->GetInitData()->Type == static_cast<uint32_t>(LUS::ResourceType::DisplayList))
return (char*)&((std::static_pointer_cast<LUS::DisplayList>(res))->Instructions[0]);
else if (res->GetInitData()->Type == static_cast<uint32_t>(LUS::ResourceType::Array))
return (char*)(std::static_pointer_cast<LUS::Array>(res))->Vertices.data();
else if (res->GetInitData()->Type == static_cast<uint32_t>(SOH::ResourceType::SOH_Array))
return (char*)(std::static_pointer_cast<SOH::Array>(res))->Vertices.data();
else {
return (char*)ResourceGetDataByName(filePath);
}
@@ -1063,30 +1058,30 @@ extern "C" void ResourceMgr_UnpatchGfxByName(const char* path, const char* patch
}
extern "C" char* ResourceMgr_LoadVtxArrayByName(const char* path) {
auto res = std::static_pointer_cast<LUS::Array>(GetResourceByName(path));
auto res = std::static_pointer_cast<SOH::Array>(GetResourceByName(path));
return (char*)res->Vertices.data();
}
extern "C" size_t ResourceMgr_GetVtxArraySizeByName(const char* path) {
auto res = std::static_pointer_cast<LUS::Array>(GetResourceByName(path));
auto res = std::static_pointer_cast<SOH::Array>(GetResourceByName(path));
return res->Vertices.size();
}
extern "C" char* ResourceMgr_LoadArrayByName(const char* path) {
auto res = std::static_pointer_cast<LUS::Array>(GetResourceByName(path));
auto res = std::static_pointer_cast<SOH::Array>(GetResourceByName(path));
return (char*)res->Scalars.data();
}
extern "C" size_t ResourceMgr_GetArraySizeByName(const char* path) {
auto res = std::static_pointer_cast<LUS::Array>(GetResourceByName(path));
auto res = std::static_pointer_cast<SOH::Array>(GetResourceByName(path));
return res->Scalars.size();
}
extern "C" char* ResourceMgr_LoadArrayByNameAsVec3s(const char* path) {
auto res = std::static_pointer_cast<LUS::Array>(GetResourceByName(path));
auto res = std::static_pointer_cast<SOH::Array>(GetResourceByName(path));
// if (res->CachedGameAsset != nullptr)
// return (char*)res->CachedGameAsset;
@@ -155,4 +155,5 @@ void InitDeveloperTools() {
RegisterPreventActorUpdateHooks();
RegisterPreventActorDrawHooks();
RegisterPreventActorInitHooks();
RegisterWarpPoint();
}
+2
View File
@@ -11,6 +11,8 @@ void RegisterDebugSaveCreate();
void RegisterPreventActorUpdateHooks();
void RegisterPreventActorDrawHooks();
void RegisterPreventActorInitHooks();
void RegisterWarpPoint();
void RenderWarpPointSection();
void InitDeveloperTools();
#endif // DEVELOPER_TOOLS_H
+125
View File
@@ -2,6 +2,9 @@
#include "2s2h/BenGui/UIWidgets.hpp"
#include "2s2h/Enhancements/GameInteractor/GameInteractor.h"
#include "interface/icon_item_dungeon_static/icon_item_dungeon_static.h"
#include "archives/icon_item_24_static/icon_item_24_static_yar.h"
extern "C" {
#include <z64.h>
#include <z64save.h>
@@ -462,6 +465,15 @@ void DrawGeneralTab() {
gSaveContext.save.saveInfo.playerData.isMagicAcquired = false;
gSaveContext.save.saveInfo.playerData.isDoubleMagicAcquired = false;
}
ImGui::SameLine();
bool spinAttack = CHECK_WEEKEVENTREG(WEEKEVENTREG_OBTAINED_GREAT_SPIN_ATTACK);
if (UIWidgets::Checkbox("Spin Lv2", &spinAttack, { .color = UIWidgets::Colors::DarkGreen })) {
if (spinAttack) {
SET_WEEKEVENTREG(WEEKEVENTREG_OBTAINED_GREAT_SPIN_ATTACK);
} else {
CLEAR_WEEKEVENTREG(WEEKEVENTREG_OBTAINED_GREAT_SPIN_ATTACK);
}
}
UIWidgets::PushStyleSlider(UIWidgets::Colors::DarkGreen);
if (ImGui::SliderScalar("##magicLevelSlider", ImGuiDataType_S8, &gSaveContext.save.saveInfo.playerData.magicLevel,
&S8_ZERO, &MAGIC_LEVEL_MAX,
@@ -1116,6 +1128,101 @@ void DrawQuestStatusTab() {
ImGui::PopStyleColor(1);
}
void SetDungeonItems(uint32_t dungeonItem, uint32_t dungeonId) {
if (CHECK_DUNGEON_ITEM(dungeonItem, dungeonId)) {
REMOVE_DUNGEON_ITEM(dungeonItem, dungeonId);
} else {
SET_DUNGEON_ITEM(dungeonItem, dungeonId);
}
}
const char* dungeonNames[4] = { "Woodfall Temple", "Snowhead Temple", "Great Bay Temple", "Stone Tower Temple" };
uint32_t smallKeyCounts[4] = { 1, 3, 1, 4 };
const char* fairyIcons[] = { gDungeonStrayFairyWoodfallIconTex, gDungeonStrayFairySnowheadIconTex,
gDungeonStrayFairyGreatBayIconTex, gDungeonStrayFairyStoneTowerIconTex };
void DrawDungeonItemTab() {
ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(1.0f, 1.0f, 1.0f, 0.0f));
ImGui::PushStyleVar(ImGuiStyleVar_ChildRounding, 3.0f);
ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(8.0f, 8.0f));
ImGui::BeginChild("dungeonTab", ImVec2(0, 0), true);
for (int i = DUNGEON_INDEX_WOODFALL_TEMPLE; i <= DUNGEON_INDEX_STONE_TOWER_TEMPLE; i++) {
std::string stray_id = "Stray" + std::to_string(i);
std::string map_id = "Map" + std::to_string(i);
std::string comp_id = "Compass" + std::to_string(i);
std::string sKey_id = "Small Key" + std::to_string(i);
std::string bKey_id = "Boss Key" + std::to_string(i);
int dungeonId = i;
ImGui::BeginChild(std::to_string(i).c_str(),
ImVec2(INV_GRID_WIDTH * 6 + INV_GRID_PADDING * 2, INV_GRID_HEIGHT * 1.5 + INV_GRID_PADDING),
ImGuiChildFlags_Border);
ImGui::Text(dungeonNames[i]);
if (ImGui::ImageButton(
stray_id.c_str(),
Ship::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(fairyIcons[dungeonId]),
ImVec2(INV_GRID_ICON_SIZE, INV_GRID_ICON_SIZE), ImVec2(0, 0), ImVec2(1, 1), ImVec4(0, 0, 0, 0),
ImVec4(1, 1, 1, gSaveContext.save.saveInfo.inventory.strayFairies[dungeonId] ? 1.0f : 0.4f))) {
ImGui::OpenPopup("strayFairies");
}
ImGui::SameLine();
if (ImGui::ImageButton(
map_id.c_str(),
Ship::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(gQuestIconDungeonMapTex),
ImVec2(INV_GRID_ICON_SIZE, INV_GRID_ICON_SIZE), ImVec2(0, 0), ImVec2(1, 1), ImVec4(0, 0, 0, 0),
ImVec4(1, 1, 1, CHECK_DUNGEON_ITEM(DUNGEON_MAP, i) ? 1.0f : 0.4f))) {
SetDungeonItems(DUNGEON_MAP, i);
}
ImGui::SameLine();
if (ImGui::ImageButton(
comp_id.c_str(),
Ship::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(gQuestIconCompassTex),
ImVec2(INV_GRID_ICON_SIZE, INV_GRID_ICON_SIZE), ImVec2(0, 0), ImVec2(1, 1), ImVec4(0, 0, 0, 0),
ImVec4(1, 1, 1, CHECK_DUNGEON_ITEM(DUNGEON_COMPASS, i) ? 1.0f : 0.4f))) {
SetDungeonItems(DUNGEON_COMPASS, i);
}
ImGui::SameLine();
if (ImGui::ImageButton(
sKey_id.c_str(),
Ship::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(gQuestIconSmallKeyTex),
ImVec2(INV_GRID_ICON_SIZE, INV_GRID_ICON_SIZE), ImVec2(0, 0), ImVec2(1, 1), ImVec4(0, 0, 0, 0),
ImVec4(1, 1, 1, DUNGEON_KEY_COUNT(i) + 1 ? 1.0f : 0.4f))) {
ImGui::OpenPopup("smallKeys");
}
ImGui::SameLine();
if (ImGui::ImageButton(
bKey_id.c_str(),
Ship::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(gQuestIconBossKeyTex),
ImVec2(INV_GRID_ICON_SIZE, INV_GRID_ICON_SIZE), ImVec2(0, 0), ImVec2(1, 1), ImVec4(0, 0, 0, 0),
ImVec4(1, 1, 1, CHECK_DUNGEON_ITEM(DUNGEON_BOSS_KEY, i) ? 1.0f : 0.4f))) {
SetDungeonItems(DUNGEON_BOSS_KEY, i);
}
if (ImGui::BeginPopup("strayFairies")) {
s32 minStray = 0;
s32 maxStray = 15;
int currentStrays = gSaveContext.save.saveInfo.inventory.strayFairies[dungeonId];
if (ImGui::SliderScalar("##strayCount", ImGuiDataType_S32, &currentStrays, &minStray, &maxStray,
"Strays: %d")) {
gSaveContext.save.saveInfo.inventory.strayFairies[dungeonId] = currentStrays;
}
ImGui::EndPopup();
}
if (ImGui::BeginPopup("smallKeys")) {
s32 minKey = -1;
s32 maxKey = smallKeyCounts[dungeonId];
int currentKeys = gSaveContext.save.saveInfo.inventory.dungeonKeys[dungeonId];
if (ImGui::SliderScalar("##sKeyCount", ImGuiDataType_S32, &currentKeys, &minKey, &maxKey,
"Small Keys: %d")) {
gSaveContext.save.saveInfo.inventory.dungeonKeys[dungeonId] = currentKeys;
}
ImGui::EndPopup();
}
ImGui::EndChild();
}
ImGui::EndChild();
ImGui::PopStyleVar(2);
ImGui::PopStyleColor(1);
}
void GetPlayerForm(uint32_t form) {
switch (form) {
case PLAYER_FORM_FIERCE_DEITY:
@@ -1864,6 +1971,11 @@ void SaveEditorWindow::DrawElement() {
ImGui::EndTabItem();
}
if (ImGui::BeginTabItem("Dungeon Items")) {
DrawDungeonItemTab();
ImGui::EndTabItem();
}
if (ImGui::BeginTabItem("Reg Editor")) {
DrawRegEditorTab();
ImGui::EndTabItem();
@@ -1890,6 +2002,15 @@ void SaveEditorWindow::DrawElement() {
ImGui::End();
}
const char* textureLoad[8] = { gDungeonStrayFairyWoodfallIconTex,
gDungeonStrayFairySnowheadIconTex,
gDungeonStrayFairyGreatBayIconTex,
gDungeonStrayFairyStoneTowerIconTex,
gQuestIconDungeonMapTex,
gQuestIconCompassTex,
gQuestIconSmallKeyTex,
gQuestIconBossKeyTex };
void SaveEditorWindow::InitElement() {
initSafeItemsForInventorySlot();
@@ -1897,4 +2018,8 @@ void SaveEditorWindow::InitElement() {
const char* path = static_cast<const char*>(entry);
Ship::Context::GetInstance()->GetWindow()->GetGui()->LoadGuiTexture(path, path, ImVec4(1, 1, 1, 1));
}
for (int i = 0; i <= 7; i++) {
Ship::Context::GetInstance()->GetWindow()->GetGui()->LoadGuiTexture(textureLoad[i], textureLoad[i],
ImVec4(1, 1, 1, 1));
}
}
+54 -10
View File
@@ -1,15 +1,16 @@
#include "WarpPoint.h"
#include <libultraship/libultraship.h>
#include "2s2h/BenGui/UIWidgets.hpp"
#include "window/gui/IconsFontAwesome4.h"
#include "2s2h/Enhancements/GameInteractor/GameInteractor.h"
extern "C" {
#include "z64.h"
#include "macros.h"
#include "functions.h"
#include "overlays/gamestates/ovl_select/z_select.h"
extern PlayState* gPlayState;
extern SaveContext gSaveContext;
extern GameState* gGameState;
}
#define CV "gDeveloperTools.WarpPoint."
@@ -27,6 +28,56 @@ std::unordered_map<s16, const char*> warpPointSceneList = {
#undef DEFINE_SCENE
#undef DEFINE_SCENE_UNSET
void Warp() {
Vec3f pos = { CVarGetFloat(CV "X", 0.0f), CVarGetFloat(CV "Y", 0.0f), CVarGetFloat(CV "Z", 0.0f) };
s32 entrance = CVarGetInteger(CV "Entrance", ENTRANCE(SOUTH_CLOCK_TOWN, 0));
if (gPlayState == NULL) {
// If gPlayState is NULL, it means the the user opted into BootToWarpPoint and the game is starting up. This is
// a hidden cvar for developers, while it is extremely useful for quick testing and debugging, I am not 100%
// confident in it's stability and ability to initialize the game properly in all cases. So for now, I'm going
// to leave it as a hidden cvar. This is incompatible with the SkipToFileSelect enhancement. To enable it open
// the Console and type: `set gDeveloperTools.WarpPoint.BootToWarpPoint 1`
gSaveContext.gameMode = GAMEMODE_NORMAL;
Sram_InitNewSave();
gSaveContext.sceneLayer = 0;
gSaveContext.save.time = CLOCK_TIME(8, 0);
gSaveContext.save.day = 1;
gSaveContext.save.cutsceneIndex = 0;
gSaveContext.save.playerForm = PLAYER_FORM_HUMAN;
gSaveContext.save.linkAge = 0;
gSaveContext.fileNum = 0xFF;
MapSelect_LoadGame((MapSelectState*)gGameState, CVarGetInteger(CV "Entrance", 0), 0);
} else {
// The else case, and the rest of this function is primarly relevant code copied from Play_SetRespawnData and
// func_80169EFC, minus the parts that copy scene flags to scene we are warping to (this is obviously
// undesireable)
gPlayState->nextEntrance = Entrance_Create(entrance >> 9, 0, entrance & 0xF);
gPlayState->transitionTrigger = TRANS_TRIGGER_START;
gPlayState->transitionType = TRANS_TYPE_INSTANT;
}
gSaveContext.respawn[RESPAWN_MODE_DOWN].entrance = Entrance_Create(entrance >> 9, 0, entrance & 0xF);
gSaveContext.respawn[RESPAWN_MODE_DOWN].roomIndex = CVarGetInteger(CV "Room", 0);
gSaveContext.respawn[RESPAWN_MODE_DOWN].pos = pos;
gSaveContext.respawn[RESPAWN_MODE_DOWN].yaw = CVarGetFloat(CV "Rotation", 0.0f);
gSaveContext.respawn[RESPAWN_MODE_DOWN].playerParams = PLAYER_PARAMS(0xFF, PLAYER_INITMODE_D);
gSaveContext.nextTransitionType = TRANS_TYPE_FADE_BLACK_FAST;
gSaveContext.respawnFlag = -8;
}
void RegisterWarpPoint() {
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnConsoleLogoUpdate>([]() {
if (!CVarGetInteger("gEnhancements.Cutscenes.SkipToFileSelect", 0) && CVarGetInteger(CV "BootToWarpPoint", 0) &&
CVarGetInteger(CV "Saved", 0)) {
// Normally called on console logo screen
gSaveContext.seqId = (u8)NA_BGM_DISABLED;
gSaveContext.ambienceId = AMBIENCE_ID_DISABLED;
gSaveContext.gameMode = GAMEMODE_TITLE_SCREEN;
Warp();
}
});
}
void RenderWarpPointSection() {
if (gPlayState == NULL)
return;
@@ -60,14 +111,7 @@ void RenderWarpPointSection() {
}
ImGui::SameLine();
if (UIWidgets::Button("Warp", { .size = UIWidgets::Sizes::Inline })) {
Vec3f pos = { CVarGetFloat(CV "X", 0.0f), CVarGetFloat(CV "Y", 0.0f), CVarGetFloat(CV "Z", 0.0f) };
Play_SetRespawnData(&gPlayState->state, RESPAWN_MODE_DOWN,
CVarGetInteger(CV "Entrance", ENTRANCE(SOUTH_CLOCK_TOWN, 0)),
CVarGetInteger(CV "Room", 0), PLAYER_PARAMS(0xFF, PLAYER_INITMODE_D), &pos,
CVarGetFloat(CV "Rotation", 0.0f));
func_80169EFC(&gPlayState->state);
gSaveContext.respawnFlag = -8;
Warp();
}
}
}
-6
View File
@@ -1,6 +0,0 @@
#ifndef DEVELOPER_TOOLS_WARP_POINT_H
#define DEVELOPER_TOOLS_WARP_POINT_H
void RenderWarpPointSection();
#endif // DEVELOPER_TOOLS_WARP_POINT_H
+2 -2
View File
@@ -214,8 +214,8 @@ void Camera_DebugCam(Camera* camera) {
*eye = *eyeNext;
}
static uint32_t freeCamVBHookId = 0;
static uint32_t freeCamDisableInputsId = 0;
static HOOK_ID freeCamVBHookId = 0;
static HOOK_ID freeCamDisableInputsId = 0;
void RegisterDebugCam() {
sDebugCamRefreshParams = true;
+2 -2
View File
@@ -155,8 +155,8 @@ bool Camera_CanFreeLook(Camera* camera) {
return sCanFreeLook;
}
static uint32_t freeLookCameraSettingChangeHookId = 0;
static uint32_t freeLookCameraVBHookId = 0;
static HOOK_ID freeLookCameraSettingChangeHookId = 0;
static HOOK_ID freeLookCameraVBHookId = 0;
void RegisterCameraFreeLook() {
if (freeLookCameraVBHookId) {
+6
View File
@@ -0,0 +1,6 @@
#ifndef CHEATS_H
#define CHEATS_H
void RegisterLongerFlowerGlide();
#endif // CHEATS_H
@@ -0,0 +1,16 @@
#include <libultraship/bridge.h>
extern "C" {
#include "z64.h";
extern f32 D_8085D958[2];
}
void RegisterLongerFlowerGlide() {
if (CVarGetInteger("gCheats.LongerFlowerGlide", 0)) {
D_8085D958[0] = 99999.9f;
D_8085D958[1] = 99999.9f;
} else {
D_8085D958[0] = 600.0f;
D_8085D958[1] = 960.0f;
}
}
+1 -1
View File
@@ -3,7 +3,7 @@
#include "Enhancements/GameInteractor/GameInteractor.h"
#include "variables.h"
static uint32_t moonJumpOnLGameStateUpdateHookId = 0;
static HOOK_ID moonJumpOnLGameStateUpdateHookId = 0;
void RegisterMoonJumpOnL() {
if (moonJumpOnLGameStateUpdateHookId) {
GameInteractor::Instance->UnregisterGameHook<GameInteractor::OnGameStateUpdate>(
@@ -12,4 +12,5 @@ void RegisterCutscenes() {
RegisterHideTitleCards();
RegisterSkipEntranceCutscenes();
RegisterSkipIntroSequence();
RegisterSkipToFileSelect();
}

Some files were not shown because too many files have changed in this diff Show More