Rematch E05620 (#87)

* Rematch E05620

* Update src/overlays/ovl_i1/E05620.c

Co-authored-by: petrie911 <69443847+petrie911@users.noreply.github.com>

* Update src/overlays/ovl_i1/E05620.c

Co-authored-by: petrie911 <69443847+petrie911@users.noreply.github.com>

* Fix suggested changes.

---------

Co-authored-by: petrie911 <69443847+petrie911@users.noreply.github.com>
This commit is contained in:
Ryan Myers 2024-01-17 07:31:29 -05:00 committed by GitHub
parent 431ae096fb
commit 086cfd5e62
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 63 additions and 12 deletions

View File

@ -856,7 +856,7 @@ void func_EF0260_8018AAC4(void);
// void func_i1_80193540(Object*);
// void func_i1_80194398(Object*);
// void func_i1_801985E4(Object*);
// void func_i1_80198968(Object*);
void func_i1_80198968(Item*);
// void func_i2_8018756C(Object*);
// void func_i2_80187650(Object*);
// void func_i2_801877C4(Object*);

View File

@ -70,7 +70,7 @@ void func_80194398(Object*);
// func_i1_801985E4
void func_801985E4(Object*);
// func_i1_80198968
void func_80198968(Object*);
void func_80198968(Item*);
// func_i2_8018756C
void func_8018756C(Object*);

View File

@ -4172,12 +4172,6 @@ void func_80083D2C(f32 posX, f32 posY, f32 posZ, f32 srcZ) {
}
}
// RGB Values. Used like an array of [8][3], but only matches this way.
s32 D_800D18F0[24] = { 32, 32, 255, 0, 255, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 255, 255, 0, 255, 0, 255, 0 };
// Alpha values
s32 D_800D1950[] = { 255, 210, 180, 120, 70, 30, 0, 0 };
void func_80083FA8(Effect* effect) {
Vec3f src;
Vec3f dest;
@ -4220,6 +4214,12 @@ void func_80083FA8(Effect* effect) {
func_8007A774(gPlayer, effect, 100.0f);
}
// RGB Values. Used like an array of [8][3], but only matches this way.
s32 D_800D18F0[24] = { 32, 32, 255, 0, 255, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 255, 255, 0, 255, 0, 255, 0 };
// Alpha values
s32 D_800D1950[] = { 255, 210, 180, 120, 70, 30, 0, 0 };
void func_80084194(Effect* effect) {
s32 tmp;

View File

@ -1,7 +1,58 @@
#include "common.h"
#include "global.h"
#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i1/E05620/func_i1_801988E0.s")
void func_i1_801988E0(void) {
if (D_80177E80 != 0) {
RCP_SetupDL(&gMasterDisp, 0x53);
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255);
func_800869A0(250.0f, 50.0f, D_80177E80, 1.0f, 0, 999);
}
}
#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i1/E05620/func_i1_80198968.s")
void func_i1_80198968(Item* item) {
f32 var_fv0;
#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i1/E05620/D_i1_8019B640.s")
switch (item->unk_46) {
case 0:
item->obj.rot.z += 1.0f;
Math_SmoothStepToF(&item->scale, 1.0f, 1.0f, 0.05f, 0.0f);
if ((item->unk_44 == 0) && (gPlayer->unk_4DC == 0)) {
if (item->obj.rot.y == 0.0f) {
var_fv0 = 550.0f;
} else {
var_fv0 = 1000.0f;
}
if (item->obj.pos.z > (gPlayer->unk_138 + var_fv0)) {
item->unk_44 = 1;
PRINTF("♪:リング未通過音\n"); // Ring not passed sound
Audio_PlaySfx(0x4900402F, &D_800C5D28, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C);
D_80177E80 = 0;
}
}
if (item->unk_4C != 0) {
item->unk_46 = 1;
item->timer_48 = 50;
item->info.unk_10 = 10000.0f;
PRINTF("♪:リング通過音\n"); // Ring passing sound
Audio_PlaySfx(0x49008025, &D_800C5D28, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C);
D_80177E80++;
if ((item->obj.rot.x != 0.0f) && (D_80177E80 >= 100)) {
func_800BA808(gMsg_ID_20330, RCID_ROB64);
}
}
break;
case 1:
item->obj.pos.x += ((gPlayer[item->unk_4E].pos.x - item->obj.pos.x) * 0.05f);
item->obj.pos.y += ((gPlayer[item->unk_4E].pos.y - item->obj.pos.y) * 0.05f);
if (gPlayer->unk_238 != 0) {
item->obj.pos.z += ((gPlayer[item->unk_4E].unk_138 - 300.0f) - item->obj.pos.z) * 0.05f;
} else {
item->obj.pos.z += ((gPlayer[item->unk_4E].unk_138 - item->obj.pos.z) * 0.05f);
}
item->obj.rot.z += 22.0f;
Math_SmoothStepToAngle(&item->obj.rot.y, Math_RadToDeg(-gPlayer[item->unk_4E].unk_058), 0.2f, 10.0f, 0.0f);
if (item->timer_48 == 0) {
Object_Kill(&item->obj, &item->sfxPos);
}
break;
}
}