summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZephiles <cae222@yahoo.com>2022-05-06 17:05:03 -0500
committerZephiles <cae222@yahoo.com>2022-05-06 17:05:03 -0500
commit0c3674e3ce5e570c17bb5fe2e62a8243d23d838e (patch)
tree587719172ac5d3ea02aef92c6712d86cfb305815
parent182d3a5db890d08e367aa9a4c6aa282467e59959 (diff)
Update to latest version of libtp_rel
Also fixed some formatting issues
-rw-r--r--GameCube/assets/eu.lst1
-rw-r--r--GameCube/assets/jp.lst1
-rw-r--r--GameCube/assets/us.lst1
m---------GameCube/externals/libtp_rel0
-rw-r--r--GameCube/source/game_patch/00_poe.cpp3
-rw-r--r--GameCube/source/main.cpp26
-rw-r--r--GameCube/source/rando/seed.cpp2
-rw-r--r--GameCube/source/rando/seedlist.cpp2
-rw-r--r--GameCube/source/user_patch/01_randombgm.cpp3
9 files changed, 18 insertions, 21 deletions
diff --git a/GameCube/assets/eu.lst b/GameCube/assets/eu.lst
index 498628c5..80d9f1ec 100644
--- a/GameCube/assets/eu.lst
+++ b/GameCube/assets/eu.lst
@@ -89,6 +89,7 @@
80358EE4:CARDClose
80358DC8:CARDOpen
8035787C:CARDProbeEx
+80359CB8:CARDGetStatus
// OSCache.o
// 8033C36C:DCEnable
diff --git a/GameCube/assets/jp.lst b/GameCube/assets/jp.lst
index dfb82bf2..aab5ec09 100644
--- a/GameCube/assets/jp.lst
+++ b/GameCube/assets/jp.lst
@@ -89,6 +89,7 @@
8035A550:CARDClose
8035A434:CARDOpen
80358EE8:CARDProbeEx
+8035B324:CARDGetStatus
// OSCache.o
// 8033DA08:DCEnable
diff --git a/GameCube/assets/us.lst b/GameCube/assets/us.lst
index 6abfa791..3979bc9e 100644
--- a/GameCube/assets/us.lst
+++ b/GameCube/assets/us.lst
@@ -89,6 +89,7 @@
803580B4:CARDClose
80357F98:CARDOpen
80356A4C:CARDProbeEx
+80358E88:CARDGetStatus
// OSCache.o
// 8033B56C:DCEnable
diff --git a/GameCube/externals/libtp_rel b/GameCube/externals/libtp_rel
-Subproject 1486704654a9500abc23f22d11495bb55db9bc0
+Subproject ca2c7efda27d8421650d4071b5197ad21a47127
diff --git a/GameCube/source/game_patch/00_poe.cpp b/GameCube/source/game_patch/00_poe.cpp
index 2a20c221..354be4db 100644
--- a/GameCube/source/game_patch/00_poe.cpp
+++ b/GameCube/source/game_patch/00_poe.cpp
@@ -8,8 +8,7 @@ namespace mod::game_patch
{
void _00_poe( void )
{
- libtp::tp::d_item::item_func_ptr[libtp::data::items::Poe_Soul] = []( void )
- {
+ libtp::tp::d_item::item_func_ptr[libtp::data::items::Poe_Soul] = []( void ) {
// Increase poe count
libtp::tp::d_com_inf_game::dComIfG_gameInfo.scratchPad.wQuestLogData[0x10C]++;
};
diff --git a/GameCube/source/main.cpp b/GameCube/source/main.cpp
index 03494429..472f193c 100644
--- a/GameCube/source/main.cpp
+++ b/GameCube/source/main.cpp
@@ -82,39 +82,35 @@ namespace mod
return_fapGm_Execute = patch::hookFunction( libtp::tp::f_ap_game::fapGm_Execute, mod::handle_fapGm_Execute );
// DMC
- return_do_Link = patch::hookFunction( libtp::tp::dynamic_link::do_link,
- []( libtp::tp::dynamic_link::DynamicModuleControl* dmc )
- {
- // Call the original function immediately, as the REL file needs to be linked
- // before applying patches
- const bool result = return_do_Link( dmc );
+ return_do_Link =
+ patch::hookFunction( libtp::tp::dynamic_link::do_link, []( libtp::tp::dynamic_link::DynamicModuleControl* dmc ) {
+ // Call the original function immediately, as the REL file needs to be linked
+ // before applying patches
+ const bool result = return_do_Link( dmc );
- events::onRELLink( randomizer, dmc );
+ events::onRELLink( randomizer, dmc );
- return result;
- } );
+ return result;
+ } );
// DZX
return_actorInit =
patch::hookFunction( actorInit,
- []( void* mStatus_roomControl, ChunkTypeInfo* chunkTypeInfo, int32_t unk3, void* unk4 )
- {
+ []( void* mStatus_roomControl, ChunkTypeInfo* chunkTypeInfo, int32_t unk3, void* unk4 ) {
events::onDZX( mod::randomizer, chunkTypeInfo );
return return_actorInit( mStatus_roomControl, chunkTypeInfo, unk3, unk4 );
} );
return_actorInit_always =
patch::hookFunction( actorInit_always,
- []( void* mStatus_roomControl, ChunkTypeInfo* chunkTypeInfo, int32_t unk3, void* unk4 )
- {
+ []( void* mStatus_roomControl, ChunkTypeInfo* chunkTypeInfo, int32_t unk3, void* unk4 ) {
events::onDZX( mod::randomizer, chunkTypeInfo );
return return_actorInit_always( mStatus_roomControl, chunkTypeInfo, unk3, unk4 );
} );
return_actorCommonLayerInit =
patch::hookFunction( actorCommonLayerInit,
- []( void* mStatus_roomControl, ChunkTypeInfo* chunkTypeInfo, int32_t unk3, void* unk4 )
- {
+ []( void* mStatus_roomControl, ChunkTypeInfo* chunkTypeInfo, int32_t unk3, void* unk4 ) {
events::onDZX( mod::randomizer, chunkTypeInfo );
return return_actorCommonLayerInit( mStatus_roomControl, chunkTypeInfo, unk3, unk4 );
} );
diff --git a/GameCube/source/rando/seed.cpp b/GameCube/source/rando/seed.cpp
index 7c2dc936..fdf2662a 100644
--- a/GameCube/source/rando/seed.cpp
+++ b/GameCube/source/rando/seed.cpp
@@ -42,7 +42,7 @@ namespace mod::rando
m_GCIData = new uint8_t[length];
- m_CARDResult = libtp::tools::ReadGCI( m_CardSlot, fileName, length, 0x00, m_GCIData );
+ m_CARDResult = libtp::tools::ReadGCI( m_CardSlot, fileName, length, 0x00, m_GCIData, false );
}
Seed::~Seed()
diff --git a/GameCube/source/rando/seedlist.cpp b/GameCube/source/rando/seedlist.cpp
index 20d4388c..a0bf047b 100644
--- a/GameCube/source/rando/seedlist.cpp
+++ b/GameCube/source/rando/seedlist.cpp
@@ -45,7 +45,7 @@ namespace mod::rando
Header header;
- if ( CARD_RESULT_READY == libtp::tools::ReadGCI( CARD_SLOT_A, filename, sizeof( header ), 0, &header ) )
+ if ( CARD_RESULT_READY == libtp::tools::ReadGCI( CARD_SLOT_A, filename, sizeof( header ), 0, &header, false ) )
{
uint16_t minVersion = header.minVersion;
uint16_t maxVersion = header.maxVersion;
diff --git a/GameCube/source/user_patch/01_randombgm.cpp b/GameCube/source/user_patch/01_randombgm.cpp
index 1a77a7be..64efe304 100644
--- a/GameCube/source/user_patch/01_randombgm.cpp
+++ b/GameCube/source/user_patch/01_randombgm.cpp
@@ -207,8 +207,7 @@ namespace mod::user_patch
uint8_t BgmWave1,
uint8_t BgmWave2,
uint8_t DemoWave,
- bool param_7 )
- {
+ bool param_7 ) {
uint32_t id = BGMid.id;
if ( id >= 0x1000000 && id < 0x2000000 )
{