mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-20 13:23:45 -07:00
Merge branch 'HarbourMasters:develop' into openclose_disp_macro
This commit is contained in:
commit
0ef8463fce
36 changed files with 543 additions and 534 deletions
|
@ -1,11 +1,11 @@
|
||||||
#include "SohConsole.h"
|
#include "Console.h"
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
#include "Cvar.h"
|
#include "Cvar.h"
|
||||||
#include "GlobalCtx2.h"
|
#include "GlobalCtx2.h"
|
||||||
#include "SohImGuiImpl.h"
|
#include "ImGuiImpl.h"
|
||||||
#include "Lib/ImGui/imgui.h"
|
#include "Lib/ImGui/imgui.h"
|
||||||
#include "Utils/StringHelper.h"
|
#include "Utils/StringHelper.h"
|
||||||
#include "Lib/ImGui/imgui_internal.h"
|
#include "Lib/ImGui/imgui_internal.h"
|
|
@ -4,8 +4,8 @@
|
||||||
#include "File.h"
|
#include "File.h"
|
||||||
#include "Archive.h"
|
#include "Archive.h"
|
||||||
#include "ResourceMgr.h"
|
#include "ResourceMgr.h"
|
||||||
#include "SohConsole.h"
|
#include "Console.h"
|
||||||
#include "SohImGuiImpl.h"
|
#include "ImGuiImpl.h"
|
||||||
#include "TextureMod.h"
|
#include "TextureMod.h"
|
||||||
#include "Lib/ImGui/imgui_internal.h"
|
#include "Lib/ImGui/imgui_internal.h"
|
||||||
#include "Utils/StringHelper.h"
|
#include "Utils/StringHelper.h"
|
||||||
|
|
|
@ -10,9 +10,9 @@
|
||||||
#include "ConfigFile.h"
|
#include "ConfigFile.h"
|
||||||
#include "Cvar.h"
|
#include "Cvar.h"
|
||||||
#include "GlobalCtx2.h"
|
#include "GlobalCtx2.h"
|
||||||
#include "SohImGuiImpl.h"
|
#include "ImGuiImpl.h"
|
||||||
#include "../../soh/include/z64audio.h"
|
#include "../../soh/include/z64audio.h"
|
||||||
#include "SohHooks.h"
|
#include "Hooks.h"
|
||||||
#include "../../soh/soh/Enhancements/debugconsole.h"
|
#include "../../soh/soh/Enhancements/debugconsole.h"
|
||||||
|
|
||||||
#include "Window.h"
|
#include "Window.h"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#include "SohHooks.h"
|
#include "Hooks.h"
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
|
@ -1,4 +1,4 @@
|
||||||
#include "SohImGuiImpl.h"
|
#include "ImGuiImpl.h"
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
@ -10,8 +10,8 @@
|
||||||
#include "Archive.h"
|
#include "Archive.h"
|
||||||
#include "Environment.h"
|
#include "Environment.h"
|
||||||
#include "GameSettings.h"
|
#include "GameSettings.h"
|
||||||
#include "SohConsole.h"
|
#include "Console.h"
|
||||||
#include "SohHooks.h"
|
#include "Hooks.h"
|
||||||
#include "Lib/ImGui/imgui_internal.h"
|
#include "Lib/ImGui/imgui_internal.h"
|
||||||
#include "GlobalCtx2.h"
|
#include "GlobalCtx2.h"
|
||||||
#include "ResourceMgr.h"
|
#include "ResourceMgr.h"
|
||||||
|
@ -354,10 +354,10 @@ namespace SohImGui {
|
||||||
}
|
}
|
||||||
|
|
||||||
for (size_t pixel = 0; pixel < texBuffer.size() / 4; pixel++) {
|
for (size_t pixel = 0; pixel < texBuffer.size() / 4; pixel++) {
|
||||||
texBuffer[pixel * 4 + 0] *= (uint8_t)tint.x;
|
texBuffer[pixel * 4 + 0] *= tint.x;
|
||||||
texBuffer[pixel * 4 + 1] *= (uint8_t)tint.y;
|
texBuffer[pixel * 4 + 1] *= tint.y;
|
||||||
texBuffer[pixel * 4 + 2] *= (uint8_t)tint.z;
|
texBuffer[pixel * 4 + 2] *= tint.z;
|
||||||
texBuffer[pixel * 4 + 3] *= (uint8_t)tint.w;
|
texBuffer[pixel * 4 + 3] *= tint.w;
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto asset = new GameAsset{ api->new_texture() };
|
const auto asset = new GameAsset{ api->new_texture() };
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
#include "GameOverlay.h"
|
#include "GameOverlay.h"
|
||||||
#include "Lib/ImGui/imgui.h"
|
#include "Lib/ImGui/imgui.h"
|
||||||
#include "SohConsole.h"
|
#include "Console.h"
|
||||||
|
|
||||||
struct GameAsset {
|
struct GameAsset {
|
||||||
uint32_t textureId;
|
uint32_t textureId;
|
|
@ -24,7 +24,7 @@
|
||||||
#include "gfx_dxgi.h"
|
#include "gfx_dxgi.h"
|
||||||
|
|
||||||
#include "gfx_screen_config.h"
|
#include "gfx_screen_config.h"
|
||||||
#include "../../SohImGuiImpl.h"
|
#include "../../ImGuiImpl.h"
|
||||||
|
|
||||||
#include "gfx_cc.h"
|
#include "gfx_cc.h"
|
||||||
#include "gfx_rendering_api.h"
|
#include "gfx_rendering_api.h"
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#include "gfx_direct3d_common.h"
|
#include "gfx_direct3d_common.h"
|
||||||
#include "gfx_screen_config.h"
|
#include "gfx_screen_config.h"
|
||||||
#include "gfx_pc.h"
|
#include "gfx_pc.h"
|
||||||
#include "../../SohImGuiImpl.h"
|
#include "../../ImGuiImpl.h"
|
||||||
|
|
||||||
#define DECLARE_GFX_DXGI_FUNCTIONS
|
#define DECLARE_GFX_DXGI_FUNCTIONS
|
||||||
#include "gfx_dxgi.h"
|
#include "gfx_dxgi.h"
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
|
|
||||||
#include "gfx_cc.h"
|
#include "gfx_cc.h"
|
||||||
#include "gfx_rendering_api.h"
|
#include "gfx_rendering_api.h"
|
||||||
#include "../../SohImGuiImpl.h"
|
#include "../../ImGuiImpl.h"
|
||||||
#include "../../Environment.h"
|
#include "../../Environment.h"
|
||||||
#include "../../GlobalCtx2.h"
|
#include "../../GlobalCtx2.h"
|
||||||
#include "gfx_pc.h"
|
#include "gfx_pc.h"
|
||||||
|
|
|
@ -25,11 +25,11 @@
|
||||||
#include "gfx_window_manager_api.h"
|
#include "gfx_window_manager_api.h"
|
||||||
#include "gfx_rendering_api.h"
|
#include "gfx_rendering_api.h"
|
||||||
#include "gfx_screen_config.h"
|
#include "gfx_screen_config.h"
|
||||||
#include "../../SohHooks.h"
|
#include "../../Hooks.h"
|
||||||
|
|
||||||
#include "../../luslog.h"
|
#include "../../luslog.h"
|
||||||
#include "../StrHash64.h"
|
#include "../StrHash64.h"
|
||||||
#include "../../SohImGuiImpl.h"
|
#include "../../ImGuiImpl.h"
|
||||||
#include "../../Environment.h"
|
#include "../../Environment.h"
|
||||||
#include "../../GameVersions.h"
|
#include "../../GameVersions.h"
|
||||||
#include "../../ResourceMgr.h"
|
#include "../../ResourceMgr.h"
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#include <SDL2/SDL_opengles2.h>
|
#include <SDL2/SDL_opengles2.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "../../SohImGuiImpl.h"
|
#include "../../ImGuiImpl.h"
|
||||||
|
|
||||||
#include "gfx_window_manager_api.h"
|
#include "gfx_window_manager_api.h"
|
||||||
#include "gfx_screen_config.h"
|
#include "gfx_screen_config.h"
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
#include <spdlog/details/os.h>
|
#include <spdlog/details/os.h>
|
||||||
#include <spdlog/sinks/base_sink.h>
|
#include <spdlog/sinks/base_sink.h>
|
||||||
#include <spdlog/details/synchronous_factory.h>
|
#include <spdlog/details/synchronous_factory.h>
|
||||||
#include "SohImGuiImpl.h"
|
#include "ImGuiImpl.h"
|
||||||
#include "GameSettings.h"
|
#include "GameSettings.h"
|
||||||
#include "Cvar.h"
|
#include "Cvar.h"
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#include "ModManager.h"
|
#include "ModManager.h"
|
||||||
#include "TextureMod.h"
|
#include "TextureMod.h"
|
||||||
#include "ModModule.h"
|
#include "ModModule.h"
|
||||||
#include "SohImGuiImpl.h"
|
#include "ImGuiImpl.h"
|
||||||
|
|
||||||
namespace Ship {
|
namespace Ship {
|
||||||
std::vector<ModModule*> modules;
|
std::vector<ModModule*> modules;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
#include "ModManager.h"
|
#include "ModManager.h"
|
||||||
#include "SohHooks.h"
|
#include "Hooks.h"
|
||||||
#include "SohConsole.h"
|
#include "Console.h"
|
||||||
#include "Archive.h"
|
#include "Archive.h"
|
||||||
|
|
||||||
namespace Ship {
|
namespace Ship {
|
||||||
|
|
|
@ -26,8 +26,8 @@
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include "SohHooks.h"
|
#include "Hooks.h"
|
||||||
#include "SohConsole.h"
|
#include "Console.h"
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
|
|
@ -267,7 +267,7 @@
|
||||||
<ClCompile Include="mixer.c" />
|
<ClCompile Include="mixer.c" />
|
||||||
<ClCompile Include="ModManager.cpp" />
|
<ClCompile Include="ModManager.cpp" />
|
||||||
<ClCompile Include="SDLAudioPlayer.cpp" />
|
<ClCompile Include="SDLAudioPlayer.cpp" />
|
||||||
<ClCompile Include="SohConsole.cpp" />
|
<ClCompile Include="Console.cpp" />
|
||||||
<ClCompile Include="Factories\AnimationFactory.cpp" />
|
<ClCompile Include="Factories\AnimationFactory.cpp" />
|
||||||
<ClCompile Include="Factories\ArrayFactory.cpp" />
|
<ClCompile Include="Factories\ArrayFactory.cpp" />
|
||||||
<ClCompile Include="Factories\BlobFactory.cpp" />
|
<ClCompile Include="Factories\BlobFactory.cpp" />
|
||||||
|
@ -281,8 +281,8 @@
|
||||||
<ClCompile Include="Array.cpp" />
|
<ClCompile Include="Array.cpp" />
|
||||||
<ClCompile Include="ConfigFile.cpp" />
|
<ClCompile Include="ConfigFile.cpp" />
|
||||||
<ClCompile Include="Controller.cpp" />
|
<ClCompile Include="Controller.cpp" />
|
||||||
<ClCompile Include="SohHooks.cpp" />
|
<ClCompile Include="Hooks.cpp" />
|
||||||
<ClCompile Include="SohImGuiImpl.cpp" />
|
<ClCompile Include="ImGuiImpl.cpp" />
|
||||||
<ClCompile Include="KeyboardController.cpp" />
|
<ClCompile Include="KeyboardController.cpp" />
|
||||||
<ClCompile Include="Factories\CollisionHeaderFactory.cpp" />
|
<ClCompile Include="Factories\CollisionHeaderFactory.cpp" />
|
||||||
<ClCompile Include="Factories\DisplayListFactory.cpp" />
|
<ClCompile Include="Factories\DisplayListFactory.cpp" />
|
||||||
|
@ -362,7 +362,7 @@
|
||||||
<ClInclude Include="ModManager.h" />
|
<ClInclude Include="ModManager.h" />
|
||||||
<ClInclude Include="ModModule.h" />
|
<ClInclude Include="ModModule.h" />
|
||||||
<ClInclude Include="SDLAudioPlayer.h" />
|
<ClInclude Include="SDLAudioPlayer.h" />
|
||||||
<ClInclude Include="SohConsole.h" />
|
<ClInclude Include="Console.h" />
|
||||||
<ClInclude Include="Factories\ArrayFactory.h" />
|
<ClInclude Include="Factories\ArrayFactory.h" />
|
||||||
<ClInclude Include="Factories\BlobFactory.h" />
|
<ClInclude Include="Factories\BlobFactory.h" />
|
||||||
<ClInclude Include="Factories\CutsceneFactory.h" />
|
<ClInclude Include="Factories\CutsceneFactory.h" />
|
||||||
|
@ -375,8 +375,8 @@
|
||||||
<ClInclude Include="Animation.h" />
|
<ClInclude Include="Animation.h" />
|
||||||
<ClInclude Include="Array.h" />
|
<ClInclude Include="Array.h" />
|
||||||
<ClInclude Include="Cutscene.h" />
|
<ClInclude Include="Cutscene.h" />
|
||||||
<ClInclude Include="SohHooks.h" />
|
<ClInclude Include="Hooks.h" />
|
||||||
<ClInclude Include="SohImGuiImpl.h" />
|
<ClInclude Include="ImGuiImpl.h" />
|
||||||
<ClInclude Include="Lib\Fast3D\gfx_cc.h" />
|
<ClInclude Include="Lib\Fast3D\gfx_cc.h" />
|
||||||
<ClInclude Include="Lib\Fast3D\gfx_direct3d11.h" />
|
<ClInclude Include="Lib\Fast3D\gfx_direct3d11.h" />
|
||||||
<ClInclude Include="Lib\Fast3D\gfx_direct3d12.h" />
|
<ClInclude Include="Lib\Fast3D\gfx_direct3d12.h" />
|
||||||
|
|
|
@ -300,10 +300,10 @@
|
||||||
<ClCompile Include="Lib\ImGui\backends\imgui_impl_sdl.cpp">
|
<ClCompile Include="Lib\ImGui\backends\imgui_impl_sdl.cpp">
|
||||||
<Filter>Source Files\Lib\ImGui</Filter>
|
<Filter>Source Files\Lib\ImGui</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="SohImGuiImpl.cpp">
|
<ClCompile Include="ImGuiImpl.cpp">
|
||||||
<Filter>Source Files\CustomImpl</Filter>
|
<Filter>Source Files\CustomImpl</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="SohConsole.cpp">
|
<ClCompile Include="Console.cpp">
|
||||||
<Filter>Source Files\CustomImpl</Filter>
|
<Filter>Source Files\CustomImpl</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="Lib\ImGui\backends\imgui_impl_dx11.cpp">
|
<ClCompile Include="Lib\ImGui\backends\imgui_impl_dx11.cpp">
|
||||||
|
@ -336,7 +336,7 @@
|
||||||
<ClCompile Include="ModManager.cpp">
|
<ClCompile Include="ModManager.cpp">
|
||||||
<Filter>Source Files\ModManager</Filter>
|
<Filter>Source Files\ModManager</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="SohHooks.cpp">
|
<ClCompile Include="Hooks.cpp">
|
||||||
<Filter>Source Files\CustomImpl\Hooks</Filter>
|
<Filter>Source Files\CustomImpl\Hooks</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="luslog.cpp">
|
<ClCompile Include="luslog.cpp">
|
||||||
|
@ -584,10 +584,10 @@
|
||||||
<ClInclude Include="Lib\ImGui\backends\imgui_impl_sdl.h">
|
<ClInclude Include="Lib\ImGui\backends\imgui_impl_sdl.h">
|
||||||
<Filter>Source Files\Lib\ImGui</Filter>
|
<Filter>Source Files\Lib\ImGui</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="SohImGuiImpl.h">
|
<ClInclude Include="ImGuiImpl.h">
|
||||||
<Filter>Source Files\CustomImpl</Filter>
|
<Filter>Source Files\CustomImpl</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="SohConsole.h">
|
<ClInclude Include="Console.h">
|
||||||
<Filter>Source Files\CustomImpl</Filter>
|
<Filter>Source Files\CustomImpl</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="Lib\ImGui\backends\imgui_impl_dx11.h">
|
<ClInclude Include="Lib\ImGui\backends\imgui_impl_dx11.h">
|
||||||
|
@ -632,7 +632,7 @@
|
||||||
<ClInclude Include="ModModule.h">
|
<ClInclude Include="ModModule.h">
|
||||||
<Filter>Source Files\ModManager\ModModule</Filter>
|
<Filter>Source Files\ModManager\ModModule</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="SohHooks.h">
|
<ClInclude Include="Hooks.h">
|
||||||
<Filter>Source Files\CustomImpl\Hooks</Filter>
|
<Filter>Source Files\CustomImpl\Hooks</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="luslog.h">
|
<ClInclude Include="luslog.h">
|
||||||
|
|
|
@ -364,7 +364,7 @@ void aS8DecImpl(uint8_t flags, ADPCM_STATE state) {
|
||||||
memcpy(state, out - 16, 16 * sizeof(int16_t));
|
memcpy(state, out - 16, 16 * sizeof(int16_t));
|
||||||
}
|
}
|
||||||
|
|
||||||
void aAddMixerImpl(uint16_t in_addr, uint16_t out_addr, uint16_t count) {
|
void aAddMixerImpl(uint16_t count, uint16_t in_addr, uint16_t out_addr) {
|
||||||
int16_t *in = BUF_S16(in_addr);
|
int16_t *in = BUF_S16(in_addr);
|
||||||
int16_t *out = BUF_S16(out_addr);
|
int16_t *out = BUF_S16(out_addr);
|
||||||
int nbytes = ROUND_UP_64(ROUND_DOWN_16(count));
|
int nbytes = ROUND_UP_64(ROUND_DOWN_16(count));
|
||||||
|
|
|
@ -51,7 +51,7 @@ void aEnvMixerImpl(uint16_t in_addr, uint16_t n_samples, bool swap_reverb,
|
||||||
int32_t wet_dry_addr, u32 unk);
|
int32_t wet_dry_addr, u32 unk);
|
||||||
void aMixImpl(uint16_t count, int16_t gain, uint16_t in_addr, uint16_t out_addr);
|
void aMixImpl(uint16_t count, int16_t gain, uint16_t in_addr, uint16_t out_addr);
|
||||||
void aS8DecImpl(uint8_t flags, ADPCM_STATE state);
|
void aS8DecImpl(uint8_t flags, ADPCM_STATE state);
|
||||||
void aAddMixerImpl(uint16_t in_addr, uint16_t out_addr, uint16_t count);
|
void aAddMixerImpl(uint16_t count, uint16_t in_addr, uint16_t out_addr);
|
||||||
void aDuplicateImpl(uint16_t count, uint16_t in_addr, uint16_t out_addr);
|
void aDuplicateImpl(uint16_t count, uint16_t in_addr, uint16_t out_addr);
|
||||||
void aResampleZohImpl(uint16_t pitch, uint16_t start_fract);
|
void aResampleZohImpl(uint16_t pitch, uint16_t start_fract);
|
||||||
void aInterlImpl(uint16_t in_addr, uint16_t out_addr, uint16_t n_samples);
|
void aInterlImpl(uint16_t in_addr, uint16_t out_addr, uint16_t n_samples);
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "debugconsole.h"
|
#include "debugconsole.h"
|
||||||
#include "../libultraship/SohImGuiImpl.h"
|
#include "../libultraship/ImGuiImpl.h"
|
||||||
#include "savestates.h"
|
#include "savestates.h"
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#include "actorViewer.h"
|
#include "actorViewer.h"
|
||||||
#include "../../util.h"
|
#include "../../util.h"
|
||||||
#include "../libultraship/SohImGuiImpl.h"
|
#include "../libultraship/ImGuiImpl.h"
|
||||||
#include "ImGuiHelpers.h"
|
#include "ImGuiHelpers.h"
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#include "colViewer.h"
|
#include "colViewer.h"
|
||||||
#include "../libultraship/SohImGuiImpl.h"
|
#include "../libultraship/ImGuiImpl.h"
|
||||||
#include "ImGuiHelpers.h"
|
#include "ImGuiHelpers.h"
|
||||||
#include "../../frame_interpolation.h"
|
#include "../../frame_interpolation.h"
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#include "debugSaveEditor.h"
|
#include "debugSaveEditor.h"
|
||||||
#include "../../util.h"
|
#include "../../util.h"
|
||||||
#include "../libultraship/SohImGuiImpl.h"
|
#include "../libultraship/ImGuiImpl.h"
|
||||||
#include "ImGuiHelpers.h"
|
#include "ImGuiHelpers.h"
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
#include <soh/OTRGlobals.h>
|
#include <soh/OTRGlobals.h>
|
||||||
#include <soh/OTRAudio.h>
|
#include <soh/OTRAudio.h>
|
||||||
|
|
||||||
#include <SohImGuiImpl.h>
|
#include <ImGuiImpl.h>
|
||||||
|
|
||||||
#include "z64.h"
|
#include "z64.h"
|
||||||
#include "z64save.h"
|
#include "z64save.h"
|
||||||
|
|
|
@ -56,7 +56,6 @@ OTRGlobals::OTRGlobals() {
|
||||||
context = Ship::GlobalCtx2::CreateInstance("Ship of Harkinian");
|
context = Ship::GlobalCtx2::CreateInstance("Ship of Harkinian");
|
||||||
gSaveStateMgr = std::make_shared<SaveStateMgr>();
|
gSaveStateMgr = std::make_shared<SaveStateMgr>();
|
||||||
context->GetWindow()->Init();
|
context->GetWindow()->Init();
|
||||||
CheckSaveFile(SRAM_SIZE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
OTRGlobals::~OTRGlobals() {
|
OTRGlobals::~OTRGlobals() {
|
||||||
|
|
|
@ -51,6 +51,7 @@ void SaveManager::Init() {
|
||||||
// If there is a lingering unversioned save, convert it
|
// If there is a lingering unversioned save, convert it
|
||||||
if (std::filesystem::exists("oot_save.sav")) {
|
if (std::filesystem::exists("oot_save.sav")) {
|
||||||
ConvertFromUnversioned();
|
ConvertFromUnversioned();
|
||||||
|
std::filesystem::rename("oot_save.sav", "oot_save.bak");
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the global save file exist, load it. Otherwise, create it.
|
// If the global save file exist, load it. Otherwise, create it.
|
||||||
|
@ -1172,8 +1173,6 @@ void SaveManager::ConvertFromUnversioned() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::filesystem::rename("oot_save.sav", "oot_save.bak");
|
|
||||||
|
|
||||||
#undef SLOT_SIZE
|
#undef SLOT_SIZE
|
||||||
#undef SLOT_OFFSET
|
#undef SLOT_OFFSET
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "SohHooks.h"
|
#include "Hooks.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
void func_800C3C80(AudioMgr* audioMgr) {
|
void func_800C3C80(AudioMgr* audioMgr) {
|
||||||
|
|
|
@ -869,11 +869,12 @@ void TitleCard_InitPlaceName(GlobalContext* globalCtx, TitleCardContext* titleCt
|
||||||
case SCENE_ZOORA:
|
case SCENE_ZOORA:
|
||||||
texture = gZoraShopTitleCardENGTex;
|
texture = gZoraShopTitleCardENGTex;
|
||||||
break;
|
break;
|
||||||
case SCENE_ALLEY_SHOP:
|
case SCENE_NIGHT_SHOP:
|
||||||
texture = gBombchuShopTitleCardENGTex;
|
texture = gBombchuShopTitleCardENGTex;
|
||||||
break;
|
break;
|
||||||
case SCENE_DRAG:
|
case SCENE_DRAG:
|
||||||
case SCENE_MAHOUYA:
|
case SCENE_MAHOUYA:
|
||||||
|
case SCENE_ALLEY_SHOP:
|
||||||
texture = gPotionShopTitleCardENGTex;
|
texture = gPotionShopTitleCardENGTex;
|
||||||
break;
|
break;
|
||||||
case SCENE_FACE_SHOP:
|
case SCENE_FACE_SHOP:
|
||||||
|
|
|
@ -749,6 +749,9 @@ u16 Message_DrawItemIcon(GlobalContext* globalCtx, u16 itemId, Gfx** p, u16 i) {
|
||||||
gDPSetCombineMode(gfx++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
|
gDPSetCombineMode(gfx++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
|
||||||
gDPSetPrimColor(gfx++, 0, 0, 255, 255, 255, msgCtx->textColorAlpha);
|
gDPSetPrimColor(gfx++, 0, 0, 255, 255, 255, msgCtx->textColorAlpha);
|
||||||
|
|
||||||
|
// Invalidate icon texture as it may have changed from the last time a text box had an icon
|
||||||
|
gSPInvalidateTexCache(gfx++, (uintptr_t)msgCtx->textboxSegment + MESSAGE_STATIC_TEX_SIZE);
|
||||||
|
|
||||||
if (itemId >= ITEM_MEDALLION_FOREST) {
|
if (itemId >= ITEM_MEDALLION_FOREST) {
|
||||||
gDPLoadTextureBlock(gfx++, (uintptr_t)msgCtx->textboxSegment + MESSAGE_STATIC_TEX_SIZE, G_IM_FMT_RGBA, G_IM_SIZ_32b,
|
gDPLoadTextureBlock(gfx++, (uintptr_t)msgCtx->textboxSegment + MESSAGE_STATIC_TEX_SIZE, G_IM_FMT_RGBA, G_IM_SIZ_32b,
|
||||||
24, 24, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK,
|
24, 24, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK,
|
||||||
|
|
|
@ -3721,9 +3721,11 @@ void Interface_Draw(GlobalContext* globalCtx) {
|
||||||
gDPLoadTextureBlock(OVERLAY_DISP++, ResourceMgr_LoadFileRaw("assets/ship_of_harkinian/buttons/dpad.bin"),
|
gDPLoadTextureBlock(OVERLAY_DISP++, ResourceMgr_LoadFileRaw("assets/ship_of_harkinian/buttons/dpad.bin"),
|
||||||
G_IM_FMT_IA, G_IM_SIZ_16b, 32, 32, 0, G_TX_NOMIRROR | G_TX_WRAP,
|
G_IM_FMT_IA, G_IM_SIZ_16b, 32, 32, 0, G_TX_NOMIRROR | G_TX_WRAP,
|
||||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||||
gSPWideTextureRectangle(OVERLAY_DISP++, OTRGetRectDimensionFromRightEdge(DPAD_X) << 2, DPAD_Y << 2,
|
gSPWideTextureRectangle(OVERLAY_DISP++, OTRGetRectDimensionFromRightEdge(DPAD_X + Right_HUD_Margin) << 2,
|
||||||
(OTRGetRectDimensionFromRightEdge(DPAD_X) + 32) << 2, (DPAD_Y + 32) << 2,
|
(DPAD_Y + (Top_HUD_Margin * -1)) << 2,
|
||||||
G_TX_RENDERTILE, 0, 0, (1 << 10), (1 << 10));
|
(OTRGetRectDimensionFromRightEdge(DPAD_X + Right_HUD_Margin) + 32) << 2,
|
||||||
|
(DPAD_Y + 32 + (Top_HUD_Margin * -1)) << 2, G_TX_RENDERTILE, 0, 0, (1 << 10),
|
||||||
|
(1 << 10));
|
||||||
|
|
||||||
// DPad-Up Button Icon & Ammo Count
|
// DPad-Up Button Icon & Ammo Count
|
||||||
if (gSaveContext.equips.buttonItems[4] < 0xF0) {
|
if (gSaveContext.equips.buttonItems[4] < 0xF0) {
|
||||||
|
|
|
@ -595,7 +595,7 @@ void BgJyaCobra_DrawShadow(BgJyaCobra* this, GlobalContext* globalCtx) {
|
||||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx),
|
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx),
|
||||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
|
|
||||||
gDPLoadTextureBlock(POLY_XLU_DISP++, ALIGN16((s32)(&this->shadowTexture)), G_IM_FMT_I, G_IM_SIZ_8b, 0x40, 0x40, 0,
|
gDPLoadTextureBlock(POLY_XLU_DISP++, ALIGN16((uintptr_t)(&this->shadowTexture)), G_IM_FMT_I, G_IM_SIZ_8b, 0x40, 0x40, 0,
|
||||||
G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD,
|
G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD,
|
||||||
G_TX_NOLOD);
|
G_TX_NOLOD);
|
||||||
|
|
||||||
|
|
|
@ -69,9 +69,9 @@ static SceneSelectEntry sScenes[] = {
|
||||||
{ "24:Grave 1", Select_LoadGame, 0x031C },
|
{ "24:Grave 1", Select_LoadGame, 0x031C },
|
||||||
{ "25:Grave 2", Select_LoadGame, 0x004B },
|
{ "25:Grave 2", Select_LoadGame, 0x004B },
|
||||||
{ "26:Royal Family's Tomb", Select_LoadGame, 0x002D },
|
{ "26:Royal Family's Tomb", Select_LoadGame, 0x002D },
|
||||||
{ "27:Great Fairy's Fountain (Din)", Select_LoadGame, 0x0315 },
|
{ "27:Great Fairy's Fountain (Upgrades)", Select_LoadGame, 0x0315 },
|
||||||
{ "28:Great Fairy's Fountain (Farore)", Select_LoadGame, 0x036D },
|
{ "28:Fairy's Fountain (Grotto)", Select_LoadGame, 0x036D },
|
||||||
{ "29:Great Fairy's Fountain (Nayru)", Select_LoadGame, 0x0371 },
|
{ "29:Great Fairy's Fountain (Magic)", Select_LoadGame, 0x0371 },
|
||||||
{ "30:Ganon's Tower - Collapsing", Select_LoadGame, 0x043F },
|
{ "30:Ganon's Tower - Collapsing", Select_LoadGame, 0x043F },
|
||||||
{ "31:Castle Courtyard", Select_LoadGame, 0x0400 },
|
{ "31:Castle Courtyard", Select_LoadGame, 0x0400 },
|
||||||
{ "32:Fishing Pond", Select_LoadGame, 0x045F },
|
{ "32:Fishing Pond", Select_LoadGame, 0x045F },
|
||||||
|
@ -129,7 +129,7 @@ static SceneSelectEntry sScenes[] = {
|
||||||
{ "84:Stairs to Ganondorf's Lair", Select_LoadGame, 0x041B },
|
{ "84:Stairs to Ganondorf's Lair", Select_LoadGame, 0x041B },
|
||||||
{ "85:Ganondorf's Lair", Select_LoadGame, 0x041F },
|
{ "85:Ganondorf's Lair", Select_LoadGame, 0x041F },
|
||||||
{ "86:Ice Cavern", Select_LoadGame, 0x0088 },
|
{ "86:Ice Cavern", Select_LoadGame, 0x0088 },
|
||||||
{ "87:Dampé Grave Relay Game", Select_LoadGame, 0x044F },
|
{ "87:Dampe Grave Relay Game", Select_LoadGame, 0x044F },
|
||||||
{ "88:Inside Ganon's Castle", Select_LoadGame, 0x0467 },
|
{ "88:Inside Ganon's Castle", Select_LoadGame, 0x0467 },
|
||||||
{ "89:Ganon's Lair", Select_LoadGame, 0x0517 },
|
{ "89:Ganon's Lair", Select_LoadGame, 0x0517 },
|
||||||
{ "90:Escaping Ganon's Castle 1", Select_LoadGame, 0x0179 },
|
{ "90:Escaping Ganon's Castle 1", Select_LoadGame, 0x0179 },
|
||||||
|
|
|
@ -535,32 +535,37 @@ void KaleidoScope_DrawEquipment(GlobalContext* globalCtx) {
|
||||||
} else if (CVar_GetS32("gAssignableTunicsAndBoots", 0) != 0) {
|
} else if (CVar_GetS32("gAssignableTunicsAndBoots", 0) != 0) {
|
||||||
// Only allow assigning tunic and boots to c-buttons
|
// Only allow assigning tunic and boots to c-buttons
|
||||||
if (pauseCtx->cursorY[PAUSE_EQUIP] > 1) {
|
if (pauseCtx->cursorY[PAUSE_EQUIP] > 1) {
|
||||||
u16 slot = 0;
|
if (CHECK_OWNED_EQUIP(pauseCtx->cursorY[PAUSE_EQUIP], pauseCtx->cursorX[PAUSE_EQUIP] - 1)) {
|
||||||
switch (cursorItem) {
|
u16 slot = 0;
|
||||||
case ITEM_TUNIC_KOKIRI:
|
switch (cursorItem) {
|
||||||
slot = SLOT_TUNIC_KOKIRI;
|
case ITEM_TUNIC_KOKIRI:
|
||||||
break;
|
slot = SLOT_TUNIC_KOKIRI;
|
||||||
case ITEM_TUNIC_GORON:
|
break;
|
||||||
slot = SLOT_TUNIC_GORON;
|
case ITEM_TUNIC_GORON:
|
||||||
break;
|
slot = SLOT_TUNIC_GORON;
|
||||||
case ITEM_TUNIC_ZORA:
|
break;
|
||||||
slot = SLOT_TUNIC_ZORA;
|
case ITEM_TUNIC_ZORA:
|
||||||
break;
|
slot = SLOT_TUNIC_ZORA;
|
||||||
case ITEM_BOOTS_KOKIRI:
|
break;
|
||||||
slot = SLOT_BOOTS_KOKIRI;
|
case ITEM_BOOTS_KOKIRI:
|
||||||
break;
|
slot = SLOT_BOOTS_KOKIRI;
|
||||||
case ITEM_BOOTS_IRON:
|
break;
|
||||||
slot = SLOT_BOOTS_IRON;
|
case ITEM_BOOTS_IRON:
|
||||||
break;
|
slot = SLOT_BOOTS_IRON;
|
||||||
case ITEM_BOOTS_HOVER:
|
break;
|
||||||
slot = SLOT_BOOTS_HOVER;
|
case ITEM_BOOTS_HOVER:
|
||||||
break;
|
slot = SLOT_BOOTS_HOVER;
|
||||||
default:
|
break;
|
||||||
break;
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
KaleidoScope_SetupItemEquip(globalCtx, cursorItem, slot,
|
||||||
|
pauseCtx->equipVtx[cursorSlot * 4].v.ob[0] * 10,
|
||||||
|
pauseCtx->equipVtx[cursorSlot * 4].v.ob[1] * 10);
|
||||||
|
} else {
|
||||||
|
Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0,
|
||||||
|
&D_801333E8);
|
||||||
}
|
}
|
||||||
KaleidoScope_SetupItemEquip(globalCtx, cursorItem, slot,
|
|
||||||
pauseCtx->equipVtx[cursorSlot * 4].v.ob[0] * 10,
|
|
||||||
pauseCtx->equipVtx[cursorSlot * 4].v.ob[1] * 10);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
#include "textures/map_name_static/map_name_static.h"
|
#include "textures/map_name_static/map_name_static.h"
|
||||||
#include "textures/map_48x85_static/map_48x85_static.h"
|
#include "textures/map_48x85_static/map_48x85_static.h"
|
||||||
#include "vt.h"
|
#include "vt.h"
|
||||||
#include "SohHooks.h"
|
#include "Hooks.h"
|
||||||
|
|
||||||
#include "soh/frame_interpolation.h"
|
#include "soh/frame_interpolation.h"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue