From 79ada16434985ac535fb348c419d3842aa75dc32 Mon Sep 17 00:00:00 2001 From: Prakxo Date: Sat, 13 May 2023 15:19:06 +0200 Subject: [PATCH] link m_fbdemo_wipe1 --- config/assets.yml | 2 -- config/rel_slices.yml | 10 +++++----- rel/m_fbdemo_triforce.c | 4 ++-- rel/m_fbdemo_wipe1.c | 28 ++++++++++++++++++++++++---- tools/ppcdis | 2 +- 5 files changed, 32 insertions(+), 14 deletions(-) diff --git a/config/assets.yml b/config/assets.yml index 5d145f88..1c9e5ac2 100644 --- a/config/assets.yml +++ b/config/assets.yml @@ -10,5 +10,3 @@ config/rel.yml: addrs: [0x80652AD0, 0x80652C60] g_wipe1_txt: addrs: [0x80652C60, 0x80653460] - wipe1_modelT: - addrs: [0x80653460, 0x80653558] \ No newline at end of file diff --git a/config/rel_slices.yml b/config/rel_slices.yml index aa77e6ed..3d2b9b27 100644 --- a/config/rel_slices.yml +++ b/config/rel_slices.yml @@ -10,13 +10,13 @@ m_fbdemo.c: .text: [0x803A0350, 0x803A0ABC] .rodata: [0x80641F40, 0x80641F60] .data: [0x80652AA0, 0x80652AD0] -#m_fbdemo_triforce.c: +#m_fbdemo_triforce.c: #relocs mismatch # .text: [0x803A0ABC, 0x803A0F00] # .rodata: [0x80641F60, 0x80641FA0] -#m_fbdemo_wipe1.c: #data mismatch -# .text: [0x803A0F00, 0x803A12F8] -# .rodata: [0x80641FA0, 0x80641FC0] -# .data: [0x80652AD0, 0x80653558] +m_fbdemo_wipe1.c: + .text: [0x803A0F00, 0x803A12F8] + .rodata: [0x80641FA0, 0x80641FC0] + .data: [0x80652AD0, 0x80653558] m_fbdemo_fade.c: .text: [0x803A12F8, 0x803A1508] .rodata: [0x80641FC0, 0x80641FD8] diff --git a/rel/m_fbdemo_triforce.c b/rel/m_fbdemo_triforce.c index bd0642bb..c6f8695a 100644 --- a/rel/m_fbdemo_triforce.c +++ b/rel/m_fbdemo_triforce.c @@ -16,7 +16,7 @@ void fbdemo_triforce_startup(TransitionTriforce* this){ this->txt = 0x224; } - guPerspective(&this->perspmtx, &this->normal, 60.0f, 1.33f, 10.0f, 12800.0f, 1.0f); + guPerspective(&this->perspmtx, &this->normal, 60.0f, 4.0f/3.0f, 10.0f, 12800.0f, 1.0f); guLookAt(&this->lookatmtx, 0.0f,0.0f, 400.0f, 0.0f, 0.0f, 0.0f, 0.0f,1.0f, 0.0f); } @@ -96,4 +96,4 @@ void fbdemo_triforce_settype(TransitionTriforce* this, int type){ void fbdemo_triforce_setcolor_rgba8888(void){ -} \ No newline at end of file +} diff --git a/rel/m_fbdemo_wipe1.c b/rel/m_fbdemo_wipe1.c index 9700dca6..abfe41a4 100644 --- a/rel/m_fbdemo_wipe1.c +++ b/rel/m_fbdemo_wipe1.c @@ -4,7 +4,7 @@ #include "libultra/gu.h" #include "m_rcp.h" -//This should be a DL!! but gfx commands fail ig lol + u8 wipe1_v[] = { #include "assets/wipe1_v.inc" }; @@ -13,9 +13,29 @@ u8 g_wipe1_txt[] = { #include "assets/g_wipe1_txt.inc" }; -u8 wipe1_modelT[] = { - #include "assets/wipe1_modelT.inc" -}; + +Gfx wipe1_modelT[] = { + gsDPPipeSync(), + gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), + gsSPSetGeometryMode(G_ZBUFFER | G_SHADE | G_SHADING_SMOOTH), + gsDPSetOtherMode(G_AD_DISABLE | G_CD_MAGICSQ | G_CK_NONE | G_TC_FILT | G_TF_BILERP | G_TT_NONE | G_TL_TILE | G_TD_CLAMP | G_TP_PERSP | G_CYC_2CYCLE | G_PM_1PRIMITIVE, G_AC_NONE | G_ZS_PRIM | G_RM_PASS | G_RM_AA_ZB_TEX_EDGE2), + gsDPSetCombineLERP(TEXEL1, TEXEL0, PRIM_LOD_FRAC, TEXEL0, TEXEL1, TEXEL0, PRIM_LOD_FRAC, TEXEL0, COMBINED, 0, PRIMITIVE, 0, COMBINED, 0, PRIMITIVE, 0), + gsDPSetPrimDepth(0, 0), + gsDPLoadTextureBlock_4b(g_wipe1_txt, G_IM_FMT_I, 64, 64, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_MIRROR | G_TX_WRAP, 6, 6, 11, G_TX_NOLOD), + gsDPLoadMultiBlock_4b(g_wipe1_txt, 0x0100, 1, G_IM_FMT_I, 64, 64, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_MIRROR | G_TX_WRAP, 6, 6, 11, 1), + gsDPSetTextureLUT(G_TT_NONE), + gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), + gsSPDisplayList(0x08000000), + gsSPVertex(wipe1_v, 25, 0), + gsSP2Triangles(0, 1, 2, 0, 1, 3, 4, 0), + gsSP2Triangles(5, 6, 7, 0, 6, 8, 9, 0), + gsSP2Triangles(8, 10, 11, 0, 10, 12, 13, 0), + gsSP2Triangles(12, 14, 15, 0, 14, 16, 17, 0), + gsSP2Triangles(16, 18, 19, 0, 18, 20, 21, 0), + gsSP2Triangles(20, 22, 23, 0, 22, 0, 24, 0), + gsSPEndDisplayList(), +}; + TransitionWipe* fbdemo_wipe1_init(TransitionWipe* this){ diff --git a/tools/ppcdis b/tools/ppcdis index eca3f301..29c3a248 160000 --- a/tools/ppcdis +++ b/tools/ppcdis @@ -1 +1 @@ -Subproject commit eca3f3015a86bf0c78d1e415aeff2dda1851194f +Subproject commit 29c3a24832f4c56daf54714f0c298e503a881bb8