diff --git a/include/structs.h b/include/structs.h index 9bdb672cff..cbc33ddef4 100644 --- a/include/structs.h +++ b/include/structs.h @@ -2,6 +2,7 @@ #define _STRUCTS_H_ #include +#include #include #include @@ -156,9 +157,9 @@ typedef struct { typedef struct { /* 0x000 */ u8 pad0[0x2B0]; - /* 0x2B0 */ u32* unk2B0; // OVERLAY_DISP append address + /* 0x2B0 */ Gfx* unk2B0; // OVERLAY_DISP append address /* 0x2B4 */ u8 pad1[0xC]; - /* 0x2C0 */ u32* unk2C0; // POLY_OPA_DISP append address + /* 0x2C0 */ Gfx* unk2C0; // POLY_OPA_DISP append address } z_GraphicsContext; // Some structure pointed to by Global Context + 0x1CCC; diff --git a/src/actors/ovl_Bg_Fu_Kaiten_0x80ACB400/ovl_Bg_Fu_Kaiten_0x80ACB400.c b/src/actors/ovl_Bg_Fu_Kaiten_0x80ACB400/ovl_Bg_Fu_Kaiten_0x80ACB400.c index 78874922b2..3cc2baf161 100644 --- a/src/actors/ovl_Bg_Fu_Kaiten_0x80ACB400/ovl_Bg_Fu_Kaiten_0x80ACB400.c +++ b/src/actors/ovl_Bg_Fu_Kaiten_0x80ACB400/ovl_Bg_Fu_Kaiten_0x80ACB400.c @@ -107,19 +107,19 @@ void z_bg_fu_kaiten_main(z_ActorBgFuKaiten* this, z_GlobalContext* ctxt) { void z_bg_fu_kaiten_draw(z_ActorBgFuKaiten* this, z_GlobalContext* ctxt) { z_GraphicsContext* sp24 = ctxt->unk0; UNK_TYPE pad; - u32* v0; // XXX: register allocation is wrong here func_8012C28C(sp24); - v0 = sp24->unk2B0; - sp24->unk2B0 += 2; - v0[0] = 0xDA380003; - v0[1] = func_80181A40(ctxt->unk0); + { + Gfx* v0 = sp24->unk2B0++; + v0->words.w0 = 0xDA380003; + v0->words.w1 = func_80181A40(ctxt->unk0); + } - v0 = sp24->unk2B0; - sp24->unk2B0 += 2; - v0[1] = (u32)&D_060005D0; // XXX: D_060005D0 is probably a constant - v0[0] = 0xDE000000; + { + Gfx* v0 = sp24->unk2B0++; + v0->words.w0 = 0xDE000000; v0->words.w1 = (u32)&D_060005D0; // XXX: D_060005D0 is probably a constant + } }