From 011027bded76b96d886aea4ab784df895352a971 Mon Sep 17 00:00:00 2001 From: Random <28494085+Random0666@users.noreply.github.com> Date: Fri, 20 Mar 2020 00:31:50 +0100 Subject: [PATCH] Changes in PR #12 - Changed `_gDPLoadTextureBlockTile` to `gDPLoadMultiBlock` - Replaced literals with `MatrixMode` in Matrix function calls - Changed `float`s to `f32`s - Removed old comment - Removed `z_title.reloc.s` --- data/overlays/gamestates/z_title.reloc.s | 11 ----------- spec | 2 +- src/overlays/gamestates/ovl_title/z_title.c | 12 ++++++------ 3 files changed, 7 insertions(+), 18 deletions(-) delete mode 100644 data/overlays/gamestates/z_title.reloc.s diff --git a/data/overlays/gamestates/z_title.reloc.s b/data/overlays/gamestates/z_title.reloc.s deleted file mode 100644 index 7dbe27a56e..0000000000 --- a/data/overlays/gamestates/z_title.reloc.s +++ /dev/null @@ -1,11 +0,0 @@ -.include "macro.inc" - - # assembler directives - .set noat # allow manual use of $at - .set noreorder # don't insert nops after branches - .set gp=64 # allow use of 64-bit general purposee registers - -.section .rodata -glabel D_80800AB0 - -.incbin "baserom/ovl_title", 0xAB0, 0x000000E0 diff --git a/spec b/spec index 5f36c2d6cb..0fbc80211f 100644 --- a/spec +++ b/spec @@ -615,7 +615,7 @@ endseg beginseg name "ovl_title" include "build/src/overlays/gamestates/ovl_title/z_title.o" - include "build/data/overlays/gamestates/z_title.reloc.o" + include "build/src/overlays/gamestates/ovl_title/z_title_reloc.o" address 0x80800000 endseg diff --git a/src/overlays/gamestates/ovl_title/z_title.c b/src/overlays/gamestates/ovl_title/z_title.c index 16ba79987a..3ff5211d94 100644 --- a/src/overlays/gamestates/ovl_title/z_title.c +++ b/src/overlays/gamestates/ovl_title/z_title.c @@ -41,7 +41,7 @@ void Title_Calc(TitleContext* this) this->exit = 1; } -void Title_InitView(TitleContext* this, float x, float y, float z) +void Title_InitView(TitleContext* this, f32 x, f32 y, f32 z) { View* view; Vec3f v1; @@ -96,9 +96,9 @@ void Title_Draw(TitleContext* this) gSPSetLights1(gfxCtx->polyOpa.p++, sTitleLights); Title_InitView(this, 0, 150.0, 300.0); func_80093D18(this->state.gfxCtx); - Matrix_Translate(-53.0, -5.0, 0, 0); - Matrix_Scale(1.0, 1.0, 1.0, 1); - Matrix_RotateXYZ(0, sTitleRotY, 0, 1); + Matrix_Translate(-53.0, -5.0, 0, MTXMODE_NEW); + Matrix_Scale(1.0, 1.0, 1.0, MTXMODE_APPLY); + Matrix_RotateXYZ(0, sTitleRotY, 0, MTXMODE_APPLY); gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(this->state.gfxCtx, "../z_title.c", 424), G_MTX_LOAD); gSPDisplayList(gfxCtx->polyOpa.p++, &D_01002720); @@ -110,7 +110,7 @@ void Title_Draw(TitleContext* this) gDPSetPrimColor(gfxCtx->polyOpa.p++, 0, 0, 170, 255, 255, 255); gDPSetEnvColor(gfxCtx->polyOpa.p++, 0, 0, 255, 128); - _gDPLoadTextureBlockTile(gfxCtx->polyOpa.p++, + gDPLoadMultiBlock(gfxCtx->polyOpa.p++, &D_01001800, 0x100, 1, @@ -135,7 +135,7 @@ void Title_Draw(TitleContext* this) G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); - gDPSetTileSize(gfxCtx->polyOpa.p++, /*G_TX_RENDERTILE*/1, this->uls, (this->ult & 0x7F) - idx*4, 0, 0); + gDPSetTileSize(gfxCtx->polyOpa.p++, 1, this->uls, (this->ult & 0x7F) - idx*4, 0, 0); gSPTextureRectangle(gfxCtx->polyOpa.p++, 388, y << 2, 1156, (y+2)<<2, G_TX_RENDERTILE, 0, 0, 1024, 1024); }