Match 25.66% of ft_0C31 (8.13 KB) (#1141)

Co-authored-by: VetriTheRetri <74500716+VetriTheRetri@users.noreply.github.com>
This commit is contained in:
Robin Avery 2024-01-27 21:00:27 -05:00 committed by GitHub
parent 39b1061356
commit 411e2f1451
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
14 changed files with 150 additions and 45 deletions

View File

@ -13,7 +13,7 @@ trim_trailing_whitespace = true
charset = utf-8
[*.s]
indent_style = ignore
indent_style = unset
[{*.yml,.clang-format}]
indent_size = 2

View File

@ -25445,8 +25445,8 @@ ftCo_804D3C58 = .sdata:0x804D3C58; // type:object size:0x7 scope:global data:str
ftCo_804D3C60 = .sdata:0x804D3C60; // type:object size:0x5 scope:global data:string
@264 = .sdata:0x804D3C68; // type:object size:0x7 scope:local data:string
@265 = .sdata:0x804D3C70; // type:object size:0x5 scope:local data:string
ftCo_804D3C78 = .sdata:0x804D3C78; // type:object size:0x8 scope:local
ftCo_804D3C80 = .sdata:0x804D3C80; // type:object size:0x8 scope:local
@240 = .sdata:0x804D3C78; // type:object size:0x7 scope:local data:string
@241 = .sdata:0x804D3C80; // type:object size:0x5 scope:local data:string
ftCo_804D3C88 = .sdata:0x804D3C88; // type:object size:0x8 scope:local
ftCo_804D3C90 = .sdata:0x804D3C90; // type:object size:0x4 scope:local
ftCo_804D3C94 = .sdata:0x804D3C94; // type:object size:0x4 scope:local

View File

@ -6,6 +6,7 @@
#include "ft/fighter.h"
#include "ft/types.h"
/// @todo #ftCo_800C7070
void ftCo_800C6150(ftCo_GObj* gobj)
{
Fighter* fp = GET_FIGHTER(gobj);

View File

@ -126,7 +126,7 @@ u32 Fighter_804D64F8 = 0;
// the following seems to be an array, initialized in reverse in
UNK_T Fighter_804D64FC = NULL;
UNK_T Fighter_804D6500 = NULL;
UNK_T Fighter_804D6504 = NULL;
HSD_Joint* Fighter_804D6504 = NULL;
UNK_T Fighter_804D6508 = NULL;
int* Fighter_804D650C = NULL;
UNK_T Fighter_804D6510 = NULL;
@ -488,11 +488,11 @@ void Fighter_UnkInitReset_80067C98(Fighter* fp)
fp->x2224_b2 = fp->x2224_b3 = false;
fp->x2224_b4 = false;
fp->x2108 = 0;
fp->capture_timer = 0;
fp->x2224_b5 = false;
fp->x1A53 = 0;
fp->x1A52 = 0;
fp->x210C_walljumpInputTimer = 254;
fp->wall_jump_input_timer = 254;
fp->dmg.x1910 = 0;
fp->x2225_b0 = false;
fp->x2225_b2 = true;
@ -2145,8 +2145,8 @@ void Fighter_procUpdate(Fighter_GObj* gobj)
fp->x2064_ledgeCooldown -= 1;
}
if (fp->x2108) {
fp->x2108 -= 1;
if (fp->capture_timer != 0) {
--fp->capture_timer;
}
ftCo_800C0A98(gobj);

View File

@ -14,7 +14,7 @@
/// #Fighter_LoadCommonData, probably all pointers
extern UNK_T Fighter_804D64FC;
extern UNK_T Fighter_804D6500;
extern UNK_T Fighter_804D6504;
extern HSD_Joint* Fighter_804D6504;
extern UNK_T Fighter_804D6508;
extern int* Fighter_804D650C;
extern UNK_T Fighter_804D6510;

View File

@ -1,4 +1,5 @@
#include "ft/forward.h"
#include "ftCommon/forward.h"
#include <dolphin/mtx/forward.h>
#include "ft_0C31.h"
@ -9,11 +10,14 @@
#include "ft/fighter.h"
#include "ft/ftanim.h"
#include "ft/ftcoll.h"
#include "ft/inlines.h"
#include "ft/types.h"
#include "ftCommon/ftCo_DamageFall.h"
#include "ftCommon/ftCo_DownBound.h"
#include "ftCommon/types.h"
#include "it/it_26B1.h"
#include "it/items/itgreatfoxlaser.h"
#include "it/items/itleadead.h"
#include "it/items/itlikelike.h"
@ -77,9 +81,12 @@ void ftCo_EntryStart_Coll(ftCo_GObj* gobj)
NOT_IMPLEMENTED;
}
UNK_RET ftCo_800C6AFC(UNK_PARAMS)
void ftCo_800C6AFC(HSD_JObj* jobj)
{
NOT_IMPLEMENTED;
if (jobj == NULL || HSD_JObjMtxIsDirty(jobj)) {
return;
}
HSD_JObjSetMtxDirtySub(jobj);
}
void ftCo_800C6B6C(ftCo_GObj* gobj)
@ -87,9 +94,16 @@ void ftCo_800C6B6C(ftCo_GObj* gobj)
NOT_IMPLEMENTED;
}
void ftCo_EntryEnd_Anim(ftCo_GObj* gobj)
void ftCo_EntryEnd_Anim(Fighter_GObj* gobj)
{
NOT_IMPLEMENTED;
Fighter* fp = GET_FIGHTER(gobj);
--fp->mv.co.entry.timer;
if (fp->mv.co.entry.timer == 0) {
if (Player_GetFlagsBit4(fp->player_id)) {
ftColl_8007B760(gobj, p_ftCommonData->x6C8);
}
ftCommon_8007D92C(gobj);
}
}
void ftCo_EntryEnd_IASA(ftCo_GObj* gobj) {}
@ -115,9 +129,13 @@ void ftCo_800C703C(ftCo_GObj* gobj)
fp->dmg.x1948 = fp->dmg.x194C = p_ftCommonData->x6CC;
}
/// @todo #ftCo_800C6150
void ftCo_800C7070(ftCo_GObj* gobj)
{
NOT_IMPLEMENTED;
Fighter* fp = GET_FIGHTER(gobj);
Fighter_ChangeMotionState(gobj, ftCo_MS_RebirthWait, 0, 0, 1, 0, NULL);
fp->x2219_b2 = true;
fp->x2219_b1 = true;
}
void ftCo_800C70D0(ftCo_GObj* gobj)
@ -140,22 +158,52 @@ void ftCo_800C7200(Fighter_GObj* gobj)
ft_8008521C(gobj);
}
static inline void inlineB0(ftCo_GObj* gobj)
{
ftCo_800C7070(gobj);
}
static inline void inlineB1(ftCo_GObj* gobj)
{
inlineB0(gobj);
}
static inline void inlineB2(ftCo_GObj* gobj)
{
inlineB1(gobj);
}
void ftCo_800C7220(ftCo_GObj* gobj)
{
NOT_IMPLEMENTED;
Fighter* fp = GET_FIGHTER(gobj);
if (fp->kind != FTKIND_KIRBY) {
inlineB2(gobj);
} else {
ftCo_800C7070(gobj);
}
}
void ftCo_800C7294(ftCo_GObj* gobj)
{
NOT_IMPLEMENTED;
Fighter* fp = GET_FIGHTER(gobj);
if (fp->kind != FTKIND_KIRBY) {
inlineB2(gobj);
} else {
ftCo_800C7070(gobj);
}
}
void ftCo_800C7308(ftCo_GObj* gobj)
{
NOT_IMPLEMENTED;
Fighter* fp = GET_FIGHTER(gobj);
if (fp->kind != FTKIND_KIRBY) {
inlineB2(gobj);
} else {
ftCo_800C7070(gobj);
}
}
void ftCo_800C737C(Fighter_GObj* gobj)
void ftCo_800C737C(ftCo_GObj* gobj)
{
ft_8008521C(gobj);
}
@ -170,9 +218,32 @@ void ftCo_800C7414(ftCo_GObj* gobj)
ft_8008521C(gobj);
}
static inline void inlineC0(ftCo_GObj* gobj)
{
Fighter* fp = GET_FIGHTER(gobj);
Fighter_ChangeMotionState(gobj, 0xE, 0, 0, 1, 0, NULL);
fp->x2219_b1 = true;
fp->x2219_b2 = true;
}
static inline void inlineC1(ftCo_GObj* gobj)
{
inlineC0(gobj);
}
static inline void inlineC2(ftCo_GObj* gobj)
{
inlineC1(gobj);
}
void ftCo_800C7434(ftCo_GObj* gobj)
{
NOT_IMPLEMENTED;
Fighter* temp_r31 = GET_FIGHTER(gobj);
if (temp_r31->kind == FTKIND_GKOOPS) {
inlineC2(gobj);
} else {
inlineB2(gobj);
}
}
void ftCo_800C74AC(ftCo_GObj* gobj)
@ -185,9 +256,17 @@ void fn_800C74CC(ftCo_GObj* gobj)
it_802EADD8(GET_FIGHTER(gobj)->mv.co.captureleadead.x0);
}
bool ftCo_800C74F4(ftCo_GObj* gobj)
bool ftCo_800C74F4(Fighter_GObj* gobj)
{
NOT_IMPLEMENTED;
Fighter* fp = GET_FIGHTER(gobj);
if (fp->dmg.x1860 == 16 && fp->capture_timer == 0 &&
fp->motion_id != ftCo_MS_CaptureLeadead &&
it_802EAF28(fp->dmg.x1868_source) == NULL)
{
ftCo_800C7590(gobj);
return true;
}
return false;
}
void fn_800C7568(ftCo_GObj* gobj)
@ -195,7 +274,7 @@ void fn_800C7568(ftCo_GObj* gobj)
it_802EADD8(GET_FIGHTER(gobj)->mv.co.captureleadead.x0);
}
UNK_RET ftCo_800C7590(UNK_PARAMS)
void ftCo_800C7590(ftCo_GObj* gobj)
{
NOT_IMPLEMENTED;
}
@ -261,9 +340,9 @@ UNK_RET ftCo_800C7B0C(UNK_PARAMS)
NOT_IMPLEMENTED;
}
UNK_RET ftCo_800C7C60(UNK_PARAMS)
void ftCo_800C7C60(ftCo_GObj* gobj, int damage_amount)
{
NOT_IMPLEMENTED;
Fighter_TakeDamage_8006CC7C(GET_FIGHTER(gobj), damage_amount);
}
bool ftCo_800C7CA0(ftCo_GObj* gobj)
@ -294,7 +373,16 @@ void ftCo_DownReflect_Coll(ftCo_GObj* gobj)
void ftCo_800C8064(void)
{
NOT_IMPLEMENTED;
HSD_DObj* temp_r3;
HSD_MObj* var_r0;
temp_r3 = HSD_JObjGetDObj(HSD_JObjLoadJoint(Fighter_804D6504));
if (temp_r3 != NULL) {
var_r0 = temp_r3->mobj;
} else {
var_r0 = NULL;
}
ft_804D6580 = var_r0;
}
void ft_800C80A4(Fighter* fp)

View File

@ -18,7 +18,7 @@
/* 0C673C */ void ftCo_EntryStart_IASA(ftCo_GObj* gobj);
/* 0C6740 */ void ftCo_EntryStart_Phys(ftCo_GObj* gobj);
/* 0C6950 */ void ftCo_EntryStart_Coll(ftCo_GObj* gobj);
/* 0C6AFC */ UNK_RET ftCo_800C6AFC(UNK_PARAMS);
/* 0C6AFC */ void ftCo_800C6AFC(HSD_JObj* jobj);
/* 0C6B6C */ void ftCo_800C6B6C(ftCo_GObj* gobj);
/* 0C6CC8 */ void ftCo_EntryEnd_Anim(ftCo_GObj* gobj);
/* 0C6D34 */ void ftCo_EntryEnd_IASA(ftCo_GObj* gobj);
@ -39,7 +39,7 @@
/* 0C7434 */ void ftCo_800C7434(ftCo_GObj* gobj);
/* 0C74AC */ void ftCo_800C74AC(ftCo_GObj* gobj);
/* 0C74F4 */ bool ftCo_800C74F4(ftCo_GObj* gobj);
/* 0C7590 */ UNK_RET ftCo_800C7590(UNK_PARAMS);
/* 0C7590 */ void ftCo_800C7590(ftCo_GObj* gobj);
/* 0C7734 */ void ftCo_CaptureLeadead_Anim(ftCo_GObj* gobj);
/* 0C77B0 */ void ftCo_CaptureLeadead_IASA(ftCo_GObj* gobj);
/* 0C77B4 */ void ftCo_CaptureLeadead_Phys(ftCo_GObj* gobj);
@ -52,7 +52,7 @@
/* 0C7AD8 */ void ftCo_CaptureLikelike_Phys(ftCo_GObj* gobj);
/* 0C7ADC */ void ftCo_CaptureLikelike_Coll(ftCo_GObj* gobj);
/* 0C7B0C */ UNK_RET ftCo_800C7B0C(UNK_PARAMS);
/* 0C7C60 */ UNK_RET ftCo_800C7C60(UNK_PARAMS);
/* 0C7C60 */ void ftCo_800C7C60(ftCo_GObj* gobj, int damage_amount);
/* 0C7CA0 */ bool ftCo_800C7CA0(ftCo_GObj* gobj);
/* 0C7FC8 */ void ftCo_DownReflect_Anim(ftCo_GObj* gobj);
/* 0C8004 */ void ftCo_DownReflect_IASA(ftCo_GObj* gobj);

View File

@ -10,11 +10,6 @@
#include <baselib/debug.h>
#include <baselib/gobj.h>
struct UnkFloat6_Camera {
Vec3 x0;
Vec3 xC;
};
void ftCamera_80076018(UnkFloat6_Camera* in, UnkFloat6_Camera* out, f32 mul)
{
out->x0.x = in->x0.x * mul;

View File

@ -31,13 +31,13 @@ bool ftWallJump_8008169C(HSD_GObj* gobj)
// side of the collision?
f32 wall_dir = env_flags ? -1.f : +1.f;
// x210C_walljumpInputTimer = some walljump animation/input timer?
// wall_jump_input_timer = some walljump animation/input timer?
// is initialized in the else-block when the user does the right
// inputs. gets incremented here every frame.
if ((fp0->x210C_walljumpInputTimer < max_input_frames) &&
if ((fp0->wall_jump_input_timer < max_input_frames) &&
(wall_dir == fp0->x2110_walljumpWallSide))
{
fp0->x210C_walljumpInputTimer++;
fp0->wall_jump_input_timer++;
} else {
Vec3 wall_pos, ecb;
@ -85,14 +85,14 @@ bool ftWallJump_8008169C(HSD_GObj* gobj)
// walljump input timer and check for the control stick
// movement away from the wall in the next phase
fp0->x2110_walljumpWallSide = wall_dir;
fp0->x210C_walljumpInputTimer = 0U;
fp0->wall_jump_input_timer = 0U;
}
}
}
if (
// walljump timer within limits?
fp0->x210C_walljumpInputTimer < p_ftCommonData->x768 &&
fp0->wall_jump_input_timer < p_ftCommonData->x768 &&
((
// left wall & control stick right?
fp0->x2110_walljumpWallSide == -1 &&
@ -109,14 +109,14 @@ bool ftWallJump_8008169C(HSD_GObj* gobj)
p_ftCommonData->x774, fp0->x1969_walljumpUsed,
fp0->x2110_walljumpWallSide);
fp0->x210C_walljumpInputTimer = max_input_frames;
fp0->wall_jump_input_timer = max_input_frames;
if (fp0->x1969_walljumpUsed < 255) {
fp0->x1969_walljumpUsed++;
}
return true;
}
} else {
fp0->x210C_walljumpInputTimer = max_input_frames;
fp0->wall_jump_input_timer = max_input_frames;
}
}

View File

@ -464,7 +464,7 @@ struct ftCommonData {
/* +6BC */ UNK_T x6BC;
/* +6C0 */ UNK_T x6C0;
/* +6C4 */ UNK_T x6C4;
/* +6C8 */ UNK_T x6C8;
/* +6C8 */ int x6C8;
/* +6CC */ int x6CC;
/* +6D0 */ float x6D0;
/* +6D4 */ UNK_T x6D4;
@ -1461,8 +1461,8 @@ struct Fighter {
/* fp+2102 */ s8 x2102;
/* fp+2103 */ s8 x2103;
/* fp+2104 */ s32 x2104;
/* fp+2108 */ s32 x2108;
/* fp+210C */ u8 x210C_walljumpInputTimer;
/* fp+2108 */ int capture_timer;
/* fp+210C */ u8 wall_jump_input_timer;
/* fp+210C */ u8 filler_x210C[3];
/* fp+2110 */ float x2110_walljumpWallSide;
/* fp+2114 */ SmashAttr smash_attrs;
@ -1778,4 +1778,9 @@ struct ftData_UnkCountStruct {
int count;
};
struct UnkFloat6_Camera {
Vec3 x0;
Vec3 xC;
};
#endif

View File

@ -0,0 +1,10 @@
#ifndef GALE01_2EAF28
#define GALE01_2EAF28
#include "it/forward.h"
#include <placeholder.h>
/* 2EAF28 */ UNK_T it_802EAF28(Item_GObj* gobj);
#endif

View File

@ -1544,7 +1544,7 @@ void Player_SetFlagsBit3(s32 slot, u8 bit3)
player->flags.b3 = bit3;
}
u8 Player_GetFlagsBit4(s32 slot)
int Player_GetFlagsBit4(int slot)
{
StaticPlayer* player;
u8 bit4;

View File

@ -280,7 +280,7 @@ void Player_SetFlagsBit1(s32 slot);
void Player_UnsetFlagsBit1(int slot);
s32 Player_GetFlagsBit3(s32 slot);
void Player_SetFlagsBit3(s32 slot, u8 bit3);
u8 Player_GetFlagsBit4(s32 slot);
int Player_GetFlagsBit4(int slot);
u8 Player_GetFlagsBit5(s32 slot);
void Player_SetFlagsBit5(s32 slot, u8 bit5);
u8 Player_GetFlagsBit6(s32 slot);

View File

@ -5,6 +5,12 @@
#include "baselib/forward.h"
#include <dolphin/mtx/forward.h>
#include <placeholder.h>
struct HSD_Spline {
u8 x0 UNK_SIZE_ARRAY;
};
f32 splGetHelmite(f32, f32, f32, f32, f32, f32);
void splArcLengthPoint(Vec3*, HSD_Spline*, f32);
void splGetSplinePoint(s32, s32);