diff options
| author | Derek Hensley <hensley.derek58@gmail.com> | 2023-02-21 10:36:56 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-21 15:36:56 -0300 |
| commit | 5941e09b220c255cd0b1208d1040151e9ea09359 (patch) | |
| tree | 7ea91a17de6d400b928da5467a7d196e2f6c586c /include | |
| parent | 6f60872ddbce56d7cb0299a53610519e349c383d (diff) | |
Fbdemo (TransitionTile) OK (#1163)
* Fbdemo OK
* Cleanup
* sync and format
* Fix functions.h
* format
* SQ
Diffstat (limited to 'include')
| -rw-r--r-- | include/PR/gbi.h | 8 | ||||
| -rw-r--r-- | include/functions.h | 17 | ||||
| -rw-r--r-- | include/variables.h | 5 | ||||
| -rw-r--r-- | include/z64.h | 5 | ||||
| -rw-r--r-- | include/z64transition.h | 32 |
5 files changed, 42 insertions, 25 deletions
diff --git a/include/PR/gbi.h b/include/PR/gbi.h index 07fa0ac2c..3ba8748b0 100644 --- a/include/PR/gbi.h +++ b/include/PR/gbi.h @@ -4082,7 +4082,7 @@ _DW({ \ #define gDPLoadTextureTile(pkt, timg, fmt, siz, width, height, \ uls, ult, lrs, lrt, pal, \ cms, cmt, masks, maskt, shifts, shiftt) \ -{ \ +_DW({ \ gDPSetTextureImage(pkt, fmt, siz, width, timg); \ gDPSetTile(pkt, fmt, siz, \ (((((lrs)-(uls)+1) * siz##_TILE_BYTES)+7)>>3), 0, \ @@ -4104,7 +4104,7 @@ _DW({ \ (ult)<<G_TEXTURE_IMAGE_FRAC, \ (lrs)<<G_TEXTURE_IMAGE_FRAC, \ (lrt)<<G_TEXTURE_IMAGE_FRAC); \ -} +}) #else /******** WORKAROUND hw 1 load tile bug ********/ @@ -4112,7 +4112,7 @@ _DW({ \ uls, ult, lrs, lrt, pal, \ cms, cmt, masks, maskt, shifts, shiftt) \ \ -{ \ +_DW({ \ int _loadtile_i, _loadtile_nw; Gfx *_loadtile_temp = pkt; \ guDPLoadTextureTile(_loadtile_temp, timg, fmt, siz, \ width, height, \ @@ -4121,7 +4121,7 @@ _DW({ \ _loadtile_nw = guGetDPLoadTextureTileSz(ult, lrt) - 1; \ for(_loadtile_i = 0; _loadtile_i < _loadtile_nw; _loadtile_i++) \ pkt; \ -} +}) #endif /* HW_VERSION_1 */ diff --git a/include/functions.h b/include/functions.h index f058547d9..5d23991a5 100644 --- a/include/functions.h +++ b/include/functions.h @@ -318,7 +318,7 @@ OSTime __osInsertTimer(OSTimer* t); // void __osVoiceContRead36(void); s32 __osSpDeviceBusy(void); s32 __osSiDeviceBusy(void); -// void guMtxIdent(void); +void guMtxIdent(Mtx* mtx); s32 osJamMesg(OSMesgQueue* mq, OSMesg msg, s32 flag); void osSetThreadPri(OSThread* t, OSPri p); OSPri osGetThreadPri(OSThread* t); @@ -2277,15 +2277,12 @@ void KaleidoScopeCall_Update(PlayState* play); void KaleidoScopeCall_Draw(PlayState* play); void Transition_Init(TransitionContext* transitionCtx); void Transition_Destroy(TransitionContext* transitionCtx); -// void func_80163DC0(void); -// void func_8016418C(void); -void TransitionUnk_Destroy(FbDemoStruct* this); -FbDemoStruct* TransitionUnk_Init(FbDemoStruct* this, s32 row, s32 col); -// void func_80164438(void); -void TransitionUnk_Draw(FbDemoStruct* this, Gfx**); -// void func_80164678(void); -void func_801647AC(FbDemoStruct* this); -// UNK_TYPE4 func_801647B8(void); + +void TransitionTile_Destroy(TransitionTile* this); +TransitionTile* TransitionTile_Init(TransitionTile* this, s32 cols, s32 rows); +void TransitionTile_Draw(TransitionTile* this, Gfx** gfxP); +void TransitionTile_Update(TransitionTile* this); + // void TransitionFade_Start(void); void* TransitionFade_Init(TransitionFade* arg0); void TransitionFade_Destroy(TransitionFade* arg0); diff --git a/include/variables.h b/include/variables.h index af32d062e..201cbdc6a 100644 --- a/include/variables.h +++ b/include/variables.h @@ -2481,9 +2481,8 @@ extern void (*sKaleidoScopeDrawFunc)(PlayState* play); extern FaultAddrConvClient sKaleidoAreaFaultClient; extern s16 sTransitionFillTimer; extern Input D_801F6C18; -extern FbDemoStruct sTrnsnUnk; -extern u16* D_801F6D0C; -extern s32 gTrnsnUnkState; +extern TransitionTile sTransitionTile; +extern s32 gTransitionTileState; extern VisMono sVisMono; extern Color_RGBA8_u32 gVisMonoColor; extern Struct_80140E80 D_801F6D38; diff --git a/include/z64.h b/include/z64.h index fca4478ad..e996f4a5a 100644 --- a/include/z64.h +++ b/include/z64.h @@ -961,11 +961,6 @@ typedef enum { /* 3 */ PICTO_PHOTO_STATE_READY } PictoPhotoState; -// OoT's TransitionUnk -typedef struct { - /* 0x00 */ char unk_00[0xDC]; -} FbDemoStruct; // size = 0xDC - typedef struct { /* 0x00 */ u8 mode; /* 0x04 */ f32 scale; diff --git a/include/z64transition.h b/include/z64transition.h index 98720e9a7..b50a3df4e 100644 --- a/include/z64transition.h +++ b/include/z64transition.h @@ -1,14 +1,40 @@ -#ifndef Z64_TRANSITION_H -#define Z64_TRANSITION_H +#ifndef Z64TRANSITION_H +#define Z64TRANSITION_H #include "ultra64.h" - #include "overlays/fbdemos/ovl_fbdemo_triforce/z_fbdemo_triforce.h" #include "overlays/fbdemos/ovl_fbdemo_wipe1/z_fbdemo_wipe1.h" #include "overlays/fbdemos/ovl_fbdemo_wipe3/z_fbdemo_wipe3.h" #include "overlays/fbdemos/ovl_fbdemo_wipe4/z_fbdemo_wipe4.h" #include "overlays/fbdemos/ovl_fbdemo_wipe5/z_fbdemo_wipe5.h" +typedef enum { + /* 0 */ TRANS_TILE_OFF, // Inactive, do nothing + /* 1 */ TRANS_TILE_SETUP, // Save the necessary buffers + /* 2 */ TRANS_TILE_PROCESS, // Initialize the transition + /* 3 */ TRANS_TILE_READY // The transition is ready, so will update and draw each frame +} TransitionTileState; + +typedef struct { + /* 0x0 */ f32 x; + /* 0x4 */ f32 y; +} TransitionTileVtxData; // size = 0x8 + +typedef struct { + /* 0x00 */ s32 cols; + /* 0x04 */ s32 rows; + /* 0x08 */ s32 frame; + /* 0x0C */ TransitionTileVtxData* vtxData; + /* 0x10 */ Vtx* vtxFrame1; + /* 0x14 */ Vtx* vtxFrame2; + /* 0x18 */ Mtx projection; + /* 0x58 */ Mtx modelView; + /* 0x98 */ Mtx unk_98; + /* 0xD8 */ Gfx* gfx; // "gfxtbl" + /* 0xDC */ u16* zBuffer; +} TransitionTile; // size = 0xE0 + + #define TC_SET_PARAMS (1 << 7) typedef struct { |
