mirror of https://github.com/zeldaret/oot.git
Name `HIT_BACKLASH_` and `HIT_SPECIAL_EFFECT_` values (#2639)
* Name HIT_BACKLASH_ and HIT_SPECIAL_EFFECT_ values * SHOCK -> ELECTRIC
This commit is contained in:
parent
04a92708cf
commit
ad7ef14b5d
|
@ -81,11 +81,11 @@ typedef struct ColliderInitToActor {
|
|||
} 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
|
||||
HIT_SPECIAL_EFFECT_NONE,
|
||||
HIT_SPECIAL_EFFECT_FIRE,
|
||||
HIT_SPECIAL_EFFECT_ICE,
|
||||
HIT_SPECIAL_EFFECT_ELECTRIC,
|
||||
HIT_SPECIAL_EFFECT_KNOCKBACK
|
||||
} HitSpecialEffect;
|
||||
|
||||
typedef struct ColliderElementDamageInfoAT {
|
||||
|
@ -95,8 +95,8 @@ typedef struct ColliderElementDamageInfoAT {
|
|||
} ColliderElementDamageInfoAT; // size = 0x08
|
||||
|
||||
typedef enum HitBacklash {
|
||||
HIT_BACKLASH_0,
|
||||
HIT_BACKLASH_1 // Shock?
|
||||
HIT_BACKLASH_NONE,
|
||||
HIT_BACKLASH_ELECTRIC
|
||||
} HitBacklash;
|
||||
|
||||
typedef struct ColliderElementDamageInfoAC {
|
||||
|
|
|
@ -3015,8 +3015,8 @@ void CollisionCheck_InitInfo(CollisionCheckInfo* info) {
|
|||
void CollisionCheck_ResetDamage(CollisionCheckInfo* info) {
|
||||
info->damage = 0;
|
||||
info->damageReaction = 0;
|
||||
info->atHitBacklash = HIT_BACKLASH_0;
|
||||
info->acHitSpecialEffect = HIT_SPECIAL_EFFECT_0;
|
||||
info->atHitBacklash = HIT_BACKLASH_NONE;
|
||||
info->acHitSpecialEffect = HIT_SPECIAL_EFFECT_NONE;
|
||||
info->displacement.x = info->displacement.y = info->displacement.z = 0.0f;
|
||||
}
|
||||
|
||||
|
|
|
@ -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.hitSpecialEffect = HIT_SPECIAL_EFFECT_1;
|
||||
this->collider.elem.atDmgInfo.hitSpecialEffect = HIT_SPECIAL_EFFECT_FIRE;
|
||||
} 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) {
|
||||
|
|
|
@ -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.hitSpecialEffect = HIT_SPECIAL_EFFECT_1;
|
||||
this->collider.elements[0].base.atDmgInfo.hitSpecialEffect = HIT_SPECIAL_EFFECT_FIRE;
|
||||
EnBb_SetupRed(play, this);
|
||||
break;
|
||||
case ENBB_WHITE:
|
||||
|
|
|
@ -157,7 +157,7 @@ void EnBili_Destroy(Actor* thisx, PlayState* play) {
|
|||
|
||||
void EnBili_SetupFloatIdle(EnBili* this) {
|
||||
this->actor.speed = 0.7f;
|
||||
this->collider.elem.acDmgInfo.hitBacklash = HIT_BACKLASH_1;
|
||||
this->collider.elem.acDmgInfo.hitBacklash = HIT_BACKLASH_ELECTRIC;
|
||||
this->timer = 32;
|
||||
this->actor.home.pos.y = this->actor.world.pos.y;
|
||||
this->actor.gravity = 0.0f;
|
||||
|
@ -253,7 +253,7 @@ void EnBili_SetupDie(EnBili* this) {
|
|||
*/
|
||||
void EnBili_SetupStunned(EnBili* this) {
|
||||
this->timer = 80;
|
||||
this->collider.elem.acDmgInfo.hitBacklash = HIT_BACKLASH_0;
|
||||
this->collider.elem.acDmgInfo.hitBacklash = HIT_BACKLASH_NONE;
|
||||
this->actor.gravity = -1.0f;
|
||||
this->actor.speed = 0.0f;
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 150, COLORFILTER_BUFFLAG_XLU, 80);
|
||||
|
|
|
@ -110,7 +110,7 @@ u32 func_809CBCBC(EnBubble* this) {
|
|||
ColliderElement* elem = &this->colliderJntSph.elements[0].base;
|
||||
|
||||
elem->atDmgInfo.dmgFlags = DMG_EXPLOSIVE;
|
||||
elem->atDmgInfo.hitSpecialEffect = HIT_SPECIAL_EFFECT_0;
|
||||
elem->atDmgInfo.hitSpecialEffect = HIT_SPECIAL_EFFECT_NONE;
|
||||
elem->atDmgInfo.damage = 4;
|
||||
elem->atElemFlags = ATELEM_ON;
|
||||
this->actor.velocity.y = 0.0f;
|
||||
|
|
|
@ -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.hitSpecialEffect = HIT_SPECIAL_EFFECT_0;
|
||||
this->collider1.elem.atDmgInfo.hitSpecialEffect = HIT_SPECIAL_EFFECT_NONE;
|
||||
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.hitSpecialEffect = HIT_SPECIAL_EFFECT_1;
|
||||
this->collider1.elem.atDmgInfo.hitSpecialEffect = HIT_SPECIAL_EFFECT_FIRE;
|
||||
}
|
||||
|
||||
this->unk_234 = Actor_TestFloorInDirection(thisx, play, 50.0f, thisx->world.rot.y);
|
||||
|
|
|
@ -134,7 +134,7 @@ static InitChainEntry sInitChain[] = {
|
|||
|
||||
void EnFirefly_Extinguish(EnFirefly* this) {
|
||||
this->actor.params += 2;
|
||||
this->collider.elements[0].base.atDmgInfo.hitSpecialEffect = HIT_SPECIAL_EFFECT_0;
|
||||
this->collider.elements[0].base.atDmgInfo.hitSpecialEffect = HIT_SPECIAL_EFFECT_NONE;
|
||||
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.hitSpecialEffect = HIT_SPECIAL_EFFECT_1;
|
||||
this->collider.elements[0].base.atDmgInfo.hitSpecialEffect = HIT_SPECIAL_EFFECT_FIRE;
|
||||
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.hitSpecialEffect = HIT_SPECIAL_EFFECT_2;
|
||||
this->collider.elements[0].base.atDmgInfo.hitSpecialEffect = HIT_SPECIAL_EFFECT_ICE;
|
||||
this->actor.naviEnemyId = NAVI_ENEMY_ICE_KEESE;
|
||||
} else {
|
||||
this->collider.elements[0].base.atDmgInfo.hitSpecialEffect = HIT_SPECIAL_EFFECT_0;
|
||||
this->collider.elements[0].base.atDmgInfo.hitSpecialEffect = HIT_SPECIAL_EFFECT_NONE;
|
||||
this->actor.naviEnemyId = NAVI_ENEMY_KEESE;
|
||||
}
|
||||
|
||||
|
|
|
@ -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.hitSpecialEffect = HIT_SPECIAL_EFFECT_4;
|
||||
this->collider.elem.atDmgInfo.hitSpecialEffect = HIT_SPECIAL_EFFECT_KNOCKBACK;
|
||||
this->collider.elem.atDmgInfo.damage = 16;
|
||||
Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_ENEMY);
|
||||
}
|
||||
|
|
|
@ -272,7 +272,7 @@ void EnVali_SetupStunned(EnVali* this) {
|
|||
this->timer = 80;
|
||||
this->actor.velocity.y = 0.0f;
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_XLU, 80);
|
||||
this->bodyCollider.elem.acDmgInfo.hitBacklash = HIT_BACKLASH_0;
|
||||
this->bodyCollider.elem.acDmgInfo.hitBacklash = HIT_BACKLASH_NONE;
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_GOMA_JR_FREEZE);
|
||||
this->actor.velocity.y = 1.0f;
|
||||
this->actionFunc = EnVali_Stunned;
|
||||
|
@ -462,7 +462,7 @@ void EnVali_Stunned(EnVali* this, PlayState* play) {
|
|||
}
|
||||
|
||||
if (this->timer == 0) {
|
||||
this->bodyCollider.elem.acDmgInfo.hitBacklash = HIT_BACKLASH_1;
|
||||
this->bodyCollider.elem.acDmgInfo.hitBacklash = HIT_BACKLASH_ELECTRIC;
|
||||
EnVali_SetupFloatIdle(this);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4798,7 +4798,7 @@ void func_8083821C(Player* this) {
|
|||
}
|
||||
|
||||
void func_80838280(Player* this) {
|
||||
if (this->actor.colChkInfo.acHitSpecialEffect == HIT_SPECIAL_EFFECT_1) {
|
||||
if (this->actor.colChkInfo.acHitSpecialEffect == HIT_SPECIAL_EFFECT_FIRE) {
|
||||
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.hitSpecialEffect == HIT_SPECIAL_EFFECT_1)) {
|
||||
if (sp64 && (this->shieldQuad.elem.acHitElem->atDmgInfo.hitSpecialEffect == HIT_SPECIAL_EFFECT_FIRE)) {
|
||||
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.acHitSpecialEffect == HIT_SPECIAL_EFFECT_2) {
|
||||
} else if (this->actor.colChkInfo.acHitSpecialEffect == HIT_SPECIAL_EFFECT_ICE) {
|
||||
sp4C = PLAYER_HIT_RESPONSE_ICE_TRAP;
|
||||
} else if (this->actor.colChkInfo.acHitSpecialEffect == HIT_SPECIAL_EFFECT_3) {
|
||||
} else if (this->actor.colChkInfo.acHitSpecialEffect == HIT_SPECIAL_EFFECT_ELECTRIC) {
|
||||
sp4C = PLAYER_HIT_RESPONSE_ELECTRIC_SHOCK;
|
||||
} else if (this->actor.colChkInfo.acHitSpecialEffect == HIT_SPECIAL_EFFECT_4) {
|
||||
} else if (this->actor.colChkInfo.acHitSpecialEffect == HIT_SPECIAL_EFFECT_KNOCKBACK) {
|
||||
sp4C = PLAYER_HIT_RESPONSE_KNOCKBACK_LARGE;
|
||||
} else {
|
||||
func_80838280(this);
|
||||
|
@ -9145,7 +9145,7 @@ s32 func_80842DF4(PlayState* play, Player* this) {
|
|||
if ((func_80842AC4(play, this) == 0) && (this->heldItemAction != PLAYER_IA_HAMMER)) {
|
||||
func_80842B7C(play, this);
|
||||
|
||||
if (this->actor.colChkInfo.atHitBacklash == HIT_BACKLASH_1) {
|
||||
if (this->actor.colChkInfo.atHitBacklash == HIT_BACKLASH_ELECTRIC) {
|
||||
this->actor.colChkInfo.damage = 8;
|
||||
func_80837C0C(play, this, PLAYER_HIT_RESPONSE_ELECTRIC_SHOCK, 0.0f, 0.0f, this->actor.shape.rot.y,
|
||||
20);
|
||||
|
|
Loading…
Reference in New Issue