Skip to content

Commit

Permalink
Merge branch 'develop' into fix-nut-upgrade-retro
Browse files Browse the repository at this point in the history
  • Loading branch information
JordanLongstaff committed Jan 10, 2025
2 parents 15543db + 323ea2d commit 542bb5c
Show file tree
Hide file tree
Showing 101 changed files with 4,455 additions and 1,844 deletions.
7 changes: 7 additions & 0 deletions docs/GAME_CONTROLLER_DB.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,10 @@ This file is pulled from https://github.com/gabomdq/SDL_GameControllerDB during
| Spock Charlie 7.0.2 | [c5b4df0](https://github.com/gabomdq/SDL_GameControllerDB/tree/c5b4df0e1061175cb11e3ebbf8045178339864a5) | [+3](https://github.com/gabomdq/SDL_GameControllerDB/compare/228d980...c5b4df0) |
| Sulu Alfa 7.1.0 | [a2cf171](https://github.com/gabomdq/SDL_GameControllerDB/tree/a2cf1711b4ebc646a3814705d2fb6aac5707bcae) | [+4/-1](https://github.com/gabomdq/SDL_GameControllerDB/compare/c5b4df0...a2cf171) |
| Sulu Bravo 7.1.1 | [cc9f777](https://github.com/gabomdq/SDL_GameControllerDB/tree/cc9f777721f0cb30058d9eef52a295130b734a4a) | [+29/-9](https://github.com/gabomdq/SDL_GameControllerDB/compare/a2cf171...cc9f777) |
| MacReady Alfa 8.0.0 | [c56329f](https://github.com/gabomdq/SDL_GameControllerDB/tree/c56329f4df93fc7a780bdbeae47a9c91447b629c) | [+67/-23](https://github.com/gabomdq/SDL_GameControllerDB/compare/cc9f777...c56329f) |
| MacReady Bravo 8.0.1 | [721b575](https://github.com/gabomdq/SDL_GameControllerDB/tree/721b575d3053b21d6d30419bf74afb5b1d0fa7a4) | [+5/-5](https://github.com/gabomdq/SDL_GameControllerDB/compare/c56329f...721b575) |
| MacReady Charlie 8.0.2 | [721b575](https://github.com/gabomdq/SDL_GameControllerDB/tree/721b575d3053b21d6d30419bf74afb5b1d0fa7a4) | [+0/-0](https://github.com/gabomdq/SDL_GameControllerDB/compare/721b575...721b575) |
| MacReady Delta 8.0.3 | [d4ab609](https://github.com/gabomdq/SDL_GameControllerDB/tree/d4ab609121ee6e687bc3d3a7e80244b3b26d1164) | [+5/-3](https://github.com/gabomdq/SDL_GameControllerDB/compare/721b575...d4ab609) |
| MacReady Echo 8.0.4 | [6555d47](https://github.com/gabomdq/SDL_GameControllerDB/tree/6555d47ecb5d9eebac0e3d8cd19a545e9d946c40) | [+2/-0](https://github.com/gabomdq/SDL_GameControllerDB/compare/d4ab609...6555d47) |
| MacReady Foxtrot 8.0.5 | [037d6a1](https://github.com/gabomdq/SDL_GameControllerDB/tree/037d6a1533ed94fbc6a8c71e6f1f9aff1e46208a) | [+47/-14](https://github.com/gabomdq/SDL_GameControllerDB/compare/6555d47...037d6a1) |
| MacReady Golf 8.0.6 | [075c154](https://github.com/gabomdq/SDL_GameControllerDB/tree/075c1549075ef89a397fd7e0663d21e53a2485fd) | [+340/-301](https://github.com/gabomdq/SDL_GameControllerDB/compare/037d6a1...075c154) |
2 changes: 1 addition & 1 deletion libultraship
Submodule libultraship updated 67 files
+31 −1 src/controller/controldeck/ControlDeck.cpp
+3 −0 src/controller/controldeck/ControlDeck.h
+10 −0 src/controller/controldevice/controller/Controller.cpp
+1 −0 src/controller/controldevice/controller/Controller.h
+47 −7 src/controller/controldevice/controller/ControllerButton.cpp
+3 −1 src/controller/controldevice/controller/ControllerButton.h
+49 −8 src/controller/controldevice/controller/ControllerStick.cpp
+3 −1 src/controller/controldevice/controller/ControllerStick.h
+1 −1 src/controller/controldevice/controller/mapping/ControllerAxisDirectionMapping.cpp
+1 −1 src/controller/controldevice/controller/mapping/ControllerAxisDirectionMapping.h
+1 −1 src/controller/controldevice/controller/mapping/ControllerButtonMapping.cpp
+1 −1 src/controller/controldevice/controller/mapping/ControllerButtonMapping.h
+2 −1 src/controller/controldevice/controller/mapping/ControllerMapping.h
+52 −0 src/controller/controldevice/controller/mapping/factories/AxisDirectionMappingFactory.cpp
+3 −0 src/controller/controldevice/controller/mapping/factories/AxisDirectionMappingFactory.h
+33 −0 src/controller/controldevice/controller/mapping/factories/ButtonMappingFactory.cpp
+3 −0 src/controller/controldevice/controller/mapping/factories/ButtonMappingFactory.h
+1 −1 src/controller/controldevice/controller/mapping/keyboard/KeyboardKeyToAxisDirectionMapping.cpp
+1 −1 src/controller/controldevice/controller/mapping/keyboard/KeyboardKeyToAxisDirectionMapping.h
+1 −1 src/controller/controldevice/controller/mapping/keyboard/KeyboardKeyToButtonMapping.cpp
+1 −1 src/controller/controldevice/controller/mapping/keyboard/KeyboardKeyToButtonMapping.h
+25 −0 src/controller/controldevice/controller/mapping/keyboard/KeyboardScancodes.h
+35 −0 src/controller/controldevice/controller/mapping/mouse/MouseButtonToAnyMapping.cpp
+20 −0 src/controller/controldevice/controller/mapping/mouse/MouseButtonToAnyMapping.h
+49 −0 src/controller/controldevice/controller/mapping/mouse/MouseButtonToAxisDirectionMapping.cpp
+17 −0 src/controller/controldevice/controller/mapping/mouse/MouseButtonToAxisDirectionMapping.h
+51 −0 src/controller/controldevice/controller/mapping/mouse/MouseButtonToButtonMapping.cpp
+17 −0 src/controller/controldevice/controller/mapping/mouse/MouseButtonToButtonMapping.h
+26 −0 src/controller/controldevice/controller/mapping/mouse/MouseWheelToAnyMapping.cpp
+18 −0 src/controller/controldevice/controller/mapping/mouse/MouseWheelToAnyMapping.h
+56 −0 src/controller/controldevice/controller/mapping/mouse/MouseWheelToAxisDirectionMapping.cpp
+18 −0 src/controller/controldevice/controller/mapping/mouse/MouseWheelToAxisDirectionMapping.h
+53 −0 src/controller/controldevice/controller/mapping/mouse/MouseWheelToButtonMapping.cpp
+17 −0 src/controller/controldevice/controller/mapping/mouse/MouseWheelToButtonMapping.h
+102 −0 src/controller/controldevice/controller/mapping/mouse/WheelHandler.cpp
+36 −0 src/controller/controldevice/controller/mapping/mouse/WheelHandler.h
+1 −1 src/controller/controldevice/controller/mapping/sdl/SDLAxisDirectionToAnyMapping.cpp
+1 −1 src/controller/controldevice/controller/mapping/sdl/SDLAxisDirectionToAxisDirectionMapping.cpp
+1 −1 src/controller/controldevice/controller/mapping/sdl/SDLAxisDirectionToAxisDirectionMapping.h
+1 −1 src/controller/controldevice/controller/mapping/sdl/SDLAxisDirectionToButtonMapping.cpp
+1 −1 src/controller/controldevice/controller/mapping/sdl/SDLAxisDirectionToButtonMapping.h
+1 −1 src/controller/controldevice/controller/mapping/sdl/SDLButtonToAxisDirectionMapping.cpp
+1 −1 src/controller/controldevice/controller/mapping/sdl/SDLButtonToAxisDirectionMapping.h
+1 −1 src/controller/controldevice/controller/mapping/sdl/SDLButtonToButtonMapping.cpp
+1 −1 src/controller/controldevice/controller/mapping/sdl/SDLButtonToButtonMapping.h
+1 −0 src/controller/deviceindex/ShipDeviceIndex.h
+3 −0 src/controller/deviceindex/ShipDeviceIndexMappingManager.cpp
+22 −4 src/graphic/Fast3D/Fast3dWindow.cpp
+3 −0 src/graphic/Fast3D/Fast3dWindow.h
+83 −21 src/graphic/Fast3D/gfx_dxgi.cpp
+0 −1 src/graphic/Fast3D/gfx_opengl.cpp
+29 −3 src/graphic/Fast3D/gfx_sdl2.cpp
+1 −0 src/graphic/Fast3D/gfx_window_manager_api.h
+4 −4 src/public/bridge/resourcebridge.cpp
+59 −41 src/resource/ResourceManager.cpp
+39 −22 src/resource/ResourceManager.h
+33 −2 src/resource/archive/ArchiveManager.cpp
+4 −1 src/resource/archive/ArchiveManager.h
+2 −3 src/utils/glob.c
+1 −2 src/window/Window.h
+13 −0 src/window/gui/GameOverlay.cpp
+1 −0 src/window/gui/GameOverlay.h
+52 −8 src/window/gui/Gui.cpp
+4 −0 src/window/gui/Gui.h
+66 −2 src/window/gui/InputEditorWindow.cpp
+1 −0 src/window/gui/InputEditorWindow.h
+1 −1 src/window/gui/resource/Font.cpp
19 changes: 19 additions & 0 deletions soh/assets/soh_assets.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,3 +162,22 @@ static const ALIGN_ASSET(2) char gFileSelLanguageGERTex[] = dgFileSelLanguageGER

#define dgEmptyTexture "__OTR__textures/virtual/gEmptyTexture"
static const ALIGN_ASSET(2) char gEmptyTexture[] = dgEmptyTexture;

// Custom Tunic Models
#define dgLinkChildKokiriTunicSkel "__OTR__objects/object_link_child_kokiri/gLinkChildKokiriTunicSkel"
static const ALIGN_ASSET(2) char gLinkChildKokiriTunicSkel[] = dgLinkChildKokiriTunicSkel;

#define dgLinkChildGoronTunicSkel "__OTR__objects/object_link_child_goron/gLinkChildGoronTunicSkel"
static const ALIGN_ASSET(2) char gLinkChildGoronTunicSkel[] = dgLinkChildGoronTunicSkel;

#define dgLinkChildZoraTunicSkel "__OTR__objects/object_link_child_zora/gLinkChildZoraTunicSkel"
static const ALIGN_ASSET(2) char gLinkChildZoraTunicSkel[] = dgLinkChildZoraTunicSkel;

#define dgLinkAdultKokiriTunicSkel "__OTR__objects/object_link_boy_kokiri/gLinkAdultKokiriTunicSkel"
static const ALIGN_ASSET(2) char gLinkAdultKokiriTunicSkel[] = dgLinkAdultKokiriTunicSkel;

#define dgLinkAdultGoronTunicSkel "__OTR__objects/object_link_boy_goron/gLinkAdultGoronTunicSkel"
static const ALIGN_ASSET(2) char gLinkAdultGoronTunicSkel[] = dgLinkAdultGoronTunicSkel;

#define dgLinkAdultZoraTunicSkel "__OTR__objects/object_link_boy_zora/gLinkAdultZoraTunicSkel"
static const ALIGN_ASSET(2) char gLinkAdultZoraTunicSkel[] = dgLinkAdultZoraTunicSkel;
3 changes: 3 additions & 0 deletions soh/include/z64.h
Original file line number Diff line number Diff line change
Expand Up @@ -1597,6 +1597,9 @@ typedef struct {
uint8_t bossRushOffset;
int16_t bossRushUIAlpha;
uint16_t bossRushArrowOffset;
uint8_t randomizerIndex;
int16_t randomizerUIAlpha;
uint16_t randomizerArrowOffset;
} FileChooseContext; // size = 0x1CAE0

// Macros for `EntranceInfo.field`
Expand Down
26 changes: 26 additions & 0 deletions soh/soh/Enhancements/Cheats/MoonJump.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#include <libultraship/bridge.h>
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include "soh/ShipInit.hpp"

extern "C" {
#include "macros.h"
extern PlayState* gPlayState;
}

#define CVAR_MOON_JUMP_NAME "gCheats.MoonJumpOnL"
#define CVAR_MOON_JUMP_DEFAULT 0
#define CVAR_MOON_JUMP_VALUE CVarGetInteger(CVAR_MOON_JUMP_NAME, CVAR_MOON_JUMP_DEFAULT)

void OnPlayerUpdateMoonJump() {
Player* player = GET_PLAYER(gPlayState);

if (player != nullptr && CHECK_BTN_ANY(gPlayState->state.input[0].cur.button, BTN_L)) {
player->actor.velocity.y = 6.34375f;
}
}

void RegisterMoonJump() {
COND_HOOK(OnPlayerUpdate, CVAR_MOON_JUMP_VALUE, OnPlayerUpdateMoonJump);
}

static RegisterShipInitFunc initFunc(RegisterMoonJump, { CVAR_MOON_JUMP_NAME });
69 changes: 69 additions & 0 deletions soh/soh/Enhancements/FileSelectEnhancements.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
#include "FileSelectEnhancements.h"

#include "soh/OTRGlobals.h"

#include <array>
#include <string>
#include <vector>

std::array<std::string, LANGUAGE_MAX> RandomizerSettingsMenuText[RSM_MAX] = {
{
// English
"Start Randomizer",
// German
"Start Randomizer",
// French
"Start Randomizer",
},
{
// English
"Generate New Randomizer Seed",
// German
"Generate New Randomizer Seed",
// French
"Generate New Randomizer Seed",
},
{
// English
"Open Randomizer Settings",
// German
"Open Randomizer Settings",
// French
"Open Randomizer Settings",
},
{
// English
"Generating...",
// German
"Generating...",
// French
"Generating...",
},
{
// English
"No randomizer seed loaded.\nPlease generate one first"
#if defined(__WIIU__) || defined(__SWITCH__)
".",
#else
",\nor drop a spoiler log on the game window.",
#endif
// German
"No randomizer seed loaded.\nPlease generate one first"
#if defined(__WIIU__) || defined(__SWITCH__)
".",
#else
",\nor drop a spoiler log on the game window.",
#endif
// French
"Aucune Seed de Randomizer actuellement disponible.\nGénérez-en une dans les \"Randomizer Settings\""
#if (defined(__WIIU__) || defined(__SWITCH__))
"."
#else
"\nou glissez un spoilerlog sur la fenêtre du jeu."
#endif
},
};

const char* SohFileSelect_GetSettingText(uint8_t optionIndex, uint8_t language) {
return RandomizerSettingsMenuText[optionIndex][language].c_str();
}
23 changes: 23 additions & 0 deletions soh/soh/Enhancements/FileSelectEnhancements.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#ifndef FILE_SELECT_ENHANCEMENTS_H
#define FILE_SELECT_ENHANCEMENTS_H

#include "z64.h"

#ifdef __cplusplus
extern "C" {
#endif
const char* SohFileSelect_GetSettingText(u8 optionIndex, u8 language);
#ifdef __cplusplus
};
#endif

typedef enum {
RSM_START_RANDOMIZER,
RSM_GENERATE_RANDOMIZER,
RSM_OPEN_RANDOMIZER_SETTINGS,
RSM_GENERATING,
RSM_NO_RANDOMIZER_GENERATED,
RSM_MAX,
} RandomizerSettingsMenuEnums;

#endif
4 changes: 2 additions & 2 deletions soh/soh/Enhancements/controls/SohInputEditorWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1582,9 +1582,9 @@ void SohInputEditorWindow::DrawCameraControlPanel() {
UIWidgets::PaddedEnhancementCheckbox("Invert Aiming Y Axis", CVAR_SETTING("Controls.InvertAimingYAxis"), true, true, false, "", UIWidgets::CheckboxGraphics::Cross, true);
UIWidgets::Tooltip("Inverts the Camera Y Axis in:\n-First-Person/C-Up view\n-Weapon Aiming");
UIWidgets::PaddedEnhancementCheckbox("Invert Shield Aiming X Axis", CVAR_SETTING("Controls.InvertShieldAimingXAxis"), true, true, false, "", UIWidgets::CheckboxGraphics::Cross, true);
UIWidgets::Tooltip("Inverts the Shield Aiming Y Axis");
UIWidgets::PaddedEnhancementCheckbox("Invert Shield Aiming Y Axis", CVAR_SETTING("Controls.InvertShieldAimingYAxis"));
UIWidgets::Tooltip("Inverts the Shield Aiming X Axis");
UIWidgets::PaddedEnhancementCheckbox("Invert Shield Aiming Y Axis", CVAR_SETTING("Controls.InvertShieldAimingYAxis"));
UIWidgets::Tooltip("Inverts the Shield Aiming Y Axis");
UIWidgets::PaddedEnhancementCheckbox("Invert Z-Weapon Aiming Y Axis", CVAR_SETTING("Controls.InvertZAimingYAxis"), true, true, false, "", UIWidgets::CheckboxGraphics::Cross, true);
UIWidgets::Tooltip("Inverts the Camera Y Axis in:\n-Z-Weapon Aiming");
UIWidgets::PaddedEnhancementCheckbox("Disable Auto-Centering in First-Person View", CVAR_SETTING("DisableFirstPersonAutoCenterView"));
Expand Down
7 changes: 3 additions & 4 deletions soh/soh/Enhancements/cosmetics/CosmeticsEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1445,11 +1445,10 @@ void Reset_Option_Double(const char* Button_Title, const char* name) {

void DrawSillyTab() {
ImGui::BeginDisabled(CVarGetInteger(CVAR_SETTING("DisableChanges"), 0));
if (CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) {
if (UIWidgets::EnhancementCheckbox("Let It Snow", CVAR_GENERAL("LetItSnow"))) {
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
}
if (UIWidgets::EnhancementCheckbox("Let It Snow", CVAR_GENERAL("LetItSnow"))) {
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
}
UIWidgets::Tooltip("Makes snow fall, changes chest texture colors to red and green, etc, for December holidays.\nWill reset on restart outside of December 23-25.");
if (UIWidgets::EnhancementSliderFloat("Link Body Scale: %.3fx", "##Link_BodyScale", CVAR_COSMETIC("Link.BodyScale.Value"), 0.001f, 0.025f, "", 0.01f, true)) {
CVarSetInteger(CVAR_COSMETIC("Link.BodyScale.Changed"), 1);
}
Expand Down
4 changes: 2 additions & 2 deletions soh/soh/Enhancements/debugger/debugSaveEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1133,15 +1133,15 @@ void DrawEquipmentTab() {
"20",
"30",
};
DrawUpgrade("Sticks", UPG_STICKS, stickNames);
DrawUpgrade("Deku Stick Capacity", UPG_STICKS, stickNames);

const std::vector<std::string> nutNames = {
"None",
"20",
"30",
"40",
};
DrawUpgrade("Deku Nuts", UPG_NUTS, nutNames);
DrawUpgrade("Deku Nut Capacity", UPG_NUTS, nutNames);
}

// Draws a toggleable icon for a quest item that is faded when disabled
Expand Down
Loading

0 comments on commit 542bb5c

Please sign in to comment.