From 966421196f211240830efd9a43a3129981cf7b00 Mon Sep 17 00:00:00 2001 From: lukechampine Date: Sun, 15 Mar 2026 16:30:42 -0400 Subject: [PATCH] ftPr_SpecialN.c work --- src/melee/ft/chara/ftPurin/ftPr_Init.c | 12 +- src/melee/ft/chara/ftPurin/ftPr_Init.h | 4 + src/melee/ft/chara/ftPurin/ftPr_SpecialN.c | 947 +++++++++++++++++++-- src/melee/ft/chara/ftPurin/ftPr_SpecialN.h | 2 +- src/melee/ft/chara/ftPurin/types.h | 51 +- 5 files changed, 948 insertions(+), 68 deletions(-) diff --git a/src/melee/ft/chara/ftPurin/ftPr_Init.c b/src/melee/ft/chara/ftPurin/ftPr_Init.c index 3b51af241d..45bbad031d 100644 --- a/src/melee/ft/chara/ftPurin/ftPr_Init.c +++ b/src/melee/ft/chara/ftPurin/ftPr_Init.c @@ -21,6 +21,9 @@ #include "ft/ftdynamics.h" #include "ft/ftparts.h" #include "ft/types.h" + +#include "ftCommon/forward.h" + #include "ftCommon/ftCo_Attack100.h" #include "it/it_26B1.h" @@ -427,14 +430,13 @@ char* ftPr_Init_803D05B4[] = { "PlyPurinYeHat_TopN_joint", }; -Vec4 ftPr_Init_803D05C8 = { 0.65, 0.7, 0.8, 1 }; -Vec4 ftPr_Init_803D05D8 = { 1.1, 1.35, 1.3, 1.2 }; +f32 ftPr_Init_803D05C8[4] = { 0.65, 0.7, 0.8, 1 }; +f32 ftPr_Init_803D05D8[4] = { 1.1, 1.35, 1.3, 1.2 }; char ftPr_Init_assert_msg_0[] = "!(jobj->flags & JOBJ_USE_QUATERNION)"; -Vec3 ftPr_Init_803D0610[] = { - { +8, +0, -4 }, - { +4, +4, +4 }, +ftCollisionBox ftPr_Init_803D0610 = { + +8, +0, -4, +4, +4, +4, }; /* static */ extern char* ftPr_Init_803D05B4[5]; diff --git a/src/melee/ft/chara/ftPurin/ftPr_Init.h b/src/melee/ft/chara/ftPurin/ftPr_Init.h index 2c95fdb05c..a8bbb1e61f 100644 --- a/src/melee/ft/chara/ftPurin/ftPr_Init.h +++ b/src/melee/ft/chara/ftPurin/ftPr_Init.h @@ -5,6 +5,7 @@ #include "ft/types.h" +#include "ftCommon/forward.h" #include "ftPurin/forward.h" #include @@ -33,5 +34,8 @@ /* 3D047C */ extern char ftPr_Init_AnimDatFilename[]; /* 3D04F8 */ extern Fighter_DemoStrings ftPr_Init_DemoMotionFilenames; /* 3D0508 */ extern Fighter_CostumeStrings ftPr_Init_CostumeStrings[]; +/* 3D05C8 */ extern f32 ftPr_Init_803D05C8[4]; +/* 3D05D8 */ extern f32 ftPr_Init_803D05D8[4]; +/* 3D0610 */ extern ftCollisionBox ftPr_Init_803D0610; #endif diff --git a/src/melee/ft/chara/ftPurin/ftPr_SpecialN.c b/src/melee/ft/chara/ftPurin/ftPr_SpecialN.c index 3a3465dca7..e62303302d 100644 --- a/src/melee/ft/chara/ftPurin/ftPr_SpecialN.c +++ b/src/melee/ft/chara/ftPurin/ftPr_SpecialN.c @@ -4,6 +4,9 @@ #include "forward.h" +#include "ft/chara/ftCommon/ftCo_Fall.h" +#include "ft/chara/ftCommon/ftCo_FallSpecial.h" +#include "ft/chara/ftCommon/ftCo_Landing.h" #include "ft/fighter.h" #include "ft/forward.h" @@ -12,12 +15,16 @@ #include "ft/ft_0877.h" #include "ft/ft_0881.h" #include "ft/ft_0892.h" +#include "ft/ftcliffcommon.h" +#include "ft/ftcolanim.h" #include "ft/ftcoll.h" #include "ft/ftcommon.h" #include "ft/ftparts.h" #include "ft/inlines.h" #include "ft/types.h" +#include "ftPurin/ftPr_Init.h" #include "ftPurin/types.h" +#include "MSL/trigf.h" #include #include @@ -25,6 +32,11 @@ #include #include #include +#include +#include +#include + +#define NEGABS(x) ((x) < 0.0f ? -(x) : (x)) void ftPr_SpecialS_8013D658(HSD_GObj* gobj) { @@ -89,13 +101,196 @@ void ftPr_SpecialS_8013D8B0(Fighter_GObj* gobj) ft_800892A0(gobj); } -/// #ftPr_SpecialS_8013D8E4 +static inline void setupPurinCallbacks(HSD_GObj* gobj) +{ + Fighter* fp = GET_FIGHTER(gobj); + fp->death2_cb = ftPr_SpecialS_8013D658; + fp->take_dmg_cb = ftPr_SpecialS_8013D658; + fp->deal_dmg_cb = ftPr_SpecialS_8013D764; + fp->x21F8 = ftPr_SpecialN_8014222C; +} -/// #ftPr_SpecialS_8013DA24 +static inline void normalizeAndSetRollAngle(HSD_GObj* gobj) +{ + Fighter* fp = GET_FIGHTER(gobj); + while (fp->mv.pr.specialn.x14 < 0.0f) { + fp->mv.pr.specialn.x14 += M_PI * 2; + } + while (fp->mv.pr.specialn.x14 > M_PI * 2) { + fp->mv.pr.specialn.x14 -= M_PI * 2; + } + ftPartSetRotX(fp, FtPart_YRotN, fp->mv.pr.specialn.x14); +} -/// #ftPr_SpecialS_8013DC64 +void ftPr_SpecialS_8013D8E4(HSD_GObj* gobj) +{ + Fighter* fp = GET_FIGHTER(gobj); + ftPurinAttributes* da = fp->dat_attrs; + HitCapsuleState state = fp->x914[0].state; + f32 abs_vel; + s32 damage; + PAD_STACK(8); + if (fp->ground_or_air == GA_Air) { + abs_vel = fp->self_vel.x; + if (abs_vel < 0.0f) { + abs_vel = -abs_vel; + } + } else { + abs_vel = fp->gr_vel; + if (abs_vel < 0.0f) { + abs_vel = -abs_vel; + } + } + if (abs_vel < da->xCC) { + fp->x914[0].state = HitCapsule_Disabled; + ftCo_800BFFAC(fp); + } else if (state == HitCapsule_Disabled) { + fp->x914[0].state = HitCapsule_Enabled; + } + if (fp->x914[0].state != HitCapsule_Disabled) { + if (fp->ground_or_air == GA_Air) { + abs_vel = fp->self_vel.x; + if (abs_vel < 0.0f) { + abs_vel = -abs_vel; + } + damage = da->x84 * (da->x80 + abs_vel); + } else { + abs_vel = fp->gr_vel; + if (abs_vel < 0.0f) { + abs_vel = -abs_vel; + } + damage = da->x84 * (da->x80 + abs_vel); + } + if (damage < 1) { + damage = 1; + } + ftColl_8007ABD0(&fp->x914[0], damage, gobj); + } +} -/// #ftPr_SpecialS_8013DD54 +void ftPr_SpecialS_8013DA24(HSD_GObj* gobj, bool is_air, MotionFlags flags, + float anim_start) +{ + Fighter* fp = GET_FIGHTER(gobj); + ftPurinAttributes* da = fp->dat_attrs; + PAD_STACK(8); + fp->facing_dir = fp->mv.pr.specialn.x34.x; + ftColl_8007AFF8(gobj); + if (!is_air) { + int msid; + if (fp->facing_dir == 1) { + msid = ftPr_MS_SpecialNEndR; + } else { + msid = ftPr_MS_SpecialNEndL; + } + Fighter_ChangeMotionState(gobj, msid, flags, anim_start, 1, 0, NULL); + fp->gr_vel *= da->x90; + fp->x74_anim_vel.y = 0; + fp->self_vel.y = 0; + } else { + int msid; + if (fp->facing_dir == 1) { + msid = ftPr_MS_SpecialAirNEndR; + } else { + msid = ftPr_MS_SpecialAirNEndL; + } + Fighter_ChangeMotionState(gobj, msid, flags, anim_start, 1, 0, NULL); + fp->self_vel.x *= da->x90; + fp->self_vel.y *= da->x94; + fp->xE4_ground_accel_1 = 0; + fp->gr_vel = 0; + } + setupPurinCallbacks(gobj); + ftPr_SpecialS_8013D658(gobj); + fp->mv.pr.specialn.facing_dir = 0; + ftPartSetRotY(fp, FtPart_TopN, M_PI_2 * fp->facing_dir); +} + +void ftPr_SpecialS_8013DC64(HSD_GObj* gobj) +{ + HSD_JObj* jobj = GET_JOBJ(gobj); + Fighter* fp = GET_FIGHTER(gobj); + ftPurinAttributes* da = fp->dat_attrs; + HSD_JObjGetScale(jobj, &fp->fv.pr.x2230); + fp->gr_vel = 0; + fp->mv.pr.specialn.x0 = da->x34; + fp->mv.pr.specialn.x4 = -1; + fp->mv.pr.specialn.x8 = -1; + fp->mv.pr.specialn.xC = 0; + fp->mv.pr.specialn.x14 = 0; + fp->mv.pr.specialn.x34.y = 0; + fp->mv.pr.specialn.facing_dir = 0; + fp->mv.pr.specialn.x24 = 0; + fp->mv.pr.specialn.x28 = 0; + fp->mv.pr.specialn.x2C = da->xA0; + fp->mv.pr.specialn.x30 = 0; + fp->deal_dmg_cb = ftPr_SpecialS_8013D764; + fp->x21F8 = ftPr_SpecialN_8014222C; +} + +static inline void playRollSFX(HSD_GObj* gobj) +{ + Fighter* fp = GET_FIGHTER(gobj); + int sfx_id; + if (fp->ground_or_air == GA_Air) { + sfx_id = 250067; + } else { + sfx_id = 250064; + } + ft_80088510(fp, sfx_id, 127, 64); +} + +static inline void scaleAnimStep(HSD_GObj* gobj, Vec3* scale) +{ + Fighter* fp = GET_FIGHTER(gobj); + HSD_JObj* jobj = GET_JOBJ(gobj); + int frame = fp->mv.pr.specialn.x8; + if (frame >= 0 && frame < 4) { + scale->x = fp->fv.pr.x2230.x; + scale->y = fp->fv.pr.x2230.y * ftPr_Init_803D05C8[frame]; + scale->z = fp->fv.pr.x2230.z * ftPr_Init_803D05D8[frame]; + HSD_JObjSetScale(jobj, scale); + fp->mv.pr.specialn.x8 += 1; + } else { + HSD_JObjSetScale(jobj, &fp->fv.pr.x2230); + } +} + +static inline void hitCapsuleToggle(HSD_GObj* gobj) +{ + Fighter* fp = GET_FIGHTER(gobj); + ftPurinAttributes* da = fp->dat_attrs; + fp->mv.pr.specialn.xC += 1; + if (fp->mv.pr.specialn.xC >= da->x9C && + fp->x914[0].state != HitCapsule_Disabled) + { + fp->x914[0].x4 = (fp->x914[0].x4 + 1) & 1; + fp->mv.pr.specialn.xC = 0; + } +} + +void ftPr_SpecialS_8013DD54(HSD_GObj* gobj, bool arg1) +{ + Fighter* fp = GET_FIGHTER(gobj); + while (fp->mv.pr.specialn.x14 < 0.0f) { + fp->mv.pr.specialn.x14 += M_PI * 2; + } + while (fp->mv.pr.specialn.x14 > M_PI * 2) { + fp->mv.pr.specialn.x14 -= M_PI * 2; + } + if (fp->mv.pr.specialn.x34.y == 0.0f) { + playRollSFX(gobj); + } else { + if (fp->mv.pr.specialn.x34.x == ((arg1) ? -1.0f : 1.0f)) { + if (fp->mv.pr.specialn.x14 < fp->mv.pr.specialn.x34.y) { + playRollSFX(gobj); + } + } else if (fp->mv.pr.specialn.x14 > fp->mv.pr.specialn.x34.y) { + playRollSFX(gobj); + } + } + fp->mv.pr.specialn.x34.y = fp->mv.pr.specialn.x14; +} void ftPr_SpecialN_Enter(HSD_GObj* gobj) { @@ -120,16 +315,26 @@ void ftPr_SpecialN_Enter(HSD_GObj* gobj) fp->mv.pr.specialn.x1C = da->x44; } -/// #ftPr_SpecialAirN_Enter - -static inline void setupPurinCallbacks(HSD_GObj* gobj) +void ftPr_SpecialAirN_Enter(HSD_GObj* gobj) { - Fighter* temp_r5; - temp_r5 = gobj->user_data; - temp_r5->death2_cb = ftPr_SpecialS_8013D658; - temp_r5->take_dmg_cb = ftPr_SpecialS_8013D658; - temp_r5->deal_dmg_cb = ftPr_SpecialS_8013D764; - temp_r5->x21F8 = ftPr_SpecialN_8014222C; + Fighter* fp = GET_FIGHTER(gobj); + ftPurinAttributes* da = fp->dat_attrs; + PAD_STACK(4 * 4); + fp->mv.pr.specialn.x34.x = fp->facing_dir; + { + int msid; + if (fp->mv.pr.specialn.x34.x == 1) { + msid = ftPr_MS_SpecialAirNStartR; + } else { + msid = ftPr_MS_SpecialAirNStartL; + } + Fighter_ChangeMotionState(gobj, msid, Ft_MF_None, 0, 1, 0, NULL); + } + fp->cmd_vars[0] = fp->cmd_vars[1] = fp->cmd_vars[2] = fp->cmd_vars[3] = 0; + ftAnim_8006EBA4(gobj); + ftPr_SpecialS_8013DC64(gobj); + fp->x74_anim_vel.y = da->x3C; + fp->mv.pr.specialn.x1C = da->x54; } void ftPr_SpecialNStart_Anim(HSD_GObj* gobj) @@ -137,7 +342,7 @@ void ftPr_SpecialNStart_Anim(HSD_GObj* gobj) /// @todo Named flags. static u32 const mf = (1 << 1) | (1 << 4) | (1 << 18); Fighter* fp = GET_FIGHTER(gobj); - PAD_STACK(4 * 4); + PAD_STACK(8); fp->mv.pr.specialn.facing_dir = 0; if (!ftAnim_IsFramesRemaining(gobj)) { Fighter_ChangeMotionState(gobj, ftPr_MS_SpecialNLoop, mf, 0, 0, 0, @@ -151,22 +356,144 @@ void ftPr_SpecialNStart_Anim(HSD_GObj* gobj) } } -/// #ftPr_SpecialNLoop_Anim +void ftPr_SpecialNLoop_Anim(HSD_GObj* gobj) +{ + /// @todo Named flags. + static u32 const mf = (1 << 1) | (1 << 4) | (1 << 7) | (1 << 9) | + (1 << 18) | (1 << 19) | (1 << 22) | (1 << 26) | + (1 << 27); + Fighter* fp = GET_FIGHTER(gobj); + ftPurinAttributes* da = fp->dat_attrs; + ftPr_SpecialS_8013DD54(gobj, false); + fp->mv.pr.specialn.facing_dir = 0; + fp->mv.pr.specialn.x2C += da->xA8; + if (fp->mv.pr.specialn.x2C >= da->xA4) { + fp->mv.pr.specialn.x2C = da->xA4; + if (fp->mv.pr.specialn.x30 == 0) { + ftCo_800BFFD0(fp, 5, 0); + } + fp->mv.pr.specialn.x30 = 1; + Fighter_ChangeMotionState(gobj, ftPr_MS_SpecialNFull, mf, + fp->cur_anim_frame, 0, 0, NULL); + } + fp->mv.pr.specialn.x14 += + fp->mv.pr.specialn.x34.x * + (fp->mv.pr.specialn.x2C * (deg_to_rad * da->xAC)); + normalizeAndSetRollAngle(gobj); + ftPartSetRotY(fp, FtPart_TopN, M_PI_2); +} -/// #ftPr_SpecialNFull_Anim +void ftPr_SpecialNFull_Anim(HSD_GObj* gobj) +{ + Fighter* fp = GET_FIGHTER(gobj); + ftPurinAttributes* da = fp->dat_attrs; + ftPr_SpecialS_8013DD54(gobj, false); + fp->mv.pr.specialn.facing_dir = 0; + fp->mv.pr.specialn.x2C += da->xA8; + if (fp->mv.pr.specialn.x2C >= da->xA4) { + fp->mv.pr.specialn.x2C = da->xA4; + fp->mv.pr.specialn.x30 = 1; + } + fp->mv.pr.specialn.x14 += + fp->mv.pr.specialn.x34.x * + (fp->mv.pr.specialn.x2C * (deg_to_rad * da->xAC)); + normalizeAndSetRollAngle(gobj); + ftPartSetRotY(fp, FtPart_TopN, M_PI_2); +} -/// #ftPr_SpecialNRelease_Anim +void ftPr_SpecialNRelease_Anim(HSD_GObj* gobj) +{ + Fighter* fp = GET_FIGHTER(gobj); + ftPurinAttributes* da = fp->dat_attrs; + Vec3 scale; + PAD_STACK(16); + ftPr_SpecialS_8013DD54(gobj, false); + fp->mv.pr.specialn.facing_dir = 0; + scaleAnimStep(gobj, &scale); + hitCapsuleToggle(gobj); + ftPr_SpecialS_8013D8E4(gobj); + { + f32 old_angle = fp->mv.pr.specialn.x14; + f32 delta = deg_to_rad * fp->mv.pr.specialn.x2C * + (f32) (0.2 * da->x98 * fp->mv.pr.specialn.x34.x); + fp->mv.pr.specialn.x14 = old_angle + delta; + normalizeAndSetRollAngle(gobj); + fp->mv.pr.specialn.x0 -= 1; + if (fp->mv.pr.specialn.x0 <= 0) { + if (M_PI_2 < fp->mv.pr.specialn.x14 && + fp->mv.pr.specialn.x14 < M_PI_2 * 3) + { + if (delta > 0.0f) { + if (fp->mv.pr.specialn.x14 > M_PI && old_angle < M_PI) { + fp->mv.pr.specialn.x0 = 0; + ftPr_SpecialS_8013DA24(gobj, false, 0x40012, 0); + return; + } + ftPartSetRotY(fp, FtPart_TopN, M_PI_2); + return; + } + if (fp->mv.pr.specialn.x14 < M_PI && old_angle > M_PI) { + fp->mv.pr.specialn.x0 = 0; + ftPr_SpecialS_8013DA24(gobj, false, 0x40012, 0); + return; + } + ftPartSetRotY(fp, FtPart_TopN, M_PI_2); + return; + } + ftPartSetRotY(fp, FtPart_TopN, M_PI_2); + return; + } + ftPartSetRotY(fp, FtPart_TopN, M_PI_2); + } +} -/// #ftPr_SpecialNTurn_Anim +void ftPr_SpecialNTurn_Anim(HSD_GObj* gobj) +{ + Fighter* fp = GET_FIGHTER(gobj); + ftPurinAttributes* da = fp->dat_attrs; + u8 _[8]; + Vec3 scale; + ftPr_SpecialS_8013DD54(gobj, true); + scaleAnimStep(gobj, &scale); + fp->mv.pr.specialn.x14 += + (f32) (0.2 * da->x6C * -fp->mv.pr.specialn.x34.x); + normalizeAndSetRollAngle(gobj); + fp->mv.pr.specialn.x0 -= 1; + if (fp->mv.pr.specialn.x0 <= 0) { + fp->mv.pr.specialn.x0 = 0; + fp->mv.pr.specialn.x34.x = -fp->mv.pr.specialn.x34.x; + ftPr_SpecialS_8013DA24(gobj, false, 0x40012, 0); + return; + } + if ((fp->mv.pr.specialn.x24 % da->x70) == 0) { + f32 angle = atan2f(-fp->coll_data.floor.normal.x, + fp->coll_data.floor.normal.y); + scale.z = angle; + efSync_Spawn(0x3FF, gobj, &fp->cur_pos, &fp->facing_dir, &scale, + angle); + } + fp->mv.pr.specialn.x24 += 1; + ftPartSetRotY(fp, FtPart_TopN, M_PI_2); +} -/// #ftPr_SpecialNEnd_Anim +void ftPr_SpecialNEnd_Anim(HSD_GObj* gobj) +{ + Fighter* fp = GET_FIGHTER(gobj); + Vec3 scale; + fp->mv.pr.specialn.facing_dir = 0; + scaleAnimStep(gobj, &scale); + if (!ftAnim_IsFramesRemaining(gobj)) { + ftPr_SpecialS_8013D658(gobj); + ft_8008A2BC(gobj); + } +} void ftPr_SpecialAirNStart_Anim(HSD_GObj* gobj) { /// @todo Named flags. static u32 const mf = (1 << 1) | (1 << 4) | (1 << 18); Fighter* fp = GET_FIGHTER(gobj); - PAD_STACK(4 * 4); + PAD_STACK(8); fp->mv.pr.specialn.facing_dir = 0; if (!ftAnim_IsFramesRemaining(gobj)) { Fighter_ChangeMotionState(gobj, ftPr_MS_SpecialAirNChargeLoop, mf, 0, @@ -179,25 +506,178 @@ void ftPr_SpecialAirNStart_Anim(HSD_GObj* gobj) ftPartSetRotY(fp, 0, M_PI_2); } } -/// #ftPr_SpecialAirNChargeLoop_Anim +void ftPr_SpecialAirNChargeLoop_Anim(HSD_GObj* gobj) +{ + /// @todo Named flags. + static u32 const mf = (1 << 1) | (1 << 4) | (1 << 7) | (1 << 9) | + (1 << 18) | (1 << 19) | (1 << 22) | (1 << 26) | + (1 << 27); + Fighter* fp = GET_FIGHTER(gobj); + ftPurinAttributes* da = fp->dat_attrs; + ftPr_SpecialS_8013DD54(gobj, false); + fp->mv.pr.specialn.facing_dir = 0; + fp->mv.pr.specialn.x2C += da->xA8; + if (fp->mv.pr.specialn.x2C >= da->xA4) { + fp->mv.pr.specialn.x2C = da->xA4; + if (fp->mv.pr.specialn.x30 == 0) { + ftCo_800BFFD0(fp, 5, 0); + } + fp->mv.pr.specialn.x30 = 1; + Fighter_ChangeMotionState(gobj, ftPr_MS_SpecialAirNChargeFull, mf, + fp->cur_anim_frame, 0, 0, NULL); + } + fp->mv.pr.specialn.x14 += + fp->mv.pr.specialn.x34.x * + (fp->mv.pr.specialn.x2C * (deg_to_rad * da->xAC)); + normalizeAndSetRollAngle(gobj); + ftPartSetRotY(fp, FtPart_TopN, M_PI_2); +} -/// #ftPr_SpecialAirNChargeFull_Anim +void ftPr_SpecialAirNChargeFull_Anim(HSD_GObj* gobj) +{ + Fighter* fp = GET_FIGHTER(gobj); + ftPurinAttributes* da = fp->dat_attrs; + ftPr_SpecialS_8013DD54(gobj, false); + fp->mv.pr.specialn.facing_dir = 0; + fp->mv.pr.specialn.x2C += da->xA8; + if (fp->mv.pr.specialn.x2C >= da->xA4) { + fp->mv.pr.specialn.x2C = da->xA4; + fp->mv.pr.specialn.x30 = 1; + } + fp->mv.pr.specialn.x14 += + fp->mv.pr.specialn.x34.x * + (fp->mv.pr.specialn.x2C * (deg_to_rad * da->xAC)); + normalizeAndSetRollAngle(gobj); + ftPartSetRotY(fp, FtPart_TopN, M_PI_2); +} /// #ftPr_SpecialAirNChargeRelease_Anim -/// #ftPr_SpecialAirNStartTurn_Anim +void ftPr_SpecialAirNStartTurn_Anim(HSD_GObj* gobj) +{ + Fighter* fp = GET_FIGHTER(gobj); + ftPurinAttributes* da = fp->dat_attrs; + Vec3 scale; + PAD_STACK(4); + ftPr_SpecialS_8013DD54(gobj, true); + scaleAnimStep(gobj, &scale); + fp->mv.pr.specialn.x14 += + da->xBC * (f32) (0.2 * da->x6C * -fp->mv.pr.specialn.x34.x); + normalizeAndSetRollAngle(gobj); + fp->mv.pr.specialn.x0 -= 1; + if (fp->mv.pr.specialn.x0 <= 0) { + fp->mv.pr.specialn.x0 = 0; + fp->mv.pr.specialn.x34.x = -fp->mv.pr.specialn.x34.x; + ftPr_SpecialS_8013DA24(gobj, false, 0x40012, 0); + return; + } + fp->mv.pr.specialn.x24 += 1; + ftPartSetRotY(fp, FtPart_TopN, M_PI_2); +} -/// #ftPr_SpecialAirNEnd_Anim +void ftPr_SpecialAirNEnd_Anim(HSD_GObj* gobj) +{ + Fighter* fp = GET_FIGHTER(gobj); + ftPurinAttributes* da = fp->dat_attrs; + u8 _[16]; + Vec3 scale; + PAD_STACK(4); + fp->mv.pr.specialn.facing_dir = 0; + scaleAnimStep(gobj, &scale); + if (!ftAnim_IsFramesRemaining(gobj)) { + ftPr_SpecialS_8013D658(gobj); + if (da->xD8 == 0.0f) { + ftCo_Fall_Enter(gobj); + } else { + ftCo_80096900(gobj, 1, 0, 1, 1.0f, da->xD8); + } + } +} -/// #ftPr_SpecialNHit_Anim +void ftPr_SpecialNHit_Anim(HSD_GObj* gobj) +{ + Fighter* fp = GET_FIGHTER(gobj); + ftPurinAttributes* da = fp->dat_attrs; + u8 _[12]; + Vec3 scale; + PAD_STACK(4); + scaleAnimStep(gobj, &scale); + fp->mv.pr.specialn.x14 += + da->xBC * (f32) (0.2 * da->x6C * -fp->mv.pr.specialn.x34.x); + normalizeAndSetRollAngle(gobj); + ftPartSetRotY(fp, FtPart_TopN, M_PI_2); +} void ftPr_SpecialNStart_IASA(HSD_GObj* arg0) {} -/// #ftPr_SpecialNLoop_IASA +void ftPr_SpecialNLoop_IASA(HSD_GObj* gobj) +{ + /// @todo Named flags. + static u32 const mf = + (1 << 1) | (1 << 4) | (1 << 7) | (1 << 12) | (1 << 18); + Fighter* fp = GET_FIGHTER(gobj); + ftPurinAttributes* da = fp->dat_attrs; + PAD_STACK(8); + if (!(fp->input.held_inputs & 0x200)) { + Fighter_ChangeMotionState(gobj, ftPr_MS_SpecialNRelease, mf, + fp->cur_anim_frame, 0, 0, NULL); + setupPurinCallbacks(gobj); + ftAnim_8006EBA4(gobj); + fp->gr_vel = fp->mv.pr.specialn.x34.x * + (da->xC0 * (fp->mv.pr.specialn.x2C - da->xA0)); + ftPartSetRotY(fp, FtPart_TopN, M_PI_2); + normalizeAndSetRollAngle(gobj); + ft_PlaySFX(fp, 250073, 127, 64); + } +} -/// #ftPr_SpecialNFull_IASA +void ftPr_SpecialNFull_IASA(HSD_GObj* gobj) +{ + /// @todo Named flags. + static u32 const mf = + (1 << 1) | (1 << 4) | (1 << 7) | (1 << 12) | (1 << 18); + Fighter* fp = GET_FIGHTER(gobj); + ftPurinAttributes* da = fp->dat_attrs; + PAD_STACK(8); + if (!(fp->input.held_inputs & 0x200)) { + Fighter_ChangeMotionState(gobj, ftPr_MS_SpecialNRelease, mf, + fp->cur_anim_frame, 0, 0, NULL); + setupPurinCallbacks(gobj); + ftAnim_8006EBA4(gobj); + fp->gr_vel = fp->mv.pr.specialn.x34.x * + (da->xC0 * (fp->mv.pr.specialn.x2C - da->xA0)); + ftPartSetRotY(fp, FtPart_TopN, M_PI_2); + normalizeAndSetRollAngle(gobj); + ft_PlaySFX(fp, 250073, 127, 64); + } +} -/// #ftPr_SpecialNRelease_IASA +void ftPr_SpecialNRelease_IASA(HSD_GObj* gobj) +{ + /// @todo Named flags. + static u32 const mf = (1 << 1) | (1 << 4) | (1 << 7) | (1 << 9) | + (1 << 18) | (1 << 19) | (1 << 22) | (1 << 26) | + (1 << 27); + Fighter* fp = GET_FIGHTER(gobj); + ftPurinAttributes* da = fp->dat_attrs; + f32 dir; + if (NEGABS(fp->input.lstick.x) > da->x68) { + dir = fp->input.lstick.x > 0.0f ? 1.0f : -1.0f; + if (fp->mv.pr.specialn.x34.x != dir) { + ftColl_8007AFF8(gobj); + fp->mv.pr.specialn.facing_dir = dir; + fp->mv.pr.specialn.x34.x = -dir; + Fighter_ChangeMotionState(gobj, ftPr_MS_SpecialNTurn, mf, + fp->cur_anim_frame, 0, 0, NULL); + setupPurinCallbacks(gobj); + fp->mv.pr.specialn.x10 = fp->gr_vel; + fp->mv.pr.specialn.x1C = -0.05f * fp->gr_vel; + fp->mv.pr.specialn.x24 = 0; + normalizeAndSetRollAngle(gobj); + ft_PlaySFX(fp, 250073, 127, 64); + } + } +} void ftPr_SpecialNTurn_IASA(HSD_GObj* arg0) {} @@ -205,9 +685,47 @@ void ftPr_SpecialNEnd_IASA(HSD_GObj* arg0) {} void ftPr_SpecialAirNStart_IASA(HSD_GObj* arg0) {} -/// #ftPr_SpecialAirNChargeLoop_IASA +void ftPr_SpecialAirNChargeLoop_IASA(HSD_GObj* gobj) +{ + /// @todo Named flags. + static u32 const mf = + (1 << 1) | (1 << 4) | (1 << 7) | (1 << 12) | (1 << 18); + Fighter* fp = GET_FIGHTER(gobj); + ftPurinAttributes* da = fp->dat_attrs; + PAD_STACK(8); + if (!(fp->input.held_inputs & 0x200)) { + Fighter_ChangeMotionState(gobj, ftPr_MS_SpecialAirNChargeRelease, mf, + fp->cur_anim_frame, 0, 0, NULL); + setupPurinCallbacks(gobj); + ftAnim_8006EBA4(gobj); + fp->self_vel.x = fp->mv.pr.specialn.x34.x * + (da->xC0 * (fp->mv.pr.specialn.x2C - da->xA0)); + ftPartSetRotY(fp, FtPart_TopN, M_PI_2); + normalizeAndSetRollAngle(gobj); + ft_PlaySFX(fp, 250073, 127, 64); + } +} -/// #ftPr_SpecialAirNChargeFull_IASA +void ftPr_SpecialAirNChargeFull_IASA(HSD_GObj* gobj) +{ + /// @todo Named flags. + static u32 const mf = + (1 << 1) | (1 << 4) | (1 << 7) | (1 << 12) | (1 << 18); + Fighter* fp = GET_FIGHTER(gobj); + ftPurinAttributes* da = fp->dat_attrs; + PAD_STACK(8); + if (!(fp->input.held_inputs & 0x200)) { + Fighter_ChangeMotionState(gobj, ftPr_MS_SpecialAirNChargeRelease, mf, + fp->cur_anim_frame, 0, 0, NULL); + setupPurinCallbacks(gobj); + ftAnim_8006EBA4(gobj); + fp->self_vel.x = fp->mv.pr.specialn.x34.x * + (da->xC0 * (fp->mv.pr.specialn.x2C - da->xA0)); + ftPartSetRotY(fp, FtPart_TopN, M_PI_2); + normalizeAndSetRollAngle(gobj); + ft_PlaySFX(fp, 250073, 127, 64); + } +} void ftPr_SpecialAirNChargeRelease_IASA(HSD_GObj* arg0) {} @@ -238,9 +756,129 @@ void ftPr_SpecialNFull_Phys(Fighter_GObj* gobj) ftPr_SpecialNStart_Phys(gobj); } -/// #ftPr_SpecialNRelease_Phys +void ftPr_SpecialNRelease_Phys(HSD_GObj* gobj) +{ + Fighter* fp = GET_FIGHTER(gobj); + ftPurinAttributes* da = fp->dat_attrs; + f32 slope = fp->coll_data.floor.normal.x; + f32 base_vel = fp->mv.pr.specialn.x34.x * + (da->xC0 * (fp->mv.pr.specialn.x2C - da->xB8)); + { + f32 influence = da->xC8 * (base_vel * NEGABS(slope)); + if (slope > 0.0f) { + if (fp->mv.pr.specialn.x1C > 0.0f) { + fp->gr_vel = base_vel + influence; + } else { + fp->gr_vel = base_vel + influence; + } + } else if (fp->mv.pr.specialn.x1C > 0.0f) { + fp->gr_vel = base_vel - influence; + } else { + fp->gr_vel = base_vel - influence; + } + } + { + f32 max_vel = da->x4C; + if (NEGABS(fp->gr_vel) > max_vel) { + if (fp->gr_vel < 0.0f) { + max_vel = -max_vel; + } + fp->gr_vel = max_vel; + } + } + { + f32 max_vel = da->x50; + if (NEGABS(fp->gr_vel) > max_vel) { + if (fp->gr_vel < 0.0f) { + max_vel = -max_vel; + } + fp->gr_vel = max_vel; + } + } + fp->mv.pr.specialn.x18 = NEGABS(fp->gr_vel); + fp->x74_anim_vel.y = 0; + fp->self_vel.y = 0; + ftCommon_ApplyGroundMovement(gobj); + fp->mv.pr.specialn.x2C -= da->xB4; + if (fp->mv.pr.specialn.x2C < da->xB8) { + ftPr_SpecialS_8013DA24(gobj, false, 0x40012, 0); + } +} -/// #ftPr_SpecialNTurn_Phys +void ftPr_SpecialNTurn_Phys(HSD_GObj* gobj) +{ + /// @todo Named flags. + static u32 const mf1 = (1 << 4) | (1 << 18) | (1 << 25); + static u32 const mf2 = (1 << 1) | (1 << 4) | (1 << 18) | (1 << 25); + Fighter* fp = GET_FIGHTER(gobj); + ftPurinAttributes* da = fp->dat_attrs; + f32 scale = da->xC4 * mpLib_800569EC(fp->coll_data.floor.flags); + f32 slope = fp->coll_data.floor.normal.x; + { + f32 x1C = fp->mv.pr.specialn.x1C; + f32 influence = da->xC8 * (x1C * NEGABS(slope)); + if (slope > 0.0f) { + if (x1C > 0.0f) { + fp->gr_vel += scale * (x1C + influence); + } else { + fp->gr_vel += scale * (x1C + influence); + } + } else if (x1C > 0.0f) { + fp->gr_vel += scale * (x1C - influence); + } else { + fp->gr_vel += scale * (x1C - influence); + } + } + fp->x74_anim_vel.y = 0; + fp->self_vel.y = 0; + ftCommon_ApplyGroundMovement(gobj); + { + f32 x10 = fp->mv.pr.specialn.x10; + if (x10 > 0.0f) { + f32 vel = fp->gr_vel; + if (vel < 0.0f) { + if (NEGABS(vel) >= NEGABS(x10 * da->xD0)) { + fp->x21EC = ftPr_SpecialS_8013D8B0; + Fighter_ChangeMotionState(gobj, ftPr_MS_SpecialNRelease, + mf1, fp->cur_anim_frame, 0, 0, + NULL); + setupPurinCallbacks(gobj); + { + f32 facing = fp->mv.pr.specialn.facing_dir; + if (facing != 0.0f) { + fp->facing_dir = facing; + fp->mv.pr.specialn.x34.x = facing; + } + } + fp->mv.pr.specialn.facing_dir = 0; + fp->mv.pr.specialn.xC = 0; + } + } + } else { + f32 vel = fp->gr_vel; + if (vel > 0.0f) { + if (NEGABS(vel) >= NEGABS(x10 * da->xD0)) { + fp->x21EC = ftPr_SpecialS_8013D8B0; + Fighter_ChangeMotionState(gobj, ftPr_MS_SpecialNRelease, + mf2, fp->cur_anim_frame, 0, 0, + NULL); + setupPurinCallbacks(gobj); + { + f32 facing = fp->mv.pr.specialn.facing_dir; + if (facing != 0.0f) { + fp->facing_dir = facing; + fp->mv.pr.specialn.x34.x = facing; + } + } + fp->mv.pr.specialn.facing_dir = 0; + fp->mv.pr.specialn.xC = 0; + } + } + } + } + ftPartSetRotY(fp, FtPart_TopN, M_PI_2); + normalizeAndSetRollAngle(gobj); +} void ftPr_SpecialNEnd_Phys(Fighter_GObj* gobj) { @@ -251,11 +889,8 @@ void ftPr_SpecialNEnd_Phys(Fighter_GObj* gobj) void ftPr_SpecialAirNStart_Phys(HSD_GObj* gobj) { - Fighter* fp; - ftPurinAttributes* da; - - fp = gobj->user_data; - da = fp->dat_attrs; + Fighter* fp = GET_FIGHTER(gobj); + ftPurinAttributes* da = fp->dat_attrs; ftCommon_Fall(fp, da->x3C, da->x40); } @@ -268,17 +903,70 @@ void ftPr_SpecialAirNChargeLoop_Phys(HSD_GObj* gobj) void ftPr_SpecialAirNChargeFull_Phys(HSD_GObj* gobj) { - Fighter* fp; - ftPurinAttributes* da; - - fp = gobj->user_data; - da = fp->dat_attrs; + Fighter* fp = GET_FIGHTER(gobj); + ftPurinAttributes* da = fp->dat_attrs; ftCommon_Fall(fp, da->x3C, da->x40); } -/// #ftPr_SpecialAirNChargeRelease_Phys +void ftPr_SpecialAirNChargeRelease_Phys(HSD_GObj* gobj) +{ + Fighter* fp = GET_FIGHTER(gobj); + ftPurinAttributes* da = fp->dat_attrs; + PAD_STACK(4 * 4); + fp->self_vel.x = fp->mv.pr.specialn.x34.x * + (da->xC0 * (fp->mv.pr.specialn.x2C - da->xB8)); + { + f32 decel; + if (fp->self_vel.x > 0.0f) { + decel = da->x58; + } else { + decel = -da->x58; + } + fp->self_vel.x -= decel; + } + { + f32 vel = fp->self_vel.x; + f32 min_vel = da->x5C; + if (NEGABS(vel) < min_vel) { + if (vel < 0.0f) { + min_vel = -min_vel; + } + fp->self_vel.x = min_vel; + } + } + fp->mv.pr.specialn.x18 = NEGABS(fp->self_vel.x); + ftCommon_Fall(fp, da->x3C, da->x40); + fp->mv.pr.specialn.x2C -= da->xB4; + if (fp->mv.pr.specialn.x2C < da->xB8) { + ftPr_SpecialS_8013DA24(gobj, true, 0x40012, 0); + } +} -/// #ftPr_SpecialAirNStartTurn_Phys +void ftPr_SpecialAirNStartTurn_Phys(HSD_GObj* gobj) +{ + Fighter* fp = GET_FIGHTER(gobj); + ftPurinAttributes* da = fp->dat_attrs; + f32 var_f1; + if (fp->self_vel.x > 0.0f) { + var_f1 = da->x58; + } else { + var_f1 = -da->x58; + } + fp->self_vel.x -= var_f1; + { + f32 vel = fp->self_vel.x; + f32 min_vel = da->x5C; + if (NEGABS(vel) < min_vel) { + if (vel < 0.0f) { + min_vel = -min_vel; + } + fp->self_vel.x = min_vel; + } + } + ftCommon_Fall(fp, da->x3C, da->x40); + ftPartSetRotY(fp, FtPart_TopN, M_PI_2); + normalizeAndSetRollAngle(gobj); +} void ftPr_SpecialAirNEnd_Phys(HSD_GObj* gobj) { @@ -329,13 +1017,66 @@ void ftPr_SpecialNStart_Coll(HSD_GObj* gobj) } } -/// #ftPr_SpecialNLoop_Coll +void ftPr_SpecialNLoop_Coll(HSD_GObj* gobj) +{ + /// @todo Named flags. + static u32 const mf = + (1 << 1) | (1 << 4) | (1 << 7) | (1 << 12) | (1 << 18); + Fighter* fp = GET_FIGHTER(gobj); + if (ft_80082708(gobj) == GA_Ground) { + ftCommon_8007D5D4(fp); + Fighter_ChangeMotionState(gobj, ftPr_MS_SpecialAirNChargeLoop, mf, + fp->cur_anim_frame, 0, 0, NULL); + setupPurinCallbacks(gobj); + ftPartSetRotY(fp, FtPart_TopN, M_PI_2); + normalizeAndSetRollAngle(gobj); + } +} -/// #ftPr_SpecialNFull_Coll +void ftPr_SpecialNFull_Coll(HSD_GObj* gobj) +{ + /// @todo Named flags. + static u32 const mf = + (1 << 1) | (1 << 4) | (1 << 7) | (1 << 12) | (1 << 18); + Fighter* fp = GET_FIGHTER(gobj); + if (ft_80082708(gobj) == GA_Ground) { + ftCommon_8007D5D4(fp); + Fighter_ChangeMotionState(gobj, ftPr_MS_SpecialAirNChargeFull, mf, + fp->cur_anim_frame, 0, 0, NULL); + setupPurinCallbacks(gobj); + ftPartSetRotY(fp, FtPart_TopN, M_PI_2); + normalizeAndSetRollAngle(gobj); + } +} -/// #ftPr_SpecialNRelease_Coll +/// #ftPr_SpecialNRelease_Coll(HSD_GObj* gobj) -/// #ftPr_SpecialNTurn_Coll +void ftPr_SpecialNTurn_Coll(HSD_GObj* gobj) +{ + /// @todo Named flags. + static u32 const mf = (1 << 1) | (1 << 4) | (1 << 7) | (1 << 12) | + (1 << 14) | (1 << 18) | (1 << 19) | (1 << 22) | + (1 << 26) | (1 << 27); + Fighter* fp = GET_FIGHTER(gobj); + f32 abs_vel = fp->gr_vel; + ftPurinAttributes* da = fp->dat_attrs; + bool coll; + PAD_STACK(8); + if (abs_vel < 0.0f) { + abs_vel = -abs_vel; + } + if (abs_vel > da->x74) { + coll = ft_80082888(gobj, &ftPr_Init_803D0610); + } else { + coll = ft_80082978(gobj, &ftPr_Init_803D0610); + } + if (!coll) { + ftCommon_8007D5D4(fp); + Fighter_ChangeMotionState(gobj, ftPr_MS_SpecialAirNStartTurn, mf, + fp->cur_anim_frame, 0, 0, NULL); + setupPurinCallbacks(gobj); + } +} void ftPr_SpecialNEnd_Coll(Fighter_GObj* gobj) { @@ -350,15 +1091,82 @@ void ftPr_SpecialNEnd_Coll(Fighter_GObj* gobj) } } -/// #ftPr_SpecialAirNStart_Coll +void ftPr_SpecialAirNStart_Coll(HSD_GObj* gobj) +{ + /// @todo Named flags. + static u32 const mf = (1 << 1) | (1 << 4) | (1 << 7) | (1 << 12) | + (1 << 14) | (1 << 18) | (1 << 19) | (1 << 22) | + (1 << 26) | (1 << 27); + Fighter* fp = GET_FIGHTER(gobj); -/// #ftPr_SpecialAirNChargeLoop_Coll + if (ft_80081D0C(gobj) != GA_Ground) { + ftCommon_8007D7FC(fp); + { + int msid; + if (fp->mv.pr.specialn.x34.x == 1) { + msid = ftPr_MS_SpecialNStartR; + } else { + msid = ftPr_MS_SpecialNStartL; + } + Fighter_ChangeMotionState(gobj, msid, mf, fp->cur_anim_frame, 1, 0, + NULL); + } + setupPurinCallbacks(gobj); + } +} + +void ftPr_SpecialAirNChargeLoop_Coll(HSD_GObj* gobj) +{ + /// @todo Named flags. + static u32 const mf = + (1 << 1) | (1 << 4) | (1 << 7) | (1 << 12) | (1 << 18); + Fighter* fp = GET_FIGHTER(gobj); + if (ft_80081D0C(gobj) != GA_Ground) { + ftCommon_8007D7FC(fp); + Fighter_ChangeMotionState(gobj, ftPr_MS_SpecialNLoop, mf, + fp->cur_anim_frame, 0, 0, NULL); + setupPurinCallbacks(gobj); + ftPartSetRotY(fp, FtPart_TopN, M_PI_2); + normalizeAndSetRollAngle(gobj); + } +} -/// #ftPr_SpecialAirNChargeFull_Coll +void ftPr_SpecialAirNChargeFull_Coll(HSD_GObj* gobj) +{ + /// @todo Named flags. + static u32 const mf = + (1 << 1) | (1 << 4) | (1 << 7) | (1 << 12) | (1 << 18); + Fighter* fp = GET_FIGHTER(gobj); + if (ft_80081D0C(gobj) != GA_Ground) { + ftCommon_8007D7FC(fp); + Fighter_ChangeMotionState(gobj, ftPr_MS_SpecialNFull, mf, + fp->cur_anim_frame, 0, 0, NULL); + setupPurinCallbacks(gobj); + ftPartSetRotY(fp, FtPart_TopN, M_PI_2); + normalizeAndSetRollAngle(gobj); + } +} -/// #ftPr_SpecialAirNChargeRelease_Coll +/// #ftPr_SpecialAirNChargeRelease_Coll(HSD_GObj* gobj) -/// #ftPr_SpecialAirNStartTurn_Coll +void ftPr_SpecialAirNStartTurn_Coll(HSD_GObj* gobj) +{ + /// @todo Named flags. + static u32 const mf = (1 << 1) | (1 << 4) | (1 << 7) | (1 << 12) | + (1 << 14) | (1 << 18) | (1 << 19) | (1 << 22) | + (1 << 26) | (1 << 27); + Fighter* fp = GET_FIGHTER(gobj); + PAD_STACK(8); + if (ft_800824A0(gobj, &ftPr_Init_803D0610)) { + ftCommon_8007D7FC(fp); + Fighter_ChangeMotionState(gobj, ftPr_MS_SpecialNTurn, mf, + fp->cur_anim_frame, 0, 0, NULL); + setupPurinCallbacks(gobj); + fp->gr_vel = fp->self_vel.x; + fp->self_vel.z = 0; + fp->self_vel.y = 0; + } +} /// @todo Maybe shared inline with #ftPr_SpecialNEnd_Coll? void ftPr_SpecialAirNEnd_Coll(Fighter_GObj* gobj) @@ -374,6 +1182,35 @@ void ftPr_SpecialAirNEnd_Coll(Fighter_GObj* gobj) } } -/// #ftPr_SpecialNHit_Coll +void ftPr_SpecialNHit_Coll(HSD_GObj* gobj) +{ + Fighter* fp = GET_FIGHTER(gobj); + ftPurinAttributes* da = fp->dat_attrs; + PAD_STACK(8); + if (ft_800824A0(gobj, &ftPr_Init_803D0610)) { + ftPr_SpecialS_8013D658(gobj); + ftCommon_8007D7FC(fp); + if (da->xD8 == 0.0f) { + ft_8008A2BC(gobj); + } else { + ftCo_LandingFallSpecial_Enter(gobj, 0, da->xD8); + } + } +} -/// #ftPr_SpecialN_8014222C +void ftPr_SpecialN_8014222C(HSD_GObj* gobj) +{ + Fighter* fp = GET_FIGHTER(gobj); + PAD_STACK(8); + ftPartSetRotY(fp, FtPart_TopN, M_PI_2 * fp->facing_dir); + fp->self_vel.x = -fp->self_vel.x; + fp->gr_vel = -fp->gr_vel; + fp->xE4_ground_accel_1 = -fp->xE4_ground_accel_1; + fp->mv.pr.specialn.x10 = -fp->mv.pr.specialn.x10; + fp->mv.pr.specialn.x14 = -fp->mv.pr.specialn.x14; + fp->mv.pr.specialn.x18 = -fp->mv.pr.specialn.x18; + fp->mv.pr.specialn.x1C = -fp->mv.pr.specialn.x1C; + fp->mv.pr.specialn.facing_dir = -fp->mv.pr.specialn.facing_dir; + fp->mv.pr.specialn.x34.x = -fp->mv.pr.specialn.x34.x; + fp->mv.pr.specialn.x34.y = -fp->mv.pr.specialn.x34.y; +} diff --git a/src/melee/ft/chara/ftPurin/ftPr_SpecialN.h b/src/melee/ft/chara/ftPurin/ftPr_SpecialN.h index d84b3555e0..ab90337418 100644 --- a/src/melee/ft/chara/ftPurin/ftPr_SpecialN.h +++ b/src/melee/ft/chara/ftPurin/ftPr_SpecialN.h @@ -11,7 +11,7 @@ /* 13DA24 */ void ftPr_SpecialS_8013DA24(HSD_GObj* gobj, bool unk, MotionFlags flags, float anim_start); /* 13DC64 */ void ftPr_SpecialS_8013DC64(HSD_GObj* gobj); -/* 13DD54 */ void ftPr_SpecialS_8013DD54(HSD_GObj* gobj); +/* 13DD54 */ void ftPr_SpecialS_8013DD54(HSD_GObj* gobj, bool arg1); /* 13DEA8 */ void ftPr_SpecialN_Enter(HSD_GObj* gobj); /* 13DF60 */ void ftPr_SpecialAirN_Enter(HSD_GObj* gobj); /* 13E014 */ void ftPr_SpecialNStart_Anim(HSD_GObj* gobj); diff --git a/src/melee/ft/chara/ftPurin/types.h b/src/melee/ft/chara/ftPurin/types.h index a6b426b719..4521aa31f4 100644 --- a/src/melee/ft/chara/ftPurin/types.h +++ b/src/melee/ft/chara/ftPurin/types.h @@ -23,13 +23,18 @@ typedef union ftPurin_MotionVars { } specialhi; struct ftPurin_SpecialNVars { /* fp+2340 */ int x0; - /* fp+2344 */ UNK_T x4; - /* fp+2348 */ UNK_T x8; - /* fp+234C */ UNK_T xC; - /* fp+2350 */ u8 _10[0x1C - 0x10]; + /* fp+2344 */ int x4; + /* fp+2348 */ int x8; + /* fp+234C */ int xC; + /* fp+2350 */ float x10; + /* fp+2354 */ float x14; + /* fp+2358 */ float x18; /* fp+235C */ float x1C; /* fp+2360 */ float facing_dir; - /* fp+2364 */ u8 _24[0x34 - 0x24]; + /* fp+2364 */ int x24; + /* fp+2368 */ int x28; + /* fp+236C */ int x2C; + /* fp+2370 */ int x30; /* fp+2374 */ Vec3 x34; } specialn; } ftPurin_MotionVars; @@ -53,9 +58,41 @@ typedef struct _ftPurinAttributes { float x3C; float x40; float x44; - u8 _48[0x88 - 0x48]; + u8 _48[0x4C - 0x48]; + float x4C; + float x50; + float x54; + float x58; + float x5C; + u8 _60[0x68 - 0x60]; + float x68; + float x6C; + s32 x70; + float x74; + float x78; + float x7C; + float x80; + float x84; Vec2 specialn_vel; - u8 _90[0xDC - 0x90]; + float x90; + float x94; + float x98; + s32 x9C; + float xA0; + float xA4; + float xA8; + float xAC; + u8 _B0[0xB4 - 0xB0]; + float xB4; + float xB8; + float xBC; + float xC0; + float xC4; + float xC8; + float xCC; + float xD0; + float xD4; + float xD8; float xDC; float xE0; float xE4;