Merge pull request #1854 from nocato/matches

Match SubRoom_800C751C, finishing opening overlay
This commit is contained in:
nocato 2024-02-01 09:00:12 +00:00 committed by GitHub
commit 20f5c1fbd1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 60 additions and 97 deletions

View File

@ -175,7 +175,7 @@ Individual overlay progress:
<td><b>opening</b></td>
<td>42 KB</td>
<td>Opening Demo (SCENE 01-1)</td>
<td>🚧 Work in progress</td>
<td><b>✔️ 100% decompiled!</b></td>
</tr>
<tr>
<td><b>option</b></td>

View File

@ -1,92 +0,0 @@
opt c+, at+, e+, n-
section overlay.text
xdef SubRoom_800C751C
SubRoom_800C751C:
dw 0x27BDFFC0 ; 800C751C
dw 0xAFB20038 ; 800C7520
dw 0x00809021 ; 800C7524
dw 0xAFB00030 ; 800C7528
dw 0x00008021 ; 800C752C
dw 0xAFB10034 ; 800C7530
dw 0x02408821 ; 800C7534
dw 0xAFBF003C ; 800C7538
dw 0x8E240570 ; 800C753C
dw 0x00000000 ; 800C7540
dw 0x000410C0 ; 800C7544
dw 0x00441821 ; 800C7548
dw 0x000417C2 ; 800C754C
dw 0x00821021 ; 800C7550
dw 0x04610002 ; 800C7554
dw 0x00024043 ; 800C7558
dw 0x24630007 ; 800C755C
dw 0x00802821 ; 800C7560
dw 0x04810002 ; 800C7564
dw 0x000330C3 ; 800C7568
dw 0x24850007 ; 800C756C
dw 0x8E4305D8 ; 800C7570
dw 0x000528C3 ; 800C7574
dw 0x04610002 ; 800C7578
dw 0x00601021 ; 800C757C
dw 0x2462003F ; 800C7580
dw 0x00021183 ; 800C7584
dw 0x00021180 ; 800C7588
dw 0x00621023 ; 800C758C
dw 0x00C20018 ; 800C7590
dw 0x00001012 ; 800C7594
dw 0x04410003 ; 800C7598
dw 0x00023983 ; 800C759C
dw 0x2442003F ; 800C75A0
dw 0x00023983 ; 800C75A4
dw 0x0087102A ; 800C75A8
dw 0x10400002 ; 800C75AC
dw 0x00E53023 ; 800C75B0
dw 0x00803821 ; 800C75B4
dw 0x04C10003 ; 800C75B8
dw 0x0086102A ; 800C75BC
dw 0x00003021 ; 800C75C0
dw 0x0086102A ; 800C75C4
dw 0x10400002 ; 800C75C8
dw 0x001028C0 ; 800C75CC
dw 0x00803021 ; 800C75D0
dw 0x24A4050C ; 800C75D4
dw 0x02442021 ; 800C75D8
dw 0x24A50534 ; 800C75DC
dw 0x02452821 ; 800C75E0
dw 0x8E23055C ; 800C75E4
dw 0x26310004 ; 800C75E8
dw 0x01071023 ; 800C75EC
dw 0xA7A20012 ; 800C75F0
dw 0xA7A2001A ; 800C75F4
dw 0x01061023 ; 800C75F8
dw 0xA7A00014 ; 800C75FC
dw 0xA7A0001C ; 800C7600
dw 0xA7A20022 ; 800C7604
dw 0xA7A00024 ; 800C7608
dw 0xA7A2002A ; 800C760C
dw 0xA7A0002C ; 800C7610
dw 0x000317C2 ; 800C7614
dw 0x00621821 ; 800C7618
dw 0x00031843 ; 800C761C
dw 0x00031023 ; 800C7620
dw 0xA7A20010 ; 800C7624
dw 0xA7A30018 ; 800C7628
dw 0xA7A20020 ; 800C762C
dw 0x0C006F23 ; 800C7630
dw 0xA7A30028 ; 800C7634
dw 0x27A40010 ; 800C7638
dw 0x00102940 ; 800C763C
dw 0x24A5046C ; 800C7640
dw 0x02452821 ; 800C7644
dw 0x0C006F92 ; 800C7648
dw 0x24060004 ; 800C764C
dw 0x26100001 ; 800C7650
dw 0x2A020005 ; 800C7654
dw 0x1440FFB8 ; 800C7658
dw 0x00000000 ; 800C765C
dw 0x8FBF003C ; 800C7660
dw 0x8FB20038 ; 800C7664
dw 0x8FB10034 ; 800C7668
dw 0x8FB00030 ; 800C766C
dw 0x03E00008 ; 800C7670
dw 0x27BD0040 ; 800C7674

View File

@ -9,7 +9,7 @@ typedef struct _SubRoomWork
DG_PRIM *prim2;
SVECTOR verts2[2][16][4];
DG_PRIM *prim3;
SVECTOR verts3[20];
SVECTOR verts3[5][4];
SVECTOR f50C[5];
SVECTOR f534[5];
int f55C[2][5];
@ -119,8 +119,63 @@ void SubRoom_800C73E4(SubRoomWork *work)
}
}
#pragma INCLUDE_ASM("asm/overlays/opening/SubRoom_800C751C.s")
void SubRoom_800C751C(SubRoomWork *);
void SubRoom_800C751C(SubRoomWork *work)
{
SVECTOR verts[4];
int i;
int vx;
int vy0, vy1, vy2, vy3, vy4, vy5; // temporaries related to Y coordinate
for (i = 0; i < 5; i++)
{
vy0 = work->f55C[1][i];
vy1 = vy0 / 2;
vy4 = vy0 * 9 / 8;
vy5 = vy0 / 8;
vy2 = vy4 * (work->f5D8 % 64) / 64;
vy3 = vy5;
vy3 = vy2 - vy3;
if (vy0 < vy2)
{
vy2 = vy0;
}
if (vy3 < 0)
{
vy3 = 0;
}
if (vy0 < vy3)
{
vy3 = vy0;
}
vx = work->f55C[0][i];
verts[0].vx = -(vx / 2);
verts[0].vy = vy1 - vy2;
verts[1].vy = vy1 - vy2;
verts[1].vx = vx / 2;
verts[0].vz = 0;
verts[1].vz = 0;
verts[2].vx = -(vx / 2);
verts[2].vy = vy1 - vy3;
verts[2].vz = 0;
verts[3].vx = vx / 2;
verts[3].vy = vy1 - vy3;
verts[3].vz = 0;
DG_SetPos2_8001BC8C(&work->f50C[i], &work->f534[i]);
DG_PutVector_8001BE48(verts, work->verts3[i], 4);
}
}
void SubRoom_800C7678(SubRoomWork *work)
{
@ -347,7 +402,7 @@ int SubRoomGetResources_800C7B94(SubRoomWork *work)
SubRoomShadePacks_800C729C(&prim->field_40_pBuffers[0]->poly_ft4, 32, tex, &color);
SubRoomShadePacks_800C729C(&prim->field_40_pBuffers[1]->poly_ft4, 32, tex, &color);
prim = DG_GetPrim(0x12, 5, 0, work->verts3, NULL);
prim = DG_GetPrim(0x12, 5, 0, (SVECTOR *)work->verts3, NULL);
work->prim3 = prim;
if (prim == NULL)
{