Fbdemo (TransitionTile) OK (#1163)

* Fbdemo OK

* Cleanup

* sync and format

* Fix functions.h

* format

* SQ
This commit is contained in:
Derek Hensley 2023-02-21 10:36:56 -08:00 committed by GitHub
parent 6f60872ddb
commit 5941e09b22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 308 additions and 85 deletions

View File

@ -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 */

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -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 {

2
spec
View File

@ -549,8 +549,8 @@ beginseg
include "build/src/code/z_kaleido_scope_call.o"
include "build/src/code/z_fbdemo_dlftbls.o"
include "build/src/code/z_fbdemo.o"
include "build/data/code/z_fbdemo.data.o"
include "build/src/code/z_fbdemo_fade.o"
include "build/data/code/z_fbdemo_fade.data.o"
include "build/src/code/z_fbdemo_circle.o"
include "build/src/code/z_overlay.o"
include "build/src/code/z_play.o"

View File

@ -1,20 +1,223 @@
/**
* @file z_fbdemo.c
*
* This file implements an unused transition system that takes the current screen, partitions it into large tiles, and
* can apply an effect to them.
*
* The screen is divided into 7 rows and 10 columns of tiles. (`gScreenWidth`/ 10 = `gScreenHeight` / 7 = 0x20)
*
* @note The only coded effect has a visual effect to blend the tiles to a single point, which looks like the screen
* gets sucked into.
*/
#include "global.h"
#include "system_malloc.h"
#pragma GLOBAL_ASM("asm/non_matchings/code/z_fbdemo/func_80163DC0.s")
Gfx sTransTileSetupDL[] = {
gsDPPipeSync(),
gsSPTexture(0x8000, 0x8000, 0, G_TX_RENDERTILE, G_ON),
gsSPLoadGeometryMode(G_TEXTURE_ENABLE),
gsDPSetCombineMode(G_CC_DECALRGB, G_CC_DECALRGB),
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_1CYCLE | G_PM_1PRIMITIVE,
G_AC_NONE | G_ZS_PIXEL | G_RM_AA_OPA_SURF | G_RM_AA_OPA_SURF2),
gsSPEndDisplayList(),
};
#pragma GLOBAL_ASM("asm/non_matchings/code/z_fbdemo/func_8016418C.s")
void TransitionTile_InitGraphics(TransitionTile* this) {
s32 frame;
s32 col;
s32 col2;
s32 colTex;
Vtx* vtx;
s32 row;
s32 rowTex;
Gfx* gfx;
#pragma GLOBAL_ASM("asm/non_matchings/code/z_fbdemo/TransitionUnk_Destroy.s")
guMtxIdent(&this->modelView);
guMtxIdent(&this->unk_98);
guOrtho(&this->projection, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, -1000.0f, 1000.0f, 1.0f);
#pragma GLOBAL_ASM("asm/non_matchings/code/z_fbdemo/TransitionUnk_Init.s")
for (frame = 0; frame < 2; frame++) {
this->frame = frame;
vtx = (this->frame == 0) ? this->vtxFrame1 : this->vtxFrame2;
for (rowTex = 0, row = 0; row < (this->rows + 1); row++, rowTex += 0x20) {
for (colTex = 0, col = 0; col < (this->cols + 1); col++, colTex += 0x20) {
Vtx_tn* vtxn = &vtx->n;
#pragma GLOBAL_ASM("asm/non_matchings/code/z_fbdemo/func_80164438.s")
// clang-format off
vtx++; \
vtxn->tc[0] = colTex << 6; \
vtxn->ob[0] = col * 0x20; \
vtxn->ob[1] = row * 0x20; \
vtxn->ob[2] = -5; \
vtxn->flag = 0; \
vtxn->tc[1] = rowTex << 6; \
vtxn->n[0] = 0; \
vtxn->n[1] = 0; \
vtxn->n[2] = 120; \
vtxn->a = 255;
// clang-format on
}
}
}
#pragma GLOBAL_ASM("asm/non_matchings/code/z_fbdemo/TransitionUnk_Draw.s")
gfx = this->gfx;
for (rowTex = 0, row = 0; row < this->rows; row++, rowTex += 0x20) {
gSPVertex(gfx++, SEGMENT_ADDR(0xA, (u32)row * (this->cols + 1) * sizeof(Vtx)), 2 * (this->cols + 1), 0);
#pragma GLOBAL_ASM("asm/non_matchings/code/z_fbdemo/func_80164678.s")
colTex = 0;
col2 = 0;
col = 0;
while (col < this->cols) {
gDPPipeSync(gfx++);
#pragma GLOBAL_ASM("asm/non_matchings/code/z_fbdemo/func_801647AC.s")
gDPLoadTextureTile(gfx++, SEGMENT_ADDR(0xB, 0), G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, SCREEN_HEIGHT,
colTex, rowTex, colTex + 0x20, rowTex + 0x20, 0, G_TX_NOMIRROR | G_TX_WRAP,
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
#pragma GLOBAL_ASM("asm/non_matchings/code/z_fbdemo/func_801647B8.s")
gSP1Quadrangle(gfx++, col, col + 1, col2 + this->cols + 2, this->cols + col2 + 1, 0);
colTex += 0x20;
col2++;
col++;
}
}
gDPPipeSync(gfx++);
gSPEndDisplayList(gfx++);
}
void TransitionTile_InitVtxData(TransitionTile* this) {
s32 row;
s32 col;
for (row = 0; row < this->rows + 1; row++) {
for (col = 0; col < this->cols + 1; col++) {
(this->vtxData + col + row * (this->cols + 1))->x = col * 0x20;
(this->vtxData + col + row * (this->cols + 1))->y = row * 0x20;
}
}
}
void TransitionTile_Destroy(TransitionTile* this) {
Sleep_Msec(100);
if (this->vtxData != NULL) {
SystemArena_Free(this->vtxData);
this->vtxData = NULL;
}
if (this->vtxFrame1 != NULL) {
SystemArena_Free(this->vtxFrame1);
this->vtxFrame1 = NULL;
}
if (this->vtxFrame2 != NULL) {
SystemArena_Free(this->vtxFrame2);
this->vtxFrame2 = NULL;
}
if (this->gfx != NULL) {
SystemArena_Free(this->gfx);
this->gfx = NULL;
}
}
TransitionTile* TransitionTile_Init(TransitionTile* this, s32 cols, s32 rows) {
s32 gridSize;
bzero(this, sizeof(TransitionTile));
this->frame = 0;
this->cols = cols;
this->rows = rows;
gridSize = (cols + 1) * (rows + 1);
this->vtxData = SystemArena_Malloc(gridSize * sizeof(TransitionTileVtxData));
this->vtxFrame1 = SystemArena_Malloc(gridSize * sizeof(Vtx));
this->vtxFrame2 = SystemArena_Malloc(gridSize * sizeof(Vtx));
this->gfx = SystemArena_Malloc(((cols * 9 + 1) * rows + 2) * sizeof(Gfx));
if ((this->vtxData == NULL) || (this->vtxFrame1 == NULL) || (this->vtxFrame2 == NULL) || (this->gfx == NULL)) {
if (this->vtxData != NULL) {
SystemArena_Free(this->vtxData);
this->vtxData = NULL;
}
if (this->vtxFrame1 != NULL) {
SystemArena_Free(this->vtxFrame1);
this->vtxFrame1 = NULL;
}
if (this->vtxFrame2 != NULL) {
SystemArena_Free(this->vtxFrame2);
this->vtxFrame2 = NULL;
}
if (this->gfx != NULL) {
SystemArena_Free(this->gfx);
this->gfx = NULL;
}
return NULL;
}
TransitionTile_InitGraphics(this);
TransitionTile_InitVtxData(this);
this->frame = 0;
return this;
}
void TransitionTile_SetVtx(TransitionTile* this) {
s32 row;
s32 col;
Vtx* vtx;
for (row = 0; row < this->rows + 1; row++) {
for (col = 0; col < this->cols + 1; col++) {
vtx = (this->frame == 0) ? this->vtxFrame1 : this->vtxFrame2;
(vtx + col + row * (this->cols + 1))->n.ob[0] = (this->vtxData + col + row * (this->cols + 1))->x;
vtx = (this->frame == 0) ? this->vtxFrame1 : this->vtxFrame2;
(vtx + col + row * (this->cols + 1))->n.ob[1] = (this->vtxData + col + row * (this->cols + 1))->y;
}
}
}
void TransitionTile_Draw(TransitionTile* this, Gfx** gfxP) {
Gfx* gfx = *gfxP;
gSPDisplayList(gfx++, sTransTileSetupDL);
TransitionTile_SetVtx(this);
gSPMatrix(gfx++, &this->projection, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
gSPMatrix(gfx++, &this->modelView, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPSegment(gfx++, 0xA, this->frame == 0 ? this->vtxFrame1 : this->vtxFrame2);
gSPSegment(gfx++, 0xB, this->zBuffer);
gSPDisplayList(gfx++, sTransTileSetupDL);
gSPDisplayList(gfx++, this->gfx);
gDPPipeSync(gfx++);
this->frame ^= 1;
*gfxP = gfx;
}
void TransitionTile_Suck(TransitionTile* this) {
s32 row;
s32 col;
f32 diffX;
f32 diffY;
f32 scale;
for (row = 0; row < this->rows + 1; row++) {
for (col = 0; col < this->cols + 1; col++) {
diffX = (this->vtxData + col + row * (this->cols + 1))->x - (this->vtxData + 5 + 4 * (this->cols + 1))->x;
diffY = (this->vtxData + col + row * (this->cols + 1))->y - (this->vtxData + 5 + 4 * (this->cols + 1))->y;
scale = (SQ(diffX) + SQ(diffY)) / SQ(10.0f);
if (scale != 0.0f) {
if (scale < 1.0f) {
scale = 1.0f;
}
(this->vtxData + col + row * (this->cols + 1))->x -= diffX / scale;
(this->vtxData + col + row * (this->cols + 1))->y -= diffY / scale;
}
}
}
}
void TransitionTile_Update(TransitionTile* this) {
}
s32 func_801647B8(TransitionTile* this) {
return 0;
}

View File

@ -13,9 +13,8 @@ u8 D_801D0D54 = false;
s16 sTransitionFillTimer;
Input D_801F6C18;
FbDemoStruct sTrnsnUnk;
u16* D_801F6D0C;
s32 gTrnsnUnkState;
TransitionTile sTransitionTile;
s32 gTransitionTileState;
VisMono sVisMono;
Color_RGBA8_u32 gVisMonoColor;
Struct_80140E80 D_801F6D38;
@ -389,9 +388,9 @@ void Play_Destroy(GameState* thisx) {
EffectSS_Clear(this);
CollisionCheck_DestroyContext(this, &this->colChkCtx);
if (gTrnsnUnkState == 3) {
TransitionUnk_Destroy(&sTrnsnUnk);
gTrnsnUnkState = 0;
if (gTransitionTileState == TRANS_TILE_READY) {
TransitionTile_Destroy(&sTransitionTile);
gTransitionTileState = TRANS_TILE_OFF;
}
if ((this->transitionMode == TRANS_MODE_INSTANCE_RUNNING) || D_801D0D54) {
@ -710,9 +709,9 @@ void Play_UpdateTransition(PlayState* this) {
Play_ClearTransition(this);
}
this->transitionMode = TRANS_MODE_OFF;
if (gTrnsnUnkState == 3) {
TransitionUnk_Destroy(&sTrnsnUnk);
gTrnsnUnkState = 0;
if (gTransitionTileState == TRANS_TILE_READY) {
TransitionTile_Destroy(&sTransitionTile);
gTransitionTileState = TRANS_TILE_OFF;
Game_SetFramerateDivisor(&this->state, 3);
}
}
@ -759,7 +758,7 @@ void Play_UpdateTransition(PlayState* this) {
this->envCtx.screenFillColor[3] = (1.0f - (sTransitionFillTimer / 20.0f)) * 255.0f;
if (sTransitionFillTimer >= 20) {
gTrnsnUnkState = 0;
gTransitionTileState = TRANS_TILE_OFF;
Game_SetFramerateDivisor(&this->state, 3);
this->transitionTrigger = TRANS_TRIGGER_OFF;
this->transitionMode = TRANS_MODE_OFF;
@ -793,7 +792,7 @@ void Play_UpdateTransition(PlayState* this) {
this->transitionTrigger = TRANS_TRIGGER_OFF;
this->transitionMode = TRANS_MODE_OFF;
} else {
gTrnsnUnkState = 0;
gTransitionTileState = TRANS_TILE_OFF;
Game_SetFramerateDivisor(&this->state, 3);
this->transitionTrigger = TRANS_TRIGGER_OFF;
this->transitionMode = TRANS_MODE_OFF;
@ -822,7 +821,7 @@ void Play_UpdateTransition(PlayState* this) {
func_8019F128(NA_SE_EV_SAND_STORM - SFX_FLAG);
if (this->transitionTrigger == TRANS_TRIGGER_END) {
if (this->envCtx.sandstormPrimA < 110) {
gTrnsnUnkState = 0;
gTransitionTileState = TRANS_TILE_OFF;
Game_SetFramerateDivisor(&this->state, 3);
this->transitionTrigger = TRANS_TRIGGER_OFF;
this->transitionMode = TRANS_MODE_OFF;
@ -858,7 +857,7 @@ void Play_UpdateTransition(PlayState* this) {
if (this->transitionTrigger == TRANS_TRIGGER_END) {
if (this->envCtx.sandstormPrimA <= 0) {
gTrnsnUnkState = 0;
gTransitionTileState = TRANS_TILE_OFF;
Game_SetFramerateDivisor(&this->state, 3);
this->transitionTrigger = TRANS_TRIGGER_OFF;
this->transitionMode = TRANS_MODE_OFF;
@ -881,7 +880,7 @@ void Play_UpdateTransition(PlayState* this) {
this->envCtx.screenFillColor[3] = gSaveContext.cutsceneTransitionControl;
if (gSaveContext.cutsceneTransitionControl <= 100) {
gTrnsnUnkState = 0;
gTransitionTileState = TRANS_TILE_OFF;
Game_SetFramerateDivisor(&this->state, 3);
this->transitionTrigger = TRANS_TRIGGER_OFF;
this->transitionMode = TRANS_MODE_OFF;
@ -922,25 +921,28 @@ void Play_UpdateMain(PlayState* this) {
this->transitionMode = TRANS_MODE_SETUP;
}
if (gTrnsnUnkState != 0) {
switch (gTrnsnUnkState) {
case 2:
if (TransitionUnk_Init(&sTrnsnUnk, 10, 7) == NULL) {
gTrnsnUnkState = 0;
if (gTransitionTileState != TRANS_TILE_OFF) {
switch (gTransitionTileState) {
case TRANS_TILE_PROCESS:
if (TransitionTile_Init(&sTransitionTile, 10, 7) == NULL) {
gTransitionTileState = TRANS_TILE_OFF;
} else {
D_801F6D0C = gZBufferPtr;
gTrnsnUnkState = 3;
sTransitionTile.zBuffer = gZBufferPtr;
gTransitionTileState = TRANS_TILE_READY;
Game_SetFramerateDivisor(&this->state, 1);
}
break;
case 3:
func_801647AC(&sTrnsnUnk);
case TRANS_TILE_READY:
TransitionTile_Update(&sTransitionTile);
break;
default:
break;
}
}
Play_UpdateTransition(this);
if (gTrnsnUnkState != 3) {
if (gTransitionTileState != TRANS_TILE_READY) {
if ((gSaveContext.gameMode == 0) &&
(((this->msgCtx.msgMode == 0)) ||
((this->msgCtx.currentTextId == 0xFF) && (this->msgCtx.msgMode == 0x42) &&
@ -1121,7 +1123,7 @@ void Play_DrawMain(PlayState* this) {
R_PAUSE_BG_PRERENDER_STATE = PAUSE_BG_PRERENDER_OFF;
}
if ((R_PAUSE_BG_PRERENDER_STATE <= PAUSE_BG_PRERENDER_SETUP) && (gTrnsnUnkState < 2)) {
if ((R_PAUSE_BG_PRERENDER_STATE <= PAUSE_BG_PRERENDER_SETUP) && (gTransitionTileState <= TRANS_TILE_SETUP)) {
if (this->skyboxCtx.skyboxShouldDraw || (this->roomCtx.curRoom.mesh->type0.type == 1)) {
func_8012CF0C(gfxCtx, false, true, 0, 0, 0);
} else {
@ -1226,10 +1228,10 @@ void Play_DrawMain(PlayState* this) {
POLY_OPA_DISP = sp218;
}
if (gTrnsnUnkState == 3) {
if (gTransitionTileState == TRANS_TILE_READY) {
Gfx* sp90 = POLY_OPA_DISP;
TransitionUnk_Draw(&sTrnsnUnk, &sp90);
TransitionTile_Draw(&sTransitionTile, &sp90);
POLY_OPA_DISP = sp90;
sp25B = true;
goto PostWorldDraw;
@ -1362,7 +1364,8 @@ void Play_DrawMain(PlayState* this) {
Play_DrawMotionBlur(this);
if (((R_PAUSE_BG_PRERENDER_STATE == PAUSE_BG_PRERENDER_SETUP) || (gTrnsnUnkState == 1)) ||
if (((R_PAUSE_BG_PRERENDER_STATE == PAUSE_BG_PRERENDER_SETUP) ||
(gTransitionTileState == TRANS_TILE_SETUP)) ||
(R_PICTO_PHOTO_STATE == PICTO_PHOTO_STATE_SETUP)) {
Gfx* sp74;
Gfx* sp70 = POLY_OPA_DISP;
@ -1380,7 +1383,7 @@ void Play_DrawMain(PlayState* this) {
this->pauseBgPreRender.fbufSave = gfxCtx->zbuffer;
this->pauseBgPreRender.cvgSave = this->unk_18E58;
} else {
gTrnsnUnkState = 2;
gTransitionTileState = TRANS_TILE_PROCESS;
this->pauseBgPreRender.fbufSave = gfxCtx->zbuffer;
this->pauseBgPreRender.cvgSave = NULL;
}
@ -2241,7 +2244,7 @@ void Play_Init(GameState* thisx) {
this->unk_18E68 = D_80784600;
this->unk_18E58 = D_80784600;
this->unk_18E60 = D_80784600;
gTrnsnUnkState = 0;
gTransitionTileState = TRANS_TILE_OFF;
this->transitionMode = TRANS_MODE_OFF;
D_801D0D54 = false;

View File

@ -1299,7 +1299,7 @@ void func_8012CF0C(GraphicsContext* gfxCtx, s32 clearFb, s32 clearZb, u8 r, u8 g
}
void func_8012D374(GraphicsContext* gfxCtx, u8 r, u8 g, u8 b) {
if ((R_PAUSE_BG_PRERENDER_STATE <= PAUSE_BG_PRERENDER_SETUP) && (gTrnsnUnkState < 2)) {
if ((R_PAUSE_BG_PRERENDER_STATE <= PAUSE_BG_PRERENDER_SETUP) && (gTransitionTileState <= TRANS_TILE_SETUP)) {
func_8012CF0C(gfxCtx, true, true, r, g, b);
} else {
func_8012CF0C(gfxCtx, false, false, r, g, b);

View File

@ -570,6 +570,7 @@
0x801D0B70 : "z_kaleido_manager",
0x801D0BB0 : "",
0x801D0C80 : "z_fbdemo",
0x801D0CB0 : "z_fbdemo_fade",
0x801D0D00 : "z_fbdemo_circle",
0x801D0D50 : "z_play",
0x801D0D80 : "z_play_hireso",

View File

@ -2938,14 +2938,14 @@
0x80163C0C:("KaleidoScopeCall_Draw",),
0x80163C90:("Transition_Init",),
0x80163D80:("Transition_Destroy",),
0x80163DC0:("func_80163DC0",),
0x8016418C:("func_8016418C",),
0x8016424C:("TransitionUnk_Destroy",),
0x801642D8:("TransitionUnk_Init",),
0x80164438:("func_80164438",),
0x8016454C:("TransitionUnk_Draw",),
0x80164678:("func_80164678",),
0x801647AC:("func_801647AC",),
0x80163DC0:("TransitionTile_InitGraphics",),
0x8016418C:("TransitionTile_InitVtxData",),
0x8016424C:("TransitionTile_Destroy",),
0x801642D8:("TransitionTile_Init",),
0x80164438:("TransitionTile_SetVtx",),
0x8016454C:("TransitionTile_Draw",),
0x80164678:("TransitionTile_Suck",),
0x801647AC:("TransitionTile_Update",),
0x801647B8:("func_801647B8",),
0x801647D0:("TransitionFade_Start",),
0x8016482C:("TransitionFade_Init",),

View File

@ -4053,9 +4053,8 @@
0x801F6C04:("sKaleidoScopeDrawFunc","void*","",0x4),
0x801F6C10:("sTransitionFillTimer","UNK_TYPE1","",0x1),
0x801F6C18:("D_801F6C18","Input","",0x18),
0x801F6C30:("sTrnsnUnk","UNK_TYPE1","",0x1),
0x801F6D0C:("D_801F6D0C","UNK_TYPE1","",0x1),
0x801F6D10:("gTrnsnUnkState","UNK_TYPE4","",0x4),
0x801F6C30:("sTransitionTile","TransitionTile","",0xE0),
0x801F6D10:("gTransitionTileState","UNK_TYPE4","",0x4),
0x801F6D18:("sVisMono","UNK_TYPE1","",0x1),
0x801F6D30:("gVisMonoColor","Color_RGBA8","",0x4),
0x801F6D38:("D_801F6D38","UNK_TYPE1","",0x1),

View File

@ -2452,14 +2452,14 @@ asm/non_matchings/code/z_kaleido_scope_call/func_80163A58.s,func_80163A58,0x8016
asm/non_matchings/code/z_kaleido_scope_call/func_80163C0C.s,func_80163C0C,0x80163C0C,0x21
asm/non_matchings/code/z_fbdemo_dlftbls/Transition_Init.s,Transition_Init,0x80163C90,0x3C
asm/non_matchings/code/z_fbdemo_dlftbls/Transition_Destroy.s,Transition_Destroy,0x80163D80,0x10
asm/non_matchings/code/z_fbdemo/func_80163DC0.s,func_80163DC0,0x80163DC0,0xF3
asm/non_matchings/code/z_fbdemo/func_8016418C.s,func_8016418C,0x8016418C,0x30
asm/non_matchings/code/z_fbdemo/TransitionUnk_Destroy.s,TransitionUnk_Destroy,0x8016424C,0x23
asm/non_matchings/code/z_fbdemo/TransitionUnk_Init.s,TransitionUnk_Init,0x801642D8,0x58
asm/non_matchings/code/z_fbdemo/func_80164438.s,func_80164438,0x80164438,0x45
asm/non_matchings/code/z_fbdemo/TransitionUnk_Draw.s,TransitionUnk_Draw,0x8016454C,0x4B
asm/non_matchings/code/z_fbdemo/func_80164678.s,func_80164678,0x80164678,0x4D
asm/non_matchings/code/z_fbdemo/func_801647AC.s,func_801647AC,0x801647AC,0x3
asm/non_matchings/code/z_fbdemo/TransitionTile_InitGraphics.s,TransitionTile_InitGraphics,0x80163DC0,0xF3
asm/non_matchings/code/z_fbdemo/TransitionTile_InitVtxData.s,TransitionTile_InitVtxData,0x8016418C,0x30
asm/non_matchings/code/z_fbdemo/TransitionTile_Destroy.s,TransitionTile_Destroy,0x8016424C,0x23
asm/non_matchings/code/z_fbdemo/TransitionTile_Init.s,TransitionTile_Init,0x801642D8,0x58
asm/non_matchings/code/z_fbdemo/TransitionTile_SetVtx.s,TransitionTile_SetVtx,0x80164438,0x45
asm/non_matchings/code/z_fbdemo/TransitionTile_Draw.s,TransitionTile_Draw,0x8016454C,0x4B
asm/non_matchings/code/z_fbdemo/TransitionTile_Suck.s,TransitionTile_Suck,0x80164678,0x4D
asm/non_matchings/code/z_fbdemo/TransitionTile_Update.s,TransitionTile_Update,0x801647AC,0x3
asm/non_matchings/code/z_fbdemo/func_801647B8.s,func_801647B8,0x801647B8,0x6
asm/non_matchings/code/z_fbdemo_fade/TransitionFade_Start.s,TransitionFade_Start,0x801647D0,0x17
asm/non_matchings/code/z_fbdemo_fade/TransitionFade_Init.s,TransitionFade_Init,0x8016482C,0xB

1 asm/non_matchings/code/z_en_a_keep/EnAObj_Init.s EnAObj_Init 0x800A5AC0 0x2B
2452 asm/non_matchings/code/z_kaleido_scope_call/func_80163C0C.s func_80163C0C 0x80163C0C 0x21
2453 asm/non_matchings/code/z_fbdemo_dlftbls/Transition_Init.s Transition_Init 0x80163C90 0x3C
2454 asm/non_matchings/code/z_fbdemo_dlftbls/Transition_Destroy.s Transition_Destroy 0x80163D80 0x10
2455 asm/non_matchings/code/z_fbdemo/func_80163DC0.s asm/non_matchings/code/z_fbdemo/TransitionTile_InitGraphics.s func_80163DC0 TransitionTile_InitGraphics 0x80163DC0 0xF3
2456 asm/non_matchings/code/z_fbdemo/func_8016418C.s asm/non_matchings/code/z_fbdemo/TransitionTile_InitVtxData.s func_8016418C TransitionTile_InitVtxData 0x8016418C 0x30
2457 asm/non_matchings/code/z_fbdemo/TransitionUnk_Destroy.s asm/non_matchings/code/z_fbdemo/TransitionTile_Destroy.s TransitionUnk_Destroy TransitionTile_Destroy 0x8016424C 0x23
2458 asm/non_matchings/code/z_fbdemo/TransitionUnk_Init.s asm/non_matchings/code/z_fbdemo/TransitionTile_Init.s TransitionUnk_Init TransitionTile_Init 0x801642D8 0x58
2459 asm/non_matchings/code/z_fbdemo/func_80164438.s asm/non_matchings/code/z_fbdemo/TransitionTile_SetVtx.s func_80164438 TransitionTile_SetVtx 0x80164438 0x45
2460 asm/non_matchings/code/z_fbdemo/TransitionUnk_Draw.s asm/non_matchings/code/z_fbdemo/TransitionTile_Draw.s TransitionUnk_Draw TransitionTile_Draw 0x8016454C 0x4B
2461 asm/non_matchings/code/z_fbdemo/func_80164678.s asm/non_matchings/code/z_fbdemo/TransitionTile_Suck.s func_80164678 TransitionTile_Suck 0x80164678 0x4D
2462 asm/non_matchings/code/z_fbdemo/func_801647AC.s asm/non_matchings/code/z_fbdemo/TransitionTile_Update.s func_801647AC TransitionTile_Update 0x801647AC 0x3
2463 asm/non_matchings/code/z_fbdemo/func_801647B8.s func_801647B8 0x801647B8 0x6
2464 asm/non_matchings/code/z_fbdemo_fade/TransitionFade_Start.s TransitionFade_Start 0x801647D0 0x17
2465 asm/non_matchings/code/z_fbdemo_fade/TransitionFade_Init.s TransitionFade_Init 0x8016482C 0xB