Skip to content

Commit

Permalink
Extract gMtxClear
Browse files Browse the repository at this point in the history
  • Loading branch information
inspectredc committed Jun 2, 2024
1 parent 53efc22 commit 0c963a1
Show file tree
Hide file tree
Showing 20 changed files with 43 additions and 5 deletions.
2 changes: 1 addition & 1 deletion libultraship
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
4 changes: 0 additions & 4 deletions soh/soh/OTRGlobals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -484,9 +484,6 @@ struct ExtensionEntry {
std::string ext;
};

extern uintptr_t clearMtx;
extern "C" Mtx gMtxClear;
extern "C" MtxF gMtxFClear;
extern "C" void OTRMessage_Init();
extern "C" void AudioMgr_CreateNextAudioBuffer(s16* samples, u32 num_samples);
extern "C" void AudioPlayer_Play(const uint8_t* buf, uint32_t len);
Expand Down Expand Up @@ -1145,7 +1142,6 @@ extern "C" void InitOTR() {
GameInteractorSail::Instance = new GameInteractorSail();
#endif

clearMtx = (uintptr_t)&gMtxClear;
OTRMessage_Init();
OTRAudio_Init();
OTRExtScanner();
Expand Down

0 comments on commit 0c963a1

Please sign in to comment.