Rename AT `effect` to `hitSpecialEffect`

This commit is contained in:
Dragorn421 2025-06-17 11:43:45 +02:00
parent e8c59385bc
commit 6598dde943
No known key found for this signature in database
GPG Key ID: 381AEBAF3D429335
9 changed files with 28 additions and 20 deletions

View File

@ -80,9 +80,17 @@ typedef struct ColliderInitToActor {
/* 0x07 */ u8 shape;
} ColliderInitToActor; // size = 0x08
typedef enum HitSpecialEffect {
HIT_SPECIAL_EFFECT_0, // None
HIT_SPECIAL_EFFECT_1, // Fire
HIT_SPECIAL_EFFECT_2, // Ice
HIT_SPECIAL_EFFECT_3,
HIT_SPECIAL_EFFECT_4
} HitSpecialEffect;
typedef struct ColliderElementDamageInfoAT {
/* 0x00 */ u32 dmgFlags; // Damage types dealt by this collider element as AT.
/* 0x04 */ u8 effect; // Damage Effect (Knockback, Fire, etc.)
/* 0x04 */ u8 hitSpecialEffect; // The hit special effect applied to any actor attacked by this AT collider.
/* 0x05 */ u8 damage; // Damage
} ColliderElementDamageInfoAT; // size = 0x08
@ -471,7 +479,7 @@ typedef struct CollisionCheckInfo {
/* 0x18 */ u8 damage; // Amount to decrement health by
/* 0x19 */ u8 damageReaction; // Stores what reaction should occur after being hit
/* 0x1A */ u8 atHitBacklash; // Stores the hit backlash type received from attacking an AC collider
/* 0x1B */ u8 acHitEffect; // Stores what effect should occur when AC is touched by an AT
/* 0x1B */ u8 acHitSpecialEffect; // Stores the hit special effect received from being attacked by an AT collider
} CollisionCheckInfo; // size = 0x1C
DamageTable* DamageTable_Get(s32 index);

View File

@ -172,7 +172,7 @@ s32 Collider_DestroyElementDamageInfoAT(PlayState* play, ColliderElementDamageIn
s32 Collider_SetElementDamageInfoAT(PlayState* play, ColliderElementDamageInfoAT* dest,
ColliderElementDamageInfoAT* src) {
dest->dmgFlags = src->dmgFlags;
dest->effect = src->effect;
dest->hitSpecialEffect = src->hitSpecialEffect;
dest->damage = src->damage;
return true;
}
@ -1735,7 +1735,7 @@ s32 CollisionCheck_SetATvsAC(PlayState* play, Collider* atCol, ColliderElement*
acElem->acHitElem = atElem;
acElem->acElemFlags |= ACELEM_HIT;
if (acCol->actor != NULL) {
acCol->actor->colChkInfo.acHitEffect = atElem->atDmgInfo.effect;
acCol->actor->colChkInfo.acHitSpecialEffect = atElem->atDmgInfo.hitSpecialEffect;
}
acElem->acDmgInfo.hitPos.x = hitPos->x;
acElem->acDmgInfo.hitPos.y = hitPos->y;
@ -3016,7 +3016,7 @@ void CollisionCheck_ResetDamage(CollisionCheckInfo* info) {
info->damage = 0;
info->damageReaction = 0;
info->atHitBacklash = HIT_BACKLASH_0;
info->acHitEffect = 0;
info->acHitSpecialEffect = HIT_SPECIAL_EFFECT_0;
info->displacement.x = info->displacement.y = info->displacement.z = 0.0f;
}

View File

@ -492,7 +492,7 @@ void BossTw_Init(Actor* thisx, PlayState* play2) {
if (this->actor.params == TW_FIRE_BLAST || this->actor.params == TW_FIRE_BLAST_GROUND) {
this->actionFunc = BossTw_BlastFire;
this->collider.elem.atDmgInfo.effect = 1;
this->collider.elem.atDmgInfo.hitSpecialEffect = HIT_SPECIAL_EFFECT_1;
} else if (this->actor.params == TW_ICE_BLAST || this->actor.params == TW_ICE_BLAST_GROUND) {
this->actionFunc = BossTw_BlastIce;
} else if (this->actor.params >= TW_DEATHBALL_KOTAKE) {

View File

@ -369,7 +369,7 @@ void EnBb_Init(Actor* thisx, PlayState* play) {
thisx->naviEnemyId = NAVI_ENEMY_RED_BUBBLE;
thisx->colChkInfo.damageTable = &sDamageTableRed;
this->flameEnvColor.r = 255;
this->collider.elements[0].base.atDmgInfo.effect = 1;
this->collider.elements[0].base.atDmgInfo.hitSpecialEffect = HIT_SPECIAL_EFFECT_1;
EnBb_SetupRed(play, this);
break;
case ENBB_WHITE:

View File

@ -110,7 +110,7 @@ u32 func_809CBCBC(EnBubble* this) {
ColliderElement* elem = &this->colliderJntSph.elements[0].base;
elem->atDmgInfo.dmgFlags = DMG_EXPLOSIVE;
elem->atDmgInfo.effect = 0;
elem->atDmgInfo.hitSpecialEffect = HIT_SPECIAL_EFFECT_0;
elem->atDmgInfo.damage = 4;
elem->atElemFlags = ATELEM_ON;
this->actor.velocity.y = 0.0f;

View File

@ -786,7 +786,7 @@ void EnBw_Update(Actor* thisx, PlayState* play2) {
func_8002836C(play, &thisx->world.pos, &velocity, &accel, &sp50, &sp4C, 0x3C, 0, 0x14);
}
if (this->unk_248 <= 0.4f) {
this->collider1.elem.atDmgInfo.effect = 0;
this->collider1.elem.atDmgInfo.hitSpecialEffect = HIT_SPECIAL_EFFECT_0;
if (((play->gameplayFrames & 1) == 0) && (this->unk_220 < 5) && (this->unk_23C == 0)) {
accel.y = -0.1f;
velocity.x = Rand_CenteredFloat(4.0f);
@ -806,7 +806,7 @@ void EnBw_Update(Actor* thisx, PlayState* play2) {
20.0f - (this->unk_248 * 40.0f));
}
} else {
this->collider1.elem.atDmgInfo.effect = 1;
this->collider1.elem.atDmgInfo.hitSpecialEffect = HIT_SPECIAL_EFFECT_1;
}
this->unk_234 = Actor_TestFloorInDirection(thisx, play, 50.0f, thisx->world.rot.y);

View File

@ -134,7 +134,7 @@ static InitChainEntry sInitChain[] = {
void EnFirefly_Extinguish(EnFirefly* this) {
this->actor.params += 2;
this->collider.elements[0].base.atDmgInfo.effect = 0; // None
this->collider.elements[0].base.atDmgInfo.hitSpecialEffect = HIT_SPECIAL_EFFECT_0;
this->auraType = KEESE_AURA_NONE;
this->onFire = false;
this->actor.naviEnemyId = NAVI_ENEMY_KEESE;
@ -146,7 +146,7 @@ void EnFirefly_Ignite(EnFirefly* this) {
} else {
this->actor.params -= 2;
}
this->collider.elements[0].base.atDmgInfo.effect = 1; // Fire
this->collider.elements[0].base.atDmgInfo.hitSpecialEffect = HIT_SPECIAL_EFFECT_1;
this->auraType = KEESE_AURA_FIRE;
this->onFire = true;
this->actor.naviEnemyId = NAVI_ENEMY_FIRE_KEESE;
@ -190,10 +190,10 @@ void EnFirefly_Init(Actor* thisx, PlayState* play) {
}
if (this->actor.params == KEESE_ICE_FLY) {
this->collider.elements[0].base.atDmgInfo.effect = 2; // Ice
this->collider.elements[0].base.atDmgInfo.hitSpecialEffect = HIT_SPECIAL_EFFECT_2;
this->actor.naviEnemyId = NAVI_ENEMY_ICE_KEESE;
} else {
this->collider.elements[0].base.atDmgInfo.effect = 0; // Nothing
this->collider.elements[0].base.atDmgInfo.hitSpecialEffect = HIT_SPECIAL_EFFECT_0;
this->actor.naviEnemyId = NAVI_ENEMY_KEESE;
}

View File

@ -151,7 +151,7 @@ void EnReeba_Init(Actor* thisx, PlayState* play) {
PRINTF(VT_FGCOL(YELLOW) T("☆☆☆☆☆ リーバぼす登場 ☆☆☆☆☆ %f\n", "☆☆☆☆☆ Reeba boss appears ☆☆☆☆☆ %f\n") VT_RST,
this->scale);
this->actor.colChkInfo.health = 20;
this->collider.elem.atDmgInfo.effect = 4;
this->collider.elem.atDmgInfo.hitSpecialEffect = HIT_SPECIAL_EFFECT_4;
this->collider.elem.atDmgInfo.damage = 16;
Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_ENEMY);
}

View File

@ -4798,7 +4798,7 @@ void func_8083821C(Player* this) {
}
void func_80838280(Player* this) {
if (this->actor.colChkInfo.acHitEffect == 1) {
if (this->actor.colChkInfo.acHitSpecialEffect == HIT_SPECIAL_EFFECT_1) {
func_8083821C(this);
}
Player_PlayVoiceSfx(this, NA_SE_VO_LI_FALL_L);
@ -4915,7 +4915,7 @@ s32 func_808382DC(Player* this, PlayState* play) {
}
}
if (sp64 && (this->shieldQuad.elem.acHitElem->atDmgInfo.effect == 1)) {
if (sp64 && (this->shieldQuad.elem.acHitElem->atDmgInfo.hitSpecialEffect == HIT_SPECIAL_EFFECT_1)) {
func_8083819C(this, play);
}
@ -4938,11 +4938,11 @@ s32 func_808382DC(Player* this, PlayState* play) {
if (this->stateFlags1 & PLAYER_STATE1_27) {
sp4C = PLAYER_HIT_RESPONSE_NONE;
} else if (this->actor.colChkInfo.acHitEffect == 2) {
} else if (this->actor.colChkInfo.acHitSpecialEffect == HIT_SPECIAL_EFFECT_2) {
sp4C = PLAYER_HIT_RESPONSE_ICE_TRAP;
} else if (this->actor.colChkInfo.acHitEffect == 3) {
} else if (this->actor.colChkInfo.acHitSpecialEffect == HIT_SPECIAL_EFFECT_3) {
sp4C = PLAYER_HIT_RESPONSE_ELECTRIC_SHOCK;
} else if (this->actor.colChkInfo.acHitEffect == 4) {
} else if (this->actor.colChkInfo.acHitSpecialEffect == HIT_SPECIAL_EFFECT_4) {
sp4C = PLAYER_HIT_RESPONSE_KNOCKBACK_LARGE;
} else {
func_80838280(this);