Add types for shell and triple shell parent (#190)

Match a function and refresh m2c output for functions that handle
 (triple) shells

Signed-off-by: Taggerung <tyler.taggerung@gmail.com>
This commit is contained in:
Tyler McGavran 2022-05-05 00:49:11 -04:00 committed by GitHub
parent 6ed26d9786
commit d4a0f7ab8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 604 additions and 614 deletions

View File

@ -1,42 +0,0 @@
glabel func_802B0E14
/* 11A424 802B0E14 AFA40000 */ sw $a0, ($sp)
/* 11A428 802B0E18 00047400 */ sll $t6, $a0, 0x10
/* 11A42C 802B0E1C 000E2403 */ sra $a0, $t6, 0x10
/* 11A430 802B0E20 04810003 */ bgez $a0, .L802B0E30
/* 11A434 802B0E24 0004C0C0 */ sll $t8, $a0, 3
/* 11A438 802B0E28 03E00008 */ jr $ra
/* 11A43C 802B0E2C 00001025 */ move $v0, $zero
.L802B0E30:
/* 11A440 802B0E30 0304C023 */ subu $t8, $t8, $a0
/* 11A444 802B0E34 3C198016 */ lui $t9, %hi(D_8015F9B8) # $t9, 0x8016
/* 11A448 802B0E38 2739F9B8 */ addiu $t9, %lo(D_8015F9B8) # addiu $t9, $t9, -0x648
/* 11A44C 802B0E3C 0018C100 */ sll $t8, $t8, 4
/* 11A450 802B0E40 03191021 */ addu $v0, $t8, $t9
/* 11A454 802B0E44 84480000 */ lh $t0, ($v0)
/* 11A458 802B0E48 24010007 */ li $at, 7
/* 11A45C 802B0E4C 5501000A */ bnel $t0, $at, .L802B0E78
/* 11A460 802B0E50 844A0006 */ lh $t2, 6($v0)
/* 11A464 802B0E54 84490006 */ lh $t1, 6($v0)
/* 11A468 802B0E58 24010004 */ li $at, 4
/* 11A46C 802B0E5C 15210003 */ bne $t1, $at, .L802B0E6C
/* 11A470 802B0E60 00000000 */ nop
/* 11A474 802B0E64 03E00008 */ jr $ra
/* 11A478 802B0E68 24020001 */ li $v0, 1
.L802B0E6C:
/* 11A47C 802B0E6C 03E00008 */ jr $ra
/* 11A480 802B0E70 00001025 */ move $v0, $zero
/* 11A484 802B0E74 844A0006 */ lh $t2, 6($v0)
.L802B0E78:
/* 11A488 802B0E78 24010006 */ li $at, 6
/* 11A48C 802B0E7C 00001025 */ move $v0, $zero
/* 11A490 802B0E80 15410003 */ bne $t2, $at, .L802B0E90
/* 11A494 802B0E84 00000000 */ nop
/* 11A498 802B0E88 03E00008 */ jr $ra
/* 11A49C 802B0E8C 24020001 */ li $v0, 1
.L802B0E90:
/* 11A4A0 802B0E90 03E00008 */ jr $ra
/* 11A4A4 802B0E94 00000000 */ nop

View File

@ -28,6 +28,40 @@ struct piranha_plant {
/* 0x2A */ s16 unk2A;
};
struct triple_shell_parent {
/* 0x00 */ s16 type;
/* 0x02 */ s16 unk_02;
/* 0x04 */ s16 shellsAvailable;
/* 0x06 */ s16 state;
/* 0x08 */ f32 unk_08;
/* 0x0C */ f32 unk_0C;
/* 0x10 */ s16 rotVelocity;
/* 0x12 */ s16 rotAngle;
/* 0x14 */ s16 playerId; // Id of the player that "owns" the shells
/* 0x16 */ s16 unk_16;
/* 0x18 */ Vec3f unk_18;
/* 0x24 */ Vec3f shellIndices; // Indices in D_8015F9B8 for the shells "owned" by this parent
/* 0x30 */ UnkActorInner unk30;
}; // size = 0x70
struct shell_actor {
/* 0x00 */ s16 type;
/* 0x02 */ s16 unk_02;
// Index in D_8015F9B8 for the parent actor of this shell
// Seems to pull double duty as a timer
/* 0x04 */ s16 parentIndex;
/* 0x06 */ s16 state;
/* 0x08 */ f32 unk_08;
/* 0x0C */ f32 unk_0C;
/* 0x10 */ s16 rotVelocity; // Change in rotAngle on a per-update basis
/* 0x12 */ s16 rotAngle; // Angle of rotation around player (or parent?), not the rotation of the shell itself
/* 0x14 */ s16 playerId; // Id of the player that "owns" the shell
/* 0x16 */ s16 unk_16;
/* 0x18 */ Vec3f pos;
/* 0x24 */ Vec3f velocity; // All 0 until the shell is fired
/* 0x30 */ UnkActorInner unk30;
}; // size = 0x70
struct Actor {
/* 0x00 */ s16 unk0; // 0xC, 0xD, or 0x2B
#ifdef AVOID_UB

File diff suppressed because it is too large Load Diff