mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-26 11:22:17 -05:00
Fix missing gMtxClear address for pal gc roms (#282)
This commit is contained in:
parent
a5651742ba
commit
bf2825e9a5
@ -31,6 +31,8 @@
|
||||
#include "../StrHash64.h"
|
||||
#include "../../SohImGuiImpl.h"
|
||||
#include "../../Environment.h"
|
||||
#include "../../GameVersions.h"
|
||||
#include "../../ResourceMgr.h"
|
||||
|
||||
// OTRTODO: fix header files for these
|
||||
extern "C" {
|
||||
@ -2151,8 +2153,16 @@ static void gfx_run_dl(Gfx* cmd) {
|
||||
uintptr_t mtxAddr = cmd->words.w1;
|
||||
|
||||
// OTRTODO: Temp way of dealing with gMtxClear. Need something more elegant in the future...
|
||||
if (mtxAddr == SEG_ADDR(0, 0x12DB20) || mtxAddr == SEG_ADDR(0, 0x12DB40))
|
||||
mtxAddr = clearMtx;
|
||||
uint32_t gameVersion = Ship::GlobalCtx2::GetInstance()->GetResourceManager()->GetGameVersion();
|
||||
if (gameVersion == OOT_PAL_GC) {
|
||||
if (mtxAddr == SEG_ADDR(0, 0x0FBC20)) {
|
||||
mtxAddr = clearMtx;
|
||||
}
|
||||
} else {
|
||||
if (mtxAddr == SEG_ADDR(0, 0x12DB20) || mtxAddr == SEG_ADDR(0, 0x12DB40)) {
|
||||
mtxAddr = clearMtx;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef F3DEX_GBI_2
|
||||
gfx_sp_matrix(C0(0, 8) ^ G_MTX_PUSH, (const int32_t *) seg_addr(mtxAddr));
|
||||
|
Loading…
Reference in New Issue
Block a user