mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-22 14:23:44 -07:00
Fix hardcoded segment addresses (#5)
This commit is contained in:
parent
ddcc2601e4
commit
cc6a7caad3
2 changed files with 4 additions and 2 deletions
|
@ -46,6 +46,8 @@ extern "C" {
|
|||
|
||||
using namespace std;
|
||||
|
||||
#define SEG_ADDR(seg, addr) (addr | (seg << 24) | 1)
|
||||
|
||||
#define SUPPORT_CHECK(x) assert(x)
|
||||
|
||||
// SCALE_M_N: upscale/downscale M-bit integer to N-bit
|
||||
|
@ -2149,7 +2151,7 @@ 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 == 0xF012DB20 || mtxAddr == 0xF012DB40)
|
||||
if (mtxAddr == SEG_ADDR(0, 0x12DB20) || mtxAddr == SEG_ADDR(0, 0x12DB40))
|
||||
mtxAddr = clearMtx;
|
||||
|
||||
#ifdef F3DEX_GBI_2
|
||||
|
|
|
@ -42,7 +42,7 @@ Gfx* VisMono_DrawTexture(VisMono* this, Gfx* gfx)
|
|||
s32 y;
|
||||
s32 height = 3;
|
||||
//u16* tex = D_0F000000;
|
||||
u16* tex = 0xFF000000;
|
||||
u16* tex = SEG_ADDR(0xF, 0);
|
||||
|
||||
gDPPipeSync(gfx++);
|
||||
gDPSetOtherMode(gfx++,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue