mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-26 03:12:18 -05:00
Merge pull request #4118 from Malkierian/dev-to-rando-5-5
develop -> develop-rando 5-5
This commit is contained in:
commit
a96fe678f8
2
.github/workflows/apt-deps.txt
vendored
2
.github/workflows/apt-deps.txt
vendored
@ -1 +1 @@
|
||||
libusb-dev libusb-1.0-0-dev libsdl2-dev libsdl2-net-dev libpng-dev libglew-dev libzip-dev zipcmp zipmerge ziptool ninja-build
|
||||
libusb-dev libusb-1.0-0-dev libsdl2-dev libsdl2-net-dev libpng-dev libglew-dev libzip-dev zipcmp zipmerge ziptool nlohmann-json3-dev libtinyxml2-dev libspdlog-dev ninja-build
|
||||
|
156
.github/workflows/generate-builds.yml
vendored
156
.github/workflows/generate-builds.yml
vendored
@ -47,6 +47,20 @@ jobs:
|
||||
make -j 10
|
||||
sudo make install
|
||||
sudo cp -av /usr/local/lib/libSDL* /lib/x86_64-linux-gnu/
|
||||
- name: Install latest tinyxml2
|
||||
run: |
|
||||
sudo apt-get remove libtinyxml2-dev
|
||||
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
|
||||
if [ ! -d "tinyxml2-10.0.0" ]; then
|
||||
wget https://github.com/leethomason/tinyxml2/archive/refs/tags/10.0.0.tar.gz
|
||||
tar -xzf 10.0.0.tar.gz
|
||||
fi
|
||||
cd tinyxml2-10.0.0
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ..
|
||||
make
|
||||
sudo make install
|
||||
- name: Generate soh.otr
|
||||
run: |
|
||||
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
|
||||
@ -92,8 +106,8 @@ jobs:
|
||||
if [ -d /opt/local/ ]; then
|
||||
echo "MacPorts already installed"
|
||||
else
|
||||
wget https://github.com/macports/macports-base/releases/download/v2.9.1/MacPorts-2.9.1-12-Monterey.pkg
|
||||
sudo installer -pkg ./MacPorts-2.9.1-12-Monterey.pkg -target /
|
||||
wget https://github.com/macports/macports-base/releases/download/v2.9.3/MacPorts-2.9.3-12-Monterey.pkg
|
||||
sudo installer -pkg ./MacPorts-2.9.3-12-Monterey.pkg -target /
|
||||
fi
|
||||
echo "/opt/local/bin:/opt/local/sbin" >> $GITHUB_PATH
|
||||
- name: Install dependencies
|
||||
@ -190,6 +204,36 @@ jobs:
|
||||
cmake ..
|
||||
make
|
||||
sudo make install
|
||||
- name: Install latest nlohmann
|
||||
if: ${{ (matrix.os == 'ubuntu-20.04' && !vars.LINUX_COMPATIBILITY_RUNNER) }}
|
||||
run: |
|
||||
sudo apt-get remove nlohmann-json3-dev
|
||||
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
|
||||
if [ ! -d "json-3.11.3" ]; then
|
||||
wget https://github.com/nlohmann/json/archive/refs/tags/v3.11.3.tar.gz
|
||||
tar -xzvf v3.11.3.tar.gz
|
||||
fi
|
||||
cd json-3.11.3
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ..
|
||||
make
|
||||
sudo make install
|
||||
- name: Install latest tinyxml2
|
||||
if: ${{ (matrix.os == 'ubuntu-20.04' && !vars.LINUX_COMPATIBILITY_RUNNER) || (matrix.os == 'ubuntu-22.04' && !vars.LINUX_PERFORMANCE_RUNNER) }}
|
||||
run: |
|
||||
sudo apt-get remove libtinyxml2-dev
|
||||
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
|
||||
if [ ! -d "tinyxml2-10.0.0" ]; then
|
||||
wget https://github.com/leethomason/tinyxml2/archive/refs/tags/10.0.0.tar.gz
|
||||
tar -xzf 10.0.0.tar.gz
|
||||
fi
|
||||
cd tinyxml2-10.0.0
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ..
|
||||
make
|
||||
sudo make install
|
||||
- name: Install latest SDL_net
|
||||
if: ${{ (matrix.os == 'ubuntu-20.04' && !vars.LINUX_COMPATIBILITY_RUNNER) || (matrix.os == 'ubuntu-22.04' && !vars.LINUX_PERFORMANCE_RUNNER) }}
|
||||
run: |
|
||||
@ -226,114 +270,6 @@ jobs:
|
||||
path: |
|
||||
soh.appimage
|
||||
readme.txt
|
||||
build-switch:
|
||||
needs: generate-soh-otr
|
||||
runs-on: ${{ (vars.LINUX_RUNNER && fromJSON(vars.LINUX_RUNNER)) || 'ubuntu-latest' }}
|
||||
container:
|
||||
image: devkitpro/devkita64:20240120
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y ninja-build
|
||||
sudo apt-get remove -y cmake
|
||||
wget https://github.com/Kitware/CMake/releases/download/v3.28.3/cmake-3.28.3-linux-x86_64.sh -O /tmp/cmake.sh
|
||||
sudo sh /tmp/cmake.sh --prefix=/usr/local/ --exclude-subdir
|
||||
wget https://libzip.org/download/libzip-1.10.1.tar.gz
|
||||
tar -xzvf libzip-1.10.1.tar.gz
|
||||
cd libzip-1.10.1
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -H.. -B. -DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/Switch.cmake
|
||||
make
|
||||
make install
|
||||
- name: Fix dubious ownership error
|
||||
if: ${{ vars.LINUX_RUNNER }}
|
||||
run: git config --global --add safe.directory '*'
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
- name: ccache
|
||||
uses: hendrikmuhs/ccache-action@v1.2.11
|
||||
with:
|
||||
key: ${{ runner.os }}-switch-ccache-${{ github.ref }}-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-switch-ccache-${{ github.ref }}
|
||||
${{ runner.os }}-switch-ccache-
|
||||
- name: Build SoH
|
||||
run: |
|
||||
cmake -H. -Bbuild-switch -GNinja -DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/Switch.cmake -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache
|
||||
cmake --build build-switch --target soh_nro -j3
|
||||
|
||||
mv build-switch/soh/*.nro soh.nro
|
||||
mv README.md readme.txt
|
||||
- name: Download soh.otr
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: soh.otr
|
||||
- name: Upload build
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: soh-switch
|
||||
path: |
|
||||
soh.nro
|
||||
soh.otr
|
||||
readme.txt
|
||||
build-wiiu:
|
||||
needs: generate-soh-otr
|
||||
runs-on: ${{ (vars.LINUX_RUNNER && fromJSON(vars.LINUX_RUNNER)) || 'ubuntu-latest' }}
|
||||
container:
|
||||
image: devkitpro/devkitppc:20230110
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
if: ${{ !vars.LINUX_RUNNER }}
|
||||
run: |
|
||||
sudo apt-get install -y ninja-build
|
||||
sudo apt-get remove -y cmake
|
||||
wget https://github.com/Kitware/CMake/releases/download/v3.28.3/cmake-3.28.3-linux-x86_64.sh -O /tmp/cmake.sh
|
||||
sudo sh /tmp/cmake.sh --prefix=/usr/local/ --exclude-subdir
|
||||
wget https://libzip.org/download/libzip-1.10.1.tar.gz
|
||||
tar -xzvf libzip-1.10.1.tar.gz
|
||||
cd libzip-1.10.1
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -H.. -B. -DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/WiiU.cmake
|
||||
make
|
||||
make install
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
- name: ccache
|
||||
uses: hendrikmuhs/ccache-action@v1.2.11
|
||||
with:
|
||||
key: ${{ runner.os }}-wiiu-ccache-${{ github.ref }}-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-wiiu-ccache-${{ github.ref }}
|
||||
${{ runner.os }}-wiiu-ccache-
|
||||
- name: Build SoH
|
||||
run: |
|
||||
cmake -H. -Bbuild-wiiu -GNinja -DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/WiiU.cmake -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache
|
||||
cmake --build build-wiiu --target soh_wuhb --config Release -j3
|
||||
|
||||
mv build-wiiu/soh/*.rpx soh.rpx
|
||||
mv build-wiiu/soh/*.wuhb soh.wuhb
|
||||
mv README.md readme.txt
|
||||
env:
|
||||
DEVKITPRO: /opt/devkitpro
|
||||
DEVKITPPC: /opt/devkitpro/devkitPPC
|
||||
- name: Download soh.otr
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: soh.otr
|
||||
- name: Upload build
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: soh-wiiu
|
||||
path: |
|
||||
soh.rpx
|
||||
soh.wuhb
|
||||
soh.otr
|
||||
readme.txt
|
||||
build-windows:
|
||||
needs: generate-soh-otr
|
||||
runs-on: ${{ (vars.WINDOWS_RUNNER && fromJSON(vars.WINDOWS_RUNNER)) || 'windows-latest' }}
|
||||
|
2
.github/workflows/macports-deps.txt
vendored
2
.github/workflows/macports-deps.txt
vendored
@ -1 +1 @@
|
||||
libsdl2 +universal libsdl2_net +universal libpng +universal glew +universal libzip +universal
|
||||
libsdl2 +universal libsdl2_net +universal libpng +universal glew +universal libzip +universal nlohmann-json +universal tinyxml2 +universal
|
5
.github/workflows/test-builds-on-distros.yml
vendored
5
.github/workflows/test-builds-on-distros.yml
vendored
@ -1,3 +1,8 @@
|
||||
# todo:
|
||||
# nlohmann
|
||||
# tinyxml2
|
||||
# spdlog
|
||||
|
||||
name: test-builds-on-distros
|
||||
on:
|
||||
workflow_dispatch: # by request
|
||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -448,5 +448,5 @@ _packages
|
||||
*/extract_assets_cmake*
|
||||
/build*
|
||||
|
||||
soh/build.c
|
||||
soh/src/boot/build.c
|
||||
soh/properties.h
|
||||
|
24
CMake/lus-cvars.cmake
Normal file
24
CMake/lus-cvars.cmake
Normal file
@ -0,0 +1,24 @@
|
||||
set(CVAR_VSYNC_ENABLED "${CVAR_PREFIX_SETTING}.VsyncEnabled" CACHE STRING "")
|
||||
set(CVAR_Z_FIGHTING_MODE "${CVAR_PREFIX_SETTING}.ZFightingMode" CACHE STRING "")
|
||||
set(CVAR_NEW_FILE_DROPPED "${CVAR_PREFIX_GENERAL}.NewFileDropped" CACHE STRING "")
|
||||
set(CVAR_DROPPED_FILE "${CVAR_PREFIX_GENERAL}.DroppedFile" CACHE STRING "")
|
||||
set(CVAR_INTERNAL_RESOLUTION "${CVAR_PREFIX_SETTING}.InternalResolution" CACHE STRING "")
|
||||
set(CVAR_MSAA_VALUE "${CVAR_PREFIX_SETTING}.MSAAValue" CACHE STRING "")
|
||||
set(CVAR_SDL_WINDOWED_FULLSCREEN "${CVAR_PREFIX_SETTING}.SdlWindowedFullscreen" CACHE STRING "")
|
||||
set(CVAR_TEXTURE_FILTER "${CVAR_PREFIX_SETTING}.TextureFilter" CACHE STRING "")
|
||||
set(CVAR_IMGUI_CONTROLLER_NAV "${CVAR_PREFIX_SETTING}.ControlNav" CACHE STRING "")
|
||||
set(CVAR_CONSOLE_WINDOW_OPEN "${CVAR_PREFIX_WINDOW}.Console" CACHE STRING "")
|
||||
set(CVAR_CONTROLLER_CONFIGURATION_WINDOW_OPEN "${CVAR_PREFIX_WINDOW}.ControllerConfiguration" CACHE STRING "")
|
||||
set(CVAR_CONTROLLER_DISCONNECTED_WINDOW_OPEN "${CVAR_PREFIX_WINDOW}.ControllerDisconnected" CACHE STRING "")
|
||||
set(CVAR_CONTROLLER_REORDERING_WINDOW_OPEN "${CVAR_PREFIX_WINDOW}.ControllerReordering" CACHE STRING "")
|
||||
set(CVAR_GFX_DEBUGGER_WINDOW_OPEN "${CVAR_PREFIX_WINDOW}.GfxDebugger" CACHE STRING "")
|
||||
set(CVAR_STATS_WINDOW_OPEN "${CVAR_PREFIX_WINDOW}.Stats" CACHE STRING "")
|
||||
set(CVAR_ENABLE_MULTI_VIEWPORTS "${CVAR_PREFIX_SETTING}.EnableMultiViewports" CACHE STRING "")
|
||||
set(CVAR_LOW_RES_MODE "${CVAR_PREFIX_SETTING}.LowResMode" CACHE STRING "")
|
||||
set(CVAR_SIMULATED_INPUT_LAG "${CVAR_PREFIX_SETTING}.SimulatedInputLag" CACHE STRING "")
|
||||
set(CVAR_ALT_ASSETS "${CVAR_PREFIX_ENHANCEMENT}.AltAssets" CACHE STRING "")
|
||||
set(CVAR_GAME_OVERLAY_FONT "${CVAR_PREFIX_SETTING}.OverlayFont" CACHE STRING "")
|
||||
set(CVAR_MENU_BAR_OPEN "${CVAR_PREFIX_SETTING}.OpenMenuBar" CACHE STRING "")
|
||||
set(CVAR_PREFIX_CONTROLLERS "${CVAR_PREFIX_SETTING}.Controllers" CACHE STRING "")
|
||||
set(CVAR_PREFIX_ADVANCED_RESOLUTION "${CVAR_PREFIX_SETTING}.AdvancedResolution" CACHE STRING "")
|
||||
include("libultraship/cmake/cvars.cmake")
|
26
CMake/soh-cvars.cmake
Normal file
26
CMake/soh-cvars.cmake
Normal file
@ -0,0 +1,26 @@
|
||||
set(CVAR_PREFIX_RANDOMIZER_ENHANCEMENT "gRandoEnhancements")
|
||||
set(CVAR_PREFIX_RANDOMIZER_SETTING "gRandoSettings")
|
||||
set(CVAR_PREFIX_COSMETIC "gCosmetics")
|
||||
set(CVAR_PREFIX_AUDIO "gAudioEditor")
|
||||
set(CVAR_PREFIX_CHEAT "gCheats")
|
||||
set(CVAR_PREFIX_ENHANCEMENT "gEnhancements")
|
||||
set(CVAR_PREFIX_SETTING "gSettings")
|
||||
set(CVAR_PREFIX_WINDOW "gOpenWindows")
|
||||
set(CVAR_PREFIX_TRACKER "gTrackers")
|
||||
set(CVAR_PREFIX_DEVELOPER_TOOLS "gDeveloperTools")
|
||||
set(CVAR_PREFIX_GENERAL "gGeneral")
|
||||
set(CVAR_PREFIX_REMOTE "gRemote")
|
||||
add_compile_definitions(
|
||||
CVAR_PREFIX_RANDOMIZER_ENHANCEMENT="${CVAR_PREFIX_RANDOMIZER_ENHANCEMENT}"
|
||||
CVAR_PREFIX_RANDOMIZER_SETTING="${CVAR_PREFIX_RANDOMIZER_SETTING}"
|
||||
CVAR_PREFIX_COSMETIC="${CVAR_PREFIX_COSMETIC}"
|
||||
CVAR_PREFIX_AUDIO="${CVAR_PREFIX_AUDIO}"
|
||||
CVAR_PREFIX_CHEAT="${CVAR_PREFIX_CHEAT}"
|
||||
CVAR_PREFIX_ENHANCEMENT="${CVAR_PREFIX_ENHANCEMENT}"
|
||||
CVAR_PREFIX_SETTING="${CVAR_PREFIX_SETTING}"
|
||||
CVAR_PREFIX_WINDOW="${CVAR_PREFIX_WINDOW}"
|
||||
CVAR_PREFIX_TRACKER="${CVAR_PREFIX_TRACKER}"
|
||||
CVAR_PREFIX_DEVELOPER_TOOLS="${CVAR_PREFIX_DEVELOPER_TOOLS}"
|
||||
CVAR_PREFIX_GENERAL="${CVAR_PREFIX_GENERAL}"
|
||||
CVAR_PREFIX_REMOTE="${CVAR_PREFIX_REMOTE}"
|
||||
)
|
@ -6,6 +6,8 @@ set(CMAKE_CXX_STANDARD 20 CACHE STRING "The C++ standard to use")
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "Minimum OS X deployment version")
|
||||
|
||||
project(Ship VERSION 8.0.5 LANGUAGES C CXX)
|
||||
include(CMake/soh-cvars.cmake)
|
||||
include(CMake/lus-cvars.cmake)
|
||||
set(PROJECT_BUILD_NAME "MacReady Foxtrot" CACHE STRING "")
|
||||
set(PROJECT_TEAM "github.com/harbourmasters" CACHE STRING "")
|
||||
|
||||
@ -20,7 +22,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
set(VCPKG_TARGET_TRIPLET x64-windows-static)
|
||||
|
||||
vcpkg_bootstrap()
|
||||
vcpkg_install_packages(zlib bzip2 libzip libpng sdl2 sdl2-net glew glfw3)
|
||||
vcpkg_install_packages(zlib bzip2 libzip libpng sdl2 sdl2-net glew glfw3 nlohmann-json tinyxml2 spdlog)
|
||||
|
||||
if (CMAKE_C_COMPILER_LAUNCHER MATCHES "ccache|sccache")
|
||||
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT Embedded)
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit e93bd2be062b13106fdb29d98cf4ada4d7ad6827
|
||||
Subproject commit 3cea9ee7c017d842aa4d9ceeb8d3ffbf29c6effb
|
2
ZAPDTR
2
ZAPDTR
@ -1 +1 @@
|
||||
Subproject commit 9f9d0be3c914354ecabab3695581f1123c13ac20
|
||||
Subproject commit f38a9c92eb99368c0607acf356d5651ebdc96f51
|
@ -1 +1 @@
|
||||
Subproject commit 493639d5daf75c8fa5d374f96fc95b652714299f
|
||||
Subproject commit 7d71a290657a2d3b09a83e8b33025e807f4fb38e
|
@ -92,10 +92,6 @@ if (NOT TARGET libultraship)
|
||||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../libultraship ${CMAKE_BINARY_DIR}/libultraship)
|
||||
endif()
|
||||
|
||||
if (NOT TARGET ZAPDUtils)
|
||||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../ZAPDTR/ZAPDUtils ${CMAKE_BINARY_DIR}/ZAPDUtils)
|
||||
endif()
|
||||
|
||||
if (NOT TARGET ZAPDLib)
|
||||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../ZAPDTR/ZAPD ${CMAKE_BINARY_DIR}/ZAPD)
|
||||
endif()
|
||||
@ -105,8 +101,8 @@ set(PROJECT_NAME soh)
|
||||
################################################################################
|
||||
# Sources
|
||||
################################################################################
|
||||
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/src/boot/build.c.in ${CMAKE_BINARY_DIR}/build.c @ONLY)
|
||||
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/src/boot/properties.h.in ${CMAKE_CURRENT_SOURCE_DIR}/properties.h @ONLY)
|
||||
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/src/boot/build.c.in ${CMAKE_CURRENT_SOURCE_DIR}/src/boot/build.c @ONLY)
|
||||
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/properties.h.in ${CMAKE_CURRENT_SOURCE_DIR}/properties.h @ONLY)
|
||||
|
||||
set(Header_Files "resource.h")
|
||||
source_group("headers" FILES ${Header_Files})
|
||||
@ -217,8 +213,6 @@ source_group("soh\\resource\\importer\\scenecommand" REGULAR_EXPRESSION "soh/res
|
||||
# src (decomp) {{{
|
||||
file(GLOB_RECURSE src__ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "src/*.c" "src/*.h")
|
||||
|
||||
list(APPEND src__ ${CMAKE_BINARY_DIR}/build.c)
|
||||
list(APPEND src__ ${CMAKE_CURRENT_SOURCE_DIR}/properties.h)
|
||||
list(APPEND src__ ${CMAKE_CURRENT_SOURCE_DIR}/Resource.rc)
|
||||
list(FILTER src__ EXCLUDE REGEX "src/dmadata/*")
|
||||
list(FILTER src__ EXCLUDE REGEX "src/elf_message/*")
|
||||
@ -238,7 +232,6 @@ list(REMOVE_ITEM src__ "src/libultra/gu/sqrtf.c")
|
||||
list(REMOVE_ITEM src__ "src/libultra/gu/us2dex.c")
|
||||
|
||||
source_group("src" REGULAR_EXPRESSION "src/*")
|
||||
source_group("src\\build" FILES ${CMAKE_BINARY_DIR}/build.c ${CMAKE_CURRENT_SOURCE_DIR}/properties.h ${CMAKE_CURRENT_SOURCE_DIR}/Resource.rc)
|
||||
source_group("src\\boot" REGULAR_EXPRESSION "src/boot/*")
|
||||
source_group("src\\buffers" REGULAR_EXPRESSION "src/buffers/*")
|
||||
source_group("src\\code" REGULAR_EXPRESSION "src/code/*")
|
||||
@ -391,10 +384,8 @@ target_include_directories(${PROJECT_NAME} PRIVATE assets
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/extern/tinyxml2
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/libultraship/Lib/
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/libultraship/Lib/libjpeg/include/
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/libultraship/Lib/spdlog/include/
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/src/graphic/Fast3D/U64/PR
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/src/graphic
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../ZAPDTR/ZAPDUtils
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../ZAPDTR/ZAPD/resource/type
|
||||
${SDL2-INCLUDE}
|
||||
${SDL2-NET-INCLUDE}
|
||||
@ -420,6 +411,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
"_UNICODE"
|
||||
STORMLIB_NO_AUTO_LINK
|
||||
"_CRT_SECURE_NO_WARNINGS;"
|
||||
NOMINMAX
|
||||
)
|
||||
elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32")
|
||||
target_compile_definitions(${PROJECT_NAME} PRIVATE
|
||||
@ -437,6 +429,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
"UNICODE;"
|
||||
"_UNICODE"
|
||||
STORMLIB_NO_AUTO_LINK
|
||||
NOMINMAX
|
||||
)
|
||||
endif()
|
||||
elseif (CMAKE_SYSTEM_NAME STREQUAL "CafeOS")
|
||||
@ -650,15 +643,6 @@ endif()
|
||||
################################################################################
|
||||
# Pre build events
|
||||
################################################################################
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
add_custom_command_if(
|
||||
TARGET ${PROJECT_NAME}
|
||||
PRE_BUILD
|
||||
COMMANDS
|
||||
COMMAND $<CONFIG:Debug> copy /b $<SHELL_PATH:${CMAKE_BINARY_DIR}/>build.c +,,
|
||||
)
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_SYSTEM_NAME MATCHES "NintendoSwitch|CafeOS")
|
||||
add_custom_command(
|
||||
TARGET ${PROJECT_NAME}
|
||||
@ -677,7 +661,6 @@ endif()
|
||||
# Dependencies
|
||||
################################################################################
|
||||
add_dependencies(${PROJECT_NAME}
|
||||
ZAPDUtils
|
||||
libultraship
|
||||
)
|
||||
if(NOT CMAKE_SYSTEM_NAME MATCHES "NintendoSwitch|CafeOS")
|
||||
@ -691,7 +674,6 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64")
|
||||
set(ADDITIONAL_LIBRARY_DEPENDENCIES
|
||||
"libultraship;"
|
||||
"ZAPDUtils;"
|
||||
"ZAPDLib;"
|
||||
"glu32;"
|
||||
"SDL2::SDL2;"
|
||||
@ -706,7 +688,6 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32")
|
||||
set(ADDITIONAL_LIBRARY_DEPENDENCIES
|
||||
"libultraship;"
|
||||
"ZAPDUtils;"
|
||||
"ZAPDLib;"
|
||||
"glu32;"
|
||||
"SDL2::SDL2;"
|
||||
@ -724,7 +705,6 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "NintendoSwitch")
|
||||
find_package(Threads REQUIRED)
|
||||
set(ADDITIONAL_LIBRARY_DEPENDENCIES
|
||||
"libultraship;"
|
||||
"ZAPDUtils;"
|
||||
SDL2::SDL2
|
||||
-lglad
|
||||
Threads::Threads
|
||||
@ -746,7 +726,6 @@ else()
|
||||
find_package(Threads REQUIRED)
|
||||
set(ADDITIONAL_LIBRARY_DEPENDENCIES
|
||||
"libultraship;"
|
||||
"ZAPDUtils;"
|
||||
"ZAPDLib;"
|
||||
SDL2::SDL2
|
||||
"$<$<BOOL:${BUILD_REMOTE_CONTROL}>:SDL2_net::SDL2_net>"
|
||||
|
@ -2,9 +2,10 @@
|
||||
#include "sequence.h"
|
||||
#include "sfx.h"
|
||||
#include <vector>
|
||||
#include <Utils/StringHelper.h>
|
||||
#include <utils/StringHelper.h>
|
||||
#include <libultraship/bridge.h>
|
||||
#include <libultraship/classes.h>
|
||||
#include <soh/OTRGlobals.h>
|
||||
#include <locale>
|
||||
#include <filesystem>
|
||||
|
||||
@ -330,11 +331,13 @@ AudioCollection::AudioCollection() {
|
||||
}
|
||||
|
||||
std::string AudioCollection::GetCvarKey(std::string sfxKey) {
|
||||
return "gAudioEditor.ReplacedSequences." + sfxKey + ".value";
|
||||
auto prefix = CVAR_AUDIO("ReplacedSequences.");
|
||||
return prefix + sfxKey + ".value";
|
||||
}
|
||||
|
||||
std::string AudioCollection::GetCvarLockKey(std::string sfxKey) {
|
||||
return "gAudioEditor.ReplacedSequences." + sfxKey + ".locked";
|
||||
auto prefix = std::string(CVAR_AUDIO("ReplacedSequences."));
|
||||
return prefix + sfxKey + ".locked";
|
||||
}
|
||||
|
||||
void AudioCollection::AddToCollection(char* otrPath, uint16_t seqNum) {
|
||||
@ -362,7 +365,7 @@ uint16_t AudioCollection::GetReplacementSequence(uint16_t seqId) {
|
||||
// for Hyrule Field instead. Otherwise, leave it alone, so that without any sfx editor modifications we will
|
||||
// play the normal track as usual.
|
||||
if (seqId == NA_BGM_FIELD_MORNING) {
|
||||
if (CVarGetInteger("gAudioEditor.ReplacedSequences.NA_BGM_FIELD_LOGIC.value", NA_BGM_FIELD_LOGIC) != NA_BGM_FIELD_LOGIC) {
|
||||
if (CVarGetInteger(CVAR_AUDIO("ReplacedSequences.NA_BGM_FIELD_LOGIC.value"), NA_BGM_FIELD_LOGIC) != NA_BGM_FIELD_LOGIC) {
|
||||
seqId = NA_BGM_FIELD_LOGIC;
|
||||
}
|
||||
}
|
||||
@ -381,19 +384,19 @@ uint16_t AudioCollection::GetReplacementSequence(uint16_t seqId) {
|
||||
}
|
||||
|
||||
void AudioCollection::RemoveFromShufflePool(SequenceInfo* seqInfo) {
|
||||
const std::string cvarKey = "gAudioEditor.Excluded." + seqInfo->sfxKey;
|
||||
const std::string cvarKey = std::string(CVAR_AUDIO("Excluded.")) + seqInfo->sfxKey;
|
||||
excludedSequences.insert(seqInfo);
|
||||
includedSequences.erase(seqInfo);
|
||||
CVarSetInteger(cvarKey.c_str(), 1);
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
}
|
||||
|
||||
void AudioCollection::AddToShufflePool(SequenceInfo* seqInfo) {
|
||||
const std::string cvarKey = "gAudioEditor.Excluded." + seqInfo->sfxKey;
|
||||
const std::string cvarKey = std::string(CVAR_AUDIO("Excluded.")) + seqInfo->sfxKey;
|
||||
includedSequences.insert(seqInfo);
|
||||
excludedSequences.erase(seqInfo);
|
||||
CVarClear(cvarKey.c_str());
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
}
|
||||
|
||||
void AudioCollection::InitializeShufflePool() {
|
||||
@ -401,7 +404,7 @@ void AudioCollection::InitializeShufflePool() {
|
||||
|
||||
for (auto& [seqId, seqInfo] : sequenceMap) {
|
||||
if (!seqInfo.canBeUsedAsReplacement) continue;
|
||||
const std::string cvarKey = "gAudioEditor.Excluded." + seqInfo.sfxKey;
|
||||
const std::string cvarKey = std::string(CVAR_AUDIO("Excluded.")) + seqInfo.sfxKey;
|
||||
if (CVarGetInteger(cvarKey.c_str(), 0)) {
|
||||
excludedSequences.insert(&seqInfo);
|
||||
} else {
|
||||
|
@ -1,3 +1,4 @@
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include <functions.h>
|
||||
#include "../randomizer/3drando/random.hpp"
|
||||
#include "../../OTRGlobals.h"
|
||||
#include <Utils/StringHelper.h>
|
||||
#include <utils/StringHelper.h>
|
||||
#include "../../UIWidgets.hpp"
|
||||
#include "AudioCollection.h"
|
||||
#include "soh/Enhancements/game-interactor/GameInteractor.h"
|
||||
@ -163,17 +163,17 @@ void DrawPreviewButton(uint16_t sequenceId, std::string sfxKey, SeqType sequence
|
||||
const std::string stopButton = ICON_FA_STOP + hiddenKey;
|
||||
const std::string previewButton = ICON_FA_PLAY + hiddenKey;
|
||||
|
||||
if (CVarGetInteger("gAudioEditor.Playing", 0) == sequenceId) {
|
||||
if (CVarGetInteger(CVAR_AUDIO("Playing"), 0) == sequenceId) {
|
||||
if (ImGui::Button(stopButton.c_str())) {
|
||||
func_800F5C2C();
|
||||
CVarSetInteger("gAudioEditor.Playing", 0);
|
||||
CVarSetInteger(CVAR_AUDIO("Playing"), 0);
|
||||
}
|
||||
UIWidgets::Tooltip("Stop Preview");
|
||||
} else {
|
||||
if (ImGui::Button(previewButton.c_str())) {
|
||||
if (CVarGetInteger("gAudioEditor.Playing", 0) != 0) {
|
||||
if (CVarGetInteger(CVAR_AUDIO("Playing"), 0) != 0) {
|
||||
func_800F5C2C();
|
||||
CVarSetInteger("gAudioEditor.Playing", 0);
|
||||
CVarSetInteger(CVAR_AUDIO("Playing"), 0);
|
||||
} else {
|
||||
if (sequenceType == SEQ_SFX || sequenceType == SEQ_VOICE) {
|
||||
Audio_PlaySoundGeneral(sequenceId, &pos, 4, &freqScale, &freqScale, &reverbAdd);
|
||||
@ -183,7 +183,7 @@ void DrawPreviewButton(uint16_t sequenceId, std::string sfxKey, SeqType sequence
|
||||
} else {
|
||||
// TODO: Cant do both here, so have to click preview button twice
|
||||
PreviewSequence(sequenceId);
|
||||
CVarSetInteger("gAudioEditor.Playing", sequenceId);
|
||||
CVarSetInteger(CVAR_AUDIO("Playing"), sequenceId);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -203,7 +203,7 @@ void Draw_SfxTab(const std::string& tabId, SeqType type) {
|
||||
auto currentBGM = func_800FA0B4(SEQ_PLAYER_BGM_MAIN);
|
||||
auto prevReplacement = AudioCollection::Instance->GetReplacementSequence(currentBGM);
|
||||
ResetGroup(map, type);
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
auto curReplacement = AudioCollection::Instance->GetReplacementSequence(currentBGM);
|
||||
if (type == SEQ_BGM_WORLD && prevReplacement != curReplacement) {
|
||||
ReplayCurrentBGM();
|
||||
@ -214,7 +214,7 @@ void Draw_SfxTab(const std::string& tabId, SeqType type) {
|
||||
auto currentBGM = func_800FA0B4(SEQ_PLAYER_BGM_MAIN);
|
||||
auto prevReplacement = AudioCollection::Instance->GetReplacementSequence(currentBGM);
|
||||
RandomizeGroup(type);
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
auto curReplacement = AudioCollection::Instance->GetReplacementSequence(currentBGM);
|
||||
if (type == SEQ_BGM_WORLD && prevReplacement != curReplacement) {
|
||||
ReplayCurrentBGM();
|
||||
@ -225,7 +225,7 @@ void Draw_SfxTab(const std::string& tabId, SeqType type) {
|
||||
auto currentBGM = func_800FA0B4(SEQ_PLAYER_BGM_MAIN);
|
||||
auto prevReplacement = AudioCollection::Instance->GetReplacementSequence(currentBGM);
|
||||
LockGroup(map, type);
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
auto curReplacement = AudioCollection::Instance->GetReplacementSequence(currentBGM);
|
||||
if (type == SEQ_BGM_WORLD && prevReplacement != curReplacement) {
|
||||
ReplayCurrentBGM();
|
||||
@ -236,7 +236,7 @@ void Draw_SfxTab(const std::string& tabId, SeqType type) {
|
||||
auto currentBGM = func_800FA0B4(SEQ_PLAYER_BGM_MAIN);
|
||||
auto prevReplacement = AudioCollection::Instance->GetReplacementSequence(currentBGM);
|
||||
UnlockGroup(map, type);
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
auto curReplacement = AudioCollection::Instance->GetReplacementSequence(currentBGM);
|
||||
if (type == SEQ_BGM_WORLD && prevReplacement != curReplacement) {
|
||||
ReplayCurrentBGM();
|
||||
@ -281,7 +281,7 @@ void Draw_SfxTab(const std::string& tabId, SeqType type) {
|
||||
|
||||
if (ImGui::Selectable(seqData.label.c_str())) {
|
||||
CVarSetInteger(cvarKey.c_str(), value);
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
UpdateCurrentBGM(defaultValue, type);
|
||||
}
|
||||
|
||||
@ -301,7 +301,7 @@ void Draw_SfxTab(const std::string& tabId, SeqType type) {
|
||||
if (ImGui::Button(resetButton.c_str())) {
|
||||
CVarClear(cvarKey.c_str());
|
||||
CVarClear(cvarLockKey.c_str());
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
UpdateCurrentBGM(defaultValue, seqData.category);
|
||||
}
|
||||
UIWidgets::Tooltip("Reset to default");
|
||||
@ -322,7 +322,7 @@ void Draw_SfxTab(const std::string& tabId, SeqType type) {
|
||||
if (locked) {
|
||||
CVarClear(cvarLockKey.c_str());
|
||||
}
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
UpdateCurrentBGM(defaultValue, type);
|
||||
}
|
||||
}
|
||||
@ -335,7 +335,7 @@ void Draw_SfxTab(const std::string& tabId, SeqType type) {
|
||||
} else {
|
||||
CVarSetInteger(cvarLockKey.c_str(), 1);
|
||||
}
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
}
|
||||
UIWidgets::Tooltip(locked ? "Sound locked" : "Sound unlocked");
|
||||
}
|
||||
@ -411,7 +411,7 @@ void DrawTypeChip(SeqType type) {
|
||||
|
||||
void AudioEditorRegisterOnSceneInitHook() {
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnSceneInit>([](int16_t sceneNum) {
|
||||
if (CVarGetInteger("gAudioEditor.RandomizeAllOnNewScene", 0)) {
|
||||
if (CVarGetInteger(CVAR_AUDIO("RandomizeAllOnNewScene"), 0)) {
|
||||
AudioEditor_RandomizeAll();
|
||||
}
|
||||
});
|
||||
@ -492,18 +492,18 @@ void AudioEditor::DrawElement() {
|
||||
ImGui::TableNextColumn();
|
||||
if (ImGui::BeginChild("SfxOptions", ImVec2(0, -8))) {
|
||||
ImGui::PushItemWidth(-FLT_MIN);
|
||||
UIWidgets::EnhancementCheckbox("Disable Enemy Proximity Music", "gEnemyBGMDisable");
|
||||
UIWidgets::EnhancementCheckbox("Disable Enemy Proximity Music", CVAR_AUDIO("EnemyBGMDisable"));
|
||||
UIWidgets::InsertHelpHoverText(
|
||||
"Disables the music change when getting close to enemies. Useful for hearing "
|
||||
"your custom music for each scene more often.");
|
||||
UIWidgets::EnhancementCheckbox("Disable Leading Music in Lost Woods", "gLostWoodsConsistentVolume");
|
||||
UIWidgets::EnhancementCheckbox("Disable Leading Music in Lost Woods", CVAR_AUDIO("LostWoodsConsistentVolume"));
|
||||
UIWidgets::InsertHelpHoverText(
|
||||
"Disables the volume shifting in the Lost Woods. Useful for hearing "
|
||||
"your custom music in the Lost Woods if you don't need the navigation assitance "
|
||||
"the volume changing provides. If toggling this while in the Lost Woods, reload "
|
||||
"the area for the effect to kick in."
|
||||
);
|
||||
UIWidgets::EnhancementCheckbox("Display Sequence Name on Overlay", "gSeqNameOverlay");
|
||||
UIWidgets::EnhancementCheckbox("Display Sequence Name on Overlay", CVAR_AUDIO("SeqNameOverlay"));
|
||||
UIWidgets::InsertHelpHoverText(
|
||||
"Displays the name of the current sequence in the corner of the screen whenever a new sequence "
|
||||
"is loaded to the main sequence player (does not apply to fanfares or enemy BGM)."
|
||||
@ -511,28 +511,28 @@ void AudioEditor::DrawElement() {
|
||||
ImGui::SameLine();
|
||||
ImGui::PushItemWidth(ImGui::GetContentRegionAvail().x);
|
||||
UIWidgets::EnhancementSliderInt("Overlay Duration: %d seconds", "##SeqNameOverlayDuration",
|
||||
"gSeqNameOverlayDuration", 1, 10, "", 5);
|
||||
CVAR_AUDIO("SeqNameOverlayDuration"), 1, 10, "", 5);
|
||||
ImGui::PopItemWidth();
|
||||
ImGui::NewLine();
|
||||
ImGui::PopItemWidth();
|
||||
UIWidgets::EnhancementSliderFloat("Link's voice pitch multiplier: %.1f %%", "##linkVoiceFreqMultiplier",
|
||||
"gLinkVoiceFreqMultiplier", 0.4, 2.5, "", 1.0, true, true);
|
||||
CVAR_AUDIO("LinkVoiceFreqMultiplier"), 0.4, 2.5, "", 1.0, true, true);
|
||||
ImGui::SameLine();
|
||||
const std::string resetButton = "Reset##linkVoiceFreqMultiplier";
|
||||
if (ImGui::Button(resetButton.c_str())) {
|
||||
CVarSetFloat("gLinkVoiceFreqMultiplier", 1.0f);
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
CVarSetFloat(CVAR_AUDIO("LinkVoiceFreqMultiplier"), 1.0f);
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
}
|
||||
|
||||
ImGui::NewLine();
|
||||
UIWidgets::EnhancementCheckbox("Randomize All Music and Sound Effects on New Scene", "gAudioEditor.RandomizeAllOnNewScene");
|
||||
UIWidgets::EnhancementCheckbox("Randomize All Music and Sound Effects on New Scene", CVAR_AUDIO("RandomizeAllOnNewScene"));
|
||||
UIWidgets::Tooltip("Enables randomizing all unlocked music and sound effects when you enter a new scene.");
|
||||
|
||||
ImGui::NewLine();
|
||||
ImGui::PushItemWidth(-FLT_MIN);
|
||||
UIWidgets::PaddedSeparator();
|
||||
UIWidgets::PaddedText("The following options are experimental and may cause music\nto sound odd or have other undesireable effects.");
|
||||
UIWidgets::EnhancementCheckbox("Lower Octaves of Unplayable High Notes", "gExperimentalOctaveDrop");
|
||||
UIWidgets::EnhancementCheckbox("Lower Octaves of Unplayable High Notes", CVAR_AUDIO("ExperimentalOctaveDrop"));
|
||||
UIWidgets::InsertHelpHoverText("Some custom sequences may have notes that are too high for the game's audio "
|
||||
"engine to play. Enabling this checkbox will cause these notes to drop a "
|
||||
"couple of octaves so they can still harmonize with the other notes of the "
|
||||
@ -710,7 +710,14 @@ void AudioEditor_RandomizeAll() {
|
||||
RandomizeGroup(type);
|
||||
}
|
||||
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
ReplayCurrentBGM();
|
||||
}
|
||||
|
||||
void AudioEditor_RandomizeGroup(SeqType group) {
|
||||
RandomizeGroup(group);
|
||||
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
ReplayCurrentBGM();
|
||||
}
|
||||
|
||||
@ -719,7 +726,14 @@ void AudioEditor_ResetAll() {
|
||||
ResetGroup(AudioCollection::Instance->GetAllSequences(), type);
|
||||
}
|
||||
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
ReplayCurrentBGM();
|
||||
}
|
||||
|
||||
void AudioEditor_ResetGroup(SeqType group) {
|
||||
ResetGroup(AudioCollection::Instance->GetAllSequences(), group);
|
||||
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
ReplayCurrentBGM();
|
||||
}
|
||||
|
||||
@ -728,7 +742,7 @@ void AudioEditor_LockAll() {
|
||||
LockGroup(AudioCollection::Instance->GetAllSequences(), type);
|
||||
}
|
||||
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
}
|
||||
|
||||
void AudioEditor_UnlockAll() {
|
||||
@ -736,5 +750,5 @@ void AudioEditor_UnlockAll() {
|
||||
UnlockGroup(AudioCollection::Instance->GetAllSequences(), type);
|
||||
}
|
||||
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
}
|
||||
|
@ -7,11 +7,12 @@
|
||||
#ifndef IMGUI_DEFINE_MATH_OPERATORS
|
||||
#define IMGUI_DEFINE_MATH_OPERATORS
|
||||
#endif
|
||||
#include <ImGui/imgui.h>
|
||||
#include <imgui.h>
|
||||
#include "AudioCollection.h"
|
||||
|
||||
class AudioEditor : public LUS::GuiWindow {
|
||||
class AudioEditor : public Ship::GuiWindow {
|
||||
public:
|
||||
using LUS::GuiWindow::GuiWindow;
|
||||
using GuiWindow::GuiWindow;
|
||||
|
||||
void DrawElement() override;
|
||||
void InitElement() override;
|
||||
@ -20,7 +21,9 @@ class AudioEditor : public LUS::GuiWindow {
|
||||
};
|
||||
|
||||
void AudioEditor_RandomizeAll();
|
||||
void AudioEditor_RandomizeGroup(SeqType group);
|
||||
void AudioEditor_ResetAll();
|
||||
void AudioEditor_ResetGroup(SeqType group);
|
||||
void AudioEditor_LockAll();
|
||||
void AudioEditor_UnlockAll();
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
#include <z64.h>
|
||||
#include "soh/OTRGlobals.h"
|
||||
|
||||
uint8_t gLoadFileSelect = 0, gSkipLogoTest = 0;
|
||||
|
||||
@ -21,15 +22,15 @@ static BootCommand sCommands[] = { { "--skiplogo", BootCommands_Command_SkipLogo
|
||||
void BootCommands_Init()
|
||||
{
|
||||
// Clears vars to prevent randomizer menu from being disabled
|
||||
CVarClear("gRandoGenerating"); // Clear when a crash happened during rando seed generation
|
||||
CVarClear("gNewSeedGenerated");
|
||||
CVarClear("gOnFileSelectNameEntry"); // Clear when soh is killed on the file name entry page
|
||||
CVarClear("gBetterDebugWarpScreenMQMode");
|
||||
CVarClear("gBetterDebugWarpScreenMQModeScene");
|
||||
CVarClear("gCheatEasyPauseBufferLastInputs");
|
||||
CVarClear("gCheatEasyPauseBufferTimer");
|
||||
CVarClear(CVAR_GENERAL("RandoGenerating")); // Clear when a crash happened during rando seed generation
|
||||
CVarClear(CVAR_GENERAL("NewSeedGenerated"));
|
||||
CVarClear(CVAR_GENERAL("OnFileSelectNameEntry")); // Clear when soh is killed on the file name entry page
|
||||
CVarClear(CVAR_GENERAL("BetterDebugWarpScreenMQMode"));
|
||||
CVarClear(CVAR_GENERAL("BetterDebugWarpScreenMQModeScene"));
|
||||
CVarClear(CVAR_GENERAL("CheatEasyPauseBufferLastInputs"));
|
||||
CVarClear(CVAR_GENERAL("CheatEasyPauseBufferTimer"));
|
||||
#if defined(__SWITCH__) || defined(__WIIU__)
|
||||
CVarRegisterInteger("gControlNav", 1); // always enable controller nav on switch/wii u
|
||||
CVarRegisterInteger(CVAR_IMGUI_CONTROLLER_NAV, 1); // always enable controller nav on switch/wii u
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -15,13 +15,13 @@ extern PlayState* gPlayState;
|
||||
void CheatsOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void* opt) {
|
||||
switch (id) {
|
||||
case VB_DEKU_STICK_BREAK: {
|
||||
if (CVarGetInteger("gDekuStickCheat", DEKU_STICK_NORMAL) != DEKU_STICK_NORMAL) {
|
||||
if (CVarGetInteger(CVAR_CHEAT("DekuStickCheat"), DEKU_STICK_NORMAL) != DEKU_STICK_NORMAL) {
|
||||
*should = false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VB_DEKU_STICK_BE_ON_FIRE: {
|
||||
if (CVarGetInteger("gDekuStickCheat", DEKU_STICK_NORMAL) == DEKU_STICK_UNBREAKABLE_AND_ALWAYS_ON_FIRE) {
|
||||
if (CVarGetInteger(CVAR_CHEAT("DekuStickCheat"), DEKU_STICK_NORMAL) == DEKU_STICK_UNBREAKABLE_AND_ALWAYS_ON_FIRE) {
|
||||
Player* player = GET_PLAYER(gPlayState);
|
||||
player->unk_860 = 200; // Keeps the stick's flame lit
|
||||
player->unk_85C = 1.0f; // Ensures the stick is the proper length
|
||||
@ -30,13 +30,13 @@ void CheatsOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void* op
|
||||
break;
|
||||
}
|
||||
case VB_DEKU_STICK_BURN_OUT: {
|
||||
if (CVarGetInteger("gDekuStickCheat", DEKU_STICK_NORMAL) != DEKU_STICK_NORMAL) {
|
||||
if (CVarGetInteger(CVAR_CHEAT("DekuStickCheat"), DEKU_STICK_NORMAL) != DEKU_STICK_NORMAL) {
|
||||
*should = false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VB_DEKU_STICK_BURN_DOWN: {
|
||||
if (CVarGetInteger("gDekuStickCheat", DEKU_STICK_NORMAL) != DEKU_STICK_NORMAL) {
|
||||
if (CVarGetInteger(CVAR_CHEAT("DekuStickCheat"), DEKU_STICK_NORMAL) != DEKU_STICK_NORMAL) {
|
||||
*should = false;
|
||||
}
|
||||
break;
|
||||
|
@ -3,10 +3,11 @@
|
||||
#include "public/bridge/consolevariablebridge.h"
|
||||
#include "libultraship/libultra/controller.h"
|
||||
#include "Context.h"
|
||||
#include "soh/OTRGlobals.h"
|
||||
#ifndef IMGUI_DEFINE_MATH_OPERATORS
|
||||
#define IMGUI_DEFINE_MATH_OPERATORS
|
||||
#endif
|
||||
#include <ImGui/imgui.h>
|
||||
#include <imgui.h>
|
||||
#include <spdlog/spdlog.h>
|
||||
#include <cmath>
|
||||
|
||||
@ -46,77 +47,77 @@ void InputViewer::RenderButton(std::string btnTexture, std::string btnOutlineTex
|
||||
// Render Outline based on settings
|
||||
if (outlineMode == BUTTON_OUTLINE_ALWAYS_SHOWN || (outlineMode == BUTTON_OUTLINE_NOT_PRESSED && !state) ||
|
||||
(outlineMode == BUTTON_OUTLINE_PRESSED && state)) {
|
||||
ImGui::Image(LUS::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(btnOutlineTexture), size,
|
||||
ImGui::Image(Ship::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(btnOutlineTexture), size,
|
||||
ImVec2(0, 0), ImVec2(1.0f, 1.0f), ImVec4(255, 255, 255, 255));
|
||||
}
|
||||
// Render button if pressed
|
||||
if (state) {
|
||||
ImGui::SetCursorPos(pos);
|
||||
ImGui::SetNextItemAllowOverlap();
|
||||
ImGui::Image(LUS::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(btnTexture), size,
|
||||
ImGui::Image(Ship::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(btnTexture), size,
|
||||
ImVec2(0, 0), ImVec2(1.0f, 1.0f), ImVec4(255, 255, 255, 255));
|
||||
}
|
||||
}
|
||||
|
||||
void InputViewer::DrawElement() {
|
||||
if (CVarGetInteger("gOpenWindows.InputViewer", 0)) {
|
||||
if (CVarGetInteger(CVAR_WINDOW("InputViewer"), 0)) {
|
||||
static bool sButtonTexturesLoaded = false;
|
||||
if (!sButtonTexturesLoaded) {
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage(
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage(
|
||||
"Input-Viewer-Background", "textures/buttons/InputViewerBackground.png");
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("A-Btn", "textures/buttons/ABtn.png");
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("B-Btn", "textures/buttons/BBtn.png");
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("L-Btn", "textures/buttons/LBtn.png");
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("R-Btn", "textures/buttons/RBtn.png");
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("Z-Btn", "textures/buttons/ZBtn.png");
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("Start-Btn",
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("A-Btn", "textures/buttons/ABtn.png");
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("B-Btn", "textures/buttons/BBtn.png");
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("L-Btn", "textures/buttons/LBtn.png");
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("R-Btn", "textures/buttons/RBtn.png");
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("Z-Btn", "textures/buttons/ZBtn.png");
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("Start-Btn",
|
||||
"textures/buttons/StartBtn.png");
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("C-Left", "textures/buttons/CLeft.png");
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("C-Right", "textures/buttons/CRight.png");
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("C-Up", "textures/buttons/CUp.png");
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("C-Down", "textures/buttons/CDown.png");
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("Analog-Stick",
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("C-Left", "textures/buttons/CLeft.png");
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("C-Right", "textures/buttons/CRight.png");
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("C-Up", "textures/buttons/CUp.png");
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("C-Down", "textures/buttons/CDown.png");
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("Analog-Stick",
|
||||
"textures/buttons/AnalogStick.png");
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("Dpad-Left",
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("Dpad-Left",
|
||||
"textures/buttons/DPadLeft.png");
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("Dpad-Right",
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("Dpad-Right",
|
||||
"textures/buttons/DPadRight.png");
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("Dpad-Up", "textures/buttons/DPadUp.png");
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("Dpad-Down",
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("Dpad-Up", "textures/buttons/DPadUp.png");
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("Dpad-Down",
|
||||
"textures/buttons/DPadDown.png");
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("Right-Stick",
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("Right-Stick",
|
||||
"textures/buttons/RightStick.png");
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("A-Btn Outline",
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("A-Btn Outline",
|
||||
"textures/buttons/ABtnOutline.png");
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("B-Btn Outline",
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("B-Btn Outline",
|
||||
"textures/buttons/BBtnOutline.png");
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("L-Btn Outline",
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("L-Btn Outline",
|
||||
"textures/buttons/LBtnOutline.png");
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("R-Btn Outline",
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("R-Btn Outline",
|
||||
"textures/buttons/RBtnOutline.png");
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("Z-Btn Outline",
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("Z-Btn Outline",
|
||||
"textures/buttons/ZBtnOutline.png");
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("Start-Btn Outline",
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("Start-Btn Outline",
|
||||
"textures/buttons/StartBtnOutline.png");
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("C-Left Outline",
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("C-Left Outline",
|
||||
"textures/buttons/CLeftOutline.png");
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("C-Right Outline",
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("C-Right Outline",
|
||||
"textures/buttons/CRightOutline.png");
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("C-Up Outline",
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("C-Up Outline",
|
||||
"textures/buttons/CUpOutline.png");
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("C-Down Outline",
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("C-Down Outline",
|
||||
"textures/buttons/CDownOutline.png");
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("Analog-Stick Outline",
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("Analog-Stick Outline",
|
||||
"textures/buttons/AnalogStickOutline.png");
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("Dpad-Left Outline",
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("Dpad-Left Outline",
|
||||
"textures/buttons/DPadLeftOutline.png");
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("Dpad-Right Outline",
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("Dpad-Right Outline",
|
||||
"textures/buttons/DPadRightOutline.png");
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("Dpad-Up Outline",
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("Dpad-Up Outline",
|
||||
"textures/buttons/DPadUpOutline.png");
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("Dpad-Down Outline",
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("Dpad-Down Outline",
|
||||
"textures/buttons/DPadDownOutline.png");
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("Right-Stick Outline",
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage("Right-Stick Outline",
|
||||
"textures/buttons/RightStickOutline.png");
|
||||
sButtonTexturesLoaded = true;
|
||||
}
|
||||
@ -125,23 +126,23 @@ void InputViewer::DrawElement() {
|
||||
ImVec2 size = ImGui::GetContentRegionAvail();
|
||||
|
||||
#ifdef __WIIU__
|
||||
const float scale = CVarGetFloat("gInputViewer.Scale", 1.0f) * 2.0f;
|
||||
const float scale = CVarGetFloat(CVAR_INPUT_VIEWER("Scale"), 1.0f) * 2.0f;
|
||||
#else
|
||||
const float scale = CVarGetFloat("gInputViewer.Scale", 1.0f);
|
||||
const float scale = CVarGetFloat(CVAR_INPUT_VIEWER("Scale"), 1.0f);
|
||||
#endif
|
||||
const int showAnalogAngles = CVarGetInteger("gInputViewer.AnalogAngles.Enabled", 0);
|
||||
const int buttonOutlineMode = CVarGetInteger("gInputViewer.ButtonOutlineMode", BUTTON_OUTLINE_NOT_PRESSED);
|
||||
const int showAnalogAngles = CVarGetInteger(CVAR_INPUT_VIEWER("AnalogAngles.Enabled"), 0);
|
||||
const int buttonOutlineMode = CVarGetInteger(CVAR_INPUT_VIEWER("ButtonOutlineMode"), BUTTON_OUTLINE_NOT_PRESSED);
|
||||
|
||||
ImVec2 bgSize = LUS::Context::GetInstance()->GetWindow()->GetGui()->GetTextureSize("Input-Viewer-Background");
|
||||
ImVec2 bgSize = Ship::Context::GetInstance()->GetWindow()->GetGui()->GetTextureSize("Input-Viewer-Background");
|
||||
ImVec2 scaledBGSize = ImVec2(bgSize.x * scale, bgSize.y * scale);
|
||||
|
||||
ImGui::SetNextWindowSize(ImVec2(
|
||||
scaledBGSize.x + 20,
|
||||
scaledBGSize.y +
|
||||
(showAnalogAngles ? ImGui::CalcTextSize("X").y : 0) * scale * CVarGetFloat("gInputViewer.AnalogAngles.Scale", 1.0f) + 20));
|
||||
(showAnalogAngles ? ImGui::CalcTextSize("X").y : 0) * scale * CVarGetFloat(CVAR_INPUT_VIEWER("AnalogAngles.Scale"), 1.0f) + 20));
|
||||
ImGui::SetNextWindowContentSize(
|
||||
ImVec2(scaledBGSize.x, scaledBGSize.y + (showAnalogAngles ? 15 : 0) * scale *
|
||||
CVarGetFloat("gInputViewer.AnalogAngles.Scale", 1.0f)));
|
||||
CVarGetFloat(CVAR_INPUT_VIEWER("AnalogAngles.Scale"), 1.0f)));
|
||||
ImGui::SetNextWindowPos(
|
||||
ImVec2(mainPos.x + size.x - scaledBGSize.x - 30, mainPos.y + size.y - scaledBGSize.y - 30),
|
||||
ImGuiCond_FirstUseEver);
|
||||
@ -149,13 +150,13 @@ void InputViewer::DrawElement() {
|
||||
ImGui::PushStyleColor(ImGuiCol_WindowBg, ImVec4(0, 0, 0, 0));
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(0.0f, 0.0f));
|
||||
|
||||
OSContPad* pads = LUS::Context::GetInstance()->GetControlDeck()->GetPads();
|
||||
OSContPad* pads = Ship::Context::GetInstance()->GetControlDeck()->GetPads();
|
||||
|
||||
ImGuiWindowFlags windowFlags = ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoScrollbar |
|
||||
ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoBackground |
|
||||
ImGuiWindowFlags_NoFocusOnAppearing;
|
||||
|
||||
if (!CVarGetInteger("gInputViewer.EnableDragging", 1)) {
|
||||
if (!CVarGetInteger(CVAR_INPUT_VIEWER("EnableDragging"), 1)) {
|
||||
windowFlags |= ImGuiWindowFlags_NoInputs | ImGuiWindowFlags_NoMove;
|
||||
}
|
||||
|
||||
@ -163,68 +164,68 @@ void InputViewer::DrawElement() {
|
||||
ImGui::SetCursorPos(ImVec2(10, 10));
|
||||
const ImVec2 aPos = ImGui::GetCursorPos();
|
||||
|
||||
if (CVarGetInteger("gInputViewer.ShowBackground", 1)) {
|
||||
if (CVarGetInteger(CVAR_INPUT_VIEWER("ShowBackground"), 1)) {
|
||||
ImGui::SetNextItemAllowOverlap();
|
||||
// Background
|
||||
ImGui::Image(
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName("Input-Viewer-Background"),
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName("Input-Viewer-Background"),
|
||||
scaledBGSize, ImVec2(0, 0), ImVec2(1.0f, 1.0f), ImVec4(255, 255, 255, 255));
|
||||
}
|
||||
|
||||
// A/B
|
||||
if (CVarGetInteger("gInputViewer.BBtn", 1)) {
|
||||
if (CVarGetInteger(CVAR_INPUT_VIEWER("BBtn"), 1)) {
|
||||
ImGui::SetNextItemAllowOverlap();
|
||||
ImGui::SetCursorPos(aPos);
|
||||
RenderButton("B-Btn", "B-Btn Outline", pads[0].button & BTN_B, scaledBGSize, buttonOutlineMode);
|
||||
}
|
||||
if (CVarGetInteger("gInputViewer.ABtn", 1)) {
|
||||
if (CVarGetInteger(CVAR_INPUT_VIEWER("ABtn"), 1)) {
|
||||
ImGui::SetNextItemAllowOverlap();
|
||||
ImGui::SetCursorPos(aPos);
|
||||
RenderButton("A-Btn", "A-Btn Outline", pads[0].button & BTN_A, scaledBGSize, buttonOutlineMode);
|
||||
}
|
||||
|
||||
// C buttons
|
||||
if (CVarGetInteger("gInputViewer.CUp", 1)) {
|
||||
if (CVarGetInteger(CVAR_INPUT_VIEWER("CUp"), 1)) {
|
||||
ImGui::SetNextItemAllowOverlap();
|
||||
ImGui::SetCursorPos(aPos);
|
||||
RenderButton("C-Up", "C-Up Outline", pads[0].button & BTN_CUP, scaledBGSize, buttonOutlineMode);
|
||||
}
|
||||
if (CVarGetInteger("gInputViewer.CLeft", 1)) {
|
||||
if (CVarGetInteger(CVAR_INPUT_VIEWER("CLeft"), 1)) {
|
||||
ImGui::SetNextItemAllowOverlap();
|
||||
ImGui::SetCursorPos(aPos);
|
||||
RenderButton("C-Left", "C-Left Outline", pads[0].button & BTN_CLEFT, scaledBGSize, buttonOutlineMode);
|
||||
}
|
||||
if (CVarGetInteger("gInputViewer.CRight", 1)) {
|
||||
if (CVarGetInteger(CVAR_INPUT_VIEWER("CRight"), 1)) {
|
||||
ImGui::SetNextItemAllowOverlap();
|
||||
ImGui::SetCursorPos(aPos);
|
||||
RenderButton("C-Right", "C-Right Outline", pads[0].button & BTN_CRIGHT, scaledBGSize,
|
||||
buttonOutlineMode);
|
||||
}
|
||||
if (CVarGetInteger("gInputViewer.CDown", 1)) {
|
||||
if (CVarGetInteger(CVAR_INPUT_VIEWER("CDown"), 1)) {
|
||||
ImGui::SetNextItemAllowOverlap();
|
||||
ImGui::SetCursorPos(aPos);
|
||||
RenderButton("C-Down", "C-Down Outline", pads[0].button & BTN_CDOWN, scaledBGSize, buttonOutlineMode);
|
||||
}
|
||||
|
||||
// L/R/Z
|
||||
if (CVarGetInteger("gInputViewer.LBtn", 1)) {
|
||||
if (CVarGetInteger(CVAR_INPUT_VIEWER("LBtn"), 1)) {
|
||||
ImGui::SetNextItemAllowOverlap();
|
||||
ImGui::SetCursorPos(aPos);
|
||||
RenderButton("L-Btn", "L-Btn Outline", pads[0].button & BTN_L, scaledBGSize, buttonOutlineMode);
|
||||
}
|
||||
if (CVarGetInteger("gInputViewer.RBtn", 1)) {
|
||||
if (CVarGetInteger(CVAR_INPUT_VIEWER("RBtn"), 1)) {
|
||||
ImGui::SetNextItemAllowOverlap();
|
||||
ImGui::SetCursorPos(aPos);
|
||||
RenderButton("R-Btn", "R-Btn Outline", pads[0].button & BTN_R, scaledBGSize, buttonOutlineMode);
|
||||
}
|
||||
if (CVarGetInteger("gInputViewer.ZBtn", 1)) {
|
||||
if (CVarGetInteger(CVAR_INPUT_VIEWER("ZBtn"), 1)) {
|
||||
ImGui::SetNextItemAllowOverlap();
|
||||
ImGui::SetCursorPos(aPos);
|
||||
RenderButton("Z-Btn", "Z-Btn Outline", pads[0].button & BTN_Z, scaledBGSize, buttonOutlineMode);
|
||||
}
|
||||
|
||||
// Start
|
||||
if (CVarGetInteger("gInputViewer.StartBtn", 1)) {
|
||||
if (CVarGetInteger(CVAR_INPUT_VIEWER("StartBtn"), 1)) {
|
||||
ImGui::SetNextItemAllowOverlap();
|
||||
ImGui::SetCursorPos(aPos);
|
||||
RenderButton("Start-Btn", "Start-Btn Outline", pads[0].button & BTN_START, scaledBGSize,
|
||||
@ -232,7 +233,7 @@ void InputViewer::DrawElement() {
|
||||
}
|
||||
|
||||
// Dpad
|
||||
if (CVarGetInteger("gInputViewer.Dpad", 0)) {
|
||||
if (CVarGetInteger(CVAR_INPUT_VIEWER("Dpad"), 0)) {
|
||||
ImGui::SetNextItemAllowOverlap();
|
||||
ImGui::SetCursorPos(aPos);
|
||||
RenderButton("Dpad-Left", "Dpad-Left Outline", pads[0].button & BTN_DLEFT, scaledBGSize,
|
||||
@ -255,84 +256,84 @@ void InputViewer::DrawElement() {
|
||||
|
||||
// Analog Stick
|
||||
const int analogOutlineMode =
|
||||
CVarGetInteger("gInputViewer.AnalogStick.OutlineMode", STICK_MODE_ALWAYS_SHOWN);
|
||||
const float maxStickDistance = CVarGetInteger("gInputViewer.AnalogStick.Movement", 12);
|
||||
CVarGetInteger(CVAR_INPUT_VIEWER("AnalogStick.OutlineMode"), STICK_MODE_ALWAYS_SHOWN);
|
||||
const float maxStickDistance = CVarGetInteger(CVAR_INPUT_VIEWER("AnalogStick.Movement"), 12);
|
||||
if (analogOutlineMode == STICK_MODE_ALWAYS_SHOWN ||
|
||||
(analogOutlineMode == STICK_MODE_HIDDEN_IN_DEADZONE && !analogStickIsInDeadzone)) {
|
||||
ImGui::SetNextItemAllowOverlap();
|
||||
ImGui::SetCursorPos(aPos);
|
||||
ImGui::Image(
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName("Analog-Stick Outline"),
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName("Analog-Stick Outline"),
|
||||
scaledBGSize, ImVec2(0, 0), ImVec2(1.0f, 1.0f), ImVec4(255, 255, 255, 255));
|
||||
}
|
||||
const int analogStickMode =
|
||||
CVarGetInteger("gInputViewer.AnalogStick.VisibilityMode", STICK_MODE_ALWAYS_SHOWN);
|
||||
CVarGetInteger(CVAR_INPUT_VIEWER("AnalogStick.VisibilityMode"), STICK_MODE_ALWAYS_SHOWN);
|
||||
if (analogStickMode == STICK_MODE_ALWAYS_SHOWN ||
|
||||
(analogStickMode == STICK_MODE_HIDDEN_IN_DEADZONE && !analogStickIsInDeadzone)) {
|
||||
ImGui::SetNextItemAllowOverlap();
|
||||
ImGui::SetCursorPos(
|
||||
ImVec2(aPos.x + maxStickDistance * ((float)(pads[0].stick_x) / MAX_AXIS_RANGE) * scale,
|
||||
aPos.y - maxStickDistance * ((float)(pads[0].stick_y) / MAX_AXIS_RANGE) * scale));
|
||||
ImGui::Image(LUS::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName("Analog-Stick"),
|
||||
ImGui::Image(Ship::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName("Analog-Stick"),
|
||||
scaledBGSize, ImVec2(0, 0), ImVec2(1.0f, 1.0f), ImVec4(255, 255, 255, 255));
|
||||
}
|
||||
|
||||
// Right Stick
|
||||
const float maxRightStickDistance = CVarGetInteger("gInputViewer.RightStick.Movement", 7);
|
||||
const float maxRightStickDistance = CVarGetInteger(CVAR_INPUT_VIEWER("RightStick.Movement"), 7);
|
||||
const int rightOutlineMode =
|
||||
CVarGetInteger("gInputViewer.RightStick.OutlineMode", STICK_MODE_ALWAYS_HIDDEN);
|
||||
CVarGetInteger(CVAR_INPUT_VIEWER("RightStick.OutlineMode"), STICK_MODE_ALWAYS_HIDDEN);
|
||||
if (rightOutlineMode == STICK_MODE_ALWAYS_SHOWN ||
|
||||
(rightOutlineMode == STICK_MODE_HIDDEN_IN_DEADZONE && !rightStickIsInDeadzone)) {
|
||||
ImGui::SetNextItemAllowOverlap();
|
||||
ImGui::SetCursorPos(aPos);
|
||||
ImGui::Image(
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName("Right-Stick Outline"),
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName("Right-Stick Outline"),
|
||||
scaledBGSize, ImVec2(0, 0), ImVec2(1.0f, 1.0f), ImVec4(255, 255, 255, 255));
|
||||
}
|
||||
const int rightStickMode =
|
||||
CVarGetInteger("gInputViewer.RightStick.VisibilityMode", STICK_MODE_ALWAYS_HIDDEN);
|
||||
CVarGetInteger(CVAR_INPUT_VIEWER("RightStick.VisibilityMode"), STICK_MODE_ALWAYS_HIDDEN);
|
||||
if (rightStickMode == STICK_MODE_ALWAYS_SHOWN ||
|
||||
(rightStickMode == STICK_MODE_HIDDEN_IN_DEADZONE && !rightStickIsInDeadzone)) {
|
||||
ImGui::SetNextItemAllowOverlap();
|
||||
ImGui::SetCursorPos(
|
||||
ImVec2(aPos.x + maxRightStickDistance * ((float)(pads[0].right_stick_x) / MAX_AXIS_RANGE) * scale,
|
||||
aPos.y - maxRightStickDistance * ((float)(pads[0].right_stick_y) / MAX_AXIS_RANGE) * scale));
|
||||
ImGui::Image(LUS::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName("Right-Stick"),
|
||||
ImGui::Image(Ship::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName("Right-Stick"),
|
||||
scaledBGSize, ImVec2(0, 0), ImVec2(1.0f, 1.0f), ImVec4(255, 255, 255, 255));
|
||||
}
|
||||
|
||||
// Analog stick angle text
|
||||
if (showAnalogAngles) {
|
||||
ImGui::SetCursorPos(ImVec2(aPos.x + 10 + CVarGetInteger("gInputViewer.AnalogAngles.Offset", 0) * scale,
|
||||
ImGui::SetCursorPos(ImVec2(aPos.x + 10 + CVarGetInteger(CVAR_INPUT_VIEWER("AnalogAngles.Offset"), 0) * scale,
|
||||
scaledBGSize.y + aPos.y + 10));
|
||||
// Scale font with input viewer scale
|
||||
float oldFontScale = ImGui::GetFont()->Scale;
|
||||
ImGui::GetFont()->Scale *= scale * CVarGetFloat("gInputViewer.AnalogAngles.Scale", 1.0f);
|
||||
ImGui::GetFont()->Scale *= scale * CVarGetFloat(CVAR_INPUT_VIEWER("AnalogAngles.Scale"), 1.0f);
|
||||
ImGui::PushFont(ImGui::GetFont());
|
||||
|
||||
// Calculate polar R coordinate from X and Y angles, squared to avoid sqrt
|
||||
const float rSquared = pads[0].stick_x * pads[0].stick_x + pads[0].stick_y * pads[0].stick_y;
|
||||
|
||||
// ESS range
|
||||
const int range1Min = CVarGetInteger("gInputViewer.AnalogAngles.Range1.Min", 8);
|
||||
const int range1Max = CVarGetInteger("gInputViewer.AnalogAngles.Range1.Max", 27);
|
||||
const int range1Min = CVarGetInteger(CVAR_INPUT_VIEWER("AnalogAngles.Range1.Min"), 8);
|
||||
const int range1Max = CVarGetInteger(CVAR_INPUT_VIEWER("AnalogAngles.Range1.Max"), 27);
|
||||
// Walking speed range
|
||||
const int range2Min = CVarGetInteger("gInputViewer.AnalogAngles.Range2.Min", 27);
|
||||
const int range2Max = CVarGetInteger("gInputViewer.AnalogAngles.Range2.Max", 62);
|
||||
const int range2Min = CVarGetInteger(CVAR_INPUT_VIEWER("AnalogAngles.Range2.Min"), 27);
|
||||
const int range2Max = CVarGetInteger(CVAR_INPUT_VIEWER("AnalogAngles.Range2.Max"), 62);
|
||||
|
||||
// Push color based on angle ranges
|
||||
if (CVarGetInteger("gInputViewer.AnalogAngles.Range1.Enabled", 0) &&
|
||||
if (CVarGetInteger(CVAR_INPUT_VIEWER("AnalogAngles.Range1.Enabled"), 0) &&
|
||||
(rSquared >= (range1Min * range1Min)) && (rSquared < (range1Max * range1Max))) {
|
||||
ImGui::PushStyleColor(
|
||||
ImGuiCol_Text,
|
||||
color2Vec(CVarGetColor("gInputViewer.AnalogAngles.Range1.Color", vec2Color(range1Color))));
|
||||
} else if (CVarGetInteger("gInputViewer.AnalogAngles.Range2.Enabled", 0) &&
|
||||
color2Vec(CVarGetColor(CVAR_INPUT_VIEWER("AnalogAngles.Range1.Color"), vec2Color(range1Color))));
|
||||
} else if (CVarGetInteger(CVAR_INPUT_VIEWER("AnalogAngles.Range2.Enabled"), 0) &&
|
||||
(rSquared >= (range2Min * range2Min)) && (rSquared < (range2Max * range2Max))) {
|
||||
ImGui::PushStyleColor(
|
||||
ImGuiCol_Text,
|
||||
color2Vec(CVarGetColor("gInputViewer.AnalogAngles.Range2.Color", vec2Color(range2Color))));
|
||||
color2Vec(CVarGetColor(CVAR_INPUT_VIEWER("AnalogAngles.Range2.Color"), vec2Color(range2Color))));
|
||||
} else {
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, color2Vec(CVarGetColor("gInputViewer.AnalogAngles.TextColor",
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, color2Vec(CVarGetColor(CVAR_INPUT_VIEWER("AnalogAngles.TextColor"),
|
||||
vec2Color(textColor))));
|
||||
}
|
||||
|
||||
@ -363,60 +364,60 @@ void InputViewerSettingsWindow::DrawElement() {
|
||||
if (ImGui::Begin("Input Viewer Settings", &mIsVisible)) {
|
||||
|
||||
// gInputViewer.Scale
|
||||
UIWidgets::EnhancementSliderFloat("Input Viewer Scale: %.2f", "##Input", "gInputViewer.Scale", 0.1f, 5.0f, "",
|
||||
UIWidgets::EnhancementSliderFloat("Input Viewer Scale: %.2f", "##Input", CVAR_INPUT_VIEWER("Scale"), 0.1f, 5.0f, "",
|
||||
1.0f, false, true);
|
||||
UIWidgets::Tooltip("Sets the on screen size of the input viewer");
|
||||
|
||||
// gInputViewer.EnableDragging
|
||||
UIWidgets::EnhancementCheckbox("Enable Dragging", "gInputViewer.EnableDragging", false, "",
|
||||
UIWidgets::EnhancementCheckbox("Enable Dragging", CVAR_INPUT_VIEWER("EnableDragging"), false, "",
|
||||
UIWidgets::CheckboxGraphics::Checkmark, true);
|
||||
|
||||
UIWidgets::PaddedSeparator(true, true);
|
||||
|
||||
// gInputViewer.ShowBackground
|
||||
UIWidgets::EnhancementCheckbox("Show Background Layer", "gInputViewer.ShowBackground", false, "",
|
||||
UIWidgets::EnhancementCheckbox("Show Background Layer", CVAR_INPUT_VIEWER("ShowBackground"), false, "",
|
||||
UIWidgets::CheckboxGraphics::Checkmark, true);
|
||||
|
||||
UIWidgets::PaddedSeparator(true, true);
|
||||
|
||||
if (ImGui::CollapsingHeader("Buttons")) {
|
||||
// gInputViewer.ABtn
|
||||
UIWidgets::EnhancementCheckbox("Show A-Button Layers", "gInputViewer.ABtn", false, "",
|
||||
UIWidgets::EnhancementCheckbox("Show A-Button Layers", CVAR_INPUT_VIEWER("ABtn"), false, "",
|
||||
UIWidgets::CheckboxGraphics::Checkmark, true);
|
||||
// gInputViewer.BBtn
|
||||
UIWidgets::EnhancementCheckbox("Show B-Button Layers", "gInputViewer.BBtn", false, "",
|
||||
UIWidgets::EnhancementCheckbox("Show B-Button Layers", CVAR_INPUT_VIEWER("BBtn"), false, "",
|
||||
UIWidgets::CheckboxGraphics::Checkmark, true);
|
||||
// gInputViewer.CUp
|
||||
UIWidgets::EnhancementCheckbox("Show C-Up Layers", "gInputViewer.CUp", false, "",
|
||||
UIWidgets::EnhancementCheckbox("Show C-Up Layers", CVAR_INPUT_VIEWER("CUp"), false, "",
|
||||
UIWidgets::CheckboxGraphics::Checkmark, true);
|
||||
// gInputViewer.CRight
|
||||
UIWidgets::EnhancementCheckbox("Show C-Right Layers", "gInputViewer.CRight", false, "",
|
||||
UIWidgets::EnhancementCheckbox("Show C-Right Layers", CVAR_INPUT_VIEWER("CRight"), false, "",
|
||||
UIWidgets::CheckboxGraphics::Checkmark, true);
|
||||
// gInputViewer.CDown
|
||||
UIWidgets::EnhancementCheckbox("Show C-Down Layers", "gInputViewer.CDown", false, "",
|
||||
UIWidgets::EnhancementCheckbox("Show C-Down Layers", CVAR_INPUT_VIEWER("CDown"), false, "",
|
||||
UIWidgets::CheckboxGraphics::Checkmark, true);
|
||||
// gInputViewer.CLeft
|
||||
UIWidgets::EnhancementCheckbox("Show C-Left Layers", "gInputViewer.CLeft", false, "",
|
||||
UIWidgets::EnhancementCheckbox("Show C-Left Layers", CVAR_INPUT_VIEWER("CLeft"), false, "",
|
||||
UIWidgets::CheckboxGraphics::Checkmark, true);
|
||||
// gInputViewer.LBtn
|
||||
UIWidgets::EnhancementCheckbox("Show L-Button Layers", "gInputViewer.LBtn", false, "",
|
||||
UIWidgets::EnhancementCheckbox("Show L-Button Layers", CVAR_INPUT_VIEWER("LBtn"), false, "",
|
||||
UIWidgets::CheckboxGraphics::Checkmark, true);
|
||||
// gInputViewer.RBtn
|
||||
UIWidgets::EnhancementCheckbox("Show R-Button Layers", "gInputViewer.RBtn", false, "",
|
||||
UIWidgets::EnhancementCheckbox("Show R-Button Layers", CVAR_INPUT_VIEWER("RBtn"), false, "",
|
||||
UIWidgets::CheckboxGraphics::Checkmark, true);
|
||||
// gInputViewer.ZBtn
|
||||
UIWidgets::EnhancementCheckbox("Show Z-Button Layers", "gInputViewer.ZBtn", false, "",
|
||||
UIWidgets::EnhancementCheckbox("Show Z-Button Layers", CVAR_INPUT_VIEWER("ZBtn"), false, "",
|
||||
UIWidgets::CheckboxGraphics::Checkmark, true);
|
||||
// gInputViewer.StartBtn
|
||||
UIWidgets::EnhancementCheckbox("Show Start Button Layers", "gInputViewer.StartBtn", false, "",
|
||||
UIWidgets::EnhancementCheckbox("Show Start Button Layers", CVAR_INPUT_VIEWER("StartBtn"), false, "",
|
||||
UIWidgets::CheckboxGraphics::Checkmark, true);
|
||||
// gInputViewer.Dpad
|
||||
UIWidgets::EnhancementCheckbox("Show D-Pad Layers", "gInputViewer.Dpad", false, "",
|
||||
UIWidgets::EnhancementCheckbox("Show D-Pad Layers", CVAR_INPUT_VIEWER("Dpad"), false, "",
|
||||
UIWidgets::CheckboxGraphics::Checkmark, false);
|
||||
|
||||
// gInputViewer.ButtonOutlineMode
|
||||
UIWidgets::PaddedText("Button Outlines/Backgrounds", true, false);
|
||||
UIWidgets::EnhancementCombobox("gInputViewer.ButtonOutlineMode", buttonOutlineOptions,
|
||||
UIWidgets::EnhancementCombobox(CVAR_INPUT_VIEWER("ButtonOutlineMode"), buttonOutlineOptions,
|
||||
BUTTON_OUTLINE_NOT_PRESSED);
|
||||
UIWidgets::Tooltip(
|
||||
"Sets the desired visibility behavior for the button outline/background layers. Useful for "
|
||||
@ -428,21 +429,21 @@ void InputViewerSettingsWindow::DrawElement() {
|
||||
if (ImGui::CollapsingHeader("Analog Stick")) {
|
||||
// gInputViewer.AnalogStick.VisibilityMode
|
||||
UIWidgets::PaddedText("Analog Stick Visibility", true, false);
|
||||
UIWidgets::EnhancementCombobox("gInputViewer.AnalogStick.VisibilityMode", stickModeOptions,
|
||||
UIWidgets::EnhancementCombobox(CVAR_INPUT_VIEWER("AnalogStick.VisibilityMode"), stickModeOptions,
|
||||
STICK_MODE_ALWAYS_SHOWN);
|
||||
UIWidgets::Tooltip(
|
||||
"Determines the conditions under which the moving layer of the analog stick texture is visible.");
|
||||
|
||||
// gInputViewer.AnalogStick.OutlineMode
|
||||
UIWidgets::PaddedText("Analog Stick Outline/Background Visibility", true, false);
|
||||
UIWidgets::EnhancementCombobox("gInputViewer.AnalogStick.OutlineMode", stickModeOptions,
|
||||
UIWidgets::EnhancementCombobox(CVAR_INPUT_VIEWER("AnalogStick.OutlineMode"), stickModeOptions,
|
||||
STICK_MODE_ALWAYS_SHOWN);
|
||||
UIWidgets::Tooltip(
|
||||
"Determines the conditions under which the analog stick outline/background texture is visible.");
|
||||
|
||||
// gInputViewer.AnalogStick.Movement
|
||||
UIWidgets::EnhancementSliderInt("Analog Stick Movement: %dpx", "##AnalogMovement",
|
||||
"gInputViewer.AnalogStick.Movement", 0, 200, "", 12, true);
|
||||
CVAR_INPUT_VIEWER("AnalogStick.Movement"), 0, 200, "", 12, true);
|
||||
UIWidgets::Tooltip(
|
||||
"Sets the distance to move the analog stick in the input viewer. Useful for custom input viewers.");
|
||||
UIWidgets::PaddedSeparator(true, true);
|
||||
@ -451,21 +452,21 @@ void InputViewerSettingsWindow::DrawElement() {
|
||||
if (ImGui::CollapsingHeader("Additional (\"Right\") Stick")) {
|
||||
// gInputViewer.RightStick.VisibilityMode
|
||||
UIWidgets::PaddedText("Right Stick Visibility", true, false);
|
||||
UIWidgets::EnhancementCombobox("gInputViewer.RightStick.VisibilityMode", stickModeOptions,
|
||||
UIWidgets::EnhancementCombobox(CVAR_INPUT_VIEWER("RightStick.VisibilityMode"), stickModeOptions,
|
||||
STICK_MODE_HIDDEN_IN_DEADZONE);
|
||||
UIWidgets::Tooltip(
|
||||
"Determines the conditions under which the moving layer of the right stick texture is visible.");
|
||||
|
||||
// gInputViewer.RightStick.OutlineMode
|
||||
UIWidgets::PaddedText("Right Stick Outline/Background Visibility", true, false);
|
||||
UIWidgets::EnhancementCombobox("gInputViewer.RightStick.OutlineMode", stickModeOptions,
|
||||
UIWidgets::EnhancementCombobox(CVAR_INPUT_VIEWER("RightStick.OutlineMode"), stickModeOptions,
|
||||
STICK_MODE_HIDDEN_IN_DEADZONE);
|
||||
UIWidgets::Tooltip(
|
||||
"Determines the conditions under which the right stick outline/background texture is visible.");
|
||||
|
||||
// gInputViewer.RightStick.Movement
|
||||
UIWidgets::EnhancementSliderInt("Right Stick Movement: %dpx", "##RightMovement",
|
||||
"gInputViewer.RightStick.Movement", 0, 200, "", 7, true);
|
||||
CVAR_INPUT_VIEWER("RightStick.Movement"), 0, 200, "", 7, true);
|
||||
UIWidgets::Tooltip(
|
||||
"Sets the distance to move the right stick in the input viewer. Useful for custom input viewers.");
|
||||
UIWidgets::PaddedSeparator(true, true);
|
||||
@ -473,42 +474,42 @@ void InputViewerSettingsWindow::DrawElement() {
|
||||
|
||||
if (ImGui::CollapsingHeader("Analog Angle Values")) {
|
||||
// gAnalogAngles
|
||||
UIWidgets::EnhancementCheckbox("Show Analog Stick Angle Values", "gInputViewer.AnalogAngles.Enabled");
|
||||
UIWidgets::EnhancementCheckbox("Show Analog Stick Angle Values", CVAR_INPUT_VIEWER("AnalogAngles.Enabled"));
|
||||
UIWidgets::Tooltip("Displays analog stick angle values in the input viewer");
|
||||
if (CVarGetInteger("gInputViewer.AnalogAngles.Enabled", 0)) {
|
||||
if (CVarGetInteger(CVAR_INPUT_VIEWER("AnalogAngles.Enabled"), 0)) {
|
||||
// gInputViewer.AnalogAngles.TextColor
|
||||
if (ImGui::ColorEdit4("Text Color", (float*)&textColor)) {
|
||||
CVarSetColor("gInputViewer.AnalogAngles.TextColor", vec2Color(textColor));
|
||||
CVarSetColor(CVAR_INPUT_VIEWER("AnalogAngles.TextColor"), vec2Color(textColor));
|
||||
}
|
||||
// gAnalogAngleScale
|
||||
UIWidgets::EnhancementSliderFloat("Angle Text Scale: %.2f%%", "##AnalogAngleScale",
|
||||
"gInputViewer.AnalogAngles.Scale", 0.1f, 5.0f, "", 1.0f, true, true);
|
||||
CVAR_INPUT_VIEWER("AnalogAngles.Scale"), 0.1f, 5.0f, "", 1.0f, true, true);
|
||||
// gInputViewer.AnalogAngles.Offset
|
||||
UIWidgets::EnhancementSliderInt("Angle Text Offset: %dpx", "##AnalogAngleOffset",
|
||||
"gInputViewer.AnalogAngles.Offset", 0, 400, "", 0, true);
|
||||
CVAR_INPUT_VIEWER("AnalogAngles.Offset"), 0, 400, "", 0, true);
|
||||
UIWidgets::PaddedSeparator(true, true);
|
||||
// gInputViewer.AnalogAngles.Range1.Enabled
|
||||
UIWidgets::EnhancementCheckbox("Highlight ESS Position", "gInputViewer.AnalogAngles.Range1.Enabled");
|
||||
UIWidgets::EnhancementCheckbox("Highlight ESS Position", CVAR_INPUT_VIEWER("AnalogAngles.Range1.Enabled"));
|
||||
UIWidgets::Tooltip(
|
||||
"Highlights the angle value text when the analog stick is in ESS position (on flat ground)");
|
||||
if (CVarGetInteger("gInputViewer.AnalogAngles.Range1.Enabled", 0)) {
|
||||
if (CVarGetInteger(CVAR_INPUT_VIEWER("AnalogAngles.Range1.Enabled"), 0)) {
|
||||
// gInputViewer.AnalogAngles.Range1.Color
|
||||
if (ImGui::ColorEdit4("ESS Color", (float*)&range1Color)) {
|
||||
CVarSetColor("gInputViewer.AnalogAngles.Range1.Color", vec2Color(range1Color));
|
||||
CVarSetColor(CVAR_INPUT_VIEWER("AnalogAngles.Range1.Color"), vec2Color(range1Color));
|
||||
}
|
||||
}
|
||||
|
||||
UIWidgets::PaddedSeparator(true, true);
|
||||
// gInputViewer.AnalogAngles.Range2.Enabled
|
||||
UIWidgets::EnhancementCheckbox("Highlight Walking Speed Angles",
|
||||
"gInputViewer.AnalogAngles.Range2.Enabled");
|
||||
CVAR_INPUT_VIEWER("AnalogAngles.Range2.Enabled"));
|
||||
UIWidgets::Tooltip("Highlights the angle value text when the analog stick is at an angle that would "
|
||||
"produce a walking speed (on flat ground)\n\n"
|
||||
"Useful for 1.0 Empty Jumpslash Quick Put Away");
|
||||
if (CVarGetInteger("gInputViewer.AnalogAngles.Range2.Enabled", 0)) {
|
||||
if (CVarGetInteger(CVAR_INPUT_VIEWER("AnalogAngles.Range2.Enabled"), 0)) {
|
||||
// gInputViewer.AnalogAngles.Range2.Color
|
||||
if (ImGui::ColorEdit4("Walking Speed Color", (float*)&range2Color)) {
|
||||
CVarSetColor("gInputViewer.AnalogAngles.Range2.Color", vec2Color(range2Color));
|
||||
CVarSetColor(CVAR_INPUT_VIEWER("AnalogAngles.Range2.Color"), vec2Color(range2Color));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2,6 +2,8 @@
|
||||
|
||||
#include <libultraship/libultraship.h>
|
||||
|
||||
#define CVAR_INPUT_VIEWER(var) "gInputViewer." var
|
||||
|
||||
typedef enum {
|
||||
BUTTON_OUTLINE_ALWAYS_SHOWN,
|
||||
BUTTON_OUTLINE_NOT_PRESSED,
|
||||
@ -15,9 +17,9 @@ typedef enum {
|
||||
STICK_MODE_ALWAYS_HIDDEN,
|
||||
} StickMode;
|
||||
|
||||
class InputViewer : public LUS::GuiWindow {
|
||||
class InputViewer : public Ship::GuiWindow {
|
||||
public:
|
||||
using LUS::GuiWindow::GuiWindow;
|
||||
using GuiWindow::GuiWindow;
|
||||
|
||||
void InitElement() override {};
|
||||
void DrawElement() override;
|
||||
@ -32,9 +34,9 @@ public:
|
||||
void RenderButton(std::string btn, std::string btnOutline, int state, ImVec2 size, int outlineMode);
|
||||
};
|
||||
|
||||
class InputViewerSettingsWindow : public LUS::GuiWindow {
|
||||
class InputViewerSettingsWindow : public Ship::GuiWindow {
|
||||
public:
|
||||
using LUS::GuiWindow::GuiWindow;
|
||||
using GuiWindow::GuiWindow;
|
||||
|
||||
void InitElement() override {};
|
||||
void DrawElement() override;
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -5,7 +5,7 @@
|
||||
#ifndef IMGUI_DEFINE_MATH_OPERATORS
|
||||
#define IMGUI_DEFINE_MATH_OPERATORS
|
||||
#endif
|
||||
#include <ImGui/imgui.h>
|
||||
#include <imgui.h>
|
||||
#include <unordered_map>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
@ -20,7 +20,7 @@ typedef struct {
|
||||
N64ButtonMask defaultBtn;
|
||||
} CustomButtonMap;
|
||||
|
||||
class SohInputEditorWindow : public LUS::GuiWindow {
|
||||
class SohInputEditorWindow : public Ship::GuiWindow {
|
||||
public:
|
||||
using GuiWindow::GuiWindow;
|
||||
~SohInputEditorWindow();
|
||||
@ -38,14 +38,14 @@ class SohInputEditorWindow : public LUS::GuiWindow {
|
||||
void UpdateElement() override;
|
||||
|
||||
private:
|
||||
void DrawStickDirectionLine(const char* axisDirectionName, uint8_t port, uint8_t stick, LUS::Direction direction,
|
||||
void DrawStickDirectionLine(const char* axisDirectionName, uint8_t port, uint8_t stick, Ship::Direction direction,
|
||||
ImVec4 color);
|
||||
void DrawButtonLine(const char* buttonName, uint8_t port, uint16_t bitmask, ImVec4 color);
|
||||
void DrawButtonLineEditMappingButton(uint8_t port, uint16_t bitmask, std::string id);
|
||||
void DrawButtonLineAddMappingButton(uint8_t port, uint16_t bitmask);
|
||||
|
||||
void DrawStickDirectionLineEditMappingButton(uint8_t port, uint8_t stick, LUS::Direction direction, std::string id);
|
||||
void DrawStickDirectionLineAddMappingButton(uint8_t port, uint8_t stick, LUS::Direction direction);
|
||||
void DrawStickDirectionLineEditMappingButton(uint8_t port, uint8_t stick, Ship::Direction direction, std::string id);
|
||||
void DrawStickDirectionLineAddMappingButton(uint8_t port, uint8_t stick, Ship::Direction direction);
|
||||
void DrawStickSection(uint8_t port, uint8_t stick, int32_t id, ImVec4 color);
|
||||
|
||||
void DrawRumbleSection(uint8_t port);
|
||||
@ -74,20 +74,20 @@ class SohInputEditorWindow : public LUS::GuiWindow {
|
||||
int32_t mGameInputBlockTimer;
|
||||
int32_t mMappingInputBlockTimer;
|
||||
int32_t mRumbleTimer;
|
||||
std::shared_ptr<LUS::ControllerRumbleMapping> mRumbleMappingToTest;
|
||||
std::shared_ptr<Ship::ControllerRumbleMapping> mRumbleMappingToTest;
|
||||
|
||||
// mBitmaskToMappingIds[port][bitmask] = { id0, id1, ... }
|
||||
std::unordered_map<uint8_t, std::unordered_map<uint16_t, std::vector<std::string>>> mBitmaskToMappingIds;
|
||||
|
||||
// mStickDirectionToMappingIds[port][stick][direction] = { id0, id1, ... }
|
||||
std::unordered_map<uint8_t,
|
||||
std::unordered_map<uint8_t, std::unordered_map<LUS::Direction, std::vector<std::string>>>>
|
||||
std::unordered_map<uint8_t, std::unordered_map<Ship::Direction, std::vector<std::string>>>>
|
||||
mStickDirectionToMappingIds;
|
||||
|
||||
void UpdateBitmaskToMappingIds(uint8_t port);
|
||||
void UpdateStickDirectionToMappingIds(uint8_t port);
|
||||
|
||||
void GetButtonColorsForLUSDeviceIndex(LUS::LUSDeviceIndex lusIndex, ImVec4& buttonColor,
|
||||
void GetButtonColorsForLUSDeviceIndex(Ship::ShipDeviceIndex lusIndex, ImVec4& buttonColor,
|
||||
ImVec4& buttonHoveredColor);
|
||||
void DrawLinkTab();
|
||||
void DrawIvanTab();
|
||||
@ -97,7 +97,7 @@ class SohInputEditorWindow : public LUS::GuiWindow {
|
||||
std::set<uint16_t> mDpadBitmasks;
|
||||
std::set<uint16_t> mModifierButtonsBitmasks;
|
||||
void DrawButtonDeviceIcons(uint8_t portIndex, std::set<uint16_t> bitmasks);
|
||||
void DrawAnalogStickDeviceIcons(uint8_t portIndex, LUS::Stick stick);
|
||||
void DrawAnalogStickDeviceIcons(uint8_t portIndex, Ship::Stick stick);
|
||||
void DrawRumbleDeviceIcons(uint8_t portIndex);
|
||||
void DrawGyroDeviceIcons(uint8_t portIndex);
|
||||
void DrawLEDDeviceIcons(uint8_t portIndex);
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -8,6 +8,29 @@
|
||||
ResourceMgr_UnpatchGfxByName(path, name); \
|
||||
}
|
||||
|
||||
// Not to be confused with tabs, groups are 1:1 with the boxes shown in the UI, grouping them allows us to reset/randomize
|
||||
// every item in a group at once. If you are looking for tabs they are rendered manually in ImGui in `DrawCosmeticsEditor`
|
||||
typedef enum {
|
||||
COSMETICS_GROUP_LINK,
|
||||
COSMETICS_GROUP_MIRRORSHIELD,
|
||||
COSMETICS_GROUP_SWORDS,
|
||||
COSMETICS_GROUP_GLOVES,
|
||||
COSMETICS_GROUP_EQUIPMENT,
|
||||
COSMETICS_GROUP_CONSUMABLE,
|
||||
COSMETICS_GROUP_HUD,
|
||||
COSMETICS_GROUP_KALEIDO,
|
||||
COSMETICS_GROUP_TITLE,
|
||||
COSMETICS_GROUP_NPC,
|
||||
COSMETICS_GROUP_WORLD,
|
||||
COSMETICS_GROUP_MAGIC,
|
||||
COSMETICS_GROUP_ARROWS,
|
||||
COSMETICS_GROUP_SPIN_ATTACK,
|
||||
COSMETICS_GROUP_TRAILS,
|
||||
COSMETICS_GROUP_NAVI,
|
||||
COSMETICS_GROUP_IVAN,
|
||||
COSMETICS_GROUP_MAX
|
||||
} CosmeticGroup;
|
||||
|
||||
typedef struct {
|
||||
const std::string Name;
|
||||
const std::string ToolTip;
|
||||
@ -26,10 +49,12 @@ static ImGuiTableColumnFlags FlagsCell = ImGuiTableColumnFlags_WidthStretch | Im
|
||||
void InitCosmeticsEditor();//Init the menu itself
|
||||
ImVec4 GetRandomValue(int MaximumPossible);
|
||||
void CosmeticsEditor_RandomizeAll();
|
||||
void CosmeticsEditor_RandomizeGroup(CosmeticGroup group);
|
||||
void CosmeticsEditor_ResetAll();
|
||||
void CosmeticsEditor_ResetGroup(CosmeticGroup group);
|
||||
void ApplyOrResetCustomGfxPatches(bool manualChange = true);
|
||||
|
||||
class CosmeticsEditorWindow : public LUS::GuiWindow {
|
||||
class CosmeticsEditorWindow : public Ship::GuiWindow {
|
||||
public:
|
||||
using GuiWindow::GuiWindow;
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include <libultraship/bridge.h>
|
||||
#include <string>
|
||||
#include "soh/OTRGlobals.h"
|
||||
|
||||
extern "C" {
|
||||
#include <libultraship/libultra.h>
|
||||
@ -81,7 +82,7 @@ void PatchDekuStickTextureOverflow() {
|
||||
const char* dlist = gLinkChildLinkDekuStickDL;
|
||||
int start = 5;
|
||||
|
||||
if (!CVarGetInteger("gFixTexturesOOB", 0)) {
|
||||
if (!CVarGetInteger(CVAR_ENHANCEMENT("FixTexturesOOB"), 0)) {
|
||||
// Unpatch the other texture fix
|
||||
for (size_t i = 0; i < 7; i++) {
|
||||
int instruction = start + (i == 0 ? 0 : i + 1);
|
||||
@ -121,7 +122,7 @@ void PatchFreezardTextureOverflow() {
|
||||
char patchNameBuf[24];
|
||||
|
||||
// Patch using custom overflowed texture
|
||||
if (!CVarGetInteger("gFixTexturesOOB", 0)) {
|
||||
if (!CVarGetInteger(CVAR_ENHANCEMENT("FixTexturesOOB"), 0)) {
|
||||
// Unpatch the other texture fix
|
||||
for (size_t i = 0; i < 7; i++) {
|
||||
int instruction = start + (i == 0 ? 0 : i + 1);
|
||||
@ -163,7 +164,7 @@ void PatchIronKnuckleTextureOverflow() {
|
||||
// Until this is solved, Iron Knuckle will be hardcoded to always display with the "authentic" texture fix
|
||||
|
||||
// Patch using custom overflowed texture
|
||||
// if (!CVarGetInteger("gFixTexturesOOB", 0)) {
|
||||
// if (!CVarGetInteger(CVAR_ENHANCEMENT("FixTexturesOOB"), 0)) {
|
||||
// Unpatch the other texture fix
|
||||
for (size_t i = 0; i < 7; i++) {
|
||||
int instruction = start + (i == 0 ? 0 : i + 1);
|
||||
@ -222,7 +223,7 @@ void PatchMirroredSoldOutGI() {
|
||||
G_TX_NOMIRROR | G_TX_CLAMP, 5, 5, G_TX_NOLOD, G_TX_NOLOD),
|
||||
};
|
||||
|
||||
if (CVarGetInteger("gMirroredWorld", 0)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0)) {
|
||||
if (mirroredSoldOutVtx == nullptr) {
|
||||
// Copy the original vertices that we want to modify (4 at the beginning of the resource)
|
||||
mirroredSoldOutVtx = (Vtx*)malloc(sizeof(Vtx) * 4);
|
||||
@ -269,7 +270,7 @@ void PatchMirroredSunSongEtching() {
|
||||
G_TX_NOMIRROR | G_TX_CLAMP, 7, 5, G_TX_NOLOD, G_TX_NOLOD)
|
||||
};
|
||||
|
||||
if (CVarGetInteger("gMirroredWorld", 0)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0)) {
|
||||
if (mirroredSunSongVtx == nullptr) {
|
||||
// Copy the original vertices that we want to modify (4 at the beginning of the resource)
|
||||
mirroredSunSongVtx = (Vtx*)malloc(sizeof(Vtx) * 4);
|
||||
|
@ -179,7 +179,7 @@ CrowdControl::EffectResult CrowdControl::TranslateGiEnum(GameInteractionEffectQu
|
||||
|
||||
CrowdControl::Effect* CrowdControl::ParseMessage(nlohmann::json dataReceived) {
|
||||
if (!dataReceived.contains("id") || !dataReceived.contains("type")) {
|
||||
SPDLOG_ERROR("[CrowdControl] Invalid payload received:\n{}", dataReceived);
|
||||
SPDLOG_ERROR("[CrowdControl] Invalid payload received:\n{}", dataReceived.dump());
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
@ -13,15 +13,15 @@
|
||||
|
||||
#define Path _Path
|
||||
#define PATH_HACK
|
||||
#include <Utils/StringHelper.h>
|
||||
#include <utils/StringHelper.h>
|
||||
|
||||
#include <Window.h>
|
||||
#include <Context.h>
|
||||
#ifndef IMGUI_DEFINE_MATH_OPERATORS
|
||||
#define IMGUI_DEFINE_MATH_OPERATORS
|
||||
#endif
|
||||
#include <ImGui/imgui.h>
|
||||
#include <ImGui/imgui_internal.h>
|
||||
#include <imgui.h>
|
||||
#include <imgui_internal.h>
|
||||
#undef PATH_HACK
|
||||
#undef Path
|
||||
|
||||
@ -36,12 +36,12 @@ extern PlayState* gPlayState;
|
||||
#include <libultraship/bridge.h>
|
||||
#include <libultraship/libultraship.h>
|
||||
|
||||
#define CMD_REGISTER LUS::Context::GetInstance()->GetConsole()->AddCommand
|
||||
#define CMD_REGISTER Ship::Context::GetInstance()->GetConsole()->AddCommand
|
||||
// TODO: Commands should be using the output passed in.
|
||||
#define ERROR_MESSAGE std::reinterpret_pointer_cast<LUS::ConsoleWindow>(LUS::Context::GetInstance()->GetWindow()->GetGui()->GetGuiWindow("Console"))->SendErrorMessage
|
||||
#define INFO_MESSAGE std::reinterpret_pointer_cast<LUS::ConsoleWindow>(LUS::Context::GetInstance()->GetWindow()->GetGui()->GetGuiWindow("Console"))->SendInfoMessage
|
||||
#define ERROR_MESSAGE std::reinterpret_pointer_cast<Ship::ConsoleWindow>(Ship::Context::GetInstance()->GetWindow()->GetGui()->GetGuiWindow("Console"))->SendErrorMessage
|
||||
#define INFO_MESSAGE std::reinterpret_pointer_cast<Ship::ConsoleWindow>(Ship::Context::GetInstance()->GetWindow()->GetGui()->GetGuiWindow("Console"))->SendInfoMessage
|
||||
|
||||
static bool ActorSpawnHandler(std::shared_ptr<LUS::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
static bool ActorSpawnHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
if ((args.size() != 9) && (args.size() != 3) && (args.size() != 6)) {
|
||||
ERROR_MESSAGE("Not enough arguments passed to actorspawn");
|
||||
return 1;
|
||||
@ -101,7 +101,7 @@ static bool ActorSpawnHandler(std::shared_ptr<LUS::Console> Console, const std::
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool KillPlayerHandler(std::shared_ptr<LUS::Console> Console, const std::vector<std::string>&, std::string* output) {
|
||||
static bool KillPlayerHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>&, std::string* output) {
|
||||
GameInteractionEffectBase* effect = new GameInteractionEffect::SetPlayerHealth();
|
||||
dynamic_cast<ParameterizedGameInteractionEffect*>(effect)->parameters[0] = 0;
|
||||
GameInteractionEffectQueryResult result = GameInteractor::ApplyEffect(effect);
|
||||
@ -114,7 +114,7 @@ static bool KillPlayerHandler(std::shared_ptr<LUS::Console> Console, const std::
|
||||
}
|
||||
}
|
||||
|
||||
static bool SetPlayerHealthHandler(std::shared_ptr<LUS::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
static bool SetPlayerHealthHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
if (args.size() < 2) {
|
||||
ERROR_MESSAGE("[SOH] Unexpected arguments passed");
|
||||
return 1;
|
||||
@ -145,7 +145,7 @@ static bool SetPlayerHealthHandler(std::shared_ptr<LUS::Console> Console, const
|
||||
}
|
||||
}
|
||||
|
||||
static bool LoadSceneHandler(std::shared_ptr<LUS::Console> Console, const std::vector<std::string>&, std::string* output) {
|
||||
static bool LoadSceneHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>&, std::string* output) {
|
||||
gSaveContext.respawnFlag = 0;
|
||||
gSaveContext.seqId = 0xFF;
|
||||
gSaveContext.gameMode = 0;
|
||||
@ -153,7 +153,7 @@ static bool LoadSceneHandler(std::shared_ptr<LUS::Console> Console, const std::v
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool RupeeHandler(std::shared_ptr<LUS::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
static bool RupeeHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
if (args.size() < 2) {
|
||||
return 1;
|
||||
}
|
||||
@ -178,7 +178,7 @@ static bool RupeeHandler(std::shared_ptr<LUS::Console> Console, const std::vecto
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool SetPosHandler(std::shared_ptr<LUS::Console> Console, const std::vector<std::string> args, std::string* output) {
|
||||
static bool SetPosHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string> args, std::string* output) {
|
||||
if (gPlayState == nullptr) {
|
||||
ERROR_MESSAGE("PlayState == nullptr");
|
||||
return 1;
|
||||
@ -205,7 +205,7 @@ static bool SetPosHandler(std::shared_ptr<LUS::Console> Console, const std::vect
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool ResetHandler(std::shared_ptr<LUS::Console> Console, std::vector<std::string> args, std::string* output) {
|
||||
static bool ResetHandler(std::shared_ptr<Ship::Console> Console, std::vector<std::string> args, std::string* output) {
|
||||
if (gPlayState == nullptr) {
|
||||
ERROR_MESSAGE("PlayState == nullptr");
|
||||
return 1;
|
||||
@ -225,7 +225,7 @@ const static std::map<std::string, uint16_t> ammoItems{
|
||||
{ "beans", ITEM_BEAN }
|
||||
};
|
||||
|
||||
static bool AddAmmoHandler(std::shared_ptr<LUS::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
static bool AddAmmoHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
if (args.size() < 3) {
|
||||
ERROR_MESSAGE("[SOH] Unexpected arguments passed");
|
||||
return 1;
|
||||
@ -264,7 +264,7 @@ static bool AddAmmoHandler(std::shared_ptr<LUS::Console> Console, const std::vec
|
||||
}
|
||||
}
|
||||
|
||||
static bool TakeAmmoHandler(std::shared_ptr<LUS::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
static bool TakeAmmoHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
if (args.size() < 3) {
|
||||
ERROR_MESSAGE("[SOH] Unexpected arguments passed");
|
||||
return 1;
|
||||
@ -311,7 +311,7 @@ const static std::map<std::string, uint16_t> bottleItems{
|
||||
{ "big_poe", ITEM_BIG_POE }, { "blue_fire", ITEM_BLUE_FIRE }, { "rutos_letter", ITEM_LETTER_RUTO },
|
||||
};
|
||||
|
||||
static bool BottleHandler(std::shared_ptr<LUS::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
static bool BottleHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
if (args.size() < 3) {
|
||||
ERROR_MESSAGE("[SOH] Unexpected arguments passed");
|
||||
return 1;
|
||||
@ -343,7 +343,7 @@ static bool BottleHandler(std::shared_ptr<LUS::Console> Console, const std::vect
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool BHandler(std::shared_ptr<LUS::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
static bool BHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
if (args.size() < 2) {
|
||||
ERROR_MESSAGE("[SOH] Unexpected arguments passed");
|
||||
return 1;
|
||||
@ -353,7 +353,7 @@ static bool BHandler(std::shared_ptr<LUS::Console> Console, const std::vector<st
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool ItemHandler(std::shared_ptr<LUS::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
static bool ItemHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
if (args.size() < 3) {
|
||||
ERROR_MESSAGE("[SOH] Unexpected arguments passed");
|
||||
return 1;
|
||||
@ -364,7 +364,7 @@ static bool ItemHandler(std::shared_ptr<LUS::Console> Console, const std::vector
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool GiveItemHandler(std::shared_ptr<LUS::Console> Console, const std::vector<std::string> args, std::string* output) {
|
||||
static bool GiveItemHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string> args, std::string* output) {
|
||||
if (args.size() < 3) {
|
||||
ERROR_MESSAGE("[SOH] Unexpected arguments passed");
|
||||
return 1;
|
||||
@ -385,7 +385,7 @@ static bool GiveItemHandler(std::shared_ptr<LUS::Console> Console, const std::ve
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool EntranceHandler(std::shared_ptr<LUS::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
static bool EntranceHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
if (args.size() < 2) {
|
||||
ERROR_MESSAGE("[SOH] Unexpected arguments passed");
|
||||
return 1;
|
||||
@ -406,7 +406,7 @@ static bool EntranceHandler(std::shared_ptr<LUS::Console> Console, const std::ve
|
||||
gSaveContext.nextTransitionType = TRANS_TYPE_INSTANT;
|
||||
}
|
||||
|
||||
static bool VoidHandler(std::shared_ptr<LUS::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
static bool VoidHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
if (gPlayState != nullptr) {
|
||||
gSaveContext.respawn[RESPAWN_MODE_DOWN].tempSwchFlags = gPlayState->actorCtx.flags.tempSwch;
|
||||
gSaveContext.respawn[RESPAWN_MODE_DOWN].tempCollectFlags = gPlayState->actorCtx.flags.tempCollect;
|
||||
@ -422,7 +422,7 @@ static bool VoidHandler(std::shared_ptr<LUS::Console> Console, const std::vector
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool ReloadHandler(std::shared_ptr<LUS::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
static bool ReloadHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
if (gPlayState != nullptr) {
|
||||
gPlayState->nextEntranceIndex = gSaveContext.entranceIndex;
|
||||
gPlayState->transitionTrigger = TRANS_TRIGGER_START;
|
||||
@ -439,7 +439,7 @@ const static std::map<std::string, uint16_t> fw_options {
|
||||
{ "clear", 0}, {"warp", 1}, {"backup", 2}
|
||||
};
|
||||
|
||||
static bool FWHandler(std::shared_ptr<LUS::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
static bool FWHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
if (args.size() < 2) {
|
||||
ERROR_MESSAGE("[SOH] Unexpected arguments passed");
|
||||
return 1;
|
||||
@ -471,7 +471,7 @@ static bool FWHandler(std::shared_ptr<LUS::Console> Console, const std::vector<s
|
||||
return 0;
|
||||
break;
|
||||
case 2: //backup
|
||||
if (CVarGetInteger("gBetterFW", 0)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("BetterFarore"), 0)) {
|
||||
gSaveContext.fw = gSaveContext.backupFW;
|
||||
gSaveContext.fw.set = 1;
|
||||
INFO_MESSAGE("[SOH] Backup FW data copied! Reload scene to take effect.");
|
||||
@ -491,7 +491,7 @@ static bool FWHandler(std::shared_ptr<LUS::Console> Console, const std::vector<s
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool FileSelectHandler(std::shared_ptr<LUS::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
static bool FileSelectHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
if (gPlayState != nullptr) {
|
||||
SET_NEXT_GAMESTATE(&gPlayState->state, FileChoose_Init, FileChooseContext);
|
||||
gPlayState->state.running = 0;
|
||||
@ -502,12 +502,12 @@ static bool FileSelectHandler(std::shared_ptr<LUS::Console> Console, const std::
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool QuitHandler(std::shared_ptr<LUS::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
LUS::Context::GetInstance()->GetWindow()->Close();
|
||||
static bool QuitHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
Ship::Context::GetInstance()->GetWindow()->Close();
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool SaveStateHandler(std::shared_ptr<LUS::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
static bool SaveStateHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
unsigned int slot = OTRGlobals::Instance->gSaveStateMgr->GetCurrentSlot();
|
||||
const SaveStateReturn rtn = OTRGlobals::Instance->gSaveStateMgr->AddRequest({ slot, RequestType::SAVE });
|
||||
|
||||
@ -521,7 +521,7 @@ static bool SaveStateHandler(std::shared_ptr<LUS::Console> Console, const std::v
|
||||
}
|
||||
}
|
||||
|
||||
static bool LoadStateHandler(std::shared_ptr<LUS::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
static bool LoadStateHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
unsigned int slot = OTRGlobals::Instance->gSaveStateMgr->GetCurrentSlot();
|
||||
const SaveStateReturn rtn = OTRGlobals::Instance->gSaveStateMgr->AddRequest({ slot, RequestType::LOAD });
|
||||
|
||||
@ -542,7 +542,7 @@ static bool LoadStateHandler(std::shared_ptr<LUS::Console> Console, const std::v
|
||||
|
||||
}
|
||||
|
||||
static bool StateSlotSelectHandler(std::shared_ptr<LUS::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
static bool StateSlotSelectHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
if (args.size() < 2) {
|
||||
ERROR_MESSAGE("[SOH] Unexpected arguments passed");
|
||||
return 1;
|
||||
@ -567,7 +567,7 @@ static bool StateSlotSelectHandler(std::shared_ptr<LUS::Console> Console, const
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool InvisibleHandler(std::shared_ptr<LUS::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
static bool InvisibleHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
if (args.size() < 2) {
|
||||
ERROR_MESSAGE("[SOH] Unexpected arguments passed");
|
||||
return 1;
|
||||
@ -594,7 +594,7 @@ static bool InvisibleHandler(std::shared_ptr<LUS::Console> Console, const std::v
|
||||
}
|
||||
}
|
||||
|
||||
static bool GiantLinkHandler(std::shared_ptr<LUS::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
static bool GiantLinkHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
if (args.size() < 2) {
|
||||
ERROR_MESSAGE("[SOH] Unexpected arguments passed");
|
||||
return 1;
|
||||
@ -622,7 +622,7 @@ static bool GiantLinkHandler(std::shared_ptr<LUS::Console> Console, const std::v
|
||||
}
|
||||
}
|
||||
|
||||
static bool MinishLinkHandler(std::shared_ptr<LUS::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
static bool MinishLinkHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
if (args.size() < 2) {
|
||||
ERROR_MESSAGE("[SOH] Unexpected arguments passed");
|
||||
return 1;
|
||||
@ -650,7 +650,7 @@ static bool MinishLinkHandler(std::shared_ptr<LUS::Console> Console, const std::
|
||||
}
|
||||
}
|
||||
|
||||
static bool AddHeartContainerHandler(std::shared_ptr<LUS::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
static bool AddHeartContainerHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
if (args.size() < 2) {
|
||||
ERROR_MESSAGE("[SOH] Unexpected arguments passed");
|
||||
return 1;
|
||||
@ -681,7 +681,7 @@ static bool AddHeartContainerHandler(std::shared_ptr<LUS::Console> Console, cons
|
||||
}
|
||||
}
|
||||
|
||||
static bool RemoveHeartContainerHandler(std::shared_ptr<LUS::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
static bool RemoveHeartContainerHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
if (args.size() < 2) {
|
||||
ERROR_MESSAGE("[SOH] Unexpected arguments passed");
|
||||
return 1;
|
||||
@ -712,7 +712,7 @@ static bool RemoveHeartContainerHandler(std::shared_ptr<LUS::Console> Console, c
|
||||
}
|
||||
}
|
||||
|
||||
static bool GravityHandler(std::shared_ptr<LUS::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
static bool GravityHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
if (args.size() < 2) {
|
||||
ERROR_MESSAGE("[SOH] Unexpected arguments passed");
|
||||
return 1;
|
||||
@ -721,7 +721,7 @@ static bool GravityHandler(std::shared_ptr<LUS::Console> Console, const std::vec
|
||||
GameInteractionEffectBase* effect = new GameInteractionEffect::ModifyGravity();
|
||||
|
||||
try {
|
||||
dynamic_cast<ParameterizedGameInteractionEffect*>(effect)->parameters[0] = LUS::Math::clamp(std::stoi(args[1], nullptr, 10), GI_GRAVITY_LEVEL_LIGHT, GI_GRAVITY_LEVEL_HEAVY);
|
||||
dynamic_cast<ParameterizedGameInteractionEffect*>(effect)->parameters[0] = Ship::Math::clamp(std::stoi(args[1], nullptr, 10), GI_GRAVITY_LEVEL_LIGHT, GI_GRAVITY_LEVEL_HEAVY);
|
||||
} catch (std::invalid_argument const& ex) {
|
||||
ERROR_MESSAGE("[SOH] Gravity value must be a number.");
|
||||
return 1;
|
||||
@ -737,7 +737,7 @@ static bool GravityHandler(std::shared_ptr<LUS::Console> Console, const std::vec
|
||||
}
|
||||
}
|
||||
|
||||
static bool NoUIHandler(std::shared_ptr<LUS::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
static bool NoUIHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
if (args.size() < 2) {
|
||||
ERROR_MESSAGE("[SOH] Unexpected arguments passed");
|
||||
return 1;
|
||||
@ -765,7 +765,7 @@ static bool NoUIHandler(std::shared_ptr<LUS::Console> Console, const std::vector
|
||||
}
|
||||
}
|
||||
|
||||
static bool FreezeHandler(std::shared_ptr<LUS::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
static bool FreezeHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
GameInteractionEffectBase* effect = new GameInteractionEffect::FreezePlayer();
|
||||
GameInteractionEffectQueryResult result = GameInteractor::ApplyEffect(effect);
|
||||
|
||||
@ -778,7 +778,7 @@ static bool FreezeHandler(std::shared_ptr<LUS::Console> Console, const std::vect
|
||||
}
|
||||
}
|
||||
|
||||
static bool DefenseModifierHandler(std::shared_ptr<LUS::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
static bool DefenseModifierHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
if (args.size() < 2) {
|
||||
ERROR_MESSAGE("[SOH] Unexpected arguments passed");
|
||||
return 1;
|
||||
@ -802,7 +802,7 @@ static bool DefenseModifierHandler(std::shared_ptr<LUS::Console> Console, const
|
||||
}
|
||||
}
|
||||
|
||||
static bool DamageHandler(std::shared_ptr<LUS::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
static bool DamageHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
if (args.size() < 2) {
|
||||
ERROR_MESSAGE("[SOH] Unexpected arguments passed");
|
||||
return 1;
|
||||
@ -832,7 +832,7 @@ static bool DamageHandler(std::shared_ptr<LUS::Console> Console, const std::vect
|
||||
}
|
||||
}
|
||||
|
||||
static bool HealHandler(std::shared_ptr<LUS::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
static bool HealHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
if (args.size() < 2) {
|
||||
ERROR_MESSAGE("[SOH] Unexpected arguments passed");
|
||||
return 1;
|
||||
@ -862,7 +862,7 @@ static bool HealHandler(std::shared_ptr<LUS::Console> Console, const std::vector
|
||||
}
|
||||
}
|
||||
|
||||
static bool FillMagicHandler(std::shared_ptr<LUS::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
static bool FillMagicHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
GameInteractionEffectBase* effect = new GameInteractionEffect::FillMagic();
|
||||
GameInteractionEffectQueryResult result = GameInteractor::ApplyEffect(effect);
|
||||
|
||||
@ -875,7 +875,7 @@ static bool FillMagicHandler(std::shared_ptr<LUS::Console> Console, const std::v
|
||||
}
|
||||
}
|
||||
|
||||
static bool EmptyMagicHandler(std::shared_ptr<LUS::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
static bool EmptyMagicHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
GameInteractionEffectBase* effect = new GameInteractionEffect::EmptyMagic();
|
||||
GameInteractionEffectQueryResult result = GameInteractor::ApplyEffect(effect);
|
||||
|
||||
@ -888,7 +888,7 @@ static bool EmptyMagicHandler(std::shared_ptr<LUS::Console> Console, const std::
|
||||
}
|
||||
}
|
||||
|
||||
static bool NoZHandler(std::shared_ptr<LUS::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
static bool NoZHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
if (args.size() < 2) {
|
||||
ERROR_MESSAGE("[SOH] Unexpected arguments passed");
|
||||
return 1;
|
||||
@ -916,7 +916,7 @@ static bool NoZHandler(std::shared_ptr<LUS::Console> Console, const std::vector<
|
||||
}
|
||||
}
|
||||
|
||||
static bool OneHitKOHandler(std::shared_ptr<LUS::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
static bool OneHitKOHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
if (args.size() < 2) {
|
||||
ERROR_MESSAGE("[SOH] Unexpected arguments passed");
|
||||
return 1;
|
||||
@ -944,7 +944,7 @@ static bool OneHitKOHandler(std::shared_ptr<LUS::Console> Console, const std::ve
|
||||
}
|
||||
}
|
||||
|
||||
static bool PacifistHandler(std::shared_ptr<LUS::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
static bool PacifistHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
if (args.size() < 2) {
|
||||
ERROR_MESSAGE("[SOH] Unexpected arguments passed");
|
||||
return 1;
|
||||
@ -972,7 +972,7 @@ static bool PacifistHandler(std::shared_ptr<LUS::Console> Console, const std::ve
|
||||
}
|
||||
}
|
||||
|
||||
static bool PaperLinkHandler(std::shared_ptr<LUS::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
static bool PaperLinkHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
if (args.size() < 2) {
|
||||
ERROR_MESSAGE("[SOH] Unexpected arguments passed");
|
||||
return 1;
|
||||
@ -1001,7 +1001,7 @@ static bool PaperLinkHandler(std::shared_ptr<LUS::Console> Console, const std::v
|
||||
}
|
||||
}
|
||||
|
||||
static bool RainstormHandler(std::shared_ptr<LUS::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
static bool RainstormHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
if (args.size() < 2) {
|
||||
ERROR_MESSAGE("[SOH] Unexpected arguments passed");
|
||||
return 1;
|
||||
@ -1029,7 +1029,7 @@ static bool RainstormHandler(std::shared_ptr<LUS::Console> Console, const std::v
|
||||
}
|
||||
}
|
||||
|
||||
static bool ReverseControlsHandler(std::shared_ptr<LUS::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
static bool ReverseControlsHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
if (args.size() < 2) {
|
||||
ERROR_MESSAGE("[SOH] Unexpected arguments passed");
|
||||
return 1;
|
||||
@ -1058,7 +1058,7 @@ static bool ReverseControlsHandler(std::shared_ptr<LUS::Console> Console, const
|
||||
}
|
||||
}
|
||||
|
||||
static bool UpdateRupeesHandler(std::shared_ptr<LUS::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
static bool UpdateRupeesHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
if (args.size() < 2) {
|
||||
ERROR_MESSAGE("[SOH] Unexpected arguments passed");
|
||||
return 1;
|
||||
@ -1082,7 +1082,7 @@ static bool UpdateRupeesHandler(std::shared_ptr<LUS::Console> Console, const std
|
||||
}
|
||||
}
|
||||
|
||||
static bool SpeedModifierHandler(std::shared_ptr<LUS::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
static bool SpeedModifierHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
if (args.size() < 2) {
|
||||
ERROR_MESSAGE("[SOH] Unexpected arguments passed");
|
||||
return 1;
|
||||
@ -1112,7 +1112,7 @@ const static std::map<std::string, uint16_t> boots {
|
||||
{ "hover", EQUIP_VALUE_BOOTS_HOVER },
|
||||
};
|
||||
|
||||
static bool BootsHandler(std::shared_ptr<LUS::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
static bool BootsHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
if (args.size() < 2) {
|
||||
ERROR_MESSAGE("[SOH] Unexpected arguments passed");
|
||||
return 1;
|
||||
@ -1143,7 +1143,7 @@ const static std::map<std::string, uint16_t> shields {
|
||||
{ "mirror", ITEM_SHIELD_MIRROR },
|
||||
};
|
||||
|
||||
static bool GiveShieldHandler(std::shared_ptr<LUS::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
static bool GiveShieldHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
if (args.size() < 2) {
|
||||
ERROR_MESSAGE("[SOH] Unexpected arguments passed");
|
||||
return 1;
|
||||
@ -1168,7 +1168,7 @@ static bool GiveShieldHandler(std::shared_ptr<LUS::Console> Console, const std::
|
||||
}
|
||||
}
|
||||
|
||||
static bool TakeShieldHandler(std::shared_ptr<LUS::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
static bool TakeShieldHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
if (args.size() < 2) {
|
||||
ERROR_MESSAGE("[SOH] Unexpected arguments passed");
|
||||
return 1;
|
||||
@ -1193,7 +1193,7 @@ static bool TakeShieldHandler(std::shared_ptr<LUS::Console> Console, const std::
|
||||
}
|
||||
}
|
||||
|
||||
static bool KnockbackHandler(std::shared_ptr<LUS::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
static bool KnockbackHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
if (args.size() < 2) {
|
||||
ERROR_MESSAGE("[SOH] Unexpected arguments passed");
|
||||
return 1;
|
||||
@ -1223,7 +1223,7 @@ static bool KnockbackHandler(std::shared_ptr<LUS::Console> Console, const std::v
|
||||
}
|
||||
}
|
||||
|
||||
static bool ElectrocuteHandler(std::shared_ptr<LUS::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
static bool ElectrocuteHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
GameInteractionEffectBase* effect = new GameInteractionEffect::ElectrocutePlayer();
|
||||
GameInteractionEffectQueryResult result = GameInteractor::ApplyEffect(effect);
|
||||
|
||||
@ -1236,7 +1236,7 @@ static bool ElectrocuteHandler(std::shared_ptr<LUS::Console> Console, const std:
|
||||
}
|
||||
}
|
||||
|
||||
static bool BurnHandler(std::shared_ptr<LUS::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
static bool BurnHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
GameInteractionEffectBase* effect = new GameInteractionEffect::BurnPlayer();
|
||||
GameInteractionEffectQueryResult result = GameInteractor::ApplyEffect(effect);
|
||||
|
||||
@ -1249,7 +1249,7 @@ static bool BurnHandler(std::shared_ptr<LUS::Console> Console, const std::vector
|
||||
}
|
||||
}
|
||||
|
||||
static bool CuccoStormHandler(std::shared_ptr<LUS::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
static bool CuccoStormHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
GameInteractionEffectQueryResult result = GameInteractor::RawAction::SpawnActor(ACTOR_EN_NIW, 0);
|
||||
|
||||
if (result == GameInteractionEffectQueryResult::Possible) {
|
||||
@ -1261,7 +1261,7 @@ static bool CuccoStormHandler(std::shared_ptr<LUS::Console> Console, const std::
|
||||
}
|
||||
}
|
||||
|
||||
static bool GenerateRandoHandler(std::shared_ptr<LUS::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
static bool GenerateRandoHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
if (args.size() == 1) {
|
||||
if (GenerateRandomizer()) {
|
||||
return 0;
|
||||
@ -1289,16 +1289,58 @@ static bool GenerateRandoHandler(std::shared_ptr<LUS::Console> Console, const st
|
||||
return 1;
|
||||
}
|
||||
|
||||
static bool CosmeticsHandler(std::shared_ptr<LUS::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
static constexpr std::array<std::pair<const char*, CosmeticGroup>, COSMETICS_GROUP_MAX> cosmetic_groups = {{
|
||||
{"link", COSMETICS_GROUP_LINK},
|
||||
{"mirror_shield", COSMETICS_GROUP_MIRRORSHIELD},
|
||||
{"swords", COSMETICS_GROUP_SWORDS},
|
||||
{"gloves", COSMETICS_GROUP_GLOVES},
|
||||
{"equipment", COSMETICS_GROUP_EQUIPMENT},
|
||||
{"consumable", COSMETICS_GROUP_CONSUMABLE},
|
||||
{"hud", COSMETICS_GROUP_HUD},
|
||||
{"kaleido", COSMETICS_GROUP_KALEIDO},
|
||||
{"title", COSMETICS_GROUP_TITLE},
|
||||
{"npc", COSMETICS_GROUP_NPC},
|
||||
{"world", COSMETICS_GROUP_WORLD},
|
||||
{"magic", COSMETICS_GROUP_MAGIC},
|
||||
{"arrows", COSMETICS_GROUP_ARROWS},
|
||||
{"spin_attack", COSMETICS_GROUP_SPIN_ATTACK},
|
||||
{"trials", COSMETICS_GROUP_TRAILS},
|
||||
{"navi", COSMETICS_GROUP_NAVI},
|
||||
{"ivan", COSMETICS_GROUP_IVAN},
|
||||
}};
|
||||
|
||||
static bool CosmeticsHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
if (args.size() < 2) {
|
||||
ERROR_MESSAGE("[SOH] Unexpected arguments passed");
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (args[1].compare("reset") == 0) {
|
||||
CosmeticsEditor_ResetAll();
|
||||
if (args.size() == 2) {
|
||||
CosmeticsEditor_ResetAll();
|
||||
} else {
|
||||
for (const auto& [key, value] : cosmetic_groups) {
|
||||
if (args[2].compare(key) == 0) {
|
||||
CosmeticsEditor_ResetGroup(value);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
ERROR_MESSAGE("[SOH] Invalid argument passed, unrecognized group name");
|
||||
return 1;
|
||||
}
|
||||
} else if (args[1].compare("randomize") == 0) {
|
||||
CosmeticsEditor_RandomizeAll();
|
||||
if (args.size() == 2) {
|
||||
CosmeticsEditor_RandomizeAll();
|
||||
} else {
|
||||
for (const auto& [key, value] : cosmetic_groups) {
|
||||
if (args[2].compare(key) == 0) {
|
||||
CosmeticsEditor_RandomizeGroup(value);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
ERROR_MESSAGE("[SOH] Invalid argument passed, unrecognized group name");
|
||||
return 1;
|
||||
}
|
||||
} else {
|
||||
ERROR_MESSAGE("[SOH] Invalid argument passed, must be 'reset' or 'randomize'");
|
||||
return 1;
|
||||
@ -1307,16 +1349,50 @@ static bool CosmeticsHandler(std::shared_ptr<LUS::Console> Console, const std::v
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool SfxHandler(std::shared_ptr<LUS::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
static std::map<std::string, SeqType> sfx_groups = {
|
||||
{"bgm", SEQ_BGM_WORLD},
|
||||
{"fanfares", SEQ_FANFARE},
|
||||
{"events", SEQ_BGM_EVENT},
|
||||
{"battle", SEQ_BGM_BATTLE},
|
||||
{"ocarina", SEQ_OCARINA},
|
||||
{"instruments", SEQ_INSTRUMENT},
|
||||
{"sfx", SEQ_SFX},
|
||||
{"voices", SEQ_VOICE},
|
||||
{"custom", SEQ_BGM_CUSTOM},
|
||||
};
|
||||
|
||||
static bool SfxHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args, std::string* output) {
|
||||
if (args.size() < 2) {
|
||||
ERROR_MESSAGE("[SOH] Unexpected arguments passed");
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (args[1].compare("reset") == 0) {
|
||||
AudioEditor_ResetAll();
|
||||
if (args.size() == 2) {
|
||||
AudioEditor_ResetAll();
|
||||
} else {
|
||||
for (const auto& [key, value] : sfx_groups) {
|
||||
if (args[2].compare(key) == 0) {
|
||||
AudioEditor_ResetGroup(value);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
ERROR_MESSAGE("[SOH] Invalid argument passed, unrecognized group name");
|
||||
return 1;
|
||||
}
|
||||
} else if (args[1].compare("randomize") == 0) {
|
||||
AudioEditor_RandomizeAll();
|
||||
if (args.size() == 2) {
|
||||
AudioEditor_RandomizeAll();
|
||||
} else {
|
||||
for (const auto& [key, value] : sfx_groups) {
|
||||
if (args[2].compare(key) == 0) {
|
||||
AudioEditor_RandomizeGroup(value);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
ERROR_MESSAGE("[SOH] Invalid argument passed, unrecognized group name");
|
||||
return 1;
|
||||
}
|
||||
} else {
|
||||
ERROR_MESSAGE("[SOH] Invalid argument passed, must be 'reset' or 'randomize'");
|
||||
return 1;
|
||||
@ -1335,17 +1411,17 @@ void DebugConsole_Init(void) {
|
||||
CMD_REGISTER("save_state", {SaveStateHandler, "Save a state."});
|
||||
CMD_REGISTER("load_state", {LoadStateHandler, "Load a state."});
|
||||
CMD_REGISTER("set_slot", {StateSlotSelectHandler, "Selects a SaveState slot", {
|
||||
{"Slot number", LUS::ArgumentType::NUMBER,}
|
||||
{"Slot number", Ship::ArgumentType::NUMBER,}
|
||||
}});
|
||||
|
||||
// Map & Location
|
||||
CMD_REGISTER("void", {VoidHandler, "Voids out of the current map."});
|
||||
CMD_REGISTER("reload", {ReloadHandler, "Reloads the current map."});
|
||||
CMD_REGISTER("fw", {FWHandler, "Spawns the player where Farore's Wind is set.", {
|
||||
{"clear|warp|backup", LUS::ArgumentType::TEXT}
|
||||
{"clear|warp|backup", Ship::ArgumentType::TEXT}
|
||||
}});
|
||||
CMD_REGISTER("entrance", {EntranceHandler, "Sends player to the entered entrance (hex)", {
|
||||
{"entrance", LUS::ArgumentType::NUMBER}
|
||||
{"entrance", Ship::ArgumentType::NUMBER}
|
||||
}});
|
||||
|
||||
// Gameplay
|
||||
@ -1354,64 +1430,64 @@ void DebugConsole_Init(void) {
|
||||
CMD_REGISTER("map", {LoadSceneHandler, "Load up kak?"});
|
||||
|
||||
CMD_REGISTER("rupee", {RupeeHandler, "Set your rupee counter.", {
|
||||
{"amount", LUS::ArgumentType::NUMBER}
|
||||
{"amount", Ship::ArgumentType::NUMBER}
|
||||
}});
|
||||
|
||||
CMD_REGISTER("bItem", {BHandler, "Set an item to the B button.", {
|
||||
{"Item ID", LUS::ArgumentType::NUMBER}
|
||||
{"Item ID", Ship::ArgumentType::NUMBER}
|
||||
}});
|
||||
|
||||
CMD_REGISTER("spawn", { ActorSpawnHandler, "Spawn an actor.", { { "actor name/id", LUS::ArgumentType::NUMBER }, // TODO there should be an actor_id arg type
|
||||
{"data", LUS::ArgumentType::NUMBER},
|
||||
{"x", LUS::ArgumentType::NUMBER, true},
|
||||
{"y", LUS::ArgumentType::NUMBER, true},
|
||||
{"z", LUS::ArgumentType::NUMBER, true},
|
||||
{"rx", LUS::ArgumentType::NUMBER, true},
|
||||
{"ry", LUS::ArgumentType::NUMBER, true},
|
||||
{"rz", LUS::ArgumentType::NUMBER, true}
|
||||
CMD_REGISTER("spawn", { ActorSpawnHandler, "Spawn an actor.", { { "actor name/id", Ship::ArgumentType::NUMBER }, // TODO there should be an actor_id arg type
|
||||
{"data", Ship::ArgumentType::NUMBER},
|
||||
{"x", Ship::ArgumentType::NUMBER, true},
|
||||
{"y", Ship::ArgumentType::NUMBER, true},
|
||||
{"z", Ship::ArgumentType::NUMBER, true},
|
||||
{"rx", Ship::ArgumentType::NUMBER, true},
|
||||
{"ry", Ship::ArgumentType::NUMBER, true},
|
||||
{"rz", Ship::ArgumentType::NUMBER, true}
|
||||
}});
|
||||
|
||||
CMD_REGISTER("pos", {SetPosHandler, "Sets the position of the player.", {
|
||||
{"x", LUS::ArgumentType::NUMBER, true},
|
||||
{"y", LUS::ArgumentType::NUMBER, true},
|
||||
{"z", LUS::ArgumentType::NUMBER, true}
|
||||
{"x", Ship::ArgumentType::NUMBER, true},
|
||||
{"y", Ship::ArgumentType::NUMBER, true},
|
||||
{"z", Ship::ArgumentType::NUMBER, true}
|
||||
}});
|
||||
|
||||
CMD_REGISTER("addammo", {AddAmmoHandler, "Adds ammo of an item.", {
|
||||
{"sticks|nuts|bombs|seeds|arrows|bombchus|beans", LUS::ArgumentType::TEXT},
|
||||
{"count", LUS::ArgumentType::NUMBER}
|
||||
{"sticks|nuts|bombs|seeds|arrows|bombchus|beans", Ship::ArgumentType::TEXT},
|
||||
{"count", Ship::ArgumentType::NUMBER}
|
||||
}});
|
||||
|
||||
CMD_REGISTER("takeammo", {TakeAmmoHandler, "Removes ammo of an item.", {
|
||||
{"sticks|nuts|bombs|seeds|arrows|bombchus|beans", LUS::ArgumentType::TEXT},
|
||||
{"count", LUS::ArgumentType::NUMBER}
|
||||
{"sticks|nuts|bombs|seeds|arrows|bombchus|beans", Ship::ArgumentType::TEXT},
|
||||
{"count", Ship::ArgumentType::NUMBER}
|
||||
}});
|
||||
|
||||
CMD_REGISTER("bottle", {BottleHandler, "Changes item in a bottle slot.", {
|
||||
{"item", LUS::ArgumentType::TEXT},
|
||||
{"slot", LUS::ArgumentType::NUMBER}
|
||||
{"item", Ship::ArgumentType::TEXT},
|
||||
{"slot", Ship::ArgumentType::NUMBER}
|
||||
}});
|
||||
|
||||
CMD_REGISTER("give_item", {GiveItemHandler, "Gives an item to the player as if it was given from an actor", {
|
||||
{"vanilla|randomizer", LUS::ArgumentType::TEXT},
|
||||
{"giveItemID", LUS::ArgumentType::NUMBER}
|
||||
{"vanilla|randomizer", Ship::ArgumentType::TEXT},
|
||||
{"giveItemID", Ship::ArgumentType::NUMBER}
|
||||
}});
|
||||
|
||||
CMD_REGISTER("item", {ItemHandler, "Sets item ID in arg 1 into slot arg 2. No boundary checks. Use with caution.", {
|
||||
{"slot", LUS::ArgumentType::NUMBER},
|
||||
{"item id", LUS::ArgumentType::NUMBER}
|
||||
{"slot", Ship::ArgumentType::NUMBER},
|
||||
{"item id", Ship::ArgumentType::NUMBER}
|
||||
}});
|
||||
|
||||
CMD_REGISTER("invisible", {InvisibleHandler, "Activate Link's Elvish cloak, making him appear invisible.", {
|
||||
{"value", LUS::ArgumentType::NUMBER}
|
||||
{"value", Ship::ArgumentType::NUMBER}
|
||||
}});
|
||||
|
||||
CMD_REGISTER("giant_link", {GiantLinkHandler, "Turn Link into a giant Lonky boi.", {
|
||||
{"value", LUS::ArgumentType::NUMBER}
|
||||
{"value", Ship::ArgumentType::NUMBER}
|
||||
}});
|
||||
|
||||
CMD_REGISTER("minish_link", {MinishLinkHandler, "Turn Link into a minish boi.", {
|
||||
{"value", LUS::ArgumentType::NUMBER}
|
||||
{"value", Ship::ArgumentType::NUMBER}
|
||||
}});
|
||||
|
||||
CMD_REGISTER("add_heart_container",
|
||||
@ -1421,25 +1497,25 @@ void DebugConsole_Init(void) {
|
||||
{RemoveHeartContainerHandler, "Remove a heart from Link. The minimal amount of hearts is 3."});
|
||||
|
||||
CMD_REGISTER("gravity", {GravityHandler, "Set gravity level.", {
|
||||
{"value", LUS::ArgumentType::NUMBER}
|
||||
{"value", Ship::ArgumentType::NUMBER}
|
||||
}});
|
||||
|
||||
CMD_REGISTER("no_ui", {NoUIHandler, "Disables the UI.", {
|
||||
{"value", LUS::ArgumentType::NUMBER}
|
||||
{"value", Ship::ArgumentType::NUMBER}
|
||||
}});
|
||||
|
||||
CMD_REGISTER("freeze", {FreezeHandler, "Freezes Link in place"});
|
||||
|
||||
CMD_REGISTER("defense_modifier", {DefenseModifierHandler, "Sets the defense modifier.", {
|
||||
{"value", LUS::ArgumentType::NUMBER}
|
||||
{"value", Ship::ArgumentType::NUMBER}
|
||||
}});
|
||||
|
||||
CMD_REGISTER("damage", {DamageHandler, "Deal damage to Link.", {
|
||||
{"value", LUS::ArgumentType::NUMBER}
|
||||
{"value", Ship::ArgumentType::NUMBER}
|
||||
}});
|
||||
|
||||
CMD_REGISTER("heal", {HealHandler, "Heals Link.", {
|
||||
{"value", LUS::ArgumentType::NUMBER}
|
||||
{"value", Ship::ArgumentType::NUMBER}
|
||||
}});
|
||||
|
||||
CMD_REGISTER("fill_magic", {FillMagicHandler, "Fills magic."});
|
||||
@ -1447,50 +1523,50 @@ void DebugConsole_Init(void) {
|
||||
CMD_REGISTER("empty_magic", {EmptyMagicHandler, "Empties magic."});
|
||||
|
||||
CMD_REGISTER("no_z", {NoZHandler, "Disables Z-button presses.", {
|
||||
{"value", LUS::ArgumentType::NUMBER}
|
||||
{"value", Ship::ArgumentType::NUMBER}
|
||||
}});
|
||||
|
||||
CMD_REGISTER("ohko", {OneHitKOHandler,
|
||||
"Activates one hit KO. Any damage kills Link and he cannot gain health in this mode.", {
|
||||
{"value", LUS::ArgumentType::NUMBER}
|
||||
{"value", Ship::ArgumentType::NUMBER}
|
||||
}});
|
||||
|
||||
CMD_REGISTER("pacifist", {PacifistHandler, "Activates pacifist mode. Prevents Link from using his weapon.", {
|
||||
{"value", LUS::ArgumentType::NUMBER}
|
||||
{"value", Ship::ArgumentType::NUMBER}
|
||||
}});
|
||||
|
||||
CMD_REGISTER("paper_link", {PaperLinkHandler, "Link but made out of paper.", {
|
||||
{"value", LUS::ArgumentType::NUMBER}
|
||||
{"value", Ship::ArgumentType::NUMBER}
|
||||
}});
|
||||
|
||||
CMD_REGISTER("rainstorm", {RainstormHandler, "Activates rainstorm."});
|
||||
|
||||
CMD_REGISTER("reverse_controls", {ReverseControlsHandler, "Reverses the controls.", {
|
||||
{"value", LUS::ArgumentType::NUMBER}
|
||||
{"value", Ship::ArgumentType::NUMBER}
|
||||
}});
|
||||
|
||||
CMD_REGISTER("update_rupees", {UpdateRupeesHandler, "Adds rupees.", {
|
||||
{"value", LUS::ArgumentType::NUMBER}
|
||||
{"value", Ship::ArgumentType::NUMBER}
|
||||
}});
|
||||
|
||||
CMD_REGISTER("speed_modifier", {SpeedModifierHandler, "Sets the speed modifier.", {
|
||||
{"value", LUS::ArgumentType::NUMBER}
|
||||
{"value", Ship::ArgumentType::NUMBER}
|
||||
}});
|
||||
|
||||
CMD_REGISTER("boots", {BootsHandler, "Activates boots.", {
|
||||
{"kokiri|iron|hover", LUS::ArgumentType::TEXT},
|
||||
{"kokiri|iron|hover", Ship::ArgumentType::TEXT},
|
||||
}});
|
||||
|
||||
CMD_REGISTER("giveshield", {GiveShieldHandler, "Gives a shield and equips it when Link is the right age for it.", {
|
||||
{"deku|hylian|mirror", LUS::ArgumentType::TEXT},
|
||||
{"deku|hylian|mirror", Ship::ArgumentType::TEXT},
|
||||
}});
|
||||
|
||||
CMD_REGISTER("takeshield", {TakeShieldHandler, "Takes a shield and unequips it if Link is wearing it.", {
|
||||
{"deku|hylian|mirror", LUS::ArgumentType::TEXT},
|
||||
{"deku|hylian|mirror", Ship::ArgumentType::TEXT},
|
||||
}});
|
||||
|
||||
CMD_REGISTER("knockback", {KnockbackHandler, "Knocks Link back.", {
|
||||
{"value", LUS::ArgumentType::NUMBER}
|
||||
{"value", Ship::ArgumentType::NUMBER}
|
||||
}});
|
||||
|
||||
CMD_REGISTER("electrocute", {ElectrocuteHandler, "Electrocutes Link."});
|
||||
@ -1500,16 +1576,18 @@ void DebugConsole_Init(void) {
|
||||
CMD_REGISTER("cucco_storm", {CuccoStormHandler, "Cucco Storm"});
|
||||
|
||||
CMD_REGISTER("gen_rando", {GenerateRandoHandler, "Generate a randomizer seed", {
|
||||
{"seed|count", LUS::ArgumentType::NUMBER, true},
|
||||
{"testing", LUS::ArgumentType::NUMBER, true},
|
||||
{"seed|count", Ship::ArgumentType::NUMBER, true},
|
||||
{"testing", Ship::ArgumentType::NUMBER, true},
|
||||
}});
|
||||
|
||||
CMD_REGISTER("cosmetics", {CosmeticsHandler, "Change cosmetics.", {
|
||||
{"reset|randomize", LUS::ArgumentType::TEXT},
|
||||
{"reset|randomize", Ship::ArgumentType::TEXT},
|
||||
{"group name", Ship::ArgumentType::TEXT, true},
|
||||
}});
|
||||
|
||||
CMD_REGISTER("sfx", {SfxHandler, "Change SFX.", {
|
||||
{"reset|randomize", LUS::ArgumentType::TEXT},
|
||||
{"reset|randomize", Ship::ArgumentType::TEXT},
|
||||
{"group_name", Ship::ArgumentType::TEXT, true},
|
||||
}});
|
||||
|
||||
CVarSave();
|
||||
|
@ -121,7 +121,7 @@ void FindMessage(PlayState* play, const uint16_t textId, const uint8_t language)
|
||||
Font* font;
|
||||
u16 bufferId = textId;
|
||||
// Use the better owl message if better owl is enabled
|
||||
if (CVarGetInteger("gBetterOwl", 0) != 0 && (bufferId == 0x2066 || bufferId == 0x607B ||
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("BetterOwl"), 0) != 0 && (bufferId == 0x2066 || bufferId == 0x607B ||
|
||||
bufferId == 0x10C2 || bufferId == 0x10C6 || bufferId == 0x206A))
|
||||
{
|
||||
bufferId = 0x71B3;
|
||||
|
@ -26,7 +26,7 @@ void MessageDebug_DisplayCustomMessage(const char* customMessage);
|
||||
}
|
||||
|
||||
|
||||
class MessageViewer : public LUS::GuiWindow {
|
||||
class MessageViewer : public Ship::GuiWindow {
|
||||
public:
|
||||
static inline const char* TABLE_ID = "MessageViewer";
|
||||
using GuiWindow::GuiWindow;
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include <string>
|
||||
#include <libultraship/bridge.h>
|
||||
#include <libultraship/libultraship.h>
|
||||
#include "soh/OTRGlobals.h"
|
||||
|
||||
extern "C" {
|
||||
#include <z64.h>
|
||||
@ -887,7 +888,7 @@ std::vector<u16> GetActorsWithDescriptionContainingString(std::string s) {
|
||||
}
|
||||
|
||||
void ActorViewer_AddTagForActor(Actor* actor) {
|
||||
int val = CVarGetInteger("gDebugActorViewerNameTags", ACTORVIEWER_NAMETAGS_NONE);
|
||||
int val = CVarGetInteger(CVAR_DEVELOPER_TOOLS("ActorViewer.NameTags"), ACTORVIEWER_NAMETAGS_NONE);
|
||||
auto entry = ActorDB::Instance->RetrieveEntry(actor->id);
|
||||
std::string tag;
|
||||
|
||||
@ -1129,10 +1130,10 @@ void ActorViewerWindow::DrawElement() {
|
||||
newActor.params = 0;
|
||||
}
|
||||
|
||||
UIWidgets::EnhancementCheckbox("Advanced mode", "gActorViewerAdvancedParams");
|
||||
UIWidgets::EnhancementCheckbox("Advanced mode", CVAR_DEVELOPER_TOOLS("ActorViewer.AdvancedParams"));
|
||||
UIWidgets::InsertHelpHoverText("Changes the actor specific param menus with a direct input");
|
||||
|
||||
if (CVarGetInteger("gActorViewerAdvancedParams", 0)) {
|
||||
if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("ActorViewer.AdvancedParams"), 0)) {
|
||||
ImGui::InputScalar("params", ImGuiDataType_S16, &newActor.params, &one);
|
||||
} else if (std::find(noParamsActors.begin(), noParamsActors.end(), newActor.id) == noParamsActors.end()) {
|
||||
CreateActorSpecificData();
|
||||
@ -1214,7 +1215,7 @@ void ActorViewerWindow::DrawElement() {
|
||||
UIWidgets::Spacer(0);
|
||||
|
||||
ImGui::Text("Actor Name Tags");
|
||||
if (UIWidgets::EnhancementCombobox("gDebugActorViewerNameTags", nameTagOptions, ACTORVIEWER_NAMETAGS_NONE)) {
|
||||
if (UIWidgets::EnhancementCombobox(CVAR_DEVELOPER_TOOLS("ActorViewer.NameTags"), nameTagOptions, ACTORVIEWER_NAMETAGS_NONE)) {
|
||||
NameTag_RemoveAllByTag(DEBUG_ACTOR_NAMETAG_TAG);
|
||||
ActorViewer_AddTagForAllActors();
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
#include <libultraship/libultraship.h>
|
||||
|
||||
class ActorViewerWindow : public LUS::GuiWindow {
|
||||
class ActorViewerWindow : public Ship::GuiWindow {
|
||||
public:
|
||||
using GuiWindow::GuiWindow;
|
||||
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include <cmath>
|
||||
#include <libultraship/bridge.h>
|
||||
#include <libultraship/libultraship.h>
|
||||
#include "soh/OTRGlobals.h"
|
||||
|
||||
extern "C" {
|
||||
#include <z64.h>
|
||||
@ -57,17 +58,17 @@ void ColViewerWindow::DrawElement() {
|
||||
ImGui::End();
|
||||
return;
|
||||
}
|
||||
UIWidgets::EnhancementCheckbox("Enabled", "gColViewerEnabled");
|
||||
UIWidgets::EnhancementCheckbox("Enabled", CVAR_DEVELOPER_TOOLS("ColViewer.Enabled"));
|
||||
|
||||
UIWidgets::LabeledRightAlignedEnhancementCombobox("Scene", "gColViewerScene", ColRenderSettingNames, COLVIEW_DISABLED);
|
||||
UIWidgets::LabeledRightAlignedEnhancementCombobox("Bg Actors", "gColViewerBgActors", ColRenderSettingNames, COLVIEW_DISABLED);
|
||||
UIWidgets::LabeledRightAlignedEnhancementCombobox("Col Check", "gColViewerColCheck", ColRenderSettingNames, COLVIEW_DISABLED);
|
||||
UIWidgets::LabeledRightAlignedEnhancementCombobox("Waterbox", "gColViewerWaterbox", ColRenderSettingNames, COLVIEW_DISABLED);
|
||||
UIWidgets::LabeledRightAlignedEnhancementCombobox("Scene", CVAR_DEVELOPER_TOOLS("ColViewer.Scene"), ColRenderSettingNames, COLVIEW_DISABLED);
|
||||
UIWidgets::LabeledRightAlignedEnhancementCombobox("Bg Actors", CVAR_DEVELOPER_TOOLS("ColViewer.BGActors"), ColRenderSettingNames, COLVIEW_DISABLED);
|
||||
UIWidgets::LabeledRightAlignedEnhancementCombobox("Col Check", CVAR_DEVELOPER_TOOLS("ColViewer.ColCheck"), ColRenderSettingNames, COLVIEW_DISABLED);
|
||||
UIWidgets::LabeledRightAlignedEnhancementCombobox("Waterbox", CVAR_DEVELOPER_TOOLS("ColViewer.Waterbox"), ColRenderSettingNames, COLVIEW_DISABLED);
|
||||
|
||||
UIWidgets::EnhancementCheckbox("Apply as decal", "gColViewerDecal");
|
||||
UIWidgets::EnhancementCheckbox("Apply as decal", CVAR_DEVELOPER_TOOLS("ColViewer.Decal"));
|
||||
UIWidgets::InsertHelpHoverText("Applies the collision as a decal display. This can be useful if there is z-fighting occuring "
|
||||
"with the scene geometry, but can cause other artifacts.");
|
||||
UIWidgets::EnhancementCheckbox("Shaded", "gColViewerShaded");
|
||||
UIWidgets::EnhancementCheckbox("Shaded", CVAR_DEVELOPER_TOOLS("ColViewer.Shaded"));
|
||||
UIWidgets::InsertHelpHoverText("Applies the scene's shading to the collision display.");
|
||||
|
||||
// This has to be duplicated in both code paths due to the nature of ImGui::IsItemHovered()
|
||||
@ -75,20 +76,20 @@ void ColViewerWindow::DrawElement() {
|
||||
if (ImGui::TreeNode("Colors")) {
|
||||
UIWidgets::InsertHelpHoverText(colorHelpText);
|
||||
|
||||
UIWidgets::EnhancementColor("Normal", "gColViewerColorNormal", scene_col, ImVec4(255, 255, 255, 255), false);
|
||||
UIWidgets::EnhancementColor("Hookshot", "gColViewerColorHookshot", hookshot_col, ImVec4(128, 128, 255, 255),
|
||||
UIWidgets::EnhancementColor("Normal", CVAR_DEVELOPER_TOOLS("ColViewer.ColorNormal"), scene_col, ImVec4(255, 255, 255, 255), false);
|
||||
UIWidgets::EnhancementColor("Hookshot", CVAR_DEVELOPER_TOOLS("ColViewer.ColorHookshot"), hookshot_col, ImVec4(128, 128, 255, 255),
|
||||
false);
|
||||
UIWidgets::EnhancementColor("Entrance", "gColViewerColorEntrance", entrance_col, ImVec4(0, 255, 0, 255), false);
|
||||
UIWidgets::EnhancementColor("Special Surface (Grass/Sand/Etc)", "gColViewerColorSpecialSurface",
|
||||
UIWidgets::EnhancementColor("Entrance", CVAR_DEVELOPER_TOOLS("ColViewer.ColorEntrance"), entrance_col, ImVec4(0, 255, 0, 255), false);
|
||||
UIWidgets::EnhancementColor("Special Surface (Grass/Sand/Etc)", CVAR_DEVELOPER_TOOLS("ColViewer.ColorSpecialSurface"),
|
||||
specialSurface_col, ImVec4(192, 255, 192, 255), false);
|
||||
UIWidgets::EnhancementColor("Interactable (Vines/Crawlspace/Etc)", "gColViewerColorInteractable",
|
||||
UIWidgets::EnhancementColor("Interactable (Vines/Crawlspace/Etc)", CVAR_DEVELOPER_TOOLS("ColViewer.ColorInteractable"),
|
||||
interactable_col, ImVec4(192, 0, 192, 255), false);
|
||||
UIWidgets::EnhancementColor("Slope", "gColViewerColorSlope", slope_col, ImVec4(255, 255, 128, 255), false);
|
||||
UIWidgets::EnhancementColor("Void", "gColViewerColorVoid", void_col, ImVec4(255, 0, 0, 255), false);
|
||||
UIWidgets::EnhancementColor("OC", "gColViewerColorOC", oc_col, ImVec4(255, 255, 255, 255), false);
|
||||
UIWidgets::EnhancementColor("AC", "gColViewerColorAC", ac_col, ImVec4(0, 0, 255, 255), false);
|
||||
UIWidgets::EnhancementColor("AT", "gColViewerColorAT", at_col, ImVec4(255, 0, 0, 255), false);
|
||||
UIWidgets::EnhancementColor("Waterbox", "gColViewerColorWaterbox", waterbox_col, ImVec4(0, 0, 255, 255), false);
|
||||
UIWidgets::EnhancementColor("Slope", CVAR_DEVELOPER_TOOLS("ColViewer.ColorSlope"), slope_col, ImVec4(255, 255, 128, 255), false);
|
||||
UIWidgets::EnhancementColor("Void", CVAR_DEVELOPER_TOOLS("ColViewer.ColorVoid"), void_col, ImVec4(255, 0, 0, 255), false);
|
||||
UIWidgets::EnhancementColor("OC", CVAR_DEVELOPER_TOOLS("ColViewer.ColorOC"), oc_col, ImVec4(255, 255, 255, 255), false);
|
||||
UIWidgets::EnhancementColor("AC", CVAR_DEVELOPER_TOOLS("ColViewer.ColorAC"), ac_col, ImVec4(0, 0, 255, 255), false);
|
||||
UIWidgets::EnhancementColor("AT", CVAR_DEVELOPER_TOOLS("ColViewer.ColorAT"), at_col, ImVec4(255, 0, 0, 255), false);
|
||||
UIWidgets::EnhancementColor("Waterbox", CVAR_DEVELOPER_TOOLS("ColViewer.ColorWaterbox"), waterbox_col, ImVec4(0, 0, 255, 255), false);
|
||||
|
||||
ImGui::TreePop();
|
||||
} else {
|
||||
@ -308,7 +309,7 @@ void InitGfx(std::vector<Gfx>& gfx, ColRenderSetting setting) {
|
||||
alpha = 0xFF;
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gColViewerDecal", 0) != 0) {
|
||||
if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("ColViewer.Decal"), 0) != 0) {
|
||||
rm |= ZMODE_DEC;
|
||||
} else if (setting == ColRenderSetting::Transparent) {
|
||||
rm |= ZMODE_XLU;
|
||||
@ -320,7 +321,7 @@ void InitGfx(std::vector<Gfx>& gfx, ColRenderSetting setting) {
|
||||
gfx.push_back(gsDPSetCycleType(G_CYC_1CYCLE));
|
||||
gfx.push_back(gsDPSetRenderMode(rm | blc1, rm | blc2));
|
||||
|
||||
if (CVarGetInteger("gColViewerShaded", 0) != 0) {
|
||||
if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("ColViewer.Shaded"), 0) != 0) {
|
||||
gfx.push_back(gsDPSetCombineMode(G_CC_MODULATERGB_PRIM_ENVA, G_CC_MODULATERGB_PRIM_ENVA));
|
||||
gfx.push_back(gsSPLoadGeometryMode(G_CULL_BACK | G_ZBUFFER | G_LIGHTING));
|
||||
} else {
|
||||
@ -333,16 +334,13 @@ void InitGfx(std::vector<Gfx>& gfx, ColRenderSetting setting) {
|
||||
|
||||
// Draws a dynapoly structure (scenes or Bg Actors)
|
||||
void DrawDynapoly(std::vector<Gfx>& dl, CollisionHeader* col, int32_t bgId) {
|
||||
uint32_t colorR = CVarGetInteger("gColViewerColorNormalR", 255);
|
||||
uint32_t colorG = CVarGetInteger("gColViewerColorNormalG", 255);
|
||||
uint32_t colorB = CVarGetInteger("gColViewerColorNormalB", 255);
|
||||
uint32_t colorA = 255;
|
||||
Color_RGBA8 color = {255, 255, 255, 255};
|
||||
|
||||
uint32_t lastColorR = colorR;
|
||||
uint32_t lastColorG = colorG;
|
||||
uint32_t lastColorB = colorB;
|
||||
uint32_t lastColorR = color.r;
|
||||
uint32_t lastColorG = color.g;
|
||||
uint32_t lastColorB = color.b;
|
||||
|
||||
dl.push_back(gsDPSetPrimColor(0, 0, colorR, colorG, colorB, colorA));
|
||||
dl.push_back(gsDPSetPrimColor(0, 0, color.r, color.g, color.b, 255));
|
||||
|
||||
// This keeps track of if we have processed a poly, but not drawn it yet so we can batch them.
|
||||
// This saves several hundred commands in larger scenes
|
||||
@ -352,49 +350,35 @@ void DrawDynapoly(std::vector<Gfx>& dl, CollisionHeader* col, int32_t bgId) {
|
||||
CollisionPoly* poly = &col->polyList[i];
|
||||
|
||||
if (SurfaceType_IsHookshotSurface(&gPlayState->colCtx, poly, bgId)) {
|
||||
colorR = CVarGetInteger("gColViewerColorHookshotR", 128);
|
||||
colorG = CVarGetInteger("gColViewerColorHookshotG", 128);
|
||||
colorB = CVarGetInteger("gColViewerColorHookshotB", 255);
|
||||
color = CVarGetColor(CVAR_DEVELOPER_TOOLS("ColViewer.ColorHookshot"), { 128, 128, 255, 255 });
|
||||
} else if (func_80041D94(&gPlayState->colCtx, poly, bgId) > 0x01) {
|
||||
colorR = CVarGetInteger("gColViewerColorInteractableR", 192);
|
||||
colorG = CVarGetInteger("gColViewerColorInteractableG", 0);
|
||||
colorB = CVarGetInteger("gColViewerColorInteractableB", 192);
|
||||
color = CVarGetColor(CVAR_DEVELOPER_TOOLS("ColViewer.ColorInteractable"), {192, 0, 192, 255});
|
||||
} else if (func_80041E80(&gPlayState->colCtx, poly, bgId) == 0x0C) {
|
||||
colorR = CVarGetInteger("gColViewerColorVoidR", 255);
|
||||
colorG = CVarGetInteger("gColViewerColorVoidG", 0);
|
||||
colorB = CVarGetInteger("gColViewerColorVoidB", 0);
|
||||
color = CVarGetColor(CVAR_DEVELOPER_TOOLS("ColViewer.ColorVoid"), { 255, 0, 0, 255 });
|
||||
} else if (SurfaceType_GetSceneExitIndex(&gPlayState->colCtx, poly, bgId) ||
|
||||
func_80041E80(&gPlayState->colCtx, poly, bgId) == 0x05) {
|
||||
colorR = CVarGetInteger("gColViewerColorEntranceR", 0);
|
||||
colorG = CVarGetInteger("gColViewerColorEntranceG", 255);
|
||||
colorB = CVarGetInteger("gColViewerColorEntranceB", 0);
|
||||
color = CVarGetColor(CVAR_DEVELOPER_TOOLS("ColViewer.ColorEntrance"), { 0, 255, 0, 255 });
|
||||
} else if (func_80041D4C(&gPlayState->colCtx, poly, bgId) != 0 ||
|
||||
SurfaceType_IsWallDamage(&gPlayState->colCtx, poly, bgId)) {
|
||||
colorR = CVarGetInteger("gColViewerColorSpecialSurfaceR", 192);
|
||||
colorG = CVarGetInteger("gColViewerColorSpecialSurfaceG", 255);
|
||||
colorB = CVarGetInteger("gColViewerColorSpecialSurfaceB", 192);
|
||||
color = CVarGetColor(CVAR_DEVELOPER_TOOLS("ColViewer.ColorSpecialSurface"), { 192, 255, 192, 255 });
|
||||
} else if (SurfaceType_GetSlope(&gPlayState->colCtx, poly, bgId) == 0x01) {
|
||||
colorR = CVarGetInteger("gColViewerColorSlopeR", 255);
|
||||
colorG = CVarGetInteger("gColViewerColorSlopeG", 255);
|
||||
colorB = CVarGetInteger("gColViewerColorSlopeB", 128);
|
||||
color = CVarGetColor(CVAR_DEVELOPER_TOOLS("ColViewer.ColorSlope"), { 255, 255, 128, 255 });
|
||||
} else {
|
||||
colorR = CVarGetInteger("gColViewerColorNormalR", 255);
|
||||
colorG = CVarGetInteger("gColViewerColorNormalG", 255);
|
||||
colorB = CVarGetInteger("gColViewerColorNormalB", 255);
|
||||
color = CVarGetColor(CVAR_DEVELOPER_TOOLS("ColViewer.ColorNormal"), { 255, 255, 255, 255 });
|
||||
}
|
||||
|
||||
if (colorR != lastColorR || colorG != lastColorG || colorB != lastColorB) {
|
||||
if (color.r != lastColorR || color.g != lastColorG || color.b != lastColorB) {
|
||||
// Color changed, flush previous poly
|
||||
if (previousPoly) {
|
||||
dl.push_back(gsSPVertex((uintptr_t)&vtxDl.at(vtxDl.size() - 3), 3, 0));
|
||||
dl.push_back(gsSP1Triangle(0, 1, 2, 0));
|
||||
previousPoly = false;
|
||||
}
|
||||
dl.push_back(gsDPSetPrimColor(0, 0, colorR, colorG, colorB, colorA));
|
||||
dl.push_back(gsDPSetPrimColor(0, 0, color.r, color.g, color.b, 255));
|
||||
}
|
||||
lastColorR = colorR;
|
||||
lastColorG = colorG;
|
||||
lastColorB = colorB;
|
||||
lastColorR = color.r;
|
||||
lastColorG = color.g;
|
||||
lastColorB = color.b;
|
||||
|
||||
Vec3s* va = &col->vtxList[COLPOLY_VTX_INDEX(poly->flags_vIA)];
|
||||
Vec3s* vb = &col->vtxList[COLPOLY_VTX_INDEX(poly->flags_vIB)];
|
||||
@ -428,9 +412,9 @@ void DrawDynapoly(std::vector<Gfx>& dl, CollisionHeader* col, int32_t bgId) {
|
||||
|
||||
// Draws the scene
|
||||
void DrawSceneCollision() {
|
||||
ColRenderSetting showSceneColSetting = (ColRenderSetting)CVarGetInteger("gColViewerScene", COLVIEW_DISABLED);
|
||||
ColRenderSetting showSceneColSetting = (ColRenderSetting)CVarGetInteger(CVAR_DEVELOPER_TOOLS("ColViewer.Scene"), COLVIEW_DISABLED);
|
||||
|
||||
if (showSceneColSetting == ColRenderSetting::Disabled || !CVarGetInteger("gColViewerEnabled", 0)) {
|
||||
if (showSceneColSetting == ColRenderSetting::Disabled || !CVarGetInteger(CVAR_DEVELOPER_TOOLS("ColViewer.Enabled"), 0)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -443,8 +427,8 @@ void DrawSceneCollision() {
|
||||
|
||||
// Draws all Bg Actors
|
||||
void DrawBgActorCollision() {
|
||||
ColRenderSetting showBgActorSetting = (ColRenderSetting)CVarGetInteger("gColViewerBgActors", COLVIEW_DISABLED);
|
||||
if (showBgActorSetting == ColRenderSetting::Disabled || !CVarGetInteger("gColViewerEnabled", 0)) {
|
||||
ColRenderSetting showBgActorSetting = (ColRenderSetting)CVarGetInteger(CVAR_DEVELOPER_TOOLS("ColViewer.BGActors"), COLVIEW_DISABLED);
|
||||
if (showBgActorSetting == ColRenderSetting::Disabled || !CVarGetInteger(CVAR_DEVELOPER_TOOLS("ColViewer.Enabled"), 0)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -568,8 +552,8 @@ void DrawColCheckList(std::vector<Gfx>& dl, Collider** objects, int32_t count) {
|
||||
|
||||
// Draws all Col Check objects
|
||||
void DrawColCheckCollision() {
|
||||
ColRenderSetting showColCheckSetting = (ColRenderSetting)CVarGetInteger("gColViewerColCheck", COLVIEW_DISABLED);
|
||||
if (showColCheckSetting == ColRenderSetting::Disabled || !CVarGetInteger("gColViewerEnabled", 0)) {
|
||||
ColRenderSetting showColCheckSetting = (ColRenderSetting)CVarGetInteger(CVAR_DEVELOPER_TOOLS("ColViewer.ColCheck"), COLVIEW_DISABLED);
|
||||
if (showColCheckSetting == ColRenderSetting::Disabled || !CVarGetInteger(CVAR_DEVELOPER_TOOLS("ColViewer.Enabled"), 0)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -578,15 +562,14 @@ void DrawColCheckCollision() {
|
||||
dl.push_back(gsSPMatrix(&gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD | G_MTX_NOPUSH));
|
||||
|
||||
CollisionCheckContext& col = gPlayState->colChkCtx;
|
||||
|
||||
dl.push_back(gsDPSetPrimColor(0, 0, CVarGetInteger("gColViewerColorOCR", 255), CVarGetInteger("gColViewerColorOCG", 255),
|
||||
CVarGetInteger("gColViewerColorOCB", 255), 255));
|
||||
Color_RGBA8 color = CVarGetColor(CVAR_DEVELOPER_TOOLS("ColViewer.ColorOC"), { 255, 255, 255, 255 });
|
||||
dl.push_back(gsDPSetPrimColor(0, 0, color.r, color.g, color.b, 255));
|
||||
DrawColCheckList(dl, col.colOC, col.colOCCount);
|
||||
dl.push_back(gsDPSetPrimColor(0, 0, CVarGetInteger("gColViewerColorACR", 0), CVarGetInteger("gColViewerColorACG", 0),
|
||||
CVarGetInteger("gColViewerColorACB", 255), 255));
|
||||
color = CVarGetColor(CVAR_DEVELOPER_TOOLS("ColViewer.ColorAC"), { 0, 0, 255, 255 });
|
||||
dl.push_back(gsDPSetPrimColor(0, 0, color.r, color.g, color.b, 255));
|
||||
DrawColCheckList(dl, col.colAC, col.colACCount);
|
||||
dl.push_back(gsDPSetPrimColor(0, 0, CVarGetInteger("gColViewerColorATR", 255), CVarGetInteger("gColViewerColorATG", 0),
|
||||
CVarGetInteger("gColViewerColorATB", 0), 255));
|
||||
color = CVarGetColor(CVAR_DEVELOPER_TOOLS("ColViewer.ColorAT"), { 0, 0, 255, 255 });
|
||||
dl.push_back(gsDPSetPrimColor(0, 0, color.r, color.g, color.b, 255));
|
||||
|
||||
DrawColCheckList(dl, col.colAT, col.colATCount);
|
||||
}
|
||||
@ -621,8 +604,8 @@ extern "C" f32 zdWaterBoxMinY;
|
||||
|
||||
// Draws all waterboxes
|
||||
void DrawWaterboxList() {
|
||||
ColRenderSetting showWaterboxSetting = (ColRenderSetting)CVarGetInteger("gColViewerWaterbox", COLVIEW_DISABLED);
|
||||
if (showWaterboxSetting == ColRenderSetting::Disabled || !CVarGetInteger("gColViewerEnabled", 0)) {
|
||||
ColRenderSetting showWaterboxSetting = (ColRenderSetting)CVarGetInteger(CVAR_DEVELOPER_TOOLS("ColViewer.Waterbox"), COLVIEW_DISABLED);
|
||||
if (showWaterboxSetting == ColRenderSetting::Disabled || !CVarGetInteger(CVAR_DEVELOPER_TOOLS("ColViewer.Enabled"), 0)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -630,9 +613,9 @@ void DrawWaterboxList() {
|
||||
InitGfx(dl, showWaterboxSetting);
|
||||
dl.push_back(gsSPMatrix(&gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD | G_MTX_NOPUSH));
|
||||
|
||||
dl.push_back(gsDPSetPrimColor(0, 0, CVarGetInteger("gColViewerColorWaterboxR", 0),
|
||||
CVarGetInteger("gColViewerColorWaterboxG", 0),
|
||||
CVarGetInteger("gColViewerColorWaterboxB", 255), 255));
|
||||
Color_RGBA8 color = CVarGetColor(CVAR_DEVELOPER_TOOLS("ColViewer.ColorWaterbox"), { 0, 0, 255, 255 });
|
||||
|
||||
dl.push_back(gsDPSetPrimColor(0, 0, color.r, color.g, color.b, 255));
|
||||
|
||||
CollisionHeader* col = gPlayState->colCtx.colHeader;
|
||||
for (int32_t waterboxIndex = 0; waterboxIndex < col->numWaterBoxes; waterboxIndex++) {
|
||||
@ -693,7 +676,7 @@ extern "C" void DrawColViewer() {
|
||||
|
||||
OPEN_DISPS(gPlayState->state.gfxCtx);
|
||||
|
||||
uint8_t mirroredWorld = CVarGetInteger("gMirroredWorld", 0);
|
||||
uint8_t mirroredWorld = CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0);
|
||||
// Col viewer needs inverted culling in mirror mode for both OPA and XLU buffers
|
||||
if (mirroredWorld) {
|
||||
gSPSetExtraGeometryMode(POLY_OPA_DISP++, G_EX_INVERT_CULLING);
|
||||
|
@ -14,7 +14,7 @@ typedef enum {
|
||||
} ColViewerRenderSetting;
|
||||
|
||||
#ifdef __cplusplus
|
||||
class ColViewerWindow : public LUS::GuiWindow {
|
||||
class ColViewerWindow : public Ship::GuiWindow {
|
||||
public:
|
||||
using GuiWindow::GuiWindow;
|
||||
|
||||
|
@ -614,7 +614,7 @@ void DrawInfoTab() {
|
||||
|
||||
void DrawBGSItemFlag(uint8_t itemID) {
|
||||
const ItemMapEntry& slotEntry = itemMapping[itemID];
|
||||
ImGui::Image(LUS::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(slotEntry.name), ImVec2(32.0f, 32.0f), ImVec2(0, 0), ImVec2(1, 1));
|
||||
ImGui::Image(Ship::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(slotEntry.name), ImVec2(32.0f, 32.0f), ImVec2(0, 0), ImVec2(1, 1));
|
||||
ImGui::SameLine();
|
||||
int tradeIndex = itemID - ITEM_POCKET_EGG;
|
||||
bool hasItem = (gSaveContext.adultTradeItems & (1 << tradeIndex)) != 0;
|
||||
@ -656,7 +656,7 @@ void DrawInventoryTab() {
|
||||
uint8_t item = gSaveContext.inventory.items[index];
|
||||
if (item != ITEM_NONE) {
|
||||
const ItemMapEntry& slotEntry = itemMapping.find(item)->second;
|
||||
if (ImGui::ImageButton(LUS::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(slotEntry.name), ImVec2(32.0f, 32.0f), ImVec2(0, 0),
|
||||
if (ImGui::ImageButton(Ship::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(slotEntry.name), ImVec2(32.0f, 32.0f), ImVec2(0, 0),
|
||||
ImVec2(1, 1), 0)) {
|
||||
selectedIndex = index;
|
||||
ImGui::OpenPopup(itemPopupPicker);
|
||||
@ -704,7 +704,7 @@ void DrawInventoryTab() {
|
||||
ImGui::SameLine();
|
||||
}
|
||||
const ItemMapEntry& slotEntry = possibleItems[pickerIndex];
|
||||
if (ImGui::ImageButton(LUS::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(slotEntry.name), ImVec2(32.0f, 32.0f),
|
||||
if (ImGui::ImageButton(Ship::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(slotEntry.name), ImVec2(32.0f, 32.0f),
|
||||
ImVec2(0, 0), ImVec2(1, 1), 0)) {
|
||||
gSaveContext.inventory.items[selectedIndex] = slotEntry.id;
|
||||
// Set adult trade item flag if you're playing adult trade shuffle in rando
|
||||
@ -742,7 +742,7 @@ void DrawInventoryTab() {
|
||||
ImGui::PushItemWidth(32.0f);
|
||||
ImGui::BeginGroup();
|
||||
|
||||
ImGui::Image(LUS::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(itemMapping[item].name), ImVec2(32.0f, 32.0f));
|
||||
ImGui::Image(Ship::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(itemMapping[item].name), ImVec2(32.0f, 32.0f));
|
||||
ImGui::InputScalar("##ammoInput", ImGuiDataType_S8, &AMMO(item));
|
||||
|
||||
ImGui::EndGroup();
|
||||
@ -1187,7 +1187,7 @@ void DrawUpgradeIcon(const std::string& categoryName, int32_t categoryId, const
|
||||
uint8_t item = items[CUR_UPG_VALUE(categoryId)];
|
||||
if (item != ITEM_NONE) {
|
||||
const ItemMapEntry& slotEntry = itemMapping[item];
|
||||
if (ImGui::ImageButton(LUS::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(slotEntry.name), ImVec2(32.0f, 32.0f), ImVec2(0, 0),
|
||||
if (ImGui::ImageButton(Ship::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(slotEntry.name), ImVec2(32.0f, 32.0f), ImVec2(0, 0),
|
||||
ImVec2(1, 1), 0)) {
|
||||
ImGui::OpenPopup(upgradePopupPicker);
|
||||
}
|
||||
@ -1215,7 +1215,7 @@ void DrawUpgradeIcon(const std::string& categoryName, int32_t categoryId, const
|
||||
UIWidgets::SetLastItemHoverText("None");
|
||||
} else {
|
||||
const ItemMapEntry& slotEntry = itemMapping[items[pickerIndex]];
|
||||
if (ImGui::ImageButton(LUS::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(slotEntry.name), ImVec2(32.0f, 32.0f), ImVec2(0, 0),
|
||||
if (ImGui::ImageButton(Ship::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(slotEntry.name), ImVec2(32.0f, 32.0f), ImVec2(0, 0),
|
||||
ImVec2(1, 1), 0)) {
|
||||
Inventory_ChangeUpgrade(categoryId, pickerIndex);
|
||||
ImGui::CloseCurrentPopup();
|
||||
@ -1252,7 +1252,7 @@ void DrawEquipmentTab() {
|
||||
bool hasEquip = (bitMask & gSaveContext.inventory.equipment) != 0;
|
||||
const ItemMapEntry& entry = itemMapping[equipmentValues[i]];
|
||||
ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0, 0, 0, 0));
|
||||
if (ImGui::ImageButton(LUS::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(hasEquip ? entry.name : entry.nameFaded),
|
||||
if (ImGui::ImageButton(Ship::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(hasEquip ? entry.name : entry.nameFaded),
|
||||
ImVec2(32.0f, 32.0f), ImVec2(0, 0), ImVec2(1, 1), 0)) {
|
||||
if (hasEquip) {
|
||||
gSaveContext.inventory.equipment &= ~bitMask;
|
||||
@ -1351,7 +1351,7 @@ void DrawQuestItemButton(uint32_t item) {
|
||||
uint32_t bitMask = 1 << entry.id;
|
||||
bool hasQuestItem = (bitMask & gSaveContext.inventory.questItems) != 0;
|
||||
ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0, 0, 0, 0));
|
||||
if (ImGui::ImageButton(LUS::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(hasQuestItem ? entry.name : entry.nameFaded),
|
||||
if (ImGui::ImageButton(Ship::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(hasQuestItem ? entry.name : entry.nameFaded),
|
||||
ImVec2(32.0f, 32.0f), ImVec2(0, 0), ImVec2(1, 1), 0)) {
|
||||
if (hasQuestItem) {
|
||||
gSaveContext.inventory.questItems &= ~bitMask;
|
||||
@ -1369,7 +1369,7 @@ void DrawDungeonItemButton(uint32_t item, uint32_t scene) {
|
||||
uint32_t bitMask = 1 << (entry.id - ITEM_KEY_BOSS); // Bitset starts at ITEM_KEY_BOSS == 0. the rest are sequential
|
||||
bool hasItem = (bitMask & gSaveContext.inventory.dungeonItems[scene]) != 0;
|
||||
ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0, 0, 0, 0));
|
||||
if (ImGui::ImageButton(LUS::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(hasItem ? entry.name : entry.nameFaded),
|
||||
if (ImGui::ImageButton(Ship::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(hasItem ? entry.name : entry.nameFaded),
|
||||
ImVec2(32.0f, 32.0f), ImVec2(0, 0), ImVec2(1, 1), 0)) {
|
||||
if (hasItem) {
|
||||
gSaveContext.inventory.dungeonItems[scene] &= ~bitMask;
|
||||
@ -1416,7 +1416,7 @@ void DrawQuestStatusTab() {
|
||||
uint32_t bitMask = 1 << entry.id;
|
||||
bool hasQuestItem = (bitMask & gSaveContext.inventory.questItems) != 0;
|
||||
ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0, 0, 0, 0));
|
||||
if (ImGui::ImageButton(LUS::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(hasQuestItem ? entry.name : entry.nameFaded),
|
||||
if (ImGui::ImageButton(Ship::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(hasQuestItem ? entry.name : entry.nameFaded),
|
||||
ImVec2(16.0f, 24.0f), ImVec2(0, 0), ImVec2(1, 1), 0)) {
|
||||
if (hasQuestItem) {
|
||||
gSaveContext.inventory.questItems &= ~bitMask;
|
||||
@ -1479,7 +1479,7 @@ void DrawQuestStatusTab() {
|
||||
|
||||
if (dungeonItemsScene != SCENE_JABU_JABU_BOSS) {
|
||||
float lineHeight = ImGui::GetTextLineHeightWithSpacing();
|
||||
ImGui::Image(LUS::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(itemMapping[ITEM_KEY_SMALL].name), ImVec2(lineHeight, lineHeight));
|
||||
ImGui::Image(Ship::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(itemMapping[ITEM_KEY_SMALL].name), ImVec2(lineHeight, lineHeight));
|
||||
ImGui::SameLine();
|
||||
if (ImGui::InputScalar("##Keys", ImGuiDataType_S8, gSaveContext.inventory.dungeonKeys + dungeonItemsScene)) {
|
||||
gSaveContext.sohStats.dungeonKeys[dungeonItemsScene] = gSaveContext.inventory.dungeonKeys[dungeonItemsScene];
|
||||
@ -1735,7 +1735,7 @@ void DrawPlayerTab() {
|
||||
ImGui::SameLine();
|
||||
ImGui::InputScalar("C Right", ImGuiDataType_U8, &gSaveContext.equips.buttonItems[3], &one, NULL);
|
||||
|
||||
if (CVarGetInteger("gDpadEquips", 0)) {
|
||||
if (CVarGetInteger(CVAR_SETTING("DpadEquips"), 0)) {
|
||||
ImGui::NewLine();
|
||||
ImGui::Text("Current D-pad Equips");
|
||||
ImGui::InputScalar("D-pad Up ", ImGuiDataType_U8, &gSaveContext.equips.buttonItems[4], &one, NULL); // Two spaces at the end for aligning, not elegant but it's working
|
||||
@ -1823,34 +1823,34 @@ void SaveEditorWindow::DrawElement() {
|
||||
void SaveEditorWindow::InitElement() {
|
||||
// Load item icons into ImGui
|
||||
for (const auto& entry : itemMapping) {
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->LoadGuiTexture(entry.second.name, entry.second.texturePath, ImVec4(1, 1, 1, 1));
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->LoadGuiTexture(entry.second.nameFaded, entry.second.texturePath, ImVec4(1, 1, 1, 0.3f));
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->LoadGuiTexture(entry.second.name, entry.second.texturePath, ImVec4(1, 1, 1, 1));
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->LoadGuiTexture(entry.second.nameFaded, entry.second.texturePath, ImVec4(1, 1, 1, 0.3f));
|
||||
}
|
||||
for (const auto& entry : gregMapping) {
|
||||
ImVec4 gregGreen = ImVec4(42.0f / 255.0f, 169.0f / 255.0f, 40.0f / 255.0f, 1.0f);
|
||||
ImVec4 gregFadedGreen = gregGreen;
|
||||
gregFadedGreen.w = 0.3f;
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->LoadGuiTexture(entry.second.name, entry.second.texturePath, gregGreen);
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->LoadGuiTexture(entry.second.nameFaded, entry.second.texturePath, gregFadedGreen);
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->LoadGuiTexture(entry.second.name, entry.second.texturePath, gregGreen);
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->LoadGuiTexture(entry.second.nameFaded, entry.second.texturePath, gregFadedGreen);
|
||||
}
|
||||
for (const auto& entry : triforcePieceMapping) {
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->LoadGuiTexture(entry.second.name, entry.second.texturePath, ImVec4(1, 1, 1, 1));
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->LoadGuiTexture(entry.second.nameFaded, entry.second.texturePath, ImVec4(1, 1, 1, 0.3f));
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->LoadGuiTexture(entry.second.name, entry.second.texturePath, ImVec4(1, 1, 1, 1));
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->LoadGuiTexture(entry.second.nameFaded, entry.second.texturePath, ImVec4(1, 1, 1, 0.3f));
|
||||
}
|
||||
for (const auto& entry : questMapping) {
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->LoadGuiTexture(entry.second.name, entry.second.texturePath, ImVec4(1, 1, 1, 1));
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->LoadGuiTexture(entry.second.nameFaded, entry.second.texturePath, ImVec4(1, 1, 1, 0.3f));
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->LoadGuiTexture(entry.second.name, entry.second.texturePath, ImVec4(1, 1, 1, 1));
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->LoadGuiTexture(entry.second.nameFaded, entry.second.texturePath, ImVec4(1, 1, 1, 0.3f));
|
||||
}
|
||||
for (const auto& entry : songMapping) {
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->LoadGuiTexture(entry.name, gSongNoteTex, entry.color);
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->LoadGuiTexture(entry.name, gSongNoteTex, entry.color);
|
||||
ImVec4 fadedCol = entry.color;
|
||||
fadedCol.w = 0.3f;
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->LoadGuiTexture(entry.nameFaded, gSongNoteTex, fadedCol);
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->LoadGuiTexture(entry.nameFaded, gSongNoteTex, fadedCol);
|
||||
}
|
||||
for (const auto& entry : vanillaSongMapping) {
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->LoadGuiTexture(entry.name, gSongNoteTex, entry.color);
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->LoadGuiTexture(entry.name, gSongNoteTex, entry.color);
|
||||
ImVec4 fadedCol = entry.color;
|
||||
fadedCol.w = 0.3f;
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->LoadGuiTexture(entry.nameFaded, gSongNoteTex, fadedCol);
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->LoadGuiTexture(entry.nameFaded, gSongNoteTex, fadedCol);
|
||||
}
|
||||
}
|
||||
|
@ -691,7 +691,7 @@ const std::vector<std::string> state3 = {
|
||||
"Travelling to Hook Target"
|
||||
};
|
||||
|
||||
class SaveEditorWindow : public LUS::GuiWindow {
|
||||
class SaveEditorWindow : public Ship::GuiWindow {
|
||||
public:
|
||||
using GuiWindow::GuiWindow;
|
||||
|
||||
|
@ -65,7 +65,7 @@ std::map<int, std::string> cmdMap = {
|
||||
};
|
||||
|
||||
void PerformDisplayListSearch() {
|
||||
auto result = LUS::Context::GetInstance()->GetResourceManager()->GetArchiveManager()->ListFiles("*" + std::string(searchString) + "*DL*");
|
||||
auto result = Ship::Context::GetInstance()->GetResourceManager()->GetArchiveManager()->ListFiles("*" + std::string(searchString) + "*DL*");
|
||||
|
||||
displayListSearchResults.clear();
|
||||
|
||||
@ -127,7 +127,7 @@ void DLViewerWindow::DrawElement() {
|
||||
}
|
||||
|
||||
try {
|
||||
auto res = std::static_pointer_cast<LUS::DisplayList>(LUS::Context::GetInstance()->GetResourceManager()->LoadResource(activeDisplayList));
|
||||
auto res = std::static_pointer_cast<LUS::DisplayList>(Ship::Context::GetInstance()->GetResourceManager()->LoadResource(activeDisplayList));
|
||||
|
||||
if (res->GetInitData()->Type != static_cast<uint32_t>(LUS::ResourceType::DisplayList)) {
|
||||
ImGui::Text("Resource type is not a Display List. Please choose another.");
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
#include <libultraship/libultraship.h>
|
||||
|
||||
class DLViewerWindow : public LUS::GuiWindow {
|
||||
class DLViewerWindow : public Ship::GuiWindow {
|
||||
public:
|
||||
using GuiWindow::GuiWindow;
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include "valueViewer.h"
|
||||
#include "../../UIWidgets.hpp"
|
||||
#include "soh/OTRGlobals.h"
|
||||
|
||||
extern "C" {
|
||||
#include <z64.h>
|
||||
@ -109,7 +110,7 @@ void ValueViewerWindow::DrawElement() {
|
||||
return;
|
||||
}
|
||||
|
||||
UIWidgets::PaddedEnhancementCheckbox("Enable Printing", "gValueViewer.EnablePrinting");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Enable Printing", CVAR_DEVELOPER_TOOLS("ValueViewerEnablePrinting"));
|
||||
|
||||
ImGui::BeginGroup();
|
||||
static int selectedElement = -1;
|
||||
@ -189,7 +190,7 @@ void ValueViewerWindow::DrawElement() {
|
||||
}
|
||||
|
||||
ImGui::BeginGroup();
|
||||
if (CVarGetInteger("gValueViewer.EnablePrinting", 0)) {
|
||||
if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("ValueViewerEnablePrinting"), 0)) {
|
||||
ImGui::Checkbox(("Print##" + std::string(element.name)).c_str(), &element.isPrinted);
|
||||
if (element.isPrinted) {
|
||||
char* prefix = (char*)element.prefix.c_str();
|
||||
|
@ -33,7 +33,7 @@ typedef struct {
|
||||
uint32_t y;
|
||||
} ValueTableElement;
|
||||
|
||||
class ValueViewerWindow : public LUS::GuiWindow {
|
||||
class ValueViewerWindow : public Ship::GuiWindow {
|
||||
public:
|
||||
using GuiWindow::GuiWindow;
|
||||
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include "soh/Enhancements/randomizer/context.h"
|
||||
#include "soh/Enhancements/enhancementTypes.h"
|
||||
#include "variables.h"
|
||||
#include "soh/OTRGlobals.h"
|
||||
|
||||
extern "C" {
|
||||
#include <z64.h>
|
||||
@ -234,7 +235,7 @@ extern "C" uint8_t GetRandomizedEnemy(PlayState* play, int16_t *actorId, f32 *po
|
||||
}
|
||||
|
||||
EnemyEntry GetRandomizedEnemyEntry(uint32_t seed) {
|
||||
if (CVarGetInteger("gRandomizedEnemies", ENEMY_RANDOMIZER_OFF) == ENEMY_RANDOMIZER_RANDOM_SEEDED) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), ENEMY_RANDOMIZER_OFF) == ENEMY_RANDOMIZER_RANDOM_SEEDED) {
|
||||
uint32_t finalSeed = seed + (IS_RANDO ? Rando::Context::GetInstance()->GetSettings()->GetSeed() : gSaveContext.sohStats.fileCreatedAt);
|
||||
Random_Init(finalSeed);
|
||||
}
|
||||
|
@ -353,19 +353,19 @@ void GameInteractor::RawAction::SetTimeOfDay(uint32_t time) {
|
||||
}
|
||||
|
||||
void GameInteractor::RawAction::SetCollisionViewer(bool active) {
|
||||
CVarSetInteger("gColViewerEnabled", active);
|
||||
CVarSetInteger("gColViewerDecal", active);
|
||||
CVarSetInteger(CVAR_DEVELOPER_TOOLS("ColViewer.Enabled"), active);
|
||||
CVarSetInteger(CVAR_DEVELOPER_TOOLS("ColViewer.Decal"), active);
|
||||
|
||||
if (active) {
|
||||
CVarSetInteger("gColViewerScene", COLVIEW_TRANSPARENT);
|
||||
CVarSetInteger("gColViewerBgActors", COLVIEW_TRANSPARENT);
|
||||
CVarSetInteger("gColViewerColCheck", COLVIEW_TRANSPARENT);
|
||||
CVarSetInteger("gColViewerWaterbox", COLVIEW_TRANSPARENT);
|
||||
CVarSetInteger(CVAR_DEVELOPER_TOOLS("ColViewer.Scene"), COLVIEW_TRANSPARENT);
|
||||
CVarSetInteger(CVAR_DEVELOPER_TOOLS("ColViewer.BGActors"), COLVIEW_TRANSPARENT);
|
||||
CVarSetInteger(CVAR_DEVELOPER_TOOLS("ColViewer.ColCheck"), COLVIEW_TRANSPARENT);
|
||||
CVarSetInteger(CVAR_DEVELOPER_TOOLS("ColViewer.Waterbox"), COLVIEW_TRANSPARENT);
|
||||
} else {
|
||||
CVarSetInteger("gColViewerScene", COLVIEW_DISABLED);
|
||||
CVarSetInteger("gColViewerBgActors", COLVIEW_DISABLED);
|
||||
CVarSetInteger("gColViewerColCheck", COLVIEW_DISABLED);
|
||||
CVarSetInteger("gColViewerWaterbox", COLVIEW_DISABLED);
|
||||
CVarSetInteger(CVAR_DEVELOPER_TOOLS("ColViewer.Scene"), COLVIEW_DISABLED);
|
||||
CVarSetInteger(CVAR_DEVELOPER_TOOLS("ColViewer.BGActors"), COLVIEW_DISABLED);
|
||||
CVarSetInteger(CVAR_DEVELOPER_TOOLS("ColViewer.ColCheck"), COLVIEW_DISABLED);
|
||||
CVarSetInteger(CVAR_DEVELOPER_TOOLS("ColViewer.Waterbox"), COLVIEW_DISABLED);
|
||||
}
|
||||
}
|
||||
|
||||
@ -428,55 +428,55 @@ void GameInteractor::RawAction::SetCosmeticsColor(uint8_t cosmeticCategory, uint
|
||||
|
||||
switch (cosmeticCategory) {
|
||||
case GI_COSMETICS_TUNICS:
|
||||
CVarSetColor("gCosmetics.Link_KokiriTunic.Value", newColor);
|
||||
CVarSetInteger("gCosmetics.Link_KokiriTunic.Changed", 1);
|
||||
CVarSetColor("gCosmetics.Link_GoronTunic.Value", newColor);
|
||||
CVarSetInteger("gCosmetics.Link_GoronTunic.Changed", 1);
|
||||
CVarSetColor("gCosmetics.Link_ZoraTunic.Value", newColor);
|
||||
CVarSetInteger("gCosmetics.Link_ZoraTunic.Changed", 1);
|
||||
CVarSetColor(CVAR_COSMETIC("Link.KokiriTunic.Value"), newColor);
|
||||
CVarSetInteger(CVAR_COSMETIC("Link.KokiriTunic.Changed"), 1);
|
||||
CVarSetColor(CVAR_COSMETIC("Link.GoronTunic.Value"), newColor);
|
||||
CVarSetInteger(CVAR_COSMETIC("Link.GoronTunic.Changed"), 1);
|
||||
CVarSetColor(CVAR_COSMETIC("Link.ZoraTunic.Value"), newColor);
|
||||
CVarSetInteger(CVAR_COSMETIC("Link.ZoraTunic.Changed"), 1);
|
||||
break;
|
||||
case GI_COSMETICS_NAVI:
|
||||
CVarSetColor("gCosmetics.Navi_EnemyPrimary.Value", newColor);
|
||||
CVarSetInteger("gCosmetics.Navi_EnemyPrimary.Changed", 1);
|
||||
CVarSetColor("gCosmetics.Navi_EnemySecondary.Value", newColor);
|
||||
CVarSetInteger("gCosmetics.Navi_EnemySecondary.Changed", 1);
|
||||
CVarSetColor("gCosmetics.Navi_IdlePrimary.Value", newColor);
|
||||
CVarSetInteger("gCosmetics.Navi_IdlePrimary.Changed", 1);
|
||||
CVarSetColor("gCosmetics.Navi_IdleSecondary.Value", newColor);
|
||||
CVarSetInteger("gCosmetics.Navi_IdleSecondary.Changed", 1);
|
||||
CVarSetColor("gCosmetics.Navi_NPCPrimary.Value", newColor);
|
||||
CVarSetInteger("gCosmetics.Navi_NPCPrimary.Changed", 1);
|
||||
CVarSetColor("gCosmetics.Navi_NPCSecondary.Value", newColor);
|
||||
CVarSetInteger("gCosmetics.Navi_NPCSecondary.Changed", 1);
|
||||
CVarSetColor("gCosmetics.Navi_PropsPrimary.Value", newColor);
|
||||
CVarSetInteger("gCosmetics.Navi_PropsPrimary.Changed", 1);
|
||||
CVarSetColor("gCosmetics.Navi_PropsSecondary.Value", newColor);
|
||||
CVarSetInteger("gCosmetics.Navi_PropsSecondary.Changed", 1);
|
||||
CVarSetColor(CVAR_COSMETIC("Navi.EnemyPrimary.Value"), newColor);
|
||||
CVarSetInteger(CVAR_COSMETIC("Navi.EnemyPrimary.Changed"), 1);
|
||||
CVarSetColor(CVAR_COSMETIC("Navi.EnemySecondary.Value"), newColor);
|
||||
CVarSetInteger(CVAR_COSMETIC("Navi.EnemySecondary.Changed"), 1);
|
||||
CVarSetColor(CVAR_COSMETIC("Navi.IdlePrimary.Value"), newColor);
|
||||
CVarSetInteger(CVAR_COSMETIC("Navi.IdlePrimary.Changed"), 1);
|
||||
CVarSetColor(CVAR_COSMETIC("Navi.IdleSecondary.Value"), newColor);
|
||||
CVarSetInteger(CVAR_COSMETIC("Navi.IdleSecondary.Changed"), 1);
|
||||
CVarSetColor(CVAR_COSMETIC("Navi.NPCPrimary.Value"), newColor);
|
||||
CVarSetInteger(CVAR_COSMETIC("Navi.NPCPrimary.Changed"), 1);
|
||||
CVarSetColor(CVAR_COSMETIC("Navi.NPCSecondary.Value"), newColor);
|
||||
CVarSetInteger(CVAR_COSMETIC("Navi.NPCSecondary.Changed"), 1);
|
||||
CVarSetColor(CVAR_COSMETIC("Navi.PropsPrimary.Value"), newColor);
|
||||
CVarSetInteger(CVAR_COSMETIC("Navi.PropsPrimary.Changed"), 1);
|
||||
CVarSetColor(CVAR_COSMETIC("Navi.PropsSecondary.Value"), newColor);
|
||||
CVarSetInteger(CVAR_COSMETIC("Navi.PropsSecondary.Changed"), 1);
|
||||
break;
|
||||
case GI_COSMETICS_HAIR:
|
||||
CVarSetColor("gCosmetics.Link_Hair.Value", newColor);
|
||||
CVarSetInteger("gCosmetics.Link_Hair.Changed", 1);
|
||||
CVarSetColor(CVAR_COSMETIC("Link.Hair.Value"), newColor);
|
||||
CVarSetInteger(CVAR_COSMETIC("Link.Hair.Changed"), 1);
|
||||
break;
|
||||
}
|
||||
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
ApplyOrResetCustomGfxPatches();
|
||||
}
|
||||
|
||||
void GameInteractor::RawAction::RandomizeCosmeticsColors(bool excludeBiddingWarColors) {
|
||||
const char* cvarsToLock[12] = {
|
||||
"gCosmetics.Link_KokiriTunic.Locked",
|
||||
"gCosmetics.Link_GoronTunic.Locked",
|
||||
"gCosmetics.Link_ZoraTunic.Locked",
|
||||
"gCosmetics.Navi_EnemyPrimary.Locked",
|
||||
"gCosmetics.Navi_EnemySecondary.Locked",
|
||||
"gCosmetics.Navi_IdlePrimary.Locked",
|
||||
"gCosmetics.Navi_IdleSecondary.Locked",
|
||||
"gCosmetics.Navi_NPCPrimary.Locked",
|
||||
"gCosmetics.Navi_NPCSecondary.Locked",
|
||||
"gCosmetics.Navi_PropsPrimary.Locked",
|
||||
"gCosmetics.Navi_PropsSecondary.Locked",
|
||||
"gCosmetics.Link_Hair.Locked"
|
||||
CVAR_COSMETIC("Link.KokiriTunic.Locked"),
|
||||
CVAR_COSMETIC("Link.GoronTunic.Locked"),
|
||||
CVAR_COSMETIC("Link.ZoraTunic.Locked"),
|
||||
CVAR_COSMETIC("Navi.EnemyPrimary.Locked"),
|
||||
CVAR_COSMETIC("Navi.EnemySecondary.Locked"),
|
||||
CVAR_COSMETIC("Navi.IdlePrimary.Locked"),
|
||||
CVAR_COSMETIC("Navi.IdleSecondary.Locked"),
|
||||
CVAR_COSMETIC("Navi.NPCPrimary.Locked"),
|
||||
CVAR_COSMETIC("Navi.NPCSecondary.Locked"),
|
||||
CVAR_COSMETIC("Navi.PropsPrimary.Locked"),
|
||||
CVAR_COSMETIC("Navi.PropsSecondary.Locked"),
|
||||
CVAR_COSMETIC("Link.Hair.Locked")
|
||||
};
|
||||
|
||||
if (excludeBiddingWarColors) {
|
||||
|
@ -2,12 +2,13 @@
|
||||
|
||||
#include "GameInteractor.h"
|
||||
#include <spdlog/spdlog.h>
|
||||
#include <ImGui/imgui.h>
|
||||
#include <ImGui/imgui_internal.h>
|
||||
#include <imgui.h>
|
||||
#include <imgui_internal.h>
|
||||
#include <unordered_map>
|
||||
#include <tuple>
|
||||
#include <type_traits>
|
||||
#include <libultraship/libultraship.h>
|
||||
#include "soh/OTRGlobals.h"
|
||||
|
||||
// MARK: - Remote
|
||||
|
||||
@ -16,7 +17,7 @@ void GameInteractor::EnableRemoteInteractor() {
|
||||
return;
|
||||
}
|
||||
|
||||
if (SDLNet_ResolveHost(&remoteIP, CVarGetString("gRemote.IP", "127.0.0.1"), CVarGetInteger("gRemote.Port", 43384)) == -1) {
|
||||
if (SDLNet_ResolveHost(&remoteIP, CVarGetString(CVAR_REMOTE("IP"), "127.0.0.1"), CVarGetInteger(CVAR_REMOTE("Port"), 43384)) == -1) {
|
||||
SPDLOG_ERROR("[GameInteractor] SDLNet_ResolveHost: {}", SDLNet_GetError());
|
||||
}
|
||||
|
||||
|
@ -66,7 +66,7 @@ void GameInteractorSail::HandleRemoteJson(nlohmann::json payload) {
|
||||
}
|
||||
|
||||
std::string command = payload["command"].get<std::string>();
|
||||
std::reinterpret_pointer_cast<LUS::ConsoleWindow>(LUS::Context::GetInstance()->GetWindow()->GetGui()->GetGuiWindow("Console"))->Dispatch(command);
|
||||
std::reinterpret_pointer_cast<Ship::ConsoleWindow>(Ship::Context::GetInstance()->GetWindow()->GetGui()->GetGuiWindow("Console"))->Dispatch(command);
|
||||
responsePayload["status"] = "success";
|
||||
GameInteractor::Instance->TransmitJsonToRemote(responsePayload);
|
||||
return;
|
||||
@ -88,7 +88,7 @@ void GameInteractorSail::HandleRemoteJson(nlohmann::json payload) {
|
||||
}
|
||||
|
||||
std::string command = payload["effect"]["command"].get<std::string>();
|
||||
std::reinterpret_pointer_cast<LUS::ConsoleWindow>(LUS::Context::GetInstance()->GetWindow()->GetGui()->GetGuiWindow("Console"))->Dispatch(command);
|
||||
std::reinterpret_pointer_cast<Ship::ConsoleWindow>(Ship::Context::GetInstance()->GetWindow()->GetGui()->GetGuiWindow("Console"))->Dispatch(command);
|
||||
responsePayload["status"] = "success";
|
||||
GameInteractor::Instance->TransmitJsonToRemote(responsePayload);
|
||||
return;
|
||||
|
@ -14,6 +14,7 @@ extern "C" {
|
||||
#include <libultraship/bridge.h>
|
||||
#include <libultraship/libultraship.h>
|
||||
#include "soh/Enhancements/enhancementTypes.h"
|
||||
#include "soh/OTRGlobals.h"
|
||||
|
||||
extern "C" {
|
||||
#include <z64.h>
|
||||
@ -387,7 +388,7 @@ void GameplayStatsRow(const char* label, const std::string& value, ImVec4 color
|
||||
}
|
||||
|
||||
bool compareTimestampInfoByTime(const TimestampInfo& a, const TimestampInfo& b) {
|
||||
return CVarGetInteger("gGameplayStats.TimestampsReverse", 0) ? a.time > b.time : a.time < b.time;
|
||||
return CVarGetInteger(CVAR_ENHANCEMENT("GameplayStats.ReverseTimestamps"), 0) ? a.time > b.time : a.time < b.time;
|
||||
}
|
||||
|
||||
const char* ResolveSceneID(int sceneID, int roomID){
|
||||
@ -442,13 +443,13 @@ void DrawGameplayStatsHeader() {
|
||||
} else {
|
||||
GameplayStatsRow("Total Game Time:", formatTimestampGameplayStat(GAMEPLAYSTAT_TOTAL_TIME), gSaveContext.sohStats.gameComplete ? COLOR_GREEN : COLOR_WHITE);
|
||||
}
|
||||
if (CVarGetInteger("gGameplayStats.ShowAdditionalTimers", 0)) { // !Only display total game time
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("GameplayStats.ShowAdditionalTimers"), 0)) { // !Only display total game time
|
||||
GameplayStatsRow("Gameplay Time:", formatTimestampGameplayStat(gSaveContext.sohStats.playTimer / 2), COLOR_GREY);
|
||||
GameplayStatsRow("Pause Menu Time:", formatTimestampGameplayStat(gSaveContext.sohStats.pauseTimer / 3), COLOR_GREY);
|
||||
GameplayStatsRow("Time in scene:", formatTimestampGameplayStat(gSaveContext.sohStats.sceneTimer / 2), COLOR_LIGHT_BLUE);
|
||||
GameplayStatsRow("Time in room:", formatTimestampGameplayStat(gSaveContext.sohStats.roomTimer / 2), COLOR_LIGHT_BLUE);
|
||||
}
|
||||
if (gPlayState != NULL && CVarGetInteger("gGameplayStats.ShowDebugInfo", 0)) { // && display debug info
|
||||
if (gPlayState != NULL && CVarGetInteger(CVAR_ENHANCEMENT("GameplayStats.ShowDebugInfo"), 0)) { // && display debug info
|
||||
GameplayStatsRow("play->sceneNum:", formatHexGameplayStat(gPlayState->sceneNum), COLOR_YELLOW);
|
||||
GameplayStatsRow("gSaveContext.entranceIndex:", formatHexGameplayStat(gSaveContext.entranceIndex), COLOR_YELLOW);
|
||||
GameplayStatsRow("gSaveContext.cutsceneIndex:", formatHexOnlyGameplayStat(gSaveContext.cutsceneIndex), COLOR_YELLOW);
|
||||
@ -538,7 +539,7 @@ void DrawGameplayStatsCountsTab() {
|
||||
GameplayStatsRow("Sword Swings:", formatIntGameplayStat(gSaveContext.sohStats.count[COUNT_SWORD_SWINGS]));
|
||||
GameplayStatsRow("Steps Taken:", formatIntGameplayStat(gSaveContext.sohStats.count[COUNT_STEPS]));
|
||||
// If using MM Bunny Hood enhancement, show how long it's been equipped (not counting pause time)
|
||||
if (CVarGetInteger("gMMBunnyHood", BUNNY_HOOD_VANILLA) != BUNNY_HOOD_VANILLA || gSaveContext.sohStats.count[COUNT_TIME_BUNNY_HOOD] > 0) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("MMBunnyHood"), BUNNY_HOOD_VANILLA) != BUNNY_HOOD_VANILLA || gSaveContext.sohStats.count[COUNT_TIME_BUNNY_HOOD] > 0) {
|
||||
GameplayStatsRow("Bunny Hood Time:", formatTimestampGameplayStat(gSaveContext.sohStats.count[COUNT_TIME_BUNNY_HOOD] / 2));
|
||||
}
|
||||
GameplayStatsRow("Rolls:", formatIntGameplayStat(gSaveContext.sohStats.count[COUNT_ROLLS]));
|
||||
@ -566,13 +567,13 @@ void DrawGameplayStatsBreakdownTab() {
|
||||
for (int i = 0; i < gSaveContext.sohStats.tsIdx; i++) {
|
||||
std::string sceneName = ResolveSceneID(gSaveContext.sohStats.sceneTimestamps[i].scene, gSaveContext.sohStats.sceneTimestamps[i].room);
|
||||
std::string name;
|
||||
if (CVarGetInteger("gGameplayStats.RoomBreakdown", 0) && gSaveContext.sohStats.sceneTimestamps[i].scene != SCENE_GROTTOS) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("GameplayStats.RoomBreakdown"), 0) && gSaveContext.sohStats.sceneTimestamps[i].scene != SCENE_GROTTOS) {
|
||||
name = fmt::format("{:s} Room {:d}", sceneName, gSaveContext.sohStats.sceneTimestamps[i].room);
|
||||
} else {
|
||||
name = sceneName;
|
||||
}
|
||||
strcpy(sceneTimestampDisplay[i].name, name.c_str());
|
||||
sceneTimestampDisplay[i].time = CVarGetInteger("gGameplayStats.RoomBreakdown", 0) ?
|
||||
sceneTimestampDisplay[i].time = CVarGetInteger(CVAR_ENHANCEMENT("GameplayStats.RoomBreakdown"), 0) ?
|
||||
gSaveContext.sohStats.sceneTimestamps[i].roomTime : gSaveContext.sohStats.sceneTimestamps[i].sceneTime;
|
||||
sceneTimestampDisplay[i].color = COLOR_GREY;
|
||||
sceneTimestampDisplay[i].isRoom = gSaveContext.sohStats.sceneTimestamps[i].isRoom;
|
||||
@ -583,13 +584,13 @@ void DrawGameplayStatsBreakdownTab() {
|
||||
ImGui::TableSetupColumn("stat", ImGuiTableColumnFlags_WidthStretch);
|
||||
for (int i = 0; i < gSaveContext.sohStats.tsIdx; i++) {
|
||||
TimestampInfo tsInfo = sceneTimestampDisplay[i];
|
||||
bool canShow = !tsInfo.isRoom || CVarGetInteger("gGameplayStats.RoomBreakdown", 0);
|
||||
bool canShow = !tsInfo.isRoom || CVarGetInteger(CVAR_ENHANCEMENT("GameplayStats.RoomBreakdown"), 0);
|
||||
if (tsInfo.time > 0 && strnlen(tsInfo.name, 40) > 1 && canShow) {
|
||||
GameplayStatsRow(tsInfo.name, formatTimestampGameplayStat(tsInfo.time), tsInfo.color);
|
||||
}
|
||||
}
|
||||
std::string toPass;
|
||||
if (CVarGetInteger("gGameplayStats.RoomBreakdown", 0) && gSaveContext.sohStats.sceneNum != SCENE_GROTTOS) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("GameplayStats.RoomBreakdown"), 0) && gSaveContext.sohStats.sceneNum != SCENE_GROTTOS) {
|
||||
toPass = fmt::format("{:s} Room {:d}", ResolveSceneID(gSaveContext.sohStats.sceneNum, gSaveContext.sohStats.roomNum), gSaveContext.sohStats.roomNum);
|
||||
} else {
|
||||
toPass = ResolveSceneID(gSaveContext.sohStats.sceneNum, gSaveContext.sohStats.roomNum);
|
||||
@ -600,21 +601,21 @@ void DrawGameplayStatsBreakdownTab() {
|
||||
}
|
||||
|
||||
void DrawGameplayStatsOptionsTab() {
|
||||
UIWidgets::PaddedEnhancementCheckbox("Show in-game total timer", "gGameplayStats.ShowIngameTimer", true, false);
|
||||
UIWidgets::PaddedEnhancementCheckbox("Show in-game total timer", CVAR_ENHANCEMENT("GameplayStats.ShowIngameTimer"), true, false);
|
||||
UIWidgets::InsertHelpHoverText("Keep track of the timer as an in-game HUD element. The position of the timer can be changed in the Cosmetics Editor.");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Show latest timestamps on top", "gGameplayStats.TimestampsReverse", true, false);
|
||||
UIWidgets::PaddedEnhancementCheckbox("Room Breakdown", "gGameplayStats.RoomBreakdown", true, false);
|
||||
UIWidgets::PaddedEnhancementCheckbox("Show latest timestamps on top", CVAR_ENHANCEMENT("GameplayStats.ReverseTimestamps"), true, false);
|
||||
UIWidgets::PaddedEnhancementCheckbox("Room Breakdown", CVAR_ENHANCEMENT("GameplayStats.RoomBreakdown"), true, false);
|
||||
ImGui::SameLine();
|
||||
UIWidgets::InsertHelpHoverText("Allows a more in-depth perspective of time spent in a certain map.");
|
||||
UIWidgets::PaddedEnhancementCheckbox("RTA Timing on new files", "gGameplayStats.RTATiming", true, false);
|
||||
UIWidgets::PaddedEnhancementCheckbox("RTA Timing on new files", CVAR_ENHANCEMENT("GameplayStats.RTATiming"), true, false);
|
||||
ImGui::SameLine();
|
||||
UIWidgets::InsertHelpHoverText(
|
||||
"Timestamps are relative to starting timestamp rather than in game time, usually necessary for races/speedruns.\n\n"
|
||||
"Starting timestamp is on first non-c-up input after intro cutscene.\n\n"
|
||||
"NOTE: THIS NEEDS TO BE SET BEFORE CREATING A FILE TO TAKE EFFECT"
|
||||
);
|
||||
UIWidgets::PaddedEnhancementCheckbox("Show additional detail timers", "gGameplayStats.ShowAdditionalTimers", true, false);
|
||||
UIWidgets::PaddedEnhancementCheckbox("Show Debug Info", "gGameplayStats.ShowDebugInfo");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Show additional detail timers", CVAR_ENHANCEMENT("GameplayStats.ShowAdditionalTimers"), true, false);
|
||||
UIWidgets::PaddedEnhancementCheckbox("Show Debug Info", CVAR_ENHANCEMENT("GameplayStats.ShowDebugInfo"));
|
||||
}
|
||||
|
||||
void GameplayStatsWindow::DrawElement() {
|
||||
@ -656,7 +657,7 @@ void InitStats(bool isDebug) {
|
||||
for (int dungeon = 0; dungeon < ARRAY_COUNT(gSaveContext.sohStats.dungeonKeys); dungeon++) {
|
||||
gSaveContext.sohStats.dungeonKeys[dungeon] = isDebug ? 8 : 0;
|
||||
}
|
||||
gSaveContext.sohStats.rtaTiming = CVarGetInteger("gGameplayStats.RTATiming", 0);
|
||||
gSaveContext.sohStats.rtaTiming = CVarGetInteger(CVAR_ENHANCEMENT("GameplayStats.RTATiming"), 0);
|
||||
gSaveContext.sohStats.fileCreatedAt = 0;
|
||||
gSaveContext.sohStats.playTimer = 0;
|
||||
gSaveContext.sohStats.pauseTimer = 0;
|
||||
|
@ -12,7 +12,7 @@
|
||||
(!gSaveContext.sohStats.fileCreatedAt ? 0 : ((GetUnixTimestamp() - gSaveContext.sohStats.fileCreatedAt) / 100)) :\
|
||||
(gSaveContext.sohStats.itemTimestamp[TIMESTAMP_DEFEAT_GANON])) :\
|
||||
(gSaveContext.sohStats.playTimer / 2 + gSaveContext.sohStats.pauseTimer / 3))
|
||||
#define CURRENT_MODE_TIMER (CVarGetInteger("gGameplayStats.RoomBreakdown", 0) ?\
|
||||
#define CURRENT_MODE_TIMER (CVarGetInteger(CVAR_ENHANCEMENT("GameplayStats.RoomBreakdown"), 0) ?\
|
||||
gSaveContext.sohStats.roomTimer :\
|
||||
gSaveContext.sohStats.sceneTimer)
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include <libultraship/libultraship.h>
|
||||
#include "gameplaystats.h"
|
||||
|
||||
class GameplayStatsWindow : public LUS::GuiWindow {
|
||||
class GameplayStatsWindow : public Ship::GuiWindow {
|
||||
public:
|
||||
using GuiWindow::GuiWindow;
|
||||
|
||||
|
@ -72,7 +72,7 @@ void ReloadSceneTogglingLinkAge() {
|
||||
void RegisterInfiniteMoney() {
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnGameFrameUpdate>([]() {
|
||||
if (!GameInteractor::IsSaveLoaded(true)) return;
|
||||
if (CVarGetInteger("gInfiniteMoney", 0) != 0 && (!IS_RANDO || Flags_GetRandomizerInf(RAND_INF_HAS_WALLET))) {
|
||||
if (CVarGetInteger(CVAR_CHEAT("InfiniteMoney"), 0) != 0 && (!IS_RANDO || Flags_GetRandomizerInf(RAND_INF_HAS_WALLET))) {
|
||||
if (gSaveContext.rupees < CUR_CAPACITY(UPG_WALLET)) {
|
||||
gSaveContext.rupees = CUR_CAPACITY(UPG_WALLET);
|
||||
}
|
||||
@ -83,7 +83,7 @@ void RegisterInfiniteMoney() {
|
||||
void RegisterInfiniteHealth() {
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnGameFrameUpdate>([]() {
|
||||
if (!GameInteractor::IsSaveLoaded(true)) return;
|
||||
if (CVarGetInteger("gInfiniteHealth", 0) != 0) {
|
||||
if (CVarGetInteger(CVAR_CHEAT("InfiniteHealth"), 0) != 0) {
|
||||
if (gSaveContext.health < gSaveContext.healthCapacity) {
|
||||
gSaveContext.health = gSaveContext.healthCapacity;
|
||||
}
|
||||
@ -94,7 +94,7 @@ void RegisterInfiniteHealth() {
|
||||
void RegisterInfiniteAmmo() {
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnGameFrameUpdate>([]() {
|
||||
if (!GameInteractor::IsSaveLoaded(true)) return;
|
||||
if (CVarGetInteger("gInfiniteAmmo", 0) != 0) {
|
||||
if (CVarGetInteger(CVAR_CHEAT("InfiniteAmmo"), 0) != 0) {
|
||||
// Deku Sticks
|
||||
if (AMMO(ITEM_STICK) < CUR_CAPACITY(UPG_STICKS)) {
|
||||
AMMO(ITEM_STICK) = CUR_CAPACITY(UPG_STICKS);
|
||||
@ -131,7 +131,7 @@ void RegisterInfiniteAmmo() {
|
||||
void RegisterInfiniteMagic() {
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnGameFrameUpdate>([]() {
|
||||
if (!GameInteractor::IsSaveLoaded(true)) return;
|
||||
if (CVarGetInteger("gInfiniteMagic", 0) != 0) {
|
||||
if (CVarGetInteger(CVAR_CHEAT("InfiniteMagic"), 0) != 0) {
|
||||
if (gSaveContext.isMagicAcquired && gSaveContext.magic != (gSaveContext.isDoubleMagicAcquired + 1) * 0x30) {
|
||||
gSaveContext.magic = (gSaveContext.isDoubleMagicAcquired + 1) * 0x30;
|
||||
}
|
||||
@ -142,7 +142,7 @@ void RegisterInfiniteMagic() {
|
||||
void RegisterInfiniteNayrusLove() {
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnGameFrameUpdate>([]() {
|
||||
if (!GameInteractor::IsSaveLoaded(true)) return;
|
||||
if (CVarGetInteger("gInfiniteNayru", 0) != 0) {
|
||||
if (CVarGetInteger(CVAR_CHEAT("InfiniteNayru"), 0) != 0) {
|
||||
gSaveContext.nayrusLoveTimer = 0x44B;
|
||||
}
|
||||
});
|
||||
@ -152,7 +152,7 @@ void RegisterMoonJumpOnL() {
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnGameFrameUpdate>([]() {
|
||||
if (!GameInteractor::IsSaveLoaded(true)) return;
|
||||
|
||||
if (CVarGetInteger("gMoonJumpOnL", 0) != 0) {
|
||||
if (CVarGetInteger(CVAR_CHEAT("MoonJumpOnL"), 0) != 0) {
|
||||
Player* player = GET_PLAYER(gPlayState);
|
||||
|
||||
if (CHECK_BTN_ANY(gPlayState->state.input[0].cur.button, BTN_L)) {
|
||||
@ -167,7 +167,7 @@ void RegisterInfiniteISG() {
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnGameFrameUpdate>([]() {
|
||||
if (!GameInteractor::IsSaveLoaded(true)) return;
|
||||
|
||||
if (CVarGetInteger("gEzISG", 0) != 0) {
|
||||
if (CVarGetInteger(CVAR_CHEAT("EasyISG"), 0) != 0) {
|
||||
Player* player = GET_PLAYER(gPlayState);
|
||||
player->meleeWeaponState = 1;
|
||||
}
|
||||
@ -179,7 +179,7 @@ void RegisterEzQPA() {
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnGameFrameUpdate>([]() {
|
||||
if (!GameInteractor::IsSaveLoaded(true)) return;
|
||||
|
||||
if (CVarGetInteger("gEzQPA", 0) != 0) {
|
||||
if (CVarGetInteger(CVAR_CHEAT("EasyQPA"), 0) != 0) {
|
||||
Player* player = GET_PLAYER(gPlayState);
|
||||
player->meleeWeaponQuads[0].info.toucher.dmgFlags = 0x16171617;
|
||||
player->meleeWeaponQuads[1].info.toucher.dmgFlags = 0x16171617;
|
||||
@ -191,7 +191,7 @@ void RegisterUnrestrictedItems() {
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnGameFrameUpdate>([]() {
|
||||
if (!GameInteractor::IsSaveLoaded(true)) return;
|
||||
|
||||
if (CVarGetInteger("gNoRestrictItems", 0) != 0) {
|
||||
if (CVarGetInteger(CVAR_CHEAT("NoRestrictItems"), 0) != 0) {
|
||||
u8 sunsBackup = gPlayState->interfaceCtx.restrictions.sunsSong;
|
||||
memset(&gPlayState->interfaceCtx.restrictions, 0, sizeof(gPlayState->interfaceCtx.restrictions));
|
||||
gPlayState->interfaceCtx.restrictions.sunsSong = sunsBackup;
|
||||
@ -201,15 +201,15 @@ void RegisterUnrestrictedItems() {
|
||||
|
||||
void RegisterFreezeTime() {
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnGameFrameUpdate>([]() {
|
||||
if (CVarGetInteger("gFreezeTime", 0) != 0) {
|
||||
if (CVarGetInteger("gPrevTime", -1) == -1) {
|
||||
CVarSetInteger("gPrevTime", gSaveContext.dayTime);
|
||||
if (CVarGetInteger(CVAR_CHEAT("FreezeTime"), 0) != 0) {
|
||||
if (CVarGetInteger(CVAR_GENERAL("PrevTime"), -1) == -1) {
|
||||
CVarSetInteger(CVAR_GENERAL("PrevTime"), gSaveContext.dayTime);
|
||||
}
|
||||
|
||||
int32_t prevTime = CVarGetInteger("gPrevTime", gSaveContext.dayTime);
|
||||
int32_t prevTime = CVarGetInteger(CVAR_GENERAL("PrevTime"), gSaveContext.dayTime);
|
||||
gSaveContext.dayTime = prevTime;
|
||||
} else {
|
||||
CVarClear("gPrevTime");
|
||||
CVarClear(CVAR_GENERAL("PrevTime"));
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -220,7 +220,7 @@ void RegisterSwitchAge() {
|
||||
static bool warped = false;
|
||||
|
||||
if (!GameInteractor::IsSaveLoaded(true)) {
|
||||
CVarClear("gSwitchAge");
|
||||
CVarClear(CVAR_GENERAL("SwitchAge"));
|
||||
warped = false;
|
||||
return;
|
||||
}
|
||||
@ -230,7 +230,7 @@ void RegisterSwitchAge() {
|
||||
static RoomContext* roomCtx;
|
||||
static s32 roomNum;
|
||||
|
||||
if (CVarGetInteger("gSwitchAge", 0) && !warped) {
|
||||
if (CVarGetInteger(CVAR_GENERAL("SwitchAge"), 0) && !warped) {
|
||||
playerPos = GET_PLAYER(gPlayState)->actor.world.pos;
|
||||
playerYaw = GET_PLAYER(gPlayState)->actor.shape.rot.y;
|
||||
roomCtx = &gPlayState->roomCtx;
|
||||
@ -249,7 +249,7 @@ void RegisterSwitchAge() {
|
||||
func_80097534(gPlayState, roomCtx); // load map for new room (unloading the previous room)
|
||||
}
|
||||
warped = false;
|
||||
CVarClear("gSwitchAge");
|
||||
CVarClear(CVAR_GENERAL("SwitchAge"));
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -259,7 +259,7 @@ void RegisterOcarinaTimeTravel() {
|
||||
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnOcarinaSongAction>([]() {
|
||||
if (!GameInteractor::IsSaveLoaded(true)) {
|
||||
CVarClear("gTimeTravel");
|
||||
CVarClear(CVAR_ENHANCEMENT("TimeTravel"));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -273,16 +273,16 @@ void RegisterOcarinaTimeTravel() {
|
||||
uint8_t hasOcarinaOfTime = (INV_CONTENT(ITEM_OCARINA_TIME) == ITEM_OCARINA_TIME);
|
||||
// If TimeTravel + Player have the Ocarina of Time + Have Master Sword + is in proper range
|
||||
// TODO: Once Swordless Adult is fixed: Remove the Master Sword check
|
||||
if (((CVarGetInteger("gTimeTravel", 0) == 1 && hasOcarinaOfTime) || CVarGetInteger("gTimeTravel", 0) == 2) && hasMasterSword &&
|
||||
if (((CVarGetInteger(CVAR_ENHANCEMENT("TimeTravel"), 0) == 1 && hasOcarinaOfTime) || CVarGetInteger(CVAR_ENHANCEMENT("TimeTravel"), 0) == 2) && hasMasterSword &&
|
||||
gPlayState->msgCtx.lastPlayedSong == OCARINA_SONG_TIME && !nearbyTimeBlockEmpty && !nearbyTimeBlock &&
|
||||
!nearbyOcarinaSpot && !nearbyFrogs) {
|
||||
|
||||
if (IS_RANDO) {
|
||||
CVarSetInteger("gSwitchTimeline", 1);
|
||||
CVarSetInteger(CVAR_GENERAL("SwitchTimeline"), 1);
|
||||
} else if (!IS_RANDO && !nearbyDoorOfTime) {
|
||||
// This check is made for when Link is learning the Song Of Time in a vanilla save file that load a
|
||||
// Temple of Time scene where the only object present is the Door of Time
|
||||
CVarSetInteger("gSwitchTimeline", 1);
|
||||
CVarSetInteger(CVAR_GENERAL("SwitchTimeline"), 1);
|
||||
}
|
||||
ReloadSceneTogglingLinkAge();
|
||||
}
|
||||
@ -295,13 +295,13 @@ void AutoSave(GetItemEntry itemEntry) {
|
||||
// Don't autosave immediately after buying items from shops to prevent getting them for free!
|
||||
// Don't autosave in the Chamber of Sages since resuming from that map breaks the game
|
||||
// Don't autosave during the Ganon fight when picking up the Master Sword
|
||||
if ((CVarGetInteger("gAutosave", AUTOSAVE_OFF) != AUTOSAVE_OFF) && (gPlayState != NULL) && (gSaveContext.pendingSale == ITEM_NONE) &&
|
||||
if ((CVarGetInteger(CVAR_ENHANCEMENT("Autosave"), AUTOSAVE_OFF) != AUTOSAVE_OFF) && (gPlayState != NULL) && (gSaveContext.pendingSale == ITEM_NONE) &&
|
||||
(gPlayState->gameplayFrames > 60 && gSaveContext.cutsceneIndex < 0xFFF0) && (gPlayState->sceneNum != SCENE_GANON_BOSS) && (gPlayState->sceneNum != SCENE_CHAMBER_OF_THE_SAGES)) {
|
||||
if (((CVarGetInteger("gAutosave", AUTOSAVE_OFF) == AUTOSAVE_LOCATION_AND_ALL_ITEMS) || (CVarGetInteger("gAutosave", AUTOSAVE_OFF) == AUTOSAVE_ALL_ITEMS)) && (item != ITEM_NONE)) {
|
||||
if (((CVarGetInteger(CVAR_ENHANCEMENT("Autosave"), AUTOSAVE_OFF) == AUTOSAVE_LOCATION_AND_ALL_ITEMS) || (CVarGetInteger(CVAR_ENHANCEMENT("Autosave"), AUTOSAVE_OFF) == AUTOSAVE_ALL_ITEMS)) && (item != ITEM_NONE)) {
|
||||
// Autosave for all items
|
||||
performSave = true;
|
||||
|
||||
} else if (((CVarGetInteger("gAutosave", AUTOSAVE_OFF) == AUTOSAVE_LOCATION_AND_MAJOR_ITEMS) || (CVarGetInteger("gAutosave", AUTOSAVE_OFF) == AUTOSAVE_MAJOR_ITEMS)) && (item != ITEM_NONE)) {
|
||||
} else if (((CVarGetInteger(CVAR_ENHANCEMENT("Autosave"), AUTOSAVE_OFF) == AUTOSAVE_LOCATION_AND_MAJOR_ITEMS) || (CVarGetInteger(CVAR_ENHANCEMENT("Autosave"), AUTOSAVE_OFF) == AUTOSAVE_MAJOR_ITEMS)) && (item != ITEM_NONE)) {
|
||||
// Autosave for major items
|
||||
if (itemEntry.modIndex == 0) {
|
||||
switch (item) {
|
||||
@ -341,7 +341,7 @@ void AutoSave(GetItemEntry itemEntry) {
|
||||
case ITEM_BOMBCHU:
|
||||
case ITEM_BOMBCHUS_5:
|
||||
case ITEM_BOMBCHUS_20:
|
||||
if (!CVarGetInteger("gBombchuDrops", 0)) {
|
||||
if (!CVarGetInteger(CVAR_ENHANCEMENT("BombchuDrops"), 0)) {
|
||||
performSave = true;
|
||||
}
|
||||
break;
|
||||
@ -352,9 +352,9 @@ void AutoSave(GetItemEntry itemEntry) {
|
||||
} else if (itemEntry.modIndex == 1 && item != RG_ICE_TRAP) {
|
||||
performSave = true;
|
||||
}
|
||||
} else if (CVarGetInteger("gAutosave", AUTOSAVE_OFF) == AUTOSAVE_LOCATION_AND_MAJOR_ITEMS ||
|
||||
CVarGetInteger("gAutosave", AUTOSAVE_OFF) == AUTOSAVE_LOCATION_AND_ALL_ITEMS ||
|
||||
CVarGetInteger("gAutosave", AUTOSAVE_OFF) == AUTOSAVE_LOCATION) {
|
||||
} else if (CVarGetInteger(CVAR_ENHANCEMENT("Autosave"), AUTOSAVE_OFF) == AUTOSAVE_LOCATION_AND_MAJOR_ITEMS ||
|
||||
CVarGetInteger(CVAR_ENHANCEMENT("Autosave"), AUTOSAVE_OFF) == AUTOSAVE_LOCATION_AND_ALL_ITEMS ||
|
||||
CVarGetInteger(CVAR_ENHANCEMENT("Autosave"), AUTOSAVE_OFF) == AUTOSAVE_LOCATION) {
|
||||
performSave = true;
|
||||
}
|
||||
if (performSave) {
|
||||
@ -372,13 +372,13 @@ void RegisterAutoSave() {
|
||||
|
||||
void RegisterRupeeDash() {
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnPlayerUpdate>([]() {
|
||||
if (!CVarGetInteger("gRupeeDash", 0)) {
|
||||
if (!CVarGetInteger(CVAR_ENHANCEMENT("RupeeDash"), 0)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Initialize Timer
|
||||
static uint16_t rupeeDashTimer = 0;
|
||||
uint16_t rdmTime = CVarGetInteger("gDashInterval", 5) * 20;
|
||||
uint16_t rdmTime = CVarGetInteger(CVAR_ENHANCEMENT("RupeeDashInterval"), 5) * 20;
|
||||
|
||||
// Did time change by DashInterval?
|
||||
if (rupeeDashTimer >= rdmTime) {
|
||||
@ -400,7 +400,7 @@ void RegisterShadowTag() {
|
||||
static uint16_t delayTimer = 60;
|
||||
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnPlayerUpdate>([]() {
|
||||
if (!CVarGetInteger("gShadowTag", 0)) {
|
||||
if (!CVarGetInteger(CVAR_ENHANCEMENT("ShadowTag"), 0)) {
|
||||
return;
|
||||
}
|
||||
if (gPlayState->sceneNum == SCENE_FOREST_TEMPLE && // Forest Temple Scene
|
||||
@ -431,7 +431,7 @@ static bool hasAffectedHealth = false;
|
||||
void UpdatePermanentHeartLossState() {
|
||||
if (!GameInteractor::IsSaveLoaded()) return;
|
||||
|
||||
if (!CVarGetInteger("gPermanentHeartLoss", 0) && hasAffectedHealth) {
|
||||
if (!CVarGetInteger(CVAR_ENHANCEMENT("PermanentHeartLoss"), 0) && hasAffectedHealth) {
|
||||
uint8_t heartContainers = gSaveContext.sohStats.heartContainers; // each worth 16 health
|
||||
uint8_t heartPieces = gSaveContext.sohStats.heartPieces; // each worth 4 health, but only in groups of 4
|
||||
uint8_t startingHealth = 16 * 3;
|
||||
@ -451,7 +451,7 @@ void RegisterPermanentHeartLoss() {
|
||||
});
|
||||
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnPlayerUpdate>([]() {
|
||||
if (!CVarGetInteger("gPermanentHeartLoss", 0) || !GameInteractor::IsSaveLoaded()) return;
|
||||
if (!CVarGetInteger(CVAR_ENHANCEMENT("PermanentHeartLoss"), 0) || !GameInteractor::IsSaveLoaded()) return;
|
||||
|
||||
if (gSaveContext.healthCapacity > 16 && gSaveContext.healthCapacity - gSaveContext.health >= 16) {
|
||||
gSaveContext.healthCapacity -= 16;
|
||||
@ -463,12 +463,12 @@ void RegisterPermanentHeartLoss() {
|
||||
|
||||
void RegisterDeleteFileOnDeath() {
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnGameFrameUpdate>([]() {
|
||||
if (!CVarGetInteger("gDeleteFileOnDeath", 0) || !GameInteractor::IsSaveLoaded() || &gPlayState->gameOverCtx == NULL || &gPlayState->pauseCtx == NULL) return;
|
||||
if (!CVarGetInteger(CVAR_ENHANCEMENT("DeleteFileOnDeath"), 0) || !GameInteractor::IsSaveLoaded() || &gPlayState->gameOverCtx == NULL || &gPlayState->pauseCtx == NULL) return;
|
||||
|
||||
if (gPlayState->gameOverCtx.state == GAMEOVER_DEATH_MENU && gPlayState->pauseCtx.state == 9) {
|
||||
SaveManager::Instance->DeleteZeldaFile(gSaveContext.fileNum);
|
||||
hasAffectedHealth = false;
|
||||
std::reinterpret_pointer_cast<LUS::ConsoleWindow>(LUS::Context::GetInstance()->GetWindow()->GetGui()->GetGuiWindow("Console"))->Dispatch("reset");
|
||||
std::reinterpret_pointer_cast<Ship::ConsoleWindow>(Ship::Context::GetInstance()->GetWindow()->GetGui()->GetGuiWindow("Console"))->Dispatch("reset");
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -484,7 +484,7 @@ using DayTimeGoldSkulltulasList = std::vector<DayTimeGoldSkulltulas>;
|
||||
|
||||
void RegisterDaytimeGoldSkultullas() {
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnSceneSpawnActors>([]() {
|
||||
if (!CVarGetInteger("gNightGSAlwaysSpawn", 0)) {
|
||||
if (!CVarGetInteger(CVAR_ENHANCEMENT("NightGSAlwaysSpawn"), 0)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -530,7 +530,7 @@ void RegisterDaytimeGoldSkultullas() {
|
||||
}
|
||||
|
||||
bool IsHyperBossesActive() {
|
||||
return CVarGetInteger("gHyperBosses", 0) ||
|
||||
return CVarGetInteger(CVAR_ENHANCEMENT("HyperBosses"), 0) ||
|
||||
(IS_BOSS_RUSH && gSaveContext.bossRushOptions[BR_OPTIONS_HYPERBOSSES] == BR_CHOICE_HYPERBOSSES_YES);
|
||||
}
|
||||
|
||||
@ -598,7 +598,7 @@ void UpdateHyperEnemiesState() {
|
||||
actorUpdateHookId = 0;
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gHyperEnemies", 0)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("HyperEnemies"), 0)) {
|
||||
actorUpdateHookId = GameInteractor::Instance->RegisterGameHook<GameInteractor::OnActorUpdate>([](void* refActor) {
|
||||
// Run the update function a second time to make enemies and minibosses move and act twice as fast.
|
||||
|
||||
@ -610,7 +610,7 @@ void UpdateHyperEnemiesState() {
|
||||
bool isExcludedEnemy = actor->id == ACTOR_EN_FIRE_ROCK || actor->id == ACTOR_EN_ENCOUNT2;
|
||||
|
||||
// Don't apply during cutscenes because it causes weird behaviour and/or crashes on some cutscenes.
|
||||
if (CVarGetInteger("gHyperEnemies", 0) && isEnemy && !isExcludedEnemy &&
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("HyperEnemies"), 0) && isEnemy && !isExcludedEnemy &&
|
||||
!Player_InBlockingCsMode(gPlayState, player)) {
|
||||
GameInteractor::RawAction::UpdateActor(actor);
|
||||
}
|
||||
@ -620,7 +620,7 @@ void UpdateHyperEnemiesState() {
|
||||
|
||||
void RegisterBonkDamage() {
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnPlayerBonk>([]() {
|
||||
uint8_t bonkOption = CVarGetInteger("gBonkDamageMul", BONK_DAMAGE_NONE);
|
||||
uint8_t bonkOption = CVarGetInteger(CVAR_ENHANCEMENT("BonkDamageMult"), BONK_DAMAGE_NONE);
|
||||
if (bonkOption == BONK_DAMAGE_NONE) {
|
||||
return;
|
||||
}
|
||||
@ -666,10 +666,10 @@ void UpdateDirtPathFixState(int32_t sceneNum) {
|
||||
case SCENE_HYRULE_FIELD:
|
||||
case SCENE_KOKIRI_FOREST:
|
||||
case SCENE_HYRULE_CASTLE:
|
||||
CVarSetInteger("gZFightingMode", CVarGetInteger("gSceneSpecificDirtPathFix", ZFIGHT_FIX_DISABLED));
|
||||
CVarSetInteger(CVAR_Z_FIGHTING_MODE, CVarGetInteger(CVAR_ENHANCEMENT("SceneSpecificDirtPathFix"), ZFIGHT_FIX_DISABLED));
|
||||
return;
|
||||
default:
|
||||
CVarClear("gZFightingMode");
|
||||
CVarClear(CVAR_Z_FIGHTING_MODE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -683,7 +683,7 @@ void UpdateMirrorModeState(int32_t sceneNum) {
|
||||
static bool prevMirroredWorld = false;
|
||||
bool nextMirroredWorld = false;
|
||||
|
||||
int16_t mirroredMode = CVarGetInteger("gMirroredWorldMode", MIRRORED_WORLD_OFF);
|
||||
int16_t mirroredMode = CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorldMode"), MIRRORED_WORLD_OFF);
|
||||
int16_t inDungeon = (sceneNum >= SCENE_DEKU_TREE && sceneNum <= SCENE_INSIDE_GANONS_CASTLE_COLLAPSE && sceneNum != SCENE_THIEVES_HIDEOUT) ||
|
||||
(sceneNum >= SCENE_DEKU_TREE_BOSS && sceneNum <= SCENE_GANONS_TOWER_COLLAPSE_EXTERIOR) ||
|
||||
(sceneNum == SCENE_GANON_BOSS);
|
||||
@ -706,10 +706,10 @@ void UpdateMirrorModeState(int32_t sceneNum) {
|
||||
((mirroredMode == MIRRORED_WORLD_DUNGEONS_RANDOM || mirroredMode == MIRRORED_WORLD_DUNGEONS_RANDOM_SEEDED) && randomMirror)))
|
||||
) {
|
||||
nextMirroredWorld = true;
|
||||
CVarSetInteger("gMirroredWorld", 1);
|
||||
CVarSetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 1);
|
||||
} else {
|
||||
nextMirroredWorld = false;
|
||||
CVarClear("gMirroredWorld");
|
||||
CVarClear(CVAR_ENHANCEMENT("MirroredWorld"));
|
||||
}
|
||||
|
||||
if (prevMirroredWorld != nextMirroredWorld) {
|
||||
@ -725,7 +725,7 @@ void RegisterMirrorModeHandler() {
|
||||
}
|
||||
|
||||
void UpdatePatchHand() {
|
||||
if ((CVarGetInteger("gEnhancements.EquimentAlwaysVisible", 0)) && LINK_IS_CHILD) {
|
||||
if ((CVarGetInteger(CVAR_ENHANCEMENT("EquimentAlwaysVisible"), 0)) && LINK_IS_CHILD) {
|
||||
ResourceMgr_PatchGfxByName(gLinkAdultLeftHandHoldingHammerNearDL, "childHammer1", 92, gsSPDisplayListOTRFilePath(gLinkChildLeftFistNearDL));
|
||||
ResourceMgr_PatchGfxByName(gLinkAdultLeftHandHoldingHammerNearDL, "childHammer2", 93, gsSPEndDisplayList());
|
||||
ResourceMgr_PatchGfxByName(gLinkAdultRightHandHoldingHookshotNearDL, "childHookshot1", 84, gsSPDisplayListOTRFilePath(gLinkChildRightHandClosedNearDL));
|
||||
@ -753,7 +753,7 @@ void UpdatePatchHand() {
|
||||
ResourceMgr_UnpatchGfxByName(gLinkAdultHandHoldingBrokenGiantsKnifeDL, "childBrokenGiantsKnife1");
|
||||
ResourceMgr_UnpatchGfxByName(gLinkAdultHandHoldingBrokenGiantsKnifeDL, "childBrokenGiantsKnife2");
|
||||
}
|
||||
if ((CVarGetInteger("gEnhancements.EquimentAlwaysVisible", 0)) && LINK_IS_ADULT) {
|
||||
if ((CVarGetInteger(CVAR_ENHANCEMENT("EquimentAlwaysVisible"), 0)) && LINK_IS_ADULT) {
|
||||
ResourceMgr_PatchGfxByName(gLinkChildLeftFistAndKokiriSwordNearDL, "adultKokiriSword", 13, gsSPDisplayListOTRFilePath(gLinkAdultLeftHandClosedNearDL));
|
||||
ResourceMgr_PatchGfxByName(gLinkChildRightHandHoldingSlingshotNearDL, "adultSlingshot", 13, gsSPDisplayListOTRFilePath(gLinkAdultRightHandClosedNearDL));
|
||||
ResourceMgr_PatchGfxByName(gLinkChildLeftFistAndBoomerangNearDL, "adultBoomerang", 50, gsSPDisplayListOTRFilePath(gLinkAdultLeftHandClosedNearDL));
|
||||
@ -774,7 +774,7 @@ void RegisterPatchHandHandler() {
|
||||
|
||||
void RegisterResetNaviTimer() {
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnSceneInit>([](int32_t sceneNum) {
|
||||
if (CVarGetInteger("gEnhancements.ResetNaviTimer", 0)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("ResetNaviTimer"), 0)) {
|
||||
gSaveContext.naviTimer = 0;
|
||||
}
|
||||
});
|
||||
@ -1028,16 +1028,16 @@ typedef enum {
|
||||
} AltTrapType;
|
||||
|
||||
const char* altTrapTypeCvars[] = {
|
||||
"gAddTraps.Ice",
|
||||
"gAddTraps.Burn",
|
||||
"gAddTraps.Shock",
|
||||
"gAddTraps.Knock",
|
||||
"gAddTraps.Speed",
|
||||
"gAddTraps.Bomb",
|
||||
"gAddTraps.Void",
|
||||
"gAddTraps.Ammo",
|
||||
"gAddTraps.Kill",
|
||||
"gAddTraps.Tele"
|
||||
CVAR_ENHANCEMENT("ExtraTraps.Ice"),
|
||||
CVAR_ENHANCEMENT("ExtraTraps.Burn"),
|
||||
CVAR_ENHANCEMENT("ExtraTraps.Shock"),
|
||||
CVAR_ENHANCEMENT("ExtraTraps.Knockback"),
|
||||
CVAR_ENHANCEMENT("ExtraTraps.Speed"),
|
||||
CVAR_ENHANCEMENT("ExtraTraps.Bomb"),
|
||||
CVAR_ENHANCEMENT("ExtraTraps.Void"),
|
||||
CVAR_ENHANCEMENT("ExtraTraps.Ammo"),
|
||||
CVAR_ENHANCEMENT("ExtraTraps.Kill"),
|
||||
CVAR_ENHANCEMENT("ExtraTraps.Teleport")
|
||||
};
|
||||
|
||||
std::vector<AltTrapType> getEnabledAddTraps () {
|
||||
@ -1059,7 +1059,7 @@ void RegisterAltTrapTypes() {
|
||||
static int eventTimer = -1;
|
||||
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnItemReceive>([](GetItemEntry itemEntry) {
|
||||
if (!CVarGetInteger("gAddTraps.enabled", 0) || itemEntry.modIndex != MOD_RANDOMIZER || itemEntry.getItemId != RG_ICE_TRAP) {
|
||||
if (!CVarGetInteger(CVAR_ENHANCEMENT("ExtraTraps.Enabled"), 0) || itemEntry.modIndex != MOD_RANDOMIZER || itemEntry.getItemId != RG_ICE_TRAP) {
|
||||
return;
|
||||
}
|
||||
roll = RandomElement(getEnabledAddTraps());
|
||||
@ -1257,7 +1257,7 @@ void UpdateHurtContainerModeState(bool newState) {
|
||||
|
||||
void RegisterHurtContainerModeHandler() {
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnLoadGame>([](int32_t fileNum) {
|
||||
UpdateHurtContainerModeState(CVarGetInteger("gHurtContainer", 0));
|
||||
UpdateHurtContainerModeState(CVarGetInteger(CVAR_ENHANCEMENT("HurtContainer"), 0));
|
||||
});
|
||||
}
|
||||
|
||||
@ -1276,7 +1276,7 @@ void RegisterRandomizedEnemySizes() {
|
||||
actor->id == ACTOR_BOSS_FD2 || actor->id == ACTOR_EN_DH;
|
||||
|
||||
// Only apply to enemies and bosses.
|
||||
if (!CVarGetInteger("gRandomizedEnemySizes", 0) || (actor->category != ACTORCAT_ENEMY && actor->category != ACTORCAT_BOSS) || excludedEnemy) {
|
||||
if (!CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemySizes"), 0) || (actor->category != ACTORCAT_ENEMY && actor->category != ACTORCAT_BOSS) || excludedEnemy) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1299,7 +1299,7 @@ void RegisterRandomizedEnemySizes() {
|
||||
|
||||
Actor_SetScale(actor, actor->scale.z * randomScale);
|
||||
|
||||
if (CVarGetInteger("gEnemySizeScalesHealth", 0) && (actor->category == ACTORCAT_ENEMY)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("EnemySizeScalesHealth"), 0) && (actor->category == ACTORCAT_ENEMY)) {
|
||||
// Scale the health based on a smaller factor than randomScale
|
||||
float healthScalingFactor = 0.8f; // Adjust this factor as needed
|
||||
float scaledHealth = actor->colChkInfo.health * (randomScale * healthScalingFactor);
|
||||
@ -1316,7 +1316,7 @@ void RegisterOpenAllHours() {
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnActorInit>([](void* refActor) {
|
||||
Actor* actor = static_cast<Actor*>(refActor);
|
||||
|
||||
if (CVarGetInteger("gEnhancements.OpenAllHours", 0) && (actor->id == ACTOR_EN_DOOR)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("OpenAllHours"), 0) && (actor->id == ACTOR_EN_DOOR)) {
|
||||
switch (actor->params) {
|
||||
case 4753: // Night Market Bazaar
|
||||
case 1678: // Night Potion Shop
|
||||
@ -1343,7 +1343,7 @@ void RegisterOpenAllHours() {
|
||||
void PatchToTMedallions() {
|
||||
// TODO: Refactor the DemoEffect_UpdateJewelAdult and DemoEffect_UpdateJewelChild from z_demo_effect
|
||||
// effects to take effect in there
|
||||
if (CVarGetInteger("gToTMedallionsColors", 0)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("ToTMedallionsColors"), 0)) {
|
||||
ResourceMgr_PatchGfxByName(tokinoma_room_0DL_007A70, "ToTMedallions_StartGrayscale", 7, gsSPGrayscale(true));
|
||||
ResourceMgr_PatchGfxByName(tokinoma_room_0DL_007FD0, "ToTMedallions_2_StartGrayscale", 7, gsSPGrayscale(true));
|
||||
|
||||
@ -1409,13 +1409,13 @@ void PatchToTMedallions() {
|
||||
|
||||
void RegisterToTMedallions() {
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnItemReceive>([](GetItemEntry _unused) {
|
||||
if (!CVarGetInteger("gToTMedallionsColors", 0) || !gPlayState || gPlayState->sceneNum != SCENE_TEMPLE_OF_TIME) {
|
||||
if (!CVarGetInteger(CVAR_ENHANCEMENT("ToTMedallionsColors"), 0) || !gPlayState || gPlayState->sceneNum != SCENE_TEMPLE_OF_TIME) {
|
||||
return;
|
||||
}
|
||||
PatchToTMedallions();
|
||||
});
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnSceneInit>([](int16_t sceneNum) {
|
||||
if (!CVarGetInteger("gToTMedallionsColors", 0) || sceneNum != SCENE_TEMPLE_OF_TIME) {
|
||||
if (!CVarGetInteger(CVAR_ENHANCEMENT("ToTMedallionsColors"), 0) || sceneNum != SCENE_TEMPLE_OF_TIME) {
|
||||
return;
|
||||
}
|
||||
PatchToTMedallions();
|
||||
@ -1426,7 +1426,7 @@ void RegisterToTMedallions() {
|
||||
void RegisterFloorSwitchesHook() {
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnActorInit>([](void* refActor) {
|
||||
Actor* actor = static_cast<Actor*>(refActor);
|
||||
if (actor->id != ACTOR_OBJ_SWITCH || !CVarGetInteger("gEnhancements.FixFloorSwitches", 0)) {
|
||||
if (actor->id != ACTOR_OBJ_SWITCH || !CVarGetInteger(CVAR_ENHANCEMENT("FixFloorSwitches"), 0)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1442,7 +1442,7 @@ void RegisterFloorSwitchesHook() {
|
||||
void RegisterPauseMenuHooks() {
|
||||
static bool pauseWarpHooksRegistered = false;
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnGameFrameUpdate>([&]() {
|
||||
if (!GameInteractor::IsSaveLoaded() || !CVarGetInteger("gPauseWarp", 0)) {
|
||||
if (!GameInteractor::IsSaveLoaded() || !CVarGetInteger(CVAR_ENHANCEMENT("PauseWarp"), 0)) {
|
||||
pauseWarpHooksRegistered = false;
|
||||
return;
|
||||
}
|
||||
@ -1695,7 +1695,7 @@ extern "C" u8 Randomizer_GetSettingValue(RandomizerSettingKey randoSettingKey);
|
||||
|
||||
void PatchCompasses() {
|
||||
s8 compassesCanBeOutsideDungeon = IS_RANDO && DUNGEON_ITEMS_CAN_BE_OUTSIDE_DUNGEON(RSK_SHUFFLE_MAPANDCOMPASS);
|
||||
s8 isColoredCompassesEnabled = compassesCanBeOutsideDungeon && CVarGetInteger("gRandoEnhancement.MatchCompassColors", 1);
|
||||
s8 isColoredCompassesEnabled = compassesCanBeOutsideDungeon && CVarGetInteger(CVAR_RANDOMIZER_ENHANCEMENT("MatchCompassColors"), 1);
|
||||
if (isColoredCompassesEnabled) {
|
||||
ResourceMgr_PatchGfxByName(gGiCompassDL, "Compass_PrimColor", 5, gsDPNoOp());
|
||||
ResourceMgr_PatchGfxByName(gGiCompassDL, "Compass_EnvColor", 6, gsDPNoOp());
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include "soh/frame_interpolation.h"
|
||||
#include "soh/Enhancements/custom-message/CustomMessageInterfaceAddon.h"
|
||||
#include "soh/Enhancements/game-interactor/GameInteractor.h"
|
||||
#include "soh/OTRGlobals.h"
|
||||
|
||||
extern "C" {
|
||||
#include "z64.h"
|
||||
@ -70,11 +71,11 @@ void DrawNameTag(PlayState* play, const NameTag* nameTag) {
|
||||
Color_RGBA8 textboxColor = { 0, 0, 0, 80};
|
||||
Color_RGBA8 textColor = { 255, 255, 255, 255 };
|
||||
|
||||
if (CVarGetInteger("gCosmetics.Hud_NameTagActorBackground.Changed", 0)) {
|
||||
textboxColor = CVarGetColor("gCosmetics.Hud_NameTagActorBackground.Value", textboxColor);
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.NameTagActorBackground.Changed"), 0)) {
|
||||
textboxColor = CVarGetColor(CVAR_COSMETIC("HUD.NameTagActorBackground.Value"), textboxColor);
|
||||
}
|
||||
if (CVarGetInteger("gCosmetics.Hud_NameTagActorText.Changed", 0)) {
|
||||
textColor = CVarGetColor("gCosmetics.Hud_NameTagActorText.Value", textColor);
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.NameTagActorText.Changed"), 0)) {
|
||||
textColor = CVarGetColor(CVAR_COSMETIC("HUD.NameTagActorText.Value"), textColor);
|
||||
}
|
||||
|
||||
FrameInterpolation_RecordOpenChild(nameTag->actor, 10);
|
||||
@ -90,7 +91,7 @@ void DrawNameTag(PlayState* play, const NameTag* nameTag) {
|
||||
// Set position, billboard effect, scale (with mirror mode), then center nametag
|
||||
Matrix_Translate(nameTag->actor->world.pos.x, posY, nameTag->actor->world.pos.z, MTXMODE_NEW);
|
||||
Matrix_ReplaceRotation(&play->billboardMtxF);
|
||||
Matrix_Scale(scale * (CVarGetInteger("gMirroredWorld", 0) ? -1 : 1), -scale, 1.0f, MTXMODE_APPLY);
|
||||
Matrix_Scale(scale * (CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0) ? -1 : 1), -scale, 1.0f, MTXMODE_APPLY);
|
||||
Matrix_Translate(-(float)nameTag->width / 2, -nameTag->height, 0, MTXMODE_APPLY);
|
||||
Matrix_ToMtx(nameTag->mtx, (char*)__FILE__, __LINE__);
|
||||
|
||||
|
@ -85,7 +85,8 @@ void PauseWarp_HandleSelection() {
|
||||
if (gSaveContext.inventory.items[SLOT_OCARINA] != ITEM_NONE) {
|
||||
int aButtonPressed = CHECK_BTN_ALL(gPlayState->state.input->press.button, BTN_A);
|
||||
int song = gPlayState->pauseCtx.cursorPoint[PAUSE_QUEST];
|
||||
if (aButtonPressed && CHECK_QUEST_ITEM(song) && song >= QUEST_SONG_MINUET && song <= QUEST_SONG_PRELUDE) {
|
||||
if (aButtonPressed && CHECK_QUEST_ITEM(song) && song >= QUEST_SONG_MINUET && song <= QUEST_SONG_PRELUDE &&
|
||||
gPlayState->pauseCtx.pageIndex == PAUSE_QUEST && gPlayState->pauseCtx.state == 6) {
|
||||
ActivateWarp(&gPlayState->pauseCtx, song);
|
||||
}
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ void applyPreset(std::vector<PresetEntry> entries) {
|
||||
}
|
||||
|
||||
void DrawPresetSelector(PresetType presetTypeId) {
|
||||
const std::string presetTypeCvar = "gPreset" + std::to_string(presetTypeId);
|
||||
const std::string presetTypeCvar = CVAR_GENERAL("SelectedPresets.") + std::to_string(presetTypeId);
|
||||
const PresetTypeDefinition presetTypeDef = presetTypes.at(presetTypeId);
|
||||
const uint16_t selectedPresetId = CVarGetInteger(presetTypeCvar.c_str(), 0);
|
||||
const PresetDefinition selectedPresetDef = presetTypeDef.presets.at(selectedPresetId);
|
||||
@ -70,7 +70,7 @@ void DrawPresetSelector(PresetType presetTypeId) {
|
||||
if (selectedPresetId != 0) {
|
||||
applyPreset(selectedPresetDef.entries);
|
||||
}
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
}
|
||||
ImGui::PopStyleVar(1);
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -8,7 +8,8 @@
|
||||
#include "random.hpp"
|
||||
#include "spoiler_log.hpp"
|
||||
#include "soh/Enhancements/randomizer/randomizerTypes.h"
|
||||
#include <variables.h>
|
||||
#include "variables.h"
|
||||
#include "soh/OTRGlobals.h"
|
||||
#include "../option.h"
|
||||
|
||||
namespace Playthrough {
|
||||
@ -44,7 +45,7 @@ int Playthrough_Init(uint32_t seed, std::set<RandomizerCheck> excludedLocations,
|
||||
}
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gRandomizerDontGenerateSpoiler", 0)) {
|
||||
if (CVarGetInteger(CVAR_RANDOMIZER_SETTING("DontGenerateSpoiler"), 0)) {
|
||||
settingsStr += (char*)gBuildVersion;
|
||||
}
|
||||
|
||||
|
@ -8,12 +8,13 @@
|
||||
#include <libultraship/bridge.h>
|
||||
#include <Context.h>
|
||||
#include <libultraship/libultra/types.h>
|
||||
#include "soh/OTRGlobals.h"
|
||||
|
||||
void RandoMain::GenerateRando(std::set<RandomizerCheck> excludedLocations, std::set<RandomizerTrick> enabledTricks,
|
||||
std::string seedString) {
|
||||
|
||||
// std::string settingsFileName = "./randomizer/latest_settings.json";
|
||||
// CVarSetString("gLoadedPreset", settingsFileName.c_str());
|
||||
// CVarSetString(CVAR_RANDOMIZER_SETTING("LoadedPreset"), settingsFileName.c_str());
|
||||
|
||||
Rando::Context::GetInstance()->SetSeedGenerated(GenerateRandomizer(excludedLocations, enabledTricks, seedString));
|
||||
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include <variables.h>
|
||||
|
||||
#include <Context.h>
|
||||
#include <soh/OTRGlobals.h>
|
||||
|
||||
#include "consolevariablebridge.h"
|
||||
|
||||
@ -638,8 +639,8 @@ const char* SpoilerLog_Write() {
|
||||
WriteShuffledEntrances();
|
||||
WriteAllLocations();
|
||||
|
||||
if (!std::filesystem::exists(LUS::Context::GetPathRelativeToAppDirectory("Randomizer"))) {
|
||||
std::filesystem::create_directory(LUS::Context::GetPathRelativeToAppDirectory("Randomizer"));
|
||||
if (!std::filesystem::exists(Ship::Context::GetPathRelativeToAppDirectory("Randomizer"))) {
|
||||
std::filesystem::create_directory(Ship::Context::GetPathRelativeToAppDirectory("Randomizer"));
|
||||
}
|
||||
|
||||
std::string jsonString = jsonData.dump(4);
|
||||
@ -654,12 +655,12 @@ const char* SpoilerLog_Write() {
|
||||
fileNameStream << std::to_string(ctx->hashIconIndexes[i]);
|
||||
}
|
||||
std::string fileName = fileNameStream.str();
|
||||
std::ofstream jsonFile(LUS::Context::GetPathRelativeToAppDirectory(
|
||||
std::ofstream jsonFile(Ship::Context::GetPathRelativeToAppDirectory(
|
||||
(std::string("Randomizer/") + fileName + std::string(".json")).c_str()));
|
||||
jsonFile << std::setw(4) << jsonString << std::endl;
|
||||
jsonFile.close();
|
||||
|
||||
CVarSetString("gSpoilerLog", (std::string("./Randomizer/") + fileName + std::string(".json")).c_str());
|
||||
CVarSetString(CVAR_GENERAL("SpoilerLog"), (std::string("./Randomizer/") + fileName + std::string(".json")).c_str());
|
||||
|
||||
// Note: probably shouldn't return this without making sure this string is stored somewhere, but
|
||||
// this return value is currently only used in playthrough.cpp as a true/false. Even if the pointer
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -29,7 +29,7 @@ extern "C" void Randomizer_DrawSmallKey(PlayState* play, GetItemEntry* getItemEn
|
||||
s8 keysCanBeOutsideDungeon = getItemEntry->getItemId == RG_GERUDO_FORTRESS_SMALL_KEY ?
|
||||
Randomizer_GetSettingValue(RSK_GERUDO_KEYS) != RO_GERUDO_KEYS_VANILLA :
|
||||
DUNGEON_ITEMS_CAN_BE_OUTSIDE_DUNGEON(RSK_KEYSANITY);
|
||||
s8 isColoredKeysEnabled = keysCanBeOutsideDungeon && CVarGetInteger("gRandoMatchKeyColors", 1);
|
||||
s8 isColoredKeysEnabled = keysCanBeOutsideDungeon && CVarGetInteger(CVAR_RANDOMIZER_ENHANCEMENT("MatchKeyColors"), 1);
|
||||
s16 color_slot = getItemEntry->getItemId - RG_FOREST_TEMPLE_SMALL_KEY;
|
||||
s16 colors[9][3] = {
|
||||
{ 4, 195, 46 }, // Forest Temple
|
||||
@ -111,7 +111,7 @@ extern "C" void Randomizer_DrawBossKey(PlayState* play, GetItemEntry* getItemEnt
|
||||
s8 keysCanBeOutsideDungeon = getItemEntry->getItemId == RG_GANONS_CASTLE_BOSS_KEY ?
|
||||
DUNGEON_ITEMS_CAN_BE_OUTSIDE_DUNGEON(RSK_GANONS_BOSS_KEY) :
|
||||
DUNGEON_ITEMS_CAN_BE_OUTSIDE_DUNGEON(RSK_BOSS_KEYSANITY);
|
||||
s8 isColoredKeysEnabled = keysCanBeOutsideDungeon && CVarGetInteger("gRandoMatchKeyColors", 1);
|
||||
s8 isColoredKeysEnabled = keysCanBeOutsideDungeon && CVarGetInteger(CVAR_RANDOMIZER_ENHANCEMENT("MatchKeyColors"), 1);
|
||||
s16 color_slot;
|
||||
color_slot = getItemEntry->getItemId - RG_FOREST_TEMPLE_BOSS_KEY;
|
||||
s16 colors[6][3] = {
|
||||
@ -377,31 +377,31 @@ extern "C" void Randomizer_DrawBossSoul(PlayState* play, GetItemEntry* getItemEn
|
||||
|
||||
extern "C" void Randomizer_DrawOcarinaButton(PlayState* play, GetItemEntry* getItemEntry) {
|
||||
Color_RGB8 aButtonColor = { 80, 150, 255 };
|
||||
if (CVarGetInteger("gCosmetics.Hud_AButton.Changed", 0)) {
|
||||
aButtonColor = CVarGetColor24("gCosmetics.Hud_AButton.Value", aButtonColor);
|
||||
} else if (CVarGetInteger("gCosmetics.DefaultColorScheme", COLORSCHEME_N64) == COLORSCHEME_GAMECUBE) {
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.AButton.Changed"), 0)) {
|
||||
aButtonColor = CVarGetColor24(CVAR_COSMETIC("HUD.AButton.Value"), aButtonColor);
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("DefaultColorScheme"), COLORSCHEME_N64) == COLORSCHEME_GAMECUBE) {
|
||||
aButtonColor = { 80, 255, 150 };
|
||||
}
|
||||
|
||||
Color_RGB8 cButtonsColor = { 255, 255, 50 };
|
||||
if (CVarGetInteger("gCosmetics.Hud_CButtons.Changed", 0)) {
|
||||
cButtonsColor = CVarGetColor24("gCosmetics.Hud_CButtons.Value", cButtonsColor);
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.CButtons.Changed"), 0)) {
|
||||
cButtonsColor = CVarGetColor24(CVAR_COSMETIC("HUD.CButtons.Value"), cButtonsColor);
|
||||
}
|
||||
Color_RGB8 cUpButtonColor = cButtonsColor;
|
||||
if (CVarGetInteger("gCosmetics.Hud_CUpButton.Changed", 0)) {
|
||||
cUpButtonColor = CVarGetColor24("gCosmetics.Hud_CUpButton.Value", cUpButtonColor);
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.CUpButton.Changed"), 0)) {
|
||||
cUpButtonColor = CVarGetColor24(CVAR_COSMETIC("HUD.CUpButton.Value"), cUpButtonColor);
|
||||
}
|
||||
Color_RGB8 cDownButtonColor = cButtonsColor;
|
||||
if (CVarGetInteger("gCosmetics.Hud_CDownButton.Changed", 0)) {
|
||||
cDownButtonColor = CVarGetColor24("gCosmetics.Hud_CDownButton.Value", cDownButtonColor);
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.CDownButton.Changed"), 0)) {
|
||||
cDownButtonColor = CVarGetColor24(CVAR_COSMETIC("HUD.CDownButton.Value"), cDownButtonColor);
|
||||
}
|
||||
Color_RGB8 cLeftButtonColor = cButtonsColor;
|
||||
if (CVarGetInteger("gCosmetics.Hud_CLeftButton.Changed", 0)) {
|
||||
cLeftButtonColor = CVarGetColor24("gCosmetics.Hud_CLeftButton.Value", cLeftButtonColor);
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.CLeftButton.Changed"), 0)) {
|
||||
cLeftButtonColor = CVarGetColor24(CVAR_COSMETIC("HUD.CLeftButton.Value"), cLeftButtonColor);
|
||||
}
|
||||
Color_RGB8 cRightButtonColor = cButtonsColor;
|
||||
if (CVarGetInteger("gCosmetics.Hud_CRightButton.Changed", 0)) {
|
||||
cRightButtonColor = CVarGetColor24("gCosmetics.Hud_CRightButton.Value", cRightButtonColor);
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.CRightButton.Changed"), 0)) {
|
||||
cRightButtonColor = CVarGetColor24(CVAR_COSMETIC("HUD.CRightButton.Value"), cRightButtonColor);
|
||||
}
|
||||
|
||||
s16 slot = getItemEntry->drawItemId - RG_OCARINA_A_BUTTON;
|
||||
|
@ -167,9 +167,9 @@ namespace Rando {
|
||||
switch (optionsSource) {
|
||||
// Used in check tracker
|
||||
case FSO_SOURCE_CVARS:
|
||||
options.mode = CVarGetInteger("gRandomizeFishsanity", RO_FISHSANITY_OFF);
|
||||
options.numFish = CVarGetInteger("gRandomizeFishsanityPondCount", 0);
|
||||
options.ageSplit = CVarGetInteger("gRandomizeFishsanityAgeSplit", 0) == 1;
|
||||
options.mode = CVarGetInteger(CVAR_RANDOMIZER_SETTING("Fishsanity"), RO_FISHSANITY_OFF);
|
||||
options.numFish = CVarGetInteger(CVAR_RANDOMIZER_SETTING("FishsanityPondCount"), 0);
|
||||
options.ageSplit = CVarGetInteger(CVAR_RANDOMIZER_SETTING("FishsanityAgeSplit"), 0) == 1;
|
||||
break;
|
||||
case FSO_SOURCE_RANDO:
|
||||
default:
|
||||
|
@ -193,7 +193,7 @@ void RandomizerOnFlagSetHandler(int16_t flagType, int16_t flag) {
|
||||
auto loc = Rando::Context::GetInstance()->GetItemLocation(rc);
|
||||
if (loc == nullptr || loc->HasObtained()) return;
|
||||
|
||||
SPDLOG_INFO("Queuing RC: {}", rc);
|
||||
SPDLOG_INFO("Queuing RC: {}", static_cast<uint32_t>(rc));
|
||||
randomizerQueuedChecks.push(rc);
|
||||
}
|
||||
|
||||
@ -211,7 +211,7 @@ void RandomizerOnSceneFlagSetHandler(int16_t sceneNum, int16_t flagType, int16_t
|
||||
auto loc = Rando::Context::GetInstance()->GetItemLocation(rc);
|
||||
if (loc == nullptr || loc->HasObtained()) return;
|
||||
|
||||
SPDLOG_INFO("Queuing RC: {}", rc);
|
||||
SPDLOG_INFO("Queuing RC: {}", static_cast<uint32_t>(rc));
|
||||
randomizerQueuedChecks.push(rc);
|
||||
}
|
||||
|
||||
@ -235,11 +235,11 @@ void RandomizerOnPlayerUpdateForRCQueueHandler() {
|
||||
GetItemEntry getItemEntry = Rando::Context::GetInstance()->GetFinalGIEntry(rc, true, (GetItemID)Rando::StaticData::GetLocation(rc)->GetVanillaItem());
|
||||
|
||||
if (loc->HasObtained()) {
|
||||
SPDLOG_INFO("RC {} already obtained, skipping", rc);
|
||||
SPDLOG_INFO("RC {} already obtained, skipping", static_cast<uint32_t>(rc));
|
||||
} else {
|
||||
randomizerQueuedCheck = rc;
|
||||
randomizerQueuedItemEntry = getItemEntry;
|
||||
SPDLOG_INFO("Queueing Item mod {} item {} from RC {}", getItemEntry.modIndex, getItemEntry.itemId, rc);
|
||||
SPDLOG_INFO("Queueing Item mod {} item {} from RC {}", getItemEntry.modIndex, getItemEntry.itemId, static_cast<uint32_t>(rc));
|
||||
if (
|
||||
// Skipping ItemGet animation incompatible with checks that require closing a text box to finish
|
||||
rc != RC_HF_OCARINA_OF_TIME_ITEM &&
|
||||
@ -250,9 +250,9 @@ void RandomizerOnPlayerUpdateForRCQueueHandler() {
|
||||
// Always show ItemGet animation for ice traps
|
||||
!(getItemEntry.modIndex == MOD_RANDOMIZER && getItemEntry.getItemId == RG_ICE_TRAP) &&
|
||||
(
|
||||
CVarGetInteger("gTimeSavers.SkipGetItemAnimation", SGIA_DISABLED) == SGIA_ALL ||
|
||||
CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipGetItemAnimation"), SGIA_DISABLED) == SGIA_ALL ||
|
||||
(
|
||||
CVarGetInteger("gTimeSavers.SkipGetItemAnimation", SGIA_DISABLED) == SGIA_JUNK &&
|
||||
CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipGetItemAnimation"), SGIA_DISABLED) == SGIA_JUNK &&
|
||||
(
|
||||
getItemEntry.getItemCategory == ITEM_CATEGORY_JUNK ||
|
||||
getItemEntry.getItemCategory == ITEM_CATEGORY_SKULLTULA_TOKEN ||
|
||||
@ -276,7 +276,7 @@ void RandomizerOnPlayerUpdateForItemQueueHandler() {
|
||||
return;
|
||||
}
|
||||
|
||||
SPDLOG_INFO("Attempting to give Item mod {} item {} from RC {}", randomizerQueuedItemEntry.modIndex, randomizerQueuedItemEntry.itemId, randomizerQueuedCheck);
|
||||
SPDLOG_INFO("Attempting to give Item mod {} item {} from RC {}", randomizerQueuedItemEntry.modIndex, randomizerQueuedItemEntry.itemId, static_cast<uint32_t>(randomizerQueuedCheck));
|
||||
GiveItemEntryWithoutActor(gPlayState, randomizerQueuedItemEntry);
|
||||
if (player->stateFlags1 & PLAYER_STATE1_IN_WATER) {
|
||||
// Allow the player to receive the item while swimming
|
||||
@ -290,7 +290,7 @@ void RandomizerOnItemReceiveHandler(GetItemEntry receivedItemEntry) {
|
||||
|
||||
auto loc = Rando::Context::GetInstance()->GetItemLocation(randomizerQueuedCheck);
|
||||
if (randomizerQueuedItemEntry.modIndex == receivedItemEntry.modIndex && randomizerQueuedItemEntry.itemId == receivedItemEntry.itemId) {
|
||||
SPDLOG_INFO("Item received mod {} item {} from RC {}", receivedItemEntry.modIndex, receivedItemEntry.itemId, randomizerQueuedCheck);
|
||||
SPDLOG_INFO("Item received mod {} item {} from RC {}", receivedItemEntry.modIndex, receivedItemEntry.itemId, static_cast<uint32_t>(randomizerQueuedCheck));
|
||||
loc->MarkAsObtained();
|
||||
randomizerQueuedCheck = RC_UNKNOWN_CHECK;
|
||||
randomizerQueuedItemEntry = GET_ITEM_NONE;
|
||||
@ -311,7 +311,7 @@ void RandomizerOnItemReceiveHandler(GetItemEntry receivedItemEntry) {
|
||||
}
|
||||
}
|
||||
|
||||
if (loc->GetRandomizerCheck() == RC_SPIRIT_TEMPLE_SILVER_GAUNTLETS_CHEST && !CVarGetInteger("gTimeSavers.SkipCutscene.Story", IS_RANDO)) {
|
||||
if (loc->GetRandomizerCheck() == RC_SPIRIT_TEMPLE_SILVER_GAUNTLETS_CHEST && !CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Story"), IS_RANDO)) {
|
||||
static uint32_t updateHook;
|
||||
updateHook = GameInteractor::Instance->RegisterGameHook<GameInteractor::OnPlayerUpdate>([]() {
|
||||
Player* player = GET_PLAYER(gPlayState);
|
||||
@ -355,7 +355,7 @@ void EnExItem_WaitForObjectRandomized(EnExItem* enExItem, PlayState* play) {
|
||||
}
|
||||
|
||||
void EnItem00_DrawRandomizedItem(EnItem00* enItem00, PlayState* play) {
|
||||
f32 mtxScale = CVarGetFloat("gTimeSavers.SkipGetItemAnimationScale", 10.0f);
|
||||
f32 mtxScale = CVarGetFloat(CVAR_ENHANCEMENT("TimeSavers.SkipGetItemAnimationScale"), 10.0f);
|
||||
Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY);
|
||||
EnItem00_CustomItemsParticles(&enItem00->actor, play, enItem00->itemEntry);
|
||||
GetItemEntry_Draw(play, enItem00->itemEntry);
|
||||
@ -1205,7 +1205,7 @@ void ObjComb_RandomizerChooseItemDrop(ObjComb* objComb, PlayState* play) {
|
||||
} else if (Rand_ZeroOne() < 0.5f) {
|
||||
params = -1;
|
||||
}
|
||||
if (params >= 0 && !CVarGetInteger("gNoRandomDrops", 0)) {
|
||||
if (params >= 0 && !CVarGetInteger(CVAR_ENHANCEMENT("NoRandomDrops"), 0)) {
|
||||
Item_DropCollectible(play, &objComb->actor.world.pos, params);
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "option.h"
|
||||
#include "libultraship/bridge.h"
|
||||
#include <Context.h>
|
||||
#include <ImGui/imgui.h>
|
||||
#include <imgui.h>
|
||||
#include "soh/UIWidgets.hpp"
|
||||
|
||||
namespace Rando {
|
||||
@ -198,7 +198,7 @@ bool Option::RenderCheckbox() const {
|
||||
if (CustomCheckbox(name.c_str(), &val, disabled, disabledGraphic)) {
|
||||
CVarSetInteger(cvarName.c_str(), val);
|
||||
changed = true;
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
}
|
||||
if (!description.empty()) {
|
||||
UIWidgets::InsertHelpHoverText(description.c_str());
|
||||
@ -220,7 +220,7 @@ bool Option::RenderCombobox() const {
|
||||
selected--;
|
||||
CVarSetInteger(cvarName.c_str(), selected);
|
||||
changed = true;
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
}
|
||||
if (!description.empty()) {
|
||||
UIWidgets::InsertHelpHoverText(description.c_str());
|
||||
@ -233,7 +233,7 @@ bool Option::RenderCombobox() const {
|
||||
CVarSetInteger(cvarName.c_str(), static_cast<int>(i));
|
||||
changed = true;
|
||||
selected = i;
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -296,7 +296,7 @@ bool Option::RenderSlider() const {
|
||||
}
|
||||
if (changed) {
|
||||
CVarSetInteger(cvarName.c_str(), val);
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
}
|
||||
return changed;
|
||||
}
|
||||
|
@ -15,8 +15,9 @@
|
||||
#ifndef IMGUI_DEFINE_MATH_OPERATORS
|
||||
#define IMGUI_DEFINE_MATH_OPERATORS
|
||||
#endif
|
||||
#include <ImGui/imgui.h>
|
||||
#include <ImGui/imgui_internal.h>
|
||||
#include <imgui.h>
|
||||
#include <imgui_internal.h>
|
||||
#include "../custom-message/CustomMessageTypes.h"
|
||||
#include "../item-tables/ItemTableManager.h"
|
||||
#include "../presets.h"
|
||||
#include "../../../src/overlays/actors/ovl_En_GirlA/z_en_girla.h"
|
||||
@ -1680,7 +1681,7 @@ RandomizerCheck Randomizer::GetCheckFromRandomizerInf(RandomizerInf randomizerIn
|
||||
std::thread randoThread;
|
||||
|
||||
void GenerateRandomizerImgui(std::string seed = "") {
|
||||
CVarSetInteger("gRandoGenerating", 1);
|
||||
CVarSetInteger(CVAR_GENERAL("RandoGenerating"), 1);
|
||||
CVarSave();
|
||||
auto ctx = Rando::Context::GetInstance();
|
||||
if (!ctx->IsSpoilerLoaded()) {
|
||||
@ -1689,7 +1690,7 @@ void GenerateRandomizerImgui(std::string seed = "") {
|
||||
}
|
||||
// todo: this efficently when we build out cvar array support
|
||||
std::set<RandomizerCheck> excludedLocations;
|
||||
std::stringstream excludedLocationStringStream(CVarGetString("gRandomizeExcludedLocations", ""));
|
||||
std::stringstream excludedLocationStringStream(CVarGetString(CVAR_RANDOMIZER_SETTING("ExcludedLocations"), ""));
|
||||
std::string excludedLocationString;
|
||||
while (getline(excludedLocationStringStream, excludedLocationString, ',')) {
|
||||
excludedLocations.insert((RandomizerCheck)std::stoi(excludedLocationString));
|
||||
@ -1698,7 +1699,7 @@ void GenerateRandomizerImgui(std::string seed = "") {
|
||||
// todo: better way to sort out linking tricks rather than name
|
||||
|
||||
std::set<RandomizerTrick> enabledTricks;
|
||||
std::stringstream enabledTrickStringStream(CVarGetString("gRandomizeEnabledTricks", ""));
|
||||
std::stringstream enabledTrickStringStream(CVarGetString(CVAR_RANDOMIZER_SETTING("EnabledTricks"), ""));
|
||||
std::string enabledTrickString;
|
||||
while (getline(enabledTrickStringStream, enabledTrickString, ',')) {
|
||||
enabledTricks.insert((RandomizerTrick)std::stoi(enabledTrickString));
|
||||
@ -1718,7 +1719,7 @@ void GenerateRandomizerImgui(std::string seed = "") {
|
||||
|
||||
RandoMain::GenerateRando(excludedLocations, enabledTricks, seed);
|
||||
|
||||
CVarSetInteger("gRandoGenerating", 0);
|
||||
CVarSetInteger(CVAR_GENERAL("RandoGenerating"), 0);
|
||||
CVarSave();
|
||||
CVarLoad();
|
||||
|
||||
@ -1730,7 +1731,7 @@ bool GenerateRandomizer(std::string seed /*= ""*/) {
|
||||
generated = 0;
|
||||
randoThread.join();
|
||||
}
|
||||
if (CVarGetInteger("gRandoGenerating", 0) == 0) {
|
||||
if (CVarGetInteger(CVAR_GENERAL("RandoGenerating"), 0) == 0) {
|
||||
randoThread = std::thread(&GenerateRandomizerImgui, seed);
|
||||
return true;
|
||||
}
|
||||
@ -1750,18 +1751,18 @@ void RandomizerSettingsWindow::DrawElement() {
|
||||
return;
|
||||
}
|
||||
|
||||
bool disableEditingRandoSettings = CVarGetInteger("gRandoGenerating", 0) || CVarGetInteger("gOnFileSelectNameEntry", 0);
|
||||
bool disableEditingRandoSettings = CVarGetInteger(CVAR_GENERAL("RandoGenerating"), 0) || CVarGetInteger(CVAR_GENERAL("OnFileSelectNameEntry"), 0);
|
||||
if (disableEditingRandoSettings) {
|
||||
UIWidgets::DisableComponent(ImGui::GetStyle().Alpha * 0.5f);
|
||||
}
|
||||
|
||||
ImGui::BeginDisabled(CVarGetInteger("gDisableChangingSettings", 0));
|
||||
ImGui::BeginDisabled(CVarGetInteger(CVAR_SETTING("DisableChanges"), 0));
|
||||
DrawPresetSelector(PRESET_TYPE_RANDOMIZER);
|
||||
ImGui::EndDisabled();
|
||||
|
||||
UIWidgets::Spacer(0);
|
||||
UIWidgets::EnhancementCheckbox("Manual seed entry", "gRandoManualSeedEntry", false, "");
|
||||
if (CVarGetInteger("gRandoManualSeedEntry", 0)) {
|
||||
UIWidgets::EnhancementCheckbox("Manual seed entry", CVAR_RANDOMIZER_SETTING("ManualSeedEntry"), false, "");
|
||||
if (CVarGetInteger(CVAR_RANDOMIZER_SETTING("ManualSeedEntry"), 0)) {
|
||||
ImGui::Text("Seed");
|
||||
ImGui::InputText("##RandomizerSeed", seedString, MAX_SEED_STRING_SIZE, ImGuiInputTextFlags_CallbackCharFilter, UIWidgets::TextFilters::FilterAlphaNum);
|
||||
UIWidgets::Tooltip(
|
||||
@ -1780,27 +1781,27 @@ void RandomizerSettingsWindow::DrawElement() {
|
||||
}
|
||||
|
||||
UIWidgets::Spacer(0);
|
||||
ImGui::BeginDisabled(CVarGetInteger("gRandomizerDontGenerateSpoiler", 0) && gSaveContext.gameMode != GAMEMODE_FILE_SELECT);
|
||||
ImGui::BeginDisabled(CVarGetInteger(CVAR_RANDOMIZER_SETTING("DontGenerateSpoiler"), 0) && gSaveContext.gameMode != GAMEMODE_FILE_SELECT);
|
||||
if (ImGui::Button("Generate Randomizer")) {
|
||||
ctx->SetSpoilerLoaded(false);
|
||||
GenerateRandomizer(CVarGetInteger("gRandoManualSeedEntry", 0) ? seedString : "");
|
||||
GenerateRandomizer(CVarGetInteger(CVAR_RANDOMIZER_SETTING("ManualSeedEntry"), 0) ? seedString : "");
|
||||
}
|
||||
UIWidgets::Tooltip("You can also press L on the Quest Select screen to generate a new seed");
|
||||
ImGui::EndDisabled();
|
||||
|
||||
UIWidgets::Spacer(0);
|
||||
if (!CVarGetInteger("gRandomizerDontGenerateSpoiler", 0)) {
|
||||
std::string spoilerfilepath = CVarGetString("gSpoilerLog", "");
|
||||
if (!CVarGetInteger(CVAR_RANDOMIZER_SETTING("DontGenerateSpoiler"), 0)) {
|
||||
std::string spoilerfilepath = CVarGetString(CVAR_GENERAL("SpoilerLog"), "");
|
||||
ImGui::Text("Spoiler File: %s", spoilerfilepath.c_str());
|
||||
}
|
||||
|
||||
// RANDOTODO settings presets
|
||||
// std::string presetfilepath = CVarGetString("gLoadedPreset", "");
|
||||
// std::string presetfilepath = CVarGetString(CVAR_RANDOMIZER_SETTING("LoadedPreset"), "");
|
||||
// ImGui::Text("Settings File: %s", presetfilepath.c_str());
|
||||
|
||||
UIWidgets::PaddedSeparator();
|
||||
|
||||
ImGui::BeginDisabled(CVarGetInteger("gDisableChangingSettings", 0));
|
||||
ImGui::BeginDisabled(CVarGetInteger(CVAR_SETTING("DisableChanges"), 0));
|
||||
|
||||
ImGuiWindow* window = ImGui::GetCurrentWindow();
|
||||
static ImVec2 cellPadding(8.0f, 8.0f);
|
||||
@ -1815,10 +1816,10 @@ void RandomizerSettingsWindow::DrawElement() {
|
||||
ImGui::EndTabItem();
|
||||
}
|
||||
|
||||
ImGui::BeginDisabled(CVarGetInteger("gRandomizeLogicRules", RO_LOGIC_GLITCHLESS) == RO_LOGIC_VANILLA);
|
||||
ImGui::BeginDisabled(CVarGetInteger(CVAR_RANDOMIZER_SETTING("LogicRules"), RO_LOGIC_GLITCHLESS) == RO_LOGIC_VANILLA);
|
||||
if (ImGui::BeginTabItem("Items")) {
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_CellPadding, cellPadding);
|
||||
ImGui::BeginDisabled(CVarGetInteger("gRandomizeLogicRules", RO_LOGIC_GLITCHLESS) == RO_LOGIC_VANILLA);
|
||||
ImGui::BeginDisabled(CVarGetInteger(CVAR_RANDOMIZER_SETTING("LogicRules"), RO_LOGIC_GLITCHLESS) == RO_LOGIC_VANILLA);
|
||||
if (mSettings->GetOptionGroup(RSG_ITEMS_IMGUI_TABLE).RenderImGui()) {
|
||||
mNeedsUpdate = true;
|
||||
}
|
||||
@ -1828,7 +1829,7 @@ void RandomizerSettingsWindow::DrawElement() {
|
||||
}
|
||||
ImGui::EndDisabled();
|
||||
|
||||
ImGui::BeginDisabled(CVarGetInteger("gRandomizeLogicRules", RO_LOGIC_GLITCHLESS) == RO_LOGIC_VANILLA);
|
||||
ImGui::BeginDisabled(CVarGetInteger(CVAR_RANDOMIZER_SETTING("LogicRules"), RO_LOGIC_GLITCHLESS) == RO_LOGIC_VANILLA);
|
||||
if (ImGui::BeginTabItem("Gameplay")) {
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_CellPadding, cellPadding);
|
||||
if (mSettings->GetOptionGroup(RSG_GAMEPLAY_IMGUI_TABLE).RenderImGui()) {
|
||||
@ -1839,7 +1840,7 @@ void RandomizerSettingsWindow::DrawElement() {
|
||||
}
|
||||
ImGui::EndDisabled();
|
||||
|
||||
ImGui::BeginDisabled(CVarGetInteger("gRandomizeLogicRules", RO_LOGIC_GLITCHLESS) == RO_LOGIC_VANILLA);
|
||||
ImGui::BeginDisabled(CVarGetInteger(CVAR_RANDOMIZER_SETTING("LogicRules"), RO_LOGIC_GLITCHLESS) == RO_LOGIC_VANILLA);
|
||||
static bool locationsTabOpen = false;
|
||||
if (ImGui::BeginTabItem("Locations")) {
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_CellPadding, cellPadding);
|
||||
@ -1847,7 +1848,7 @@ void RandomizerSettingsWindow::DrawElement() {
|
||||
locationsTabOpen = true;
|
||||
RandomizerCheckObjects::UpdateImGuiVisibility();
|
||||
// todo: this efficently when we build out cvar array support
|
||||
std::stringstream excludedLocationStringStream(CVarGetString("gRandomizeExcludedLocations", ""));
|
||||
std::stringstream excludedLocationStringStream(CVarGetString(CVAR_RANDOMIZER_SETTING("ExcludedLocations"), ""));
|
||||
std::string excludedLocationString;
|
||||
excludedLocations.clear();
|
||||
while (getline(excludedLocationStringStream, excludedLocationString, ',')) {
|
||||
@ -1897,8 +1898,8 @@ void RandomizerSettingsWindow::DrawElement() {
|
||||
excludedLocationString += std::to_string(excludedLocationIt);
|
||||
excludedLocationString += ",";
|
||||
}
|
||||
CVarSetString("gRandomizeExcludedLocations", excludedLocationString.c_str());
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
CVarSetString(CVAR_RANDOMIZER_SETTING("ExcludedLocations"), excludedLocationString.c_str());
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
}
|
||||
ImGui::SameLine();
|
||||
ImGui::Text("%s", Rando::StaticData::GetLocation(location)->GetShortName().c_str());
|
||||
@ -1939,11 +1940,11 @@ void RandomizerSettingsWindow::DrawElement() {
|
||||
excludedLocationString += ",";
|
||||
}
|
||||
if (excludedLocationString == "") {
|
||||
CVarClear("gRandomizeExcludedLocations");
|
||||
CVarClear(CVAR_RANDOMIZER_SETTING("ExcludedLocations"));
|
||||
} else {
|
||||
CVarSetString("gRandomizeExcludedLocations", excludedLocationString.c_str());
|
||||
CVarSetString(CVAR_RANDOMIZER_SETTING("ExcludedLocations"), excludedLocationString.c_str());
|
||||
}
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
}
|
||||
ImGui::SameLine();
|
||||
ImGui::Text("%s", Rando::StaticData::GetLocation(location)->GetShortName().c_str());
|
||||
@ -1970,13 +1971,13 @@ void RandomizerSettingsWindow::DrawElement() {
|
||||
tricksTabOpen = true;
|
||||
//RandomizerTricks::UpdateImGuiVisibility();
|
||||
// todo: this efficently when we build out cvar array support
|
||||
std::stringstream enabledTrickStringStream(CVarGetString("gRandomizeEnabledTricks", ""));
|
||||
std::stringstream enabledTrickStringStream(CVarGetString(CVAR_RANDOMIZER_SETTING("EnabledTricks"), ""));
|
||||
std::string enabledTrickString;
|
||||
enabledTricks.clear();
|
||||
while (getline(enabledTrickStringStream, enabledTrickString, ',')) {
|
||||
enabledTricks.insert((RandomizerTrick)std::stoi(enabledTrickString));
|
||||
}
|
||||
std::stringstream enabledGlitchStringStream(CVarGetString("gRandomizeEnabledGlitches", ""));
|
||||
std::stringstream enabledGlitchStringStream(CVarGetString(CVAR_RANDOMIZER_SETTING("EnabledGlitches"), ""));
|
||||
std::string enabledGlitchString;
|
||||
enabledGlitches.clear();
|
||||
while (getline(enabledGlitchStringStream, enabledGlitchString, ',')) {
|
||||
@ -1994,13 +1995,13 @@ void RandomizerSettingsWindow::DrawElement() {
|
||||
mNeedsUpdate = true;
|
||||
}
|
||||
// RANDOTODO: Implement Disalbling of Options for Vanilla Logic
|
||||
if (CVarGetInteger("gRandomizeLogicRules", RO_LOGIC_GLITCHLESS) == RO_LOGIC_GLITCHLESS) {
|
||||
if (CVarGetInteger(CVAR_RANDOMIZER_SETTING("LogicRules"), RO_LOGIC_GLITCHLESS) == RO_LOGIC_GLITCHLESS) {
|
||||
ImGui::SameLine();
|
||||
if (mSettings->GetOption(RSK_ALL_LOCATIONS_REACHABLE).RenderImGui()) {
|
||||
mNeedsUpdate = true;
|
||||
}
|
||||
}
|
||||
if (CVarGetInteger("gRandomizeLogicRules", RO_LOGIC_GLITCHLESS) == RO_LOGIC_VANILLA) {
|
||||
if (CVarGetInteger(CVAR_RANDOMIZER_SETTING("LogicRules"), RO_LOGIC_GLITCHLESS) == RO_LOGIC_VANILLA) {
|
||||
ImGui::SameLine();
|
||||
ImGui::TextColored(ImVec4(1.0f, 0.0f, 0.0f, 1.0f), "Heads up! This will disable all rando settings except for entrance shuffle and starter items");
|
||||
}
|
||||
@ -2015,7 +2016,7 @@ void RandomizerSettingsWindow::DrawElement() {
|
||||
ImGui::EndTable();
|
||||
}
|
||||
|
||||
ImGui::BeginDisabled(CVarGetInteger("gRandomizeLogicRules", RO_LOGIC_GLITCHLESS) == RO_LOGIC_VANILLA);
|
||||
ImGui::BeginDisabled(CVarGetInteger(CVAR_RANDOMIZER_SETTING("LogicRules"), RO_LOGIC_GLITCHLESS) == RO_LOGIC_VANILLA);
|
||||
|
||||
// Tricks
|
||||
static std::unordered_map<RandomizerArea, bool> areaTreeDisabled {
|
||||
@ -2098,7 +2099,7 @@ void RandomizerSettingsWindow::DrawElement() {
|
||||
};
|
||||
static ImGuiTextFilter trickSearch;
|
||||
trickSearch.Draw("Filter (inc,-exc)", 490.0f);
|
||||
if (CVarGetInteger("gRandomizeLogicRules", RO_LOGIC_GLITCHLESS) != RO_LOGIC_NO_LOGIC) {
|
||||
if (CVarGetInteger(CVAR_RANDOMIZER_SETTING("LogicRules"), RO_LOGIC_GLITCHLESS) != RO_LOGIC_NO_LOGIC) {
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button("Disable All")) {
|
||||
for (int i = 0; i < RT_MAX; i++) {
|
||||
@ -2112,8 +2113,8 @@ void RandomizerSettingsWindow::DrawElement() {
|
||||
enabledTrickString += std::to_string(enabledTrickIt);
|
||||
enabledTrickString += ",";
|
||||
}
|
||||
CVarClear("gRandomizeEnabledTricks");
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
CVarClear(CVAR_RANDOMIZER_SETTING("EnabledTricks"));
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
}
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button("Enable All")) {
|
||||
@ -2127,8 +2128,8 @@ void RandomizerSettingsWindow::DrawElement() {
|
||||
enabledTrickString += std::to_string(enabledTrickIt);
|
||||
enabledTrickString += ",";
|
||||
}
|
||||
CVarSetString("gRandomizeEnabledTricks", enabledTrickString.c_str());
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
CVarSetString(CVAR_RANDOMIZER_SETTING("EnabledTricks"), enabledTrickString.c_str());
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
}
|
||||
}
|
||||
if (ImGui::BeginTable("trickTags", showTag.size(), ImGuiTableFlags_Resizable | ImGuiTableFlags_NoSavedSettings | ImGuiTableFlags_Borders)) {
|
||||
@ -2149,7 +2150,7 @@ void RandomizerSettingsWindow::DrawElement() {
|
||||
ImGui::PopItemFlag();
|
||||
ImGui::TableNextRow();
|
||||
|
||||
if (CVarGetInteger("gRandomizeLogicRules", RO_LOGIC_GLITCHLESS) != RO_LOGIC_NO_LOGIC) {
|
||||
if (CVarGetInteger(CVAR_RANDOMIZER_SETTING("LogicRules"), RO_LOGIC_GLITCHLESS) != RO_LOGIC_NO_LOGIC) {
|
||||
|
||||
// COLUMN 1 - DISABLED TRICKS
|
||||
ImGui::TableNextColumn();
|
||||
@ -2190,8 +2191,8 @@ void RandomizerSettingsWindow::DrawElement() {
|
||||
enabledTrickString += std::to_string(enabledTrickIt);
|
||||
enabledTrickString += ",";
|
||||
}
|
||||
CVarSetString("gRandomizeEnabledTricks", enabledTrickString.c_str());
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
CVarSetString(CVAR_RANDOMIZER_SETTING("EnabledTricks"), enabledTrickString.c_str());
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
}
|
||||
|
||||
ImGui::BeginChild("ChildTricksDisabled", ImVec2(0, -8), false, ImGuiWindowFlags_HorizontalScrollbar);
|
||||
@ -2225,8 +2226,8 @@ void RandomizerSettingsWindow::DrawElement() {
|
||||
enabledTrickString += std::to_string(enabledTrickIt);
|
||||
enabledTrickString += ",";
|
||||
}
|
||||
CVarSetString("gRandomizeEnabledTricks", enabledTrickString.c_str());
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
CVarSetString(CVAR_RANDOMIZER_SETTING("EnabledTricks"), enabledTrickString.c_str());
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
}
|
||||
Rando::Tricks::DrawTagChips(option.GetTags());
|
||||
ImGui::SameLine();
|
||||
@ -2284,8 +2285,8 @@ void RandomizerSettingsWindow::DrawElement() {
|
||||
enabledTrickString += std::to_string(enabledTrickIt);
|
||||
enabledTrickString += ",";
|
||||
}
|
||||
CVarClear("gRandomizeEnabledTricks");
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
CVarClear(CVAR_RANDOMIZER_SETTING("EnabledTricks"));
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
}
|
||||
|
||||
ImGui::BeginChild("ChildTricksEnabled", ImVec2(0, -8), false, ImGuiWindowFlags_HorizontalScrollbar);
|
||||
@ -2320,11 +2321,11 @@ void RandomizerSettingsWindow::DrawElement() {
|
||||
enabledTrickString += ",";
|
||||
}
|
||||
if (enabledTrickString == "") {
|
||||
CVarClear("gRandomizeEnabledTricks");
|
||||
CVarClear(CVAR_RANDOMIZER_SETTING("EnabledTricks"));
|
||||
} else {
|
||||
CVarSetString("gRandomizeEnabledTricks", enabledTrickString.c_str());
|
||||
CVarSetString(CVAR_RANDOMIZER_SETTING("EnabledTricks"), enabledTrickString.c_str());
|
||||
}
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
}
|
||||
Rando::Tricks::DrawTagChips(option.GetTags());
|
||||
ImGui::SameLine();
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include <string>
|
||||
#include <libultraship/bridge.h>
|
||||
#include "z64.h"
|
||||
#include "soh/OTRGlobals.h"
|
||||
#include "fishsanity.h"
|
||||
|
||||
std::map<RandomizerCheckArea, std::string> rcAreaNames = {
|
||||
@ -111,36 +112,36 @@ void RandomizerCheckObjects::UpdateImGuiVisibility() {
|
||||
(location.GetRandomizerCheck() != RC_UNKNOWN_CHECK) &&
|
||||
(!RandomizerCheckObjects::AreaIsDungeon(location.GetArea()) || location.GetQuest() == RCQUEST_BOTH ||
|
||||
location.GetQuest() == RCQUEST_MQ &&
|
||||
((CVarGetInteger("gRandomizeMqDungeons", RO_MQ_DUNGEONS_NONE) == RO_MQ_DUNGEONS_SET_NUMBER &&
|
||||
(CVarGetInteger("gRandomizeMqDungeonCount", 12) > 0) || // at least one MQ dungeon
|
||||
CVarGetInteger("gRandomizeMqDungeons", RO_MQ_DUNGEONS_NONE) == RO_MQ_DUNGEONS_RANDOM_NUMBER)) ||
|
||||
((CVarGetInteger(CVAR_RANDOMIZER_SETTING("MqDungeons"), RO_MQ_DUNGEONS_NONE) == RO_MQ_DUNGEONS_SET_NUMBER &&
|
||||
(CVarGetInteger(CVAR_RANDOMIZER_SETTING("MqDungeonCount"), 12) > 0) || // at least one MQ dungeon
|
||||
CVarGetInteger(CVAR_RANDOMIZER_SETTING("MqDungeons"), RO_MQ_DUNGEONS_NONE) == RO_MQ_DUNGEONS_RANDOM_NUMBER)) ||
|
||||
location.GetQuest() == RCQUEST_VANILLA &&
|
||||
(CVarGetInteger("gRandomizeMqDungeons", RO_MQ_DUNGEONS_NONE) != RO_MQ_DUNGEONS_SET_NUMBER ||
|
||||
CVarGetInteger("gRandomizeMqDungeonCount", 12) < 12) // at least one vanilla dungeon
|
||||
(CVarGetInteger(CVAR_RANDOMIZER_SETTING("MqDungeons"), RO_MQ_DUNGEONS_NONE) != RO_MQ_DUNGEONS_SET_NUMBER ||
|
||||
CVarGetInteger(CVAR_RANDOMIZER_SETTING("MqDungeonCount"), 12) < 12) // at least one vanilla dungeon
|
||||
) &&
|
||||
(location.GetRCType() != RCTYPE_SHOP ||
|
||||
CVarGetInteger("gRandomizeShopsanity", RO_SHOPSANITY_OFF) > RO_SHOPSANITY_ZERO_ITEMS) &&
|
||||
CVarGetInteger(CVAR_RANDOMIZER_SETTING("Shopsanity"), RO_SHOPSANITY_OFF) > RO_SHOPSANITY_ZERO_ITEMS) &&
|
||||
(location.GetRCType() != RCTYPE_SCRUB ||
|
||||
CVarGetInteger("gRandomizeShuffleScrubs", RO_SCRUBS_OFF) != RO_SCRUBS_OFF ||
|
||||
CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleScrubs"), RO_SCRUBS_OFF) != RO_SCRUBS_OFF ||
|
||||
location.GetRandomizerCheck() == RC_HF_DEKU_SCRUB_GROTTO ||
|
||||
location.GetRandomizerCheck() == RC_LW_DEKU_SCRUB_GROTTO_FRONT ||
|
||||
location.GetRandomizerCheck() ==
|
||||
RC_LW_DEKU_SCRUB_NEAR_BRIDGE) && // The 3 scrubs that are always randomized
|
||||
(location.GetRCType() != RCTYPE_MERCHANT ||
|
||||
CVarGetInteger("gRandomizeShuffleMerchants", RO_SHUFFLE_MERCHANTS_OFF) != RO_SHUFFLE_MERCHANTS_OFF) &&
|
||||
CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleMerchants"), RO_SHUFFLE_MERCHANTS_OFF) != RO_SHUFFLE_MERCHANTS_OFF) &&
|
||||
(location.GetRCType() != RCTYPE_SONG_LOCATION ||
|
||||
CVarGetInteger("gRandomizeShuffleSongs", RO_SONG_SHUFFLE_SONG_LOCATIONS) !=
|
||||
CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleSongs"), RO_SONG_SHUFFLE_SONG_LOCATIONS) !=
|
||||
RO_SONG_SHUFFLE_SONG_LOCATIONS) && // song locations
|
||||
((location.GetRCType() != RCTYPE_BOSS_HEART_OR_OTHER_REWARD &&
|
||||
location.GetRandomizerCheck() != RC_SONG_FROM_IMPA &&
|
||||
location.GetRandomizerCheck() != RC_SHEIK_IN_ICE_CAVERN) ||
|
||||
CVarGetInteger("gRandomizeShuffleSongs", RO_SONG_SHUFFLE_SONG_LOCATIONS) !=
|
||||
CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleSongs"), RO_SONG_SHUFFLE_SONG_LOCATIONS) !=
|
||||
RO_SONG_SHUFFLE_DUNGEON_REWARDS) && // song dungeon rewards
|
||||
(location.GetRCType() != RCTYPE_DUNGEON_REWARD ||
|
||||
CVarGetInteger("gRandomizeShuffleDungeonReward", RO_DUNGEON_REWARDS_END_OF_DUNGEON) !=
|
||||
CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleDungeonReward"), RO_DUNGEON_REWARDS_END_OF_DUNGEON) !=
|
||||
RO_DUNGEON_REWARDS_END_OF_DUNGEON) && // dungeon rewards end of dungeons
|
||||
(location.GetRCType() != RCTYPE_OCARINA ||
|
||||
CVarGetInteger("gRandomizeShuffleOcarinas", RO_GENERIC_NO)) && // ocarina locations
|
||||
CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleOcarinas"), RO_GENERIC_NO)) && // ocarina locations
|
||||
(location.GetRandomizerCheck() != RC_HC_ZELDAS_LETTER) && // don't show until we support shuffling letter
|
||||
(location.GetRCType() !=
|
||||
RCTYPE_GOSSIP_STONE) && // don't show gossip stones (maybe gossipsanity will be a thing eventually?)
|
||||
@ -148,63 +149,63 @@ void RandomizerCheckObjects::UpdateImGuiVisibility() {
|
||||
(location.GetRCType() !=
|
||||
RCTYPE_CHEST_GAME) && // don't show non final reward chest game checks until we support shuffling them
|
||||
(location.GetRCType() != RCTYPE_SKULL_TOKEN ||
|
||||
(CVarGetInteger("gRandomizeShuffleTokens", RO_TOKENSANITY_OFF) == RO_TOKENSANITY_ALL) ||
|
||||
((CVarGetInteger("gRandomizeShuffleTokens", RO_TOKENSANITY_OFF) == RO_TOKENSANITY_OVERWORLD) &&
|
||||
(CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleTokens"), RO_TOKENSANITY_OFF) == RO_TOKENSANITY_ALL) ||
|
||||
((CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleTokens"), RO_TOKENSANITY_OFF) == RO_TOKENSANITY_OVERWORLD) &&
|
||||
RandomizerCheckObjects::AreaIsOverworld(location.GetArea())) ||
|
||||
((CVarGetInteger("gRandomizeShuffleTokens", RO_TOKENSANITY_OFF) == RO_TOKENSANITY_DUNGEONS) &&
|
||||
((CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleTokens"), RO_TOKENSANITY_OFF) == RO_TOKENSANITY_DUNGEONS) &&
|
||||
RandomizerCheckObjects::AreaIsDungeon(location.GetArea()))) &&
|
||||
(location.GetRCType() != RCTYPE_BEEHIVE || CVarGetInteger("gRandomizeShuffleBeehives", RO_GENERIC_NO)) &&
|
||||
(location.GetRCType() != RCTYPE_COW || CVarGetInteger("gRandomizeShuffleCows", RO_GENERIC_NO)) &&
|
||||
(location.GetRCType() != RCTYPE_BEEHIVE || CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleBeehives"), RO_GENERIC_NO)) &&
|
||||
(location.GetRCType() != RCTYPE_COW || CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleCows"), RO_GENERIC_NO)) &&
|
||||
(location.GetRCType() != RCTYPE_FISH || ctx->GetFishsanity()->GetFishLocationIncluded(&location, FSO_SOURCE_CVARS)) &&
|
||||
(location.GetRCType() != RCTYPE_ADULT_TRADE ||
|
||||
CVarGetInteger("gRandomizeShuffleAdultTrade", RO_GENERIC_NO)) &&
|
||||
CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleAdultTrade"), RO_GENERIC_NO)) &&
|
||||
(location.GetRandomizerCheck() != RC_KF_KOKIRI_SWORD_CHEST ||
|
||||
CVarGetInteger("gRandomizeShuffleKokiriSword", RO_GENERIC_NO)) &&
|
||||
CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleKokiriSword"), RO_GENERIC_NO)) &&
|
||||
(location.GetRandomizerCheck() != RC_ZR_MAGIC_BEAN_SALESMAN ||
|
||||
CVarGetInteger("gRandomizeShuffleBeans", RO_GENERIC_NO)) &&
|
||||
CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleBeans"), RO_GENERIC_NO)) &&
|
||||
(location.GetRandomizerCheck() != RC_HC_MALON_EGG ||
|
||||
CVarGetInteger("gRandomizeShuffleWeirdEgg", RO_GENERIC_NO)) &&
|
||||
CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleWeirdEgg"), RO_GENERIC_NO)) &&
|
||||
(location.GetRCType() != RCTYPE_FROG_SONG ||
|
||||
CVarGetInteger("gRandomizeShuffleFrogSongRupees", RO_GENERIC_NO)) &&
|
||||
CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleFrogSongRupees"), RO_GENERIC_NO)) &&
|
||||
(location.GetRCType() != RCTYPE_MAP_COMPASS ||
|
||||
CVarGetInteger("gRandomizeStartingMapsCompasses", RO_DUNGEON_ITEM_LOC_OWN_DUNGEON) !=
|
||||
CVarGetInteger(CVAR_RANDOMIZER_SETTING("StartingMapsCompasses"), RO_DUNGEON_ITEM_LOC_OWN_DUNGEON) !=
|
||||
RO_DUNGEON_ITEM_LOC_VANILLA) &&
|
||||
(location.GetRCType() != RCTYPE_SMALL_KEY ||
|
||||
CVarGetInteger("gRandomizeKeysanity", RO_DUNGEON_ITEM_LOC_OWN_DUNGEON) != RO_DUNGEON_ITEM_LOC_VANILLA) &&
|
||||
CVarGetInteger(CVAR_RANDOMIZER_SETTING("Keysanity"), RO_DUNGEON_ITEM_LOC_OWN_DUNGEON) != RO_DUNGEON_ITEM_LOC_VANILLA) &&
|
||||
(location.GetRCType() != RCTYPE_BOSS_KEY ||
|
||||
CVarGetInteger("gRandomizeBossKeysanity", RO_DUNGEON_ITEM_LOC_OWN_DUNGEON) !=
|
||||
CVarGetInteger(CVAR_RANDOMIZER_SETTING("BossKeysanity"), RO_DUNGEON_ITEM_LOC_OWN_DUNGEON) !=
|
||||
RO_DUNGEON_ITEM_LOC_VANILLA) &&
|
||||
(location.GetRCType() != RCTYPE_GANON_BOSS_KEY ||
|
||||
CVarGetInteger("gRandomizeShuffleGanonBossKey", RO_GANON_BOSS_KEY_VANILLA) !=
|
||||
CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleGanonBossKey"), RO_GANON_BOSS_KEY_VANILLA) !=
|
||||
RO_GANON_BOSS_KEY_VANILLA) && // vanilla ganon boss key
|
||||
(location.GetRandomizerCheck() != RC_TOT_LIGHT_ARROWS_CUTSCENE ||
|
||||
(CVarGetInteger("gRandomizeShuffleGanonBossKey", RO_GANON_BOSS_KEY_VANILLA) !=
|
||||
(CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleGanonBossKey"), RO_GANON_BOSS_KEY_VANILLA) !=
|
||||
RO_GANON_BOSS_KEY_LACS_DUNGEONS &&
|
||||
CVarGetInteger("gRandomizeShuffleGanonBossKey", RO_GANON_BOSS_KEY_VANILLA) !=
|
||||
CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleGanonBossKey"), RO_GANON_BOSS_KEY_VANILLA) !=
|
||||
RO_GANON_BOSS_KEY_LACS_MEDALLIONS &&
|
||||
CVarGetInteger("gRandomizeShuffleGanonBossKey", RO_GANON_BOSS_KEY_VANILLA) !=
|
||||
CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleGanonBossKey"), RO_GANON_BOSS_KEY_VANILLA) !=
|
||||
RO_GANON_BOSS_KEY_LACS_REWARDS &&
|
||||
CVarGetInteger("gRandomizeShuffleGanonBossKey", RO_GANON_BOSS_KEY_VANILLA) !=
|
||||
CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleGanonBossKey"), RO_GANON_BOSS_KEY_VANILLA) !=
|
||||
RO_GANON_BOSS_KEY_LACS_STONES &&
|
||||
CVarGetInteger("gRandomizeShuffleGanonBossKey", RO_GANON_BOSS_KEY_VANILLA) !=
|
||||
CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleGanonBossKey"), RO_GANON_BOSS_KEY_VANILLA) !=
|
||||
RO_GANON_BOSS_KEY_LACS_TOKENS &&
|
||||
CVarGetInteger("gRandomizeShuffleGanonBossKey", RO_GANON_BOSS_KEY_VANILLA) !=
|
||||
CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleGanonBossKey"), RO_GANON_BOSS_KEY_VANILLA) !=
|
||||
RO_GANON_BOSS_KEY_LACS_VANILLA)) && // LACS ganon boss key
|
||||
(location.GetRandomizerCheck() != RC_KAK_100_GOLD_SKULLTULA_REWARD ||
|
||||
CVarGetInteger("gRandomizeShuffleGanonBossKey", RO_GANON_BOSS_KEY_VANILLA) !=
|
||||
CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleGanonBossKey"), RO_GANON_BOSS_KEY_VANILLA) !=
|
||||
RO_GANON_BOSS_KEY_KAK_TOKENS) && // 100 skull reward ganon boss key
|
||||
(location.GetRCType() != RCTYPE_GF_KEY && location.GetRandomizerCheck() != RC_GF_GERUDO_MEMBERSHIP_CARD ||
|
||||
(CVarGetInteger("gRandomizeGerudoFortress", RO_GF_NORMAL) == RO_GF_OPEN &&
|
||||
(CVarGetInteger(CVAR_RANDOMIZER_SETTING("GerudoFortress"), RO_GF_NORMAL) == RO_GF_OPEN &&
|
||||
location.GetRCType() != RCTYPE_GF_KEY && location.GetRandomizerCheck() != RC_GF_GERUDO_MEMBERSHIP_CARD) ||
|
||||
(CVarGetInteger("gRandomizeGerudoFortress", RO_GF_NORMAL) == RO_GF_FAST &&
|
||||
(CVarGetInteger(CVAR_RANDOMIZER_SETTING("GerudoFortress"), RO_GF_NORMAL) == RO_GF_FAST &&
|
||||
((location.GetRandomizerCheck() == RC_GF_GERUDO_MEMBERSHIP_CARD &&
|
||||
CVarGetInteger("gRandomizeShuffleGerudoToken", RO_GENERIC_NO) == RO_GENERIC_YES) ||
|
||||
CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleGerudoToken"), RO_GENERIC_NO) == RO_GENERIC_YES) ||
|
||||
(location.GetRandomizerCheck() == RC_GF_NORTH_F1_CARPENTER &&
|
||||
CVarGetInteger("gRandomizeGerudoKeys", RO_GERUDO_KEYS_VANILLA) != RO_GERUDO_KEYS_VANILLA))) ||
|
||||
(CVarGetInteger("gRandomizeGerudoFortress", RO_GF_NORMAL) == RO_GF_NORMAL &&
|
||||
CVarGetInteger(CVAR_RANDOMIZER_SETTING("GerudoKeys"), RO_GERUDO_KEYS_VANILLA) != RO_GERUDO_KEYS_VANILLA))) ||
|
||||
(CVarGetInteger(CVAR_RANDOMIZER_SETTING("GerudoFortress"), RO_GF_NORMAL) == RO_GF_NORMAL &&
|
||||
((location.GetRandomizerCheck() == RC_GF_GERUDO_MEMBERSHIP_CARD &&
|
||||
CVarGetInteger("gRandomizeShuffleGerudoToken", RO_GENERIC_NO) == RO_GENERIC_YES) ||
|
||||
CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleGerudoToken"), RO_GENERIC_NO) == RO_GENERIC_YES) ||
|
||||
(location.GetRCType() == RCTYPE_GF_KEY &&
|
||||
CVarGetInteger("gRandomizeGerudoKeys", RO_GERUDO_KEYS_VANILLA) != RO_GERUDO_KEYS_VANILLA)))));
|
||||
CVarGetInteger(CVAR_RANDOMIZER_SETTING("GerudoKeys"), RO_GERUDO_KEYS_VANILLA) != RO_GERUDO_KEYS_VANILLA)))));
|
||||
}
|
||||
}
|
||||
|
@ -144,6 +144,8 @@ RandomizerCheckArea currentArea = RCAREA_INVALID;
|
||||
OSContPad* trackerButtonsPressed;
|
||||
std::unordered_map<RandomizerCheck, std::string> checkNameOverrides;
|
||||
|
||||
bool passesTextFilter(ImGuiTextFilter& checkSearch, const RandomizerCheck check);
|
||||
bool shouldHideArea(ImGuiTextFilter& checkSearch, std::map<RandomizerCheckArea, std::vector<RandomizerCheck>> checksByArea, const RandomizerCheckArea rcArea);
|
||||
void BeginFloatWindows(std::string UniqueName, bool& open, ImGuiWindowFlags flags = 0);
|
||||
bool CompareChecks(RandomizerCheck, RandomizerCheck);
|
||||
bool CheckByArea(RandomizerCheckArea);
|
||||
@ -458,7 +460,7 @@ bool HasItemBeenCollected(RandomizerCheck rc) {
|
||||
case SpoilerCollectionCheckType::SPOILER_CHK_GRAVEDIGGER:
|
||||
// Gravedigger has a fix in place that means one of two save locations. Check both.
|
||||
return (gSaveContext.itemGetInf[1] & 0x1000) || // vanilla flag
|
||||
((IS_RANDO || CVarGetInteger("gGravediggingTourFix", 0)) &&
|
||||
((IS_RANDO || CVarGetInteger(CVAR_ENHANCEMENT("GravediggingTourFix"), 0)) &&
|
||||
gSaveContext.sceneFlags[scene].collect & (1 << flag) || (gPlayState->actorCtx.flags.collect & (1 << flag))); // rando/fix flag
|
||||
default:
|
||||
return false;
|
||||
@ -880,15 +882,15 @@ void UpdateCheck(uint32_t check, RandomizerCheckTrackerData data) {
|
||||
void CheckTrackerWindow::DrawElement() {
|
||||
ImGui::SetNextWindowSize(ImVec2(400, 540), ImGuiCond_FirstUseEver);
|
||||
|
||||
if (CVarGetInteger("gCheckTrackerWindowType", TRACKER_WINDOW_WINDOW) == TRACKER_WINDOW_FLOATING) {
|
||||
if (CVarGetInteger("gCheckTrackerShowOnlyPaused", 0) && (gPlayState == nullptr || gPlayState->pauseCtx.state == 0)) {
|
||||
if (CVarGetInteger(CVAR_TRACKER_CHECK("WindowType"), TRACKER_WINDOW_WINDOW) == TRACKER_WINDOW_FLOATING) {
|
||||
if (CVarGetInteger(CVAR_TRACKER_CHECK("ShowOnlyPaused"), 0) && (gPlayState == nullptr || gPlayState->pauseCtx.state == 0)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gCheckTrackerDisplayType", TRACKER_DISPLAY_ALWAYS) == TRACKER_DISPLAY_COMBO_BUTTON) {
|
||||
int comboButton1Mask = buttons[CVarGetInteger("gCheckTrackerComboButton1", TRACKER_COMBO_BUTTON_L)];
|
||||
int comboButton2Mask = buttons[CVarGetInteger("gCheckTrackerComboButton2", TRACKER_COMBO_BUTTON_R)];
|
||||
OSContPad* trackerButtonsPressed = LUS::Context::GetInstance()->GetControlDeck()->GetPads();
|
||||
if (CVarGetInteger(CVAR_TRACKER_CHECK("DisplayType"), TRACKER_DISPLAY_ALWAYS) == TRACKER_DISPLAY_COMBO_BUTTON) {
|
||||
int comboButton1Mask = buttons[CVarGetInteger(CVAR_TRACKER_CHECK("ComboButton1"), TRACKER_COMBO_BUTTON_L)];
|
||||
int comboButton2Mask = buttons[CVarGetInteger(CVAR_TRACKER_CHECK("ComboButton2"), TRACKER_COMBO_BUTTON_R)];
|
||||
OSContPad* trackerButtonsPressed = Ship::Context::GetInstance()->GetControlDeck()->GetPads();
|
||||
bool comboButtonsHeld = trackerButtonsPressed != nullptr &&
|
||||
trackerButtonsPressed[0].button & comboButton1Mask &&
|
||||
trackerButtonsPressed[0].button & comboButton2Mask;
|
||||
@ -927,7 +929,7 @@ void CheckTrackerWindow::DrawElement() {
|
||||
ImGui::TableNextRow(0, headerHeight);
|
||||
ImGui::TableNextColumn();
|
||||
UIWidgets::EnhancementCheckbox(
|
||||
"Show Hidden Items", "gCheckTrackerOptionShowHidden", false,
|
||||
"Show Hidden Items", CVAR_TRACKER_CHECK("ShowHidden"), false,
|
||||
"When active, items will show hidden checks by default when updated to this state.");
|
||||
UIWidgets::PaddedSeparator();
|
||||
if (ImGui::Button("Expand All")) {
|
||||
@ -940,6 +942,14 @@ void CheckTrackerWindow::DrawElement() {
|
||||
optExpandAll = false;
|
||||
optCollapseAll = true;
|
||||
}
|
||||
ImGui::SameLine();
|
||||
static ImGuiTextFilter checkSearch;
|
||||
if (ImGui::Button("Clear")) {
|
||||
checkSearch.Clear();
|
||||
}
|
||||
UIWidgets::Tooltip("Clear the search field");
|
||||
checkSearch.Draw();
|
||||
|
||||
UIWidgets::PaddedSeparator();
|
||||
|
||||
//Checks Section Lead-in
|
||||
@ -958,17 +968,17 @@ void CheckTrackerWindow::DrawElement() {
|
||||
RainbowTick();
|
||||
bool doDraw = false;
|
||||
bool thisAreaFullyChecked = false;
|
||||
bool showHidden = CVarGetInteger("gCheckTrackerOptionShowHidden", 0);
|
||||
bool hideIncomplete = CVarGetInteger("gCheckTrackerAreaIncompleteHide", 0);
|
||||
bool hideComplete = CVarGetInteger("gCheckTrackerAreaCompleteHide", 0);
|
||||
bool showHidden = CVarGetInteger(CVAR_TRACKER_CHECK("ShowHidden"), 0);
|
||||
bool hideIncomplete = CVarGetInteger(CVAR_TRACKER_CHECK("AreaIncomplete.Hide"), 0);
|
||||
bool hideComplete = CVarGetInteger(CVAR_TRACKER_CHECK("AreaComplete.Hide"), 0);
|
||||
bool collapseLogic;
|
||||
bool doingCollapseOrExpand = optExpandAll || optCollapseAll;
|
||||
bool isThisAreaSpoiled;
|
||||
RandomizerCheckArea lastArea = RCAREA_INVALID;
|
||||
Color_RGBA8 areaCompleteColor = CVarGetColor("gCheckTrackerAreaMainCompleteColor", Color_Main_Default);
|
||||
Color_RGBA8 areaIncompleteColor = CVarGetColor("gCheckTrackerAreaMainIncompleteColor", Color_Main_Default);
|
||||
Color_RGBA8 extraCompleteColor = CVarGetColor("gCheckTrackerAreaExtraCompleteColor", Color_Area_Complete_Extra_Default);
|
||||
Color_RGBA8 extraIncompleteColor = CVarGetColor("gCheckTrackerAreaExtraIncompleteColor", Color_Area_Incomplete_Extra_Default);
|
||||
Color_RGBA8 areaCompleteColor = CVarGetColor(CVAR_TRACKER_CHECK("AreaComplete.MainColor"), Color_Main_Default);
|
||||
Color_RGBA8 areaIncompleteColor = CVarGetColor(CVAR_TRACKER_CHECK("AreaIncomplete.MainColor"), Color_Main_Default);
|
||||
Color_RGBA8 extraCompleteColor = CVarGetColor(CVAR_TRACKER_CHECK("AreaComplete.ExtraColor"), Color_Area_Complete_Extra_Default);
|
||||
Color_RGBA8 extraIncompleteColor = CVarGetColor(CVAR_TRACKER_CHECK("AreaIncomplete.ExtraColor"), Color_Area_Incomplete_Extra_Default);
|
||||
Color_RGBA8 mainColor;
|
||||
Color_RGBA8 extraColor;
|
||||
std::string stemp;
|
||||
@ -986,10 +996,9 @@ void CheckTrackerWindow::DrawElement() {
|
||||
previousShowHidden = showHidden;
|
||||
doAreaScroll = true;
|
||||
}
|
||||
if (!showHidden && (
|
||||
hideComplete && thisAreaFullyChecked ||
|
||||
hideIncomplete && !thisAreaFullyChecked
|
||||
)) {
|
||||
if (shouldHideArea(checkSearch, checksByArea, rcArea) ||
|
||||
(!showHidden && ((hideComplete && thisAreaFullyChecked) || (hideIncomplete && !thisAreaFullyChecked)))
|
||||
) {
|
||||
doDraw = false;
|
||||
} else {
|
||||
//Get the colour for the area
|
||||
@ -1024,7 +1033,7 @@ void CheckTrackerWindow::DrawElement() {
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(extraColor.r / 255.0f, extraColor.g / 255.0f,
|
||||
extraColor.b / 255.0f, extraColor.a / 255.0f));
|
||||
|
||||
isThisAreaSpoiled = IsAreaSpoiled(rcArea) || CVarGetInteger("gCheckTrackerOptionMQSpoilers", 0);
|
||||
isThisAreaSpoiled = IsAreaSpoiled(rcArea) || CVarGetInteger(CVAR_TRACKER_CHECK("MQSpoilers"), 0);
|
||||
|
||||
if (isThisAreaSpoiled) {
|
||||
if (showVOrMQ && RandomizerCheckObjects::AreaIsDungeon(rcArea)) {
|
||||
@ -1047,10 +1056,11 @@ void CheckTrackerWindow::DrawElement() {
|
||||
doAreaScroll = false;
|
||||
}
|
||||
for (auto rc : checks) {
|
||||
if (doDraw && isThisAreaSpoiled && IsVisibleInCheckTracker(rc)) {
|
||||
if (doDraw && isThisAreaSpoiled && IsVisibleInCheckTracker(rc) && passesTextFilter(checkSearch, rc)) {
|
||||
DrawLocation(rc);
|
||||
}
|
||||
}
|
||||
|
||||
if (doDraw) {
|
||||
ImGui::TreePop();
|
||||
}
|
||||
@ -1066,6 +1076,28 @@ void CheckTrackerWindow::DrawElement() {
|
||||
}
|
||||
}
|
||||
|
||||
bool shouldHideArea(ImGuiTextFilter& checkSearch, std::map<RandomizerCheckArea, std::vector<RandomizerCheck>> checksByArea, RandomizerCheckArea rcArea) {
|
||||
bool shouldHideFilteredAreas = CVarGetInteger(CVAR_TRACKER_CHECK("HideFilteredAreas"), 1);
|
||||
if (!shouldHideFilteredAreas) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (auto check : checksByArea[rcArea]) {
|
||||
if (IsVisibleInCheckTracker(check) && passesTextFilter(checkSearch, check)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool passesTextFilter(ImGuiTextFilter& checkSearch, RandomizerCheck check) {
|
||||
return (
|
||||
checkSearch.PassFilter(RandomizerCheckObjects::GetRCAreaName(Rando::StaticData::GetLocation(check)->GetArea()).c_str()) ||
|
||||
checkSearch.PassFilter(Rando::StaticData::GetLocation(check)->GetShortName().c_str())
|
||||
);
|
||||
}
|
||||
|
||||
// Windowing stuff
|
||||
void BeginFloatWindows(std::string UniqueName, bool& open, ImGuiWindowFlags flags) {
|
||||
ImGuiWindowFlags windowFlags = flags;
|
||||
@ -1075,12 +1107,12 @@ void BeginFloatWindows(std::string UniqueName, bool& open, ImGuiWindowFlags flag
|
||||
ImGuiWindowFlags_AlwaysVerticalScrollbar | ImGuiWindowFlags_NoFocusOnAppearing;
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gCheckTrackerWindowType", TRACKER_WINDOW_WINDOW) == TRACKER_WINDOW_FLOATING) {
|
||||
if (CVarGetInteger(CVAR_TRACKER_CHECK("WindowType"), TRACKER_WINDOW_WINDOW) == TRACKER_WINDOW_FLOATING) {
|
||||
ImGui::SetNextWindowViewport(ImGui::GetMainViewport()->ID);
|
||||
windowFlags |= ImGuiWindowFlags_NoDocking | ImGuiWindowFlags_NoNav | ImGuiWindowFlags_NoTitleBar |
|
||||
ImGuiWindowFlags_NoScrollWithMouse | ImGuiWindowFlags_NoScrollbar;
|
||||
|
||||
if (!CVarGetInteger("gCheckTrackerHudEditMode", 0)) {
|
||||
if (!CVarGetInteger(CVAR_TRACKER_CHECK("Draggable"), 0)) {
|
||||
windowFlags |= ImGuiWindowFlags_NoInputs | ImGuiWindowFlags_NoMove;
|
||||
}
|
||||
}
|
||||
@ -1357,7 +1389,7 @@ void DrawLocation(RandomizerCheck rc) {
|
||||
Color_RGBA8 mainColor;
|
||||
Color_RGBA8 extraColor;
|
||||
std::string txt;
|
||||
bool showHidden = CVarGetInteger("gCheckTrackerOptionShowHidden", 0);
|
||||
bool showHidden = CVarGetInteger(CVAR_TRACKER_CHECK("ShowHidden"), 0);
|
||||
Rando::Location* loc = Rando::StaticData::GetLocation(rc);
|
||||
Rando::ItemLocation* itemLoc = OTRGlobals::Instance->gRandoContext->GetItemLocation(rc);
|
||||
RandomizerCheckTrackerData checkData = gSaveContext.checkTrackerData[rc];
|
||||
@ -1369,59 +1401,59 @@ void DrawLocation(RandomizerCheck rc) {
|
||||
|
||||
bool skipped = checkData.skipped;
|
||||
if (status == RCSHOW_COLLECTED) {
|
||||
if (!showHidden && CVarGetInteger("gCheckTrackerCollectedHide", 0)) {
|
||||
if (!showHidden && CVarGetInteger(CVAR_TRACKER_CHECK("Collected.Hide"), 0)) {
|
||||
return;
|
||||
}
|
||||
mainColor =
|
||||
!IsHeartPiece((GetItemID)Rando::StaticData::RetrieveItem(loc->GetVanillaItem()).GetItemID()) && !IS_RANDO
|
||||
? CVarGetColor("gCheckTrackerCollectedExtraColor", Color_Collected_Extra_Default)
|
||||
: CVarGetColor("gCheckTrackerCollectedMainColor", Color_Main_Default);
|
||||
extraColor = CVarGetColor("gCheckTrackerCollectedExtraColor", Color_Collected_Extra_Default);
|
||||
? CVarGetColor(CVAR_TRACKER_CHECK("Collected.ExtraColor"), Color_Collected_Extra_Default)
|
||||
: CVarGetColor(CVAR_TRACKER_CHECK("Collected.MainColor"), Color_Main_Default);
|
||||
extraColor = CVarGetColor(CVAR_TRACKER_CHECK("Collected.ExtraColor"), Color_Collected_Extra_Default);
|
||||
} else if (status == RCSHOW_SAVED) {
|
||||
if (!showHidden && CVarGetInteger("gCheckTrackerSavedHide", 0)) {
|
||||
if (!showHidden && CVarGetInteger(CVAR_TRACKER_CHECK("Saved.Hide"), 0)) {
|
||||
return;
|
||||
}
|
||||
mainColor =
|
||||
!IsHeartPiece((GetItemID)Rando::StaticData::RetrieveItem(loc->GetVanillaItem()).GetItemID()) && !IS_RANDO
|
||||
? CVarGetColor("gCheckTrackerSavedExtraColor", Color_Saved_Extra_Default)
|
||||
: CVarGetColor("gCheckTrackerSavedMainColor", Color_Main_Default);
|
||||
extraColor = CVarGetColor("gCheckTrackerSavedExtraColor", Color_Saved_Extra_Default);
|
||||
? CVarGetColor(CVAR_TRACKER_CHECK("Saved.ExtraColor"), Color_Saved_Extra_Default)
|
||||
: CVarGetColor(CVAR_TRACKER_CHECK("Saved.MainColor"), Color_Main_Default);
|
||||
extraColor = CVarGetColor(CVAR_TRACKER_CHECK("Saved.ExtraColor"), Color_Saved_Extra_Default);
|
||||
} else if (skipped) {
|
||||
if (!showHidden && CVarGetInteger("gCheckTrackerSkippedHide", 0)) {
|
||||
if (!showHidden && CVarGetInteger(CVAR_TRACKER_CHECK("Skipped.Hide"), 0)) {
|
||||
return;
|
||||
}
|
||||
mainColor =
|
||||
!IsHeartPiece((GetItemID)Rando::StaticData::RetrieveItem(loc->GetVanillaItem()).GetItemID()) && !IS_RANDO
|
||||
? CVarGetColor("gCheckTrackerSkippedExtraColor", Color_Skipped_Extra_Default)
|
||||
: CVarGetColor("gCheckTrackerSkippedMainColor", Color_Main_Default);
|
||||
extraColor = CVarGetColor("gCheckTrackerSkippedExtraColor", Color_Skipped_Extra_Default);
|
||||
? CVarGetColor(CVAR_TRACKER_CHECK("Skipped.ExtraColor"), Color_Skipped_Extra_Default)
|
||||
: CVarGetColor(CVAR_TRACKER_CHECK("Skipped.MainColor"), Color_Main_Default);
|
||||
extraColor = CVarGetColor(CVAR_TRACKER_CHECK("Skipped.ExtraColor"), Color_Skipped_Extra_Default);
|
||||
} else if (status == RCSHOW_SEEN || status == RCSHOW_IDENTIFIED) {
|
||||
if (!showHidden && CVarGetInteger("gCheckTrackerSeenHide", 0)) {
|
||||
if (!showHidden && CVarGetInteger(CVAR_TRACKER_CHECK("Seen.Hide"), 0)) {
|
||||
return;
|
||||
}
|
||||
mainColor =
|
||||
!IsHeartPiece((GetItemID)Rando::StaticData::RetrieveItem(loc->GetVanillaItem()).GetItemID()) && !IS_RANDO
|
||||
? CVarGetColor("gCheckTrackerSeenExtraColor", Color_Seen_Extra_Default)
|
||||
: CVarGetColor("gCheckTrackerSeenMainColor", Color_Main_Default);
|
||||
extraColor = CVarGetColor("gCheckTrackerSeenExtraColor", Color_Seen_Extra_Default);
|
||||
? CVarGetColor(CVAR_TRACKER_CHECK("Seen.ExtraColor"), Color_Seen_Extra_Default)
|
||||
: CVarGetColor(CVAR_TRACKER_CHECK("Seen.MainColor"), Color_Main_Default);
|
||||
extraColor = CVarGetColor(CVAR_TRACKER_CHECK("Seen.ExtraColor"), Color_Seen_Extra_Default);
|
||||
} else if (status == RCSHOW_SCUMMED) {
|
||||
if (!showHidden && CVarGetInteger("gCheckTrackerScummedHide", 0)) {
|
||||
if (!showHidden && CVarGetInteger(CVAR_TRACKER_CHECK("Scummed.Hide"), 0)) {
|
||||
return;
|
||||
}
|
||||
mainColor =
|
||||
!IsHeartPiece((GetItemID)Rando::StaticData::RetrieveItem(loc->GetVanillaItem()).GetItemID()) && !IS_RANDO
|
||||
? CVarGetColor("gCheckTrackerScummedExtraColor", Color_Scummed_Extra_Default)
|
||||
: CVarGetColor("gCheckTrackerScummedMainColor", Color_Main_Default);
|
||||
extraColor = CVarGetColor("gCheckTrackerScummedExtraColor", Color_Scummed_Extra_Default);
|
||||
? CVarGetColor(CVAR_TRACKER_CHECK("Scummed.ExtraColor"), Color_Scummed_Extra_Default)
|
||||
: CVarGetColor(CVAR_TRACKER_CHECK("Scummed.MainColor"), Color_Main_Default);
|
||||
extraColor = CVarGetColor(CVAR_TRACKER_CHECK("Scummed.ExtraColor"), Color_Scummed_Extra_Default);
|
||||
} else if (status == RCSHOW_UNCHECKED) {
|
||||
if (!showHidden && CVarGetInteger("gCheckTrackerUncheckedHide", 0)) {
|
||||
if (!showHidden && CVarGetInteger(CVAR_TRACKER_CHECK("Unchecked.Hide"), 0)) {
|
||||
return;
|
||||
}
|
||||
mainColor =
|
||||
!IsHeartPiece((GetItemID)Rando::StaticData::RetrieveItem(loc->GetVanillaItem()).GetItemID()) && !IS_RANDO
|
||||
? CVarGetColor("gCheckTrackerUncheckedExtraColor", Color_Unchecked_Extra_Default)
|
||||
: CVarGetColor("gCheckTrackerUncheckedMainColor", Color_Main_Default);
|
||||
extraColor = CVarGetColor("gCheckTrackerUncheckedExtraColor", Color_Unchecked_Extra_Default);
|
||||
? CVarGetColor(CVAR_TRACKER_CHECK("Unchecked.ExtraColor"), Color_Unchecked_Extra_Default)
|
||||
: CVarGetColor(CVAR_TRACKER_CHECK("Unchecked.MainColor"), Color_Main_Default);
|
||||
extraColor = CVarGetColor(CVAR_TRACKER_CHECK("Unchecked.ExtraColor"), Color_Unchecked_Extra_Default);
|
||||
}
|
||||
|
||||
//Main Text
|
||||
@ -1521,20 +1553,20 @@ void DrawLocation(RandomizerCheck rc) {
|
||||
}
|
||||
|
||||
static std::set<std::string> rainbowCVars = {
|
||||
"gCheckTrackerAreaMainIncompleteColor", "gCheckTrackerAreaExtraIncompleteColor",
|
||||
"gCheckTrackerAreaMainCompleteColor", "gCheckTrackerAreaExtraCompleteColor",
|
||||
"gCheckTrackerUncheckedMainColor", "gCheckTrackerUncheckedExtraColor",
|
||||
"gCheckTrackerSkippedMainColor", "gCheckTrackerSkippedExtraColor",
|
||||
"gCheckTrackerSeenMainColor", "gCheckTrackerSeenExtraColor",
|
||||
"gCheckTrackerHintedMainColor", "gCheckTrackerHintedExtraColor",
|
||||
"gCheckTrackerCollectedMainColor", "gCheckTrackerCollectedExtraColor",
|
||||
"gCheckTrackerScummedMainColor", "gCheckTrackerScummedExtraColor",
|
||||
"gCheckTrackerSavedMainColor", "gCheckTrackerSavedExtraColor",
|
||||
CVAR_TRACKER_CHECK("AreaIncomplete.MainColor"), CVAR_TRACKER_CHECK("AreaIncomplete.ExtraColor"),
|
||||
CVAR_TRACKER_CHECK("AreaComplete.MainColor"), CVAR_TRACKER_CHECK("AreaComplete.ExtraColor"),
|
||||
CVAR_TRACKER_CHECK("Unchecked.MainColor"), CVAR_TRACKER_CHECK("Unchecked.ExtraColor"),
|
||||
CVAR_TRACKER_CHECK("Skipped.MainColor"), CVAR_TRACKER_CHECK("Skipped.ExtraColor"),
|
||||
CVAR_TRACKER_CHECK("Seen.MainColor"), CVAR_TRACKER_CHECK("Seen.ExtraColor"),
|
||||
CVAR_TRACKER_CHECK("Hinted.MainColor"), CVAR_TRACKER_CHECK("Hinted.ExtraColor"),
|
||||
CVAR_TRACKER_CHECK("Collected.MainColor"), CVAR_TRACKER_CHECK("Collected.ExtraColor"),
|
||||
CVAR_TRACKER_CHECK("Scummed.MainColor"), CVAR_TRACKER_CHECK("Scummed.ExtraColor"),
|
||||
CVAR_TRACKER_CHECK("Saved.MainColor"), CVAR_TRACKER_CHECK("Saved.ExtraColor"),
|
||||
};
|
||||
|
||||
int hue = 0;
|
||||
void RainbowTick() {
|
||||
float freqHue = hue * 2 * M_PI / (360 * CVarGetFloat("gCosmetics.RainbowSpeed", 0.6f));
|
||||
float freqHue = hue * 2 * M_PI / (360 * CVarGetFloat(CVAR_COSMETIC("RainbowSpeed"), 0.6f));
|
||||
for (auto& cvar : rainbowCVars) {
|
||||
if (CVarGetInteger((cvar + "RBM").c_str(), 0) == 0) {
|
||||
continue;
|
||||
@ -1624,49 +1656,54 @@ void CheckTrackerSettingsWindow::DrawElement() {
|
||||
ImGui::TableNextRow();
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::PushItemWidth(ImGui::GetContentRegionAvail().x);
|
||||
if (UIWidgets::EnhancementColor("BG Color", "gCheckTrackerBgColor",
|
||||
if (UIWidgets::EnhancementColor("BG Color", CVAR_TRACKER_CHECK("BgColor"),
|
||||
ImVec4(Color_Background.r, Color_Background.g, Color_Background.b, Color_Background.a),
|
||||
ImVec4(Color_Bg_Default.r, Color_Bg_Default.g, Color_Bg_Default.b, Color_Bg_Default.a),
|
||||
false, true))
|
||||
{
|
||||
Color_Background = CVarGetColor("gCheckTrackerBgColor", Color_Bg_Default);
|
||||
Color_Background = CVarGetColor(CVAR_TRACKER_CHECK("BgColor"), Color_Bg_Default);
|
||||
}
|
||||
ImGui::PopItemWidth();
|
||||
|
||||
UIWidgets::LabeledRightAlignedEnhancementCombobox("Window Type", "gCheckTrackerWindowType", windowType, TRACKER_WINDOW_WINDOW);
|
||||
if (CVarGetInteger("gCheckTrackerWindowType", TRACKER_WINDOW_WINDOW) == TRACKER_WINDOW_FLOATING) {
|
||||
UIWidgets::EnhancementCheckbox("Enable Dragging", "gCheckTrackerHudEditMode");
|
||||
UIWidgets::EnhancementCheckbox("Only enable while paused", "gCheckTrackerShowOnlyPaused");
|
||||
UIWidgets::LabeledRightAlignedEnhancementCombobox("Display Mode", "gCheckTrackerDisplayType", displayType, 0);
|
||||
if (CVarGetInteger("gCheckTrackerDisplayType", TRACKER_DISPLAY_ALWAYS) == TRACKER_DISPLAY_COMBO_BUTTON) {
|
||||
UIWidgets::LabeledRightAlignedEnhancementCombobox("Combo Button 1", "gCheckTrackerComboButton1", buttonStrings, TRACKER_COMBO_BUTTON_L);
|
||||
UIWidgets::LabeledRightAlignedEnhancementCombobox("Combo Button 2", "gCheckTrackerComboButton2", buttonStrings, TRACKER_COMBO_BUTTON_R);
|
||||
UIWidgets::LabeledRightAlignedEnhancementCombobox("Window Type", CVAR_TRACKER_CHECK("WindowType"), windowType, TRACKER_WINDOW_WINDOW);
|
||||
if (CVarGetInteger(CVAR_TRACKER_CHECK("WindowType"), TRACKER_WINDOW_WINDOW) == TRACKER_WINDOW_FLOATING) {
|
||||
UIWidgets::EnhancementCheckbox("Enable Dragging", CVAR_TRACKER_CHECK("Draggable"));
|
||||
UIWidgets::EnhancementCheckbox("Only enable while paused", CVAR_TRACKER_CHECK("ShowOnlyPaused"));
|
||||
UIWidgets::LabeledRightAlignedEnhancementCombobox("Display Mode", CVAR_TRACKER_CHECK("DisplayType"), displayType, 0);
|
||||
if (CVarGetInteger(CVAR_TRACKER_CHECK("DisplayType"), TRACKER_DISPLAY_ALWAYS) == TRACKER_DISPLAY_COMBO_BUTTON) {
|
||||
UIWidgets::LabeledRightAlignedEnhancementCombobox("Combo Button 1", CVAR_TRACKER_CHECK("ComboButton1"), buttonStrings, TRACKER_COMBO_BUTTON_L);
|
||||
UIWidgets::LabeledRightAlignedEnhancementCombobox("Combo Button 2", CVAR_TRACKER_CHECK("ComboButton2"), buttonStrings, TRACKER_COMBO_BUTTON_R);
|
||||
}
|
||||
}
|
||||
UIWidgets::EnhancementCheckbox("Vanilla/MQ Dungeon Spoilers", "gCheckTrackerOptionMQSpoilers");
|
||||
UIWidgets::EnhancementCheckbox("Vanilla/MQ Dungeon Spoilers", CVAR_TRACKER_CHECK("MQSpoilers"));
|
||||
UIWidgets::Tooltip("If enabled, Vanilla/MQ dungeons will show on the tracker immediately. Otherwise, Vanilla/MQ dungeon locations must be unlocked.");
|
||||
if (UIWidgets::EnhancementCheckbox("Hide right-side shop item checks", "gCheckTrackerOptionHideRightShopChecks", false, "", UIWidgets::CheckboxGraphics::Cross, true)) {
|
||||
if (UIWidgets::EnhancementCheckbox("Hide right-side shop item checks", CVAR_TRACKER_CHECK("HideRightShopChecks"), false, "", UIWidgets::CheckboxGraphics::Cross, true)) {
|
||||
hideShopRightChecks = !hideShopRightChecks;
|
||||
RecalculateAreaTotals();
|
||||
}
|
||||
UIWidgets::Tooltip("If enabled, will prevent the tracker from displaying slots 1-4 in all shops.");
|
||||
if (UIWidgets::EnhancementCheckbox("Always show gold skulltulas", "gCheckTrackerOptionAlwaysShowGSLocs", false, "")) {
|
||||
if (UIWidgets::EnhancementCheckbox("Always show gold skulltulas", CVAR_TRACKER_CHECK("AlwaysShowGSLocs"), false, "")) {
|
||||
alwaysShowGS = !alwaysShowGS;
|
||||
RecalculateAreaTotals();
|
||||
}
|
||||
UIWidgets::Tooltip("If enabled, will show GS locations in the tracker regardless of tokensanity settings.");
|
||||
|
||||
// Filtering settings
|
||||
UIWidgets::PaddedSeparator();
|
||||
UIWidgets::EnhancementCheckbox("Filter Empty Areas", CVAR_TRACKER_CHECK("HideFilteredAreas"), false, "", UIWidgets::CheckboxGraphics::Checkmark, true);
|
||||
UIWidgets::Tooltip("If enabled, will hide area headers that have no locations matching filter");
|
||||
|
||||
ImGui::TableNextColumn();
|
||||
|
||||
CheckTracker::ImGuiDrawTwoColorPickerSection("Area Incomplete", "gCheckTrackerAreaMainIncompleteColor", "gCheckTrackerAreaExtraIncompleteColor", Color_Area_Incomplete_Main, Color_Area_Incomplete_Extra, Color_Main_Default, Color_Area_Incomplete_Extra_Default, "gCheckTrackerAreaIncompleteHide", "");
|
||||
CheckTracker::ImGuiDrawTwoColorPickerSection("Area Complete", "gCheckTrackerAreaMainCompleteColor", "gCheckTrackerAreaExtraCompleteColor", Color_Area_Complete_Main, Color_Area_Complete_Extra, Color_Main_Default, Color_Area_Complete_Extra_Default, "gCheckTrackerAreaCompleteHide", "");
|
||||
CheckTracker::ImGuiDrawTwoColorPickerSection("Unchecked", "gCheckTrackerUncheckedMainColor", "gCheckTrackerUncheckedExtraColor", Color_Unchecked_Main, Color_Unchecked_Extra, Color_Main_Default, Color_Unchecked_Extra_Default, "gCheckTrackerUncheckedHide", "Checks you have not interacted with at all.");
|
||||
CheckTracker::ImGuiDrawTwoColorPickerSection("Skipped", "gCheckTrackerSkippedMainColor", "gCheckTrackerSkippedExtraColor", Color_Skipped_Main, Color_Skipped_Extra, Color_Main_Default, Color_Skipped_Extra_Default, "gCheckTrackerSkippedHide", "");
|
||||
CheckTracker::ImGuiDrawTwoColorPickerSection("Seen", "gCheckTrackerSeenMainColor", "gCheckTrackerSeenExtraColor", Color_Seen_Main, Color_Seen_Extra, Color_Main_Default, Color_Seen_Extra_Default, "gCheckTrackerSeenHide", "Used for shops. Shows item names for shop slots when walking in, and prices when highlighting them in buy mode.");
|
||||
CheckTracker::ImGuiDrawTwoColorPickerSection("Scummed", "gCheckTrackerScummedMainColor", "gCheckTrackerScummedExtraColor", Color_Scummed_Main, Color_Scummed_Extra, Color_Main_Default, Color_Scummed_Extra_Default, "gCheckTrackerScummedHide", "Checks you collect, but then reload before saving so you no longer have them.");
|
||||
//CheckTracker::ImGuiDrawTwoColorPickerSection("Hinted (WIP)", "gCheckTrackerHintedMainColor", "gCheckTrackerHintedExtraColor", Color_Hinted_Main, Color_Hinted_Extra, Color_Main_Default, Color_Hinted_Extra_Default, "gCheckTrackerHintedHide", "");
|
||||
CheckTracker::ImGuiDrawTwoColorPickerSection("Collected", "gCheckTrackerCollectedMainColor", "gCheckTrackerCollectedExtraColor", Color_Collected_Main, Color_Collected_Extra, Color_Main_Default, Color_Collected_Extra_Default, "gCheckTrackerCollectedHide", "Checks you have collected without saving or reloading yet.");
|
||||
CheckTracker::ImGuiDrawTwoColorPickerSection("Saved", "gCheckTrackerSavedMainColor", "gCheckTrackerSavedExtraColor", Color_Saved_Main, Color_Saved_Extra, Color_Main_Default, Color_Saved_Extra_Default, "gCheckTrackerSavedHide", "Checks that you saved the game while having collected.");
|
||||
CheckTracker::ImGuiDrawTwoColorPickerSection("Area Incomplete", CVAR_TRACKER_CHECK("AreaIncomplete.MainColor"), CVAR_TRACKER_CHECK("AreaIncomplete.ExtraColor"), Color_Area_Incomplete_Main, Color_Area_Incomplete_Extra, Color_Main_Default, Color_Area_Incomplete_Extra_Default, CVAR_TRACKER_CHECK("AreaIncomplete.Hide"), "");
|
||||
CheckTracker::ImGuiDrawTwoColorPickerSection("Area Complete", CVAR_TRACKER_CHECK("AreaComplete.MainColor"), CVAR_TRACKER_CHECK("AreaComplete.ExtraColor"), Color_Area_Complete_Main, Color_Area_Complete_Extra, Color_Main_Default, Color_Area_Complete_Extra_Default, CVAR_TRACKER_CHECK("AreaComplete.Hide"), "");
|
||||
CheckTracker::ImGuiDrawTwoColorPickerSection("Unchecked", CVAR_TRACKER_CHECK("Unchecked.MainColor"), CVAR_TRACKER_CHECK("Unchecked.ExtraColor"), Color_Unchecked_Main, Color_Unchecked_Extra, Color_Main_Default, Color_Unchecked_Extra_Default, CVAR_TRACKER_CHECK("Unchecked.Hide"), "Checks you have not interacted with at all.");
|
||||
CheckTracker::ImGuiDrawTwoColorPickerSection("Skipped", CVAR_TRACKER_CHECK("Skipped.MainColor"), CVAR_TRACKER_CHECK("Skipped.ExtraColor"), Color_Skipped_Main, Color_Skipped_Extra, Color_Main_Default, Color_Skipped_Extra_Default, CVAR_TRACKER_CHECK("Skipped.Hide"), "");
|
||||
CheckTracker::ImGuiDrawTwoColorPickerSection("Seen", CVAR_TRACKER_CHECK("Seen.MainColor"), CVAR_TRACKER_CHECK("Seen.ExtraColor"), Color_Seen_Main, Color_Seen_Extra, Color_Main_Default, Color_Seen_Extra_Default, CVAR_TRACKER_CHECK("Seen.Hide"), "Used for shops. Shows item names for shop slots when walking in, and prices when highlighting them in buy mode.");
|
||||
CheckTracker::ImGuiDrawTwoColorPickerSection("Scummed", CVAR_TRACKER_CHECK("Scummed.MainColor"), CVAR_TRACKER_CHECK("Scummed.ExtraColor"), Color_Scummed_Main, Color_Scummed_Extra, Color_Main_Default, Color_Scummed_Extra_Default, CVAR_TRACKER_CHECK("Scummed.Hide"), "Checks you collect, but then reload before saving so you no longer have them.");
|
||||
//CheckTracker::ImGuiDrawTwoColorPickerSection("Hinted (WIP)", CVAR_TRACKER_CHECK("Hinted.MainColor"), CVAR_TRACKER_CHECK("Hinted.ExtraColor"), Color_Hinted_Main, Color_Hinted_Extra, Color_Main_Default, Color_Hinted_Extra_Default, CVAR_TRACKER_CHECK("Hinted.Hide"), "");
|
||||
CheckTracker::ImGuiDrawTwoColorPickerSection("Collected", CVAR_TRACKER_CHECK("Collected.MainColor"), CVAR_TRACKER_CHECK("Collected.ExtraColor"), Color_Collected_Main, Color_Collected_Extra, Color_Main_Default, Color_Collected_Extra_Default, CVAR_TRACKER_CHECK("Collected.Hide"), "Checks you have collected without saving or reloading yet.");
|
||||
CheckTracker::ImGuiDrawTwoColorPickerSection("Saved", CVAR_TRACKER_CHECK("Saved.MainColor"), CVAR_TRACKER_CHECK("Saved.ExtraColor"), Color_Saved_Main, Color_Saved_Extra, Color_Main_Default, Color_Saved_Extra_Default, CVAR_TRACKER_CHECK("Saved.Hide"), "Checks that you saved the game while having collected.");
|
||||
|
||||
ImGui::PopStyleVar(1);
|
||||
ImGui::EndTable();
|
||||
@ -1674,25 +1711,25 @@ void CheckTrackerSettingsWindow::DrawElement() {
|
||||
}
|
||||
|
||||
void CheckTrackerWindow::InitElement() {
|
||||
Color_Background = CVarGetColor("gCheckTrackerBgColor", Color_Bg_Default);
|
||||
Color_Area_Incomplete_Main = CVarGetColor("gCheckTrackerAreaMainIncompleteColor", Color_Main_Default);
|
||||
Color_Area_Incomplete_Extra = CVarGetColor("gCheckTrackerAreaExtraIncompleteColor", Color_Area_Incomplete_Extra_Default);
|
||||
Color_Area_Complete_Main = CVarGetColor("gCheckTrackerAreaMainCompleteColor", Color_Main_Default);
|
||||
Color_Area_Complete_Extra = CVarGetColor("gCheckTrackerAreaExtraCompleteColor", Color_Area_Complete_Extra_Default);
|
||||
Color_Unchecked_Main = CVarGetColor("gCheckTrackerUncheckedMainColor", Color_Main_Default);
|
||||
Color_Unchecked_Extra = CVarGetColor("gCheckTrackerUncheckedExtraColor", Color_Unchecked_Extra_Default);
|
||||
Color_Skipped_Main = CVarGetColor("gCheckTrackerSkippedMainColor", Color_Main_Default);
|
||||
Color_Skipped_Extra = CVarGetColor("gCheckTrackerSkippedExtraColor", Color_Skipped_Extra_Default);
|
||||
Color_Seen_Main = CVarGetColor("gCheckTrackerSeenMainColor", Color_Main_Default);
|
||||
Color_Seen_Extra = CVarGetColor("gCheckTrackerSeenExtraColor", Color_Seen_Extra_Default);
|
||||
Color_Hinted_Main = CVarGetColor("gCheckTrackerHintedMainColor", Color_Main_Default);
|
||||
Color_Hinted_Extra = CVarGetColor("gCheckTrackerHintedExtraColor", Color_Hinted_Extra_Default);
|
||||
Color_Collected_Main = CVarGetColor("gCheckTrackerCollectedMainColor", Color_Main_Default);
|
||||
Color_Collected_Extra = CVarGetColor("gCheckTrackerCollectedExtraColor", Color_Collected_Extra_Default);
|
||||
Color_Scummed_Main = CVarGetColor("gCheckTrackerScummedMainColor", Color_Main_Default);
|
||||
Color_Scummed_Extra = CVarGetColor("gCheckTrackerScummedExtraColor", Color_Scummed_Extra_Default);
|
||||
Color_Saved_Main = CVarGetColor("gCheckTrackerSavedMainColor", Color_Main_Default);
|
||||
Color_Saved_Extra = CVarGetColor("gCheckTrackerSavedExtraColor", Color_Saved_Extra_Default);
|
||||
Color_Background = CVarGetColor(CVAR_TRACKER_CHECK("BgColor"), Color_Bg_Default);
|
||||
Color_Area_Incomplete_Main = CVarGetColor(CVAR_TRACKER_CHECK("AreaIncomplete.MainColor"), Color_Main_Default);
|
||||
Color_Area_Incomplete_Extra = CVarGetColor(CVAR_TRACKER_CHECK("AreaIncomplete.ExtraColor"), Color_Area_Incomplete_Extra_Default);
|
||||
Color_Area_Complete_Main = CVarGetColor(CVAR_TRACKER_CHECK("AreaComplete.MainColor"), Color_Main_Default);
|
||||
Color_Area_Complete_Extra = CVarGetColor(CVAR_TRACKER_CHECK("AreaComplete.ExtraColor"), Color_Area_Complete_Extra_Default);
|
||||
Color_Unchecked_Main = CVarGetColor(CVAR_TRACKER_CHECK("Unchecked.MainColor"), Color_Main_Default);
|
||||
Color_Unchecked_Extra = CVarGetColor(CVAR_TRACKER_CHECK("Unchecked.ExtraColor"), Color_Unchecked_Extra_Default);
|
||||
Color_Skipped_Main = CVarGetColor(CVAR_TRACKER_CHECK("Skipped.MainColor"), Color_Main_Default);
|
||||
Color_Skipped_Extra = CVarGetColor(CVAR_TRACKER_CHECK("Skipped.ExtraColor"), Color_Skipped_Extra_Default);
|
||||
Color_Seen_Main = CVarGetColor(CVAR_TRACKER_CHECK("Seen.MainColor"), Color_Main_Default);
|
||||
Color_Seen_Extra = CVarGetColor(CVAR_TRACKER_CHECK("Seen.ExtraColor"), Color_Seen_Extra_Default);
|
||||
Color_Hinted_Main = CVarGetColor(CVAR_TRACKER_CHECK("Hinted.MainColor"), Color_Main_Default);
|
||||
Color_Hinted_Extra = CVarGetColor(CVAR_TRACKER_CHECK("Hinted.ExtraColor"), Color_Hinted_Extra_Default);
|
||||
Color_Collected_Main = CVarGetColor(CVAR_TRACKER_CHECK("Collected.MainColor"), Color_Main_Default);
|
||||
Color_Collected_Extra = CVarGetColor(CVAR_TRACKER_CHECK("Collected.ExtraColor"), Color_Collected_Extra_Default);
|
||||
Color_Scummed_Main = CVarGetColor(CVAR_TRACKER_CHECK("Scummed.MainColor"), Color_Main_Default);
|
||||
Color_Scummed_Extra = CVarGetColor(CVAR_TRACKER_CHECK("Scummed.ExtraColor"), Color_Scummed_Extra_Default);
|
||||
Color_Saved_Main = CVarGetColor(CVAR_TRACKER_CHECK("Saved.MainColor"), Color_Main_Default);
|
||||
Color_Saved_Extra = CVarGetColor(CVAR_TRACKER_CHECK("Saved.ExtraColor"), Color_Saved_Extra_Default);
|
||||
|
||||
SaveManager::Instance->AddInitFunction(InitTrackerData);
|
||||
sectionId = SaveManager::Instance->AddSaveFunction("trackerData", 1, SaveFile, true, -1);
|
||||
@ -1708,8 +1745,8 @@ void CheckTrackerWindow::InitElement() {
|
||||
// GameInteractor::Instance->RegisterGameHook<GameInteractor::OnSceneFlagSet>(CheckTrackerSceneFlagSet);
|
||||
// GameInteractor::Instance->RegisterGameHook<GameInteractor::OnFlagSet>(CheckTrackerFlagSet);
|
||||
|
||||
hideShopRightChecks = CVarGetInteger("gCheckTrackerOptionHideRightShopChecks", 1);
|
||||
alwaysShowGS = CVarGetInteger("gCheckTrackerOptionAlwaysShowGSLocs", 0);
|
||||
hideShopRightChecks = CVarGetInteger(CVAR_TRACKER_CHECK("HideRightShopChecks"), 1);
|
||||
alwaysShowGS = CVarGetInteger(CVAR_TRACKER_CHECK("AlwaysShowGSLocs"), 0);
|
||||
|
||||
//LocationTable_Init();
|
||||
}
|
||||
|
@ -7,9 +7,9 @@
|
||||
|
||||
namespace CheckTracker {
|
||||
|
||||
class CheckTrackerSettingsWindow : public LUS::GuiWindow {
|
||||
class CheckTrackerSettingsWindow : public Ship::GuiWindow {
|
||||
public:
|
||||
using LUS::GuiWindow::GuiWindow;
|
||||
using GuiWindow::GuiWindow;
|
||||
~CheckTrackerSettingsWindow() {};
|
||||
|
||||
protected:
|
||||
@ -18,9 +18,9 @@ class CheckTrackerSettingsWindow : public LUS::GuiWindow {
|
||||
void UpdateElement() override {};
|
||||
};
|
||||
|
||||
class CheckTrackerWindow : public LUS::GuiWindow {
|
||||
class CheckTrackerWindow : public Ship::GuiWindow {
|
||||
public:
|
||||
using LUS::GuiWindow::GuiWindow;
|
||||
using GuiWindow::GuiWindow;
|
||||
~CheckTrackerWindow() {};
|
||||
|
||||
protected:
|
||||
|
@ -396,7 +396,7 @@ void Entrance_SetSavewarpEntrance(void) {
|
||||
gSaveContext.entranceIndex = ENTR_THIEVES_HIDEOUT_0; // Gerudo Fortress -> Thieve's Hideout spawn 0
|
||||
} else if (scene == SCENE_LINKS_HOUSE) {
|
||||
gSaveContext.entranceIndex = Entrance_OverrideNextIndex(ENTR_LINKS_HOUSE_0);
|
||||
} else if (CVarGetInteger("gRememberSaveLocation", 0) && scene != SCENE_FAIRYS_FOUNTAIN && scene != SCENE_GROTTOS &&
|
||||
} else if (CVarGetInteger(CVAR_ENHANCEMENT("RememberSaveLocation"), 0) && scene != SCENE_FAIRYS_FOUNTAIN && scene != SCENE_GROTTOS &&
|
||||
gSaveContext.entranceIndex != ENTR_LOAD_OPENING) {
|
||||
// Use the saved entrance value with remember save location, except when in grottos/fairy fountains or if
|
||||
// the entrance index is -1 (new save)
|
||||
|
@ -668,25 +668,25 @@ void EntranceTrackerWindow::DrawElement() {
|
||||
ImGui::TableNextColumn();
|
||||
|
||||
ImGui::Text("Sort By");
|
||||
UIWidgets::EnhancementRadioButton("To", "gEntranceTrackerSortBy", 0);
|
||||
UIWidgets::EnhancementRadioButton("To", CVAR_TRACKER_ENTRANCE("SortBy"), 0);
|
||||
UIWidgets::Tooltip("Sort entrances by the original source entrance");
|
||||
UIWidgets::EnhancementRadioButton("From", "gEntranceTrackerSortBy", 1);
|
||||
UIWidgets::EnhancementRadioButton("From", CVAR_TRACKER_ENTRANCE("SortBy"), 1);
|
||||
UIWidgets::Tooltip("Sort entrances by the overrided destination");
|
||||
|
||||
UIWidgets::Spacer(2.0f);
|
||||
|
||||
ImGui::Text("List Items");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Auto scroll", "gEntranceTrackerAutoScroll", true, false);
|
||||
UIWidgets::PaddedEnhancementCheckbox("Auto scroll", CVAR_TRACKER_ENTRANCE("AutoScroll"), true, false);
|
||||
UIWidgets::Tooltip("Automatically scroll to the first aviable entrance in the current scene");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Highlight previous", "gEntranceTrackerHighlightPrevious", true, false);
|
||||
UIWidgets::PaddedEnhancementCheckbox("Highlight previous", CVAR_TRACKER_ENTRANCE("HighlightPrevious"), true, false);
|
||||
UIWidgets::Tooltip("Highlight the previous entrance that Link came from");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Highlight available", "gEntranceTrackerHighlightAvailable", true, false);
|
||||
UIWidgets::PaddedEnhancementCheckbox("Highlight available", CVAR_TRACKER_ENTRANCE("HighlightAvailable"), true, false);
|
||||
UIWidgets::Tooltip("Highlight available entrances in the current scene");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Hide undiscovered", "gEntranceTrackerCollapseUndiscovered", true, false);
|
||||
UIWidgets::PaddedEnhancementCheckbox("Hide undiscovered", CVAR_TRACKER_ENTRANCE("CollapseUndiscovered"), true, false);
|
||||
UIWidgets::Tooltip("Collapse undiscovered entrances towards the bottom of each group");
|
||||
bool disableHideReverseEntrances = OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_DECOUPLED_ENTRANCES) == RO_GENERIC_ON;
|
||||
static const char* disableHideReverseEntrancesText = "This option is disabled because \"Decouple Entrances\" is enabled.";
|
||||
UIWidgets::PaddedEnhancementCheckbox("Hide reverse", "gEntranceTrackerHideReverseEntrances", true, false,
|
||||
UIWidgets::PaddedEnhancementCheckbox("Hide reverse", CVAR_TRACKER_ENTRANCE("HideReverseEntrances"), true, false,
|
||||
disableHideReverseEntrances, disableHideReverseEntrancesText, UIWidgets::CheckboxGraphics::Cross, true);
|
||||
UIWidgets::Tooltip("Hide reverse entrance transitions when Decouple Entrances is off");
|
||||
UIWidgets::Spacer(0);
|
||||
@ -694,17 +694,17 @@ void EntranceTrackerWindow::DrawElement() {
|
||||
ImGui::TableNextColumn();
|
||||
|
||||
ImGui::Text("Group By");
|
||||
UIWidgets::EnhancementRadioButton("Area", "gEntranceTrackerGroupBy", 0);
|
||||
UIWidgets::EnhancementRadioButton("Area", CVAR_TRACKER_ENTRANCE("GroupBy"), 0);
|
||||
UIWidgets::Tooltip("Group entrances by their area");
|
||||
UIWidgets::EnhancementRadioButton("Type", "gEntranceTrackerGroupBy", 1);
|
||||
UIWidgets::EnhancementRadioButton("Type", CVAR_TRACKER_ENTRANCE("GroupBy"), 1);
|
||||
UIWidgets::Tooltip("Group entrances by their entrance type");
|
||||
|
||||
UIWidgets::Spacer(2.0f);
|
||||
|
||||
ImGui::Text("Spoiler Reveal");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Show \"To\"", "gEntranceTrackerShowTo", true, false);
|
||||
UIWidgets::PaddedEnhancementCheckbox("Show \"To\"", CVAR_TRACKER_ENTRANCE("ShowTo"), true, false);
|
||||
UIWidgets::Tooltip("Reveal the \"To\" entrance for undiscovered entrances");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Show \"From\"", "gEntranceTrackerShowFrom", true, false);
|
||||
UIWidgets::PaddedEnhancementCheckbox("Show \"From\"", CVAR_TRACKER_ENTRANCE("ShowFrom"), true, false);
|
||||
UIWidgets::Tooltip("Reveal the \"From\" entrance for undiscovered entrances");
|
||||
|
||||
ImGui::EndTable();
|
||||
@ -752,8 +752,8 @@ void EntranceTrackerWindow::DrawElement() {
|
||||
nextTreeState = 2;
|
||||
}
|
||||
|
||||
uint8_t destToggle = CVarGetInteger("gEntranceTrackerSortBy", 0);
|
||||
uint8_t groupToggle = CVarGetInteger("gEntranceTrackerGroupBy", 0);
|
||||
uint8_t destToggle = CVarGetInteger(CVAR_TRACKER_ENTRANCE("SortBy"), 0);
|
||||
uint8_t groupToggle = CVarGetInteger(CVAR_TRACKER_ENTRANCE("GroupBy"), 0);
|
||||
|
||||
// Combine destToggle and groupToggle to get a range of 0-3
|
||||
uint8_t groupType = destToggle + (groupToggle * 2);
|
||||
@ -804,7 +804,7 @@ void EntranceTrackerWindow::DrawElement() {
|
||||
// However, if entrances are decoupled, then all transitions need to be displayed, so we proceed with the filtering
|
||||
if ((original->type == ENTRANCE_TYPE_DUNGEON || original->type == ENTRANCE_TYPE_GROTTO || original->type == ENTRANCE_TYPE_INTERIOR) &&
|
||||
(original->oneExit != 1 && OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_DECOUPLED_ENTRANCES) == RO_GENERIC_OFF) &&
|
||||
CVarGetInteger("gEntranceTrackerHideReverseEntrances", 1) == 1) {
|
||||
CVarGetInteger(CVAR_TRACKER_ENTRANCE("HideReverseEntrances"), 1) == 1) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -815,8 +815,8 @@ void EntranceTrackerWindow::DrawElement() {
|
||||
|
||||
bool isDiscovered = IsEntranceDiscovered(entrance.index);
|
||||
|
||||
bool showOriginal = (!destToggle ? CVarGetInteger("gEntranceTrackerShowTo", 0) : CVarGetInteger("gEntranceTrackerShowFrom", 0)) || isDiscovered;
|
||||
bool showOverride = (!destToggle ? CVarGetInteger("gEntranceTrackerShowFrom", 0) : CVarGetInteger("gEntranceTrackerShowTo", 0)) || isDiscovered;
|
||||
bool showOriginal = (!destToggle ? CVarGetInteger(CVAR_TRACKER_ENTRANCE("ShowTo"), 0) : CVarGetInteger(CVAR_TRACKER_ENTRANCE("ShowFrom"), 0)) || isDiscovered;
|
||||
bool showOverride = (!destToggle ? CVarGetInteger(CVAR_TRACKER_ENTRANCE("ShowFrom"), 0) : CVarGetInteger(CVAR_TRACKER_ENTRANCE("ShowTo"), 0)) || isDiscovered;
|
||||
|
||||
const char* origSrcAreaName = spoilerEntranceGroupNames[original->srcGroup].c_str();
|
||||
const char* origTypeName = groupTypeNames[original->type].c_str();
|
||||
@ -829,7 +829,7 @@ void EntranceTrackerWindow::DrawElement() {
|
||||
const char* rplcDstName = showOverride ? override->destination.c_str() : "";
|
||||
|
||||
// Filter for entrances by group name, type, source/destination names, and meta tags
|
||||
if ((!locationSearch.IsActive() && (showOriginal || showOverride || !CVarGetInteger("gEntranceTrackerCollapseUndiscovered", 0))) ||
|
||||
if ((!locationSearch.IsActive() && (showOriginal || showOverride || !CVarGetInteger(CVAR_TRACKER_ENTRANCE("CollapseUndiscovered"), 0))) ||
|
||||
((showOriginal && (locationSearch.PassFilter(origSrcName) ||
|
||||
locationSearch.PassFilter(origDstName) || locationSearch.PassFilter(origSrcAreaName) ||
|
||||
locationSearch.PassFilter(origTypeName) || locationSearch.PassFilter(original->metaTag.c_str()))) ||
|
||||
@ -867,8 +867,8 @@ void EntranceTrackerWindow::DrawElement() {
|
||||
|
||||
bool isDiscovered = IsEntranceDiscovered(entrance.index);
|
||||
|
||||
bool showOriginal = (!destToggle ? CVarGetInteger("gEntranceTrackerShowTo", 0) : CVarGetInteger("gEntranceTrackerShowFrom", 0)) || isDiscovered;
|
||||
bool showOverride = (!destToggle ? CVarGetInteger("gEntranceTrackerShowFrom", 0) : CVarGetInteger("gEntranceTrackerShowTo", 0)) || isDiscovered;
|
||||
bool showOriginal = (!destToggle ? CVarGetInteger(CVAR_TRACKER_ENTRANCE("ShowTo"), 0) : CVarGetInteger(CVAR_TRACKER_ENTRANCE("ShowFrom"), 0)) || isDiscovered;
|
||||
bool showOverride = (!destToggle ? CVarGetInteger(CVAR_TRACKER_ENTRANCE("ShowFrom"), 0) : CVarGetInteger(CVAR_TRACKER_ENTRANCE("ShowTo"), 0)) || isDiscovered;
|
||||
|
||||
const char* unknown = "???";
|
||||
|
||||
@ -882,16 +882,16 @@ void EntranceTrackerWindow::DrawElement() {
|
||||
// Handle highlighting and auto scroll
|
||||
if ((original->index == lastEntranceIndex ||
|
||||
(override->reverseIndex == lastEntranceIndex && OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_DECOUPLED_ENTRANCES) == RO_GENERIC_OFF)) &&
|
||||
CVarGetInteger("gEntranceTrackerHighlightPrevious", 0)) {
|
||||
CVarGetInteger(CVAR_TRACKER_ENTRANCE("HighlightPrevious"), 0)) {
|
||||
color = COLOR_ORANGE;
|
||||
} else if (LinkIsInArea(original) != -1) {
|
||||
if (CVarGetInteger("gEntranceTrackerHighlightAvailable", 0)) {
|
||||
if (CVarGetInteger(CVAR_TRACKER_ENTRANCE("HighlightAvailable"), 0)) {
|
||||
color = COLOR_GREEN;
|
||||
}
|
||||
|
||||
if (doAreaScroll) {
|
||||
doAreaScroll = false;
|
||||
if (CVarGetInteger("gEntranceTrackerAutoScroll", 0)) {
|
||||
if (CVarGetInteger(CVAR_TRACKER_ENTRANCE("AutoScroll"), 0)) {
|
||||
ImGui::SetScrollHereY(0.0f);
|
||||
}
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ s16 GetLastEntranceOverride();
|
||||
s16 GetCurrentGrottoId();
|
||||
const EntranceData* GetEntranceData(s16);
|
||||
|
||||
class EntranceTrackerWindow : public LUS::GuiWindow {
|
||||
class EntranceTrackerWindow : public Ship::GuiWindow {
|
||||
public:
|
||||
using GuiWindow::GuiWindow;
|
||||
|
||||
|
@ -461,17 +461,17 @@ void DrawItemCount(ItemTrackerItem item, bool hideMax) {
|
||||
if (!GameInteractor::IsSaveLoaded()) {
|
||||
return;
|
||||
}
|
||||
int iconSize = CVarGetInteger("gItemTrackerIconSize", 36);
|
||||
int textSize = CVarGetInteger("gTrackers.ItemTracker.ItemTrackerTextSize", 13);
|
||||
int iconSize = CVarGetInteger(CVAR_TRACKER_ITEM("IconSize"), 36);
|
||||
int textSize = CVarGetInteger(CVAR_TRACKER_ITEM("TextSize"), 13);
|
||||
ItemTrackerNumbers currentAndMax = GetItemCurrentAndMax(item);
|
||||
ImVec2 p = ImGui::GetCursorScreenPos();
|
||||
int32_t trackerNumberDisplayMode = CVarGetInteger("gItemTrackerCapacityTrack", ITEM_TRACKER_NUMBER_CURRENT_CAPACITY_ONLY);
|
||||
int32_t trackerKeyNumberDisplayMode = CVarGetInteger("gItemTrackerKeyTrack", KEYS_COLLECTED_MAX);
|
||||
int32_t trackerNumberDisplayMode = CVarGetInteger(CVAR_TRACKER_ITEM("ItemCountType"), ITEM_TRACKER_NUMBER_CURRENT_CAPACITY_ONLY);
|
||||
int32_t trackerKeyNumberDisplayMode = CVarGetInteger(CVAR_TRACKER_ITEM("KeyCounts"), KEYS_COLLECTED_MAX);
|
||||
float textScalingFactor = static_cast<float>(iconSize) / 36.0f;
|
||||
uint32_t actualItemId = INV_CONTENT(item.id);
|
||||
bool hasItem = actualItemId != ITEM_NONE;
|
||||
|
||||
if (CVarGetInteger("gTrackers.ItemTracker.HookshotIdentifier", 0)) {
|
||||
if (CVarGetInteger(CVAR_TRACKER_ITEM("HookshotIdentifier"), 0)) {
|
||||
if ((actualItemId == ITEM_HOOKSHOT || actualItemId == ITEM_LONGSHOT) && hasItem) {
|
||||
|
||||
// Calculate the scaled position for the text
|
||||
@ -517,7 +517,7 @@ void DrawItemCount(ItemTrackerItem item, bool hideMax) {
|
||||
ImU32 currentColor = IM_COL_WHITE;
|
||||
ImU32 maxColor = item.id == QUEST_SKULL_TOKEN ? IM_COL_RED : IM_COL_GREEN;
|
||||
|
||||
bool shouldAlignToLeft = CVarGetInteger("gItemTrackerCurrentOnLeft", 0) &&
|
||||
bool shouldAlignToLeft = CVarGetInteger(CVAR_TRACKER_ITEM("ItemCountAlignLeft"), 0) &&
|
||||
trackerNumberDisplayMode != ITEM_TRACKER_NUMBER_CAPACITY &&
|
||||
trackerNumberDisplayMode != ITEM_TRACKER_NUMBER_AMMO;
|
||||
|
||||
@ -577,7 +577,7 @@ void DrawItemCount(ItemTrackerItem item, bool hideMax) {
|
||||
uint8_t piecesTotal = (OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_TRIFORCE_HUNT_PIECES_TOTAL) + 1);
|
||||
ImU32 currentColor = gSaveContext.triforcePiecesCollected >= piecesRequired ? IM_COL_GREEN : IM_COL_WHITE;
|
||||
ImU32 maxColor = IM_COL_GREEN;
|
||||
int32_t trackerTriforcePieceNumberDisplayMode = CVarGetInteger("gItemTrackerTriforcePieceTrack", TRIFORCE_PIECE_COLLECTED_REQUIRED_MAX);
|
||||
int32_t trackerTriforcePieceNumberDisplayMode = CVarGetInteger(CVAR_TRACKER_ITEM("TriforcePieceCounts"), TRIFORCE_PIECE_COLLECTED_REQUIRED_MAX);
|
||||
|
||||
currentString += std::to_string(gSaveContext.triforcePiecesCollected);
|
||||
currentString += "/";
|
||||
@ -607,8 +607,8 @@ void DrawItemCount(ItemTrackerItem item, bool hideMax) {
|
||||
|
||||
void DrawEquip(ItemTrackerItem item) {
|
||||
bool hasEquip = HasEquipment(item);
|
||||
int iconSize = CVarGetInteger("gItemTrackerIconSize", 36);
|
||||
ImGui::Image(LUS::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(hasEquip && IsValidSaveFile() ? item.name : item.nameFaded),
|
||||
int iconSize = CVarGetInteger(CVAR_TRACKER_ITEM("IconSize"), 36);
|
||||
ImGui::Image(Ship::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(hasEquip && IsValidSaveFile() ? item.name : item.nameFaded),
|
||||
ImVec2(iconSize, iconSize), ImVec2(0, 0), ImVec2(1, 1));
|
||||
|
||||
UIWidgets::SetLastItemHoverText(SohUtils::GetItemName(item.id));
|
||||
@ -616,9 +616,9 @@ void DrawEquip(ItemTrackerItem item) {
|
||||
|
||||
void DrawQuest(ItemTrackerItem item) {
|
||||
bool hasQuestItem = HasQuestItem(item);
|
||||
int iconSize = CVarGetInteger("gItemTrackerIconSize", 36);
|
||||
int iconSize = CVarGetInteger(CVAR_TRACKER_ITEM("IconSize"), 36);
|
||||
ImGui::BeginGroup();
|
||||
ImGui::Image(LUS::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(hasQuestItem && IsValidSaveFile() ? item.name : item.nameFaded),
|
||||
ImGui::Image(Ship::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(hasQuestItem && IsValidSaveFile() ? item.name : item.nameFaded),
|
||||
ImVec2(iconSize, iconSize), ImVec2(0, 0), ImVec2(1, 1));
|
||||
|
||||
if (item.id == QUEST_SKULL_TOKEN) {
|
||||
@ -633,7 +633,7 @@ void DrawQuest(ItemTrackerItem item) {
|
||||
void DrawItem(ItemTrackerItem item) {
|
||||
|
||||
uint32_t actualItemId = GameInteractor::IsSaveLoaded() ? INV_CONTENT(item.id) : ITEM_NONE;
|
||||
int iconSize = CVarGetInteger("gItemTrackerIconSize", 36);
|
||||
int iconSize = CVarGetInteger(CVAR_TRACKER_ITEM("IconSize"), 36);
|
||||
bool hasItem = actualItemId != ITEM_NONE;
|
||||
std::string itemName = "";
|
||||
|
||||
@ -766,7 +766,7 @@ void DrawItem(ItemTrackerItem item) {
|
||||
|
||||
ImGui::BeginGroup();
|
||||
|
||||
ImGui::Image(LUS::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(hasItem && IsValidSaveFile() ? item.name : item.nameFaded),
|
||||
ImGui::Image(Ship::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(hasItem && IsValidSaveFile() ? item.name : item.nameFaded),
|
||||
ImVec2(iconSize, iconSize), ImVec2(0, 0), ImVec2(1, 1));
|
||||
|
||||
DrawItemCount(item, false);
|
||||
@ -806,8 +806,8 @@ void DrawBottle(ItemTrackerItem item) {
|
||||
item = actualItemTrackerItemMap[actualItemId];
|
||||
}
|
||||
|
||||
int iconSize = CVarGetInteger("gItemTrackerIconSize", 36);
|
||||
ImGui::Image(LUS::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(hasItem && IsValidSaveFile() ? item.name : item.nameFaded),
|
||||
int iconSize = CVarGetInteger(CVAR_TRACKER_ITEM("IconSize"), 36);
|
||||
ImGui::Image(Ship::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(hasItem && IsValidSaveFile() ? item.name : item.nameFaded),
|
||||
ImVec2(iconSize, iconSize), ImVec2(0, 0), ImVec2(1, 1));
|
||||
|
||||
UIWidgets::SetLastItemHoverText(SohUtils::GetItemName(item.id));
|
||||
@ -817,16 +817,16 @@ void DrawDungeonItem(ItemTrackerItem item) {
|
||||
uint32_t itemId = item.id;
|
||||
ImU32 dungeonColor = IM_COL_WHITE;
|
||||
uint32_t bitMask = 1 << (item.id - ITEM_KEY_BOSS); // Bitset starts at ITEM_KEY_BOSS == 0. the rest are sequential
|
||||
int iconSize = CVarGetInteger("gItemTrackerIconSize", 36);
|
||||
int iconSize = CVarGetInteger(CVAR_TRACKER_ITEM("IconSize"), 36);
|
||||
bool hasItem = GameInteractor::IsSaveLoaded() ? (bitMask & gSaveContext.inventory.dungeonItems[item.data]) : false;
|
||||
bool hasSmallKey = GameInteractor::IsSaveLoaded() ? ((gSaveContext.inventory.dungeonKeys[item.data]) >= 0) : false;
|
||||
ImGui::BeginGroup();
|
||||
if (itemId == ITEM_KEY_SMALL) {
|
||||
ImGui::Image(LUS::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(hasSmallKey && IsValidSaveFile() ? item.name : item.nameFaded),
|
||||
ImGui::Image(Ship::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(hasSmallKey && IsValidSaveFile() ? item.name : item.nameFaded),
|
||||
ImVec2(iconSize, iconSize), ImVec2(0, 0), ImVec2(1, 1));
|
||||
}
|
||||
else {
|
||||
ImGui::Image(LUS::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(hasItem && IsValidSaveFile() ? item.name : item.nameFaded),
|
||||
ImGui::Image(Ship::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(hasItem && IsValidSaveFile() ? item.name : item.nameFaded),
|
||||
ImVec2(iconSize, iconSize), ImVec2(0, 0), ImVec2(1, 1));
|
||||
}
|
||||
|
||||
@ -863,19 +863,19 @@ void DrawDungeonItem(ItemTrackerItem item) {
|
||||
}
|
||||
|
||||
void DrawSong(ItemTrackerItem item) {
|
||||
int iconSize = CVarGetInteger("gItemTrackerIconSize", 36);
|
||||
int iconSize = CVarGetInteger(CVAR_TRACKER_ITEM("IconSize"), 36);
|
||||
ImVec2 p = ImGui::GetCursorScreenPos();
|
||||
bool hasSong = HasSong(item);
|
||||
ImGui::SetCursorScreenPos(ImVec2(p.x + 6, p.y));
|
||||
ImGui::Image(LUS::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(hasSong && IsValidSaveFile() ? item.name : item.nameFaded),
|
||||
ImGui::Image(Ship::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(hasSong && IsValidSaveFile() ? item.name : item.nameFaded),
|
||||
ImVec2(iconSize / 1.5, iconSize), ImVec2(0, 0), ImVec2(1, 1));
|
||||
UIWidgets::SetLastItemHoverText(SohUtils::GetQuestItemName(item.id));
|
||||
}
|
||||
|
||||
void DrawNotes(bool resizeable = false) {
|
||||
ImGui::BeginGroup();
|
||||
int iconSize = CVarGetInteger("gItemTrackerIconSize", 36);
|
||||
int iconSpacing = CVarGetInteger("gItemTrackerIconSpacing", 12);
|
||||
int iconSize = CVarGetInteger(CVAR_TRACKER_ITEM("IconSize"), 36);
|
||||
int iconSpacing = CVarGetInteger(CVAR_TRACKER_ITEM("IconSpacing"), 12);
|
||||
|
||||
struct ItemTrackerNotes {
|
||||
static int TrackerNotesResizeCallback(ImGuiInputTextCallbackData* data) {
|
||||
@ -920,11 +920,11 @@ void BeginFloatingWindows(std::string UniqueName, ImGuiWindowFlags flags = 0) {
|
||||
windowFlags |= ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoFocusOnAppearing | ImGuiWindowFlags_NoResize;
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gItemTrackerWindowType", TRACKER_WINDOW_FLOATING) == TRACKER_WINDOW_FLOATING) {
|
||||
if (CVarGetInteger(CVAR_TRACKER_ITEM("WindowType"), TRACKER_WINDOW_FLOATING) == TRACKER_WINDOW_FLOATING) {
|
||||
ImGui::SetNextWindowViewport(ImGui::GetMainViewport()->ID);
|
||||
windowFlags |= ImGuiWindowFlags_NoDocking | ImGuiWindowFlags_NoNav | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoScrollWithMouse | ImGuiWindowFlags_NoScrollbar;
|
||||
|
||||
if (!CVarGetInteger("gItemTrackerHudEditMode", 0)) {
|
||||
if (!CVarGetInteger(CVAR_TRACKER_ITEM("Draggable"), 0)) {
|
||||
windowFlags |= ImGuiWindowFlags_NoInputs | ImGuiWindowFlags_NoMove;
|
||||
}
|
||||
}
|
||||
@ -945,9 +945,9 @@ void EndFloatingWindows() {
|
||||
* Takes in a vector of ItemTrackerItem and draws them in rows of N items
|
||||
*/
|
||||
void DrawItemsInRows(std::vector<ItemTrackerItem> items, int columns = 6) {
|
||||
int iconSize = CVarGetInteger("gItemTrackerIconSize", 36);
|
||||
int iconSpacing = CVarGetInteger("gItemTrackerIconSpacing", 12);
|
||||
int topPadding = (CVarGetInteger("gItemTrackerWindowType", TRACKER_WINDOW_FLOATING) == TRACKER_WINDOW_WINDOW) ? 20 : 0;
|
||||
int iconSize = CVarGetInteger(CVAR_TRACKER_ITEM("IconSize"), 36);
|
||||
int iconSpacing = CVarGetInteger(CVAR_TRACKER_ITEM("IconSpacing"), 12);
|
||||
int topPadding = (CVarGetInteger(CVAR_TRACKER_ITEM("WindowType"), TRACKER_WINDOW_FLOATING) == TRACKER_WINDOW_WINDOW) ? 20 : 0;
|
||||
|
||||
for (int i = 0; i < items.size(); i++) {
|
||||
int row = i / columns;
|
||||
@ -962,8 +962,8 @@ void DrawItemsInRows(std::vector<ItemTrackerItem> items, int columns = 6) {
|
||||
* Takes in a vector of ItemTrackerItem and draws them evenly spread across a circle
|
||||
*/
|
||||
void DrawItemsInACircle(std::vector<ItemTrackerItem> items) {
|
||||
int iconSize = CVarGetInteger("gItemTrackerIconSize", 36);
|
||||
int iconSpacing = CVarGetInteger("gItemTrackerIconSpacing", 12);
|
||||
int iconSize = CVarGetInteger(CVAR_TRACKER_ITEM("IconSize"), 36);
|
||||
int iconSpacing = CVarGetInteger(CVAR_TRACKER_ITEM("IconSpacing"), 12);
|
||||
|
||||
ImVec2 max = ImGui::GetWindowContentRegionMax();
|
||||
float radius = (iconSize + iconSpacing) * 2;
|
||||
@ -972,7 +972,7 @@ void DrawItemsInACircle(std::vector<ItemTrackerItem> items) {
|
||||
float angle = (float)i / items.size() * 2.0f * M_PI;
|
||||
float x = (radius / 2.0f) * cos(angle) + max.x / 2.0f;
|
||||
float y = (radius / 2.0f) * sin(angle) + max.y / 2.0f;
|
||||
ImGui::SetCursorPos(ImVec2(x - (CVarGetInteger("gItemTrackerIconSize", 36) - 8) / 2.0f, y + 4));
|
||||
ImGui::SetCursorPos(ImVec2(x - (CVarGetInteger(CVAR_TRACKER_ITEM("IconSize"), 36) - 8) / 2.0f, y + 4));
|
||||
items[i].drawFunc(items[i]);
|
||||
}
|
||||
}
|
||||
@ -983,8 +983,8 @@ void DrawItemsInACircle(std::vector<ItemTrackerItem> items) {
|
||||
* to then call DrawItemsInRows
|
||||
*/
|
||||
std::vector<ItemTrackerItem> GetDungeonItemsVector(std::vector<ItemTrackerDungeon> dungeons, int columns = 6) {
|
||||
int iconSize = CVarGetInteger("gItemTrackerIconSize", 36);
|
||||
int iconSpacing = CVarGetInteger("gItemTrackerIconSpacing", 12);
|
||||
int iconSize = CVarGetInteger(CVAR_TRACKER_ITEM("IconSize"), 36);
|
||||
int iconSpacing = CVarGetInteger(CVAR_TRACKER_ITEM("IconSpacing"), 12);
|
||||
std::vector<ItemTrackerItem> dungeonItems = {};
|
||||
|
||||
int rowCount = 0;
|
||||
@ -1039,8 +1039,8 @@ void UpdateVectors() {
|
||||
dungeonRewards.insert(dungeonRewards.end(), dungeonRewardMedallions.begin(), dungeonRewardMedallions.end());
|
||||
|
||||
dungeonItems.clear();
|
||||
if (CVarGetInteger("gItemTrackerDisplayDungeonItemsHorizontal", 1) && CVarGetInteger("gItemTrackerDungeonItemsDisplayType", SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_SEPARATE) {
|
||||
if (CVarGetInteger("gItemTrackerDisplayDungeonItemsMaps", 1)) {
|
||||
if (CVarGetInteger(CVAR_TRACKER_ITEM("DungeonItems.Layout"), 1) && CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.DungeonItems"), SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_SEPARATE) {
|
||||
if (CVarGetInteger(CVAR_TRACKER_ITEM("DungeonItems.DisplayMaps"), 1)) {
|
||||
dungeonItems = GetDungeonItemsVector(itemTrackerDungeonsWithMapsHorizontal, 12);
|
||||
// Manually adding Thieves Hideout to an open spot so we don't get an additional row for one item
|
||||
dungeonItems[23] = ITEM_TRACKER_ITEM(ITEM_KEY_SMALL, SCENE_THIEVES_HIDEOUT, DrawDungeonItem);
|
||||
@ -1050,7 +1050,7 @@ void UpdateVectors() {
|
||||
dungeonItems[15] = ITEM_TRACKER_ITEM(ITEM_KEY_SMALL, SCENE_THIEVES_HIDEOUT, DrawDungeonItem);
|
||||
}
|
||||
} else {
|
||||
if (CVarGetInteger("gItemTrackerDisplayDungeonItemsMaps", 1)) {
|
||||
if (CVarGetInteger(CVAR_TRACKER_ITEM("DungeonItems.DisplayMaps"), 1)) {
|
||||
dungeonItems = GetDungeonItemsVector(itemTrackerDungeonsWithMapsCompact);
|
||||
// Manually adding Thieves Hideout to an open spot so we don't get an additional row for one item
|
||||
dungeonItems[35] = ITEM_TRACKER_ITEM(ITEM_KEY_SMALL, SCENE_THIEVES_HIDEOUT, DrawDungeonItem);
|
||||
@ -1060,37 +1060,37 @@ void UpdateVectors() {
|
||||
}
|
||||
|
||||
mainWindowItems.clear();
|
||||
if (CVarGetInteger("gItemTrackerInventoryItemsDisplayType", SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) {
|
||||
if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.Inventory"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) {
|
||||
mainWindowItems.insert(mainWindowItems.end(), inventoryItems.begin(), inventoryItems.end());
|
||||
}
|
||||
if (CVarGetInteger("gItemTrackerEquipmentItemsDisplayType", SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) {
|
||||
if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.Equipment"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) {
|
||||
mainWindowItems.insert(mainWindowItems.end(), equipmentItems.begin(), equipmentItems.end());
|
||||
}
|
||||
if (CVarGetInteger("gItemTrackerMiscItemsDisplayType", SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) {
|
||||
if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.Misc"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) {
|
||||
mainWindowItems.insert(mainWindowItems.end(), miscItems.begin(), miscItems.end());
|
||||
}
|
||||
if (CVarGetInteger("gItemTrackerDungeonRewardsDisplayType", SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) {
|
||||
if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.DungeonRewards"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) {
|
||||
mainWindowItems.insert(mainWindowItems.end(), dungeonRewardStones.begin(), dungeonRewardStones.end());
|
||||
mainWindowItems.insert(mainWindowItems.end(), dungeonRewardMedallions.begin(), dungeonRewardMedallions.end());
|
||||
}
|
||||
if (CVarGetInteger("gItemTrackerSongsDisplayType", SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) {
|
||||
if (CVarGetInteger("gItemTrackerMiscItemsDisplayType", SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW &&
|
||||
CVarGetInteger("gItemTrackerDungeonRewardsDisplayType", SECTION_DISPLAY_MAIN_WINDOW) != SECTION_DISPLAY_MAIN_WINDOW) {
|
||||
if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.Songs"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) {
|
||||
if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.Misc"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW &&
|
||||
CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.DungeonRewards"), SECTION_DISPLAY_MAIN_WINDOW) != SECTION_DISPLAY_MAIN_WINDOW) {
|
||||
mainWindowItems.push_back(ITEM_TRACKER_ITEM(ITEM_NONE, 0, DrawItem));
|
||||
mainWindowItems.push_back(ITEM_TRACKER_ITEM(ITEM_NONE, 0, DrawItem));
|
||||
mainWindowItems.push_back(ITEM_TRACKER_ITEM(ITEM_NONE, 0, DrawItem));
|
||||
}
|
||||
mainWindowItems.insert(mainWindowItems.end(), songItems.begin(), songItems.end());
|
||||
}
|
||||
if (CVarGetInteger("gItemTrackerDungeonItemsDisplayType", SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_MAIN_WINDOW) {
|
||||
if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.DungeonItems"), SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_MAIN_WINDOW) {
|
||||
mainWindowItems.insert(mainWindowItems.end(), dungeonItems.begin(), dungeonItems.end());
|
||||
}
|
||||
|
||||
// if we're adding greg to the misc window,
|
||||
// and misc isn't on the main window,
|
||||
// and it doesn't already have greg, add him
|
||||
if (CVarGetInteger("gItemTrackerGregDisplayType", SECTION_DISPLAY_EXTENDED_HIDDEN) == SECTION_DISPLAY_EXTENDED_MISC_WINDOW &&
|
||||
CVarGetInteger("gItemTrackerMiscItemsDisplayType", SECTION_DISPLAY_MAIN_WINDOW) != SECTION_DISPLAY_MAIN_WINDOW) {
|
||||
if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.Greg"), SECTION_DISPLAY_EXTENDED_HIDDEN) == SECTION_DISPLAY_EXTENDED_MISC_WINDOW &&
|
||||
CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.Misc"), SECTION_DISPLAY_MAIN_WINDOW) != SECTION_DISPLAY_MAIN_WINDOW) {
|
||||
if (std::none_of(miscItems.begin(), miscItems.end(), [](ItemTrackerItem item) { return item.id == ITEM_RUPEE_GREEN; }))
|
||||
miscItems.insert(miscItems.end(), gregItems.begin(), gregItems.end());
|
||||
} else {
|
||||
@ -1099,7 +1099,7 @@ void UpdateVectors() {
|
||||
|
||||
bool newRowAdded = false;
|
||||
// if we're adding greg to the main window
|
||||
if (CVarGetInteger("gItemTrackerGregDisplayType", SECTION_DISPLAY_EXTENDED_HIDDEN) == SECTION_DISPLAY_EXTENDED_MAIN_WINDOW) {
|
||||
if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.Greg"), SECTION_DISPLAY_EXTENDED_HIDDEN) == SECTION_DISPLAY_EXTENDED_MAIN_WINDOW) {
|
||||
if (!newRowAdded) {
|
||||
// insert empty items until we're on a new row for greg
|
||||
while (mainWindowItems.size() % 6) {
|
||||
@ -1113,7 +1113,7 @@ void UpdateVectors() {
|
||||
}
|
||||
|
||||
// If we're adding triforce pieces to the main window
|
||||
if (CVarGetInteger("gItemTrackerTriforcePiecesDisplayType", SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_MAIN_WINDOW) {
|
||||
if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.TriforcePieces"), SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_MAIN_WINDOW) {
|
||||
// If Greg isn't on the main window, add empty items to place the triforce pieces on a new row.
|
||||
if (!newRowAdded) {
|
||||
while (mainWindowItems.size() % 6) {
|
||||
@ -1127,15 +1127,15 @@ void UpdateVectors() {
|
||||
}
|
||||
|
||||
// if misc is separate and fishing pole isn't added, add fishing pole to misc
|
||||
if (CVarGetInteger("gItemTrackerFishingPoleDisplayType", SECTION_DISPLAY_EXTENDED_HIDDEN) == SECTION_DISPLAY_EXTENDED_MISC_WINDOW &&
|
||||
CVarGetInteger("gItemTrackerMiscItemsDisplayType", SECTION_DISPLAY_MAIN_WINDOW) != SECTION_DISPLAY_MAIN_WINDOW) {
|
||||
if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.FishingPole"), SECTION_DISPLAY_EXTENDED_HIDDEN) == SECTION_DISPLAY_EXTENDED_MISC_WINDOW &&
|
||||
CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.Misc"), SECTION_DISPLAY_MAIN_WINDOW) != SECTION_DISPLAY_MAIN_WINDOW) {
|
||||
if (std::none_of(miscItems.begin(), miscItems.end(), [](ItemTrackerItem item) { return item.id == ITEM_FISHING_POLE; }))
|
||||
miscItems.insert(miscItems.end(), fishingPoleItems.begin(), fishingPoleItems.end());
|
||||
} else {
|
||||
miscItems.erase(std::remove_if(miscItems.begin(), miscItems.end(), [](ItemTrackerItem i) { return i.id == ITEM_FISHING_POLE; }), miscItems.end());
|
||||
}
|
||||
// add fishing pole to main window
|
||||
if (CVarGetInteger("gItemTrackerFishingPoleDisplayType", SECTION_DISPLAY_EXTENDED_HIDDEN) == SECTION_DISPLAY_EXTENDED_MAIN_WINDOW) {
|
||||
if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.FishingPole"), SECTION_DISPLAY_EXTENDED_HIDDEN) == SECTION_DISPLAY_EXTENDED_MAIN_WINDOW) {
|
||||
if (!newRowAdded) {
|
||||
while (mainWindowItems.size() % 6) {
|
||||
mainWindowItems.push_back(ITEM_TRACKER_ITEM(ITEM_NONE, 0, DrawItem));
|
||||
@ -1147,7 +1147,7 @@ void UpdateVectors() {
|
||||
}
|
||||
|
||||
//If we're adding boss souls to the main window...
|
||||
if (CVarGetInteger("gItemTrackerBossSoulsDisplayType", SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_MAIN_WINDOW) {
|
||||
if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.BossSouls"), SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_MAIN_WINDOW) {
|
||||
//...add empty items on the main window to get the souls on their own row. (Too many to sit with Greg/Triforce pieces)
|
||||
while (mainWindowItems.size() % 6) {
|
||||
mainWindowItems.push_back(ITEM_TRACKER_ITEM(ITEM_NONE, 0, DrawItem));
|
||||
@ -1158,7 +1158,7 @@ void UpdateVectors() {
|
||||
}
|
||||
|
||||
//If we're adding ocarina buttons to the main window...
|
||||
if (CVarGetInteger("gItemTrackerOcarinaButtonsDisplayType", SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_MAIN_WINDOW) {
|
||||
if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.OcarinaButtons"), SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_MAIN_WINDOW) {
|
||||
//...add empty items on the main window to get the buttons on their own row. (Too many to sit with Greg/Triforce pieces/boss souls)
|
||||
while (mainWindowItems.size() % 6) {
|
||||
mainWindowItems.push_back(ITEM_TRACKER_ITEM(ITEM_NONE, 0, DrawItem));
|
||||
@ -1194,57 +1194,57 @@ void ItemTrackerLoadFile() {
|
||||
void ItemTrackerWindow::DrawElement() {
|
||||
UpdateVectors();
|
||||
|
||||
int iconSize = CVarGetInteger("gItemTrackerIconSize", 36);
|
||||
int iconSpacing = CVarGetInteger("gItemTrackerIconSpacing", 12);
|
||||
int comboButton1Mask = buttonMap[CVarGetInteger("gItemTrackerComboButton1", TRACKER_COMBO_BUTTON_L)];
|
||||
int comboButton2Mask = buttonMap[CVarGetInteger("gItemTrackerComboButton2", TRACKER_COMBO_BUTTON_R)];
|
||||
OSContPad* buttonsPressed = LUS::Context::GetInstance()->GetControlDeck()->GetPads();
|
||||
int iconSize = CVarGetInteger(CVAR_TRACKER_ITEM("IconSize"), 36);
|
||||
int iconSpacing = CVarGetInteger(CVAR_TRACKER_ITEM("IconSpacing"), 12);
|
||||
int comboButton1Mask = buttonMap[CVarGetInteger(CVAR_TRACKER_ITEM("ComboButton1"), TRACKER_COMBO_BUTTON_L)];
|
||||
int comboButton2Mask = buttonMap[CVarGetInteger(CVAR_TRACKER_ITEM("ComboButton2"), TRACKER_COMBO_BUTTON_R)];
|
||||
OSContPad* buttonsPressed = Ship::Context::GetInstance()->GetControlDeck()->GetPads();
|
||||
bool comboButtonsHeld = buttonsPressed != nullptr && buttonsPressed[0].button & comboButton1Mask && buttonsPressed[0].button & comboButton2Mask;
|
||||
bool isPaused = CVarGetInteger("gItemTrackerShowOnlyPaused", 0) == 0 || gPlayState != nullptr && gPlayState->pauseCtx.state > 0;
|
||||
bool isPaused = CVarGetInteger(CVAR_TRACKER_ITEM("ShowOnlyPaused"), 0) == 0 || gPlayState != nullptr && gPlayState->pauseCtx.state > 0;
|
||||
|
||||
if (CVarGetInteger("gItemTrackerWindowType", TRACKER_WINDOW_FLOATING) == TRACKER_WINDOW_WINDOW || isPaused && (CVarGetInteger("gItemTrackerDisplayType", TRACKER_DISPLAY_ALWAYS) == TRACKER_DISPLAY_ALWAYS ? CVarGetInteger("gItemTrackerEnabled", 0) : comboButtonsHeld)) {
|
||||
if (CVarGetInteger(CVAR_TRACKER_ITEM("WindowType"), TRACKER_WINDOW_FLOATING) == TRACKER_WINDOW_WINDOW || isPaused && (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.Main"), TRACKER_DISPLAY_ALWAYS) == TRACKER_DISPLAY_ALWAYS ? CVarGetInteger(CVAR_WINDOW("ItemTracker"), 0) : comboButtonsHeld)) {
|
||||
if (
|
||||
(CVarGetInteger("gItemTrackerInventoryItemsDisplayType", SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) ||
|
||||
(CVarGetInteger("gItemTrackerEquipmentItemsDisplayType", SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) ||
|
||||
(CVarGetInteger("gItemTrackerMiscItemsDisplayType", SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) ||
|
||||
(CVarGetInteger("gItemTrackerDungeonRewardsDisplayType", SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) ||
|
||||
(CVarGetInteger("gItemTrackerSongsDisplayType", SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) ||
|
||||
(CVarGetInteger("gItemTrackerDungeonItemsDisplayType", SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_MAIN_WINDOW) ||
|
||||
(CVarGetInteger("gItemTrackerGregDisplayType", SECTION_DISPLAY_EXTENDED_HIDDEN) == SECTION_DISPLAY_EXTENDED_MAIN_WINDOW) ||
|
||||
(CVarGetInteger("gItemTrackerTriforcePiecesDisplayType", SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_MAIN_WINDOW) ||
|
||||
(CVarGetInteger("gItemTrackerFishingPoleDisplayType", SECTION_DISPLAY_EXTENDED_HIDDEN) == SECTION_DISPLAY_EXTENDED_MAIN_WINDOW) ||
|
||||
(CVarGetInteger("gItemTrackerNotesDisplayType", SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_MAIN_WINDOW)
|
||||
(CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.Inventory"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) ||
|
||||
(CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.Equipment"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) ||
|
||||
(CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.Misc"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) ||
|
||||
(CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.DungeonRewards"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) ||
|
||||
(CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.Songs"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) ||
|
||||
(CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.DungeonItems"), SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_MAIN_WINDOW) ||
|
||||
(CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.Greg"), SECTION_DISPLAY_EXTENDED_HIDDEN) == SECTION_DISPLAY_EXTENDED_MAIN_WINDOW) ||
|
||||
(CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.TriforcePieces"), SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_MAIN_WINDOW) ||
|
||||
(CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.FishingPole"), SECTION_DISPLAY_EXTENDED_HIDDEN) == SECTION_DISPLAY_EXTENDED_MAIN_WINDOW) ||
|
||||
(CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.Notes"), SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_MAIN_WINDOW)
|
||||
) {
|
||||
BeginFloatingWindows("Item Tracker##main window");
|
||||
DrawItemsInRows(mainWindowItems, 6);
|
||||
|
||||
if (CVarGetInteger("gItemTrackerNotesDisplayType", SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_MAIN_WINDOW && CVarGetInteger("gItemTrackerDisplayType", TRACKER_DISPLAY_ALWAYS) == TRACKER_DISPLAY_ALWAYS) {
|
||||
if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.Notes"), SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_MAIN_WINDOW && CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.Main"), TRACKER_DISPLAY_ALWAYS) == TRACKER_DISPLAY_ALWAYS) {
|
||||
DrawNotes();
|
||||
}
|
||||
EndFloatingWindows();
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gItemTrackerInventoryItemsDisplayType", SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_SEPARATE) {
|
||||
if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.Inventory"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_SEPARATE) {
|
||||
BeginFloatingWindows("Inventory Items Tracker");
|
||||
DrawItemsInRows(inventoryItems);
|
||||
EndFloatingWindows();
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gItemTrackerEquipmentItemsDisplayType", SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_SEPARATE) {
|
||||
if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.Equipment"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_SEPARATE) {
|
||||
BeginFloatingWindows("Equipment Items Tracker");
|
||||
DrawItemsInRows(equipmentItems, 3);
|
||||
EndFloatingWindows();
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gItemTrackerMiscItemsDisplayType", SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_SEPARATE) {
|
||||
if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.Misc"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_SEPARATE) {
|
||||
BeginFloatingWindows("Misc Items Tracker");
|
||||
DrawItemsInRows(miscItems, 4);
|
||||
EndFloatingWindows();
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gItemTrackerDungeonRewardsDisplayType", SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_SEPARATE) {
|
||||
if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.DungeonRewards"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_SEPARATE) {
|
||||
BeginFloatingWindows("Dungeon Rewards Tracker");
|
||||
if (CVarGetInteger("gItemTrackerDungeonRewardsCircle", 0)) {
|
||||
if (CVarGetInteger(CVAR_TRACKER_ITEM("DungeonRewardsLayout"), 0)) {
|
||||
ImGui::BeginGroup();
|
||||
DrawItemsInACircle(dungeonRewardMedallions);
|
||||
ImGui::EndGroup();
|
||||
@ -1257,16 +1257,16 @@ void ItemTrackerWindow::DrawElement() {
|
||||
EndFloatingWindows();
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gItemTrackerSongsDisplayType", SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_SEPARATE) {
|
||||
if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.Songs"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_SEPARATE) {
|
||||
BeginFloatingWindows("Songs Tracker");
|
||||
DrawItemsInRows(songItems);
|
||||
EndFloatingWindows();
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gItemTrackerDungeonItemsDisplayType", SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_SEPARATE) {
|
||||
if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.DungeonItems"), SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_SEPARATE) {
|
||||
BeginFloatingWindows("Dungeon Items Tracker");
|
||||
if (CVarGetInteger("gItemTrackerDisplayDungeonItemsHorizontal", 1)) {
|
||||
if (CVarGetInteger("gItemTrackerDisplayDungeonItemsMaps", 1)) {
|
||||
if (CVarGetInteger(CVAR_TRACKER_ITEM("DungeonItems.Layout"), 1)) {
|
||||
if (CVarGetInteger(CVAR_TRACKER_ITEM("DungeonItems.DisplayMaps"), 1)) {
|
||||
DrawItemsInRows(dungeonItems, 12);
|
||||
} else {
|
||||
DrawItemsInRows(dungeonItems, 8);
|
||||
@ -1277,37 +1277,37 @@ void ItemTrackerWindow::DrawElement() {
|
||||
EndFloatingWindows();
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gItemTrackerGregDisplayType", SECTION_DISPLAY_EXTENDED_HIDDEN) == SECTION_DISPLAY_EXTENDED_SEPARATE) {
|
||||
if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.Greg"), SECTION_DISPLAY_EXTENDED_HIDDEN) == SECTION_DISPLAY_EXTENDED_SEPARATE) {
|
||||
BeginFloatingWindows("Greg Tracker");
|
||||
DrawItemsInRows(gregItems);
|
||||
EndFloatingWindows();
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gItemTrackerTriforcePiecesDisplayType", SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_SEPARATE) {
|
||||
if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.TriforcePieces"), SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_SEPARATE) {
|
||||
BeginFloatingWindows("Triforce Piece Tracker");
|
||||
DrawItemsInRows(triforcePieces);
|
||||
EndFloatingWindows();
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gItemTrackerBossSoulsDisplayType", SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_SEPARATE) {
|
||||
if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.BossSouls"), SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_SEPARATE) {
|
||||
BeginFloatingWindows("Boss Soul Tracker");
|
||||
DrawItemsInRows(bossSoulItems);
|
||||
EndFloatingWindows();
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gItemTrackerOcarinaButtonsDisplayType", SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_SEPARATE) {
|
||||
if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.OcarinaButtons"), SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_SEPARATE) {
|
||||
BeginFloatingWindows("Ocarina Button Tracker");
|
||||
DrawItemsInRows(ocarinaButtonItems);
|
||||
EndFloatingWindows();
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gItemTrackerFishingPoleDisplayType", SECTION_DISPLAY_EXTENDED_HIDDEN) == SECTION_DISPLAY_EXTENDED_SEPARATE) {
|
||||
if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.FishingPole"), SECTION_DISPLAY_EXTENDED_HIDDEN) == SECTION_DISPLAY_EXTENDED_SEPARATE) {
|
||||
BeginFloatingWindows("Fishing Pole Tracker");
|
||||
DrawItemsInRows(fishingPoleItems);
|
||||
EndFloatingWindows();
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gItemTrackerNotesDisplayType", SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_SEPARATE && CVarGetInteger("gItemTrackerDisplayType", TRACKER_DISPLAY_ALWAYS) == TRACKER_DISPLAY_ALWAYS) {
|
||||
if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.Notes"), SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_SEPARATE && CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.Main"), TRACKER_DISPLAY_ALWAYS) == TRACKER_DISPLAY_ALWAYS) {
|
||||
ImGui::SetNextWindowSize(ImVec2(400,300), ImGuiCond_FirstUseEver);
|
||||
BeginFloatingWindows("Personal Notes", ImGuiWindowFlags_NoFocusOnAppearing);
|
||||
DrawNotes(true);
|
||||
@ -1344,50 +1344,50 @@ void ItemTrackerSettingsWindow::DrawElement() {
|
||||
ImGui::SameLine();
|
||||
ImGui::PushItemWidth(ImGui::GetContentRegionAvail().x);
|
||||
if (ImGui::ColorEdit4("BG Color##gItemTrackerBgColor", (float*)&ChromaKeyBackground, ImGuiColorEditFlags_AlphaPreview | ImGuiColorEditFlags_AlphaBar | ImGuiColorEditFlags_NoLabel)) {
|
||||
CVarSetFloat("gItemTrackerBgColorR", ChromaKeyBackground.x);
|
||||
CVarSetFloat("gItemTrackerBgColorG", ChromaKeyBackground.y);
|
||||
CVarSetFloat("gItemTrackerBgColorB", ChromaKeyBackground.z);
|
||||
CVarSetFloat("gItemTrackerBgColorA", ChromaKeyBackground.w);
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
CVarSetFloat(CVAR_TRACKER_ITEM("BgColorR"), ChromaKeyBackground.x);
|
||||
CVarSetFloat(CVAR_TRACKER_ITEM("BgColorG"), ChromaKeyBackground.y);
|
||||
CVarSetFloat(CVAR_TRACKER_ITEM("BgColorB"), ChromaKeyBackground.z);
|
||||
CVarSetFloat(CVAR_TRACKER_ITEM("BgColorA"), ChromaKeyBackground.w);
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
}
|
||||
ImGui::PopItemWidth();
|
||||
|
||||
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Window Type", "gItemTrackerWindowType", windowTypes, TRACKER_WINDOW_FLOATING)) {
|
||||
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Window Type", CVAR_TRACKER_ITEM("WindowType"), windowTypes, TRACKER_WINDOW_FLOATING)) {
|
||||
shouldUpdateVectors = true;
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gItemTrackerWindowType", TRACKER_WINDOW_FLOATING) == TRACKER_WINDOW_FLOATING) {
|
||||
if (UIWidgets::PaddedEnhancementCheckbox("Enable Dragging", "gItemTrackerHudEditMode")) {
|
||||
if (CVarGetInteger(CVAR_TRACKER_ITEM("WindowType"), TRACKER_WINDOW_FLOATING) == TRACKER_WINDOW_FLOATING) {
|
||||
if (UIWidgets::PaddedEnhancementCheckbox("Enable Dragging", CVAR_TRACKER_ITEM("Draggable"))) {
|
||||
shouldUpdateVectors = true;
|
||||
}
|
||||
if (UIWidgets::PaddedEnhancementCheckbox("Only enable while paused", "gItemTrackerShowOnlyPaused")) {
|
||||
if (UIWidgets::PaddedEnhancementCheckbox("Only enable while paused", CVAR_TRACKER_ITEM("ShowOnlyPaused"))) {
|
||||
shouldUpdateVectors = true;
|
||||
}
|
||||
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Display Mode", "gItemTrackerDisplayType", displayModes, TRACKER_DISPLAY_ALWAYS)) {
|
||||
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Display Mode", CVAR_TRACKER_ITEM("DisplayType.Main"), displayModes, TRACKER_DISPLAY_ALWAYS)) {
|
||||
shouldUpdateVectors = true;
|
||||
}
|
||||
if (CVarGetInteger("gItemTrackerDisplayType", TRACKER_DISPLAY_ALWAYS) == TRACKER_DISPLAY_COMBO_BUTTON) {
|
||||
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Combo Button 1", "gItemTrackerComboButton1", buttons, TRACKER_COMBO_BUTTON_L)) {
|
||||
if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.Main"), TRACKER_DISPLAY_ALWAYS) == TRACKER_DISPLAY_COMBO_BUTTON) {
|
||||
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Combo Button 1", CVAR_TRACKER_ITEM("ComboButton1"), buttons, TRACKER_COMBO_BUTTON_L)) {
|
||||
shouldUpdateVectors = true;
|
||||
}
|
||||
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Combo Button 2", "gItemTrackerComboButton2", buttons, TRACKER_COMBO_BUTTON_R)) {
|
||||
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Combo Button 2", CVAR_TRACKER_ITEM("ComboButton2"), buttons, TRACKER_COMBO_BUTTON_R)) {
|
||||
shouldUpdateVectors = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
UIWidgets::PaddedSeparator();
|
||||
UIWidgets::EnhancementSliderInt("Icon size : %dpx", "##ITEMTRACKERICONSIZE", "gItemTrackerIconSize", 25, 128, "", 36);
|
||||
UIWidgets::EnhancementSliderInt("Icon margins : %dpx", "##ITEMTRACKERSPACING", "gItemTrackerIconSpacing", -5, 50, "", 12);
|
||||
UIWidgets::EnhancementSliderInt("Text size : %dpx", "##ITEMTRACKERTEXTSIZE", "gTrackers.ItemTracker.ItemTrackerTextSize", 1, 30, "", 13);
|
||||
UIWidgets::EnhancementSliderInt("Icon size : %dpx", "##ITEMTRACKERICONSIZE", CVAR_TRACKER_ITEM("IconSize"), 25, 128, "", 36);
|
||||
UIWidgets::EnhancementSliderInt("Icon margins : %dpx", "##ITEMTRACKERSPACING", CVAR_TRACKER_ITEM("IconSpacing"), -5, 50, "", 12);
|
||||
UIWidgets::EnhancementSliderInt("Text size : %dpx", "##ITEMTRACKERTEXTSIZE", CVAR_TRACKER_ITEM("TextSize"), 1, 30, "", 13);
|
||||
|
||||
UIWidgets::Spacer(0);
|
||||
|
||||
ImGui::Text("Ammo/Capacity Tracking");
|
||||
UIWidgets::EnhancementCombobox("gItemTrackerCapacityTrack", itemTrackerCapacityTrackOptions, ITEM_TRACKER_NUMBER_CURRENT_CAPACITY_ONLY);
|
||||
UIWidgets::EnhancementCombobox(CVAR_TRACKER_ITEM("ItemCountType"), itemTrackerCapacityTrackOptions, ITEM_TRACKER_NUMBER_CURRENT_CAPACITY_ONLY);
|
||||
UIWidgets::InsertHelpHoverText("Customize what the numbers under each item are tracking."
|
||||
"\n\nNote: items without capacity upgrades will track ammo even in capacity mode");
|
||||
if (CVarGetInteger("gItemTrackerCapacityTrack", ITEM_TRACKER_NUMBER_CURRENT_CAPACITY_ONLY) == ITEM_TRACKER_NUMBER_CURRENT_CAPACITY_ONLY || CVarGetInteger("gItemTrackerCapacityTrack", ITEM_TRACKER_NUMBER_CURRENT_CAPACITY_ONLY) == ITEM_TRACKER_NUMBER_CURRENT_AMMO_ONLY) {
|
||||
if (UIWidgets::PaddedEnhancementCheckbox("Align count to left side", "gItemTrackerCurrentOnLeft")) {
|
||||
if (CVarGetInteger(CVAR_TRACKER_ITEM("ItemCountType"), ITEM_TRACKER_NUMBER_CURRENT_CAPACITY_ONLY) == ITEM_TRACKER_NUMBER_CURRENT_CAPACITY_ONLY || CVarGetInteger(CVAR_TRACKER_ITEM("ItemCountType"), ITEM_TRACKER_NUMBER_CURRENT_CAPACITY_ONLY) == ITEM_TRACKER_NUMBER_CURRENT_AMMO_ONLY) {
|
||||
if (UIWidgets::PaddedEnhancementCheckbox("Align count to left side", CVAR_TRACKER_ITEM("ItemCountAlignLeft"))) {
|
||||
shouldUpdateVectors = true;
|
||||
}
|
||||
}
|
||||
@ -1395,76 +1395,76 @@ void ItemTrackerSettingsWindow::DrawElement() {
|
||||
UIWidgets::Spacer(0);
|
||||
|
||||
ImGui::Text("Key Count Tracking");
|
||||
UIWidgets::EnhancementCombobox("gItemTrackerKeyTrack", itemTrackerKeyTrackOptions, KEYS_COLLECTED_MAX);
|
||||
UIWidgets::EnhancementCombobox(CVAR_TRACKER_ITEM("KeyCounts"), itemTrackerKeyTrackOptions, KEYS_COLLECTED_MAX);
|
||||
UIWidgets::InsertHelpHoverText("Customize what numbers are shown for key tracking.");
|
||||
|
||||
UIWidgets::Spacer(0);
|
||||
|
||||
ImGui::Text("Triforce Piece Count Tracking");
|
||||
UIWidgets::EnhancementCombobox("gItemTrackerTriforcePieceTrack", itemTrackerTriforcePieceTrackOptions, TRIFORCE_PIECE_COLLECTED_REQUIRED_MAX);
|
||||
UIWidgets::EnhancementCombobox(CVAR_TRACKER_ITEM("TriforcePieceCounts"), itemTrackerTriforcePieceTrackOptions, TRIFORCE_PIECE_COLLECTED_REQUIRED_MAX);
|
||||
UIWidgets::InsertHelpHoverText("Customize what numbers are shown for triforce piece tracking.");
|
||||
|
||||
ImGui::TableNextColumn();
|
||||
|
||||
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Inventory", "gItemTrackerInventoryItemsDisplayType", displayTypes, SECTION_DISPLAY_MAIN_WINDOW)) {
|
||||
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Inventory", CVAR_TRACKER_ITEM("DisplayType.Inventory"), displayTypes, SECTION_DISPLAY_MAIN_WINDOW)) {
|
||||
shouldUpdateVectors = true;
|
||||
}
|
||||
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Equipment", "gItemTrackerEquipmentItemsDisplayType", displayTypes, SECTION_DISPLAY_MAIN_WINDOW)) {
|
||||
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Equipment", CVAR_TRACKER_ITEM("DisplayType.Equipment"), displayTypes, SECTION_DISPLAY_MAIN_WINDOW)) {
|
||||
shouldUpdateVectors = true;
|
||||
}
|
||||
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Misc", "gItemTrackerMiscItemsDisplayType", displayTypes, SECTION_DISPLAY_MAIN_WINDOW)) {
|
||||
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Misc", CVAR_TRACKER_ITEM("DisplayType.Misc"), displayTypes, SECTION_DISPLAY_MAIN_WINDOW)) {
|
||||
shouldUpdateVectors = true;
|
||||
}
|
||||
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Dungeon Rewards", "gItemTrackerDungeonRewardsDisplayType", displayTypes, SECTION_DISPLAY_MAIN_WINDOW)) {
|
||||
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Dungeon Rewards", CVAR_TRACKER_ITEM("DisplayType.DungeonRewards"), displayTypes, SECTION_DISPLAY_MAIN_WINDOW)) {
|
||||
shouldUpdateVectors = true;
|
||||
}
|
||||
if (CVarGetInteger("gItemTrackerDungeonRewardsDisplayType", SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_SEPARATE) {
|
||||
if (UIWidgets::PaddedEnhancementCheckbox("Circle display", "gItemTrackerDungeonRewardsCircle", true, true, false, "", UIWidgets::CheckboxGraphics::Cross, false)) {
|
||||
if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.DungeonRewards"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_SEPARATE) {
|
||||
if (UIWidgets::PaddedEnhancementCheckbox("Circle display", CVAR_TRACKER_ITEM("DungeonRewardsLayout"), true, true, false, "", UIWidgets::CheckboxGraphics::Cross, false)) {
|
||||
shouldUpdateVectors = true;
|
||||
}
|
||||
}
|
||||
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Songs", "gItemTrackerSongsDisplayType", displayTypes, SECTION_DISPLAY_MAIN_WINDOW)) {
|
||||
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Songs", CVAR_TRACKER_ITEM("DisplayType.Songs"), displayTypes, SECTION_DISPLAY_MAIN_WINDOW)) {
|
||||
shouldUpdateVectors = true;
|
||||
}
|
||||
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Dungeon Items", "gItemTrackerDungeonItemsDisplayType", displayTypes, SECTION_DISPLAY_HIDDEN)) {
|
||||
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Dungeon Items", CVAR_TRACKER_ITEM("DisplayType.DungeonItems"), displayTypes, SECTION_DISPLAY_HIDDEN)) {
|
||||
shouldUpdateVectors = true;
|
||||
}
|
||||
if (CVarGetInteger("gItemTrackerDungeonItemsDisplayType", SECTION_DISPLAY_HIDDEN) != SECTION_DISPLAY_HIDDEN) {
|
||||
if (CVarGetInteger("gItemTrackerDungeonItemsDisplayType", SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_SEPARATE) {
|
||||
if (UIWidgets::PaddedEnhancementCheckbox("Horizontal display", "gItemTrackerDisplayDungeonItemsHorizontal", true, true, false, "", UIWidgets::CheckboxGraphics::Cross, true)) {
|
||||
if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.DungeonItems"), SECTION_DISPLAY_HIDDEN) != SECTION_DISPLAY_HIDDEN) {
|
||||
if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.DungeonItems"), SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_SEPARATE) {
|
||||
if (UIWidgets::PaddedEnhancementCheckbox("Horizontal display", CVAR_TRACKER_ITEM("DungeonItems.Layout"), true, true, false, "", UIWidgets::CheckboxGraphics::Cross, true)) {
|
||||
shouldUpdateVectors = true;
|
||||
}
|
||||
}
|
||||
if (UIWidgets::PaddedEnhancementCheckbox("Maps and compasses", "gItemTrackerDisplayDungeonItemsMaps", true, true, false, "", UIWidgets::CheckboxGraphics::Cross, true)) {
|
||||
if (UIWidgets::PaddedEnhancementCheckbox("Maps and compasses", CVAR_TRACKER_ITEM("DungeonItems.DisplayMaps"), true, true, false, "", UIWidgets::CheckboxGraphics::Cross, true)) {
|
||||
shouldUpdateVectors = true;
|
||||
}
|
||||
}
|
||||
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Greg", "gItemTrackerGregDisplayType", extendedDisplayTypes, SECTION_DISPLAY_EXTENDED_HIDDEN)) {
|
||||
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Greg", CVAR_TRACKER_ITEM("DisplayType.Greg"), extendedDisplayTypes, SECTION_DISPLAY_EXTENDED_HIDDEN)) {
|
||||
shouldUpdateVectors = true;
|
||||
}
|
||||
|
||||
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Triforce Pieces", "gItemTrackerTriforcePiecesDisplayType", displayTypes, SECTION_DISPLAY_HIDDEN)) {
|
||||
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Triforce Pieces", CVAR_TRACKER_ITEM("DisplayType.TriforcePieces"), displayTypes, SECTION_DISPLAY_HIDDEN)) {
|
||||
shouldUpdateVectors = true;
|
||||
}
|
||||
|
||||
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Boss Souls", "gItemTrackerBossSoulsDisplayType", displayTypes, SECTION_DISPLAY_HIDDEN)) {
|
||||
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Boss Souls", CVAR_TRACKER_ITEM("DisplayType.BossSouls"), displayTypes, SECTION_DISPLAY_HIDDEN)) {
|
||||
shouldUpdateVectors = true;
|
||||
}
|
||||
|
||||
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Ocarina Buttons", "gItemTrackerOcarinaButtonsDisplayType", displayTypes, SECTION_DISPLAY_HIDDEN)) {
|
||||
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Ocarina Buttons", CVAR_TRACKER_ITEM("DisplayType.OcarinaButtons"), displayTypes, SECTION_DISPLAY_HIDDEN)) {
|
||||
shouldUpdateVectors = true;
|
||||
}
|
||||
|
||||
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Fishing Pole", "gItemTrackerFishingPoleDisplayType", extendedDisplayTypes, SECTION_DISPLAY_EXTENDED_HIDDEN)) {
|
||||
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Fishing Pole", CVAR_TRACKER_ITEM("DisplayType.FishingPole"), extendedDisplayTypes, SECTION_DISPLAY_EXTENDED_HIDDEN)) {
|
||||
shouldUpdateVectors = true;
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gItemTrackerDisplayType", TRACKER_DISPLAY_ALWAYS) == TRACKER_DISPLAY_ALWAYS) {
|
||||
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Personal notes", "gItemTrackerNotesDisplayType", displayTypes, SECTION_DISPLAY_HIDDEN)) {
|
||||
if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.Main"), TRACKER_DISPLAY_ALWAYS) == TRACKER_DISPLAY_ALWAYS) {
|
||||
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Personal notes", CVAR_TRACKER_ITEM("DisplayType.Notes"), displayTypes, SECTION_DISPLAY_HIDDEN)) {
|
||||
shouldUpdateVectors = true;
|
||||
}
|
||||
}
|
||||
UIWidgets::EnhancementCheckbox("Show Hookshot Identifiers", "gTrackers.ItemTracker.HookshotIdentifier");
|
||||
UIWidgets::EnhancementCheckbox("Show Hookshot Identifiers", CVAR_TRACKER_ITEM("HookshotIdentifier"));
|
||||
UIWidgets::InsertHelpHoverText("Shows an 'H' or an 'L' to more easiely distinguish between Hookshot and Longshot.");
|
||||
|
||||
UIWidgets::Spacer(0);
|
||||
@ -1476,10 +1476,10 @@ void ItemTrackerSettingsWindow::DrawElement() {
|
||||
}
|
||||
|
||||
void ItemTrackerWindow::InitElement() {
|
||||
float trackerBgR = CVarGetFloat("gItemTrackerBgColorR", 0);
|
||||
float trackerBgG = CVarGetFloat("gItemTrackerBgColorG", 0);
|
||||
float trackerBgB = CVarGetFloat("gItemTrackerBgColorB", 0);
|
||||
float trackerBgA = CVarGetFloat("gItemTrackerBgColorA", 1);
|
||||
float trackerBgR = CVarGetFloat(CVAR_TRACKER_ITEM("BgColorR"), 0);
|
||||
float trackerBgG = CVarGetFloat(CVAR_TRACKER_ITEM("BgColorG"), 0);
|
||||
float trackerBgB = CVarGetFloat(CVAR_TRACKER_ITEM("BgColorB"), 0);
|
||||
float trackerBgA = CVarGetFloat(CVAR_TRACKER_ITEM("BgColorA"), 1);
|
||||
ChromaKeyBackground = {
|
||||
trackerBgR,
|
||||
trackerBgG,
|
||||
|
@ -34,7 +34,7 @@ typedef struct ItemTrackerDungeon {
|
||||
std::vector<uint32_t> items;
|
||||
} ItemTrackerDungeon;
|
||||
|
||||
class ItemTrackerSettingsWindow : public LUS::GuiWindow {
|
||||
class ItemTrackerSettingsWindow : public Ship::GuiWindow {
|
||||
public:
|
||||
using GuiWindow::GuiWindow;
|
||||
|
||||
@ -44,7 +44,7 @@ class ItemTrackerSettingsWindow : public LUS::GuiWindow {
|
||||
void UpdateElement() override {};
|
||||
};
|
||||
|
||||
class ItemTrackerWindow : public LUS::GuiWindow {
|
||||
class ItemTrackerWindow : public Ship::GuiWindow {
|
||||
public:
|
||||
using GuiWindow::GuiWindow;
|
||||
|
||||
|
@ -4,7 +4,7 @@ namespace Rando {
|
||||
class Settings;
|
||||
}
|
||||
|
||||
class RandomizerSettingsWindow : public LUS::GuiWindow {
|
||||
class RandomizerSettingsWindow : public Ship::GuiWindow {
|
||||
public:
|
||||
using GuiWindow::GuiWindow;
|
||||
|
||||
|
@ -42,171 +42,171 @@ Settings::Settings() : mExcludeLocationsOptionsGroups(SPOILER_COLLECTION_GROUP_C
|
||||
void Settings::CreateOptions() {
|
||||
CreateOptionDescriptions();
|
||||
// clang-format off
|
||||
mOptions[RSK_FOREST] = Option::U8("Forest", {"Closed", "Closed Deku", "Open"}, OptionCategory::Setting, "gRandomizeForest", mOptionDescriptions[RSK_FOREST], WidgetType::Combobox, RO_FOREST_CLOSED);
|
||||
mOptions[RSK_KAK_GATE] = Option::U8("Kakariko Gate", {"Closed", "Open"}, OptionCategory::Setting, "gRandomizeKakarikoGate", mOptionDescriptions[RSK_KAK_GATE]);
|
||||
mOptions[RSK_DOOR_OF_TIME] = Option::U8("Door of Time", {"Closed", "Song only", "Open"}, OptionCategory::Setting, "gRandomizeDoorOfTime", mOptionDescriptions[RSK_DOOR_OF_TIME], WidgetType::Combobox);
|
||||
mOptions[RSK_ZORAS_FOUNTAIN] = Option::U8("Zora's Fountain", {"Closed", "Closed as child", "Open"}, OptionCategory::Setting, "gRandomizeZorasFountain", mOptionDescriptions[RSK_ZORAS_FOUNTAIN]);
|
||||
mOptions[RSK_GERUDO_FORTRESS] = Option::U8("Gerudo Fortress", {"Normal", "Fast", "Open"}, OptionCategory::Setting, "gRandomizeGerudoFortress", mOptionDescriptions[RSK_GERUDO_FORTRESS]);
|
||||
mOptions[RSK_RAINBOW_BRIDGE] = Option::U8("Rainbow Bridge", {"Vanilla", "Always open", "Stones", "Medallions", "Dungeon rewards", "Dungeons", "Tokens", "Greg"}, OptionCategory::Setting, "gRandomizeRainbowBridge", mOptionDescriptions[RSK_RAINBOW_BRIDGE], WidgetType::Combobox, RO_BRIDGE_VANILLA, false, IMFLAG_NONE);
|
||||
mOptions[RSK_RAINBOW_BRIDGE_STONE_COUNT] = Option::U8("Stone Count", {NumOpts(0, 4)}, OptionCategory::Setting, "gRandomizeStoneCount", "", WidgetType::Slider, 3, true);
|
||||
mOptions[RSK_RAINBOW_BRIDGE_MEDALLION_COUNT] = Option::U8("Medallion Count", {NumOpts(0, 7)}, OptionCategory::Setting, "gRandomizeMedallionCount", "", WidgetType::Slider, 6, true);
|
||||
mOptions[RSK_RAINBOW_BRIDGE_REWARD_COUNT] = Option::U8("Reward Count", {NumOpts(0, 10)}, OptionCategory::Setting, "gRandomizeRewardCount", "", WidgetType::Slider, 9, true);
|
||||
mOptions[RSK_RAINBOW_BRIDGE_DUNGEON_COUNT] = Option::U8("Dungeon Count", {NumOpts(0, 9)}, OptionCategory::Setting, "gRandomizeDungeonCount", "", WidgetType::Slider, 8, true);
|
||||
mOptions[RSK_RAINBOW_BRIDGE_TOKEN_COUNT] = Option::U8("Token Count", {NumOpts(0, 100)}, OptionCategory::Setting, "gRandomizeTokenCount", "", WidgetType::Slider, 100, true);
|
||||
mOptions[RSK_BRIDGE_OPTIONS] = Option::U8("Bridge Reward Options", {"Standard Rewards", "Greg as Reward", "Greg as Wildcard"}, OptionCategory::Setting, "gRandomizeBridgeRewardOptions", mOptionDescriptions[RSK_BRIDGE_OPTIONS], WidgetType::Combobox, RO_BRIDGE_STANDARD_REWARD, false, IMFLAG_NONE);
|
||||
mOptions[RSK_GANONS_TRIALS] = Option::U8("Ganon's Trials", {"Skip", "Set Number", "Random Number"}, OptionCategory::Setting, "gRandomizeGanonTrial", mOptionDescriptions[RSK_GANONS_TRIALS], WidgetType::Combobox, RO_GANONS_TRIALS_SET_NUMBER);
|
||||
mOptions[RSK_TRIAL_COUNT] = Option::U8("Ganon's Trials Count", {NumOpts(0, 6)}, OptionCategory::Setting, "gRandomizeGanonTrialCount", mOptionDescriptions[RSK_TRIAL_COUNT], WidgetType::Slider, 6, true);
|
||||
mOptions[RSK_STARTING_AGE] = Option::U8("Starting Age", {"Child", "Adult", "Random"}, OptionCategory::Setting, "gRandomizeStartingAge", mOptionDescriptions[RSK_STARTING_AGE], WidgetType::Combobox, RO_AGE_CHILD);
|
||||
mOptions[RSK_FOREST] = Option::U8("Forest", {"Closed", "Closed Deku", "Open"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("Forest"), mOptionDescriptions[RSK_FOREST], WidgetType::Combobox, RO_FOREST_CLOSED);
|
||||
mOptions[RSK_KAK_GATE] = Option::U8("Kakariko Gate", {"Closed", "Open"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("KakarikoGate"), mOptionDescriptions[RSK_KAK_GATE]);
|
||||
mOptions[RSK_DOOR_OF_TIME] = Option::U8("Door of Time", {"Closed", "Song only", "Open"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("DoorOfTime"), mOptionDescriptions[RSK_DOOR_OF_TIME], WidgetType::Combobox);
|
||||
mOptions[RSK_ZORAS_FOUNTAIN] = Option::U8("Zora's Fountain", {"Closed", "Closed as child", "Open"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("ZorasFountain"), mOptionDescriptions[RSK_ZORAS_FOUNTAIN]);
|
||||
mOptions[RSK_GERUDO_FORTRESS] = Option::U8("Gerudo Fortress", {"Normal", "Fast", "Open"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("GerudoFortress"), mOptionDescriptions[RSK_GERUDO_FORTRESS]);
|
||||
mOptions[RSK_RAINBOW_BRIDGE] = Option::U8("Rainbow Bridge", {"Vanilla", "Always open", "Stones", "Medallions", "Dungeon rewards", "Dungeons", "Tokens", "Greg"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("RainbowBridge"), mOptionDescriptions[RSK_RAINBOW_BRIDGE], WidgetType::Combobox, RO_BRIDGE_VANILLA, false, IMFLAG_NONE);
|
||||
mOptions[RSK_RAINBOW_BRIDGE_STONE_COUNT] = Option::U8("Stone Count", {NumOpts(0, 4)}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("StoneCount"), "", WidgetType::Slider, 3, true);
|
||||
mOptions[RSK_RAINBOW_BRIDGE_MEDALLION_COUNT] = Option::U8("Medallion Count", {NumOpts(0, 7)}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("MedallionCount"), "", WidgetType::Slider, 6, true);
|
||||
mOptions[RSK_RAINBOW_BRIDGE_REWARD_COUNT] = Option::U8("Reward Count", {NumOpts(0, 10)}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("RewardCount"), "", WidgetType::Slider, 9, true);
|
||||
mOptions[RSK_RAINBOW_BRIDGE_DUNGEON_COUNT] = Option::U8("Dungeon Count", {NumOpts(0, 9)}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("DungeonCount"), "", WidgetType::Slider, 8, true);
|
||||
mOptions[RSK_RAINBOW_BRIDGE_TOKEN_COUNT] = Option::U8("Token Count", {NumOpts(0, 100)}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("TokenCount"), "", WidgetType::Slider, 100, true);
|
||||
mOptions[RSK_BRIDGE_OPTIONS] = Option::U8("Bridge Reward Options", {"Standard Rewards", "Greg as Reward", "Greg as Wildcard"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("BridgeRewardOptions"), mOptionDescriptions[RSK_BRIDGE_OPTIONS], WidgetType::Combobox, RO_BRIDGE_STANDARD_REWARD, false, IMFLAG_NONE);
|
||||
mOptions[RSK_GANONS_TRIALS] = Option::U8("Ganon's Trials", {"Skip", "Set Number", "Random Number"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("GanonTrial"), mOptionDescriptions[RSK_GANONS_TRIALS], WidgetType::Combobox, RO_GANONS_TRIALS_SET_NUMBER);
|
||||
mOptions[RSK_TRIAL_COUNT] = Option::U8("Ganon's Trials Count", {NumOpts(0, 6)}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("GanonTrialCount"), mOptionDescriptions[RSK_TRIAL_COUNT], WidgetType::Slider, 6, true);
|
||||
mOptions[RSK_STARTING_AGE] = Option::U8("Starting Age", {"Child", "Adult", "Random"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("StartingAge"), mOptionDescriptions[RSK_STARTING_AGE], WidgetType::Combobox, RO_AGE_CHILD);
|
||||
mOptions[RSK_SHUFFLE_ENTRANCES] = Option::Bool("Shuffle Entrances");
|
||||
mOptions[RSK_SHUFFLE_DUNGEON_ENTRANCES] = Option::U8("Dungeon Entrances", {"Off", "On", "On + Ganon"}, OptionCategory::Setting, "gRandomizeShuffleDungeonsEntrances", mOptionDescriptions[RSK_SHUFFLE_DUNGEON_ENTRANCES], WidgetType::Combobox, RO_DUNGEON_ENTRANCE_SHUFFLE_OFF);
|
||||
mOptions[RSK_SHUFFLE_BOSS_ENTRANCES] = Option::U8("Boss Entrances", {"Off", "Age Restricted", "Full"}, OptionCategory::Setting, "gRandomizeShuffleBossEntrances", mOptionDescriptions[RSK_SHUFFLE_BOSS_ENTRANCES], WidgetType::Combobox, RO_BOSS_ROOM_ENTRANCE_SHUFFLE_OFF);
|
||||
mOptions[RSK_SHUFFLE_OVERWORLD_ENTRANCES] = Option::Bool("Overworld Entrances", "gRandomizeShuffleOverworldEntrances", mOptionDescriptions[RSK_SHUFFLE_OVERWORLD_ENTRANCES]);
|
||||
mOptions[RSK_SHUFFLE_INTERIOR_ENTRANCES] = Option::U8("Interior Entrances", {"Off", "Simple", "All"}, OptionCategory::Setting, "gRandomizeShuffleInteriorsEntrances", mOptionDescriptions[RSK_SHUFFLE_INTERIOR_ENTRANCES], WidgetType::Combobox, RO_INTERIOR_ENTRANCE_SHUFFLE_OFF);
|
||||
mOptions[RSK_SHUFFLE_GROTTO_ENTRANCES] = Option::Bool("Grottos Entrances", "gRandomizeShuffleGrottosEntrances", mOptionDescriptions[RSK_SHUFFLE_GROTTO_ENTRANCES]);
|
||||
mOptions[RSK_SHUFFLE_OWL_DROPS] = Option::Bool("Owl Drops", "gRandomizeShuffleOwlDrops", mOptionDescriptions[RSK_SHUFFLE_OWL_DROPS]);
|
||||
mOptions[RSK_SHUFFLE_WARP_SONGS] = Option::Bool("Warp Songs", "gRandomizeShuffleWarpSongs", mOptionDescriptions[RSK_SHUFFLE_WARP_SONGS]);
|
||||
mOptions[RSK_SHUFFLE_OVERWORLD_SPAWNS] = Option::Bool("Overworld Spawns", "gRandomizeShuffleOverworldSpanws", mOptionDescriptions[RSK_SHUFFLE_OVERWORLD_SPAWNS]);
|
||||
mOptions[RSK_MIXED_ENTRANCE_POOLS] = Option::Bool("Mixed Entrance Pools", "gRandomizeMixedEntrances", mOptionDescriptions[RSK_MIXED_ENTRANCE_POOLS]);
|
||||
mOptions[RSK_MIX_DUNGEON_ENTRANCES] = Option::Bool("Mix Dungeons", "gRandomizeMixDungeons", mOptionDescriptions[RSK_MIX_DUNGEON_ENTRANCES], IMFLAG_NONE);
|
||||
mOptions[RSK_MIX_BOSS_ENTRANCES] = Option::Bool("Mix Bosses", "gRandomizeMixBosses", mOptionDescriptions[RSK_MIX_BOSS_ENTRANCES], IMFLAG_NONE);
|
||||
mOptions[RSK_MIX_OVERWORLD_ENTRANCES] = Option::Bool("Mix Overworld", "gRandomizeMixOverworld", mOptionDescriptions[RSK_MIX_OVERWORLD_ENTRANCES], IMFLAG_NONE);
|
||||
mOptions[RSK_MIX_INTERIOR_ENTRANCES] = Option::Bool("Mix Interiors", "gRandomizeMixInteriors", mOptionDescriptions[RSK_MIX_INTERIOR_ENTRANCES], IMFLAG_NONE);
|
||||
mOptions[RSK_MIX_GROTTO_ENTRANCES] = Option::Bool("Mix Grottos", "gRandomizeMixGrottos", mOptionDescriptions[RSK_MIX_GROTTO_ENTRANCES]);
|
||||
mOptions[RSK_DECOUPLED_ENTRANCES] = Option::Bool("Decouple Entrances", "gRandomizeDecoupleEntrances", mOptionDescriptions[RSK_DECOUPLED_ENTRANCES]);
|
||||
mOptions[RSK_BOMBCHUS_IN_LOGIC] = Option::Bool("Bombchus in Logic", "gRandomizeBombchusInLogic", mOptionDescriptions[RSK_BOMBCHUS_IN_LOGIC]);
|
||||
mOptions[RSK_ENABLE_BOMBCHU_DROPS] = Option::U8("Bombchu Drops", {"No", "Yes"}, OptionCategory::Setting, "gRandomizeEnableBombchuDrops", mOptionDescriptions[RSK_ENABLE_BOMBCHU_DROPS], WidgetType::Combobox, RO_AMMO_DROPS_ON);
|
||||
mOptions[RSK_SHUFFLE_DUNGEON_ENTRANCES] = Option::U8("Dungeon Entrances", {"Off", "On", "On + Ganon"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("ShuffleDungeonsEntrances"), mOptionDescriptions[RSK_SHUFFLE_DUNGEON_ENTRANCES], WidgetType::Combobox, RO_DUNGEON_ENTRANCE_SHUFFLE_OFF);
|
||||
mOptions[RSK_SHUFFLE_BOSS_ENTRANCES] = Option::U8("Boss Entrances", {"Off", "Age Restricted", "Full"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("ShuffleBossEntrances"), mOptionDescriptions[RSK_SHUFFLE_BOSS_ENTRANCES], WidgetType::Combobox, RO_BOSS_ROOM_ENTRANCE_SHUFFLE_OFF);
|
||||
mOptions[RSK_SHUFFLE_OVERWORLD_ENTRANCES] = Option::Bool("Overworld Entrances", CVAR_RANDOMIZER_SETTING("ShuffleOverworldEntrances"), mOptionDescriptions[RSK_SHUFFLE_OVERWORLD_ENTRANCES]);
|
||||
mOptions[RSK_SHUFFLE_INTERIOR_ENTRANCES] = Option::U8("Interior Entrances", {"Off", "Simple", "All"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("ShuffleInteriorsEntrances"), mOptionDescriptions[RSK_SHUFFLE_INTERIOR_ENTRANCES], WidgetType::Combobox, RO_INTERIOR_ENTRANCE_SHUFFLE_OFF);
|
||||
mOptions[RSK_SHUFFLE_GROTTO_ENTRANCES] = Option::Bool("Grottos Entrances", CVAR_RANDOMIZER_SETTING("ShuffleGrottosEntrances"), mOptionDescriptions[RSK_SHUFFLE_GROTTO_ENTRANCES]);
|
||||
mOptions[RSK_SHUFFLE_OWL_DROPS] = Option::Bool("Owl Drops", CVAR_RANDOMIZER_SETTING("ShuffleOwlDrops"), mOptionDescriptions[RSK_SHUFFLE_OWL_DROPS]);
|
||||
mOptions[RSK_SHUFFLE_WARP_SONGS] = Option::Bool("Warp Songs", CVAR_RANDOMIZER_SETTING("ShuffleWarpSongs"), mOptionDescriptions[RSK_SHUFFLE_WARP_SONGS]);
|
||||
mOptions[RSK_SHUFFLE_OVERWORLD_SPAWNS] = Option::Bool("Overworld Spawns", CVAR_RANDOMIZER_SETTING("ShuffleOverworldSpanws"), mOptionDescriptions[RSK_SHUFFLE_OVERWORLD_SPAWNS]);
|
||||
mOptions[RSK_MIXED_ENTRANCE_POOLS] = Option::Bool("Mixed Entrance Pools", CVAR_RANDOMIZER_SETTING("MixedEntrances"), mOptionDescriptions[RSK_MIXED_ENTRANCE_POOLS]);
|
||||
mOptions[RSK_MIX_DUNGEON_ENTRANCES] = Option::Bool("Mix Dungeons", CVAR_RANDOMIZER_SETTING("MixDungeons"), mOptionDescriptions[RSK_MIX_DUNGEON_ENTRANCES], IMFLAG_NONE);
|
||||
mOptions[RSK_MIX_BOSS_ENTRANCES] = Option::Bool("Mix Bosses", CVAR_RANDOMIZER_SETTING("MixBosses"), mOptionDescriptions[RSK_MIX_BOSS_ENTRANCES], IMFLAG_NONE);
|
||||
mOptions[RSK_MIX_OVERWORLD_ENTRANCES] = Option::Bool("Mix Overworld", CVAR_RANDOMIZER_SETTING("MixOverworld"), mOptionDescriptions[RSK_MIX_OVERWORLD_ENTRANCES], IMFLAG_NONE);
|
||||
mOptions[RSK_MIX_INTERIOR_ENTRANCES] = Option::Bool("Mix Interiors", CVAR_RANDOMIZER_SETTING("MixInteriors"), mOptionDescriptions[RSK_MIX_INTERIOR_ENTRANCES], IMFLAG_NONE);
|
||||
mOptions[RSK_MIX_GROTTO_ENTRANCES] = Option::Bool("Mix Grottos", CVAR_RANDOMIZER_SETTING("MixGrottos"), mOptionDescriptions[RSK_MIX_GROTTO_ENTRANCES]);
|
||||
mOptions[RSK_DECOUPLED_ENTRANCES] = Option::Bool("Decouple Entrances", CVAR_RANDOMIZER_SETTING("DecoupleEntrances"), mOptionDescriptions[RSK_DECOUPLED_ENTRANCES]);
|
||||
mOptions[RSK_BOMBCHUS_IN_LOGIC] = Option::Bool("Bombchus in Logic", CVAR_RANDOMIZER_SETTING("BombchusInLogic"), mOptionDescriptions[RSK_BOMBCHUS_IN_LOGIC]);
|
||||
mOptions[RSK_ENABLE_BOMBCHU_DROPS] = Option::U8("Bombchu Drops", {"No", "Yes"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("EnableBombchuDrops"), mOptionDescriptions[RSK_ENABLE_BOMBCHU_DROPS], WidgetType::Combobox, RO_AMMO_DROPS_ON);
|
||||
// TODO: AmmoDrops and/or HeartDropRefill, combine with/separate Ammo Drops from Bombchu Drops?
|
||||
mOptions[RSK_TRIFORCE_HUNT] = Option::Bool("Triforce Hunt", "gRandomizeTriforceHunt", mOptionDescriptions[RSK_TRIFORCE_HUNT], IMFLAG_NONE);
|
||||
mOptions[RSK_TRIFORCE_HUNT_PIECES_TOTAL] = Option::U8("Triforce Hunt Total Pieces", {NumOpts(1, 100)}, OptionCategory::Setting, "gRandomizeTriforceHuntTotalPieces", mOptionDescriptions[RSK_TRIFORCE_HUNT_PIECES_TOTAL], WidgetType::Slider, 29, false, IMFLAG_NONE);
|
||||
mOptions[RSK_TRIFORCE_HUNT_PIECES_REQUIRED] = Option::U8("Triforce Hunt Required Pieces", {NumOpts(1, 100)}, OptionCategory::Setting, "gRandomizeTriforceHuntRequiredPieces", mOptionDescriptions[RSK_TRIFORCE_HUNT_PIECES_REQUIRED], WidgetType::Slider, 19);
|
||||
mOptions[RSK_MQ_DUNGEON_RANDOM] = Option::U8("MQ Dungeon Setting", {"None", "Set Number", "Random", "Selection Only"}, OptionCategory::Setting, "gRandomizeMqDungeons", mOptionDescriptions[RSK_MQ_DUNGEON_RANDOM], WidgetType::Combobox, RO_MQ_DUNGEONS_NONE, true, IMFLAG_NONE);
|
||||
mOptions[RSK_MQ_DUNGEON_COUNT] = Option::U8("MQ Dungeon Count", {NumOpts(0, 12)}, OptionCategory::Setting, "gRandomizeMqDungeonCount", "", WidgetType::Slider, 12, true, IMFLAG_NONE);
|
||||
mOptions[RSK_MQ_DUNGEON_SET] = Option::Bool("Set Dungeon Quests", {"Off", "On"}, OptionCategory::Setting, "gRandomizeMqDungeonsSelection", mOptionDescriptions[RSK_MQ_DUNGEON_SET], WidgetType::Checkbox, false, false, IMFLAG_NONE);
|
||||
mOptions[RSK_MQ_DEKU_TREE] = Option::U8("Deku Tree", {"Vanilla", "Master Quest", "Random"}, OptionCategory::Setting, "gRandomizeMqDungeonsDekuTree", "", WidgetType::Combobox, RO_MQ_SET_VANILLA, false, IMFLAG_NONE);
|
||||
mOptions[RSK_MQ_DODONGOS_CAVERN] = Option::U8("Dodongo's Cavern", {"Vanilla", "Master Quest", "Random"}, OptionCategory::Setting, "gRandomizeMqDungeonsDodongosCavern", "", WidgetType::Combobox, RO_MQ_SET_VANILLA, false, IMFLAG_NONE);
|
||||
mOptions[RSK_MQ_JABU_JABU] = Option::U8("Jabu-Jabu's Belly", {"Vanilla", "Master Quest", "Random"}, OptionCategory::Setting, "gRandomizeMqDungeonsJabuJabu", "", WidgetType::Combobox, RO_MQ_SET_VANILLA, false, IMFLAG_NONE);
|
||||
mOptions[RSK_MQ_FOREST_TEMPLE] = Option::U8("Forest Temple", {"Vanilla", "Master Quest", "Random"}, OptionCategory::Setting, "gRandomizeMqDungeonsForestTemple", "", WidgetType::Combobox, RO_MQ_SET_VANILLA, false, IMFLAG_NONE);
|
||||
mOptions[RSK_MQ_FIRE_TEMPLE] = Option::U8("Fire Temple", {"Vanilla", "Master Quest", "Random"}, OptionCategory::Setting, "gRandomizeMqDungeonsFireTemple", "", WidgetType::Combobox, RO_MQ_SET_VANILLA, false, IMFLAG_NONE);
|
||||
mOptions[RSK_MQ_WATER_TEMPLE] = Option::U8("Water Temple", {"Vanilla", "Master Quest", "Random"}, OptionCategory::Setting, "gRandomizeMqDungeonsWaterTemple", "", WidgetType::Combobox, RO_MQ_SET_VANILLA, false, IMFLAG_NONE);
|
||||
mOptions[RSK_MQ_SPIRIT_TEMPLE] = Option::U8("Spirit Temple", {"Vanilla", "Master Quest", "Random"}, OptionCategory::Setting, "gRandomizeMqDungeonsSpiritTemple", "", WidgetType::Combobox, RO_MQ_SET_VANILLA, false, IMFLAG_NONE);
|
||||
mOptions[RSK_MQ_SHADOW_TEMPLE] = Option::U8("Shadow Temple", {"Vanilla", "Master Quest", "Random"}, OptionCategory::Setting, "gRandomizeMqDungeonsShadowTemple", "", WidgetType::Combobox, RO_MQ_SET_VANILLA, false, IMFLAG_NONE);
|
||||
mOptions[RSK_MQ_BOTTOM_OF_THE_WELL] = Option::U8("Bottom of the Well", {"Vanilla", "Master Quest", "Random"}, OptionCategory::Setting, "gRandomizeMqDungeonsBottomOfTheWell", "", WidgetType::Combobox, RO_MQ_SET_VANILLA, false, IMFLAG_NONE);
|
||||
mOptions[RSK_MQ_ICE_CAVERN] = Option::U8("Ice Cavern", {"Vanilla", "Master Quest", "Random"}, OptionCategory::Setting, "gRandomizeMqDungeonsIceCavern", "", WidgetType::Combobox, RO_MQ_SET_VANILLA, false, IMFLAG_NONE);
|
||||
mOptions[RSK_MQ_GTG] = Option::U8("Gerudo Training Grounds", {"Vanilla", "Master Quest", "Random"}, OptionCategory::Setting, "gRandomizeMqDungeonsGTG", "", WidgetType::Combobox, RO_MQ_SET_VANILLA, false, IMFLAG_NONE);
|
||||
mOptions[RSK_MQ_GANONS_CASTLE] = Option::U8("Ganon's Castle", {"Vanilla", "Master Quest", "Random"}, OptionCategory::Setting, "gRandomizeMqDungeonsGanonsCastle", "", WidgetType::Combobox, RO_MQ_SET_VANILLA);
|
||||
mOptions[RSK_SHUFFLE_DUNGEON_REWARDS] = Option::U8("Shuffle Dungeon Rewards", {"End of Dungeons", "Any Dungeon", "Overworld", "Anywhere"}, OptionCategory::Setting, "gRandomizeShuffleDungeonReward", mOptionDescriptions[RSK_SHUFFLE_DUNGEON_REWARDS], WidgetType::Combobox, RO_DUNGEON_REWARDS_END_OF_DUNGEON);
|
||||
mOptions[RSK_LINKS_POCKET] = Option::U8("Link's Pocket", {"Dungeon Reward", "Advancement", "Anything", "Nothing"}, OptionCategory::Setting, "gRandomizeLinksPocket", "", WidgetType::Combobox, RO_LINKS_POCKET_DUNGEON_REWARD);
|
||||
mOptions[RSK_SHUFFLE_SONGS] = Option::U8("Shuffle Songs", {"Song Locations", "Dungeon Rewards", "Anywhere"}, OptionCategory::Setting, "gRandomizeShuffleSongs", mOptionDescriptions[RSK_SHUFFLE_SONGS], WidgetType::Combobox, RO_SONG_SHUFFLE_SONG_LOCATIONS);
|
||||
mOptions[RSK_SHOPSANITY] = Option::U8("Shopsanity", {"Off", "0 Items", "1 Item", "2 Items", "3 Items", "4 Items", "Random"}, OptionCategory::Setting, "gRandomizeShopsanity", mOptionDescriptions[RSK_SHOPSANITY], WidgetType::Combobox, RO_SHOPSANITY_OFF);
|
||||
mOptions[RSK_SHOPSANITY_PRICES] = Option::U8("Shopsanity Prices", {"Balanced", "Starting Wallet", "Adult Wallet", "Giant's Wallet", "Tycoon's Wallet"}, OptionCategory::Setting, "gRandomizeShopsanityPrices", mOptionDescriptions[RSK_SHOPSANITY_PRICES], WidgetType::Combobox, RO_SHOPSANITY_PRICE_BALANCED, false, IMFLAG_NONE);
|
||||
mOptions[RSK_SHOPSANITY_PRICES_AFFORDABLE] = Option::Bool("Affordable Prices", "gRandomizeShopsanityPricesAffordable", mOptionDescriptions[RSK_SHOPSANITY_PRICES_AFFORDABLE]);
|
||||
mOptions[RSK_SHUFFLE_TOKENS] = Option::U8("Tokensanity", {"Off", "Dungeons", "Overworld", "All Tokens"}, OptionCategory::Setting, "gRandomizeShuffleTokens", mOptionDescriptions[RSK_SHUFFLE_TOKENS], WidgetType::Combobox, RO_TOKENSANITY_OFF);
|
||||
mOptions[RSK_SHUFFLE_SCRUBS] = Option::U8("Scrub Shuffle", {"Off", "Affordable", "Expensive", "Random Prices"}, OptionCategory::Setting, "gRandomizeShuffleScrubs", mOptionDescriptions[RSK_SHUFFLE_SCRUBS], WidgetType::Combobox, RO_SCRUBS_OFF);
|
||||
mOptions[RSK_SHUFFLE_BEEHIVES] = Option::Bool("Shuffle Beehives", "gRandomizeShuffleBeehives", mOptionDescriptions[RSK_SHUFFLE_BEEHIVES]);
|
||||
mOptions[RSK_SHUFFLE_COWS] = Option::Bool("Shuffle Cows", "gRandomizeShuffleCows", mOptionDescriptions[RSK_SHUFFLE_COWS]);
|
||||
mOptions[RSK_SHUFFLE_KOKIRI_SWORD] = Option::Bool("Shuffle Kokiri Sword", "gRandomizeShuffleKokiriSword", mOptionDescriptions[RSK_SHUFFLE_KOKIRI_SWORD]);
|
||||
mOptions[RSK_SHUFFLE_MASTER_SWORD] = Option::Bool("Shuffle Master Sword", "gRandomizeShuffleMasterSword", mOptionDescriptions[RSK_SHUFFLE_MASTER_SWORD]);
|
||||
mOptions[RSK_SHUFFLE_CHILD_WALLET] = Option::Bool("Shuffle Child's Wallet", "gRandomizeShuffleChildWallet", mOptionDescriptions[RSK_SHUFFLE_CHILD_WALLET]);
|
||||
mOptions[RSK_SHUFFLE_OCARINA] = Option::Bool("Shuffle Ocarinas", "gRandomizeShuffleOcarinas", mOptionDescriptions[RSK_SHUFFLE_OCARINA]);
|
||||
mOptions[RSK_SHUFFLE_OCARINA_BUTTONS] = Option::Bool("Shuffle Ocarina Buttons", "gRandomizeShuffleOcarinaButtons", mOptionDescriptions[RSK_SHUFFLE_OCARINA_BUTTONS]);
|
||||
mOptions[RSK_SHUFFLE_SWIM] = Option::Bool("Shuffle Swim", "gRandomizeShuffleSwim", mOptionDescriptions[RSK_SHUFFLE_SWIM]);
|
||||
mOptions[RSK_SHUFFLE_WEIRD_EGG] = Option::Bool("Shuffle Weird Egg", "gRandomizeShuffleWeirdEgg", mOptionDescriptions[RSK_SHUFFLE_WEIRD_EGG]);
|
||||
mOptions[RSK_SHUFFLE_GERUDO_MEMBERSHIP_CARD] = Option::Bool("Shuffle Gerudo Membership Card", "gRandomizeShuffleGerudoToken", mOptionDescriptions[RSK_SHUFFLE_GERUDO_MEMBERSHIP_CARD]);
|
||||
mOptions[RSK_SHUFFLE_FISHING_POLE] = Option::Bool("Shuffle Fishing Pole", "gRandomizeShuffleFishingPole", mOptionDescriptions[RSK_SHUFFLE_FISHING_POLE]);
|
||||
mOptions[RSK_SHUFFLE_MAGIC_BEANS] = Option::Bool("Shuffle Magic Beans", "gRandomizeShuffleBeans", mOptionDescriptions[RSK_SHUFFLE_MAGIC_BEANS]);
|
||||
mOptions[RSK_SHUFFLE_MERCHANTS] = Option::U8("Shuffle Merchants", {"Off", "On (No Hints)", "On (With Hints)"}, OptionCategory::Setting, "gRandomizeShuffleMerchants", mOptionDescriptions[RSK_SHUFFLE_MERCHANTS], WidgetType::Combobox, RO_SHUFFLE_MERCHANTS_OFF);
|
||||
mOptions[RSK_SHUFFLE_FROG_SONG_RUPEES] = Option::Bool("Shuffle Frog Song Rupees", "gRandomizeShuffleFrogSongRupees", mOptionDescriptions[RSK_SHUFFLE_FROG_SONG_RUPEES]);
|
||||
mOptions[RSK_SHUFFLE_ADULT_TRADE] = Option::Bool("Shuffle Adult Trade", "gRandomizeShuffleAdultTrade", mOptionDescriptions[RSK_SHUFFLE_ADULT_TRADE]);
|
||||
mOptions[RSK_TRIFORCE_HUNT] = Option::Bool("Triforce Hunt", CVAR_RANDOMIZER_SETTING("TriforceHunt"), mOptionDescriptions[RSK_TRIFORCE_HUNT], IMFLAG_NONE);
|
||||
mOptions[RSK_TRIFORCE_HUNT_PIECES_TOTAL] = Option::U8("Triforce Hunt Total Pieces", {NumOpts(1, 100)}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("TriforceHuntTotalPieces"), mOptionDescriptions[RSK_TRIFORCE_HUNT_PIECES_TOTAL], WidgetType::Slider, 29, false, IMFLAG_NONE);
|
||||
mOptions[RSK_TRIFORCE_HUNT_PIECES_REQUIRED] = Option::U8("Triforce Hunt Required Pieces", {NumOpts(1, 100)}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("TriforceHuntRequiredPieces"), mOptionDescriptions[RSK_TRIFORCE_HUNT_PIECES_REQUIRED], WidgetType::Slider, 19);
|
||||
mOptions[RSK_MQ_DUNGEON_RANDOM] = Option::U8("MQ Dungeon Setting", {"None", "Set Number", "Random", "Selection Only"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("MQDungeons"), mOptionDescriptions[RSK_MQ_DUNGEON_RANDOM], WidgetType::Combobox, RO_MQ_DUNGEONS_NONE, true, IMFLAG_NONE);
|
||||
mOptions[RSK_MQ_DUNGEON_COUNT] = Option::U8("MQ Dungeon Count", {NumOpts(0, 12)}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("MQDungeonCount"), "", WidgetType::Slider, 12, true, IMFLAG_NONE);
|
||||
mOptions[RSK_MQ_DUNGEON_SET] = Option::Bool("Set Dungeon Quests", {"Off", "On"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("MQDungeonsSelection"), mOptionDescriptions[RSK_MQ_DUNGEON_SET], WidgetType::Checkbox, false, false, IMFLAG_NONE);
|
||||
mOptions[RSK_MQ_DEKU_TREE] = Option::U8("Deku Tree", {"Vanilla", "Master Quest", "Random"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("MQDungeonsDekuTree"), "", WidgetType::Combobox, RO_MQ_SET_VANILLA, false, IMFLAG_NONE);
|
||||
mOptions[RSK_MQ_DODONGOS_CAVERN] = Option::U8("Dodongo's Cavern", {"Vanilla", "Master Quest", "Random"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("MQDungeonsDodongosCavern"), "", WidgetType::Combobox, RO_MQ_SET_VANILLA, false, IMFLAG_NONE);
|
||||
mOptions[RSK_MQ_JABU_JABU] = Option::U8("Jabu-Jabu's Belly", {"Vanilla", "Master Quest", "Random"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("MQDungeonsJabuJabu"), "", WidgetType::Combobox, RO_MQ_SET_VANILLA, false, IMFLAG_NONE);
|
||||
mOptions[RSK_MQ_FOREST_TEMPLE] = Option::U8("Forest Temple", {"Vanilla", "Master Quest", "Random"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("MQDungeonsForestTemple"), "", WidgetType::Combobox, RO_MQ_SET_VANILLA, false, IMFLAG_NONE);
|
||||
mOptions[RSK_MQ_FIRE_TEMPLE] = Option::U8("Fire Temple", {"Vanilla", "Master Quest", "Random"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("MQDungeonsFireTemple"), "", WidgetType::Combobox, RO_MQ_SET_VANILLA, false, IMFLAG_NONE);
|
||||
mOptions[RSK_MQ_WATER_TEMPLE] = Option::U8("Water Temple", {"Vanilla", "Master Quest", "Random"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("MQDungeonsWaterTemple"), "", WidgetType::Combobox, RO_MQ_SET_VANILLA, false, IMFLAG_NONE);
|
||||
mOptions[RSK_MQ_SPIRIT_TEMPLE] = Option::U8("Spirit Temple", {"Vanilla", "Master Quest", "Random"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("MQDungeonsSpiritTemple"), "", WidgetType::Combobox, RO_MQ_SET_VANILLA, false, IMFLAG_NONE);
|
||||
mOptions[RSK_MQ_SHADOW_TEMPLE] = Option::U8("Shadow Temple", {"Vanilla", "Master Quest", "Random"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("MQDungeonsShadowTemple"), "", WidgetType::Combobox, RO_MQ_SET_VANILLA, false, IMFLAG_NONE);
|
||||
mOptions[RSK_MQ_BOTTOM_OF_THE_WELL] = Option::U8("Bottom of the Well", {"Vanilla", "Master Quest", "Random"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("MQDungeonsBottomOfTheWell"), "", WidgetType::Combobox, RO_MQ_SET_VANILLA, false, IMFLAG_NONE);
|
||||
mOptions[RSK_MQ_ICE_CAVERN] = Option::U8("Ice Cavern", {"Vanilla", "Master Quest", "Random"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("MQDungeonsIceCavern"), "", WidgetType::Combobox, RO_MQ_SET_VANILLA, false, IMFLAG_NONE);
|
||||
mOptions[RSK_MQ_GTG] = Option::U8("Gerudo Training Grounds", {"Vanilla", "Master Quest", "Random"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("MQDungeonsGTG"), "", WidgetType::Combobox, RO_MQ_SET_VANILLA, false, IMFLAG_NONE);
|
||||
mOptions[RSK_MQ_GANONS_CASTLE] = Option::U8("Ganon's Castle", {"Vanilla", "Master Quest", "Random"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("MQDungeonsGanonsCastle"), "", WidgetType::Combobox, RO_MQ_SET_VANILLA);
|
||||
mOptions[RSK_SHUFFLE_DUNGEON_REWARDS] = Option::U8("Shuffle Dungeon Rewards", {"End of Dungeons", "Any Dungeon", "Overworld", "Anywhere"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("ShuffleDungeonReward"), mOptionDescriptions[RSK_SHUFFLE_DUNGEON_REWARDS], WidgetType::Combobox, RO_DUNGEON_REWARDS_END_OF_DUNGEON);
|
||||
mOptions[RSK_LINKS_POCKET] = Option::U8("Link's Pocket", {"Dungeon Reward", "Advancement", "Anything", "Nothing"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("LinksPocket"), "", WidgetType::Combobox, RO_LINKS_POCKET_DUNGEON_REWARD);
|
||||
mOptions[RSK_SHUFFLE_SONGS] = Option::U8("Shuffle Songs", {"Song Locations", "Dungeon Rewards", "Anywhere"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("ShuffleSongs"), mOptionDescriptions[RSK_SHUFFLE_SONGS], WidgetType::Combobox, RO_SONG_SHUFFLE_SONG_LOCATIONS);
|
||||
mOptions[RSK_SHOPSANITY] = Option::U8("Shopsanity", {"Off", "0 Items", "1 Item", "2 Items", "3 Items", "4 Items", "Random"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("Shopsanity"), mOptionDescriptions[RSK_SHOPSANITY], WidgetType::Combobox, RO_SHOPSANITY_OFF);
|
||||
mOptions[RSK_SHOPSANITY_PRICES] = Option::U8("Shopsanity Prices", {"Balanced", "Starting Wallet", "Adult Wallet", "Giant's Wallet", "Tycoon's Wallet"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("ShopsanityPrices"), mOptionDescriptions[RSK_SHOPSANITY_PRICES], WidgetType::Combobox, RO_SHOPSANITY_PRICE_BALANCED, false, IMFLAG_NONE);
|
||||
mOptions[RSK_SHOPSANITY_PRICES_AFFORDABLE] = Option::Bool("Affordable Prices", CVAR_RANDOMIZER_SETTING("ShopsanityPricesAffordable"), mOptionDescriptions[RSK_SHOPSANITY_PRICES_AFFORDABLE]);
|
||||
mOptions[RSK_SHUFFLE_TOKENS] = Option::U8("Tokensanity", {"Off", "Dungeons", "Overworld", "All Tokens"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("ShuffleTokens"), mOptionDescriptions[RSK_SHUFFLE_TOKENS], WidgetType::Combobox, RO_TOKENSANITY_OFF);
|
||||
mOptions[RSK_SHUFFLE_SCRUBS] = Option::U8("Scrub Shuffle", {"Off", "Affordable", "Expensive", "Random Prices"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("ShuffleScrubs"), mOptionDescriptions[RSK_SHUFFLE_SCRUBS], WidgetType::Combobox, RO_SCRUBS_OFF);
|
||||
mOptions[RSK_SHUFFLE_BEEHIVES] = Option::Bool("Shuffle Beehives", CVAR_RANDOMIZER_SETTING("ShuffleBeehives"), mOptionDescriptions[RSK_SHUFFLE_BEEHIVES]);
|
||||
mOptions[RSK_SHUFFLE_COWS] = Option::Bool("Shuffle Cows", CVAR_RANDOMIZER_SETTING("ShuffleCows"), mOptionDescriptions[RSK_SHUFFLE_COWS]);
|
||||
mOptions[RSK_SHUFFLE_KOKIRI_SWORD] = Option::Bool("Shuffle Kokiri Sword", CVAR_RANDOMIZER_SETTING("ShuffleKokiriSword"), mOptionDescriptions[RSK_SHUFFLE_KOKIRI_SWORD]);
|
||||
mOptions[RSK_SHUFFLE_MASTER_SWORD] = Option::Bool("Shuffle Master Sword", CVAR_RANDOMIZER_SETTING("ShuffleMasterSword"), mOptionDescriptions[RSK_SHUFFLE_MASTER_SWORD]);
|
||||
mOptions[RSK_SHUFFLE_CHILD_WALLET] = Option::Bool("Shuffle Child's Wallet", CVAR_RANDOMIZER_SETTING("ShuffleChildWallet"), mOptionDescriptions[RSK_SHUFFLE_CHILD_WALLET]);
|
||||
mOptions[RSK_SHUFFLE_OCARINA] = Option::Bool("Shuffle Ocarinas", CVAR_RANDOMIZER_SETTING("ShuffleOcarinas"), mOptionDescriptions[RSK_SHUFFLE_OCARINA]);
|
||||
mOptions[RSK_SHUFFLE_OCARINA_BUTTONS] = Option::Bool("Shuffle Ocarina Buttons", CVAR_RANDOMIZER_SETTING("ShuffleOcarinaButtons"), mOptionDescriptions[RSK_SHUFFLE_OCARINA_BUTTONS]);
|
||||
mOptions[RSK_SHUFFLE_SWIM] = Option::Bool("Shuffle Swim", CVAR_RANDOMIZER_SETTING("ShuffleSwim"), mOptionDescriptions[RSK_SHUFFLE_SWIM]);
|
||||
mOptions[RSK_SHUFFLE_WEIRD_EGG] = Option::Bool("Shuffle Weird Egg", CVAR_RANDOMIZER_SETTING("ShuffleWeirdEgg"), mOptionDescriptions[RSK_SHUFFLE_WEIRD_EGG]);
|
||||
mOptions[RSK_SHUFFLE_GERUDO_MEMBERSHIP_CARD] = Option::Bool("Shuffle Gerudo Membership Card", CVAR_RANDOMIZER_SETTING("ShuffleGerudoToken"), mOptionDescriptions[RSK_SHUFFLE_GERUDO_MEMBERSHIP_CARD]);
|
||||
mOptions[RSK_SHUFFLE_FISHING_POLE] = Option::Bool("Shuffle Fishing Pole", CVAR_RANDOMIZER_SETTING("ShuffleFishingPole"), mOptionDescriptions[RSK_SHUFFLE_FISHING_POLE]);
|
||||
mOptions[RSK_SHUFFLE_MAGIC_BEANS] = Option::Bool("Shuffle Magic Beans", CVAR_RANDOMIZER_SETTING("ShuffleBeans"), mOptionDescriptions[RSK_SHUFFLE_MAGIC_BEANS]);
|
||||
mOptions[RSK_SHUFFLE_MERCHANTS] = Option::U8("Shuffle Merchants", {"Off", "On (No Hints)", "On (With Hints)"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("ShuffleMerchants"), mOptionDescriptions[RSK_SHUFFLE_MERCHANTS], WidgetType::Combobox, RO_SHUFFLE_MERCHANTS_OFF);
|
||||
mOptions[RSK_SHUFFLE_FROG_SONG_RUPEES] = Option::Bool("Shuffle Frog Song Rupees", CVAR_RANDOMIZER_SETTING("ShuffleFrogSongRupees"), mOptionDescriptions[RSK_SHUFFLE_FROG_SONG_RUPEES]);
|
||||
mOptions[RSK_SHUFFLE_ADULT_TRADE] = Option::Bool("Shuffle Adult Trade", CVAR_RANDOMIZER_SETTING("ShuffleAdultTrade"), mOptionDescriptions[RSK_SHUFFLE_ADULT_TRADE]);
|
||||
mOptions[RSK_SHUFFLE_CHEST_MINIGAME] = Option::U8("Shuffle Chest Minigame", {"Off", "On (Separate)", "On (Pack)"});
|
||||
mOptions[RSK_SHUFFLE_100_GS_REWARD] = Option::Bool("Shuffle 100 GS Reward", "gRandomizeShuffle100GSReward", mOptionDescriptions[RSK_SHUFFLE_100_GS_REWARD], IMFLAG_SEPARATOR_BOTTOM, WidgetType::Checkbox, RO_GENERIC_OFF);
|
||||
mOptions[RSK_SHUFFLE_BOSS_SOULS] = Option::U8("Shuffle Boss Souls", {"Off", "On", "On + Ganon"}, OptionCategory::Setting, "gRandomizeShuffleBossSouls", mOptionDescriptions[RSK_SHUFFLE_BOSS_SOULS], WidgetType::Combobox);
|
||||
mOptions[RSK_FISHSANITY] = Option::U8("Fishsanity", {"Off", "Shuffle Fishing Pond", "Shuffle Overworld Fish", "Shuffle Both"}, OptionCategory::Setting, "gRandomizeFishsanity", mOptionDescriptions[RSK_FISHSANITY], WidgetType::Combobox, RO_FISHSANITY_OFF);
|
||||
mOptions[RSK_FISHSANITY_POND_COUNT] = Option::U8("Pond Fish Count", {NumOpts(0,17,1)}, OptionCategory::Setting, "gRandomizeFishsanityPondCount", mOptionDescriptions[RSK_FISHSANITY_POND_COUNT], WidgetType::Slider, 0, true, IMFLAG_NONE);
|
||||
mOptions[RSK_FISHSANITY_AGE_SPLIT] = Option::Bool("Pond Age Split", "gRandomizeFishsanityAgeSplit", mOptionDescriptions[RSK_FISHSANITY_AGE_SPLIT]);
|
||||
mOptions[RSK_SHUFFLE_MAPANDCOMPASS] = Option::U8("Maps/Compasses", {"Start With", "Vanilla", "Own Dungeon", "Any Dungeon", "Overworld", "Anywhere"}, OptionCategory::Setting, "gRandomizeStartingMapsCompasses", mOptionDescriptions[RSK_SHUFFLE_MAPANDCOMPASS], WidgetType::Combobox, RO_DUNGEON_ITEM_LOC_OWN_DUNGEON);
|
||||
mOptions[RSK_KEYSANITY] = Option::U8("Small Keys", {"Start With", "Vanilla", "Own Dungeon", "Any Dungeon", "Overworld", "Anywhere"}, OptionCategory::Setting, "gRandomizeKeysanity", mOptionDescriptions[RSK_KEYSANITY], WidgetType::Combobox, RO_DUNGEON_ITEM_LOC_OWN_DUNGEON);
|
||||
mOptions[RSK_GERUDO_KEYS] = Option::U8("Gerudo Fortress Keys", {"Vanilla", "Any Dungeon", "Overworld", "Anywhere"}, OptionCategory::Setting, "gRandomizeGerudoKeys", mOptionDescriptions[RSK_GERUDO_KEYS], WidgetType::Combobox, RO_GERUDO_KEYS_VANILLA);
|
||||
mOptions[RSK_BOSS_KEYSANITY] = Option::U8("Boss Keys", {"Start With", "Vanilla", "Own Dungeon", "Any Dungeon", "Overworld", "Anywhere"}, OptionCategory::Setting, "gRandomizeBossKeysanity", mOptionDescriptions[RSK_BOSS_KEYSANITY], WidgetType::Combobox, RO_DUNGEON_ITEM_LOC_OWN_DUNGEON);
|
||||
mOptions[RSK_GANONS_BOSS_KEY] = Option::U8("Ganon's Boss Key", {"Vanilla", "Own Dungeon", "Start With", "Any Dungeon", "Overworld", "Anywhere", "LACS-Vanilla", "LACS-Stones", "LACS-Medallions", "LACS-Rewards", "LACS-Dungeons", "LACS-Tokens", "Triforce Hunt"}, OptionCategory::Setting, "gRandomizeShuffleGanonBossKey", mOptionDescriptions[RSK_GANONS_BOSS_KEY], WidgetType::Combobox, RO_GANON_BOSS_KEY_VANILLA);
|
||||
mOptions[RSK_LACS_STONE_COUNT] = Option::U8("Stone Count", {NumOpts(0, 4)}, OptionCategory::Setting, "gRandomizeLacsStoneCount", "", WidgetType::Slider, 3, true);
|
||||
mOptions[RSK_LACS_MEDALLION_COUNT] = Option::U8("Medallion Count", {NumOpts(0, 7)}, OptionCategory::Setting, "gRandomizeLacsMedallionCount", "", WidgetType::Slider, 6, true);
|
||||
mOptions[RSK_LACS_REWARD_COUNT] = Option::U8("Reward Count", {NumOpts(0, 10)}, OptionCategory::Setting, "gRandomizeLacsRewardCount", "", WidgetType::Slider, 9, true);
|
||||
mOptions[RSK_LACS_DUNGEON_COUNT] = Option::U8("Dungeon Count", {NumOpts(0, 9)}, OptionCategory::Setting, "gRandomizeLacsDungeonCount", "", WidgetType::Slider, 8, true);
|
||||
mOptions[RSK_LACS_TOKEN_COUNT] = Option::U8("Token Count", {NumOpts(0, 100)}, OptionCategory::Setting, "gRandomizeLacsTokenCount", "", WidgetType::Slider, 100, true);
|
||||
mOptions[RSK_LACS_OPTIONS] = Option::U8("LACS Reward Options", {"Standard Reward", "Greg as Reward", "Greg as Wildcard"}, OptionCategory::Setting, "gRandomizeLacsRewardOptions", "", WidgetType::Combobox, RO_LACS_STANDARD_REWARD);
|
||||
mOptions[RSK_KEYRINGS] = Option::U8("Key Rings", {"Off", "Random", "Count", "Selection"}, OptionCategory::Setting, "gRandomizeShuffleKeyRings", mOptionDescriptions[RSK_KEYRINGS], WidgetType::Combobox, RO_KEYRINGS_OFF);
|
||||
mOptions[RSK_KEYRINGS_RANDOM_COUNT] = Option::U8("Keyring Dungeon Count", {NumOpts(0, 9)}, OptionCategory::Setting, "gRandomizeShuffleKeyRingsRandomCount", "", WidgetType::Slider, 8);
|
||||
mOptions[RSK_KEYRINGS_GERUDO_FORTRESS] = Option::Bool("Gerudo Fortress", "gRandomizeShuffleKeyRingsGerudoFortress", "", IMFLAG_NONE);
|
||||
mOptions[RSK_KEYRINGS_FOREST_TEMPLE] = Option::Bool("Forest Temple", "gRandomizeShuffleKeyRingsForestTemple", "", IMFLAG_NONE);
|
||||
mOptions[RSK_KEYRINGS_FIRE_TEMPLE] = Option::Bool("Fire Temple", "gRandomizeShuffleKeyRingsFireTemple", "", IMFLAG_NONE);
|
||||
mOptions[RSK_KEYRINGS_WATER_TEMPLE] = Option::Bool("Water Temple", "gRandomizeShuffleKeyRingsWaterTemple", "", IMFLAG_NONE);
|
||||
mOptions[RSK_KEYRINGS_SPIRIT_TEMPLE] = Option::Bool("Spirit Temple", "gRandomizeShuffleKeyRingsSpiritTemple", "", IMFLAG_NONE);
|
||||
mOptions[RSK_KEYRINGS_SHADOW_TEMPLE] = Option::Bool("Shadow Temple", "gRandomizeShuffleKeyRingsShadowTemple", "", IMFLAG_NONE);
|
||||
mOptions[RSK_KEYRINGS_BOTTOM_OF_THE_WELL] = Option::Bool("Bottom of the Well", "gRandomizeShuffleKeyRingsBottomOfTheWell", "", IMFLAG_NONE);
|
||||
mOptions[RSK_KEYRINGS_GTG] = Option::Bool("Gerudo Training Grounds", "gRandomizeShuffleKeyRingsGTG", "", IMFLAG_NONE);
|
||||
mOptions[RSK_KEYRINGS_GANONS_CASTLE] = Option::Bool("Ganon's Castle", "gRandomizeShuffleKeyRingsGanonsCastle");
|
||||
mOptions[RSK_SKIP_CHILD_STEALTH] = Option::Bool("Skip Child Stealth", {"Don't Skip", "Skip"}, OptionCategory::Setting, "gRandomizeSkipChildStealth", mOptionDescriptions[RSK_SKIP_CHILD_STEALTH], WidgetType::Checkbox, RO_GENERIC_DONT_SKIP);
|
||||
mOptions[RSK_SKIP_CHILD_ZELDA] = Option::Bool("Skip Child Zelda", {"Don't Skip", "Skip"}, OptionCategory::Setting, "gRandomizeSkipChildZelda", mOptionDescriptions[RSK_SKIP_CHILD_ZELDA], WidgetType::Checkbox, RO_GENERIC_DONT_SKIP);
|
||||
mOptions[RSK_SKIP_EPONA_RACE] = Option::Bool("Skip Epona Race", {"Don't Skip", "Skip"}, OptionCategory::Setting, "gRandomizeSkipEponaRace", mOptionDescriptions[RSK_SKIP_EPONA_RACE], WidgetType::Checkbox, RO_GENERIC_DONT_SKIP);
|
||||
mOptions[RSK_SKIP_SCARECROWS_SONG] = Option::Bool("Skip Scarecrow's Song", "gRandomizeSkipScarecrowsSong", mOptionDescriptions[RSK_SKIP_SCARECROWS_SONG]);
|
||||
mOptions[RSK_BIG_POE_COUNT] = Option::U8("Big Poe Target Count", {NumOpts(1, 10)}, OptionCategory::Setting, "gRandomizeBigPoeTargetCount", mOptionDescriptions[RSK_BIG_POE_COUNT], WidgetType::Slider, 9);
|
||||
mOptions[RSK_CUCCO_COUNT] = Option::U8("Cuccos to return", {NumOpts(0, 7)}, OptionCategory::Setting, "gRandomizeCuccosToReturn", mOptionDescriptions[RSK_CUCCO_COUNT], WidgetType::Slider, 7);
|
||||
mOptions[RSK_COMPLETE_MASK_QUEST] = Option::Bool("Complete Mask Quest", "gRandomizeCompleteMaskQuest", mOptionDescriptions[RSK_COMPLETE_MASK_QUEST]);
|
||||
mOptions[RSK_ENABLE_GLITCH_CUTSCENES] = Option::Bool("Enable Glitch-Useful Cutscenes", "gRandomizeEnableGlitchCutscenes", mOptionDescriptions[RSK_ENABLE_GLITCH_CUTSCENES]);
|
||||
mOptions[RSK_GOSSIP_STONE_HINTS] = Option::U8("Gossip Stone Hints", {"No Hints", "Need Nothing", "Mask of Truth", "Stone of Agony"}, OptionCategory::Setting, "gRandomizeGossipStoneHints", mOptionDescriptions[RSK_GOSSIP_STONE_HINTS], WidgetType::Combobox, RO_GOSSIP_STONES_NEED_NOTHING, false, IMFLAG_NONE);
|
||||
mOptions[RSK_HINT_CLARITY] = Option::U8("Hint Clarity", {"Obscure", "Ambiguous", "Clear"}, OptionCategory::Setting, "gRandomizeHintClarity", mOptionDescriptions[RSK_HINT_CLARITY], WidgetType::Combobox, RO_HINT_CLARITY_CLEAR, true, IMFLAG_INDENT);
|
||||
mOptions[RSK_HINT_DISTRIBUTION] = Option::U8("Hint Distribution", {"Useless", "Balanced", "Strong", "Very Strong"}, OptionCategory::Setting, "gRandomizeHintDistribution", mOptionDescriptions[RSK_HINT_DISTRIBUTION], WidgetType::Combobox, RO_HINT_DIST_BALANCED, true, IMFLAG_UNINDENT);
|
||||
mOptions[RSK_TOT_ALTAR_HINT] = Option::Bool("ToT Altar Hint", {"Off", "On"}, OptionCategory::Setting, "gRandomizeAltarHint", mOptionDescriptions[RSK_TOT_ALTAR_HINT], WidgetType::Checkbox, RO_GENERIC_ON, false, IMFLAG_INDENT);
|
||||
mOptions[RSK_GANONDORF_HINT] = Option::Bool("Ganondorf Hint", {"Off", "On"}, OptionCategory::Setting, "gRandomizeGanondorfHint", mOptionDescriptions[RSK_GANONDORF_HINT], WidgetType::Checkbox, RO_GENERIC_ON, false, IMFLAG_NONE);
|
||||
mOptions[RSK_SHEIK_LA_HINT] = Option::Bool("Sheik Light Arrow Hint", {"Off", "On"}, OptionCategory::Setting, "gRandomizeSheikLAHint", mOptionDescriptions[RSK_SHEIK_LA_HINT], WidgetType::Checkbox, RO_GENERIC_ON, false, IMFLAG_NONE);
|
||||
mOptions[RSK_DAMPES_DIARY_HINT] = Option::Bool("Dampe's Diary Hint", "gRandomizeDampeHint", mOptionDescriptions[RSK_DAMPES_DIARY_HINT], IMFLAG_NONE);
|
||||
mOptions[RSK_GREG_HINT] = Option::Bool("Greg the Green Rupee Hint", "gRandomizeGregHint", mOptionDescriptions[RSK_GREG_HINT], IMFLAG_NONE);
|
||||
mOptions[RSK_SARIA_HINT] = Option::Bool("Saria's Hint", "gRandomizeSariaHint", mOptionDescriptions[RSK_SARIA_HINT], IMFLAG_NONE);
|
||||
mOptions[RSK_FISHING_POLE_HINT] = Option::Bool("Fishing Pole Hint", "gRandomizeFishingPoleHint", mOptionDescriptions[RSK_FISHING_POLE_HINT], IMFLAG_NONE);
|
||||
mOptions[RSK_FROGS_HINT] = Option::Bool("Frog Ocarina Game Hint", "gRandomizeFrogsHint", mOptionDescriptions[RSK_FROGS_HINT], IMFLAG_NONE);
|
||||
mOptions[RSK_BIGGORON_HINT] = Option::Bool("Biggoron's Hint", "gRandomizeBiggoronHint", mOptionDescriptions[RSK_BIGGORON_HINT], IMFLAG_NONE);
|
||||
mOptions[RSK_BIG_POES_HINT] = Option::Bool("Big Poes Hint", "gRandomizeBigPoesHint", mOptionDescriptions[RSK_BIG_POES_HINT], IMFLAG_NONE);
|
||||
mOptions[RSK_CHICKENS_HINT] = Option::Bool("Chickens Hint", "gRandomizeChickensHint", mOptionDescriptions[RSK_CHICKENS_HINT], IMFLAG_NONE);
|
||||
mOptions[RSK_MALON_HINT] = Option::Bool("Malon Hint", "gRandomizeMalonHint", mOptionDescriptions[RSK_MALON_HINT], IMFLAG_NONE);
|
||||
mOptions[RSK_HBA_HINT] = Option::Bool("Horseback Archery Hint", "gRandomizeHBAHint", mOptionDescriptions[RSK_HBA_HINT], IMFLAG_NONE);
|
||||
mOptions[RSK_WARP_SONG_HINTS] = Option::Bool("Warp Song Hints", "gRandomizeWarpSongText", mOptionDescriptions[RSK_WARP_SONG_HINTS], IMFLAG_NONE, WidgetType::Checkbox, RO_GENERIC_ON);
|
||||
mOptions[RSK_SCRUB_TEXT_HINT] = Option::Bool("Scrub Hint Text", "gRandomizeScrubText", mOptionDescriptions[RSK_SCRUB_TEXT_HINT], IMFLAG_NONE);
|
||||
mOptions[RSK_KAK_10_SKULLS_HINT] = Option::Bool("10 GS Hint", "gRandomize10GSHint", mOptionDescriptions[RSK_KAK_10_SKULLS_HINT], IMFLAG_NONE);
|
||||
mOptions[RSK_KAK_20_SKULLS_HINT] = Option::Bool("20 GS Hint", "gRandomize20GSHint", mOptionDescriptions[RSK_KAK_20_SKULLS_HINT], IMFLAG_NONE);
|
||||
mOptions[RSK_KAK_30_SKULLS_HINT] = Option::Bool("30 GS Hint", "gRandomize30GSHint", mOptionDescriptions[RSK_KAK_30_SKULLS_HINT], IMFLAG_NONE);
|
||||
mOptions[RSK_KAK_40_SKULLS_HINT] = Option::Bool("40 GS Hint", "gRandomize40GSHint", mOptionDescriptions[RSK_KAK_40_SKULLS_HINT], IMFLAG_NONE);
|
||||
mOptions[RSK_KAK_50_SKULLS_HINT] = Option::Bool("50 GS Hint", "gRandomize50GSHint", mOptionDescriptions[RSK_KAK_50_SKULLS_HINT], IMFLAG_NONE);
|
||||
mOptions[RSK_KAK_100_SKULLS_HINT] = Option::Bool("100 GS Hint", "gRandomize100GSHint", mOptionDescriptions[RSK_KAK_100_SKULLS_HINT]);
|
||||
mOptions[RSK_SHUFFLE_100_GS_REWARD] = Option::Bool("Shuffle 100 GS Reward", CVAR_RANDOMIZER_SETTING("Shuffle100GSReward"), mOptionDescriptions[RSK_SHUFFLE_100_GS_REWARD], IMFLAG_SEPARATOR_BOTTOM, WidgetType::Checkbox, RO_GENERIC_OFF);
|
||||
mOptions[RSK_SHUFFLE_BOSS_SOULS] = Option::U8("Shuffle Boss Souls", {"Off", "On", "On + Ganon"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("ShuffleBossSouls"), mOptionDescriptions[RSK_SHUFFLE_BOSS_SOULS], WidgetType::Combobox);
|
||||
mOptions[RSK_FISHSANITY] = Option::U8("Fishsanity", {"Off", "Shuffle Fishing Pond", "Shuffle Overworld Fish", "Shuffle Both"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("Fishsanity"), mOptionDescriptions[RSK_FISHSANITY], WidgetType::Combobox, RO_FISHSANITY_OFF);
|
||||
mOptions[RSK_FISHSANITY_POND_COUNT] = Option::U8("Pond Fish Count", {NumOpts(0,17,1)}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("FishsanityPondCount"), mOptionDescriptions[RSK_FISHSANITY_POND_COUNT], WidgetType::Slider, 0, true, IMFLAG_NONE);
|
||||
mOptions[RSK_FISHSANITY_AGE_SPLIT] = Option::Bool("Pond Age Split", CVAR_RANDOMIZER_SETTING("FishsanityAgeSplit"), mOptionDescriptions[RSK_FISHSANITY_AGE_SPLIT]);
|
||||
mOptions[RSK_SHUFFLE_MAPANDCOMPASS] = Option::U8("Maps/Compasses", {"Start With", "Vanilla", "Own Dungeon", "Any Dungeon", "Overworld", "Anywhere"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("StartingMapsCompasses"), mOptionDescriptions[RSK_SHUFFLE_MAPANDCOMPASS], WidgetType::Combobox, RO_DUNGEON_ITEM_LOC_OWN_DUNGEON);
|
||||
mOptions[RSK_KEYSANITY] = Option::U8("Small Keys", {"Start With", "Vanilla", "Own Dungeon", "Any Dungeon", "Overworld", "Anywhere"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("Keysanity"), mOptionDescriptions[RSK_KEYSANITY], WidgetType::Combobox, RO_DUNGEON_ITEM_LOC_OWN_DUNGEON);
|
||||
mOptions[RSK_GERUDO_KEYS] = Option::U8("Gerudo Fortress Keys", {"Vanilla", "Any Dungeon", "Overworld", "Anywhere"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("GerudoKeys"), mOptionDescriptions[RSK_GERUDO_KEYS], WidgetType::Combobox, RO_GERUDO_KEYS_VANILLA);
|
||||
mOptions[RSK_BOSS_KEYSANITY] = Option::U8("Boss Keys", {"Start With", "Vanilla", "Own Dungeon", "Any Dungeon", "Overworld", "Anywhere"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("BossKeysanity"), mOptionDescriptions[RSK_BOSS_KEYSANITY], WidgetType::Combobox, RO_DUNGEON_ITEM_LOC_OWN_DUNGEON);
|
||||
mOptions[RSK_GANONS_BOSS_KEY] = Option::U8("Ganon's Boss Key", {"Vanilla", "Own Dungeon", "Start With", "Any Dungeon", "Overworld", "Anywhere", "LACS-Vanilla", "LACS-Stones", "LACS-Medallions", "LACS-Rewards", "LACS-Dungeons", "LACS-Tokens", "Triforce Hunt"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("ShuffleGanonBossKey"), mOptionDescriptions[RSK_GANONS_BOSS_KEY], WidgetType::Combobox, RO_GANON_BOSS_KEY_VANILLA);
|
||||
mOptions[RSK_LACS_STONE_COUNT] = Option::U8("Stone Count", {NumOpts(0, 4)}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("LacsStoneCount"), "", WidgetType::Slider, 3, true);
|
||||
mOptions[RSK_LACS_MEDALLION_COUNT] = Option::U8("Medallion Count", {NumOpts(0, 7)}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("LacsMedallionCount"), "", WidgetType::Slider, 6, true);
|
||||
mOptions[RSK_LACS_REWARD_COUNT] = Option::U8("Reward Count", {NumOpts(0, 10)}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("LacsRewardCount"), "", WidgetType::Slider, 9, true);
|
||||
mOptions[RSK_LACS_DUNGEON_COUNT] = Option::U8("Dungeon Count", {NumOpts(0, 9)}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("LacsDungeonCount"), "", WidgetType::Slider, 8, true);
|
||||
mOptions[RSK_LACS_TOKEN_COUNT] = Option::U8("Token Count", {NumOpts(0, 100)}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("LacsTokenCount"), "", WidgetType::Slider, 100, true);
|
||||
mOptions[RSK_LACS_OPTIONS] = Option::U8("LACS Reward Options", {"Standard Reward", "Greg as Reward", "Greg as Wildcard"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("LacsRewardOptions"), "", WidgetType::Combobox, RO_LACS_STANDARD_REWARD);
|
||||
mOptions[RSK_KEYRINGS] = Option::U8("Key Rings", {"Off", "Random", "Count", "Selection"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("ShuffleKeyRings"), mOptionDescriptions[RSK_KEYRINGS], WidgetType::Combobox, RO_KEYRINGS_OFF);
|
||||
mOptions[RSK_KEYRINGS_RANDOM_COUNT] = Option::U8("Keyring Dungeon Count", {NumOpts(0, 9)}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("ShuffleKeyRingsRandomCount"), "", WidgetType::Slider, 8);
|
||||
mOptions[RSK_KEYRINGS_GERUDO_FORTRESS] = Option::Bool("Gerudo Fortress", CVAR_RANDOMIZER_SETTING("ShuffleKeyRingsGerudoFortress"), "", IMFLAG_NONE);
|
||||
mOptions[RSK_KEYRINGS_FOREST_TEMPLE] = Option::Bool("Forest Temple", CVAR_RANDOMIZER_SETTING("ShuffleKeyRingsForestTemple"), "", IMFLAG_NONE);
|
||||
mOptions[RSK_KEYRINGS_FIRE_TEMPLE] = Option::Bool("Fire Temple", CVAR_RANDOMIZER_SETTING("ShuffleKeyRingsFireTemple"), "", IMFLAG_NONE);
|
||||
mOptions[RSK_KEYRINGS_WATER_TEMPLE] = Option::Bool("Water Temple", CVAR_RANDOMIZER_SETTING("ShuffleKeyRingsWaterTemple"), "", IMFLAG_NONE);
|
||||
mOptions[RSK_KEYRINGS_SPIRIT_TEMPLE] = Option::Bool("Spirit Temple", CVAR_RANDOMIZER_SETTING("ShuffleKeyRingsSpiritTemple"), "", IMFLAG_NONE);
|
||||
mOptions[RSK_KEYRINGS_SHADOW_TEMPLE] = Option::Bool("Shadow Temple", CVAR_RANDOMIZER_SETTING("ShuffleKeyRingsShadowTemple"), "", IMFLAG_NONE);
|
||||
mOptions[RSK_KEYRINGS_BOTTOM_OF_THE_WELL] = Option::Bool("Bottom of the Well", CVAR_RANDOMIZER_SETTING("ShuffleKeyRingsBottomOfTheWell"), "", IMFLAG_NONE);
|
||||
mOptions[RSK_KEYRINGS_GTG] = Option::Bool("Gerudo Training Grounds", CVAR_RANDOMIZER_SETTING("ShuffleKeyRingsGTG"), "", IMFLAG_NONE);
|
||||
mOptions[RSK_KEYRINGS_GANONS_CASTLE] = Option::Bool("Ganon's Castle", CVAR_RANDOMIZER_SETTING("ShuffleKeyRingsGanonsCastle"));
|
||||
mOptions[RSK_SKIP_CHILD_STEALTH] = Option::Bool("Skip Child Stealth", {"Don't Skip", "Skip"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("SkipChildStealth"), mOptionDescriptions[RSK_SKIP_CHILD_STEALTH], WidgetType::Checkbox, RO_GENERIC_DONT_SKIP);
|
||||
mOptions[RSK_SKIP_CHILD_ZELDA] = Option::Bool("Skip Child Zelda", {"Don't Skip", "Skip"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("SkipChildZelda"), mOptionDescriptions[RSK_SKIP_CHILD_ZELDA], WidgetType::Checkbox, RO_GENERIC_DONT_SKIP);
|
||||
mOptions[RSK_SKIP_EPONA_RACE] = Option::Bool("Skip Epona Race", {"Don't Skip", "Skip"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("SkipEponaRace"), mOptionDescriptions[RSK_SKIP_EPONA_RACE], WidgetType::Checkbox, RO_GENERIC_DONT_SKIP);
|
||||
mOptions[RSK_SKIP_SCARECROWS_SONG] = Option::Bool("Skip Scarecrow's Song", CVAR_RANDOMIZER_SETTING("SkipScarecrowsSong"), mOptionDescriptions[RSK_SKIP_SCARECROWS_SONG]);
|
||||
mOptions[RSK_BIG_POE_COUNT] = Option::U8("Big Poe Target Count", {NumOpts(1, 10)}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("BigPoeTargetCount"), mOptionDescriptions[RSK_BIG_POE_COUNT], WidgetType::Slider, 9);
|
||||
mOptions[RSK_CUCCO_COUNT] = Option::U8("Cuccos to return", {NumOpts(0, 7)}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("CuccosToReturn"), mOptionDescriptions[RSK_CUCCO_COUNT], WidgetType::Slider, 7);
|
||||
mOptions[RSK_COMPLETE_MASK_QUEST] = Option::Bool("Complete Mask Quest", CVAR_RANDOMIZER_SETTING("CompleteMaskQuest"), mOptionDescriptions[RSK_COMPLETE_MASK_QUEST]);
|
||||
mOptions[RSK_ENABLE_GLITCH_CUTSCENES] = Option::Bool("Enable Glitch-Useful Cutscenes", CVAR_RANDOMIZER_SETTING("EnableGlitchCutscenes"), mOptionDescriptions[RSK_ENABLE_GLITCH_CUTSCENES]);
|
||||
mOptions[RSK_GOSSIP_STONE_HINTS] = Option::U8("Gossip Stone Hints", {"No Hints", "Need Nothing", "Mask of Truth", "Stone of Agony"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("GossipStoneHints"), mOptionDescriptions[RSK_GOSSIP_STONE_HINTS], WidgetType::Combobox, RO_GOSSIP_STONES_NEED_NOTHING, false, IMFLAG_NONE);
|
||||
mOptions[RSK_HINT_CLARITY] = Option::U8("Hint Clarity", {"Obscure", "Ambiguous", "Clear"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("HintClarity"), mOptionDescriptions[RSK_HINT_CLARITY], WidgetType::Combobox, RO_HINT_CLARITY_CLEAR, true, IMFLAG_INDENT);
|
||||
mOptions[RSK_HINT_DISTRIBUTION] = Option::U8("Hint Distribution", {"Useless", "Balanced", "Strong", "Very Strong"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("HintDistribution"), mOptionDescriptions[RSK_HINT_DISTRIBUTION], WidgetType::Combobox, RO_HINT_DIST_BALANCED, true, IMFLAG_UNINDENT);
|
||||
mOptions[RSK_TOT_ALTAR_HINT] = Option::Bool("ToT Altar Hint", {"Off", "On"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("AltarHint"), mOptionDescriptions[RSK_TOT_ALTAR_HINT], WidgetType::Checkbox, RO_GENERIC_ON, false, IMFLAG_INDENT);
|
||||
mOptions[RSK_GANONDORF_HINT] = Option::Bool("Ganondorf Hint", {"Off", "On"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("GanondorfHint"), mOptionDescriptions[RSK_GANONDORF_HINT], WidgetType::Checkbox, RO_GENERIC_ON, false, IMFLAG_NONE);
|
||||
mOptions[RSK_SHEIK_LA_HINT] = Option::Bool("Sheik Light Arrow Hint", {"Off", "On"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("SheikLAHint"), mOptionDescriptions[RSK_SHEIK_LA_HINT], WidgetType::Checkbox, RO_GENERIC_ON, false, IMFLAG_NONE);
|
||||
mOptions[RSK_DAMPES_DIARY_HINT] = Option::Bool("Dampe's Diary Hint", CVAR_RANDOMIZER_SETTING("DampeHint"), mOptionDescriptions[RSK_DAMPES_DIARY_HINT], IMFLAG_NONE);
|
||||
mOptions[RSK_GREG_HINT] = Option::Bool("Greg the Green Rupee Hint", CVAR_RANDOMIZER_SETTING("GregHint"), mOptionDescriptions[RSK_GREG_HINT], IMFLAG_NONE);
|
||||
mOptions[RSK_SARIA_HINT] = Option::Bool("Saria's Hint", CVAR_RANDOMIZER_SETTING("SariaHint"), mOptionDescriptions[RSK_SARIA_HINT], IMFLAG_NONE);
|
||||
mOptions[RSK_FISHING_POLE_HINT] = Option::Bool("Fishing Pole Hint", CVAR_RANDOMIZER_SETTING("FishingPoleHint"), mOptionDescriptions[RSK_FISHING_POLE_HINT], IMFLAG_NONE);
|
||||
mOptions[RSK_FROGS_HINT] = Option::Bool("Frog Ocarina Game Hint", CVAR_RANDOMIZER_SETTING("FrogsHint"), mOptionDescriptions[RSK_FROGS_HINT], IMFLAG_NONE);
|
||||
mOptions[RSK_BIGGORON_HINT] = Option::Bool("Biggoron's Hint", CVAR_RANDOMIZER_SETTING("BiggoronHint"), mOptionDescriptions[RSK_BIGGORON_HINT], IMFLAG_NONE);
|
||||
mOptions[RSK_BIG_POES_HINT] = Option::Bool("Big Poes Hint", CVAR_RANDOMIZER_SETTING("BigPoesHint"), mOptionDescriptions[RSK_BIG_POES_HINT], IMFLAG_NONE);
|
||||
mOptions[RSK_CHICKENS_HINT] = Option::Bool("Chickens Hint", CVAR_RANDOMIZER_SETTING("ChickensHint"), mOptionDescriptions[RSK_CHICKENS_HINT], IMFLAG_NONE);
|
||||
mOptions[RSK_MALON_HINT] = Option::Bool("Malon Hint", CVAR_RANDOMIZER_SETTING("MalonHint"), mOptionDescriptions[RSK_MALON_HINT], IMFLAG_NONE);
|
||||
mOptions[RSK_HBA_HINT] = Option::Bool("Horseback Archery Hint", CVAR_RANDOMIZER_SETTING("HBAHint"), mOptionDescriptions[RSK_HBA_HINT], IMFLAG_NONE);
|
||||
mOptions[RSK_WARP_SONG_HINTS] = Option::Bool("Warp Song Hints", CVAR_RANDOMIZER_SETTING("WarpSongText"), mOptionDescriptions[RSK_WARP_SONG_HINTS], IMFLAG_NONE, WidgetType::Checkbox, RO_GENERIC_ON);
|
||||
mOptions[RSK_SCRUB_TEXT_HINT] = Option::Bool("Scrub Hint Text", CVAR_RANDOMIZER_SETTING("ScrubText"), mOptionDescriptions[RSK_SCRUB_TEXT_HINT], IMFLAG_NONE);
|
||||
mOptions[RSK_KAK_10_SKULLS_HINT] = Option::Bool("10 GS Hint", CVAR_RANDOMIZER_SETTING("10GSHint"), mOptionDescriptions[RSK_KAK_10_SKULLS_HINT], IMFLAG_NONE);
|
||||
mOptions[RSK_KAK_20_SKULLS_HINT] = Option::Bool("20 GS Hint", CVAR_RANDOMIZER_SETTING("20GSHint"), mOptionDescriptions[RSK_KAK_20_SKULLS_HINT], IMFLAG_NONE);
|
||||
mOptions[RSK_KAK_30_SKULLS_HINT] = Option::Bool("30 GS Hint", CVAR_RANDOMIZER_SETTING("30GSHint"), mOptionDescriptions[RSK_KAK_30_SKULLS_HINT], IMFLAG_NONE);
|
||||
mOptions[RSK_KAK_40_SKULLS_HINT] = Option::Bool("40 GS Hint", CVAR_RANDOMIZER_SETTING("40GSHint"), mOptionDescriptions[RSK_KAK_40_SKULLS_HINT], IMFLAG_NONE);
|
||||
mOptions[RSK_KAK_50_SKULLS_HINT] = Option::Bool("50 GS Hint", CVAR_RANDOMIZER_SETTING("50GSHint"), mOptionDescriptions[RSK_KAK_50_SKULLS_HINT], IMFLAG_NONE);
|
||||
mOptions[RSK_KAK_100_SKULLS_HINT] = Option::Bool("100 GS Hint", CVAR_RANDOMIZER_SETTING("100GSHint"), mOptionDescriptions[RSK_KAK_100_SKULLS_HINT]);
|
||||
// TODO: Compasses show rewards/woth, maps show dungeon mode
|
||||
mOptions[RSK_BLUE_FIRE_ARROWS] = Option::Bool("Blue Fire Arrows", "gRandomizeBlueFireArrows", mOptionDescriptions[RSK_BLUE_FIRE_ARROWS]);
|
||||
mOptions[RSK_SUNLIGHT_ARROWS] = Option::Bool("Sunlight Arrows", "gRandomizeSunlightArrows", mOptionDescriptions[RSK_SUNLIGHT_ARROWS]);
|
||||
mOptions[RSK_ITEM_POOL] = Option::U8("Item Pool", {"Plentiful", "Balanced", "Scarce", "Minimal"}, OptionCategory::Setting, "gRandomizeItemPool", mOptionDescriptions[RSK_ITEM_POOL], WidgetType::Combobox, RO_ITEM_POOL_BALANCED);
|
||||
mOptions[RSK_ICE_TRAPS] = Option::U8("Ice Traps", {"Off", "Normal", "Extra", "Mayhem", "Onslaught"}, OptionCategory::Setting, "gRandomizeIceTraps", mOptionDescriptions[RSK_ICE_TRAPS], WidgetType::Combobox, RO_ICE_TRAPS_NORMAL);
|
||||
mOptions[RSK_BLUE_FIRE_ARROWS] = Option::Bool("Blue Fire Arrows", CVAR_RANDOMIZER_SETTING("BlueFireArrows"), mOptionDescriptions[RSK_BLUE_FIRE_ARROWS]);
|
||||
mOptions[RSK_SUNLIGHT_ARROWS] = Option::Bool("Sunlight Arrows", CVAR_RANDOMIZER_SETTING("SunlightArrows"), mOptionDescriptions[RSK_SUNLIGHT_ARROWS]);
|
||||
mOptions[RSK_ITEM_POOL] = Option::U8("Item Pool", {"Plentiful", "Balanced", "Scarce", "Minimal"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("ItemPool"), mOptionDescriptions[RSK_ITEM_POOL], WidgetType::Combobox, RO_ITEM_POOL_BALANCED);
|
||||
mOptions[RSK_ICE_TRAPS] = Option::U8("Ice Traps", {"Off", "Normal", "Extra", "Mayhem", "Onslaught"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("IceTraps"), mOptionDescriptions[RSK_ICE_TRAPS], WidgetType::Combobox, RO_ICE_TRAPS_NORMAL);
|
||||
// TODO: Remove Double Defense, Progressive Goron Sword
|
||||
mOptions[RSK_STARTING_OCARINA] = Option::U8("Start with Ocarina", {"Off", "Fairy Ocarina", "Ocarina of Time"}, OptionCategory::Setting, "gRandomizeStartingOcarina", "", WidgetType::Combobox, RO_STARTING_OCARINA_OFF);
|
||||
mOptions[RSK_STARTING_DEKU_SHIELD] = Option::Bool("Start with Deku Shield", "gRandomizeStartingDekuShield");
|
||||
mOptions[RSK_STARTING_KOKIRI_SWORD] = Option::Bool("Start with Kokiri Sword", "gRandomizeStartingKokiriSword");
|
||||
mOptions[RSK_STARTING_MASTER_SWORD] = Option::Bool("Start with Master Sword", "gRandomizeStartingMasterSword");
|
||||
mOptions[RSK_STARTING_CONSUMABLES] = Option::Bool("Start with Consumables", {"No", "Yes"}, OptionCategory::Setting, "gRandomizeStartingConsumables", "", WidgetType::Checkbox, RO_GENERIC_OFF);
|
||||
mOptions[RSK_FULL_WALLETS] = Option::Bool("Full Wallets", {"No", "Yes"}, OptionCategory::Setting, "gRandomizeFullWallets", mOptionDescriptions[RSK_FULL_WALLETS], WidgetType::Checkbox, RO_GENERIC_OFF);
|
||||
mOptions[RSK_STARTING_ZELDAS_LULLABY] = Option::Bool("Start with Zelda's Lullaby", "gRandomizeStartingZeldasLullaby", "", IMFLAG_NONE);
|
||||
mOptions[RSK_STARTING_EPONAS_SONG] = Option::Bool("Start with Epona's Song", "gRandomizeStartingEponasSong", "", IMFLAG_NONE);
|
||||
mOptions[RSK_STARTING_SARIAS_SONG] = Option::Bool("Start with Saria's Song", "gRandomizeStartingSariasSong", "", IMFLAG_NONE);
|
||||
mOptions[RSK_STARTING_SUNS_SONG] = Option::Bool("Start with Sun's Song", "gRandomizeStartingSunsSong", "", IMFLAG_NONE);
|
||||
mOptions[RSK_STARTING_SONG_OF_TIME] = Option::Bool("Start with Song of Time", "gRandomizeStartingSongOfTime", "", IMFLAG_NONE);
|
||||
mOptions[RSK_STARTING_SONG_OF_STORMS] = Option::Bool("Start with Song of Storms", "gRandomizeStartingSongOfStorms", "", IMFLAG_NONE);
|
||||
mOptions[RSK_STARTING_MINUET_OF_FOREST] = Option::Bool("Start with Minuet of Forest", "gRandomizeStartingMinuetOfForest", "", IMFLAG_NONE);
|
||||
mOptions[RSK_STARTING_BOLERO_OF_FIRE] = Option::Bool("Start with Bolero of Fire", "gRandomizeStartingBoleroOfFire", "", IMFLAG_NONE);
|
||||
mOptions[RSK_STARTING_SERENADE_OF_WATER] = Option::Bool("Start with Serenade of Water", "gRandomizeStartingSerenadeOfWater", "", IMFLAG_NONE);
|
||||
mOptions[RSK_STARTING_REQUIEM_OF_SPIRIT] = Option::Bool("Start with Requiem of Spirit", "gRandomizeStartingRequiemOfSpirit", "", IMFLAG_NONE);
|
||||
mOptions[RSK_STARTING_NOCTURNE_OF_SHADOW] = Option::Bool("Start with Nocturne of Shadow", "gRandomizeStartingNocturneOfShadow", "", IMFLAG_NONE);
|
||||
mOptions[RSK_STARTING_PRELUDE_OF_LIGHT] = Option::Bool("Start with Prelude of Light", "gRandomizeStartingPreludeOfLight");
|
||||
mOptions[RSK_STARTING_SKULLTULA_TOKEN] = Option::U8("Gold Skulltula Tokens", {NumOpts(0, 100)}, OptionCategory::Setting, "gRandomizeStartingSkulltulaToken", "", WidgetType::Slider);
|
||||
mOptions[RSK_STARTING_OCARINA] = Option::U8("Start with Ocarina", {"Off", "Fairy Ocarina", "Ocarina of Time"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("StartingOcarina"), "", WidgetType::Combobox, RO_STARTING_OCARINA_OFF);
|
||||
mOptions[RSK_STARTING_DEKU_SHIELD] = Option::Bool("Start with Deku Shield", CVAR_RANDOMIZER_SETTING("StartingDekuShield"));
|
||||
mOptions[RSK_STARTING_KOKIRI_SWORD] = Option::Bool("Start with Kokiri Sword", CVAR_RANDOMIZER_SETTING("StartingKokiriSword"));
|
||||
mOptions[RSK_STARTING_MASTER_SWORD] = Option::Bool("Start with Master Sword", CVAR_RANDOMIZER_SETTING("StartingMasterSword"));
|
||||
mOptions[RSK_STARTING_CONSUMABLES] = Option::Bool("Start with Consumables", {"No", "Yes"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("StartingConsumables"), "", WidgetType::Checkbox, RO_GENERIC_OFF);
|
||||
mOptions[RSK_FULL_WALLETS] = Option::Bool("Full Wallets", {"No", "Yes"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("FullWallets"), mOptionDescriptions[RSK_FULL_WALLETS], WidgetType::Checkbox, RO_GENERIC_OFF);
|
||||
mOptions[RSK_STARTING_ZELDAS_LULLABY] = Option::Bool("Start with Zelda's Lullaby", CVAR_RANDOMIZER_SETTING("StartingZeldasLullaby"), "", IMFLAG_NONE);
|
||||
mOptions[RSK_STARTING_EPONAS_SONG] = Option::Bool("Start with Epona's Song", CVAR_RANDOMIZER_SETTING("StartingEponasSong"), "", IMFLAG_NONE);
|
||||
mOptions[RSK_STARTING_SARIAS_SONG] = Option::Bool("Start with Saria's Song", CVAR_RANDOMIZER_SETTING("StartingSariasSong"), "", IMFLAG_NONE);
|
||||
mOptions[RSK_STARTING_SUNS_SONG] = Option::Bool("Start with Sun's Song", CVAR_RANDOMIZER_SETTING("StartingSunsSong"), "", IMFLAG_NONE);
|
||||
mOptions[RSK_STARTING_SONG_OF_TIME] = Option::Bool("Start with Song of Time", CVAR_RANDOMIZER_SETTING("StartingSongOfTime"), "", IMFLAG_NONE);
|
||||
mOptions[RSK_STARTING_SONG_OF_STORMS] = Option::Bool("Start with Song of Storms", CVAR_RANDOMIZER_SETTING("StartingSongOfStorms"), "", IMFLAG_NONE);
|
||||
mOptions[RSK_STARTING_MINUET_OF_FOREST] = Option::Bool("Start with Minuet of Forest", CVAR_RANDOMIZER_SETTING("StartingMinuetOfForest"), "", IMFLAG_NONE);
|
||||
mOptions[RSK_STARTING_BOLERO_OF_FIRE] = Option::Bool("Start with Bolero of Fire", CVAR_RANDOMIZER_SETTING("StartingBoleroOfFire"), "", IMFLAG_NONE);
|
||||
mOptions[RSK_STARTING_SERENADE_OF_WATER] = Option::Bool("Start with Serenade of Water", CVAR_RANDOMIZER_SETTING("StartingSerenadeOfWater"), "", IMFLAG_NONE);
|
||||
mOptions[RSK_STARTING_REQUIEM_OF_SPIRIT] = Option::Bool("Start with Requiem of Spirit", CVAR_RANDOMIZER_SETTING("StartingRequiemOfSpirit"), "", IMFLAG_NONE);
|
||||
mOptions[RSK_STARTING_NOCTURNE_OF_SHADOW] = Option::Bool("Start with Nocturne of Shadow", CVAR_RANDOMIZER_SETTING("StartingNocturneOfShadow"), "", IMFLAG_NONE);
|
||||
mOptions[RSK_STARTING_PRELUDE_OF_LIGHT] = Option::Bool("Start with Prelude of Light", CVAR_RANDOMIZER_SETTING("StartingPreludeOfLight"));
|
||||
mOptions[RSK_STARTING_SKULLTULA_TOKEN] = Option::U8("Gold Skulltula Tokens", {NumOpts(0, 100)}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("StartingSkulltulaToken"), "", WidgetType::Slider);
|
||||
mOptions[RSK_STARTING_HEARTS] = Option::U8("Hearts", {NumOpts(1, 20)}, OptionCategory::Setting, "", "", WidgetType::Slider, 2);
|
||||
// TODO: Remainder of Starting Items
|
||||
mOptions[RSK_LOGIC_RULES] = Option::U8("Logic", {"Glitchless", "Glitched", "No Logic", "Vanilla"}, OptionCategory::Setting, "gRandomizeLogicRules", mOptionDescriptions[RSK_LOGIC_RULES], WidgetType::Combobox, RO_LOGIC_GLITCHLESS);
|
||||
mOptions[RSK_ALL_LOCATIONS_REACHABLE] = Option::Bool("All Locations Reachable", {"Off", "On"}, OptionCategory::Setting, "gRandomizeAllLocationsReachable", mOptionDescriptions[RSK_ALL_LOCATIONS_REACHABLE], WidgetType::Checkbox, RO_GENERIC_ON);
|
||||
mOptions[RSK_SKULLS_SUNS_SONG] = Option::Bool("Night Skulltula's Expect Sun's Song", "gRandomizeGsExpectSunsSong", mOptionDescriptions[RSK_SKULLS_SUNS_SONG]);
|
||||
mOptions[RSK_LOGIC_RULES] = Option::U8("Logic", {"Glitchless", "Glitched", "No Logic", "Vanilla"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("LogicRules"), mOptionDescriptions[RSK_LOGIC_RULES], WidgetType::Combobox, RO_LOGIC_GLITCHLESS);
|
||||
mOptions[RSK_ALL_LOCATIONS_REACHABLE] = Option::Bool("All Locations Reachable", {"Off", "On"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("AllLocationsReachable"), mOptionDescriptions[RSK_ALL_LOCATIONS_REACHABLE], WidgetType::Checkbox, RO_GENERIC_ON);
|
||||
mOptions[RSK_SKULLS_SUNS_SONG] = Option::Bool("Night Skulltula's Expect Sun's Song", CVAR_RANDOMIZER_SETTING("GsExpectSunsSong"), mOptionDescriptions[RSK_SKULLS_SUNS_SONG]);
|
||||
mOptions[RSK_DAMAGE_MULTIPLIER] = Option::U8("Damage Multiplier", {"x1/2", "x1", "x2", "x4", "x8", "x16", "OHKO"}, OptionCategory::Setting, "", "", WidgetType::Slider, RO_DAMAGE_MULTIPLIER_DEFAULT);
|
||||
// clang-format on
|
||||
|
||||
@ -1299,7 +1299,7 @@ void Settings::UpdateOptionProperties() {
|
||||
mOptions[RSK_RAINBOW_BRIDGE_REWARD_COUNT].Hide();
|
||||
mOptions[RSK_RAINBOW_BRIDGE_DUNGEON_COUNT].Hide();
|
||||
mOptions[RSK_RAINBOW_BRIDGE_TOKEN_COUNT].Hide();
|
||||
if (CVarGetInteger("gRandomizeLogicRules", RO_LOGIC_GLITCHLESS) == RO_LOGIC_VANILLA) {
|
||||
if (CVarGetInteger(CVAR_RANDOMIZER_SETTING("LogicRules"), RO_LOGIC_GLITCHLESS) == RO_LOGIC_VANILLA) {
|
||||
mOptionGroups[RSG_AREA_ACCESS_IMGUI].Disable();
|
||||
mOptions[RSK_STARTING_AGE].Disable("");
|
||||
mOptions[RSK_GERUDO_FORTRESS].Disable("");
|
||||
@ -1322,9 +1322,9 @@ void Settings::UpdateOptionProperties() {
|
||||
} else {
|
||||
mOptionGroups[RSG_AREA_ACCESS_IMGUI].Enable();
|
||||
// Starting Age - Disabled when Forest is set to Closed or under very specific conditions
|
||||
if (CVarGetInteger("gRandomizeForest", RO_FOREST_CLOSED) == RO_FOREST_CLOSED ||
|
||||
(CVarGetInteger("gRandomizeDoorOfTime", RO_DOOROFTIME_CLOSED) == RO_DOOROFTIME_CLOSED &&
|
||||
CVarGetInteger("gRandomizeShuffleOcarinas", RO_GENERIC_OFF) == RO_GENERIC_OFF)) /* closed door of time with ocarina shuffle off */ {
|
||||
if (CVarGetInteger(CVAR_RANDOMIZER_SETTING("Forest"), RO_FOREST_CLOSED) == RO_FOREST_CLOSED ||
|
||||
(CVarGetInteger(CVAR_RANDOMIZER_SETTING("DoorOfTime"), RO_DOOROFTIME_CLOSED) == RO_DOOROFTIME_CLOSED &&
|
||||
CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleOcarinas"), RO_GENERIC_OFF) == RO_GENERIC_OFF)) /* closed door of time with ocarina shuffle off */ {
|
||||
mOptions[RSK_STARTING_AGE].Disable("This option is disabled due to other options making the game unbeatable");
|
||||
} else {
|
||||
mOptions[RSK_STARTING_AGE].Enable();
|
||||
@ -1337,8 +1337,8 @@ void Settings::UpdateOptionProperties() {
|
||||
mOptions[RSK_RAINBOW_BRIDGE_REWARD_COUNT].Enable();
|
||||
mOptions[RSK_RAINBOW_BRIDGE_DUNGEON_COUNT].Enable();
|
||||
mOptions[RSK_RAINBOW_BRIDGE_TOKEN_COUNT].Enable();
|
||||
const uint8_t bridgeOpt = CVarGetInteger("gRandomizeBridgeRewardOptions", RO_BRIDGE_STANDARD_REWARD);
|
||||
switch (CVarGetInteger("gRandomizeRainbowBridge", RO_BRIDGE_VANILLA)) {
|
||||
const uint8_t bridgeOpt = CVarGetInteger(CVAR_RANDOMIZER_SETTING("BridgeRewardOptions"), RO_BRIDGE_STANDARD_REWARD);
|
||||
switch (CVarGetInteger(CVAR_RANDOMIZER_SETTING("RainbowBridge"), RO_BRIDGE_VANILLA)) {
|
||||
case RO_BRIDGE_STONES:
|
||||
// Show Bridge Options and Stone Count slider
|
||||
mOptions[RSK_RAINBOW_BRIDGE].RemoveFlag(IMFLAG_SEPARATOR_BOTTOM);
|
||||
@ -1411,7 +1411,7 @@ void Settings::UpdateOptionProperties() {
|
||||
mOptions[RSK_GANONS_TRIALS].Enable();
|
||||
mOptions[RSK_TRIAL_COUNT].Enable();
|
||||
// Only show the trial count slider if Trials is set to Set Number
|
||||
if (CVarGetInteger("gRandomizeGanonTrial", RO_GANONS_TRIALS_SKIP) == RO_GANONS_TRIALS_SET_NUMBER) {
|
||||
if (CVarGetInteger(CVAR_RANDOMIZER_SETTING("GanonTrial"), RO_GANONS_TRIALS_SKIP) == RO_GANONS_TRIALS_SET_NUMBER) {
|
||||
mOptions[RSK_GANONS_TRIALS].RemoveFlag(IMFLAG_SEPARATOR_BOTTOM);
|
||||
mOptions[RSK_TRIAL_COUNT].Unhide();
|
||||
} else {
|
||||
@ -1422,7 +1422,7 @@ void Settings::UpdateOptionProperties() {
|
||||
mOptions[RSK_TRIFORCE_HUNT_PIECES_TOTAL].Enable();
|
||||
mOptions[RSK_TRIFORCE_HUNT_PIECES_REQUIRED].Enable();
|
||||
// Remove the pieces required/total sliders and add a separator after Tirforce Hunt if Triforce Hunt is off
|
||||
if (CVarGetInteger("gRandomizeTriforceHunt", RO_GENERIC_OFF) == RO_GENERIC_OFF) {
|
||||
if (CVarGetInteger(CVAR_RANDOMIZER_SETTING("TriforceHunt"), RO_GENERIC_OFF) == RO_GENERIC_OFF) {
|
||||
mOptions[RSK_TRIFORCE_HUNT_PIECES_REQUIRED].Hide();
|
||||
mOptions[RSK_TRIFORCE_HUNT_PIECES_TOTAL].Hide();
|
||||
mOptions[RSK_TRIFORCE_HUNT].AddFlag(IMFLAG_SEPARATOR_BOTTOM);
|
||||
@ -1432,14 +1432,14 @@ void Settings::UpdateOptionProperties() {
|
||||
mOptions[RSK_TRIFORCE_HUNT].RemoveFlag(IMFLAG_SEPARATOR_BOTTOM);
|
||||
}
|
||||
// Update triforce pieces required to be capped at the current value for pieces total.
|
||||
const uint8_t triforceTotal = CVarGetInteger("gRandomizeTriforceHuntTotalPieces", 30);
|
||||
const uint8_t triforceTotal = CVarGetInteger(CVAR_RANDOMIZER_SETTING("TriforceHuntTotalPieces"), 30);
|
||||
if (mOptions[RSK_TRIFORCE_HUNT_PIECES_REQUIRED].GetOptionCount() != triforceTotal + 1) {
|
||||
mOptions[RSK_TRIFORCE_HUNT_PIECES_REQUIRED].ChangeOptions(NumOpts(1, triforceTotal + 1));
|
||||
}
|
||||
mOptionGroups[RSG_ITEMS_IMGUI_TABLE].Enable();
|
||||
mOptionGroups[RSG_GAMEPLAY_IMGUI_TABLE].Enable();
|
||||
// Link's Pocket - Disabled when Dungeon Rewards are shuffled to End of Dungeon
|
||||
if (CVarGetInteger("gRandomizeShuffleDungeonReward", RO_DUNGEON_REWARDS_END_OF_DUNGEON) == RO_DUNGEON_REWARDS_END_OF_DUNGEON) {
|
||||
if (CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleDungeonReward"), RO_DUNGEON_REWARDS_END_OF_DUNGEON) == RO_DUNGEON_REWARDS_END_OF_DUNGEON) {
|
||||
mOptions[RSK_LINKS_POCKET].Disable("This option is disabled because \"Dungeon Rewards\" are shuffled to \"End of Dungeons\".");
|
||||
} else {
|
||||
mOptions[RSK_LINKS_POCKET].Enable();
|
||||
@ -1467,7 +1467,7 @@ void Settings::UpdateOptionProperties() {
|
||||
} else {
|
||||
// If any MQ Options are available, show the MQ Dungeon Randomization Combobox
|
||||
mOptions[RSK_MQ_DUNGEON_RANDOM].Unhide();
|
||||
switch(CVarGetInteger("gRandomizeMqDungeons", RO_MQ_DUNGEONS_NONE)) {
|
||||
switch(CVarGetInteger(CVAR_RANDOMIZER_SETTING("MqDungeons"), RO_MQ_DUNGEONS_NONE)) {
|
||||
// If No MQ Dungeons, add a separator after the combobx and hide
|
||||
// the count slider and the toggle for individual dungeon selections.
|
||||
case RO_MQ_DUNGEONS_NONE:
|
||||
@ -1494,8 +1494,8 @@ void Settings::UpdateOptionProperties() {
|
||||
break;
|
||||
}
|
||||
// Controls whether or not to show the selectors for individual dungeons.
|
||||
if (CVarGetInteger("gRandomizeMqDungeons", RO_MQ_DUNGEONS_NONE) != RO_MQ_DUNGEONS_NONE &&
|
||||
CVarGetInteger("gRandomizeMqDungeonsSelection", RO_GENERIC_OFF) == RO_GENERIC_ON) {
|
||||
if (CVarGetInteger(CVAR_RANDOMIZER_SETTING("MqDungeons"), RO_MQ_DUNGEONS_NONE) != RO_MQ_DUNGEONS_NONE &&
|
||||
CVarGetInteger(CVAR_RANDOMIZER_SETTING("MqDungeonsSelection"), RO_GENERIC_OFF) == RO_GENERIC_ON) {
|
||||
// if showing the dungeon selectors, remove the separator after the Set Dungeons checkbox.
|
||||
mOptions[RSK_MQ_DUNGEON_SET].RemoveFlag(IMFLAG_SEPARATOR_BOTTOM);
|
||||
mOptions[RSK_MQ_DEKU_TREE].Unhide();
|
||||
@ -1528,13 +1528,13 @@ void Settings::UpdateOptionProperties() {
|
||||
}
|
||||
}
|
||||
// Disable interaction with Set Dungeons checkbox if MQ Dungeon Randomization is set to Selection Only.
|
||||
if (CVarGetInteger("gRandomizeMqDungeons", RO_MQ_DUNGEONS_NONE) == RO_MQ_DUNGEONS_SELECTION) {
|
||||
if (CVarGetInteger(CVAR_RANDOMIZER_SETTING("MqDungeons"), RO_MQ_DUNGEONS_NONE) == RO_MQ_DUNGEONS_SELECTION) {
|
||||
mOptions[RSK_MQ_DUNGEON_SET].Disable("This option is force-enabled because Master Quest Dungeons is set to Selection Only", UIWidgets::CheckboxGraphics::Checkmark);
|
||||
} else {
|
||||
mOptions[RSK_MQ_DUNGEON_SET].Enable();
|
||||
}
|
||||
// Show mixed entrance pool options if mixed entrance pools are enabled at all.
|
||||
if (CVarGetInteger("gRandomizeMixedEntrances", RO_GENERIC_OFF)) {
|
||||
if (CVarGetInteger(CVAR_RANDOMIZER_SETTING("MixedEntrances"), RO_GENERIC_OFF)) {
|
||||
mOptions[RSK_MIXED_ENTRANCE_POOLS].RemoveFlag(IMFLAG_SEPARATOR_BOTTOM);
|
||||
mOptions[RSK_MIX_DUNGEON_ENTRANCES].Unhide();
|
||||
mOptions[RSK_MIX_BOSS_ENTRANCES].Unhide();
|
||||
@ -1550,13 +1550,13 @@ void Settings::UpdateOptionProperties() {
|
||||
mOptions[RSK_MIX_GROTTO_ENTRANCES].Hide();
|
||||
}
|
||||
// Shuffle Weird Egg - Disabled when Skip Child Zelda is active
|
||||
if (CVarGetInteger("gRandomizeSkipChildZelda", RO_GENERIC_DONT_SKIP)) {
|
||||
if (CVarGetInteger(CVAR_RANDOMIZER_SETTING("SkipChildZelda"), RO_GENERIC_DONT_SKIP)) {
|
||||
mOptions[RSK_SHUFFLE_WEIRD_EGG].Disable("This option is disabled because \"Skip Child Zelda\" is enabled.");
|
||||
} else {
|
||||
mOptions[RSK_SHUFFLE_WEIRD_EGG].Enable();
|
||||
}
|
||||
// Hide shopsanity prices if shopsanity is off or zero
|
||||
switch (CVarGetInteger("gRandomizeShopsanity", RO_SHOPSANITY_OFF)) {
|
||||
switch (CVarGetInteger(CVAR_RANDOMIZER_SETTING("Shopsanity"), RO_SHOPSANITY_OFF)) {
|
||||
case RO_SHOPSANITY_OFF:
|
||||
case RO_SHOPSANITY_ZERO_ITEMS:
|
||||
mOptions[RSK_SHOPSANITY].AddFlag(IMFLAG_SEPARATOR_BOTTOM);
|
||||
@ -1570,7 +1570,7 @@ void Settings::UpdateOptionProperties() {
|
||||
break;
|
||||
}
|
||||
// Hide fishing pond settings if we aren't shuffling the fishing pond
|
||||
switch (CVarGetInteger("gRandomizeFishsanity", RO_FISHSANITY_OFF)) {
|
||||
switch (CVarGetInteger(CVAR_RANDOMIZER_SETTING("Fishsanity"), RO_FISHSANITY_OFF)) {
|
||||
case RO_FISHSANITY_POND:
|
||||
case RO_FISHSANITY_BOTH:
|
||||
mOptions[RSK_FISHSANITY].RemoveFlag(IMFLAG_SEPARATOR_BOTTOM);
|
||||
@ -1583,13 +1583,13 @@ void Settings::UpdateOptionProperties() {
|
||||
mOptions[RSK_FISHSANITY_AGE_SPLIT].Hide();
|
||||
}
|
||||
// Disable fishing pole hint if the fishing pole is not shuffled
|
||||
if (CVarGetInteger("gRandomizeShuffleFishingPole", RO_GENERIC_OFF)) {
|
||||
if (CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleFishingPole"), RO_GENERIC_OFF)) {
|
||||
mOptions[RSK_FISHING_POLE_HINT].Enable();
|
||||
} else {
|
||||
mOptions[RSK_FISHING_POLE_HINT].Disable("This option is disabled since the fishing pole is not shuffled.");
|
||||
}
|
||||
// Shuffle 100 GS Reward - Force-Enabled if Ganon's Boss Key is on the 100 GS Reward
|
||||
if (CVarGetInteger("gRandomizeShuffleGanonBossKey", RO_GANON_BOSS_KEY_VANILLA) == RO_GANON_BOSS_KEY_KAK_TOKENS) {
|
||||
if (CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleGanonBossKey"), RO_GANON_BOSS_KEY_VANILLA) == RO_GANON_BOSS_KEY_KAK_TOKENS) {
|
||||
mOptions[RSK_SHUFFLE_100_GS_REWARD].Disable("This option is force-enabled because \"Ganon's Boss Key\" is set to \"100 GS Reward.\"", UIWidgets::CheckboxGraphics::Checkmark);
|
||||
} else {
|
||||
mOptions[RSK_SHUFFLE_100_GS_REWARD].Enable();
|
||||
@ -1606,7 +1606,7 @@ void Settings::UpdateOptionProperties() {
|
||||
mOptions[RSK_KEYRINGS_BOTTOM_OF_THE_WELL].Hide();
|
||||
mOptions[RSK_KEYRINGS_GTG].Hide();
|
||||
mOptions[RSK_KEYRINGS_GANONS_CASTLE].Hide();
|
||||
switch (CVarGetInteger("gRandomizeShuffleKeyRings", RO_KEYRINGS_OFF)) {
|
||||
switch (CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleKeyRings"), RO_KEYRINGS_OFF)) {
|
||||
case RO_KEYRINGS_COUNT:
|
||||
// Show count slider.
|
||||
mOptions[RSK_KEYRINGS].RemoveFlag(IMFLAG_SEPARATOR_BOTTOM);
|
||||
@ -1627,20 +1627,20 @@ void Settings::UpdateOptionProperties() {
|
||||
default:
|
||||
break;
|
||||
}
|
||||
const uint8_t maxKeyringCount = (CVarGetInteger("gRandomizeGerudoFortress", RO_GF_NORMAL) == RO_GF_NORMAL &&
|
||||
CVarGetInteger("gRandomizeGerudoKeys", RO_GERUDO_KEYS_VANILLA) != RO_GERUDO_KEYS_VANILLA) ? 9 : 8;
|
||||
const uint8_t maxKeyringCount = (CVarGetInteger(CVAR_RANDOMIZER_SETTING("GerudoFortress"), RO_GF_NORMAL) == RO_GF_NORMAL &&
|
||||
CVarGetInteger(CVAR_RANDOMIZER_SETTING("GerudoKeys"), RO_GERUDO_KEYS_VANILLA) != RO_GERUDO_KEYS_VANILLA) ? 9 : 8;
|
||||
if (mOptions[RSK_KEYRINGS_RANDOM_COUNT].GetOptionCount() != maxKeyringCount + 1) {
|
||||
mOptions[RSK_KEYRINGS_RANDOM_COUNT].ChangeOptions(NumOpts(0, maxKeyringCount));
|
||||
}
|
||||
if (CVarGetInteger("gRandomizeGerudoFortress", RO_GF_NORMAL) != RO_GF_NORMAL ||
|
||||
CVarGetInteger("gRandomizeGerudoKeys", RO_GERUDO_KEYS_VANILLA) == RO_GERUDO_KEYS_VANILLA) {
|
||||
if (CVarGetInteger(CVAR_RANDOMIZER_SETTING("GerudoFortress"), RO_GF_NORMAL) != RO_GF_NORMAL ||
|
||||
CVarGetInteger(CVAR_RANDOMIZER_SETTING("GerudoKeys"), RO_GERUDO_KEYS_VANILLA) == RO_GERUDO_KEYS_VANILLA) {
|
||||
mOptions[RSK_KEYRINGS_GERUDO_FORTRESS].Disable("Disabled because the currently selected Gerudo Fortress Carpenters\n"
|
||||
"setting and/or Gerudo Fortress Keys setting is incompatible with\n"
|
||||
"having a Gerudo Fortress Keyring.");
|
||||
} else {
|
||||
mOptions[RSK_KEYRINGS_GERUDO_FORTRESS].Enable();
|
||||
}
|
||||
if (CVarGetInteger("gRandomizeTriforceHunt", RO_GENERIC_OFF)) {
|
||||
if (CVarGetInteger(CVAR_RANDOMIZER_SETTING("TriforceHunt"), RO_GENERIC_OFF)) {
|
||||
mOptions[RSK_GANONS_BOSS_KEY].Disable("This option is disabled because Triforce Hunt is enabled."
|
||||
"Ganon's Boss key\nwill instead be given to you after Triforce Hunt completion.");
|
||||
} else {
|
||||
@ -1653,8 +1653,8 @@ void Settings::UpdateOptionProperties() {
|
||||
mOptions[RSK_LACS_REWARD_COUNT].Hide();
|
||||
mOptions[RSK_LACS_DUNGEON_COUNT].Hide();
|
||||
mOptions[RSK_LACS_TOKEN_COUNT].Hide();
|
||||
const uint8_t lacsOpts = CVarGetInteger("gRandomizeLacsRewardOptions", RO_LACS_STANDARD_REWARD);
|
||||
switch (CVarGetInteger("gRandomizeShuffleGanonBossKey", RO_GANON_BOSS_KEY_VANILLA)) {
|
||||
const uint8_t lacsOpts = CVarGetInteger(CVAR_RANDOMIZER_SETTING("LacsRewardOptions"), RO_LACS_STANDARD_REWARD);
|
||||
switch (CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleGanonBossKey"), RO_GANON_BOSS_KEY_VANILLA)) {
|
||||
case RO_GANON_BOSS_KEY_LACS_STONES:
|
||||
mOptions[RSK_LACS_OPTIONS].Unhide();
|
||||
mOptions[RSK_LACS_STONE_COUNT].Unhide();
|
||||
@ -1715,12 +1715,12 @@ void Settings::UpdateOptionProperties() {
|
||||
break;
|
||||
}
|
||||
// Skip Child Stealth - Disabled when Skip Child Zelda is active
|
||||
if (CVarGetInteger("gRandomizeSkipChildZelda", RO_GENERIC_DONT_SKIP)) {
|
||||
if (CVarGetInteger(CVAR_RANDOMIZER_SETTING("SkipChildZelda"), RO_GENERIC_DONT_SKIP)) {
|
||||
mOptions[RSK_SKIP_CHILD_STEALTH].Disable("This option is disabled because \"Skip Child Zelda\" is enabled.");
|
||||
} else {
|
||||
mOptions[RSK_SKIP_CHILD_STEALTH].Enable();
|
||||
}
|
||||
if (CVarGetInteger("gRandomizeGossipStoneHints", RO_GOSSIP_STONES_NEED_NOTHING) == RO_GOSSIP_STONES_NONE) {
|
||||
if (CVarGetInteger(CVAR_RANDOMIZER_SETTING("GossipStoneHints"), RO_GOSSIP_STONES_NEED_NOTHING) == RO_GOSSIP_STONES_NONE) {
|
||||
mOptions[RSK_HINT_CLARITY].Hide();
|
||||
mOptions[RSK_HINT_DISTRIBUTION].Hide();
|
||||
} else {
|
||||
@ -1728,19 +1728,19 @@ void Settings::UpdateOptionProperties() {
|
||||
mOptions[RSK_HINT_DISTRIBUTION].Unhide();
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gRandomizeShuffleCows", RO_GENERIC_OFF)) {
|
||||
if (CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleCows"), RO_GENERIC_OFF)) {
|
||||
mOptions[RSK_MALON_HINT].Enable();
|
||||
} else {
|
||||
mOptions[RSK_MALON_HINT].Disable("Malon's hint points to a cow, so requires cows to be shuffled.");
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gRandomizeShuffle100GSReward", RO_GENERIC_OFF)) {
|
||||
if (CVarGetInteger(CVAR_RANDOMIZER_SETTING("Shuffle100GSReward"), RO_GENERIC_OFF)) {
|
||||
mOptions[RSK_KAK_100_SKULLS_HINT].Enable();
|
||||
} else {
|
||||
mOptions[RSK_KAK_100_SKULLS_HINT].Disable("There is no point to hinting 100 skulls if it is not shuffled");
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gRandomizeCuccosToReturn", 7) == 0) {
|
||||
if (CVarGetInteger(CVAR_RANDOMIZER_SETTING("CuccosToReturn"), 7) == 0) {
|
||||
mOptions[RSK_CHICKENS_HINT].Disable("Anju will just give you the item instead with 0 chickens");
|
||||
} else {
|
||||
mOptions[RSK_CHICKENS_HINT].Enable();
|
||||
|
@ -1,11 +1,12 @@
|
||||
#include "ResolutionEditor.h"
|
||||
#include <ImGui/imgui.h>
|
||||
#include <imgui.h>
|
||||
#include <libultraship/libultraship.h>
|
||||
|
||||
#include <soh/UIWidgets.hpp>
|
||||
#include <graphic/Fast3D/gfx_pc.h>
|
||||
#include "soh/OTRGlobals.h"
|
||||
|
||||
/* Console Variables are grouped under gAdvancedResolution. (e.g. "gAdvancedResolution.Enabled")
|
||||
/* Console Variables are grouped under gAdvancedResolution. (e.g. CVAR_PREFIX_ADVANCED_RESOLUTION ".Enabled")
|
||||
|
||||
The following cvars are used in Libultraship and can be edited here:
|
||||
- Enabled - Turns Advanced Resolution Mode on.
|
||||
@ -83,25 +84,25 @@ void AdvancedResolutionSettingsWindow::DrawElement() {
|
||||
// Letting it go below 1 in this Editor will even allow for checking if screen bounds are being exceeded.
|
||||
if (default_maxIntegerScaleFactor < integerScale_maximumBounds) {
|
||||
max_integerScaleFactor =
|
||||
integerScale_maximumBounds + CVarGetInteger("gAdvancedResolution.IntegerScale.ExceedBoundsBy", 0);
|
||||
integerScale_maximumBounds + CVarGetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".IntegerScale.ExceedBoundsBy", 0);
|
||||
}
|
||||
|
||||
// Combo List defaults
|
||||
static int item_aspectRatio = CVarGetInteger("gAdvancedResolution.UIComboItem.AspectRatio", 3);
|
||||
static int item_pixelCount = CVarGetInteger("gAdvancedResolution.UIComboItem.PixelCount", default_pixelCount);
|
||||
static int item_aspectRatio = CVarGetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".UIComboItem.AspectRatio", 3);
|
||||
static int item_pixelCount = CVarGetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".UIComboItem.PixelCount", default_pixelCount);
|
||||
// Stored Values for non-UIWidgets elements
|
||||
static float aspectRatioX =
|
||||
CVarGetFloat("gAdvancedResolution.AspectRatioX", aspectRatioPresetsX[item_aspectRatio]);
|
||||
CVarGetFloat(CVAR_PREFIX_ADVANCED_RESOLUTION ".AspectRatioX", aspectRatioPresetsX[item_aspectRatio]);
|
||||
static float aspectRatioY =
|
||||
CVarGetFloat("gAdvancedResolution.AspectRatioY", aspectRatioPresetsY[item_aspectRatio]);
|
||||
CVarGetFloat(CVAR_PREFIX_ADVANCED_RESOLUTION ".AspectRatioY", aspectRatioPresetsY[item_aspectRatio]);
|
||||
static int verticalPixelCount =
|
||||
CVarGetInteger("gAdvancedResolution.VerticalPixelCount", pixelCountPresets[item_pixelCount]);
|
||||
CVarGetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".VerticalPixelCount", pixelCountPresets[item_pixelCount]);
|
||||
// Additional settings
|
||||
static bool showHorizontalResField = false;
|
||||
static int horizontalPixelCount = (verticalPixelCount / aspectRatioY) * aspectRatioX;
|
||||
// Disabling flags
|
||||
const bool disabled_everything = !CVarGetInteger("gAdvancedResolution.Enabled", 0);
|
||||
const bool disabled_pixelCount = !CVarGetInteger("gAdvancedResolution.VerticalResolutionToggle", 0);
|
||||
const bool disabled_everything = !CVarGetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".Enabled", 0);
|
||||
const bool disabled_pixelCount = !CVarGetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".VerticalResolutionToggle", 0);
|
||||
|
||||
#ifdef __APPLE__
|
||||
// Display HiDPI warning. (Remove this once we can definitively say it's fixed.)
|
||||
@ -112,21 +113,21 @@ void AdvancedResolutionSettingsWindow::DrawElement() {
|
||||
|
||||
if (ImGui::CollapsingHeader("Original Settings", ImGuiTreeNodeFlags_DefaultOpen)) {
|
||||
// The original resolution slider (for convenience)
|
||||
const bool disabled_resolutionSlider = (CVarGetInteger("gAdvancedResolution.VerticalResolutionToggle", 0) &&
|
||||
CVarGetInteger("gAdvancedResolution.Enabled", 0)) ||
|
||||
CVarGetInteger("gLowResMode", 0);
|
||||
if (UIWidgets::EnhancementSliderFloat("Internal Resolution: %.1f%%", "##IMul", "gInternalResolution", 0.5f,
|
||||
const bool disabled_resolutionSlider = (CVarGetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".VerticalResolutionToggle", 0) &&
|
||||
CVarGetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".Enabled", 0)) ||
|
||||
CVarGetInteger(CVAR_LOW_RES_MODE, 0);
|
||||
if (UIWidgets::EnhancementSliderFloat("Internal Resolution: %.1f%%", "##IMul", CVAR_INTERNAL_RESOLUTION, 0.5f,
|
||||
2.0f, "", 1.0f, true, true, disabled_resolutionSlider)) {
|
||||
LUS::Context::GetInstance()->GetWindow()->SetResolutionMultiplier(
|
||||
CVarGetFloat("gInternalResolution", 1));
|
||||
Ship::Context::GetInstance()->GetWindow()->SetResolutionMultiplier(
|
||||
CVarGetFloat(CVAR_INTERNAL_RESOLUTION, 1));
|
||||
}
|
||||
UIWidgets::Tooltip("Multiplies your output resolution by the value entered.");
|
||||
|
||||
// The original MSAA slider (also for convenience)
|
||||
#ifndef __WIIU__
|
||||
if (UIWidgets::PaddedEnhancementSliderInt("MSAA: %d", "##IMSAA", "gMSAAValue", 1, 8, "", 1, true, true,
|
||||
if (UIWidgets::PaddedEnhancementSliderInt("MSAA: %d", "##IMSAA", CVAR_MSAA_VALUE, 1, 8, "", 1, true, true,
|
||||
false)) {
|
||||
LUS::Context::GetInstance()->GetWindow()->SetMsaaLevel(CVarGetInteger("gMSAAValue", 1));
|
||||
Ship::Context::GetInstance()->GetWindow()->SetMsaaLevel(CVarGetInteger(CVAR_MSAA_VALUE, 1));
|
||||
};
|
||||
UIWidgets::Tooltip(
|
||||
"Activates multi-sample anti-aliasing when above 1x, up to 8x for 8 samples for every pixel.\n\n"
|
||||
@ -135,15 +136,15 @@ void AdvancedResolutionSettingsWindow::DrawElement() {
|
||||
#endif
|
||||
|
||||
// N64 Mode toggle (again for convenience)
|
||||
// UIWidgets::PaddedEnhancementCheckbox("(Enhancements>Graphics) N64 Mode", "gLowResMode", false, false, false, "", UIWidgets::CheckboxGraphics::Cross, false);
|
||||
// UIWidgets::PaddedEnhancementCheckbox("(Enhancements>Graphics) N64 Mode", CVAR_LOW_RES_MODE, false, false, false, "", UIWidgets::CheckboxGraphics::Cross, false);
|
||||
}
|
||||
|
||||
UIWidgets::PaddedSeparator(true, true, 3.0f, 3.0f);
|
||||
// Activator
|
||||
UIWidgets::PaddedEnhancementCheckbox("Enable advanced settings.", "gAdvancedResolution.Enabled", false, false,
|
||||
UIWidgets::PaddedEnhancementCheckbox("Enable advanced settings.", CVAR_PREFIX_ADVANCED_RESOLUTION ".Enabled", false, false,
|
||||
false, "", UIWidgets::CheckboxGraphics::Cross, false);
|
||||
// Error/Warning display
|
||||
if (!CVarGetInteger("gLowResMode", 0)) {
|
||||
if (!CVarGetInteger(CVAR_LOW_RES_MODE, 0)) {
|
||||
if (IsDroppingFrames()) { // Significant frame drop warning
|
||||
ImGui::TextColored(messageColor[MESSAGE_WARNING],
|
||||
ICON_FA_EXCLAMATION_TRIANGLE " Significant frame rate (FPS) drops may be occuring.");
|
||||
@ -156,7 +157,7 @@ void AdvancedResolutionSettingsWindow::DrawElement() {
|
||||
ICON_FA_QUESTION_CIRCLE " \"N64 Mode\" is overriding these settings.");
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button("Click to disable")) {
|
||||
CVarSetInteger("gLowResMode", 0);
|
||||
CVarSetInteger(CVAR_LOW_RES_MODE, 0);
|
||||
CVarSave();
|
||||
}
|
||||
}
|
||||
@ -185,9 +186,9 @@ void AdvancedResolutionSettingsWindow::DrawElement() {
|
||||
horizontalPixelCount = (verticalPixelCount / aspectRatioY) * aspectRatioX;
|
||||
}
|
||||
|
||||
CVarSetFloat("gAdvancedResolution.AspectRatioX", aspectRatioX);
|
||||
CVarSetFloat("gAdvancedResolution.AspectRatioY", aspectRatioY);
|
||||
CVarSetInteger("gAdvancedResolution.UIComboItem.AspectRatio", item_aspectRatio);
|
||||
CVarSetFloat(CVAR_PREFIX_ADVANCED_RESOLUTION ".AspectRatioX", aspectRatioX);
|
||||
CVarSetFloat(CVAR_PREFIX_ADVANCED_RESOLUTION ".AspectRatioY", aspectRatioY);
|
||||
CVarSetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".UIComboItem.AspectRatio", item_aspectRatio);
|
||||
CVarSave();
|
||||
}
|
||||
// Hide aspect ratio input fields if using one of the presets.
|
||||
@ -217,7 +218,7 @@ void AdvancedResolutionSettingsWindow::DrawElement() {
|
||||
|
||||
// Vertical Resolution
|
||||
UIWidgets::PaddedEnhancementCheckbox("Set fixed vertical resolution (disables Resolution slider)",
|
||||
"gAdvancedResolution.VerticalResolutionToggle", true, false,
|
||||
CVAR_PREFIX_ADVANCED_RESOLUTION ".VerticalResolutionToggle", true, false,
|
||||
disabled_everything, "", UIWidgets::CheckboxGraphics::Cross, false);
|
||||
UIWidgets::Tooltip(
|
||||
"Override the resolution scale slider and use the settings below, irrespective of window size.");
|
||||
@ -233,8 +234,8 @@ void AdvancedResolutionSettingsWindow::DrawElement() {
|
||||
horizontalPixelCount = (verticalPixelCount / aspectRatioY) * aspectRatioX;
|
||||
}
|
||||
|
||||
CVarSetInteger("gAdvancedResolution.VerticalPixelCount", verticalPixelCount);
|
||||
CVarSetInteger("gAdvancedResolution.UIComboItem.PixelCount", item_pixelCount);
|
||||
CVarSetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".VerticalPixelCount", verticalPixelCount);
|
||||
CVarSetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".UIComboItem.PixelCount", item_pixelCount);
|
||||
CVarSave();
|
||||
}
|
||||
// Horizontal Resolution, if visibility is enabled for it.
|
||||
@ -290,43 +291,43 @@ void AdvancedResolutionSettingsWindow::DrawElement() {
|
||||
|
||||
// Integer scaling settings group (Pixel-perfect Mode)
|
||||
static const ImGuiTreeNodeFlags IntegerScalingResolvedImGuiFlag =
|
||||
CVarGetInteger("gAdvancedResolution.PixelPerfectMode", 0) ? ImGuiTreeNodeFlags_DefaultOpen
|
||||
CVarGetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".PixelPerfectMode", 0) ? ImGuiTreeNodeFlags_DefaultOpen
|
||||
: ImGuiTreeNodeFlags_None;
|
||||
if (ImGui::CollapsingHeader("Integer Scaling Settings", IntegerScalingResolvedImGuiFlag)) {
|
||||
const bool disabled_pixelPerfectMode =
|
||||
!CVarGetInteger("gAdvancedResolution.PixelPerfectMode", 0) || disabled_everything;
|
||||
!CVarGetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".PixelPerfectMode", 0) || disabled_everything;
|
||||
// Pixel-perfect Mode
|
||||
UIWidgets::PaddedEnhancementCheckbox("Pixel-perfect Mode", "gAdvancedResolution.PixelPerfectMode", true,
|
||||
UIWidgets::PaddedEnhancementCheckbox("Pixel-perfect Mode", CVAR_PREFIX_ADVANCED_RESOLUTION ".PixelPerfectMode", true,
|
||||
true, disabled_pixelCount || disabled_everything, "",
|
||||
UIWidgets::CheckboxGraphics::Cross, false);
|
||||
UIWidgets::Tooltip("Don't scale image to fill window.");
|
||||
if (disabled_pixelCount && CVarGetInteger("gAdvancedResolution.PixelPerfectMode", 0)) {
|
||||
CVarSetInteger("gAdvancedResolution.PixelPerfectMode", 0);
|
||||
if (disabled_pixelCount && CVarGetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".PixelPerfectMode", 0)) {
|
||||
CVarSetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".PixelPerfectMode", 0);
|
||||
CVarSave();
|
||||
}
|
||||
|
||||
// Integer Scaling
|
||||
UIWidgets::EnhancementSliderInt(
|
||||
"Integer scale factor: %d", "##ARSIntScale", "gAdvancedResolution.IntegerScale.Factor", 1,
|
||||
"Integer scale factor: %d", "##ARSIntScale", CVAR_PREFIX_ADVANCED_RESOLUTION ".IntegerScale.Factor", 1,
|
||||
max_integerScaleFactor, "%d", 1, true,
|
||||
disabled_pixelPerfectMode || CVarGetInteger("gAdvancedResolution.IntegerScale.FitAutomatically", 0));
|
||||
disabled_pixelPerfectMode || CVarGetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".IntegerScale.FitAutomatically", 0));
|
||||
UIWidgets::Tooltip("Integer scales the image. Only available in pixel-perfect mode.");
|
||||
// Display warning if size is being clamped or if framebuffer is larger than viewport.
|
||||
if (!disabled_pixelPerfectMode &&
|
||||
(CVarGetInteger("gAdvancedResolution.IntegerScale.NeverExceedBounds", 1) &&
|
||||
CVarGetInteger("gAdvancedResolution.IntegerScale.Factor", 1) > integerScale_maximumBounds)) {
|
||||
(CVarGetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".IntegerScale.NeverExceedBounds", 1) &&
|
||||
CVarGetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".IntegerScale.Factor", 1) > integerScale_maximumBounds)) {
|
||||
ImGui::SameLine();
|
||||
ImGui::TextColored(messageColor[MESSAGE_WARNING], ICON_FA_EXCLAMATION_TRIANGLE " Window exceeded.");
|
||||
}
|
||||
|
||||
UIWidgets::PaddedEnhancementCheckbox(
|
||||
"Automatically scale image to fit viewport", "gAdvancedResolution.IntegerScale.FitAutomatically", true,
|
||||
"Automatically scale image to fit viewport", CVAR_PREFIX_ADVANCED_RESOLUTION ".IntegerScale.FitAutomatically", true,
|
||||
true, disabled_pixelPerfectMode, "", UIWidgets::CheckboxGraphics::Cross, false);
|
||||
UIWidgets::Tooltip("Automatically sets scale factor to fit window. Only available in pixel-perfect mode.");
|
||||
if (CVarGetInteger("gAdvancedResolution.IntegerScale.FitAutomatically", 0)) {
|
||||
if (CVarGetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".IntegerScale.FitAutomatically", 0)) {
|
||||
// This is just here to update the value shown on the slider.
|
||||
// The function in LUS to handle this setting will ignore IntegerScaleFactor while active.
|
||||
CVarSetInteger("gAdvancedResolution.IntegerScale.Factor", integerScale_maximumBounds);
|
||||
CVarSetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".IntegerScale.Factor", integerScale_maximumBounds);
|
||||
// CVarSave();
|
||||
}
|
||||
} // End of integer scaling settings
|
||||
@ -344,19 +345,19 @@ void AdvancedResolutionSettingsWindow::DrawElement() {
|
||||
UIWidgets::PaddedEnhancementCheckbox("Disable aspect correction and stretch the output image.\n"
|
||||
"(Might be useful for 4:3 televisions!)\n"
|
||||
"Not available in Pixel Perfect Mode.",
|
||||
"gAdvancedResolution.IgnoreAspectCorrection", false, true,
|
||||
CVarGetInteger("gAdvancedResolution.PixelPerfectMode", 0) ||
|
||||
CVAR_PREFIX_ADVANCED_RESOLUTION ".IgnoreAspectCorrection", false, true,
|
||||
CVarGetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".PixelPerfectMode", 0) ||
|
||||
disabled_everything,
|
||||
"", UIWidgets::CheckboxGraphics::Cross, false);
|
||||
#else
|
||||
if (CVarGetInteger("gAdvancedResolution.IgnoreAspectCorrection", 0)) {
|
||||
if (CVarGetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".IgnoreAspectCorrection", 0)) {
|
||||
// This setting is intentionally not exposed on PC platforms,
|
||||
// but may be accidentally activated for varying reasons.
|
||||
// Having this button should hopefully prevent support headaches.
|
||||
ImGui::TextColored(messageColor[MESSAGE_QUESTION], ICON_FA_QUESTION_CIRCLE
|
||||
" If the image is stretched and you don't know why, click this.");
|
||||
if (ImGui::Button("Click to reenable aspect correction.")) {
|
||||
CVarSetInteger("gAdvancedResolution.IgnoreAspectCorrection", 0);
|
||||
CVarSetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".IgnoreAspectCorrection", 0);
|
||||
CVarSave();
|
||||
}
|
||||
UIWidgets::Spacer(2);
|
||||
@ -386,12 +387,12 @@ void AdvancedResolutionSettingsWindow::DrawElement() {
|
||||
|
||||
// Integer Scaling - Never Exceed Bounds.
|
||||
const bool disabled_neverExceedBounds =
|
||||
!CVarGetInteger("gAdvancedResolution.PixelPerfectMode", 0) ||
|
||||
CVarGetInteger("gAdvancedResolution.IntegerScale.FitAutomatically", 0) || disabled_everything;
|
||||
!CVarGetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".PixelPerfectMode", 0) ||
|
||||
CVarGetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".IntegerScale.FitAutomatically", 0) || disabled_everything;
|
||||
const bool checkbox_neverExceedBounds =
|
||||
UIWidgets::PaddedEnhancementCheckbox("Prevent integer scaling from exceeding screen bounds.\n"
|
||||
"(Makes screen bounds take priority over specified factor.)",
|
||||
"gAdvancedResolution.IntegerScale.NeverExceedBounds",
|
||||
CVAR_PREFIX_ADVANCED_RESOLUTION ".IntegerScale.NeverExceedBounds",
|
||||
true, false, disabled_neverExceedBounds, "",
|
||||
UIWidgets::CheckboxGraphics::Cross, true);
|
||||
UIWidgets::Tooltip(
|
||||
@ -403,22 +404,22 @@ void AdvancedResolutionSettingsWindow::DrawElement() {
|
||||
|
||||
// Initialise the (currently unused) "Exceed Bounds By" cvar if it's been changed.
|
||||
if (checkbox_neverExceedBounds &&
|
||||
CVarGetInteger("gAdvancedResolution.IntegerScale.ExceedBoundsBy", 0)) {
|
||||
CVarSetInteger("gAdvancedResolution.IntegerScale.ExceedBoundsBy", 0);
|
||||
CVarGetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".IntegerScale.ExceedBoundsBy", 0)) {
|
||||
CVarSetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".IntegerScale.ExceedBoundsBy", 0);
|
||||
CVarSave();
|
||||
}
|
||||
|
||||
// Integer Scaling - Exceed Bounds By 1x/Offset.
|
||||
// A popular feature in some retro frontends/upscalers, sometimes called "crop overscan" or "1080p 5x".
|
||||
/*
|
||||
UIWidgets::PaddedEnhancementCheckbox("Allow integer scale factor to go +1 above maximum screen bounds.", "gAdvancedResolution.IntegerScale.ExceedBoundsBy", false, false, !CVarGetInteger("gAdvancedResolution.PixelPerfectMode", 0) || disabled_everything, "", UIWidgets::CheckboxGraphics::Cross, false);
|
||||
UIWidgets::PaddedEnhancementCheckbox("Allow integer scale factor to go +1 above maximum screen bounds.", CVAR_PREFIX_ADVANCED_RESOLUTION ".IntegerScale.ExceedBoundsBy", false, false, !CVarGetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".PixelPerfectMode", 0) || disabled_everything, "", UIWidgets::CheckboxGraphics::Cross, false);
|
||||
*/
|
||||
// It does actually function as expected, but exceeding the bottom of the screen shows a scroll bar.
|
||||
// I've ended up commenting this one out because of the scroll bar, and for simplicity.
|
||||
|
||||
// Display an info message about the scroll bar.
|
||||
if (!CVarGetInteger("gAdvancedResolution.IntegerScale.NeverExceedBounds", 1) ||
|
||||
CVarGetInteger("gAdvancedResolution.IntegerScale.ExceedBoundsBy", 0)) {
|
||||
if (!CVarGetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".IntegerScale.NeverExceedBounds", 1) ||
|
||||
CVarGetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".IntegerScale.ExceedBoundsBy", 0)) {
|
||||
if (disabled_neverExceedBounds) { // Dim this help text accordingly
|
||||
UIWidgets::DisableComponent(ImGui::GetStyle().Alpha * 0.5f);
|
||||
}
|
||||
@ -431,9 +432,9 @@ void AdvancedResolutionSettingsWindow::DrawElement() {
|
||||
|
||||
// Another support helper button, to disable the unused "Exceed Bounds By" cvar.
|
||||
// (Remove this button if uncommenting the checkbox.)
|
||||
if (CVarGetInteger("gAdvancedResolution.IntegerScale.ExceedBoundsBy", 0)) {
|
||||
if (CVarGetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".IntegerScale.ExceedBoundsBy", 0)) {
|
||||
if (ImGui::Button("Click to reset a console variable that may be causing this.")) {
|
||||
CVarSetInteger("gAdvancedResolution.IntegerScale.ExceedBoundsBy", 0);
|
||||
CVarSetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".IntegerScale.ExceedBoundsBy", 0);
|
||||
CVarSave();
|
||||
}
|
||||
}
|
||||
@ -451,13 +452,13 @@ void AdvancedResolutionSettingsWindow::DrawElement() {
|
||||
if (aspectRatioX < 0.0f) {
|
||||
aspectRatioX = 0.0f;
|
||||
}
|
||||
CVarSetFloat("gAdvancedResolution.AspectRatioX", aspectRatioX);
|
||||
CVarSetFloat(CVAR_PREFIX_ADVANCED_RESOLUTION ".AspectRatioX", aspectRatioX);
|
||||
}
|
||||
if (update[UPDATE_aspectRatioY]) {
|
||||
if (aspectRatioY < 0.0f) {
|
||||
aspectRatioY = 0.0f;
|
||||
}
|
||||
CVarSetFloat("gAdvancedResolution.AspectRatioY", aspectRatioY);
|
||||
CVarSetFloat(CVAR_PREFIX_ADVANCED_RESOLUTION ".AspectRatioY", aspectRatioY);
|
||||
}
|
||||
if (update[UPDATE_verticalPixelCount]) {
|
||||
// There's a upper and lower clamp on the Libultraship side too,
|
||||
@ -468,10 +469,10 @@ void AdvancedResolutionSettingsWindow::DrawElement() {
|
||||
if (verticalPixelCount > maxVerticalPixelCount) {
|
||||
verticalPixelCount = maxVerticalPixelCount;
|
||||
}
|
||||
CVarSetInteger("gAdvancedResolution.VerticalPixelCount", verticalPixelCount);
|
||||
CVarSetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".VerticalPixelCount", verticalPixelCount);
|
||||
}
|
||||
CVarSetInteger("gAdvancedResolution.UIComboItem.AspectRatio", item_aspectRatio);
|
||||
CVarSetInteger("gAdvancedResolution.UIComboItem.PixelCount", item_pixelCount);
|
||||
CVarSetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".UIComboItem.AspectRatio", item_aspectRatio);
|
||||
CVarSetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".UIComboItem.PixelCount", item_pixelCount);
|
||||
CVarSave();
|
||||
}
|
||||
}
|
||||
@ -484,7 +485,7 @@ void AdvancedResolutionSettingsWindow::UpdateElement() {
|
||||
bool AdvancedResolutionSettingsWindow::IsDroppingFrames() {
|
||||
// a rather imprecise way of checking for frame drops.
|
||||
// but it's mostly there to inform the player of large drops.
|
||||
const short targetFPS = CVarGetInteger("gInterpolationFPS", 20);
|
||||
const short targetFPS = CVarGetInteger(CVAR_SETTING("InterpolationFPS"), 20);
|
||||
const float threshold = targetFPS / 20.0f + 4.1f;
|
||||
return ImGui::GetIO().Framerate < targetFPS - threshold;
|
||||
}
|
||||
|
@ -2,12 +2,12 @@
|
||||
#include <libultraship/libultraship.h>
|
||||
|
||||
namespace AdvancedResolutionSettings {
|
||||
class AdvancedResolutionSettingsWindow : public LUS::GuiWindow {
|
||||
class AdvancedResolutionSettingsWindow : public Ship::GuiWindow {
|
||||
private:
|
||||
bool IsDroppingFrames();
|
||||
|
||||
public:
|
||||
using LUS::GuiWindow::GuiWindow;
|
||||
using GuiWindow::GuiWindow;
|
||||
|
||||
void InitElement() override;
|
||||
void DrawElement() override;
|
||||
|
@ -837,7 +837,7 @@ extern "C" void ProcessSaveStateRequests(void) {
|
||||
}
|
||||
|
||||
void SaveStateMgr::SetCurrentSlot(unsigned int slot) {
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->GetGameOverlay()->TextDrawNotification(1.0f, true, "slot %u set", slot);
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->GetGameOverlay()->TextDrawNotification(1.0f, true, "slot %u set", slot);
|
||||
this->currentSlot = slot;
|
||||
}
|
||||
|
||||
@ -855,12 +855,12 @@ void SaveStateMgr::ProcessSaveStateRequests(void) {
|
||||
this->states[request.slot] = std::make_shared<SaveState>(OTRGlobals::Instance->gSaveStateMgr, request.slot);
|
||||
}
|
||||
this->states[request.slot]->Save();
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->GetGameOverlay()->TextDrawNotification(1.0f, true, "saved state %u", request.slot);
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->GetGameOverlay()->TextDrawNotification(1.0f, true, "saved state %u", request.slot);
|
||||
break;
|
||||
case RequestType::LOAD:
|
||||
if (this->states.contains(request.slot)) {
|
||||
this->states[request.slot]->Load();
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->GetGameOverlay()->TextDrawNotification(1.0f, true, "loaded state %u", request.slot);
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->GetGameOverlay()->TextDrawNotification(1.0f, true, "loaded state %u", request.slot);
|
||||
} else {
|
||||
SPDLOG_ERROR("Invalid SaveState slot: {}", request.type);
|
||||
}
|
||||
@ -876,7 +876,7 @@ void SaveStateMgr::ProcessSaveStateRequests(void) {
|
||||
SaveStateReturn SaveStateMgr::AddRequest(const SaveStateRequest request) {
|
||||
if (gPlayState == nullptr) {
|
||||
SPDLOG_ERROR("[SOH] Can not save or load a state outside of \"GamePlay\"");
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->GetGameOverlay()->TextDrawNotification(1.0f, true, "states not available here", request.slot);
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->GetGameOverlay()->TextDrawNotification(1.0f, true, "states not available here", request.slot);
|
||||
return SaveStateReturn::FAIL_WRONG_GAMESTATE;
|
||||
}
|
||||
|
||||
@ -890,7 +890,7 @@ SaveStateReturn SaveStateMgr::AddRequest(const SaveStateRequest request) {
|
||||
return SaveStateReturn::SUCCESS;
|
||||
} else {
|
||||
SPDLOG_ERROR("Invalid SaveState slot: {}", request.type);
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->GetGameOverlay()->TextDrawNotification(1.0f, true, "state slot %u empty", request.slot);
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->GetGameOverlay()->TextDrawNotification(1.0f, true, "state slot %u empty", request.slot);
|
||||
return SaveStateReturn::FAIL_INVALID_SLOT;
|
||||
}
|
||||
[[unlikely]] default:
|
||||
|
@ -96,7 +96,7 @@ void EnZl4_SkipToGivingZeldasLetter(EnZl4* enZl4, PlayState* play) {
|
||||
void EnDntDemo_JudgeSkipToReward(EnDntDemo* enDntDemo, PlayState* play) {
|
||||
// todo: figure out a better way to handle toggling so we don't
|
||||
// need to double check cvars like this
|
||||
if(!(IS_RANDO || CVarGetInteger("gTimeSavers.SkipMiscInteractions", IS_RANDO))) {
|
||||
if(!(IS_RANDO || CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipMiscInteractions"), IS_RANDO))) {
|
||||
EnDntDemo_Judge(enDntDemo, play);
|
||||
return;
|
||||
}
|
||||
@ -141,12 +141,12 @@ void TimeSaverOnGameFrameUpdateHandler() {
|
||||
void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void* opt) {
|
||||
switch (id) {
|
||||
case VB_PLAY_TRANSITION_CS: {
|
||||
if (CVarGetInteger("gTimeSavers.SkipCutscene.Intro", IS_RANDO) && gSaveContext.entranceIndex == ENTR_LINKS_HOUSE_0 && gSaveContext.cutsceneIndex == 0xFFF1) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Intro"), IS_RANDO) && gSaveContext.entranceIndex == ENTR_LINKS_HOUSE_0 && gSaveContext.cutsceneIndex == 0xFFF1) {
|
||||
gSaveContext.cutsceneIndex = 0;
|
||||
*should = false;
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gTimeSavers.SkipCutscene.LearnSong", IS_RANDO) || IS_RANDO) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.LearnSong"), IS_RANDO) || IS_RANDO) {
|
||||
// Song of Time
|
||||
if (gSaveContext.entranceIndex == ENTR_TEMPLE_OF_TIME_0 && gSaveContext.cutsceneIndex == 0xFFF7) {
|
||||
gSaveContext.entranceIndex = ENTR_HYRULE_FIELD_16;
|
||||
@ -184,7 +184,7 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void*
|
||||
}
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gTimeSavers.SkipCutscene.Story", IS_RANDO)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Story"), IS_RANDO)) {
|
||||
uint8_t isBlueWarp = 0;
|
||||
// Deku Tree Blue warp
|
||||
if (gSaveContext.entranceIndex == ENTR_KOKIRI_FOREST_0 && gSaveContext.cutsceneIndex == 0xFFF1) {
|
||||
@ -278,7 +278,7 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void*
|
||||
}
|
||||
|
||||
if (gSaveContext.entranceIndex == ENTR_GANONS_TOWER_COLLAPSE_EXTERIOR_0) {
|
||||
if (CVarGetInteger("gTimeSavers.SkipTowerEscape", false) || IS_BOSS_RUSH) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipTowerEscape"), false) || IS_BOSS_RUSH) {
|
||||
Flags_SetEventChkInf(EVENTCHKINF_WATCHED_GANONS_CASTLE_COLLAPSE_CAUGHT_BY_GERUDO);
|
||||
gSaveContext.entranceIndex = ENTR_GANON_BOSS_0;
|
||||
*should = false;
|
||||
@ -286,7 +286,7 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void*
|
||||
}
|
||||
|
||||
if (gSaveContext.entranceIndex == ENTR_CASTLE_COURTYARD_GUARDS_DAY_0) {
|
||||
if (CVarGetInteger("gTimeSavers.SkipChildStealth", false)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipChildStealth"), false)) {
|
||||
gSaveContext.entranceIndex = ENTR_CASTLE_COURTYARD_ZELDA_0;
|
||||
*should = false;
|
||||
}
|
||||
@ -295,13 +295,13 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void*
|
||||
}
|
||||
case VB_PLAY_ENTRANCE_CS: {
|
||||
s32* entranceFlag = static_cast<s32*>(opt);
|
||||
if (CVarGetInteger("gTimeSavers.SkipCutscene.Entrances", IS_RANDO) && (*entranceFlag != EVENTCHKINF_EPONA_OBTAINED)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Entrances"), IS_RANDO) && (*entranceFlag != EVENTCHKINF_EPONA_OBTAINED)) {
|
||||
*should = false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VB_PLAY_ONEPOINT_CS: {
|
||||
if (CVarGetInteger("gTimeSavers.SkipCutscene.OnePoint", IS_RANDO)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.OnePoint"), IS_RANDO)) {
|
||||
s16* csId = static_cast<s16*>(opt);
|
||||
switch (*csId) {
|
||||
case 4180:
|
||||
@ -317,7 +317,7 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void*
|
||||
break;
|
||||
}
|
||||
case VB_PLAY_ONEPOINT_ACTOR_CS: {
|
||||
if (CVarGetInteger("gTimeSavers.SkipCutscene.OnePoint", IS_RANDO)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.OnePoint"), IS_RANDO)) {
|
||||
Actor* actor = static_cast<Actor*>(opt);
|
||||
|
||||
// there are a few checks throughout the game (such as chest spawns) that rely on this
|
||||
@ -404,18 +404,18 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void*
|
||||
break;
|
||||
}
|
||||
case VB_SHOW_TITLE_CARD:
|
||||
if (CVarGetInteger("gTimeSavers.DisableTitleCard", IS_RANDO)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.DisableTitleCard"), IS_RANDO)) {
|
||||
*should = false;
|
||||
}
|
||||
break;
|
||||
case VB_WONDER_TALK: {
|
||||
if (CVarGetInteger("gTimeSavers.NoForcedDialog", IS_RANDO)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.NoForcedDialog"), IS_RANDO)) {
|
||||
*should = false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VB_NAVI_TALK: {
|
||||
if (CVarGetInteger("gTimeSavers.NoForcedDialog", IS_RANDO)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.NoForcedDialog"), IS_RANDO)) {
|
||||
ElfMsg* naviTalk = static_cast<ElfMsg*>(opt);
|
||||
Flags_SetSwitch(gPlayState, (naviTalk->actor.params >> 8) & 0x3F);
|
||||
Actor_Kill(&naviTalk->actor);
|
||||
@ -424,14 +424,14 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void*
|
||||
break;
|
||||
}
|
||||
case VB_NOT_BE_GREETED_BY_SARIA:
|
||||
if (CVarGetInteger("gTimeSavers.SkipCutscene.Entrances", IS_RANDO) && !Flags_GetInfTable(INFTABLE_GREETED_BY_SARIA)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Entrances"), IS_RANDO) && !Flags_GetInfTable(INFTABLE_GREETED_BY_SARIA)) {
|
||||
Flags_SetInfTable(INFTABLE_GREETED_BY_SARIA);
|
||||
*should = true;
|
||||
}
|
||||
break;
|
||||
case VB_MOVE_MIDO_IN_KOKIRI_FOREST:
|
||||
if (
|
||||
CVarGetInteger("gTimeSavers.SkipMiscInteractions", IS_RANDO) &&
|
||||
CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipMiscInteractions"), IS_RANDO) &&
|
||||
!Flags_GetEventChkInf(EVENTCHKINF_SHOWED_MIDO_SWORD_SHIELD) &&
|
||||
(CUR_EQUIP_VALUE(EQUIP_TYPE_SHIELD) == EQUIP_VALUE_SHIELD_DEKU) &&
|
||||
(CUR_EQUIP_VALUE(EQUIP_TYPE_SWORD) == EQUIP_VALUE_SWORD_KOKIRI)
|
||||
@ -441,7 +441,7 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void*
|
||||
}
|
||||
break;
|
||||
case VB_PLAY_DEKU_TREE_INTRO_CS: {
|
||||
if (CVarGetInteger("gTimeSavers.SkipCutscene.Story", IS_RANDO)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Story"), IS_RANDO)) {
|
||||
BgTreemouth* treeMouth = static_cast<BgTreemouth*>(opt);
|
||||
Flags_SetEventChkInf(EVENTCHKINF_DEKU_TREE_OPENED_MOUTH);
|
||||
Audio_PlaySoundGeneral(NA_SE_EV_WOODDOOR_OPEN, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
@ -453,7 +453,7 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void*
|
||||
case VB_DEKU_JR_CONSIDER_FOREST_TEMPLE_FINISHED: {
|
||||
// We're overriding this so that the Deku JR doesn't despawn after skipping the forest temple blue warp cutscene.
|
||||
// It typically relies on the forest medallion being obtained, but that isn't given yet until after scene init
|
||||
if (CVarGetInteger("gTimeSavers.SkipCutscene.Story", IS_RANDO)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Story"), IS_RANDO)) {
|
||||
*should = Flags_GetEventChkInf(EVENTCHKINF_USED_FOREST_TEMPLE_BLUE_WARP);
|
||||
}
|
||||
break;
|
||||
@ -462,18 +462,18 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void*
|
||||
case VB_PLAY_SHIEK_BLOCK_MASTER_SWORD_CS:
|
||||
case VB_GIVE_ITEM_FAIRY_OCARINA:
|
||||
case VB_GIVE_ITEM_LIGHT_ARROW:
|
||||
if (CVarGetInteger("gTimeSavers.SkipCutscene.Story", IS_RANDO)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Story"), IS_RANDO)) {
|
||||
*should = false;
|
||||
}
|
||||
break;
|
||||
case VB_PLAY_NABOORU_CAPTURED_CS:
|
||||
if (*should == true && CVarGetInteger("gTimeSavers.SkipCutscene.Story", IS_RANDO)) {
|
||||
if (*should == true && CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Story"), IS_RANDO)) {
|
||||
Flags_SetEventChkInf(EVENTCHKINF_NABOORU_CAPTURED_BY_TWINROVA);
|
||||
*should = false;
|
||||
}
|
||||
break;
|
||||
case VB_PLAY_PULL_MASTER_SWORD_CS:
|
||||
if (CVarGetInteger("gTimeSavers.SkipCutscene.Story", IS_RANDO)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Story"), IS_RANDO)) {
|
||||
if (!Flags_GetEventChkInf(EVENTCHKINF_PULLED_MASTER_SWORD_FROM_PEDESTAL)) {
|
||||
// Normally, these would be done in the cutscene, but we're skipping it
|
||||
Flags_SetEventChkInf(EVENTCHKINF_PULLED_MASTER_SWORD_FROM_PEDESTAL);
|
||||
@ -488,7 +488,7 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void*
|
||||
}
|
||||
break;
|
||||
case VB_OWL_INTERACTION: {
|
||||
if (CVarGetInteger("gTimeSavers.SkipOwlInteractions", IS_RANDO) && *should) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipOwlInteractions"), IS_RANDO) && *should) {
|
||||
EnOwl* enOwl = static_cast<EnOwl*>(opt);
|
||||
s32 owlType = (enOwl->actor.params & 0xFC0) >> 6;
|
||||
|
||||
@ -502,7 +502,7 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void*
|
||||
break;
|
||||
}
|
||||
case VB_OVERRIDE_LINK_THE_GORON_DIALOGUE: {
|
||||
if (CVarGetInteger("gTimeSavers.SkipMiscInteractions", IS_RANDO)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipMiscInteractions"), IS_RANDO)) {
|
||||
u16* textId = static_cast<u16*>(opt);
|
||||
// If the doors are not open yet, prioritize opening them
|
||||
if (!Flags_GetInfTable(INFTABLE_GORON_CITY_DOORS_UNLOCKED)) {
|
||||
@ -516,12 +516,12 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void*
|
||||
case VB_PLAY_EYEDROPS_CS:
|
||||
case VB_PLAY_DROP_FISH_FOR_JABU_CS:
|
||||
case VB_PLAY_DARUNIAS_JOY_CS:
|
||||
if (CVarGetInteger("gTimeSavers.SkipMiscInteractions", IS_RANDO)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipMiscInteractions"), IS_RANDO)) {
|
||||
*should = false;
|
||||
}
|
||||
break;
|
||||
case VB_PLAY_ZELDAS_LULLABY_CS: {
|
||||
if (CVarGetInteger("gTimeSavers.SkipCutscene.LearnSong", IS_RANDO) || IS_RANDO) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.LearnSong"), IS_RANDO) || IS_RANDO) {
|
||||
DemoIm* demoIm = static_cast<DemoIm*>(opt);
|
||||
Player* player = GET_PLAYER(gPlayState);
|
||||
player->stateFlags1 |= PLAYER_STATE1_IN_CUTSCENE;
|
||||
@ -532,7 +532,7 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void*
|
||||
static uint32_t demoImKillHook = 0;
|
||||
demoImUpdateHook = GameInteractor::Instance->RegisterGameHook<GameInteractor::OnActorUpdate>([](void* actorRef) mutable {
|
||||
Actor* actor = static_cast<Actor*>(actorRef);
|
||||
if (actor->id == ACTOR_DEMO_IM && (CVarGetInteger("gTimeSavers.SkipCutscene.LearnSong", IS_RANDO) || IS_RANDO)) {
|
||||
if (actor->id == ACTOR_DEMO_IM && (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.LearnSong"), IS_RANDO) || IS_RANDO)) {
|
||||
DemoIm* demoIm = static_cast<DemoIm*>(actorRef);
|
||||
Player* player = GET_PLAYER(gPlayState);
|
||||
player->stateFlags1 |= PLAYER_STATE1_IN_CUTSCENE;
|
||||
@ -571,7 +571,7 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void*
|
||||
break;
|
||||
}
|
||||
case VB_PLAY_SARIAS_SONG_CS: {
|
||||
if (CVarGetInteger("gTimeSavers.SkipCutscene.LearnSong", IS_RANDO) || IS_RANDO) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.LearnSong"), IS_RANDO) || IS_RANDO) {
|
||||
EnSa* enSa = static_cast<EnSa*>(opt);
|
||||
enSa->actionFunc = func_80AF6B20;
|
||||
*should = false;
|
||||
@ -579,13 +579,13 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void*
|
||||
break;
|
||||
}
|
||||
case VB_DESPAWN_HORSE_RACE_COW: {
|
||||
if (Flags_GetEventChkInf(EVENTCHKINF_WON_COW_IN_MALONS_RACE) && CVarGetInteger("gCowOfTime", 0)) {
|
||||
if (Flags_GetEventChkInf(EVENTCHKINF_WON_COW_IN_MALONS_RACE) && CVarGetInteger(CVAR_ENHANCEMENT("CowOfTime"), 0)) {
|
||||
*should = false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VB_PLAY_DRAIN_WELL_CS: {
|
||||
if (CVarGetInteger("gTimeSavers.SkipCutscene.Story", IS_RANDO)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Story"), IS_RANDO)) {
|
||||
*should = false;
|
||||
Flags_SetSwitch(gPlayState, 0x2);
|
||||
Flags_SetEventChkInf(EVENTCHKINF_PLAYED_SONG_OF_STORMS_IN_WINDMILL);
|
||||
@ -594,7 +594,7 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void*
|
||||
break;
|
||||
}
|
||||
case VB_PLAY_SUNS_SONG_CS:
|
||||
if (CVarGetInteger("gTimeSavers.SkipCutscene.LearnSong", IS_RANDO) || IS_RANDO) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.LearnSong"), IS_RANDO) || IS_RANDO) {
|
||||
*should = false;
|
||||
Flags_SetEventChkInf(EVENTCHKINF_LEARNED_SUNS_SONG);
|
||||
// SoH [Randomizer] TODO: Increment time X amount (find out X)
|
||||
@ -603,19 +603,19 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void*
|
||||
}
|
||||
break;
|
||||
case VB_PLAY_ROYAL_FAMILY_TOMB_CS: {
|
||||
if (CVarGetInteger("gTimeSavers.SkipMiscInteractions", IS_RANDO)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipMiscInteractions"), IS_RANDO)) {
|
||||
*should = false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VB_PLAY_ROYAL_FAMILY_TOMB_EXPLODE: {
|
||||
if (CVarGetInteger("gTimeSavers.SkipMiscInteractions", IS_RANDO)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipMiscInteractions"), IS_RANDO)) {
|
||||
*should = Flags_GetEventChkInf(EVENTCHKINF_DESTROYED_ROYAL_FAMILY_TOMB);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VB_PLAY_DOOR_OF_TIME_CS: {
|
||||
if (CVarGetInteger("gTimeSavers.SkipMiscInteractions", IS_RANDO)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipMiscInteractions"), IS_RANDO)) {
|
||||
*should = false;
|
||||
Flags_SetEnv(gPlayState, 2);
|
||||
func_80078884(NA_SE_SY_CORRECT_CHIME);
|
||||
@ -638,41 +638,41 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void*
|
||||
case VB_PLAY_BOLERO_OF_FIRE_CS:
|
||||
case VB_PLAY_SERENADE_OF_WATER_CS:
|
||||
case VB_PLAY_PRELUDE_OF_LIGHT_CS:
|
||||
if (CVarGetInteger("gTimeSavers.SkipCutscene.LearnSong", IS_RANDO) || IS_RANDO) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.LearnSong"), IS_RANDO) || IS_RANDO) {
|
||||
*should = false;
|
||||
}
|
||||
break;
|
||||
case VB_DAMPE_IN_GRAVEYARD_DESPAWN:
|
||||
if (CVarGetInteger("gDampeAllNight", 0)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("DampeAllNight"), 0)) {
|
||||
*should = LINK_IS_ADULT || gPlayState->sceneNum != SCENE_GRAVEYARD;
|
||||
}
|
||||
break;
|
||||
case VB_BE_VALID_GRAVEDIGGING_SPOT:
|
||||
if (CVarGetInteger("gDampeWin", 0)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("DampeWin"), 0)) {
|
||||
EnTk *enTk = static_cast<EnTk*>(opt);
|
||||
enTk->validDigHere = true;
|
||||
*should = true;
|
||||
}
|
||||
break;
|
||||
case VB_BE_DAMPE_GRAVEDIGGING_GRAND_PRIZE:
|
||||
if (CVarGetInteger("gDampeWin", 0)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("DampeWin"), 0)) {
|
||||
EnTk *enTk = static_cast<EnTk*>(opt);
|
||||
enTk->currentReward = 3;
|
||||
*should = true;
|
||||
}
|
||||
break;
|
||||
case VB_DAMPE_GRAVEDIGGING_GRAND_PRIZE_BE_HEART_PIECE:
|
||||
if (CVarGetInteger("gGravediggingTourFix", 0) || IS_RANDO) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("GravediggingTourFix"), 0) || IS_RANDO) {
|
||||
*should = !Flags_GetCollectible(gPlayState, COLLECTFLAG_GRAVEDIGGING_HEART_PIECE);
|
||||
}
|
||||
break;
|
||||
case VB_FIX_SAW_SOFTLOCK:
|
||||
// Animation Count should be no more than 1 to guarantee putaway is complete after giving the saw
|
||||
// As this is vanilla behavior, it only applies with the Fix toggle or Skip Text enabled.
|
||||
*should = (CVarGetInteger("gFixSawSoftlock", 0) != 0 || CVarGetInteger("gSkipText", 0) != 0) ? gPlayState->animationCtx.animationCount > 1 : *should;
|
||||
*should = (CVarGetInteger(CVAR_ENHANCEMENT("FixSawSoftlock"), 0) != 0 || CVarGetInteger(CVAR_ENHANCEMENT("SkipText"), 0) != 0) ? gPlayState->animationCtx.animationCount > 1 : *should;
|
||||
break;
|
||||
case VB_BIGGORON_CONSIDER_SWORD_FORGED:
|
||||
*should = Environment_GetBgsDayCount() >= CVarGetInteger("gForgeTime", 3);
|
||||
*should = Environment_GetBgsDayCount() >= CVarGetInteger(CVAR_ENHANCEMENT("ForgeTime"), 3);
|
||||
break;
|
||||
case VB_BE_ELIGIBLE_FOR_GREAT_FAIRY_REWARD: {
|
||||
BgDyYoseizo* bgDyYoseizo = static_cast<BgDyYoseizo*>(opt);
|
||||
@ -704,7 +704,7 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void*
|
||||
}
|
||||
}
|
||||
|
||||
if (flag != RAND_INF_MAX && (IS_RANDO || CVarGetInteger("gTimeSavers.SkipMiscInteractions", IS_RANDO))) {
|
||||
if (flag != RAND_INF_MAX && (IS_RANDO || CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipMiscInteractions"), IS_RANDO))) {
|
||||
if (IS_RANDO || *should) {
|
||||
Flags_SetRandomizerInf(flag);
|
||||
gSaveContext.healthAccumulator = 0x140;
|
||||
@ -716,14 +716,14 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void*
|
||||
break;
|
||||
}
|
||||
case VB_PLAY_RAINBOW_BRIDGE_CS: {
|
||||
if (CVarGetInteger("gTimeSavers.SkipCutscene.Story", IS_RANDO)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Story"), IS_RANDO)) {
|
||||
*should = false;
|
||||
func_800F595C(NA_BGM_BRIDGE_TO_GANONS);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VB_PHANTOM_GANON_DEATH_SCENE: {
|
||||
if (CVarGetInteger("gTimeSavers.SkipCutscene.QuickBossDeaths", IS_RANDO || IS_BOSS_RUSH)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.QuickBossDeaths"), IS_RANDO || IS_BOSS_RUSH)) {
|
||||
*should = false;
|
||||
BossGanondrof* pg = static_cast<BossGanondrof*>(opt);
|
||||
Player* player = GET_PLAYER(gPlayState);
|
||||
@ -749,7 +749,7 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void*
|
||||
}
|
||||
case VB_NABOORU_KNUCKLE_DEATH_SCENE: {
|
||||
EnIk* ik = static_cast<EnIk*>(opt);
|
||||
if (CVarGetInteger("gTimeSavers.SkipCutscene.QuickBossDeaths", IS_RANDO)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.QuickBossDeaths"), IS_RANDO)) {
|
||||
// Because no CS in rando, we hide the death of the knuckle by spawning flames and kill the actor
|
||||
if ((ik->actor.colChkInfo.health <= 10)) {
|
||||
s32 i;
|
||||
@ -791,7 +791,7 @@ void TimeSaverOnActorInitHandler(void* actorRef) {
|
||||
if (actor->id == ACTOR_EN_KO && (actor->params & 0xFF) == ENKO_TYPE_CHILD_3) {
|
||||
enKoUpdateHook = GameInteractor::Instance->RegisterGameHook<GameInteractor::OnActorUpdate>([](void* innerActorRef) mutable {
|
||||
Actor* innerActor = static_cast<Actor*>(innerActorRef);
|
||||
if (innerActor->id == ACTOR_EN_KO && (innerActor->params & 0xFF) == ENKO_TYPE_CHILD_3 && (CVarGetInteger("gTimeSavers.SkipCutscene.Story", IS_RANDO) || IS_RANDO)) {
|
||||
if (innerActor->id == ACTOR_EN_KO && (innerActor->params & 0xFF) == ENKO_TYPE_CHILD_3 && (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Story"), IS_RANDO) || IS_RANDO)) {
|
||||
EnKo* enKo = static_cast<EnKo*>(innerActorRef);
|
||||
// They haven't moved yet, wrap their update function so we check every frame
|
||||
if (enKo->actionFunc == func_80A995CC) {
|
||||
@ -817,7 +817,7 @@ void TimeSaverOnActorInitHandler(void* actorRef) {
|
||||
});
|
||||
}
|
||||
|
||||
if (actor->id == ACTOR_ITEM_OCARINA && actor->params == 3 && CVarGetInteger("gTimeSavers.SkipCutscene.Story", IS_RANDO)) {
|
||||
if (actor->id == ACTOR_ITEM_OCARINA && actor->params == 3 && CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Story"), IS_RANDO)) {
|
||||
itemOcarinaframesSinceSpawn = 0;
|
||||
itemOcarinaUpdateHook = GameInteractor::Instance->RegisterGameHook<GameInteractor::OnActorUpdate>([](void* innerActorRef) mutable {
|
||||
Actor* innerActor = static_cast<Actor*>(innerActorRef);
|
||||
@ -835,7 +835,7 @@ void TimeSaverOnActorInitHandler(void* actorRef) {
|
||||
if (actor->id == ACTOR_EN_MA1 && gPlayState->sceneNum == SCENE_LON_LON_RANCH) {
|
||||
enMa1UpdateHook = GameInteractor::Instance->RegisterGameHook<GameInteractor::OnActorUpdate>([](void* innerActorRef) mutable {
|
||||
Actor* innerActor = static_cast<Actor*>(innerActorRef);
|
||||
if (innerActor->id == ACTOR_EN_MA1 && (CVarGetInteger("gTimeSavers.SkipCutscene.LearnSong", IS_RANDO) || IS_RANDO)) {
|
||||
if (innerActor->id == ACTOR_EN_MA1 && (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.LearnSong"), IS_RANDO) || IS_RANDO)) {
|
||||
EnMa1* enMa1 = static_cast<EnMa1*>(innerActorRef);
|
||||
if (enMa1->actionFunc == func_80AA106C) {
|
||||
enMa1->actionFunc = EnMa1_EndTeachSong;
|
||||
@ -863,7 +863,7 @@ void TimeSaverOnActorInitHandler(void* actorRef) {
|
||||
if (actor->id == ACTOR_EN_FU) {
|
||||
enFuUpdateHook = GameInteractor::Instance->RegisterGameHook<GameInteractor::OnActorUpdate>([](void* innerActorRef) mutable {
|
||||
Actor* innerActor = static_cast<Actor*>(innerActorRef);
|
||||
if (innerActor->id == ACTOR_EN_FU && (CVarGetInteger("gTimeSavers.SkipCutscene.LearnSong", IS_RANDO) || IS_RANDO)) {
|
||||
if (innerActor->id == ACTOR_EN_FU && (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.LearnSong"), IS_RANDO) || IS_RANDO)) {
|
||||
EnFu* enFu = static_cast<EnFu*>(innerActorRef);
|
||||
if (enFu->actionFunc == EnFu_TeachSong) {
|
||||
enFu->actionFunc = EnFu_EndTeachSong;
|
||||
@ -885,7 +885,7 @@ void TimeSaverOnActorInitHandler(void* actorRef) {
|
||||
if (actor->id == ACTOR_BG_SPOT02_OBJECTS && actor->params == 2) {
|
||||
bgSpot02UpdateHook = GameInteractor::Instance->RegisterGameHook<GameInteractor::OnActorUpdate>([](void* innerActorRef) mutable {
|
||||
Actor* innerActor = static_cast<Actor*>(innerActorRef);
|
||||
if (innerActor->id == ACTOR_BG_SPOT02_OBJECTS && innerActor->params == 2 && (CVarGetInteger("gTimeSavers.SkipMiscInteractions", IS_RANDO))) {
|
||||
if (innerActor->id == ACTOR_BG_SPOT02_OBJECTS && innerActor->params == 2 && (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipMiscInteractions"), IS_RANDO))) {
|
||||
BgSpot02Objects* bgSpot02 = static_cast<BgSpot02Objects*>(innerActorRef);
|
||||
if (bgSpot02->actionFunc == func_808ACC34) {
|
||||
bgSpot02->actionFunc = func_808AC908;
|
||||
@ -904,14 +904,14 @@ void TimeSaverOnActorInitHandler(void* actorRef) {
|
||||
});
|
||||
}
|
||||
|
||||
if (actor->id == ACTOR_EN_ZL4 && CVarGetInteger("gTimeSavers.SkipCutscene.Story", IS_RANDO)) {
|
||||
if (actor->id == ACTOR_EN_ZL4 && CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Story"), IS_RANDO)) {
|
||||
EnZl4* enZl4 = static_cast<EnZl4*>(actorRef);
|
||||
if (enZl4->actionFunc != EnZl4_Cutscene || enZl4->csState != 0) return;
|
||||
|
||||
enZl4->actionFunc = EnZl4_SkipToGivingZeldasLetter;
|
||||
}
|
||||
|
||||
if (actor->id == ACTOR_EN_DNT_DEMO && (IS_RANDO || CVarGetInteger("gTimeSavers.SkipMiscInteractions", IS_RANDO))) {
|
||||
if (actor->id == ACTOR_EN_DNT_DEMO && (IS_RANDO || CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipMiscInteractions"), IS_RANDO))) {
|
||||
EnDntDemo* enDntDemo = static_cast<EnDntDemo*>(actorRef);
|
||||
enDntDemo->actionFunc = EnDntDemo_JudgeSkipToReward;
|
||||
}
|
||||
@ -921,7 +921,7 @@ void TimeSaverOnActorInitHandler(void* actorRef) {
|
||||
// or poes from which the cutscene is triggered until we can have a "BeforeActorInit" hook.
|
||||
// So for now we're just going to set the flag before they get to the room the cutscene is in
|
||||
if (gPlayState->sceneNum == SCENE_FOREST_TEMPLE && actor->id == ACTOR_EN_ST && !Flags_GetSwitch(gPlayState, 0x1B)) {
|
||||
if (CVarGetInteger("gTimeSavers.SkipCutscene.GlitchAiding", 0)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.GlitchAiding"), 0)) {
|
||||
Flags_SetSwitch(gPlayState, 0x1B);
|
||||
}
|
||||
}
|
||||
@ -930,7 +930,7 @@ void TimeSaverOnActorInitHandler(void* actorRef) {
|
||||
if (actor->id == ACTOR_EN_PO_SISTERS && actor->params == 28) {
|
||||
enPoSistersUpdateHook = GameInteractor::Instance->RegisterGameHook<GameInteractor::OnActorUpdate>([](void* innerActorRef) mutable {
|
||||
Actor* innerActor = static_cast<Actor*>(innerActorRef);
|
||||
if (innerActor->id == ACTOR_EN_PO_SISTERS && innerActor->params == 28 && (CVarGetInteger("gTimeSavers.SkipMiscInteractions", IS_RANDO))) {
|
||||
if (innerActor->id == ACTOR_EN_PO_SISTERS && innerActor->params == 28 && (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipMiscInteractions"), IS_RANDO))) {
|
||||
EnPoSisters* enPoSisters = static_cast<EnPoSisters*>(innerActorRef);
|
||||
if (enPoSisters->actionFunc == func_80ADB338) {
|
||||
enPoSisters->unk_19C = 0;
|
||||
@ -947,7 +947,7 @@ void TimeSaverOnActorInitHandler(void* actorRef) {
|
||||
|
||||
// Fire Temple Darunia cutscene
|
||||
if (actor->id == ACTOR_EN_DU && gPlayState->sceneNum == SCENE_FIRE_TEMPLE) {
|
||||
if (CVarGetInteger("gTimeSavers.SkipCutscene.GlitchAiding", 0)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.GlitchAiding"), 0)) {
|
||||
Flags_SetInfTable(INFTABLE_SPOKE_TO_DARUNIA_IN_FIRE_TEMPLE);
|
||||
Actor_Kill(actor);
|
||||
}
|
||||
@ -957,63 +957,63 @@ void TimeSaverOnActorInitHandler(void* actorRef) {
|
||||
void TimeSaverOnSceneInitHandler(int16_t sceneNum) {
|
||||
switch (sceneNum) {
|
||||
case SCENE_HYRULE_CASTLE:
|
||||
if (CVarGetInteger("gTimeSavers.SkipMiscInteractions", IS_RANDO) && !Flags_GetInfTable(INFTABLE_ENTERED_HYRULE_CASTLE)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipMiscInteractions"), IS_RANDO) && !Flags_GetInfTable(INFTABLE_ENTERED_HYRULE_CASTLE)) {
|
||||
Flags_SetInfTable(INFTABLE_ENTERED_HYRULE_CASTLE);
|
||||
Flags_SetInfTable(INFTABLE_MET_CHILD_MALON_AT_CASTLE_OR_MARKET);
|
||||
Flags_SetEventChkInf(EVENTCHKINF_SPOKE_TO_CHILD_MALON_AT_CASTLE_OR_MARKET);
|
||||
}
|
||||
break;
|
||||
case SCENE_LON_LON_RANCH:
|
||||
if (CVarGetInteger("gTimeSavers.SkipMiscInteractions", IS_RANDO) && GameInteractor_Should(VB_MALON_RETURN_FROM_CASTLE, Flags_GetEventChkInf(EVENTCHKINF_TALON_RETURNED_FROM_CASTLE), NULL)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipMiscInteractions"), IS_RANDO) && GameInteractor_Should(VB_MALON_RETURN_FROM_CASTLE, Flags_GetEventChkInf(EVENTCHKINF_TALON_RETURNED_FROM_CASTLE), NULL)) {
|
||||
Flags_SetEventChkInf(EVENTCHKINF_SPOKE_TO_CHILD_MALON_AT_RANCH);
|
||||
Flags_SetInfTable(INFTABLE_CHILD_MALON_SAID_EPONA_WAS_AFRAID_OF_YOU);
|
||||
Flags_SetEventChkInf(EVENTCHKINF_INVITED_TO_SING_WITH_CHILD_MALON);
|
||||
}
|
||||
break;
|
||||
case SCENE_DEKU_TREE_BOSS:
|
||||
if (CVarGetInteger("gTimeSavers.SkipCutscene.BossIntro", IS_RANDO)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.BossIntro"), IS_RANDO)) {
|
||||
if (!Flags_GetEventChkInf(EVENTCHKINF_BEGAN_GOHMA_BATTLE)) {
|
||||
Flags_SetEventChkInf(EVENTCHKINF_BEGAN_GOHMA_BATTLE);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SCENE_DODONGOS_CAVERN_BOSS:
|
||||
if (CVarGetInteger("gTimeSavers.SkipCutscene.BossIntro", IS_RANDO)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.BossIntro"), IS_RANDO)) {
|
||||
if (!Flags_GetEventChkInf(EVENTCHKINF_BEGAN_KING_DODONGO_BATTLE)) {
|
||||
Flags_SetEventChkInf(EVENTCHKINF_BEGAN_KING_DODONGO_BATTLE);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SCENE_JABU_JABU_BOSS:
|
||||
if (CVarGetInteger("gTimeSavers.SkipCutscene.BossIntro", IS_RANDO)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.BossIntro"), IS_RANDO)) {
|
||||
if (!Flags_GetEventChkInf(EVENTCHKINF_BEGAN_BARINA_BATTLE)) {
|
||||
Flags_SetEventChkInf(EVENTCHKINF_BEGAN_BARINA_BATTLE);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SCENE_FOREST_TEMPLE_BOSS:
|
||||
if (CVarGetInteger("gTimeSavers.SkipCutscene.BossIntro", IS_RANDO)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.BossIntro"), IS_RANDO)) {
|
||||
if (!Flags_GetEventChkInf(EVENTCHKINF_BEGAN_PHANTOM_GANON_BATTLE)) {
|
||||
Flags_SetEventChkInf(EVENTCHKINF_BEGAN_PHANTOM_GANON_BATTLE);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SCENE_FIRE_TEMPLE_BOSS:
|
||||
if (CVarGetInteger("gTimeSavers.SkipCutscene.BossIntro", IS_RANDO)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.BossIntro"), IS_RANDO)) {
|
||||
if (!Flags_GetEventChkInf(EVENTCHKINF_BEGAN_VOLVAGIA_BATTLE)) {
|
||||
Flags_SetEventChkInf(EVENTCHKINF_BEGAN_VOLVAGIA_BATTLE);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SCENE_WATER_TEMPLE_BOSS:
|
||||
if (CVarGetInteger("gTimeSavers.SkipCutscene.BossIntro", IS_RANDO)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.BossIntro"), IS_RANDO)) {
|
||||
if (!Flags_GetEventChkInf(EVENTCHKINF_BEGAN_MORPHA_BATTLE)) {
|
||||
Flags_SetEventChkInf(EVENTCHKINF_BEGAN_MORPHA_BATTLE);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SCENE_SPIRIT_TEMPLE_BOSS:
|
||||
if (CVarGetInteger("gTimeSavers.SkipCutscene.BossIntro", IS_RANDO)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.BossIntro"), IS_RANDO)) {
|
||||
if (!Flags_GetEventChkInf(EVENTCHKINF_BEGAN_TWINROVA_BATTLE)) {
|
||||
Flags_SetEventChkInf(EVENTCHKINF_BEGAN_TWINROVA_BATTLE);
|
||||
Flags_SetEventChkInf(EVENTCHKINF_BEGAN_NABOORU_BATTLE);
|
||||
@ -1022,7 +1022,7 @@ void TimeSaverOnSceneInitHandler(int16_t sceneNum) {
|
||||
}
|
||||
break;
|
||||
case SCENE_SHADOW_TEMPLE_BOSS:
|
||||
if (CVarGetInteger("gTimeSavers.SkipCutscene.BossIntro", IS_RANDO)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.BossIntro"), IS_RANDO)) {
|
||||
if (!Flags_GetEventChkInf(EVENTCHKINF_BEGAN_BONGO_BONGO_BATTLE)) {
|
||||
Flags_SetEventChkInf(EVENTCHKINF_BEGAN_BONGO_BONGO_BATTLE);
|
||||
}
|
||||
@ -1034,7 +1034,7 @@ void TimeSaverOnSceneInitHandler(int16_t sceneNum) {
|
||||
static GetItemEntry vanillaQueuedItemEntry = GET_ITEM_NONE;
|
||||
|
||||
void TimeSaverOnFlagSetHandler(int16_t flagType, int16_t flag) {
|
||||
if (!CVarGetInteger("gTimeSavers.SkipCutscene.Story", IS_RANDO)) return;
|
||||
if (!CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Story"), IS_RANDO)) return;
|
||||
|
||||
switch (flagType) {
|
||||
case FLAG_EVENT_CHECK_INF:
|
||||
|
@ -92,7 +92,7 @@ std::string GetParameritizedText(std::string key, TextBank bank, const char* arg
|
||||
}
|
||||
|
||||
const char* GetLanguageCode() {
|
||||
switch (CVarGetInteger("gLanguages", 0)) {
|
||||
switch (CVarGetInteger(CVAR_SETTING("Languages"), 0)) {
|
||||
case LANGUAGE_FRA:
|
||||
return "fr-FR";
|
||||
break;
|
||||
@ -116,7 +116,7 @@ static std::string titleCardText;
|
||||
|
||||
void RegisterOnSceneInitHook() {
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnSceneInit>([](int16_t sceneNum) {
|
||||
if (!CVarGetInteger("gA11yTTS", 0)) return;
|
||||
if (!CVarGetInteger(CVAR_SETTING("A11yTTS"), 0)) return;
|
||||
|
||||
titleCardText = NameForSceneId(sceneNum);
|
||||
});
|
||||
@ -124,7 +124,7 @@ void RegisterOnSceneInitHook() {
|
||||
|
||||
void RegisterOnPresentTitleCardHook() {
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnPresentTitleCard>([]() {
|
||||
if (!CVarGetInteger("gA11yTTS", 0)) return;
|
||||
if (!CVarGetInteger(CVAR_SETTING("A11yTTS"), 0)) return;
|
||||
|
||||
SpeechSynthesizer::Instance->Speak(titleCardText.c_str(), GetLanguageCode());
|
||||
});
|
||||
@ -134,7 +134,7 @@ void RegisterOnPresentTitleCardHook() {
|
||||
|
||||
void RegisterOnInterfaceUpdateHook() {
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnInterfaceUpdate>([]() {
|
||||
if (!CVarGetInteger("gA11yTTS", 0)) return;
|
||||
if (!CVarGetInteger(CVAR_SETTING("A11yTTS"), 0)) return;
|
||||
|
||||
static uint32_t prevTimer = 0;
|
||||
static char ttsAnnounceBuf[32];
|
||||
@ -193,7 +193,7 @@ void RegisterOnInterfaceUpdateHook() {
|
||||
|
||||
void RegisterOnKaleidoscopeUpdateHook() {
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnKaleidoscopeUpdate>([](int16_t inDungeonScene) {
|
||||
if (!CVarGetInteger("gA11yTTS", 0)) return;
|
||||
if (!CVarGetInteger(CVAR_SETTING("A11yTTS"), 0)) return;
|
||||
|
||||
static int16_t prevCursorIndex = 0;
|
||||
static uint16_t prevCursorSpecialPos = 0;
|
||||
@ -550,14 +550,14 @@ void RegisterOnKaleidoscopeUpdateHook() {
|
||||
|
||||
void RegisterOnUpdateMainMenuSelection() {
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnPresentFileSelect>([]() {
|
||||
if (!CVarGetInteger("gA11yTTS", 0)) return;
|
||||
if (!CVarGetInteger(CVAR_SETTING("A11yTTS"), 0)) return;
|
||||
|
||||
auto translation = GetParameritizedText("file1", TEXT_BANK_FILECHOOSE, nullptr);
|
||||
SpeechSynthesizer::Instance->Speak(translation.c_str(), GetLanguageCode());
|
||||
});
|
||||
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnUpdateFileSelectSelection>([](uint16_t optionIndex) {
|
||||
if (!CVarGetInteger("gA11yTTS", 0)) return;
|
||||
if (!CVarGetInteger(CVAR_SETTING("A11yTTS"), 0)) return;
|
||||
|
||||
switch (optionIndex) {
|
||||
case FS_BTN_MAIN_FILE_1: {
|
||||
@ -596,7 +596,7 @@ void RegisterOnUpdateMainMenuSelection() {
|
||||
});
|
||||
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnUpdateFileSelectConfirmationSelection>([](uint16_t optionIndex) {
|
||||
if (!CVarGetInteger("gA11yTTS", 0)) return;
|
||||
if (!CVarGetInteger(CVAR_SETTING("A11yTTS"), 0)) return;
|
||||
|
||||
switch (optionIndex) {
|
||||
case FS_BTN_CONFIRM_YES: {
|
||||
@ -615,7 +615,7 @@ void RegisterOnUpdateMainMenuSelection() {
|
||||
});
|
||||
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnUpdateFileCopySelection>([](uint16_t optionIndex) {
|
||||
if (!CVarGetInteger("gA11yTTS", 0)) return;
|
||||
if (!CVarGetInteger(CVAR_SETTING("A11yTTS"), 0)) return;
|
||||
|
||||
switch (optionIndex) {
|
||||
case FS_BTN_COPY_FILE_1: {
|
||||
@ -644,7 +644,7 @@ void RegisterOnUpdateMainMenuSelection() {
|
||||
});
|
||||
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnUpdateFileCopyConfirmationSelection>([](uint16_t optionIndex) {
|
||||
if (!CVarGetInteger("gA11yTTS", 0)) return;
|
||||
if (!CVarGetInteger(CVAR_SETTING("A11yTTS"), 0)) return;
|
||||
|
||||
switch (optionIndex) {
|
||||
case FS_BTN_CONFIRM_YES: {
|
||||
@ -663,7 +663,7 @@ void RegisterOnUpdateMainMenuSelection() {
|
||||
});
|
||||
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnUpdateFileEraseSelection>([](uint16_t optionIndex) {
|
||||
if (!CVarGetInteger("gA11yTTS", 0)) return;
|
||||
if (!CVarGetInteger(CVAR_SETTING("A11yTTS"), 0)) return;
|
||||
|
||||
switch (optionIndex) {
|
||||
case FS_BTN_ERASE_FILE_1: {
|
||||
@ -692,7 +692,7 @@ void RegisterOnUpdateMainMenuSelection() {
|
||||
});
|
||||
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnUpdateFileEraseConfirmationSelection>([](uint16_t optionIndex) {
|
||||
if (!CVarGetInteger("gA11yTTS", 0)) return;
|
||||
if (!CVarGetInteger(CVAR_SETTING("A11yTTS"), 0)) return;
|
||||
|
||||
switch (optionIndex) {
|
||||
case FS_BTN_CONFIRM_YES: {
|
||||
@ -711,7 +711,7 @@ void RegisterOnUpdateMainMenuSelection() {
|
||||
});
|
||||
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnUpdateFileAudioSelection>([](uint8_t optionIndex) {
|
||||
if (!CVarGetInteger("gA11yTTS", 0)) return;
|
||||
if (!CVarGetInteger(CVAR_SETTING("A11yTTS"), 0)) return;
|
||||
|
||||
switch (optionIndex) {
|
||||
case FS_AUDIO_STEREO: {
|
||||
@ -740,7 +740,7 @@ void RegisterOnUpdateMainMenuSelection() {
|
||||
});
|
||||
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnUpdateFileTargetSelection>([](uint8_t optionIndex) {
|
||||
if (!CVarGetInteger("gA11yTTS", 0)) return;
|
||||
if (!CVarGetInteger(CVAR_SETTING("A11yTTS"), 0)) return;
|
||||
|
||||
switch (optionIndex) {
|
||||
case FS_TARGET_SWITCH: {
|
||||
@ -759,7 +759,7 @@ void RegisterOnUpdateMainMenuSelection() {
|
||||
});
|
||||
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnUpdateFileLanguageSelection>([](uint8_t optionIndex) {
|
||||
if (!CVarGetInteger("gA11yTTS", 0)) return;
|
||||
if (!CVarGetInteger(CVAR_SETTING("A11yTTS"), 0)) return;
|
||||
|
||||
switch (optionIndex) {
|
||||
case LANGUAGE_ENG: {
|
||||
@ -783,7 +783,7 @@ void RegisterOnUpdateMainMenuSelection() {
|
||||
});
|
||||
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnUpdateFileQuestSelection>([](uint8_t questIndex) {
|
||||
if (!CVarGetInteger("gA11yTTS", 0)) return;
|
||||
if (!CVarGetInteger(CVAR_SETTING("A11yTTS"), 0)) return;
|
||||
|
||||
switch (questIndex) {
|
||||
case QUEST_NORMAL: {
|
||||
@ -812,7 +812,7 @@ void RegisterOnUpdateMainMenuSelection() {
|
||||
});
|
||||
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnUpdateFileBossRushOptionSelection>([](uint8_t optionIndex, uint8_t optionValue) {
|
||||
if (!CVarGetInteger("gA11yTTS", 0)) return;
|
||||
if (!CVarGetInteger(CVAR_SETTING("A11yTTS"), 0)) return;
|
||||
|
||||
auto optionName = BossRush_GetSettingName(optionIndex, gSaveContext.language);
|
||||
auto optionValueName = BossRush_GetSettingChoiceName(optionIndex, optionValue, gSaveContext.language);
|
||||
@ -821,7 +821,7 @@ void RegisterOnUpdateMainMenuSelection() {
|
||||
});
|
||||
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnUpdateFileNameSelection>([](int16_t charCode) {
|
||||
if (!CVarGetInteger("gA11yTTS", 0)) return;
|
||||
if (!CVarGetInteger(CVAR_SETTING("A11yTTS"), 0)) return;
|
||||
|
||||
char charVal[2];
|
||||
std::string translation;
|
||||
@ -958,7 +958,7 @@ std::string Message_TTS_Decode(uint8_t* sourceBuf, uint16_t startOfset, uint16_t
|
||||
|
||||
void RegisterOnDialogMessageHook() {
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnDialogMessage>([]() {
|
||||
if (!CVarGetInteger("gA11yTTS", 0)) return;
|
||||
if (!CVarGetInteger(CVAR_SETTING("A11yTTS"), 0)) return;
|
||||
|
||||
MessageContext *msgCtx = &gPlayState->msgCtx;
|
||||
|
||||
@ -1030,7 +1030,7 @@ void RegisterOnDialogMessageHook() {
|
||||
|
||||
void InitTTSBank() {
|
||||
std::string languageSuffix = "_eng.json";
|
||||
switch (CVarGetInteger("gLanguages", 0)) {
|
||||
switch (CVarGetInteger(CVAR_SETTING("Languages"), 0)) {
|
||||
case LANGUAGE_FRA:
|
||||
languageSuffix = "_fra.json";
|
||||
break;
|
||||
@ -1039,22 +1039,22 @@ void InitTTSBank() {
|
||||
break;
|
||||
}
|
||||
|
||||
auto initData = std::make_shared<LUS::ResourceInitData>();
|
||||
auto initData = std::make_shared<Ship::ResourceInitData>();
|
||||
initData->Format = RESOURCE_FORMAT_BINARY;
|
||||
initData->Type = static_cast<uint32_t>(LUS::ResourceType::Json);
|
||||
initData->Type = static_cast<uint32_t>(Ship::ResourceType::Json);
|
||||
initData->ResourceVersion = 0;
|
||||
|
||||
sceneMap = std::static_pointer_cast<LUS::Json>(
|
||||
LUS::Context::GetInstance()->GetResourceManager()->LoadResource("accessibility/texts/scenes" + languageSuffix, true, initData))->Data;
|
||||
sceneMap = std::static_pointer_cast<Ship::Json>(
|
||||
Ship::Context::GetInstance()->GetResourceManager()->LoadResource("accessibility/texts/scenes" + languageSuffix, true, initData))->Data;
|
||||
|
||||
miscMap = std::static_pointer_cast<LUS::Json>(
|
||||
LUS::Context::GetInstance()->GetResourceManager()->LoadResource("accessibility/texts/misc" + languageSuffix, true, initData))->Data;
|
||||
miscMap = std::static_pointer_cast<Ship::Json>(
|
||||
Ship::Context::GetInstance()->GetResourceManager()->LoadResource("accessibility/texts/misc" + languageSuffix, true, initData))->Data;
|
||||
|
||||
kaleidoMap = std::static_pointer_cast<LUS::Json>(
|
||||
LUS::Context::GetInstance()->GetResourceManager()->LoadResource("accessibility/texts/kaleidoscope" + languageSuffix, true, initData))->Data;
|
||||
kaleidoMap = std::static_pointer_cast<Ship::Json>(
|
||||
Ship::Context::GetInstance()->GetResourceManager()->LoadResource("accessibility/texts/kaleidoscope" + languageSuffix, true, initData))->Data;
|
||||
|
||||
fileChooseMap = std::static_pointer_cast<LUS::Json>(
|
||||
LUS::Context::GetInstance()->GetResourceManager()->LoadResource("accessibility/texts/filechoose" + languageSuffix, true, initData))->Data;
|
||||
fileChooseMap = std::static_pointer_cast<Ship::Json>(
|
||||
Ship::Context::GetInstance()->GetResourceManager()->LoadResource("accessibility/texts/filechoose" + languageSuffix, true, initData))->Data;
|
||||
}
|
||||
|
||||
void RegisterOnSetGameLanguageHook() {
|
||||
|
@ -6,7 +6,7 @@
|
||||
#endif
|
||||
#include "Extract.h"
|
||||
#include "portable-file-dialogs.h"
|
||||
#include <Utils/BitConverter.h>
|
||||
#include <utils/binarytools/BitConverter.h>
|
||||
#include "variables.h"
|
||||
|
||||
#ifdef unix
|
||||
|
@ -22,11 +22,6 @@
|
||||
#include <time.h>
|
||||
#endif
|
||||
#include <Array.h>
|
||||
#include <stb/stb_image.h>
|
||||
#define DRMP3_IMPLEMENTATION
|
||||
#include <dr_libs/mp3.h>
|
||||
#define DRWAV_IMPLEMENTATION
|
||||
#include <dr_libs/wav.h>
|
||||
#include <AudioPlayer.h>
|
||||
#include "Enhancements/speechsynthesizer/SpeechSynthesizer.h"
|
||||
#include "Enhancements/controls/SohInputEditorWindow.h"
|
||||
@ -49,7 +44,7 @@
|
||||
#include "z64.h"
|
||||
#include "macros.h"
|
||||
#include "Fonts.h"
|
||||
#include <Utils/StringHelper.h>
|
||||
#include <utils/StringHelper.h>
|
||||
#include "Enhancements/custom-message/CustomMessageManager.h"
|
||||
#include "Enhancements/presets.h"
|
||||
#include "util.h"
|
||||
@ -94,6 +89,12 @@ GameInteractorSail* GameInteractorSail::Instance;
|
||||
#include <libultraship/libultraship.h>
|
||||
|
||||
// Resource Types/Factories
|
||||
#include "resource/type/Array.h"
|
||||
#include "resource/type/Blob.h"
|
||||
#include "resource/type/DisplayList.h"
|
||||
#include "resource/type/Matrix.h"
|
||||
#include "resource/type/Texture.h"
|
||||
#include "resource/type/Vertex.h"
|
||||
#include "soh/resource/type/SohResourceType.h"
|
||||
#include "soh/resource/type/Animation.h"
|
||||
#include "soh/resource/type/AudioSample.h"
|
||||
@ -107,6 +108,12 @@ GameInteractorSail* GameInteractorSail::Instance;
|
||||
#include "soh/resource/type/Skeleton.h"
|
||||
#include "soh/resource/type/SkeletonLimb.h"
|
||||
#include "soh/resource/type/Text.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 "soh/resource/importer/AnimationFactory.h"
|
||||
#include "soh/resource/importer/AudioSampleFactory.h"
|
||||
#include "soh/resource/importer/AudioSequenceFactory.h"
|
||||
@ -254,19 +261,19 @@ const char* constCameraStrings[] = {
|
||||
|
||||
OTRGlobals::OTRGlobals() {
|
||||
std::vector<std::string> OTRFiles;
|
||||
std::string mqPath = LUS::Context::LocateFileAcrossAppDirs("oot-mq.otr", appShortName);
|
||||
std::string mqPath = Ship::Context::LocateFileAcrossAppDirs("oot-mq.otr", appShortName);
|
||||
if (std::filesystem::exists(mqPath)) {
|
||||
OTRFiles.push_back(mqPath);
|
||||
}
|
||||
std::string ootPath = LUS::Context::LocateFileAcrossAppDirs("oot.otr", appShortName);
|
||||
std::string ootPath = Ship::Context::LocateFileAcrossAppDirs("oot.otr", appShortName);
|
||||
if (std::filesystem::exists(ootPath)) {
|
||||
OTRFiles.push_back(ootPath);
|
||||
}
|
||||
std::string sohOtrPath = LUS::Context::GetPathRelativeToAppBundle("soh.otr");
|
||||
std::string sohOtrPath = Ship::Context::GetPathRelativeToAppBundle("soh.otr");
|
||||
if (std::filesystem::exists(sohOtrPath)) {
|
||||
OTRFiles.push_back(sohOtrPath);
|
||||
}
|
||||
std::string patchesPath = LUS::Context::LocateFileAcrossAppDirs("mods", appShortName);
|
||||
std::string patchesPath = Ship::Context::LocateFileAcrossAppDirs("mods", appShortName);
|
||||
std::vector<std::string> patchOTRs = {};
|
||||
if (patchesPath.length() > 0 && std::filesystem::exists(patchesPath)) {
|
||||
if (std::filesystem::is_directory(patchesPath)) {
|
||||
@ -308,7 +315,7 @@ OTRGlobals::OTRGlobals() {
|
||||
OOT_PAL_GC_DBG2
|
||||
};
|
||||
|
||||
context = LUS::Context::CreateUninitializedInstance("Ship of Harkinian", appShortName, "shipofharkinian.json");
|
||||
context = Ship::Context::CreateUninitializedInstance("Ship of Harkinian", appShortName, "shipofharkinian.json");
|
||||
|
||||
context->InitLogging();
|
||||
context->InitGfxDebugger();
|
||||
@ -324,16 +331,32 @@ OTRGlobals::OTRGlobals() {
|
||||
context->InitCrashHandler();
|
||||
context->InitConsole();
|
||||
|
||||
auto sohInputEditorWindow = std::make_shared<SohInputEditorWindow>("gControllerConfigurationEnabled", "Input Editor");
|
||||
context->InitWindow(sohInputEditorWindow);
|
||||
auto sohInputEditorWindow = std::make_shared<SohInputEditorWindow>(CVAR_CONTROLLER_CONFIGURATION_WINDOW_OPEN, "Input Editor");
|
||||
context->InitWindow({ sohInputEditorWindow });
|
||||
|
||||
auto overlay = context->GetInstance()->GetWindow()->GetGui()->GetGameOverlay();
|
||||
overlay->LoadFont("Press Start 2P", "fonts/PressStart2P-Regular.ttf", 12.0f);
|
||||
overlay->LoadFont("Fipps", "fonts/Fipps-Regular.otf", 32.0f);
|
||||
overlay->SetCurrentFont(CVarGetString(CVAR_GAME_OVERLAY_FONT, "Press Start 2P"));
|
||||
|
||||
context->InitAudio();
|
||||
|
||||
SPDLOG_INFO("Starting Ship of Harkinian version {}", (char*)gBuildVersion);
|
||||
|
||||
auto loader = context->GetResourceManager()->GetResourceLoader();
|
||||
loader->RegisterResourceFactory(std::make_shared<LUS::ResourceFactoryBinaryTextureV0>(), RESOURCE_FORMAT_BINARY, "Texture", static_cast<uint32_t>(LUS::ResourceType::Texture), 0);
|
||||
loader->RegisterResourceFactory(std::make_shared<LUS::ResourceFactoryBinaryTextureV1>(), RESOURCE_FORMAT_BINARY, "Texture", static_cast<uint32_t>(LUS::ResourceType::Texture), 1);
|
||||
loader->RegisterResourceFactory(std::make_shared<LUS::ResourceFactoryBinaryVertexV0>(), RESOURCE_FORMAT_BINARY, "Vertex", static_cast<uint32_t>(LUS::ResourceType::Vertex), 0);
|
||||
loader->RegisterResourceFactory(std::make_shared<LUS::ResourceFactoryXMLVertexV0>(), RESOURCE_FORMAT_XML, "Vertex", static_cast<uint32_t>(LUS::ResourceType::Vertex), 0);
|
||||
loader->RegisterResourceFactory(std::make_shared<LUS::ResourceFactoryBinaryDisplayListV0>(), RESOURCE_FORMAT_BINARY, "DisplayList", static_cast<uint32_t>(LUS::ResourceType::DisplayList), 0);
|
||||
loader->RegisterResourceFactory(std::make_shared<LUS::ResourceFactoryXMLDisplayListV0>(), RESOURCE_FORMAT_XML, "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::ResourceFactoryBinaryAnimationV0>(), RESOURCE_FORMAT_BINARY, "Animation", static_cast<uint32_t>(SOH::ResourceType::SOH_Animation), 0);
|
||||
loader->RegisterResourceFactory(std::make_shared<SOH::ResourceFactoryBinaryPlayerAnimationV0>(), RESOURCE_FORMAT_BINARY, "PlayerAnimation", static_cast<uint32_t>(SOH::ResourceType::SOH_PlayerAnimation), 0);
|
||||
loader->RegisterResourceFactory(std::make_shared<SOH::ResourceFactoryBinarySceneV0>(), RESOURCE_FORMAT_BINARY, "Room", static_cast<uint32_t>(SOH::ResourceType::SOH_Room), 0); // Is room scene? maybe?
|
||||
loader->RegisterResourceFactory(std::make_shared<SOH::ResourceFactoryXMLSceneV0>(), RESOURCE_FORMAT_XML, "Room", static_cast<uint32_t>(SOH::ResourceType::SOH_Room), 0); // Is room scene? maybe?
|
||||
loader->RegisterResourceFactory(std::make_shared<SOH::ResourceFactoryBinaryCollisionHeaderV0>(), RESOURCE_FORMAT_BINARY, "CollisionHeader", static_cast<uint32_t>(SOH::ResourceType::SOH_CollisionHeader), 0);
|
||||
loader->RegisterResourceFactory(std::make_shared<SOH::ResourceFactoryXMLCollisionHeaderV0>(), RESOURCE_FORMAT_XML, "CollisionHeader", static_cast<uint32_t>(SOH::ResourceType::SOH_CollisionHeader), 0);
|
||||
loader->RegisterResourceFactory(std::make_shared<SOH::ResourceFactoryBinarySkeletonV0>(), RESOURCE_FORMAT_BINARY, "Skeleton", static_cast<uint32_t>(SOH::ResourceType::SOH_Skeleton), 0);
|
||||
@ -382,7 +405,7 @@ OTRGlobals::OTRGlobals() {
|
||||
#if defined(__SWITCH__)
|
||||
SPDLOG_ERROR("Invalid OTR File!");
|
||||
#elif defined(__WIIU__)
|
||||
LUS::WiiU::ThrowInvalidOTR();
|
||||
Ship::WiiU::ThrowInvalidOTR();
|
||||
#else
|
||||
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Invalid OTR File",
|
||||
"Attempted to load an invalid OTR file. Try regenerating.", nullptr);
|
||||
@ -420,7 +443,7 @@ OTRGlobals::~OTRGlobals() {
|
||||
}
|
||||
|
||||
void OTRGlobals::ScaleImGui() {
|
||||
float scale = imguiScaleOptionToValue[CVarGetInteger("gImGuiScale", defaultImGuiScale)];
|
||||
float scale = imguiScaleOptionToValue[CVarGetInteger(CVAR_SETTING("ImGuiScale"), defaultImGuiScale)];
|
||||
float newScale = scale / previousImGuiScale;
|
||||
ImGui::GetStyle().ScaleAllSizes(newScale);
|
||||
ImGui::GetIO().FontGlobalScale = scale;
|
||||
@ -454,15 +477,15 @@ bool OTRGlobals::HasOriginal() {
|
||||
}
|
||||
|
||||
uint32_t OTRGlobals::GetInterpolationFPS() {
|
||||
if (LUS::Context::GetInstance()->GetWindow()->GetWindowBackend() == LUS::WindowBackend::DX11) {
|
||||
return CVarGetInteger("gInterpolationFPS", 20);
|
||||
if (Ship::Context::GetInstance()->GetWindow()->GetWindowBackend() == Ship::WindowBackend::DX11) {
|
||||
return CVarGetInteger(CVAR_SETTING("InterpolationFPS"), 20);
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gMatchRefreshRate", 0)) {
|
||||
return LUS::Context::GetInstance()->GetWindow()->GetCurrentRefreshRate();
|
||||
if (CVarGetInteger(CVAR_SETTING("MatchRefreshRate"), 0)) {
|
||||
return Ship::Context::GetInstance()->GetWindow()->GetCurrentRefreshRate();
|
||||
}
|
||||
|
||||
return std::min<uint32_t>(LUS::Context::GetInstance()->GetWindow()->GetCurrentRefreshRate(), CVarGetInteger("gInterpolationFPS", 20));
|
||||
return std::min<uint32_t>(Ship::Context::GetInstance()->GetWindow()->GetCurrentRefreshRate(), CVarGetInteger(CVAR_SETTING("InterpolationFPS"), 20));
|
||||
}
|
||||
|
||||
struct ExtensionEntry {
|
||||
@ -857,7 +880,7 @@ extern "C" RandomizerGet RetrieveRandomizerGetFromItemID(ItemID itemID) {
|
||||
}
|
||||
|
||||
extern "C" void OTRExtScanner() {
|
||||
auto lst = *LUS::Context::GetInstance()->GetResourceManager()->GetArchiveManager()->ListFiles().get();
|
||||
auto lst = *Ship::Context::GetInstance()->GetResourceManager()->GetArchiveManager()->ListFiles().get();
|
||||
|
||||
for (auto& rPath : lst) {
|
||||
std::vector<std::string> raw = StringHelper::Split(rPath, ".");
|
||||
@ -880,13 +903,13 @@ OTRVersion ReadPortVersionFromOTR(std::string otrPath) {
|
||||
OTRVersion version = {};
|
||||
|
||||
// Use a temporary archive instance to load the otr and read the version file
|
||||
auto archive = LUS::OtrArchive(otrPath);
|
||||
auto archive = Ship::OtrArchive(otrPath);
|
||||
if (archive.Open()) {
|
||||
auto t = archive.LoadFile("portVersion", std::make_shared<LUS::ResourceInitData>());
|
||||
auto t = archive.LoadFile("portVersion", std::make_shared<Ship::ResourceInitData>());
|
||||
if (t != nullptr && t->IsLoaded) {
|
||||
auto stream = std::make_shared<LUS::MemoryStream>(t->Buffer->data(), t->Buffer->size());
|
||||
auto reader = std::make_shared<LUS::BinaryReader>(stream);
|
||||
LUS::Endianness endianness = (LUS::Endianness)reader->ReadUByte();
|
||||
auto stream = std::make_shared<Ship::MemoryStream>(t->Buffer->data(), t->Buffer->size());
|
||||
auto reader = std::make_shared<Ship::BinaryReader>(stream);
|
||||
Ship::Endianness endianness = (Ship::Endianness)reader->ReadUByte();
|
||||
reader->SetEndianness(endianness);
|
||||
version.major = reader->ReadUInt16();
|
||||
version.minor = reader->ReadUInt16();
|
||||
@ -917,7 +940,7 @@ void CheckSoHOTRVersion(std::string otrPath) {
|
||||
Extractor::ShowErrorBox("soh.otr file is missing", msg.c_str());
|
||||
exit(1);
|
||||
#elif defined(__SWITCH__)
|
||||
LUS::Switch::PrintErrorMessageToScreen(("\x1b[2;2HYou are missing the soh.otr file." + msg).c_str());
|
||||
Ship::Switch::PrintErrorMessageToScreen(("\x1b[2;2HYou are missing the soh.otr file." + msg).c_str());
|
||||
#elif defined(__WIIU__)
|
||||
OSFatal(("You are missing the soh.otr file\n\n" + msg).c_str());
|
||||
#endif
|
||||
@ -930,7 +953,7 @@ void CheckSoHOTRVersion(std::string otrPath) {
|
||||
Extractor::ShowErrorBox("soh.otr file version does not match", msg.c_str());
|
||||
exit(1);
|
||||
#elif defined(__SWITCH__)
|
||||
LUS::Switch::PrintErrorMessageToScreen(("\x1b[2;2HYou have an old soh.otr file." + msg).c_str());
|
||||
Ship::Switch::PrintErrorMessageToScreen(("\x1b[2;2HYou have an old soh.otr file." + msg).c_str());
|
||||
#elif defined(__WIIU__)
|
||||
OSFatal(("You have an old soh.otr file\n\n" + msg).c_str());
|
||||
#endif
|
||||
@ -941,7 +964,7 @@ void CheckSoHOTRVersion(std::string otrPath) {
|
||||
// For Windows/Mac/Linux if the version doesn't match, offer to
|
||||
void DetectOTRVersion(std::string fileName, bool isMQ) {
|
||||
bool isOtrOld = false;
|
||||
std::string otrPath = LUS::Context::LocateFileAcrossAppDirs(fileName, appShortName);
|
||||
std::string otrPath = Ship::Context::LocateFileAcrossAppDirs(fileName, appShortName);
|
||||
|
||||
// Doesn't exist so nothing to do here
|
||||
if (!std::filesystem::exists(otrPath)) {
|
||||
@ -971,7 +994,7 @@ void DetectOTRVersion(std::string fileName, bool isMQ) {
|
||||
fileName.c_str(), version);
|
||||
|
||||
if (Extractor::ShowYesNoBox("Old OTR File Found", msgBuf) == IDYES) {
|
||||
std::string installPath = LUS::Context::GetAppBundlePath();
|
||||
std::string installPath = Ship::Context::GetAppBundlePath();
|
||||
if (!std::filesystem::exists(installPath + "/assets/extractor")) {
|
||||
Extractor::ShowErrorBox("Extractor assets not found",
|
||||
"Unable to regenerate. Missing assets/extractor folder needed to generate OTR file.\n\nExiting...");
|
||||
@ -979,17 +1002,17 @@ void DetectOTRVersion(std::string fileName, bool isMQ) {
|
||||
}
|
||||
|
||||
Extractor extract;
|
||||
if (!extract.Run(LUS::Context::GetAppDirectoryPath(appShortName), isMQ ? RomSearchMode::MQ : RomSearchMode::Vanilla)) {
|
||||
if (!extract.Run(Ship::Context::GetAppDirectoryPath(appShortName), isMQ ? RomSearchMode::MQ : RomSearchMode::Vanilla)) {
|
||||
Extractor::ShowErrorBox("Error", "An error occured, no OTR file was generated.\n\nExiting...");
|
||||
exit(1);
|
||||
}
|
||||
extract.CallZapd(installPath, LUS::Context::GetAppDirectoryPath(appShortName));
|
||||
extract.CallZapd(installPath, Ship::Context::GetAppDirectoryPath(appShortName));
|
||||
} else {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
#elif defined(__SWITCH__)
|
||||
LUS::Switch::PrintErrorMessageToScreen("\x1b[2;2HYou've launched the Ship with an old game OTR file."
|
||||
Ship::Switch::PrintErrorMessageToScreen("\x1b[2;2HYou've launched the Ship with an old game OTR file."
|
||||
"\x1b[4;2HPlease regenerate a new game OTR and relaunch."
|
||||
"\x1b[6;2HPress the Home button to exit...");
|
||||
#elif defined(__WIIU__)
|
||||
@ -1017,9 +1040,9 @@ bool PathTestCleanup(FILE* tfile) {
|
||||
extern "C" void InitOTR() {
|
||||
|
||||
#ifdef __SWITCH__
|
||||
LUS::Switch::Init(LUS::PreInitPhase);
|
||||
Ship::Switch::Init(Ship::PreInitPhase);
|
||||
#elif defined(__WIIU__)
|
||||
LUS::WiiU::Init(appShortName);
|
||||
Ship::WiiU::Init(appShortName);
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
@ -1059,13 +1082,13 @@ extern "C" void InitOTR() {
|
||||
}
|
||||
#endif
|
||||
|
||||
CheckSoHOTRVersion(LUS::Context::GetPathRelativeToAppBundle("soh.otr"));
|
||||
CheckSoHOTRVersion(Ship::Context::GetPathRelativeToAppBundle("soh.otr"));
|
||||
|
||||
if (!std::filesystem::exists(LUS::Context::LocateFileAcrossAppDirs("oot-mq.otr", appShortName)) &&
|
||||
!std::filesystem::exists(LUS::Context::LocateFileAcrossAppDirs("oot.otr", appShortName))){
|
||||
if (!std::filesystem::exists(Ship::Context::LocateFileAcrossAppDirs("oot-mq.otr", appShortName)) &&
|
||||
!std::filesystem::exists(Ship::Context::LocateFileAcrossAppDirs("oot.otr", appShortName))){
|
||||
|
||||
#if not defined(__SWITCH__) && not defined(__WIIU__)
|
||||
std::string installPath = LUS::Context::GetAppBundlePath();
|
||||
std::string installPath = Ship::Context::GetAppBundlePath();
|
||||
if (!std::filesystem::exists(installPath + "/assets/extractor")) {
|
||||
Extractor::ShowErrorBox("Extractor assets not found",
|
||||
"No OTR files found. Missing assets/extractor folder needed to generate OTR file.\n\nExiting...");
|
||||
@ -1075,26 +1098,26 @@ extern "C" void InitOTR() {
|
||||
bool generatedOtrIsMQ = false;
|
||||
if (Extractor::ShowYesNoBox("No OTR Files", "No OTR files found. Generate one now?") == IDYES) {
|
||||
Extractor extract;
|
||||
if (!extract.Run(LUS::Context::GetAppDirectoryPath(appShortName))) {
|
||||
if (!extract.Run(Ship::Context::GetAppDirectoryPath(appShortName))) {
|
||||
Extractor::ShowErrorBox("Error", "An error occured, no OTR file was generated.\n\nExiting...");
|
||||
exit(1);
|
||||
}
|
||||
extract.CallZapd(installPath, LUS::Context::GetAppDirectoryPath(appShortName));
|
||||
extract.CallZapd(installPath, Ship::Context::GetAppDirectoryPath(appShortName));
|
||||
generatedOtrIsMQ = extract.IsMasterQuest();
|
||||
} else {
|
||||
exit(1);
|
||||
}
|
||||
if (Extractor::ShowYesNoBox("Extraction Complete", "ROM Extracted. Extract another?") == IDYES) {
|
||||
Extractor extract;
|
||||
if (!extract.Run(LUS::Context::GetAppDirectoryPath(appShortName), generatedOtrIsMQ ? RomSearchMode::Vanilla : RomSearchMode::MQ)) {
|
||||
if (!extract.Run(Ship::Context::GetAppDirectoryPath(appShortName), generatedOtrIsMQ ? RomSearchMode::Vanilla : RomSearchMode::MQ)) {
|
||||
Extractor::ShowErrorBox("Error", "An error occured, an OTR file may have been generated by a different step.\n\nContinuing...");
|
||||
} else {
|
||||
extract.CallZapd(installPath, LUS::Context::GetAppDirectoryPath(appShortName));
|
||||
extract.CallZapd(installPath, Ship::Context::GetAppDirectoryPath(appShortName));
|
||||
}
|
||||
}
|
||||
|
||||
#elif defined(__SWITCH__)
|
||||
LUS::Switch::PrintErrorMessageToScreen("\x1b[2;2HYou've launched the Ship without a game OTR file."
|
||||
Ship::Switch::PrintErrorMessageToScreen("\x1b[2;2HYou've launched the Ship without a game OTR file."
|
||||
"\x1b[4;2HPlease generate a game OTR and relaunch."
|
||||
"\x1b[6;2HPress the Home button to exit...");
|
||||
#elif defined(__WIIU__)
|
||||
@ -1141,24 +1164,24 @@ extern "C" void InitOTR() {
|
||||
InitMods();
|
||||
ActorDB::AddBuiltInCustomActors();
|
||||
// #region SOH [Randomizer] TODO: Remove these and refactor spoiler file handling for randomizer
|
||||
CVarClear("gRandomizerNewFileDropped");
|
||||
CVarClear("gRandomizerDroppedFile");
|
||||
CVarClear(CVAR_GENERAL("RandomizerNewFileDropped"));
|
||||
CVarClear(CVAR_GENERAL("RandomizerDroppedFile"));
|
||||
// #endregion
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnFileDropped>(SoH_ProcessDroppedFiles);
|
||||
|
||||
time_t now = time(NULL);
|
||||
tm *tm_now = localtime(&now);
|
||||
if (tm_now->tm_mon == 11 && tm_now->tm_mday >= 24 && tm_now->tm_mday <= 25) {
|
||||
CVarRegisterInteger("gLetItSnow", 1);
|
||||
CVarRegisterInteger(CVAR_GENERAL("LetItSnow"), 1);
|
||||
} else {
|
||||
CVarClear("gLetItSnow");
|
||||
CVarClear(CVAR_GENERAL("LetItSnow"));
|
||||
}
|
||||
|
||||
srand(now);
|
||||
#ifdef ENABLE_REMOTE_CONTROL
|
||||
SDLNet_Init();
|
||||
if (CVarGetInteger("gRemote.Enabled", 0)) {
|
||||
switch (CVarGetInteger("gRemote.Scheme", GI_SCHEME_SAIL)) {
|
||||
if (CVarGetInteger(CVAR_REMOTE("Enabled"), 0)) {
|
||||
switch (CVarGetInteger(CVAR_REMOTE("Scheme"), GI_SCHEME_SAIL)) {
|
||||
case GI_SCHEME_SAIL:
|
||||
GameInteractorSail::Instance->Enable();
|
||||
break;
|
||||
@ -1169,9 +1192,9 @@ extern "C" void InitOTR() {
|
||||
}
|
||||
#endif
|
||||
|
||||
std::shared_ptr<LUS::Config> conf = OTRGlobals::Instance->context->GetConfig();
|
||||
conf->RegisterConfigVersionUpdater(std::make_shared<LUS::ConfigVersion1Updater>());
|
||||
conf->RegisterConfigVersionUpdater(std::make_shared<LUS::ConfigVersion2Updater>());
|
||||
std::shared_ptr<Ship::Config> conf = OTRGlobals::Instance->context->GetConfig();
|
||||
conf->RegisterConfigVersionUpdater(std::make_shared<SOH::ConfigVersion1Updater>());
|
||||
conf->RegisterConfigVersionUpdater(std::make_shared<SOH::ConfigVersion2Updater>());
|
||||
conf->RunVersionUpdates();
|
||||
}
|
||||
|
||||
@ -1183,8 +1206,8 @@ extern "C" void DeinitOTR() {
|
||||
SaveManager_ThreadPoolWait();
|
||||
OTRAudio_Exit();
|
||||
#ifdef ENABLE_REMOTE_CONTROL
|
||||
if (CVarGetInteger("gRemote.Enabled", 0)) {
|
||||
switch (CVarGetInteger("gRemote.Scheme", GI_SCHEME_SAIL)) {
|
||||
if (CVarGetInteger(CVAR_REMOTE("Enabled"), 0)) {
|
||||
switch (CVarGetInteger(CVAR_REMOTE("Scheme"), GI_SCHEME_SAIL)) {
|
||||
case GI_SCHEME_SAIL:
|
||||
GameInteractorSail::Instance->Disable();
|
||||
break;
|
||||
@ -1249,14 +1272,14 @@ extern bool ToggleAltAssetsAtEndOfFrame;
|
||||
|
||||
extern "C" void Graph_StartFrame() {
|
||||
#ifndef __WIIU__
|
||||
using LUS::KbScancode;
|
||||
using Ship::KbScancode;
|
||||
int32_t dwScancode = OTRGlobals::Instance->context->GetWindow()->GetLastScancode();
|
||||
OTRGlobals::Instance->context->GetWindow()->SetLastScancode(-1);
|
||||
|
||||
switch (dwScancode) {
|
||||
case KbScancode::LUS_KB_F5: {
|
||||
if (CVarGetInteger("gSaveStatesEnabled", 0) == 0) {
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->GetGameOverlay()->
|
||||
if (CVarGetInteger(CVAR_CHEAT("SaveStatesEnabled"), 0) == 0) {
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->GetGameOverlay()->
|
||||
TextDrawNotification(6.0f, true, "Save states not enabled. Check Cheats Menu.");
|
||||
return;
|
||||
}
|
||||
@ -1277,8 +1300,8 @@ extern "C" void Graph_StartFrame() {
|
||||
break;
|
||||
}
|
||||
case KbScancode::LUS_KB_F6: {
|
||||
if (CVarGetInteger("gSaveStatesEnabled", 0) == 0) {
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->GetGameOverlay()->
|
||||
if (CVarGetInteger(CVAR_CHEAT("SaveStatesEnabled"), 0) == 0) {
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->GetGameOverlay()->
|
||||
TextDrawNotification(6.0f, true, "Save states not enabled. Check Cheats Menu.");
|
||||
return;
|
||||
}
|
||||
@ -1292,8 +1315,8 @@ extern "C" void Graph_StartFrame() {
|
||||
break;
|
||||
}
|
||||
case KbScancode::LUS_KB_F7: {
|
||||
if (CVarGetInteger("gSaveStatesEnabled", 0) == 0) {
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->GetGameOverlay()->
|
||||
if (CVarGetInteger(CVAR_CHEAT("SaveStatesEnabled"), 0) == 0) {
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->GetGameOverlay()->
|
||||
TextDrawNotification(6.0f, true, "Save states not enabled. Check Cheats Menu.");
|
||||
return;
|
||||
}
|
||||
@ -1323,7 +1346,7 @@ extern "C" void Graph_StartFrame() {
|
||||
#if defined(_WIN32) || defined(__APPLE__)
|
||||
case KbScancode::LUS_KB_F9: {
|
||||
// Toggle TTS
|
||||
CVarSetInteger("gA11yTTS", !CVarGetInteger("gA11yTTS", 0));
|
||||
CVarSetInteger(CVAR_SETTING("A11yTTS"), !CVarGetInteger(CVAR_SETTING("A11yTTS"), 0));
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
@ -1334,13 +1357,13 @@ extern "C" void Graph_StartFrame() {
|
||||
}
|
||||
#endif
|
||||
|
||||
if (CVarGetInteger("gNewFileDropped", 0)) {
|
||||
std::string filePath = SohUtils::Sanitize(CVarGetString("gDroppedFile", ""));
|
||||
if (CVarGetInteger(CVAR_NEW_FILE_DROPPED, 0)) {
|
||||
std::string filePath = SohUtils::Sanitize(CVarGetString(CVAR_DROPPED_FILE, ""));
|
||||
if (!filePath.empty()) {
|
||||
GameInteractor::Instance->ExecuteHooks<GameInteractor::OnFileDropped>(filePath);
|
||||
}
|
||||
CVarClear("gNewFileDropped");
|
||||
CVarClear("gDroppedFile");
|
||||
CVarClear(CVAR_NEW_FILE_DROPPED);
|
||||
CVarClear(CVAR_DROPPED_FILE);
|
||||
}
|
||||
|
||||
OTRGlobals::Instance->context->GetWindow()->StartFrame();
|
||||
@ -1393,7 +1416,7 @@ extern "C" void Graph_ProcessGfxCommands(Gfx* commands) {
|
||||
|
||||
OTRGlobals::Instance->context->GetWindow()->SetTargetFps(fps);
|
||||
|
||||
int threshold = CVarGetInteger("gExtraLatencyThreshold", 80);
|
||||
int threshold = CVarGetInteger(CVAR_SETTING("ExtraLatencyThreshold"), 80);
|
||||
OTRGlobals::Instance->context->GetWindow()->SetMaximumFrameLatency(threshold > 0 && target_fps >= threshold ? 2 : 1);
|
||||
|
||||
RunCommands(commands, mtx_replacements);
|
||||
@ -1412,7 +1435,7 @@ extern "C" void Graph_ProcessGfxCommands(Gfx* commands) {
|
||||
ToggleAltAssetsAtEndOfFrame = false;
|
||||
|
||||
// Actually update the CVar now before runing the alt asset update listeners
|
||||
CVarSetInteger("gAltAssets", !CVarGetInteger("gAltAssets", 0));
|
||||
CVarSetInteger(CVAR_ALT_ASSETS, !CVarGetInteger(CVAR_ALT_ASSETS, 0));
|
||||
gfx_texture_cache_clear();
|
||||
SOH::SkeletonPatcher::UpdateSkeletons();
|
||||
GameInteractor::Instance->ExecuteHooks<GameInteractor::OnAssetAltChange>();
|
||||
@ -1435,15 +1458,15 @@ extern "C" uint16_t OTRGetPixelDepth(float x, float y) {
|
||||
}
|
||||
|
||||
extern "C" uint32_t ResourceMgr_GetNumGameVersions() {
|
||||
return LUS::Context::GetInstance()->GetResourceManager()->GetArchiveManager()->GetGameVersions().size();
|
||||
return Ship::Context::GetInstance()->GetResourceManager()->GetArchiveManager()->GetGameVersions().size();
|
||||
}
|
||||
|
||||
extern "C" uint32_t ResourceMgr_GetGameVersion(int index) {
|
||||
return LUS::Context::GetInstance()->GetResourceManager()->GetArchiveManager()->GetGameVersions()[index];
|
||||
return Ship::Context::GetInstance()->GetResourceManager()->GetArchiveManager()->GetGameVersions()[index];
|
||||
}
|
||||
|
||||
extern "C" uint32_t ResourceMgr_GetGamePlatform(int index) {
|
||||
uint32_t version = LUS::Context::GetInstance()->GetResourceManager()->GetArchiveManager()->GetGameVersions()[index];
|
||||
uint32_t version = Ship::Context::GetInstance()->GetResourceManager()->GetArchiveManager()->GetGameVersions()[index];
|
||||
|
||||
switch (version) {
|
||||
case OOT_NTSC_US_10:
|
||||
@ -1466,7 +1489,7 @@ extern "C" uint32_t ResourceMgr_GetGamePlatform(int index) {
|
||||
}
|
||||
|
||||
extern "C" uint32_t ResourceMgr_GetGameRegion(int index) {
|
||||
uint32_t version = LUS::Context::GetInstance()->GetResourceManager()->GetArchiveManager()->GetGameVersions()[index];
|
||||
uint32_t version = Ship::Context::GetInstance()->GetResourceManager()->GetArchiveManager()->GetGameVersions()[index];
|
||||
|
||||
switch (version) {
|
||||
case OOT_NTSC_US_10:
|
||||
@ -1490,7 +1513,7 @@ extern "C" uint32_t ResourceMgr_GetGameRegion(int index) {
|
||||
|
||||
uint32_t IsSceneMasterQuest(s16 sceneNum) {
|
||||
uint32_t value = 0;
|
||||
uint8_t mqMode = CVarGetInteger("gBetterDebugWarpScreenMQMode", WARP_MODE_OVERRIDE_OFF);
|
||||
uint8_t mqMode = CVarGetInteger(CVAR_GENERAL("BetterDebugWarpScreenMQMode"), WARP_MODE_OVERRIDE_OFF);
|
||||
if (mqMode == WARP_MODE_OVERRIDE_MQ_AS_VANILLA) {
|
||||
return 1;
|
||||
} else if (mqMode == WARP_MODE_OVERRIDE_VANILLA_AS_MQ) {
|
||||
@ -1536,10 +1559,10 @@ extern "C" uint32_t ResourceMgr_IsGameMasterQuest() {
|
||||
}
|
||||
|
||||
extern "C" void ResourceMgr_LoadDirectory(const char* resName) {
|
||||
LUS::Context::GetInstance()->GetResourceManager()->LoadDirectory(resName);
|
||||
Ship::Context::GetInstance()->GetResourceManager()->LoadDirectory(resName);
|
||||
}
|
||||
extern "C" void ResourceMgr_DirtyDirectory(const char* resName) {
|
||||
LUS::Context::GetInstance()->GetResourceManager()->DirtyDirectory(resName);
|
||||
Ship::Context::GetInstance()->GetResourceManager()->DirtyDirectory(resName);
|
||||
}
|
||||
|
||||
extern "C" void ResourceMgr_UnloadResource(const char* resName) {
|
||||
@ -1547,13 +1570,13 @@ extern "C" void ResourceMgr_UnloadResource(const char* resName) {
|
||||
if (path.substr(0, 7) == "__OTR__") {
|
||||
path = path.substr(7);
|
||||
}
|
||||
auto res = LUS::Context::GetInstance()->GetResourceManager()->UnloadResource(path);
|
||||
auto res = Ship::Context::GetInstance()->GetResourceManager()->UnloadResource(path);
|
||||
}
|
||||
|
||||
// OTRTODO: There is probably a more elegant way to go about this...
|
||||
// Kenix: This is definitely leaking memory when it's called.
|
||||
extern "C" char** ResourceMgr_ListFiles(const char* searchMask, int* resultSize) {
|
||||
auto lst = LUS::Context::GetInstance()->GetResourceManager()->GetArchiveManager()->ListFiles(searchMask);
|
||||
auto lst = Ship::Context::GetInstance()->GetResourceManager()->GetArchiveManager()->ListFiles(searchMask);
|
||||
char** result = (char**)malloc(lst->size() * sizeof(char*));
|
||||
|
||||
for (size_t i = 0; i < lst->size(); i++) {
|
||||
@ -1592,12 +1615,12 @@ extern "C" uint8_t ResourceMgr_FileAltExists(const char* filePath) {
|
||||
// Unloads a resource if an alternate version exists when alt assets are enabled
|
||||
// The resource is only removed from the internal cache to prevent it from used in the next resource lookup
|
||||
extern "C" void ResourceMgr_UnloadOriginalWhenAltExists(const char* resName) {
|
||||
if (CVarGetInteger("gAltAssets", 0) && ResourceMgr_FileAltExists((char*) resName)) {
|
||||
if (CVarGetInteger(CVAR_ALT_ASSETS, 0) && ResourceMgr_FileAltExists((char*) resName)) {
|
||||
ResourceMgr_UnloadResource((char*) resName);
|
||||
}
|
||||
}
|
||||
|
||||
std::shared_ptr<LUS::IResource> GetResourceByNameHandlingMQ(const char* path) {
|
||||
std::shared_ptr<Ship::IResource> GetResourceByNameHandlingMQ(const char* path) {
|
||||
std::string Path = path;
|
||||
if (ResourceMgr_IsGameMasterQuest()) {
|
||||
size_t pos = 0;
|
||||
@ -1605,7 +1628,7 @@ std::shared_ptr<LUS::IResource> GetResourceByNameHandlingMQ(const char* path) {
|
||||
Path.replace(pos, 7, "/mq/");
|
||||
}
|
||||
}
|
||||
return LUS::Context::GetInstance()->GetResourceManager()->LoadResource(Path.c_str());
|
||||
return Ship::Context::GetInstance()->GetResourceManager()->LoadResource(Path.c_str());
|
||||
}
|
||||
|
||||
extern "C" char* GetResourceDataByNameHandlingMQ(const char* path) {
|
||||
@ -1738,7 +1761,7 @@ std::unordered_map<std::string, std::unordered_map<std::string, GfxPatch>> origi
|
||||
// instead (When that is available). Index can be found using the commented out section below.
|
||||
extern "C" void ResourceMgr_PatchGfxByName(const char* path, const char* patchName, int index, Gfx instruction) {
|
||||
auto res = std::static_pointer_cast<LUS::DisplayList>(
|
||||
LUS::Context::GetInstance()->GetResourceManager()->LoadResource(path));
|
||||
Ship::Context::GetInstance()->GetResourceManager()->LoadResource(path));
|
||||
|
||||
// Leaving this here for people attempting to find the correct Dlist index to patch
|
||||
/*if (strcmp("__OTR__objects/object_gi_longsword/gGiBiggoronSwordDL", path) == 0) {
|
||||
@ -1777,7 +1800,7 @@ extern "C" void ResourceMgr_PatchGfxByName(const char* path, const char* patchNa
|
||||
|
||||
extern "C" void ResourceMgr_PatchGfxCopyCommandByName(const char* path, const char* patchName, int destinationIndex, int sourceIndex) {
|
||||
auto res = std::static_pointer_cast<LUS::DisplayList>(
|
||||
LUS::Context::GetInstance()->GetResourceManager()->LoadResource(path));
|
||||
Ship::Context::GetInstance()->GetResourceManager()->LoadResource(path));
|
||||
|
||||
// Do not patch custom assets as they most likely do not have the same instructions as authentic assets
|
||||
if (res->GetInitData()->IsCustom) {
|
||||
@ -1800,7 +1823,7 @@ extern "C" void ResourceMgr_PatchGfxCopyCommandByName(const char* path, const ch
|
||||
extern "C" void ResourceMgr_UnpatchGfxByName(const char* path, const char* patchName) {
|
||||
if (originalGfx.contains(path) && originalGfx[path].contains(patchName)) {
|
||||
auto res = std::static_pointer_cast<LUS::DisplayList>(
|
||||
LUS::Context::GetInstance()->GetResourceManager()->LoadResource(path));
|
||||
Ship::Context::GetInstance()->GetResourceManager()->LoadResource(path));
|
||||
|
||||
Gfx* gfx = (Gfx*)&res->Instructions[originalGfx[path][patchName].index];
|
||||
*gfx = originalGfx[path][patchName].instruction;
|
||||
@ -1860,7 +1883,7 @@ extern "C" SoundFontSample* ReadCustomSample(const char* path) {
|
||||
|
||||
ExtensionEntry entry = ExtensionCache[path];
|
||||
|
||||
auto sampleRaw = LUS::Context::GetInstance()->GetResourceManager()->LoadFile(entry.path);
|
||||
auto sampleRaw = Ship::Context::GetInstance()->GetResourceManager()->LoadFile(entry.path);
|
||||
uint32_t* strem = (uint32_t*)sampleRaw->Buffer.get();
|
||||
uint8_t* strem2 = (uint8_t*)strem;
|
||||
|
||||
@ -1948,10 +1971,10 @@ extern "C" SkeletonHeader* ResourceMgr_LoadSkeletonByName(const char* path, Skel
|
||||
pathStr = pathStr.substr(sOtr.length());
|
||||
}
|
||||
|
||||
bool isAlt = CVarGetInteger("gAltAssets", 0);
|
||||
bool isAlt = CVarGetInteger(CVAR_ALT_ASSETS, 0);
|
||||
|
||||
if (isAlt) {
|
||||
pathStr = LUS::IResource::gAltAssetPrefix + pathStr;
|
||||
pathStr = Ship::IResource::gAltAssetPrefix + pathStr;
|
||||
}
|
||||
|
||||
SkeletonHeader* skelHeader = (SkeletonHeader*) ResourceGetDataByName(pathStr.c_str());
|
||||
@ -1985,8 +2008,8 @@ extern "C" s32* ResourceMgr_LoadCSByName(const char* path) {
|
||||
return (s32*)GetResourceDataByNameHandlingMQ(path);
|
||||
}
|
||||
|
||||
std::filesystem::path GetSaveFile(std::shared_ptr<LUS::Config> Conf) {
|
||||
const std::string fileName = Conf->GetString("Game.SaveName", LUS::Context::GetPathRelativeToAppDirectory("oot_save.sav"));
|
||||
std::filesystem::path GetSaveFile(std::shared_ptr<Ship::Config> Conf) {
|
||||
const std::string fileName = Conf->GetString("Game.SaveName", Ship::Context::GetPathRelativeToAppDirectory("oot_save.sav"));
|
||||
std::filesystem::path saveFile = std::filesystem::absolute(fileName);
|
||||
|
||||
if (!exists(saveFile.parent_path())) {
|
||||
@ -1997,13 +2020,13 @@ std::filesystem::path GetSaveFile(std::shared_ptr<LUS::Config> Conf) {
|
||||
}
|
||||
|
||||
std::filesystem::path GetSaveFile() {
|
||||
const std::shared_ptr<LUS::Config> pConf = OTRGlobals::Instance->context->GetConfig();
|
||||
const std::shared_ptr<Ship::Config> pConf = OTRGlobals::Instance->context->GetConfig();
|
||||
|
||||
return GetSaveFile(pConf);
|
||||
}
|
||||
|
||||
void OTRGlobals::CheckSaveFile(size_t sramSize) const {
|
||||
const std::shared_ptr<LUS::Config> pConf = Instance->context->GetConfig();
|
||||
const std::shared_ptr<Ship::Config> pConf = Instance->context->GetConfig();
|
||||
|
||||
std::filesystem::path savePath = GetSaveFile(pConf);
|
||||
std::fstream saveFile(savePath, std::fstream::in | std::fstream::out | std::fstream::binary);
|
||||
@ -2125,26 +2148,26 @@ extern "C" uint32_t OTRGetCurrentHeight() {
|
||||
}
|
||||
|
||||
Color_RGB8 GetColorForControllerLED() {
|
||||
auto brightness = CVarGetFloat("gLedBrightness", 1.0f) / 1.0f;
|
||||
auto brightness = CVarGetFloat(CVAR_SETTING("LEDBrightness"), 1.0f) / 1.0f;
|
||||
Color_RGB8 color = { 0, 0, 0 };
|
||||
if (brightness > 0.0f) {
|
||||
LEDColorSource source = static_cast<LEDColorSource>(CVarGetInteger("gLedColorSource", LED_SOURCE_TUNIC_ORIGINAL));
|
||||
bool criticalOverride = CVarGetInteger("gLedCriticalOverride", 1);
|
||||
LEDColorSource source = static_cast<LEDColorSource>(CVarGetInteger(CVAR_SETTING("LEDColorSource"), LED_SOURCE_TUNIC_ORIGINAL));
|
||||
bool criticalOverride = CVarGetInteger(CVAR_SETTING("LEDCriticalOverride"), 1);
|
||||
if (gPlayState && (source == LED_SOURCE_TUNIC_ORIGINAL || source == LED_SOURCE_TUNIC_COSMETICS)) {
|
||||
switch (CUR_EQUIP_VALUE(EQUIP_TYPE_TUNIC)) {
|
||||
case EQUIP_VALUE_TUNIC_KOKIRI:
|
||||
color = source == LED_SOURCE_TUNIC_COSMETICS
|
||||
? CVarGetColor24("gCosmetics.Link_KokiriTunic.Value", kokiriColor)
|
||||
? CVarGetColor24(CVAR_COSMETIC("Link.KokiriTunic.Value"), kokiriColor)
|
||||
: kokiriColor;
|
||||
break;
|
||||
case EQUIP_VALUE_TUNIC_GORON:
|
||||
color = source == LED_SOURCE_TUNIC_COSMETICS
|
||||
? CVarGetColor24("gCosmetics.Link_GoronTunic.Value", goronColor)
|
||||
? CVarGetColor24(CVAR_COSMETIC("Link.GoronTunic.Value"), goronColor)
|
||||
: goronColor;
|
||||
break;
|
||||
case EQUIP_VALUE_TUNIC_ZORA:
|
||||
color = source == LED_SOURCE_TUNIC_COSMETICS
|
||||
? CVarGetColor24("gCosmetics.Link_ZoraTunic.Value", zoraColor)
|
||||
? CVarGetColor24(CVAR_COSMETIC("Link.ZoraTunic.Value"), zoraColor)
|
||||
: zoraColor;
|
||||
break;
|
||||
}
|
||||
@ -2156,16 +2179,16 @@ Color_RGB8 GetColorForControllerLED() {
|
||||
switch (category) {
|
||||
case ACTORCAT_PLAYER:
|
||||
if (source == LED_SOURCE_NAVI_COSMETICS &&
|
||||
CVarGetInteger("gCosmetics.Navi_IdlePrimary.Changed", 0)) {
|
||||
color = CVarGetColor24("gCosmetics.Navi_IdlePrimary.Value", defaultIdleColor.inner);
|
||||
CVarGetInteger(CVAR_COSMETIC("Navi.IdlePrimary.Changed"), 0)) {
|
||||
color = CVarGetColor24(CVAR_COSMETIC("Navi.IdlePrimary.Value"), defaultIdleColor.inner);
|
||||
break;
|
||||
}
|
||||
color = LEDColorDefaultNaviColorList[category].inner;
|
||||
break;
|
||||
case ACTORCAT_NPC:
|
||||
if (source == LED_SOURCE_NAVI_COSMETICS &&
|
||||
CVarGetInteger("gCosmetics.Navi_NPCPrimary.Changed", 0)) {
|
||||
color = CVarGetColor24("gCosmetics.Navi_NPCPrimary.Value", defaultNPCColor.inner);
|
||||
CVarGetInteger(CVAR_COSMETIC("Navi.NPCPrimary.Changed"), 0)) {
|
||||
color = CVarGetColor24(CVAR_COSMETIC("Navi.NPCPrimary.Value"), defaultNPCColor.inner);
|
||||
break;
|
||||
}
|
||||
color = LEDColorDefaultNaviColorList[category].inner;
|
||||
@ -2173,30 +2196,30 @@ Color_RGB8 GetColorForControllerLED() {
|
||||
case ACTORCAT_ENEMY:
|
||||
case ACTORCAT_BOSS:
|
||||
if (source == LED_SOURCE_NAVI_COSMETICS &&
|
||||
CVarGetInteger("gCosmetics.Navi_EnemyPrimary.Changed", 0)) {
|
||||
color = CVarGetColor24("gCosmetics.Navi_EnemyPrimary.Value", defaultEnemyColor.inner);
|
||||
CVarGetInteger(CVAR_COSMETIC("Navi.EnemyPrimary.Changed"), 0)) {
|
||||
color = CVarGetColor24(CVAR_COSMETIC("Navi.EnemyPrimary.Value"), defaultEnemyColor.inner);
|
||||
break;
|
||||
}
|
||||
color = LEDColorDefaultNaviColorList[category].inner;
|
||||
break;
|
||||
default:
|
||||
if (source == LED_SOURCE_NAVI_COSMETICS &&
|
||||
CVarGetInteger("gCosmetics.Navi_PropsPrimary.Changed", 0)) {
|
||||
color = CVarGetColor24("gCosmetics.Navi_PropsPrimary.Value", defaultPropsColor.inner);
|
||||
CVarGetInteger(CVAR_COSMETIC("Navi.PropsPrimary.Changed"), 0)) {
|
||||
color = CVarGetColor24(CVAR_COSMETIC("Navi.PropsPrimary.Value"), defaultPropsColor.inner);
|
||||
break;
|
||||
}
|
||||
color = LEDColorDefaultNaviColorList[category].inner;
|
||||
}
|
||||
} else { // No target actor.
|
||||
if (source == LED_SOURCE_NAVI_COSMETICS && CVarGetInteger("gCosmetics.Navi_IdlePrimary.Changed", 0)) {
|
||||
color = CVarGetColor24("gCosmetics.Navi_IdlePrimary.Value", defaultIdleColor.inner);
|
||||
if (source == LED_SOURCE_NAVI_COSMETICS && CVarGetInteger(CVAR_COSMETIC("Navi.IdlePrimary.Changed"), 0)) {
|
||||
color = CVarGetColor24(CVAR_COSMETIC("Navi.IdlePrimary.Value"), defaultIdleColor.inner);
|
||||
} else {
|
||||
color = LEDColorDefaultNaviColorList[ACTORCAT_PLAYER].inner;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (source == LED_SOURCE_CUSTOM) {
|
||||
color = CVarGetColor24("gLedPort1Color", { 255, 255, 255 });
|
||||
color = CVarGetColor24(CVAR_SETTING("LEDPort1Color"), { 255, 255, 255 });
|
||||
}
|
||||
if (gPlayState && (criticalOverride || source == LED_SOURCE_HEALTH)) {
|
||||
if (HealthMeter_IsCritical()) {
|
||||
@ -2220,19 +2243,19 @@ Color_RGB8 GetColorForControllerLED() {
|
||||
extern "C" void OTRControllerCallback(uint8_t rumble) {
|
||||
// We call this every tick, SDL accounts for this use and prevents driver spam
|
||||
// https://github.com/libsdl-org/SDL/blob/f17058b562c8a1090c0c996b42982721ace90903/src/joystick/SDL_joystick.c#L1114-L1144
|
||||
LUS::Context::GetInstance()->GetControlDeck()->GetControllerByPort(0)->GetLED()->SetLEDColor(GetColorForControllerLED());
|
||||
Ship::Context::GetInstance()->GetControlDeck()->GetControllerByPort(0)->GetLED()->SetLEDColor(GetColorForControllerLED());
|
||||
|
||||
static std::shared_ptr<SohInputEditorWindow> controllerConfigWindow = nullptr;
|
||||
if (controllerConfigWindow == nullptr) {
|
||||
controllerConfigWindow = std::dynamic_pointer_cast<SohInputEditorWindow>(LUS::Context::GetInstance()->GetWindow()->GetGui()->GetGuiWindow("Input Editor"));
|
||||
controllerConfigWindow = std::dynamic_pointer_cast<SohInputEditorWindow>(Ship::Context::GetInstance()->GetWindow()->GetGui()->GetGuiWindow("Input Editor"));
|
||||
} else if (controllerConfigWindow->TestingRumble()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (rumble) {
|
||||
LUS::Context::GetInstance()->GetControlDeck()->GetControllerByPort(0)->GetRumble()->StartRumble();
|
||||
Ship::Context::GetInstance()->GetControlDeck()->GetControllerByPort(0)->GetRumble()->StartRumble();
|
||||
} else {
|
||||
LUS::Context::GetInstance()->GetControlDeck()->GetControllerByPort(0)->GetRumble()->StopRumble();
|
||||
Ship::Context::GetInstance()->GetControlDeck()->GetControllerByPort(0)->GetRumble()->StopRumble();
|
||||
}
|
||||
}
|
||||
|
||||
@ -2272,7 +2295,7 @@ extern "C" void AudioPlayer_Play(const uint8_t* buf, uint32_t len) {
|
||||
}
|
||||
|
||||
extern "C" int Controller_ShouldRumble(size_t slot) {
|
||||
for (auto [id, mapping] : LUS::Context::GetInstance()
|
||||
for (auto [id, mapping] : Ship::Context::GetInstance()
|
||||
->GetControlDeck()
|
||||
->GetControllerByPort(static_cast<uint8_t>(slot))
|
||||
->GetRumble()
|
||||
@ -2339,7 +2362,7 @@ extern "C" int GetEquipNowMessage(char* buffer, char* src, const int maxBufferSi
|
||||
}
|
||||
|
||||
extern "C" void Randomizer_ParseSpoiler(const char* fileLoc) {
|
||||
OTRGlobals::Instance->gRandoContext->ParseSpoiler(fileLoc, CVarGetInteger("gPlandoMode", 0));
|
||||
OTRGlobals::Instance->gRandoContext->ParseSpoiler(fileLoc, CVarGetInteger(CVAR_GENERAL("PlandoMode"), 0));
|
||||
}
|
||||
|
||||
extern "C" void Randomizer_LoadHintMessages() {
|
||||
@ -2479,7 +2502,7 @@ extern "C" int CustomMessage_RetrieveIfExists(PlayState* play) {
|
||||
if (player->getItemEntry.getItemId == RG_ICE_TRAP) {
|
||||
u16 iceTrapTextId = Random(0, NUM_ICE_TRAP_MESSAGES);
|
||||
messageEntry = CustomMessageManager::Instance->RetrieveMessage(Randomizer::IceTrapRandoMessageTableID, iceTrapTextId);
|
||||
if (CVarGetInteger("gLetItSnow", 0)) {
|
||||
if (CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) {
|
||||
messageEntry = CustomMessageManager::Instance->RetrieveMessage(Randomizer::IceTrapRandoMessageTableID, NUM_ICE_TRAP_MESSAGES + 1);
|
||||
}
|
||||
} else if (player->getItemEntry.getItemId == RG_TRIFORCE_PIECE) {
|
||||
@ -2579,12 +2602,12 @@ extern "C" int CustomMessage_RetrieveIfExists(PlayState* play) {
|
||||
RandomizerInf randoInf = (RandomizerInf)((textId - (TEXT_SHOP_ITEM_RANDOM + NUM_SHOP_ITEMS)) + RAND_INF_SHOP_ITEMS_KF_SHOP_ITEM_1);
|
||||
messageEntry = OTRGlobals::Instance->gRandomizer->GetMerchantMessage(randoInf, TEXT_SHOP_ITEM_RANDOM_CONFIRM);
|
||||
}
|
||||
} else if (CVarGetInteger("gRandomizeRupeeNames", 1) &&
|
||||
} else if (CVarGetInteger(CVAR_RANDOMIZER_ENHANCEMENT("RandomizeRupeeNames"), 1) &&
|
||||
(textId == TEXT_BLUE_RUPEE || textId == TEXT_RED_RUPEE || textId == TEXT_PURPLE_RUPEE ||
|
||||
textId == TEXT_HUGE_RUPEE)) {
|
||||
messageEntry = Randomizer::GetRupeeMessage(textId);
|
||||
// In rando, replace Navi's general overworld hints with rando-related gameplay tips
|
||||
} else if (CVarGetInteger("gRandoRelevantNavi", 1) && textId >= TEXT_NAVI_DEKU_TREE_SUMMONS && textId <= TEXT_NAVI_TRY_TO_KEEP_MOVING) {
|
||||
} else if (CVarGetInteger(CVAR_RANDOMIZER_ENHANCEMENT("RandoRelevantNavi"), 1) && textId >= TEXT_NAVI_DEKU_TREE_SUMMONS && textId <= TEXT_NAVI_TRY_TO_KEEP_MOVING) {
|
||||
u16 naviTextId = Random(0, NUM_NAVI_MESSAGES);
|
||||
messageEntry = CustomMessageManager::Instance->RetrieveMessage(Randomizer::NaviRandoMessageTableID, naviTextId);
|
||||
}
|
||||
@ -2715,7 +2738,7 @@ extern "C" int CustomMessage_RetrieveIfExists(PlayState* play) {
|
||||
}
|
||||
}
|
||||
if (textId == TEXT_GS_NO_FREEZE || textId == TEXT_GS_FREEZE) {
|
||||
if (CVarGetInteger("gInjectItemCounts", 0) != 0) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("InjectItemCounts"), 0) != 0) {
|
||||
// The freeze text cannot be manually dismissed and must be auto-dismissed.
|
||||
// This is fine and even wanted when skull tokens are not shuffled, but when
|
||||
// when they are shuffled we don't want to be able to manually dismiss the box.
|
||||
@ -2723,7 +2746,7 @@ extern "C" int CustomMessage_RetrieveIfExists(PlayState* play) {
|
||||
// animation until the text box auto-dismisses.
|
||||
// RANDOTODO: Implement a way to determine if an item came from a skulltula and
|
||||
// inject the auto-dismiss control code if it did.
|
||||
if (CVarGetInteger("gSkulltulaFreeze", 0) != 0 &&
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("SkulltulaFreeze"), 0) != 0 &&
|
||||
!(IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_TOKENS) != RO_TOKENSANITY_OFF)) {
|
||||
textId = TEXT_GS_NO_FREEZE;
|
||||
} else {
|
||||
@ -2736,18 +2759,18 @@ extern "C" int CustomMessage_RetrieveIfExists(PlayState* play) {
|
||||
messageEntry.Replace("[[gsCount]]", std::to_string(gsCount));
|
||||
}
|
||||
}
|
||||
if (textId == TEXT_HEART_CONTAINER && CVarGetInteger("gInjectItemCounts", 0)) {
|
||||
if (textId == TEXT_HEART_CONTAINER && CVarGetInteger(CVAR_ENHANCEMENT("InjectItemCounts"), 0)) {
|
||||
messageEntry = CustomMessageManager::Instance->RetrieveMessage(customMessageTableID, TEXT_HEART_CONTAINER);
|
||||
messageEntry.Replace("[[heartContainerCount]]", std::to_string(gSaveContext.sohStats.heartContainers + 1));
|
||||
}
|
||||
if (textId == TEXT_HEART_PIECE && CVarGetInteger("gInjectItemCounts", 0)) {
|
||||
if (textId == TEXT_HEART_PIECE && CVarGetInteger(CVAR_ENHANCEMENT("InjectItemCounts"), 0)) {
|
||||
messageEntry = CustomMessageManager::Instance->RetrieveMessage(customMessageTableID, TEXT_HEART_PIECE);
|
||||
messageEntry.Replace("[[heartPieceCount]]", std::to_string(gSaveContext.sohStats.heartPieces + 1));
|
||||
}
|
||||
if (textId == TEXT_MARKET_GUARD_NIGHT && CVarGetInteger("gMarketSneak", 0) && play->sceneNum == SCENE_MARKET_ENTRANCE_NIGHT) {
|
||||
if (textId == TEXT_MARKET_GUARD_NIGHT && CVarGetInteger(CVAR_ENHANCEMENT("MarketSneak"), 0) && play->sceneNum == SCENE_MARKET_ENTRANCE_NIGHT) {
|
||||
messageEntry = CustomMessageManager::Instance->RetrieveMessage(customMessageTableID, TEXT_MARKET_GUARD_NIGHT);
|
||||
}
|
||||
if (textId == TEXT_FISHERMAN_LEAVE && CVarGetInteger("gQuitFishingAtDoor", 0)) {
|
||||
if (textId == TEXT_FISHERMAN_LEAVE && CVarGetInteger(CVAR_ENHANCEMENT("QuitFishingAtDoor"), 0)) {
|
||||
messageEntry = CustomMessageManager::Instance->RetrieveMessage(customMessageTableID, TEXT_FISHERMAN_LEAVE);
|
||||
}
|
||||
font->charTexBuf[0] = (messageEntry.GetTextBoxType() << 4) | messageEntry.GetTextBoxPosition();
|
||||
@ -2767,12 +2790,12 @@ extern "C" int CustomMessage_RetrieveIfExists(PlayState* play) {
|
||||
}
|
||||
|
||||
extern "C" void Overlay_DisplayText(float duration, const char* text) {
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->GetGameOverlay()->TextDrawNotification(duration, true, text);
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->GetGameOverlay()->TextDrawNotification(duration, true, text);
|
||||
}
|
||||
|
||||
extern "C" void Overlay_DisplayText_Seconds(int seconds, const char* text) {
|
||||
float duration = seconds * OTRGlobals::Instance->GetInterpolationFPS() * 0.05;
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->GetGameOverlay()->TextDrawNotification(duration, true, text);
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->GetGameOverlay()->TextDrawNotification(duration, true, text);
|
||||
}
|
||||
|
||||
extern "C" void Entrance_ClearEntranceTrackingData(void) {
|
||||
@ -2825,8 +2848,8 @@ void SoH_ProcessDroppedFiles(std::string filePath) {
|
||||
|
||||
// #region SOH [Randomizer] TODO: Refactor spoiler file handling for randomizer
|
||||
if (configJson.contains("version") && configJson.contains("finalSeed")) {
|
||||
CVarSetString("gRandomizerDroppedFile", filePath.c_str());
|
||||
CVarSetInteger("gRandomizerNewFileDropped", 1);
|
||||
CVarSetString(CVAR_GENERAL("RandomizerDroppedFile"), filePath.c_str());
|
||||
CVarSetInteger(CVAR_GENERAL("RandomizerNewFileDropped"), 1);
|
||||
return;
|
||||
}
|
||||
// #endregion
|
||||
@ -2858,14 +2881,14 @@ void SoH_ProcessDroppedFiles(std::string filePath) {
|
||||
}
|
||||
}
|
||||
|
||||
auto gui = LUS::Context::GetInstance()->GetWindow()->GetGui();
|
||||
auto gui = Ship::Context::GetInstance()->GetWindow()->GetGui();
|
||||
gui->GetGuiWindow("Console")->Hide();
|
||||
gui->GetGuiWindow("Actor Viewer")->Hide();
|
||||
gui->GetGuiWindow("Collision Viewer")->Hide();
|
||||
gui->GetGuiWindow("Save Editor")->Hide();
|
||||
gui->GetGuiWindow("Display List Viewer")->Hide();
|
||||
gui->GetGuiWindow("Stats")->Hide();
|
||||
std::dynamic_pointer_cast<LUS::ConsoleWindow>(LUS::Context::GetInstance()->GetWindow()->GetGui()->GetGuiWindow("Console"))->ClearBindings();
|
||||
std::dynamic_pointer_cast<Ship::ConsoleWindow>(Ship::Context::GetInstance()->GetWindow()->GetGui()->GetGuiWindow("Console"))->ClearBindings();
|
||||
|
||||
gui->SaveConsoleVariablesOnNextTick();
|
||||
|
||||
@ -2873,12 +2896,12 @@ void SoH_ProcessDroppedFiles(std::string filePath) {
|
||||
gui->GetGameOverlay()->TextDrawNotification(30.0f, true, "Configuration Loaded. Hash: %d", finalHash);
|
||||
} catch (std::exception& e) {
|
||||
SPDLOG_ERROR("Failed to load config file: {}", e.what());
|
||||
auto gui = LUS::Context::GetInstance()->GetWindow()->GetGui();
|
||||
auto gui = Ship::Context::GetInstance()->GetWindow()->GetGui();
|
||||
gui->GetGameOverlay()->TextDrawNotification(30.0f, true, "Failed to load config file");
|
||||
return;
|
||||
} catch (...) {
|
||||
SPDLOG_ERROR("Failed to load config file");
|
||||
auto gui = LUS::Context::GetInstance()->GetWindow()->GetGui();
|
||||
auto gui = Ship::Context::GetInstance()->GetWindow()->GetGui();
|
||||
gui->GetGameOverlay()->TextDrawNotification(30.0f, true, "Failed to load config file");
|
||||
return;
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ class OTRGlobals
|
||||
public:
|
||||
static OTRGlobals* Instance;
|
||||
|
||||
std::shared_ptr<LUS::Context> context;
|
||||
std::shared_ptr<Ship::Context> context;
|
||||
std::shared_ptr<SaveStateMgr> gSaveStateMgr;
|
||||
std::shared_ptr<Randomizer> gRandomizer;
|
||||
std::shared_ptr<Rando::Context> gRandoContext;
|
||||
@ -67,6 +67,22 @@ private:
|
||||
uint32_t IsGameMasterQuest();
|
||||
#endif
|
||||
|
||||
#define CVAR_RANDOMIZER_ENHANCEMENT(var) CVAR_PREFIX_RANDOMIZER_ENHANCEMENT "." var
|
||||
#define CVAR_RANDOMIZER_SETTING(var) CVAR_PREFIX_RANDOMIZER_SETTING "." var
|
||||
#define CVAR_COSMETIC(var) CVAR_PREFIX_COSMETIC "." var
|
||||
#define CVAR_AUDIO(var) CVAR_PREFIX_AUDIO "." var
|
||||
#define CVAR_CHEAT(var) CVAR_PREFIX_CHEAT "." var
|
||||
#define CVAR_ENHANCEMENT(var) CVAR_PREFIX_ENHANCEMENT "." var
|
||||
#define CVAR_SETTING(var) CVAR_PREFIX_SETTING "." var
|
||||
#define CVAR_WINDOW(var) CVAR_PREFIX_WINDOW "." var
|
||||
#define CVAR_TRACKER(var) CVAR_PREFIX_TRACKER "." var
|
||||
#define CVAR_TRACKER_ITEM(var) CVAR_TRACKER(".ItemTracker." var)
|
||||
#define CVAR_TRACKER_CHECK(var) CVAR_TRACKER(".CheckTracker." var)
|
||||
#define CVAR_TRACKER_ENTRANCE(var) CVAR_TRACKER(".EntranceTracker." var)
|
||||
#define CVAR_DEVELOPER_TOOLS(var) CVAR_PREFIX_DEVELOPER_TOOLS "." var
|
||||
#define CVAR_GENERAL(var) CVAR_PREFIX_GENERAL "." var
|
||||
#define CVAR_REMOTE(var) CVAR_PREFIX_REMOTE "." var
|
||||
|
||||
#ifndef __cplusplus
|
||||
void InitOTR(void);
|
||||
void DeinitOTR(void);
|
||||
|
@ -50,12 +50,12 @@ void SaveManager::ReadSaveFile(std::filesystem::path savePath, uintptr_t addr, v
|
||||
}
|
||||
|
||||
std::filesystem::path SaveManager::GetFileName(int fileNum) {
|
||||
const std::filesystem::path sSavePath(LUS::Context::GetPathRelativeToAppDirectory("Save"));
|
||||
const std::filesystem::path sSavePath(Ship::Context::GetPathRelativeToAppDirectory("Save"));
|
||||
return sSavePath / ("file" + std::to_string(fileNum + 1) + ".sav");
|
||||
}
|
||||
|
||||
std::filesystem::path SaveManager::GetFileTempName(int fileNum) {
|
||||
const std::filesystem::path sSavePath(LUS::Context::GetPathRelativeToAppDirectory("Save"));
|
||||
const std::filesystem::path sSavePath(Ship::Context::GetPathRelativeToAppDirectory("Save"));
|
||||
return sSavePath / ("file" + std::to_string(fileNum + 1) + ".temp");
|
||||
}
|
||||
|
||||
@ -445,7 +445,7 @@ void SaveManager::LoadRandomizerVersion3() {
|
||||
|
||||
SaveManager::Instance->LoadArray("hintLocations", RH_MAX, [&](size_t i) {
|
||||
auto hint = RandomizerHint(i);
|
||||
nlohmann::ordered_json json;
|
||||
nlohmann::json json;
|
||||
SaveManager::Instance->LoadData("", json);
|
||||
randoContext->AddHint(hint, Rando::Hint(hint, json));
|
||||
});
|
||||
@ -615,10 +615,10 @@ void SaveManager::SaveRandomizer(SaveContext* saveContext, int sectionID, bool f
|
||||
void SaveManager::Init() {
|
||||
// Wait on saves that snuck through the Wait in OnExitGame
|
||||
ThreadPoolWait();
|
||||
const std::filesystem::path sSavePath(LUS::Context::GetPathRelativeToAppDirectory("Save"));
|
||||
const std::filesystem::path sSavePath(Ship::Context::GetPathRelativeToAppDirectory("Save"));
|
||||
const std::filesystem::path sGlobalPath = sSavePath / std::string("global.sav");
|
||||
auto sOldSavePath = LUS::Context::GetPathRelativeToAppDirectory("oot_save.sav");
|
||||
auto sOldBackupSavePath = LUS::Context::GetPathRelativeToAppDirectory("oot_save.bak");
|
||||
auto sOldSavePath = Ship::Context::GetPathRelativeToAppDirectory("oot_save.sav");
|
||||
auto sOldBackupSavePath = Ship::Context::GetPathRelativeToAppDirectory("oot_save.bak");
|
||||
|
||||
// If the save directory does not exist, create it
|
||||
if (!std::filesystem::exists(sSavePath)) {
|
||||
@ -877,10 +877,10 @@ void SaveManager::InitFileDebug() {
|
||||
|
||||
//don't apply gDebugSaveFileMode on the title screen
|
||||
if (gSaveContext.fileNum != 0xFF) {
|
||||
if (CVarGetInteger("gDebugSaveFileMode", 1) == 2) {
|
||||
if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugSaveFileMode"), 1) == 2) {
|
||||
InitFileMaxed();
|
||||
return;
|
||||
} else if (CVarGetInteger("gDebugSaveFileMode", 1) == 0) {
|
||||
} else if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugSaveFileMode"), 1) == 0) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -1266,7 +1266,7 @@ void SaveManager::SaveGlobal() {
|
||||
globalBlock["zTargetSetting"] = gSaveContext.zTargetSetting;
|
||||
globalBlock["language"] = gSaveContext.language;
|
||||
|
||||
const std::filesystem::path sSavePath(LUS::Context::GetPathRelativeToAppDirectory("Save"));
|
||||
const std::filesystem::path sSavePath(Ship::Context::GetPathRelativeToAppDirectory("Save"));
|
||||
const std::filesystem::path sGlobalPath = sSavePath / std::string("global.sav");
|
||||
|
||||
std::ofstream output(sGlobalPath);
|
||||
@ -1325,7 +1325,7 @@ void SaveManager::LoadFile(int fileNum) {
|
||||
GameInteractor::Instance->ExecuteHooks<GameInteractor::OnLoadFile>(fileNum);
|
||||
} catch (const std::exception& e) {
|
||||
input.close();
|
||||
std::filesystem::path newFile(LUS::Context::GetPathRelativeToAppDirectory("Save") + ("/file" + std::to_string(fileNum + 1) + "-" + std::to_string(GetUnixTimestamp()) + ".bak"));
|
||||
std::filesystem::path newFile(Ship::Context::GetPathRelativeToAppDirectory("Save") + ("/file" + std::to_string(fileNum + 1) + "-" + std::to_string(GetUnixTimestamp()) + ".bak"));
|
||||
#if defined(__SWITCH__) || defined(__WIIU__)
|
||||
copy_file(fileName.c_str(), newFile.c_str());
|
||||
#else
|
||||
@ -1415,7 +1415,7 @@ int SaveManager::GetSaveSectionID(std::string& sectionName) {
|
||||
void SaveManager::CreateDefaultGlobal() {
|
||||
gSaveContext.audioSetting = 0;
|
||||
gSaveContext.zTargetSetting = 0;
|
||||
gSaveContext.language = CVarGetInteger("gLanguages", LANGUAGE_ENG);
|
||||
gSaveContext.language = CVarGetInteger(CVAR_SETTING("Languages"), LANGUAGE_ENG);
|
||||
|
||||
SaveGlobal();
|
||||
}
|
||||
@ -2795,7 +2795,7 @@ void SaveManager::ConvertFromUnversioned() {
|
||||
gSaveContext.zTargetSetting = data[SRAM_HEADER_ZTARGET] & 1;
|
||||
gSaveContext.language = data[SRAM_HEADER_LANGUAGE];
|
||||
if (gSaveContext.language >= LANGUAGE_MAX) {
|
||||
gSaveContext.language = CVarGetInteger("gLanguages", LANGUAGE_ENG);
|
||||
gSaveContext.language = CVarGetInteger(CVAR_SETTING("Languages"), LANGUAGE_ENG);
|
||||
}
|
||||
SaveGlobal();
|
||||
|
||||
|
@ -11,8 +11,8 @@
|
||||
#ifndef IMGUI_DEFINE_MATH_OPERATORS
|
||||
#define IMGUI_DEFINE_MATH_OPERATORS
|
||||
#endif
|
||||
#include <ImGui/imgui.h>
|
||||
#include <ImGui/imgui_internal.h>
|
||||
#include <imgui.h>
|
||||
#include <imgui_internal.h>
|
||||
#include <libultraship/libultraship.h>
|
||||
#include <Fast3D/gfx_pc.h>
|
||||
|
||||
@ -112,9 +112,9 @@ namespace SohGui {
|
||||
|
||||
std::shared_ptr<SohMenuBar> mSohMenuBar;
|
||||
|
||||
std::shared_ptr<LUS::GuiWindow> mConsoleWindow;
|
||||
std::shared_ptr<LUS::GuiWindow> mStatsWindow;
|
||||
std::shared_ptr<LUS::GuiWindow> mInputEditorWindow;
|
||||
std::shared_ptr<Ship::GuiWindow> mConsoleWindow;
|
||||
std::shared_ptr<Ship::GuiWindow> mStatsWindow;
|
||||
std::shared_ptr<Ship::GuiWindow> mInputEditorWindow;
|
||||
|
||||
std::shared_ptr<AudioEditor> mAudioEditorWindow;
|
||||
std::shared_ptr<InputViewer> mInputViewer;
|
||||
@ -137,10 +137,10 @@ namespace SohGui {
|
||||
std::shared_ptr<SohModalWindow> mModalWindow;
|
||||
|
||||
void SetupGuiElements() {
|
||||
auto gui = LUS::Context::GetInstance()->GetWindow()->GetGui();
|
||||
auto gui = Ship::Context::GetInstance()->GetWindow()->GetGui();
|
||||
|
||||
mSohMenuBar = std::make_shared<SohMenuBar>("gOpenMenuBar", CVarGetInteger("gOpenMenuBar", 0));
|
||||
gui->SetMenuBar(std::reinterpret_pointer_cast<LUS::GuiMenuBar>(mSohMenuBar));
|
||||
mSohMenuBar = std::make_shared<SohMenuBar>(CVAR_MENU_BAR_OPEN, CVarGetInteger(CVAR_MENU_BAR_OPEN, 0));
|
||||
gui->SetMenuBar(std::reinterpret_pointer_cast<Ship::GuiMenuBar>(mSohMenuBar));
|
||||
|
||||
if (gui->GetMenuBar() && !gui->GetMenuBar()->IsVisible()) {
|
||||
#if defined(__SWITCH__) || defined(__WIIU__)
|
||||
@ -165,43 +165,43 @@ namespace SohGui {
|
||||
SPDLOG_ERROR("Could not find input editor window");
|
||||
}
|
||||
|
||||
mAudioEditorWindow = std::make_shared<AudioEditor>("gAudioEditor.WindowOpen", "Audio Editor");
|
||||
mAudioEditorWindow = std::make_shared<AudioEditor>(CVAR_WINDOW("AudioEditor"), "Audio Editor");
|
||||
gui->AddGuiWindow(mAudioEditorWindow);
|
||||
mInputViewer = std::make_shared<InputViewer>("gOpenWindows.InputViewer", "Input Viewer");
|
||||
mInputViewer = std::make_shared<InputViewer>(CVAR_WINDOW("InputViewer"), "Input Viewer");
|
||||
gui->AddGuiWindow(mInputViewer);
|
||||
mInputViewerSettings = std::make_shared<InputViewerSettingsWindow>("gOpenWindows.InputViewerSettings", "Input Viewer Settings");
|
||||
mInputViewerSettings = std::make_shared<InputViewerSettingsWindow>(CVAR_WINDOW("InputViewerSettings"), "Input Viewer Settings");
|
||||
gui->AddGuiWindow(mInputViewerSettings);
|
||||
mCosmeticsEditorWindow = std::make_shared<CosmeticsEditorWindow>("gCosmeticsEditorEnabled", "Cosmetics Editor");
|
||||
mCosmeticsEditorWindow = std::make_shared<CosmeticsEditorWindow>(CVAR_WINDOW("CosmeticsEditor"), "Cosmetics Editor");
|
||||
gui->AddGuiWindow(mCosmeticsEditorWindow);
|
||||
mActorViewerWindow = std::make_shared<ActorViewerWindow>("gActorViewerEnabled", "Actor Viewer");
|
||||
mActorViewerWindow = std::make_shared<ActorViewerWindow>(CVAR_WINDOW("ActorViewer"), "Actor Viewer");
|
||||
gui->AddGuiWindow(mActorViewerWindow);
|
||||
mColViewerWindow = std::make_shared<ColViewerWindow>("gCollisionViewerEnabled", "Collision Viewer");
|
||||
mColViewerWindow = std::make_shared<ColViewerWindow>(CVAR_WINDOW("CollisionViewer"), "Collision Viewer");
|
||||
gui->AddGuiWindow(mColViewerWindow);
|
||||
mSaveEditorWindow = std::make_shared<SaveEditorWindow>("gSaveEditorEnabled", "Save Editor");
|
||||
mSaveEditorWindow = std::make_shared<SaveEditorWindow>(CVAR_WINDOW("SaveEditor"), "Save Editor");
|
||||
gui->AddGuiWindow(mSaveEditorWindow);
|
||||
mDLViewerWindow = std::make_shared<DLViewerWindow>("gDLViewerEnabled", "Display List Viewer");
|
||||
mDLViewerWindow = std::make_shared<DLViewerWindow>(CVAR_WINDOW("DLViewer"), "Display List Viewer");
|
||||
gui->AddGuiWindow(mDLViewerWindow);
|
||||
mValueViewerWindow = std::make_shared<ValueViewerWindow>("gValueViewer.WindowOpen", "Value Viewer");
|
||||
mValueViewerWindow = std::make_shared<ValueViewerWindow>(CVAR_WINDOW("ValueViewer"), "Value Viewer");
|
||||
gui->AddGuiWindow(mValueViewerWindow);
|
||||
mMessageViewerWindow = std::make_shared<MessageViewer>("gMessageViewerEnabled", "Message Viewer");
|
||||
mMessageViewerWindow = std::make_shared<MessageViewer>(CVAR_WINDOW("MessageViewer"), "Message Viewer");
|
||||
gui->AddGuiWindow(mMessageViewerWindow);
|
||||
mGameplayStatsWindow = std::make_shared<GameplayStatsWindow>("gGameplayStatsEnabled", "Gameplay Stats");
|
||||
mGameplayStatsWindow = std::make_shared<GameplayStatsWindow>(CVAR_WINDOW("GameplayStats"), "Gameplay Stats");
|
||||
gui->AddGuiWindow(mGameplayStatsWindow);
|
||||
mCheckTrackerWindow = std::make_shared<CheckTracker::CheckTrackerWindow>("gCheckTrackerEnabled", "Check Tracker");
|
||||
mCheckTrackerWindow = std::make_shared<CheckTracker::CheckTrackerWindow>(CVAR_WINDOW("CheckTracker"), "Check Tracker");
|
||||
gui->AddGuiWindow(mCheckTrackerWindow);
|
||||
mCheckTrackerSettingsWindow = std::make_shared<CheckTracker::CheckTrackerSettingsWindow>("gCheckTrackerSettingsEnabled", "Check Tracker Settings");
|
||||
mCheckTrackerSettingsWindow = std::make_shared<CheckTracker::CheckTrackerSettingsWindow>(CVAR_WINDOW("CheckTrackerSettings"), "Check Tracker Settings");
|
||||
gui->AddGuiWindow(mCheckTrackerSettingsWindow);
|
||||
mEntranceTrackerWindow = std::make_shared<EntranceTrackerWindow>("gEntranceTrackerEnabled","Entrance Tracker");
|
||||
mEntranceTrackerWindow = std::make_shared<EntranceTrackerWindow>(CVAR_WINDOW("EntranceTracker"),"Entrance Tracker");
|
||||
gui->AddGuiWindow(mEntranceTrackerWindow);
|
||||
mItemTrackerWindow = std::make_shared<ItemTrackerWindow>("gItemTrackerEnabled", "Item Tracker");
|
||||
mItemTrackerWindow = std::make_shared<ItemTrackerWindow>(CVAR_WINDOW("ItemTracker"), "Item Tracker");
|
||||
gui->AddGuiWindow(mItemTrackerWindow);
|
||||
mItemTrackerSettingsWindow = std::make_shared<ItemTrackerSettingsWindow>("gItemTrackerSettingsEnabled", "Item Tracker Settings");
|
||||
mItemTrackerSettingsWindow = std::make_shared<ItemTrackerSettingsWindow>(CVAR_WINDOW("ItemTrackerSettings"), "Item Tracker Settings");
|
||||
gui->AddGuiWindow(mItemTrackerSettingsWindow);
|
||||
mRandomizerSettingsWindow = std::make_shared<RandomizerSettingsWindow>("gRandomizerSettingsEnabled", "Randomizer Settings");
|
||||
mRandomizerSettingsWindow = std::make_shared<RandomizerSettingsWindow>(CVAR_WINDOW("RandomizerSettings"), "Randomizer Settings");
|
||||
gui->AddGuiWindow(mRandomizerSettingsWindow);
|
||||
mAdvancedResolutionSettingsWindow = std::make_shared<AdvancedResolutionSettings::AdvancedResolutionSettingsWindow>("gAdvancedResolutionEditorEnabled", "Advanced Resolution Settings");
|
||||
mAdvancedResolutionSettingsWindow = std::make_shared<AdvancedResolutionSettings::AdvancedResolutionSettingsWindow>(CVAR_WINDOW("AdvancedResolutionEditor"), "Advanced Resolution Settings");
|
||||
gui->AddGuiWindow(mAdvancedResolutionSettingsWindow);
|
||||
mModalWindow = std::make_shared<SohModalWindow>("gOpenWindows.modalWindowEnabled", "Modal Window");
|
||||
mModalWindow = std::make_shared<SohModalWindow>(CVAR_WINDOW("ModalWindow"), "Modal Window");
|
||||
gui->AddGuiWindow(mModalWindow);
|
||||
mModalWindow->Show();
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -5,9 +5,9 @@
|
||||
#include "window/gui/GuiElement.h"
|
||||
|
||||
namespace SohGui {
|
||||
class SohMenuBar : public LUS::GuiMenuBar {
|
||||
class SohMenuBar : public Ship::GuiMenuBar {
|
||||
public:
|
||||
using LUS::GuiMenuBar::GuiMenuBar;
|
||||
using Ship::GuiMenuBar::GuiMenuBar;
|
||||
protected:
|
||||
void DrawElement() override;
|
||||
void InitElement() override {};
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "SohModals.h"
|
||||
#include "ImGui/imgui.h"
|
||||
#include <imgui.h>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <libultraship/bridge.h>
|
||||
|
@ -4,9 +4,9 @@
|
||||
#include "window/gui/GuiMenuBar.h"
|
||||
#include "window/gui/GuiElement.h"
|
||||
|
||||
class SohModalWindow : public LUS::GuiWindow {
|
||||
class SohModalWindow : public Ship::GuiWindow {
|
||||
public:
|
||||
using LUS::GuiWindow::GuiWindow;
|
||||
using GuiWindow::GuiWindow;
|
||||
|
||||
void InitElement() override {};
|
||||
void DrawElement() override;
|
||||
|
@ -10,8 +10,8 @@
|
||||
#ifndef IMGUI_DEFINE_MATH_OPERATORS
|
||||
#define IMGUI_DEFINE_MATH_OPERATORS
|
||||
#endif
|
||||
#include <ImGui/imgui.h>
|
||||
#include <ImGui/imgui_internal.h>
|
||||
#include <imgui.h>
|
||||
#include <imgui_internal.h>
|
||||
#include <libultraship/libultraship.h>
|
||||
|
||||
#include <libultraship/libultra/types.h>
|
||||
@ -208,7 +208,7 @@ namespace UIWidgets {
|
||||
bool val = (bool)CVarGetInteger(cvarName, defaultValue);
|
||||
if (CustomCheckbox(text, &val, disabled, disabledGraphic)) {
|
||||
CVarSetInteger(cvarName, val);
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
changed = true;
|
||||
}
|
||||
|
||||
@ -248,7 +248,7 @@ namespace UIWidgets {
|
||||
CVarSetInteger(cvarName, i);
|
||||
selected = i;
|
||||
changed = true;
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -261,7 +261,7 @@ namespace UIWidgets {
|
||||
if (disabledValue >= 0 && selected != disabledValue) {
|
||||
CVarSetInteger(cvarName, disabledValue);
|
||||
changed = true;
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
}
|
||||
}
|
||||
|
||||
@ -351,7 +351,7 @@ namespace UIWidgets {
|
||||
|
||||
if (changed && (oldVal != val)) {
|
||||
CVarSetInteger(cvarName, val);
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
} else {
|
||||
changed = false;
|
||||
}
|
||||
@ -452,7 +452,7 @@ namespace UIWidgets {
|
||||
ss << std::setprecision(ticks + 1) << std::setiosflags(std::ios_base::fixed) << val;
|
||||
val = std::stof(ss.str());
|
||||
CVarSetFloat(cvarName, val);
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
} else {
|
||||
changed = false;
|
||||
}
|
||||
@ -486,14 +486,14 @@ namespace UIWidgets {
|
||||
|
||||
bool EnhancementRadioButton(const char* text, const char* cvarName, int id) {
|
||||
/*Usage :
|
||||
EnhancementRadioButton("My Visible Name","gMyCVarName", MyID);
|
||||
EnhancementRadioButton("My Visible Name",CVAR_GROUP("MyCVarName"), MyID);
|
||||
First arg is the visible name of the Radio button
|
||||
Second is the cvar name where MyID will be saved.
|
||||
Note: the CVar name should be the same to each Buddies.
|
||||
Example :
|
||||
EnhancementRadioButton("English", "gLanguages", LANGUAGE_ENG);
|
||||
EnhancementRadioButton("German", "gLanguages", LANGUAGE_GER);
|
||||
EnhancementRadioButton("French", "gLanguages", LANGUAGE_FRA);
|
||||
EnhancementRadioButton("English", CVAR_SETTING("Languages"), LANGUAGE_ENG);
|
||||
EnhancementRadioButton("German", CVAR_SETTING("Languages"), LANGUAGE_GER);
|
||||
EnhancementRadioButton("French", CVAR_SETTING("Languages"), LANGUAGE_FRA);
|
||||
*/
|
||||
std::string make_invisible = "##" + std::string(text) + std::string(cvarName);
|
||||
|
||||
@ -501,7 +501,7 @@ namespace UIWidgets {
|
||||
int val = CVarGetInteger(cvarName, 0);
|
||||
if (ImGui::RadioButton(make_invisible.c_str(), id == val)) {
|
||||
CVarSetInteger(cvarName, id);
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
ret = true;
|
||||
}
|
||||
ImGui::SameLine();
|
||||
@ -528,7 +528,7 @@ namespace UIWidgets {
|
||||
|
||||
CVarSetColor(cvarName, colorsRGBA);
|
||||
CVarSetInteger(Cvar_RBM.c_str(), 0); //On click disable rainbow mode.
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
changed = true;
|
||||
}
|
||||
Tooltip("Revert colors to the game's original colors (GameCube version)\nOverwrites previously chosen color");
|
||||
@ -553,7 +553,7 @@ namespace UIWidgets {
|
||||
NewColors.b = fmin(fmax(colors->z * 255, 0), 255);
|
||||
CVarSetColor(cvarName, NewColors);
|
||||
CVarSetInteger(Cvar_RBM.c_str(), 0); // On click disable rainbow mode.
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
changed = true;
|
||||
}
|
||||
Tooltip("Chooses a random color\nOverwrites previously chosen color");
|
||||
@ -614,7 +614,7 @@ namespace UIWidgets {
|
||||
colors.a = 255.0;
|
||||
|
||||
CVarSetColor(cvarName, colors);
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
@ -630,7 +630,7 @@ namespace UIWidgets {
|
||||
colors.a = ColorRGBA.w * 255.0;
|
||||
|
||||
CVarSetColor(cvarName, colors);
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
|
@ -16,7 +16,7 @@
|
||||
#ifndef IMGUI_DEFINE_MATH_OPERATORS
|
||||
#define IMGUI_DEFINE_MATH_OPERATORS
|
||||
#endif
|
||||
#include <ImGui/imgui.h>
|
||||
#include <imgui.h>
|
||||
|
||||
namespace UIWidgets {
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
#include "ConfigUpdaters.h"
|
||||
#include "soh/Enhancements/audio/AudioCollection.h"
|
||||
|
||||
namespace LUS {
|
||||
namespace SOH {
|
||||
ConfigVersion1Updater::ConfigVersion1Updater() : ConfigVersionUpdater(1) {}
|
||||
ConfigVersion2Updater::ConfigVersion2Updater() : ConfigVersionUpdater(2) {}
|
||||
|
||||
void ConfigVersion1Updater::Update(Config* conf) {
|
||||
void ConfigVersion1Updater::Update(Ship::Config* conf) {
|
||||
if (conf->GetInt("Window.Width", 640) == 640) {
|
||||
conf->Erase("Window.Width");
|
||||
}
|
||||
@ -36,10 +36,10 @@ namespace LUS {
|
||||
if (conf->GetInt("Window.Fullscreen.Height", 1080) == 1080) {
|
||||
conf->Erase("Window.Fullscreen.Height");
|
||||
}
|
||||
if (conf->GetInt("Shortcuts.Fullscreen", KbScancode::LUS_KB_F11) == KbScancode::LUS_KB_F10) {
|
||||
if (conf->GetInt("Shortcuts.Fullscreen", Ship::KbScancode::LUS_KB_F11) == Ship::KbScancode::LUS_KB_F10) {
|
||||
conf->Erase("Shortcuts.Fullscreen");
|
||||
}
|
||||
if (conf->GetInt("Shortcuts.Console", KbScancode::LUS_KB_OEM_3) == KbScancode::LUS_KB_OEM_3) {
|
||||
if (conf->GetInt("Shortcuts.Console", Ship::KbScancode::LUS_KB_OEM_3) == Ship::KbScancode::LUS_KB_OEM_3) {
|
||||
conf->Erase("Shortcuts.Console");
|
||||
}
|
||||
if (conf->GetString("Game.SaveName", "") == "") {
|
||||
@ -52,7 +52,7 @@ namespace LUS {
|
||||
conf->Erase("Game.Patches Archive");
|
||||
}
|
||||
if (CVarGetInteger("gDirtPathFix", 0) != 0) {
|
||||
CVarSetInteger("gZFightingMode", CVarGetInteger("gDirtPathFix", 0));
|
||||
CVarSetInteger(CVAR_Z_FIGHTING_MODE, CVarGetInteger("gDirtPathFix", 0));
|
||||
CVarClear("gDirtPathFix");
|
||||
}
|
||||
if (CVarGetInteger("gRandomizedEnemies", 0) != 0) {
|
||||
@ -63,7 +63,7 @@ namespace LUS {
|
||||
CVarClear("gSeededRandomizedEnemies");
|
||||
}
|
||||
|
||||
void ConfigVersion2Updater::Update(Config* conf) {
|
||||
void ConfigVersion2Updater::Update(Ship::Config* conf) {
|
||||
for (auto seq : AudioCollection::Instance->GetAllSequences()) {
|
||||
CVarClear(std::string("gAudioEditor.ReplacedSequences." + seq.second.sfxKey).c_str());
|
||||
}
|
||||
|
@ -1,15 +1,15 @@
|
||||
#include "libultraship/libultraship.h"
|
||||
|
||||
namespace LUS {
|
||||
class ConfigVersion1Updater : public ConfigVersionUpdater {
|
||||
namespace SOH {
|
||||
class ConfigVersion1Updater : public Ship::ConfigVersionUpdater {
|
||||
public:
|
||||
ConfigVersion1Updater();
|
||||
void Update(Config* conf);
|
||||
void Update(Ship::Config* conf);
|
||||
};
|
||||
|
||||
class ConfigVersion2Updater : public ConfigVersionUpdater {
|
||||
class ConfigVersion2Updater : public Ship::ConfigVersionUpdater {
|
||||
public:
|
||||
ConfigVersion2Updater();
|
||||
void Update(Config* conf);
|
||||
void Update(Ship::Config* conf);
|
||||
};
|
||||
}
|
@ -3,13 +3,13 @@
|
||||
#include "spdlog/spdlog.h"
|
||||
|
||||
namespace SOH {
|
||||
std::shared_ptr<LUS::IResource> ResourceFactoryBinaryAnimationV0::ReadResource(std::shared_ptr<LUS::File> file) {
|
||||
std::shared_ptr<Ship::IResource> ResourceFactoryBinaryAnimationV0::ReadResource(std::shared_ptr<Ship::File> file) {
|
||||
if (!FileHasValidFormatAndReader(file)) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
auto animation = std::make_shared<Animation>(file->InitData);
|
||||
auto reader = std::get<std::shared_ptr<LUS::BinaryReader>>(file->Reader);
|
||||
auto reader = std::get<std::shared_ptr<Ship::BinaryReader>>(file->Reader);
|
||||
|
||||
AnimationType animType = (AnimationType)reader->ReadUInt32();
|
||||
animation->type = animType;
|
||||
|
@ -4,8 +4,8 @@
|
||||
#include "ResourceFactoryBinary.h"
|
||||
|
||||
namespace SOH {
|
||||
class ResourceFactoryBinaryAnimationV0 : public LUS::ResourceFactoryBinary {
|
||||
class ResourceFactoryBinaryAnimationV0 : public Ship::ResourceFactoryBinary {
|
||||
public:
|
||||
std::shared_ptr<LUS::IResource> ReadResource(std::shared_ptr<LUS::File> file) override;
|
||||
std::shared_ptr<Ship::IResource> ReadResource(std::shared_ptr<Ship::File> file) override;
|
||||
};
|
||||
} // namespace SOH
|
||||
|
@ -3,13 +3,13 @@
|
||||
#include "spdlog/spdlog.h"
|
||||
|
||||
namespace SOH {
|
||||
std::shared_ptr<LUS::IResource> ResourceFactoryBinaryAudioSampleV2::ReadResource(std::shared_ptr<LUS::File> file) {
|
||||
std::shared_ptr<Ship::IResource> ResourceFactoryBinaryAudioSampleV2::ReadResource(std::shared_ptr<Ship::File> file) {
|
||||
if (!FileHasValidFormatAndReader(file)) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
auto audioSample = std::make_shared<AudioSample>(file->InitData);
|
||||
auto reader = std::get<std::shared_ptr<LUS::BinaryReader>>(file->Reader);
|
||||
auto reader = std::get<std::shared_ptr<Ship::BinaryReader>>(file->Reader);
|
||||
|
||||
audioSample->sample.codec = reader->ReadUByte();
|
||||
audioSample->sample.medium = reader->ReadUByte();
|
||||
@ -71,7 +71,7 @@ extern "C" SoundFontSample* ReadCustomSample(const char* path) {
|
||||
|
||||
ExtensionEntry entry = ExtensionCache[path];
|
||||
|
||||
auto sampleRaw = LUS::Context::GetInstance()->GetResourceManager()->LoadFile(entry.path);
|
||||
auto sampleRaw = Ship::Context::GetInstance()->GetResourceManager()->LoadFile(entry.path);
|
||||
uint32_t* strem = (uint32_t*)sampleRaw->Buffer.get();
|
||||
uint8_t* strem2 = (uint8_t*)strem;
|
||||
|
||||
|
@ -4,8 +4,8 @@
|
||||
#include "ResourceFactoryBinary.h"
|
||||
|
||||
namespace SOH {
|
||||
class ResourceFactoryBinaryAudioSampleV2 : public LUS::ResourceFactoryBinary {
|
||||
class ResourceFactoryBinaryAudioSampleV2 : public Ship::ResourceFactoryBinary {
|
||||
public:
|
||||
std::shared_ptr<LUS::IResource> ReadResource(std::shared_ptr<LUS::File> file) override;
|
||||
std::shared_ptr<Ship::IResource> ReadResource(std::shared_ptr<Ship::File> file) override;
|
||||
};
|
||||
} // namespace SOH
|
||||
|
@ -3,13 +3,13 @@
|
||||
#include "spdlog/spdlog.h"
|
||||
|
||||
namespace SOH {
|
||||
std::shared_ptr<LUS::IResource> ResourceFactoryBinaryAudioSequenceV2::ReadResource(std::shared_ptr<LUS::File> file) {
|
||||
std::shared_ptr<Ship::IResource> ResourceFactoryBinaryAudioSequenceV2::ReadResource(std::shared_ptr<Ship::File> file) {
|
||||
if (!FileHasValidFormatAndReader(file)) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
auto audioSequence = std::make_shared<AudioSequence>(file->InitData);
|
||||
auto reader = std::get<std::shared_ptr<LUS::BinaryReader>>(file->Reader);
|
||||
auto reader = std::get<std::shared_ptr<Ship::BinaryReader>>(file->Reader);
|
||||
|
||||
audioSequence->sequence.seqDataSize = reader->ReadInt32();
|
||||
audioSequence->sequenceData.reserve(audioSequence->sequence.seqDataSize);
|
||||
|
@ -4,8 +4,8 @@
|
||||
#include "ResourceFactoryBinary.h"
|
||||
|
||||
namespace SOH {
|
||||
class ResourceFactoryBinaryAudioSequenceV2 : public LUS::ResourceFactoryBinary {
|
||||
class ResourceFactoryBinaryAudioSequenceV2 : public Ship::ResourceFactoryBinary {
|
||||
public:
|
||||
std::shared_ptr<LUS::IResource> ReadResource(std::shared_ptr<LUS::File> file) override;
|
||||
std::shared_ptr<Ship::IResource> ReadResource(std::shared_ptr<Ship::File> file) override;
|
||||
};
|
||||
} // namespace SOH
|
||||
|
@ -4,13 +4,13 @@
|
||||
#include "libultraship/libultraship.h"
|
||||
|
||||
namespace SOH {
|
||||
std::shared_ptr<LUS::IResource> ResourceFactoryBinaryAudioSoundFontV2::ReadResource(std::shared_ptr<LUS::File> file) {
|
||||
std::shared_ptr<Ship::IResource> ResourceFactoryBinaryAudioSoundFontV2::ReadResource(std::shared_ptr<Ship::File> file) {
|
||||
if (!FileHasValidFormatAndReader(file)) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
auto audioSoundFont = std::make_shared<AudioSoundFont>(file->InitData);
|
||||
auto reader = std::get<std::shared_ptr<LUS::BinaryReader>>(file->Reader);
|
||||
auto reader = std::get<std::shared_ptr<Ship::BinaryReader>>(file->Reader);
|
||||
|
||||
audioSoundFont->soundFont.fntIndex = reader->ReadInt32();
|
||||
audioSoundFont->medium = reader->ReadInt8();
|
||||
@ -67,7 +67,7 @@ std::shared_ptr<LUS::IResource> ResourceFactoryBinaryAudioSoundFontV2::ReadResou
|
||||
if (sampleFileName.empty()) {
|
||||
drum.sound.sample = nullptr;
|
||||
} else {
|
||||
auto res = LUS::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(sampleFileName.c_str());
|
||||
auto res = Ship::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(sampleFileName.c_str());
|
||||
drum.sound.sample = static_cast<Sample*>(res ? res->GetRawPointer() : nullptr);
|
||||
}
|
||||
|
||||
@ -111,7 +111,7 @@ std::shared_ptr<LUS::IResource> ResourceFactoryBinaryAudioSoundFontV2::ReadResou
|
||||
bool hasSampleRef = reader->ReadInt8();
|
||||
std::string sampleFileName = reader->ReadString();
|
||||
instrument.lowNotesSound.tuning = reader->ReadFloat();
|
||||
auto res = LUS::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(sampleFileName.c_str());
|
||||
auto res = Ship::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(sampleFileName.c_str());
|
||||
instrument.lowNotesSound.sample = static_cast<Sample*>(res ? res->GetRawPointer() : nullptr);
|
||||
} else {
|
||||
instrument.lowNotesSound.sample = nullptr;
|
||||
@ -123,7 +123,7 @@ std::shared_ptr<LUS::IResource> ResourceFactoryBinaryAudioSoundFontV2::ReadResou
|
||||
bool hasSampleRef = reader->ReadInt8();
|
||||
std::string sampleFileName = reader->ReadString();
|
||||
instrument.normalNotesSound.tuning = reader->ReadFloat();
|
||||
auto res = LUS::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(sampleFileName.c_str());
|
||||
auto res = Ship::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(sampleFileName.c_str());
|
||||
instrument.normalNotesSound.sample = static_cast<Sample*>(res ? res->GetRawPointer() : nullptr);
|
||||
} else {
|
||||
instrument.normalNotesSound.sample = nullptr;
|
||||
@ -135,7 +135,7 @@ std::shared_ptr<LUS::IResource> ResourceFactoryBinaryAudioSoundFontV2::ReadResou
|
||||
bool hasSampleRef = reader->ReadInt8();
|
||||
std::string sampleFileName = reader->ReadString();
|
||||
instrument.highNotesSound.tuning = reader->ReadFloat();
|
||||
auto res = LUS::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(sampleFileName.c_str());
|
||||
auto res = Ship::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(sampleFileName.c_str());
|
||||
instrument.highNotesSound.sample = static_cast<Sample*>(res ? res->GetRawPointer() : nullptr);
|
||||
} else {
|
||||
instrument.highNotesSound.sample = nullptr;
|
||||
@ -160,7 +160,7 @@ std::shared_ptr<LUS::IResource> ResourceFactoryBinaryAudioSoundFontV2::ReadResou
|
||||
bool hasSampleRef = reader->ReadInt8();
|
||||
std::string sampleFileName = reader->ReadString();
|
||||
soundEffect.tuning = reader->ReadFloat();
|
||||
auto res = LUS::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(sampleFileName.c_str());
|
||||
auto res = Ship::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(sampleFileName.c_str());
|
||||
soundEffect.sample = static_cast<Sample*>(res ? res->GetRawPointer() : nullptr);
|
||||
}
|
||||
|
||||
|
@ -4,8 +4,8 @@
|
||||
#include "ResourceFactoryBinary.h"
|
||||
|
||||
namespace SOH {
|
||||
class ResourceFactoryBinaryAudioSoundFontV2 : public LUS::ResourceFactoryBinary {
|
||||
class ResourceFactoryBinaryAudioSoundFontV2 : public Ship::ResourceFactoryBinary {
|
||||
public:
|
||||
std::shared_ptr<LUS::IResource> ReadResource(std::shared_ptr<LUS::File> file) override;
|
||||
std::shared_ptr<Ship::IResource> ReadResource(std::shared_ptr<Ship::File> file) override;
|
||||
};
|
||||
} // namespace SOH
|
||||
|
@ -3,13 +3,13 @@
|
||||
#include "spdlog/spdlog.h"
|
||||
|
||||
namespace SOH {
|
||||
std::shared_ptr<LUS::IResource> ResourceFactoryBinaryBackgroundV0::ReadResource(std::shared_ptr<LUS::File> file) {
|
||||
std::shared_ptr<Ship::IResource> ResourceFactoryBinaryBackgroundV0::ReadResource(std::shared_ptr<Ship::File> file) {
|
||||
if (!FileHasValidFormatAndReader(file)) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
auto background = std::make_shared<Background>(file->InitData);
|
||||
auto reader = std::get<std::shared_ptr<LUS::BinaryReader>>(file->Reader);
|
||||
auto reader = std::get<std::shared_ptr<Ship::BinaryReader>>(file->Reader);
|
||||
|
||||
uint32_t dataSize = reader->ReadUInt32();
|
||||
|
||||
|
@ -4,8 +4,8 @@
|
||||
#include "resource/ResourceFactoryBinary.h"
|
||||
|
||||
namespace SOH {
|
||||
class ResourceFactoryBinaryBackgroundV0 : public LUS::ResourceFactoryBinary {
|
||||
class ResourceFactoryBinaryBackgroundV0 : public Ship::ResourceFactoryBinary {
|
||||
public:
|
||||
std::shared_ptr<LUS::IResource> ReadResource(std::shared_ptr<LUS::File> file) override;
|
||||
std::shared_ptr<Ship::IResource> ReadResource(std::shared_ptr<Ship::File> file) override;
|
||||
};
|
||||
} // namespace SOH
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user