diff options
| author | petrie911 <69443847+petrie911@users.noreply.github.com> | 2020-12-25 15:19:52 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-25 16:19:52 -0500 |
| commit | a8ae9f48b7c07e0188fdb720ee153d07f2fd679e (patch) | |
| tree | 20e458f9b0d276450e7a818b9ff35b5779651434 /src/code/z_fbdemo.c | |
| parent | 09ddf4f71e8d717f998fa2d0ce8faa720ee302fc (diff) | |
z_scene_table, z_view, and z_fbdemo_fade OK (#561)
* fbdemo
* the view is clear
* more matchings
* scene table doesn't want to be nice
* small thing in view
* can do
* accidentally a value
Diffstat (limited to 'src/code/z_fbdemo.c')
| -rw-r--r-- | src/code/z_fbdemo.c | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/src/code/z_fbdemo.c b/src/code/z_fbdemo.c index 426231bcb..743551852 100644 --- a/src/code/z_fbdemo.c +++ b/src/code/z_fbdemo.c @@ -28,8 +28,12 @@ Gfx D_8012B000[] = { #ifdef NON_EQUIVALENT // The general control flow is correct and nothing is especially out of order but there are // many small reoderings and regalloc all over so functional equivalence cannot be verified +// The first loop is down to regalloc. The second needs work. void TransitionUnk_InitGraphics(TransitionUnk* this) { - Vtx* vtx2; + s32 pad; + s32 pad2; + s32 pad3; + Vtx_t* vtx2; s32 frame; s32 rowTex; s32 row; @@ -45,20 +49,21 @@ void TransitionUnk_InitGraphics(TransitionUnk* this) { for (frame = 0; frame < 2; frame++) { this->frame = frame; vtx = (frame == 0) ? this->vtxFrame1 : this->vtxFrame2; - for (col = 0, colTex = 0; col < this->col + 1; col++, colTex += 0x20) { - for (row = 0, rowTex = 0; row < this->row + 1; row++, rowTex += 0x20) { - vtx2 = vtx; - vtx2->v.tc[0] = rowTex * 0x40; - vtx2->v.ob[0] = rowTex; - vtx2->v.ob[1] = col * 0x20; - vtx2->v.ob[2] = -5; - vtx2->v.flag = 0; - vtx2->v.tc[1] = colTex * 0x40; - vtx2->v.cn[0] = 0; - vtx2->v.cn[1] = 0; - vtx2->v.cn[2] = 120; - vtx2->v.cn[3] = 255; + for (colTex = 0, col = 0; col < this->col + 1; colTex += 0x20, col++) { + for (rowTex = 0, row = 0; row < this->row + 1; rowTex += 0x20, row++) { + vtx2 = &vtx->v; vtx++; + + vtx2->tc[0] = rowTex << 6; + vtx2->ob[0] = row * 0x20; + vtx2->ob[1] = col * 0x20; + vtx2->ob[2] = -5; + vtx2->flag = 0; + vtx2->tc[1] = colTex << 6; + vtx2->cn[0] = 0; + vtx2->cn[1] = 0; + vtx2->cn[2] = 120; + vtx2->cn[3] = 255; } } } |
