summaryrefslogtreecommitdiff
path: root/src/code/z_fbdemo.c
diff options
context:
space:
mode:
authorcadmic <cadmic24@gmail.com>2024-02-06 21:32:23 -0800
committerGitHub <noreply@github.com>2024-02-07 00:32:23 -0500
commit300b3a8ffdb852f3da26eff8ad1b7e25e1a864e0 (patch)
tree6c79c6019abd4203af12a05bcd77da6dc5f56dd5 /src/code/z_fbdemo.c
parent2ee7a2b7ff0722e2b9bea40953be02469854de14 (diff)
Match retail z_fbdemo.c and z_fbdemo_fade.c (#1727)
* Match retail z_fbdemo.c and z_fbdemo_fade.c * Tweak macro arguments
Diffstat (limited to 'src/code/z_fbdemo.c')
-rw-r--r--src/code/z_fbdemo.c31
1 files changed, 17 insertions, 14 deletions
diff --git a/src/code/z_fbdemo.c b/src/code/z_fbdemo.c
index b1ad5a208..1a3916ffa 100644
--- a/src/code/z_fbdemo.c
+++ b/src/code/z_fbdemo.c
@@ -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;
}