mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-10 19:20:13 +00:00
Match retail z_fbdemo.c and z_fbdemo_fade.c (#1727)
* Match retail z_fbdemo.c and z_fbdemo_fade.c * Tweak macro arguments
This commit is contained in:
parent
2ee7a2b7ff
commit
300b3a8ffd
2 changed files with 18 additions and 15 deletions
|
@ -40,6 +40,22 @@ Gfx sTransTileSetupDL[] = {
|
|||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
#define SET_VERTEX(vtx, x, y, z, s, t, nx, ny, nz, alpha) \
|
||||
{ \
|
||||
Vtx_tn* vtxn = &(vtx)->n; \
|
||||
vtxn->ob[0] = (x); \
|
||||
vtxn->ob[1] = (y); \
|
||||
vtxn->ob[2] = (z); \
|
||||
vtxn->flag = 0; \
|
||||
vtxn->tc[0] = (s); \
|
||||
vtxn->tc[1] = (t); \
|
||||
vtxn->n[0] = (nx); \
|
||||
vtxn->n[1] = (ny); \
|
||||
vtxn->n[2] = (nz); \
|
||||
vtxn->a = (alpha); \
|
||||
} \
|
||||
(void)0
|
||||
|
||||
void TransitionTile_InitGraphics(TransitionTile* this) {
|
||||
s32 frame;
|
||||
s32 col;
|
||||
|
@ -61,20 +77,7 @@ void TransitionTile_InitGraphics(TransitionTile* this) {
|
|||
for (row = 0; row < this->rows + 1; row++) {
|
||||
colTex = 0;
|
||||
for (col = 0; col < this->cols + 1; col++) {
|
||||
Vtx_tn* vtxn = &vtx->n;
|
||||
|
||||
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;
|
||||
|
||||
SET_VERTEX(vtx++, col * 0x20, row * 0x20, -5, colTex << 6, rowTex << 6, 0, 0, 120, 255);
|
||||
colTex += 0x20;
|
||||
}
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ void TransitionFade_Update(void* thisx, s32 updateRate) {
|
|||
break;
|
||||
|
||||
case TRANS_FADE_TYPE_ONE_WAY:
|
||||
this->timer += updateRate;
|
||||
((TransitionFade*)thisx)->timer += updateRate;
|
||||
if (this->timer >= gSaveContext.transFadeDuration) {
|
||||
this->timer = gSaveContext.transFadeDuration;
|
||||
this->isDone = true;
|
||||
|
|
Loading…
Reference in a new issue