From e8d79dff7df672f28e52f4b39eaf7eddf62aef53 Mon Sep 17 00:00:00 2001 From: angie Date: Mon, 25 Jan 2021 23:53:15 -0300 Subject: [PATCH] six more functions Signed-off-by: angie --- .../actors/ovl_Demo_Gj/func_8097B080.s | 31 --- .../actors/ovl_Demo_Gj/func_8097B0EC.s | 16 -- .../actors/ovl_Demo_Gj/func_8097B5A4.s | 31 --- .../actors/ovl_Demo_Gj/func_8097B610.s | 34 --- .../actors/ovl_Demo_Gj/func_8097B688.s | 16 -- .../actors/ovl_Demo_Gj/func_8097B93C.s | 33 --- src/overlays/actors/ovl_Demo_Gj/z_demo_gj.c | 234 +++++++++++++++++- 7 files changed, 224 insertions(+), 171 deletions(-) delete mode 100644 asm/non_matchings/overlays/actors/ovl_Demo_Gj/func_8097B080.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Demo_Gj/func_8097B0EC.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Demo_Gj/func_8097B5A4.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Demo_Gj/func_8097B610.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Demo_Gj/func_8097B688.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Demo_Gj/func_8097B93C.s diff --git a/asm/non_matchings/overlays/actors/ovl_Demo_Gj/func_8097B080.s b/asm/non_matchings/overlays/actors/ovl_Demo_Gj/func_8097B080.s deleted file mode 100644 index e5f2f2cab4..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Demo_Gj/func_8097B080.s +++ /dev/null @@ -1,31 +0,0 @@ -glabel func_8097B080 -/* 02750 8097B080 27BDFFC0 */ addiu $sp, $sp, 0xFFC0 ## $sp = FFFFFFC0 -/* 02754 8097B084 AFA40040 */ sw $a0, 0x0040($sp) -/* 02758 8097B088 3C010001 */ lui $at, 0x0001 ## $at = 00010000 -/* 0275C 8097B08C 8FA60040 */ lw $a2, 0x0040($sp) -/* 02760 8097B090 00A03825 */ or $a3, $a1, $zero ## $a3 = 00000000 -/* 02764 8097B094 34211E60 */ ori $at, $at, 0x1E60 ## $at = 00011E60 -/* 02768 8097B098 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000 -/* 0276C 8097B09C AFBF0014 */ sw $ra, 0x0014($sp) -/* 02770 8097B0A0 00A12821 */ addu $a1, $a1, $at -/* 02774 8097B0A4 AFA5001C */ sw $a1, 0x001C($sp) -/* 02778 8097B0A8 AFA70044 */ sw $a3, 0x0044($sp) -/* 0277C 8097B0AC 0C01767D */ jal CollisionCheck_SetAC - ## CollisionCheck_setAC -/* 02780 8097B0B0 24C60184 */ addiu $a2, $a2, 0x0184 ## $a2 = 00000184 -/* 02784 8097B0B4 8FA60040 */ lw $a2, 0x0040($sp) -/* 02788 8097B0B8 8FA40044 */ lw $a0, 0x0044($sp) -/* 0278C 8097B0BC 8FA5001C */ lw $a1, 0x001C($sp) -/* 02790 8097B0C0 0C01767D */ jal CollisionCheck_SetAC - ## CollisionCheck_setAC -/* 02794 8097B0C4 24C601D0 */ addiu $a2, $a2, 0x01D0 ## $a2 = 000001D0 -/* 02798 8097B0C8 8FA60040 */ lw $a2, 0x0040($sp) -/* 0279C 8097B0CC 8FA40044 */ lw $a0, 0x0044($sp) -/* 027A0 8097B0D0 8FA5001C */ lw $a1, 0x001C($sp) -/* 027A4 8097B0D4 0C01767D */ jal CollisionCheck_SetAC - ## CollisionCheck_setAC -/* 027A8 8097B0D8 24C6021C */ addiu $a2, $a2, 0x021C ## $a2 = 0000021C -/* 027AC 8097B0DC 8FBF0014 */ lw $ra, 0x0014($sp) -/* 027B0 8097B0E0 27BD0040 */ addiu $sp, $sp, 0x0040 ## $sp = 00000000 -/* 027B4 8097B0E4 03E00008 */ jr $ra -/* 027B8 8097B0E8 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Demo_Gj/func_8097B0EC.s b/asm/non_matchings/overlays/actors/ovl_Demo_Gj/func_8097B0EC.s deleted file mode 100644 index 05852598e5..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Demo_Gj/func_8097B0EC.s +++ /dev/null @@ -1,16 +0,0 @@ -glabel func_8097B0EC -/* 027BC 8097B0EC 27BDFFD8 */ addiu $sp, $sp, 0xFFD8 ## $sp = FFFFFFD8 -/* 027C0 8097B0F0 AFBF0014 */ sw $ra, 0x0014($sp) -/* 027C4 8097B0F4 C4840024 */ lwc1 $f4, 0x0024($a0) ## 00000024 -/* 027C8 8097B0F8 00C03825 */ or $a3, $a2, $zero ## $a3 = 00000000 -/* 027CC 8097B0FC 27A6001C */ addiu $a2, $sp, 0x001C ## $a2 = FFFFFFF4 -/* 027D0 8097B100 E7A4001C */ swc1 $f4, 0x001C($sp) -/* 027D4 8097B104 C4860028 */ lwc1 $f6, 0x0028($a0) ## 00000028 -/* 027D8 8097B108 E7A60020 */ swc1 $f6, 0x0020($sp) -/* 027DC 8097B10C C488002C */ lwc1 $f8, 0x002C($a0) ## 0000002C -/* 027E0 8097B110 0C25E308 */ jal func_80978C20 -/* 027E4 8097B114 E7A80024 */ swc1 $f8, 0x0024($sp) -/* 027E8 8097B118 8FBF0014 */ lw $ra, 0x0014($sp) -/* 027EC 8097B11C 27BD0028 */ addiu $sp, $sp, 0x0028 ## $sp = 00000000 -/* 027F0 8097B120 03E00008 */ jr $ra -/* 027F4 8097B124 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Demo_Gj/func_8097B5A4.s b/asm/non_matchings/overlays/actors/ovl_Demo_Gj/func_8097B5A4.s deleted file mode 100644 index ce606a5cfe..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Demo_Gj/func_8097B5A4.s +++ /dev/null @@ -1,31 +0,0 @@ -glabel func_8097B5A4 -/* 02C74 8097B5A4 27BDFFC0 */ addiu $sp, $sp, 0xFFC0 ## $sp = FFFFFFC0 -/* 02C78 8097B5A8 AFA40040 */ sw $a0, 0x0040($sp) -/* 02C7C 8097B5AC 3C010001 */ lui $at, 0x0001 ## $at = 00010000 -/* 02C80 8097B5B0 8FA60040 */ lw $a2, 0x0040($sp) -/* 02C84 8097B5B4 00A03825 */ or $a3, $a1, $zero ## $a3 = 00000000 -/* 02C88 8097B5B8 34211E60 */ ori $at, $at, 0x1E60 ## $at = 00011E60 -/* 02C8C 8097B5BC 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000 -/* 02C90 8097B5C0 AFBF0014 */ sw $ra, 0x0014($sp) -/* 02C94 8097B5C4 00A12821 */ addu $a1, $a1, $at -/* 02C98 8097B5C8 AFA5001C */ sw $a1, 0x001C($sp) -/* 02C9C 8097B5CC AFA70044 */ sw $a3, 0x0044($sp) -/* 02CA0 8097B5D0 0C01767D */ jal CollisionCheck_SetAC - ## CollisionCheck_setAC -/* 02CA4 8097B5D4 24C60184 */ addiu $a2, $a2, 0x0184 ## $a2 = 00000184 -/* 02CA8 8097B5D8 8FA60040 */ lw $a2, 0x0040($sp) -/* 02CAC 8097B5DC 8FA40044 */ lw $a0, 0x0044($sp) -/* 02CB0 8097B5E0 8FA5001C */ lw $a1, 0x001C($sp) -/* 02CB4 8097B5E4 0C01767D */ jal CollisionCheck_SetAC - ## CollisionCheck_setAC -/* 02CB8 8097B5E8 24C601D0 */ addiu $a2, $a2, 0x01D0 ## $a2 = 000001D0 -/* 02CBC 8097B5EC 8FA60040 */ lw $a2, 0x0040($sp) -/* 02CC0 8097B5F0 8FA40044 */ lw $a0, 0x0044($sp) -/* 02CC4 8097B5F4 8FA5001C */ lw $a1, 0x001C($sp) -/* 02CC8 8097B5F8 0C01767D */ jal CollisionCheck_SetAC - ## CollisionCheck_setAC -/* 02CCC 8097B5FC 24C6021C */ addiu $a2, $a2, 0x021C ## $a2 = 0000021C -/* 02CD0 8097B600 8FBF0014 */ lw $ra, 0x0014($sp) -/* 02CD4 8097B604 27BD0040 */ addiu $sp, $sp, 0x0040 ## $sp = 00000000 -/* 02CD8 8097B608 03E00008 */ jr $ra -/* 02CDC 8097B60C 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Demo_Gj/func_8097B610.s b/asm/non_matchings/overlays/actors/ovl_Demo_Gj/func_8097B610.s deleted file mode 100644 index cdabadf8d3..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Demo_Gj/func_8097B610.s +++ /dev/null @@ -1,34 +0,0 @@ -glabel func_8097B610 -/* 02CE0 8097B610 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 02CE4 8097B614 AFBF0014 */ sw $ra, 0x0014($sp) -/* 02CE8 8097B618 AFA5001C */ sw $a1, 0x001C($sp) -/* 02CEC 8097B61C AFA40018 */ sw $a0, 0x0018($sp) -/* 02CF0 8097B620 0C25E269 */ jal func_809789A4 -/* 02CF4 8097B624 24860184 */ addiu $a2, $a0, 0x0184 ## $a2 = 00000184 -/* 02CF8 8097B628 10400003 */ beq $v0, $zero, .L8097B638 -/* 02CFC 8097B62C 8FA40018 */ lw $a0, 0x0018($sp) -/* 02D00 8097B630 10000011 */ beq $zero, $zero, .L8097B678 -/* 02D04 8097B634 24020001 */ addiu $v0, $zero, 0x0001 ## $v0 = 00000001 -.L8097B638: -/* 02D08 8097B638 8FA5001C */ lw $a1, 0x001C($sp) -/* 02D0C 8097B63C 248601D0 */ addiu $a2, $a0, 0x01D0 ## $a2 = 000001D0 -/* 02D10 8097B640 0C25E269 */ jal func_809789A4 -/* 02D14 8097B644 AFA40018 */ sw $a0, 0x0018($sp) -/* 02D18 8097B648 10400003 */ beq $v0, $zero, .L8097B658 -/* 02D1C 8097B64C 8FA40018 */ lw $a0, 0x0018($sp) -/* 02D20 8097B650 10000009 */ beq $zero, $zero, .L8097B678 -/* 02D24 8097B654 24020001 */ addiu $v0, $zero, 0x0001 ## $v0 = 00000001 -.L8097B658: -/* 02D28 8097B658 8FA5001C */ lw $a1, 0x001C($sp) -/* 02D2C 8097B65C 0C25E269 */ jal func_809789A4 -/* 02D30 8097B660 2486021C */ addiu $a2, $a0, 0x021C ## $a2 = 0000021C -/* 02D34 8097B664 50400004 */ beql $v0, $zero, .L8097B678 -/* 02D38 8097B668 00001025 */ or $v0, $zero, $zero ## $v0 = 00000000 -/* 02D3C 8097B66C 10000002 */ beq $zero, $zero, .L8097B678 -/* 02D40 8097B670 24020001 */ addiu $v0, $zero, 0x0001 ## $v0 = 00000001 -/* 02D44 8097B674 00001025 */ or $v0, $zero, $zero ## $v0 = 00000000 -.L8097B678: -/* 02D48 8097B678 8FBF0014 */ lw $ra, 0x0014($sp) -/* 02D4C 8097B67C 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 02D50 8097B680 03E00008 */ jr $ra -/* 02D54 8097B684 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Demo_Gj/func_8097B688.s b/asm/non_matchings/overlays/actors/ovl_Demo_Gj/func_8097B688.s deleted file mode 100644 index 034e18c3d6..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Demo_Gj/func_8097B688.s +++ /dev/null @@ -1,16 +0,0 @@ -glabel func_8097B688 -/* 02D58 8097B688 27BDFFD8 */ addiu $sp, $sp, 0xFFD8 ## $sp = FFFFFFD8 -/* 02D5C 8097B68C AFBF0014 */ sw $ra, 0x0014($sp) -/* 02D60 8097B690 C4840024 */ lwc1 $f4, 0x0024($a0) ## 00000024 -/* 02D64 8097B694 00C03825 */ or $a3, $a2, $zero ## $a3 = 00000000 -/* 02D68 8097B698 27A6001C */ addiu $a2, $sp, 0x001C ## $a2 = FFFFFFF4 -/* 02D6C 8097B69C E7A4001C */ swc1 $f4, 0x001C($sp) -/* 02D70 8097B6A0 C4860028 */ lwc1 $f6, 0x0028($a0) ## 00000028 -/* 02D74 8097B6A4 E7A60020 */ swc1 $f6, 0x0020($sp) -/* 02D78 8097B6A8 C488002C */ lwc1 $f8, 0x002C($a0) ## 0000002C -/* 02D7C 8097B6AC 0C25E308 */ jal func_80978C20 -/* 02D80 8097B6B0 E7A80024 */ swc1 $f8, 0x0024($sp) -/* 02D84 8097B6B4 8FBF0014 */ lw $ra, 0x0014($sp) -/* 02D88 8097B6B8 27BD0028 */ addiu $sp, $sp, 0x0028 ## $sp = 00000000 -/* 02D8C 8097B6BC 03E00008 */ jr $ra -/* 02D90 8097B6C0 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Demo_Gj/func_8097B93C.s b/asm/non_matchings/overlays/actors/ovl_Demo_Gj/func_8097B93C.s deleted file mode 100644 index 7837370f13..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Demo_Gj/func_8097B93C.s +++ /dev/null @@ -1,33 +0,0 @@ -glabel func_8097B93C -/* 0300C 8097B93C 27BDFFD8 */ addiu $sp, $sp, 0xFFD8 ## $sp = FFFFFFD8 -/* 03010 8097B940 AFBF0014 */ sw $ra, 0x0014($sp) -/* 03014 8097B944 AFA5002C */ sw $a1, 0x002C($sp) -/* 03018 8097B948 AFA60030 */ sw $a2, 0x0030($sp) -/* 0301C 8097B94C C4840024 */ lwc1 $f4, 0x0024($a0) ## 00000024 -/* 03020 8097B950 8FA70030 */ lw $a3, 0x0030($sp) -/* 03024 8097B954 27A6001C */ addiu $a2, $sp, 0x001C ## $a2 = FFFFFFF4 -/* 03028 8097B958 E7A4001C */ swc1 $f4, 0x001C($sp) -/* 0302C 8097B95C C4860028 */ lwc1 $f6, 0x0028($a0) ## 00000028 -/* 03030 8097B960 E7A60020 */ swc1 $f6, 0x0020($sp) -/* 03034 8097B964 C488002C */ lwc1 $f8, 0x002C($a0) ## 0000002C -/* 03038 8097B968 AFA40028 */ sw $a0, 0x0028($sp) -/* 0303C 8097B96C 0C25E308 */ jal func_80978C20 -/* 03040 8097B970 E7A80024 */ swc1 $f8, 0x0024($sp) -/* 03044 8097B974 8FA40028 */ lw $a0, 0x0028($sp) -/* 03048 8097B978 3C0142C8 */ lui $at, 0x42C8 ## $at = 42C80000 -/* 0304C 8097B97C 44819000 */ mtc1 $at, $f18 ## $f18 = 100.00 -/* 03050 8097B980 C48A0024 */ lwc1 $f10, 0x0024($a0) ## 00000024 -/* 03054 8097B984 8FA5002C */ lw $a1, 0x002C($sp) -/* 03058 8097B988 27A6001C */ addiu $a2, $sp, 0x001C ## $a2 = FFFFFFF4 -/* 0305C 8097B98C E7AA001C */ swc1 $f10, 0x001C($sp) -/* 03060 8097B990 C4900028 */ lwc1 $f16, 0x0028($a0) ## 00000028 -/* 03064 8097B994 8FA70030 */ lw $a3, 0x0030($sp) -/* 03068 8097B998 46128100 */ add.s $f4, $f16, $f18 -/* 0306C 8097B99C E7A40020 */ swc1 $f4, 0x0020($sp) -/* 03070 8097B9A0 C486002C */ lwc1 $f6, 0x002C($a0) ## 0000002C -/* 03074 8097B9A4 0C25E308 */ jal func_80978C20 -/* 03078 8097B9A8 E7A60024 */ swc1 $f6, 0x0024($sp) -/* 0307C 8097B9AC 8FBF0014 */ lw $ra, 0x0014($sp) -/* 03080 8097B9B0 27BD0028 */ addiu $sp, $sp, 0x0028 ## $sp = 00000000 -/* 03084 8097B9B4 03E00008 */ jr $ra -/* 03088 8097B9B8 00000000 */ nop diff --git a/src/overlays/actors/ovl_Demo_Gj/z_demo_gj.c b/src/overlays/actors/ovl_Demo_Gj/z_demo_gj.c index f4ce357a2e..6e16595971 100644 --- a/src/overlays/actors/ovl_Demo_Gj/z_demo_gj.c +++ b/src/overlays/actors/ovl_Demo_Gj/z_demo_gj.c @@ -11,7 +11,7 @@ void DemoGj_Update(Actor* thisx, GlobalContext* globalCtx); void DemoGj_Draw(Actor* thisx, GlobalContext* globalCtx); extern Gfx D_06000DC0; -extern UNK_TYPE D_06000EA0; +extern Gfx D_06000EA0; extern CollisionHeader D_06001B70; extern Gfx D_06001D20; extern CollisionHeader D_06001F70; @@ -352,7 +352,81 @@ void func_80978B90(DemoGj* this, GlobalContext* globalCtx) { #pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Demo_Gj/func_80978B90.s") #endif +void func_80978C20(DemoGj *this, GlobalContext *globalCtx, Vec3f *arg2, Vec3f *arg3); +#ifdef NON_MATCHING +void func_80978C20(DemoGj *this, GlobalContext *globalCtx, Vec3f *arg2, Vec3f *arg3) { + Vec3f pos; + Vec3f velocity; + + s32 phi_s0; + f32 temp_f0; + + s16 theta = 0; + + s32 i; + + for (i = 0; i < 6; i++) { + /*pos.z = Math_SinS(theta) * 16.0f; + pos.y = (Rand_ZeroOne() * 5.0f) + 2.0f; + pos.x = Math_CosS(theta) * 16.0f;*/ + + pos.x = Math_SinS(theta) * 16.0f; + pos.y = (Rand_ZeroOne() * 5.0f) + 2.0f; + pos.z = Math_CosS(theta) * 16.0f; + + /*velocity.z = (pos.z * 0.6f) + (12.0f * arg3->x); + velocity.y = (Rand_ZeroOne() * 36.0f) + 6.0f; + velocity.x = (pos.x * 0.6f) + (12.0f * arg3->z);*/ + + velocity.x = (pos.x * 0.6f) + (12.0f * arg3->x); + velocity.y = (Rand_ZeroOne() * 36.0f) + 6.0f; + velocity.z = (pos.z * 0.6f) + (12.0f * arg3->z); + + //pos.z = pos.z + arg2->x; + pos.x += arg2->x; + //pos.y = pos.y + arg2->y; + pos.y += arg2->y; + //pos.x = pos.x + arg2->z; + pos.z += arg2->z; + + temp_f0 = Rand_ZeroOne(); + if (temp_f0 < 0.1f) { + phi_s0 = 0x61; + } else { + phi_s0 = 0x21; + if (temp_f0 < 0.7f) { + phi_s0 = 0x41; + } + } + //temp_f20 = Rand_ZeroOne(); + + EffectSsKakera_Spawn( + globalCtx, + &pos, + &velocity, + arg2, + -0xC8, + phi_s0, + 0xA, + 0xA, + 0, + //(s32) ((temp_f20 * 20.0f) + 20.0f), + (s32) ((Rand_ZeroOne() * 20.0f) + 20.0f), + 0x14, + 0x12C, + (s32) (Rand_ZeroOne() * 30.0f) + 0x1E, + -1, + 0x186, + &D_06000EA0); + + theta += 0x2AAA; + } + + func_80978AC4(this, globalCtx); +} +#else #pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Demo_Gj/func_80978C20.s") +#endif s32 func_80978EBC(void) { if (gSaveContext.sceneSetupIndex < 4) { @@ -441,14 +515,14 @@ void func_80979030(DemoGj* this, GlobalContext* globalCtx, Gfx* displayList) { } void func_8097911C(DemoGj* this, GlobalContext* globalCtx, Gfx* displayList) { - void* dummy; // Needed for matching. + s32 pad; // Needed for matching. GraphicsContext *gfxCtx; s16 sp56; s16 sp54; s16 sp52; - void* dummy2; // Needed for matching. + s32 pad2; // Needed for matching. Mtx* matrix; sp56 = this->unk_16C.x; @@ -578,7 +652,7 @@ void func_8097923C(DemoGj *this, GlobalContext *globalCtx) { s32 func_809797E4(DemoGj *this, s32 arg1); #if NON_MATCHING s32 func_809797E4(DemoGj *this, s32 arg1) { - BossGanon2 *ganon = this->ganon; + BossGanon2 *ganon = (BossGanon2 *)this->ganon; arg1 &= 0xFF; //if ((ganon != 0) && ((arg1 & 0xFF) == ganon->unk314)) { @@ -1160,11 +1234,72 @@ void func_8097AE5C(DemoGj *this, GlobalContext *globalCtx) { void func_8097AEDC(DemoGj *this, GlobalContext *globalCtx) { } +/* +void *func_8097AEE8(void *arg0, ? arg1) { + s16 sp22; + f32 sp1C; + f32 temp_f0; + f32 temp_f12; + f32 temp_f14; + f32 temp_f16; + f32 temp_f2; + s16 temp_a0; + void *temp_a0_2; + void *temp_a2; + void *temp_v0; + void *temp_v1; + + temp_a0 = arg0->unk32; + arg0 = arg0; + sp22 = temp_a0; + sp1C = Math_CosS(temp_a0); + temp_f0 = Math_SinS(temp_a0); + temp_f2 = 20.0f * sp1C; + temp_v0 = arg0 + 0x24; + temp_f12 = -20.0f * temp_f0; + temp_v1 = arg0 + 0x184; + temp_a0_2 = arg0 + 0x1D0; + temp_a2 = arg0 + 0x21C; + temp_f14 = 20.0f * temp_f0; + temp_f16 = -20.0f * sp1C; + temp_v1->unk4A = (s16) (s32) ((temp_v0->unk8 + temp_f2) - temp_f12); + temp_v1->unk46 = (s16) (s32) (temp_v0->unk0 + temp_f14 + temp_f16); + temp_v1->unk48 = (s16) (s32) temp_v0->unk4; + temp_a0_2->unk4A = (s16) (s32) ((temp_v0->unk8 + temp_f16) - temp_f14); + temp_a0_2->unk46 = (s16) (s32) (temp_v0->unk0 + temp_f12 + temp_f2); + temp_a0_2->unk48 = (s16) (s32) temp_v0->unk4; + temp_a2->unk4A = (s16) (s32) ((temp_v0->unk8 + (-60.0f * sp1C)) - (60.0f * temp_f0)); + temp_a2->unk46 = (s16) (s32) (temp_v0->unk0 + (-60.0f * temp_f0) + (60.0f * sp1C)); + temp_a2->unk48 = (s16) (s32) temp_v0->unk4; + return temp_v0; +} +*/ #pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Demo_Gj/func_8097AEE8.s") -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Demo_Gj/func_8097B080.s") +void func_8097B080(DemoGj *this, GlobalContext *globalCtx) { + CollisionCheckContext *temp_a1; + GlobalContext* glbCtx = globalCtx; + Collider* unk_184 = &this->unk_184.base; + Collider* unk_1D0 = &this->unk_1D0.base; + Collider* unk_21C = &this->unk_21C.base; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Demo_Gj/func_8097B0EC.s") + s32 pad[3]; + + temp_a1 = &glbCtx->colChkCtx; + CollisionCheck_SetAC(glbCtx, temp_a1, unk_184); + CollisionCheck_SetAC(glbCtx, temp_a1, unk_1D0); + CollisionCheck_SetAC(glbCtx, temp_a1, unk_21C); +} + +void func_8097B0EC(DemoGj *this, GlobalContext *globalCtx, Vec3f *arg2) { + Vec3f aux; + + aux.x = this->dyna.actor.world.pos.x; + aux.y = this->dyna.actor.world.pos.y; + aux.z = this->dyna.actor.world.pos.z; + + func_80978C20(this, globalCtx, &aux, arg2); +} void func_8097B128(DemoGj *this, GlobalContext *globalCtx); /* @@ -1255,13 +1390,79 @@ void func_8097B3C4(DemoGj *this, GlobalContext *globalCtx) { void func_8097B444(DemoGj *this, GlobalContext *globalCtx) { } +/* +void *func_8097B450(void *arg0, ? arg1) { + s16 sp22; + f32 sp1C; + f32 temp_f0; + s16 temp_a0; + void *temp_a0_2; + void *temp_a2; + void *temp_v0; + void *temp_v1; + + temp_a0 = arg0->unk32; + arg0 = arg0; + sp22 = temp_a0; + sp1C = Math_CosS(temp_a0); + temp_f0 = Math_SinS(temp_a0); + temp_v0 = arg0 + 0x24; + temp_v1 = arg0 + 0x184; + temp_a0_2 = arg0 + 0x1D0; + temp_a2 = arg0 + 0x21C; + temp_v1->unk4A = (s16) (s32) (temp_v0->unk8 - (35.0f * temp_f0)); + temp_v1->unk46 = (s16) (s32) (temp_v0->unk0 + (35.0f * sp1C)); + temp_v1->unk48 = (s16) (s32) temp_v0->unk4; + temp_a0_2->unk4A = (s16) (s32) (temp_v0->unk8 - (-10.0f * temp_f0)); + temp_a0_2->unk46 = (s16) (s32) (temp_v0->unk0 + (-10.0f * sp1C)); + temp_a0_2->unk48 = (s16) (s32) temp_v0->unk4; + temp_a2->unk4A = (s16) (s32) (temp_v0->unk8 - (-55.0f * temp_f0)); + temp_a2->unk46 = (s16) (s32) (temp_v0->unk0 + (-55.0f * sp1C)); + temp_a2->unk48 = (s16) (s32) temp_v0->unk4; + return temp_v0; +} +*/ #pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Demo_Gj/func_8097B450.s") -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Demo_Gj/func_8097B5A4.s") +void func_8097B5A4(DemoGj *this, GlobalContext *globalCtx) { + CollisionCheckContext *temp_a1; + GlobalContext* glbCtx = globalCtx; + Collider* unk_184 = &this->unk_184.base; + Collider* unk_1D0 = &this->unk_1D0.base; + Collider* unk_21C = &this->unk_21C.base; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Demo_Gj/func_8097B610.s") + s32 pad[3]; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Demo_Gj/func_8097B688.s") + glbCtx = globalCtx; + temp_a1 = &glbCtx->colChkCtx; + + CollisionCheck_SetAC(glbCtx, temp_a1, unk_184); + CollisionCheck_SetAC(glbCtx, temp_a1, unk_1D0); + CollisionCheck_SetAC(glbCtx, temp_a1, unk_21C); +} + +s32 func_8097B610(DemoGj *this, GlobalContext *globalCtx) { + if (func_809789A4(this, globalCtx, &this->unk_184.base) != 0) { + return 1; + } + if (func_809789A4(this, globalCtx, &this->unk_1D0.base) != 0) { + return 1; + } + if (func_809789A4(this, globalCtx, &this->unk_21C.base) != 0) { + return 1; + } + return 0; +} + + +void func_8097B688(DemoGj *this, GlobalContext *globalCtx, Vec3f *arg2) { + Vec3f aux; + + aux.x = this->dyna.actor.world.pos.x; + aux.y = this->dyna.actor.world.pos.y; + aux.z = this->dyna.actor.world.pos.z; + func_80978C20(this, globalCtx, &aux, arg2); +} void func_8097B6C4(DemoGj *this, GlobalContext *globalCtx); /* @@ -1337,7 +1538,20 @@ void func_8097B8E8(DemoGj *this, GlobalContext *globalCtx) { void func_8097B930(DemoGj *this, GlobalContext *globalCtx) { } -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Demo_Gj/func_8097B93C.s") +void func_8097B93C(DemoGj *this, GlobalContext *globalCtx, Vec3f *arg2) { + Vec3f aux; + + aux.x = this->dyna.actor.world.pos.x; + aux.y = this->dyna.actor.world.pos.y; + aux.z = this->dyna.actor.world.pos.z; + func_80978C20(this, globalCtx, &aux, arg2); + + + aux.x = this->dyna.actor.world.pos.x; + aux.y = this->dyna.actor.world.pos.y + 100.0f; + aux.z = this->dyna.actor.world.pos.z; + func_80978C20(this, globalCtx, &aux, arg2); +} void func_8097B9BC(DemoGj *this, GlobalContext *globalCtx); /*