obj_pumpkin dbg equiv (#3036)

This commit is contained in:
YunataSavior 2026-01-12 12:18:58 -08:00 committed by GitHub
parent a2e8347e8d
commit 53aaed17c0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 15 additions and 11 deletions

View File

@ -5,14 +5,17 @@
#define ADD_ANGLE(x, y) ((x) += (s16)(y))
#define SUB_ANGLE(x, y) ((x) -= (s16)(y))
#define MULT_ANGLE(x, y) ((x) *= (s16)(y))
// There are some angles that weren't sign-extended until the shield version
#if !PLATFORM_SHIELD
#define ADD_ANGLE_2(x, y) ((x) += (y))
#define SUB_ANGLE_2(x, y) ((x) -= (y))
#define MULT_ANGLE_2(x, y) ((x) *= (y))
#else
#define ADD_ANGLE_2(x, y) ADD_ANGLE(x, y)
#define SUB_ANGLE_2(x, y) SUB_ANGLE(x, y)
#define MULT_ANGLE_2(x, y) MULT_ANGLE(x, y)
#endif
#define DEG2S_CONSTANT (0x8000 / 180.0f)

View File

@ -802,7 +802,7 @@ inline void fopAcM_OnCarryType(fopAc_ac_c* i_actor, fopAcM_CARRY param_2) {
}
inline void fopAcM_OffCarryType(fopAc_ac_c* i_actor, fopAcM_CARRY param_2) {
i_actor->carryType &= ~param_2;
UNSET_FLAG(i_actor->carryType, param_2, u8);
}
enum fopAcM_FOOD {

View File

@ -140,9 +140,9 @@ static const float INF = 2000000000.0f;
// potential fakematch?
#if PLATFORM_SHIELD
#define UNSET_FLAG(var, flag) (var) &= (u16)~(flag)
#define UNSET_FLAG(var, flag, type) (var) &= (type)~(flag)
#else
#define UNSET_FLAG(var, flag) (var) &= ~(flag)
#define UNSET_FLAG(var, flag, type) (var) &= ~(flag)
#endif
#endif

View File

@ -769,7 +769,7 @@ static void ride_off(e_rd_class* i_this) {
e_wb_class* bullbo = (e_wb_class*)fopAcM_SearchByID(i_this->mWbActorID);
if (bullbo != NULL) {
UNSET_FLAG(bullbo->mStatusFlags, i_this->field_0x9be);
UNSET_FLAG(bullbo->mStatusFlags, i_this->field_0x9be, u16);
i_this->field_0x9be = 0;
if (bullbo->mActionID != 22 && bullbo->mActionID != 23 && bullbo->mActionID != 24) {
@ -2677,7 +2677,7 @@ static void e_rd_s_damage(e_rd_class* i_this) {
if (i_this->field_0x9be != 0) {
e_wb_class* bullbo = (e_wb_class*)fopAcM_SearchByID(i_this->mWbActorID);
if (bullbo != NULL) {
UNSET_FLAG(bullbo->mStatusFlags, i_this->field_0x9be);
UNSET_FLAG(bullbo->mStatusFlags, i_this->field_0x9be, u16);
}
i_this->field_0x9be = 0;
@ -2777,7 +2777,7 @@ static void rd_disappear(e_rd_class* i_this) {
if (i_this->field_0x9be != 0) {
e_wb_class* bullbo = (e_wb_class*)fopAcM_SearchByID(i_this->mWbActorID);
if (bullbo != NULL) {
UNSET_FLAG(bullbo->mStatusFlags, i_this->field_0x9be);
UNSET_FLAG(bullbo->mStatusFlags, i_this->field_0x9be, u16);
if (bullbo->mActionID == 1) {
bullbo->mActionID = 0;
}
@ -3908,7 +3908,7 @@ static void e_rd_ikki_end(e_rd_class* i_this) {
i_this->field_0x9bc = 0;
if (daPy_getPlayerActorClass()->checkHorseRide() && bullbo != NULL) {
UNSET_FLAG(bullbo->mStatusFlags, i_this->field_0x9be);
UNSET_FLAG(bullbo->mStatusFlags, i_this->field_0x9be, u16);
i_this->field_0x9be = 0;
bullbo->mActionID = 16;
bullbo->mActionMode = 0;
@ -3976,7 +3976,7 @@ static void e_rd_ikki2_end(e_rd_class* i_this) {
i_this->field_0x9bc = 0;
if (bullbo != NULL) {
UNSET_FLAG(bullbo->mStatusFlags, i_this->field_0x9be);
UNSET_FLAG(bullbo->mStatusFlags, i_this->field_0x9be, u16);
i_this->field_0x9be = 0;
}

View File

@ -243,6 +243,7 @@ int daObj_Pumpkin_c::Delete() {
}
int daObj_Pumpkin_c::Execute() {
int sp_0x30 = 0;
f32 var_f29 = mpHIO->m.floating_offset;
f32 f_scale = mpHIO->m.scale;
s16 sp_0x14 = 0;
@ -278,7 +279,7 @@ int daObj_Pumpkin_c::Execute() {
mAcchCir.SetWallR(mpHIO->m.width * mPumpkinScale);
mAcchCir.SetWallH(mpHIO->m.knee_length * mPumpkinScale);
gravity = mpHIO->m.gravity * mPumpkinScale;
int sp_0x30 = 0;
sp_0x30 = 0;
if (fopAcM_checkCarryNow(this) || fopAcM_checkHawkCarryNow(this) || field_0xbb3) {
sp_0x30 = 1;
}
@ -449,8 +450,8 @@ int daObj_Pumpkin_c::Execute() {
current.angle.y = cM_atan2s(sp_0x4C.x, sp_0x4C.z);
}
sp_0x10 *= streamPower;
cLib_chaseAngleS(&field_0xB38.y, (field_0xB38.y < 0) ? -sp_0x10 : sp_0x10, 0x10);
MULT_ANGLE_2(sp_0x10, streamPower);
cLib_chaseAngleS(&field_0xB38.y, (field_0xB38.y < 0) ? sp_0x10*-1 : sp_0x10, 0x10);
if (field_0xBAB) {
cLib_addCalc2(&speedF, streamPower * 1.55f, 0.15f, 1.0f);
} else {