Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into NTSC
Browse files Browse the repository at this point in the history
  • Loading branch information
inspectredc committed Jun 16, 2024
2 parents 4324083 + 839fcff commit 23b3ee7
Show file tree
Hide file tree
Showing 49 changed files with 454 additions and 275 deletions.
1 change: 0 additions & 1 deletion CMake/lus-cvars.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ 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 "")
Expand Down
2 changes: 1 addition & 1 deletion libultraship
Submodule libultraship updated 59 files
+1 −0 CMakeLists.txt
+0 −4 cmake/cvars.cmake
+10 −4 src/CMakeLists.txt
+12 −20 src/config/Config.cpp
+5 −5 src/config/ConsoleVariable.cpp
+1 −1 src/controller/controldeck/ControlDeck.h
+1 −1 src/controller/controldevice/controller/Controller.cpp
+1 −1 src/controller/controldevice/controller/Controller.h
+1 −1 src/controller/controldevice/controller/ControllerButton.cpp
+1 −1 src/controller/controldevice/controller/ControllerButton.h
+1 −1 src/controller/controldevice/controller/ControllerStick.cpp
+1 −1 src/controller/controldevice/controller/ControllerStick.h
+2 −2 src/controller/controldevice/controller/mapping/ControllerRumbleMapping.h
+1 −1 src/controller/controldevice/controller/mapping/keyboard/KeyboardKeyToAnyMapping.cpp
+1 −1 src/controller/controldevice/controller/mapping/keyboard/KeyboardKeyToAnyMapping.h
+3 −3 src/controller/controldevice/controller/mapping/sdl/SDLMapping.cpp
+1 −1 src/controller/deviceindex/ShipDeviceIndexMappingManager.cpp
+14 −14 src/debug/CrashHandler.cpp
+8 −13 src/graphic/Fast3D/Fast3dWindow.cpp
+6 −0 src/graphic/Fast3D/gfx_cc.cpp
+3 −1 src/graphic/Fast3D/gfx_direct3d11.cpp
+65 −33 src/graphic/Fast3D/gfx_direct3d_common.cpp
+3 −2 src/graphic/Fast3D/gfx_metal.cpp
+76 −33 src/graphic/Fast3D/gfx_metal_shader.cpp
+126 −73 src/graphic/Fast3D/gfx_opengl.cpp
+77 −43 src/graphic/Fast3D/gfx_pc.cpp
+2 −2 src/resource/File.h
+2 −2 src/resource/Resource.cpp
+3 −3 src/resource/Resource.h
+2 −2 src/resource/ResourceFactory.h
+2 −2 src/resource/ResourceFactoryBinary.cpp
+1 −1 src/resource/ResourceFactoryBinary.h
+1 −1 src/resource/ResourceFactoryXML.cpp
+1 −1 src/resource/ResourceFactoryXML.h
+3 −3 src/resource/ResourceLoader.cpp
+1 −1 src/resource/ResourceLoader.h
+32 −26 src/resource/ResourceManager.cpp
+18 −16 src/resource/ResourceManager.h
+0 −1 src/resource/ResourceType.h
+15 −16 src/resource/archive/Archive.cpp
+16 −17 src/resource/archive/Archive.h
+3 −3 src/resource/archive/ArchiveManager.cpp
+2 −3 src/resource/archive/ArchiveManager.h
+8 −2 src/resource/archive/O2rArchive.cpp
+2 −2 src/resource/archive/O2rArchive.h
+2 −2 src/resource/archive/OtrArchive.cpp
+2 −2 src/resource/archive/OtrArchive.h
+0 −64 src/resource/factory/ArrayFactory.cpp
+0 −11 src/resource/factory/ArrayFactory.h
+4 −0 src/resource/factory/MatrixFactory.cpp
+0 −45 src/resource/type/Array.cpp
+0 −85 src/resource/type/Array.h
+14 −2 src/window/Window.cpp
+2 −1 src/window/Window.h
+13 −14 src/window/gui/ConsoleWindow.cpp
+39 −38 src/window/gui/Gui.cpp
+1 −1 src/window/gui/GuiElement.cpp
+465 −165 src/window/gui/InputEditorWindow.cpp
+8 −2 src/window/gui/InputEditorWindow.h
5 changes: 5 additions & 0 deletions soh/assets/xml/GC_MQ_D/code/sys_matrix.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<Root>
<File Name="code" OutName="sys_matrix" RangeStart="0x110CC0" RangeEnd="0x110D00">
<Mtx Name="gMtxClear" Offset="0x110CC0"/>
</File>
</Root>
1 change: 1 addition & 0 deletions soh/assets/xml/GC_MQ_D/scenes/dungeons/bdan.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<Root>
<ExternalFile XmlPath="code/sys_matrix.xml" OutPath="code/sys_matrix/"/>
<File Name="bdan_scene" Segment="2">
<Texture Name="bdan_sceneTex_013E00" OutName="bdan_sceneTex_013E00" Format="ci8" Width="32" Height="64" Offset="0x13E00" TlutOffset="0x13BF8" AddedByScript="true"/>
<Texture Name="bdan_sceneTex_014600" OutName="bdan_sceneTex_014600" Format="ci8" Width="32" Height="32" Offset="0x14600" TlutOffset="0x13BF8" AddedByScript="true"/>
Expand Down
1 change: 1 addition & 0 deletions soh/assets/xml/GC_MQ_D/scenes/dungeons/bdan_boss.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<Root>
<ExternalFile XmlPath="code/sys_matrix.xml" OutPath="code/sys_matrix/"/>
<File Name="bdan_boss_scene" Segment="2">
<Scene Name="bdan_boss_scene" Offset="0x0"/>
</File>
Expand Down
5 changes: 5 additions & 0 deletions soh/assets/xml/GC_MQ_PAL_F/code/sys_matrix.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<Root>
<File Name="code" OutName="sys_matrix" RangeStart="0xEAD00" RangeEnd="0xEAD40">
<Mtx Name="gMtxClear" Offset="0xEAD00"/>
</File>
</Root>
1 change: 1 addition & 0 deletions soh/assets/xml/GC_MQ_PAL_F/scenes/dungeons/bdan.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<Root>
<ExternalFile XmlPath="code/sys_matrix.xml" OutPath="code/sys_matrix/"/>
<File Name="bdan_scene" Segment="2">
<Texture Name="bdan_sceneTex_013E00" OutName="bdan_sceneTex_013E00" Format="ci8" Width="32" Height="64" Offset="0x13E00" TlutOffset="0x13BF8" AddedByScript="true"/>
<Texture Name="bdan_sceneTex_014600" OutName="bdan_sceneTex_014600" Format="ci8" Width="32" Height="32" Offset="0x14600" TlutOffset="0x13BF8" AddedByScript="true"/>
Expand Down
1 change: 1 addition & 0 deletions soh/assets/xml/GC_MQ_PAL_F/scenes/dungeons/bdan_boss.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<Root>
<ExternalFile XmlPath="code/sys_matrix.xml" OutPath="code/sys_matrix/"/>
<File Name="bdan_boss_scene" Segment="2">
<Scene Name="bdan_boss_scene" Offset="0x0"/>
</File>
Expand Down
5 changes: 5 additions & 0 deletions soh/assets/xml/GC_NMQ_D/code/sys_matrix.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<Root>
<File Name="code" OutName="sys_matrix" RangeStart="0x110CE0" RangeEnd="0x110D20">
<Mtx Name="gMtxClear" Offset="0x110CE0"/>
</File>
</Root>
1 change: 1 addition & 0 deletions soh/assets/xml/GC_NMQ_D/scenes/dungeons/bdan.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<Root>
<ExternalFile XmlPath="code/sys_matrix.xml" OutPath="code/sys_matrix/"/>
<File Name="bdan_scene" Segment="2">
<Texture Name="bdan_sceneTex_013E00" OutName="bdan_sceneTex_013E00" Format="ci8" Width="32" Height="64" Offset="0x13DE0" TlutOffset="0x13BD8" AddedByScript="true"/>
<Texture Name="bdan_sceneTex_014600" OutName="bdan_sceneTex_014600" Format="ci8" Width="32" Height="32" Offset="0x145E0" TlutOffset="0x13BD8" AddedByScript="true"/>
Expand Down
1 change: 1 addition & 0 deletions soh/assets/xml/GC_NMQ_D/scenes/dungeons/bdan_boss.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<Root>
<ExternalFile XmlPath="code/sys_matrix.xml" OutPath="code/sys_matrix/"/>
<File Name="bdan_boss_scene" Segment="2">
<Scene Name="bdan_boss_scene" Offset="0x0"/>
</File>
Expand Down
5 changes: 5 additions & 0 deletions soh/assets/xml/GC_NMQ_PAL_F/code/sys_matrix.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<Root>
<File Name="code" OutName="sys_matrix" RangeStart="0xEAD20" RangeEnd="0xEAD60">
<Mtx Name="gMtxClear" Offset="0xEAD20"/>
</File>
</Root>
1 change: 1 addition & 0 deletions soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/bdan.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<Root>
<ExternalFile XmlPath="code/sys_matrix.xml" OutPath="code/sys_matrix/"/>
<File Name="bdan_scene" Segment="2">
<Texture Name="bdan_sceneTex_013E00" OutName="bdan_sceneTex_013E00" Format="ci8" Width="32" Height="64" Offset="0x13DE0" TlutOffset="0x13BD8" AddedByScript="true"/>
<Texture Name="bdan_sceneTex_014600" OutName="bdan_sceneTex_014600" Format="ci8" Width="32" Height="32" Offset="0x145E0" TlutOffset="0x13BD8" AddedByScript="true"/>
Expand Down
1 change: 1 addition & 0 deletions soh/assets/xml/GC_NMQ_PAL_F/scenes/dungeons/bdan_boss.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<Root>
<ExternalFile XmlPath="code/sys_matrix.xml" OutPath="code/sys_matrix/"/>
<File Name="bdan_boss_scene" Segment="2">
<Scene Name="bdan_boss_scene" Offset="0x0"/>
</File>
Expand Down
5 changes: 5 additions & 0 deletions soh/assets/xml/N64_PAL_10/code/sys_matrix.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<Root>
<File Name="code" OutName="sys_matrix" RangeStart="0xEB620" RangeEnd="0xEB660">
<Mtx Name="gMtxClear" Offset="0xEB620"/>
</File>
</Root>
1 change: 1 addition & 0 deletions soh/assets/xml/N64_PAL_10/scenes/dungeons/bdan.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<Root>
<ExternalFile XmlPath="code/sys_matrix.xml" OutPath="code/sys_matrix/"/>
<File Name="bdan_scene" Segment="2">
<Texture Name="bdan_sceneTex_013E00" OutName="bdan_sceneTex_013E00" Format="ci8" Width="32" Height="64" Offset="0x13DE0" TlutOffset="0x13BD8" AddedByScript="true"/>
<Texture Name="bdan_sceneTex_014600" OutName="bdan_sceneTex_014600" Format="ci8" Width="32" Height="32" Offset="0x145E0" TlutOffset="0x13BD8" AddedByScript="true"/>
Expand Down
1 change: 1 addition & 0 deletions soh/assets/xml/N64_PAL_10/scenes/dungeons/bdan_boss.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<Root>
<ExternalFile XmlPath="code/sys_matrix.xml" OutPath="code/sys_matrix/"/>
<File Name="bdan_boss_scene" Segment="2">
<Scene Name="bdan_boss_scene" Offset="0x0"/>
</File>
Expand Down
5 changes: 5 additions & 0 deletions soh/assets/xml/N64_PAL_11/code/sys_matrix.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<Root>
<File Name="code" OutName="sys_matrix" RangeStart="0xEB660" RangeEnd="0xEB6A0">
<Mtx Name="gMtxClear" Offset="0xEB660"/>
</File>
</Root>
1 change: 1 addition & 0 deletions soh/assets/xml/N64_PAL_11/scenes/dungeons/bdan.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<Root>
<ExternalFile XmlPath="code/sys_matrix.xml" OutPath="code/sys_matrix/"/>
<File Name="bdan_scene" Segment="2">
<Texture Name="bdan_sceneTex_013E00" OutName="bdan_sceneTex_013E00" Format="ci8" Width="32" Height="64" Offset="0x13DE0" TlutOffset="0x13BD8" AddedByScript="true"/>
<Texture Name="bdan_sceneTex_014600" OutName="bdan_sceneTex_014600" Format="ci8" Width="32" Height="32" Offset="0x145E0" TlutOffset="0x13BD8" AddedByScript="true"/>
Expand Down
1 change: 1 addition & 0 deletions soh/assets/xml/N64_PAL_11/scenes/dungeons/bdan_boss.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<Root>
<ExternalFile XmlPath="code/sys_matrix.xml" OutPath="code/sys_matrix/"/>
<File Name="bdan_boss_scene" Segment="2">
<Scene Name="bdan_boss_scene" Offset="0x0"/>
</File>
Expand Down
3 changes: 3 additions & 0 deletions soh/include/z64.h
Original file line number Diff line number Diff line change
Expand Up @@ -845,6 +845,9 @@ typedef enum {
#define PAUSE_CURSOR_PAGE_LEFT 10
#define PAUSE_CURSOR_PAGE_RIGHT 11

#define PAUSE_EQUIP_PLAYER_WIDTH 64
#define PAUSE_EQUIP_PLAYER_HEIGHT 112

typedef enum {
/* 0x00 */ PAUSE_ITEM,
/* 0x01 */ PAUSE_MAP,
Expand Down
7 changes: 4 additions & 3 deletions soh/soh/ActorDB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ ActorDB* ActorDB::Instance;
#undef DEFINE_ACTOR_UNSET

struct AddPair {
std::string name;
const char* name;
ActorInit& init;
};

#define DEFINE_ACTOR_INTERNAL(name, _1, allocType) { #name, name##_InitVars },
#define DEFINE_ACTOR(name, _1, allocType) { #name, name##_InitVars },
#define DEFINE_ACTOR_UNSET(_0)

static const std::vector<AddPair> initialActorTable = {
static constexpr AddPair initialActorTable[] = {
#include "tables/actor_table.h"
};

Expand All @@ -33,7 +33,7 @@ static const std::vector<AddPair> initialActorTable = {
#undef DEFINE_ACTOR

// https://wiki.cloudmodding.com/oot/Actor_List_(Variables)
static std::unordered_map<u16, const char*> actorDescriptions = {
static constexpr std::pair<u16, const char*> actorDescriptionData[] = {
{ ACTOR_PLAYER, "Link" },
{ ACTOR_EN_TEST, "Stalfos" },
{ ACTOR_EN_GIRLA, "Shop Items" },
Expand Down Expand Up @@ -464,6 +464,7 @@ static std::unordered_map<u16, const char*> actorDescriptions = {
{ ACTOR_BG_JYA_BLOCK, "Silver Block (Child Era)" },
{ ACTOR_OBJ_WARP2BLOCK, "Navi Infospot (Green, Time Block)" }
};
static std::unordered_map<u16, const char*> actorDescriptions = std::unordered_map<u16, const char*>(std::begin(actorDescriptionData), std::end(actorDescriptionData));

ActorDB::ActorDB() {
db.reserve(ACTOR_NUMBER_MAX); // reserve size for all initial entries so we don't do it for each
Expand Down
Loading

0 comments on commit 23b3ee7

Please sign in to comment.