Skip to content

Commit

Permalink
Pass bodyPartsPos and size into hook
Browse files Browse the repository at this point in the history
  • Loading branch information
Eblo committed Nov 26, 2024
1 parent 5ff6185 commit 6cdf9d7
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
9 changes: 5 additions & 4 deletions mm/2s2h/Enhancements/Masks/FierceDeityAnywhere.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,21 +88,22 @@ void RegisterFierceDeityAnywhere() {
// Only change the call if there is a sword beam collision
if (actor->shape.face & HIT_BY_SWORD_BEAM) {
*should = false;
Vec3f* bodyPartsPos = va_arg(args, Vec3f*);
int bodyPartsCount = va_arg(args, int);
if (actor->id == ACTOR_EN_FIREFLY) { // Keese
EnFirefly* enFireFly = (EnFirefly*)actor;
Actor_DrawDamageEffects(gPlayState, actor, enFireFly->bodyPartsPos, KEESE_BODYPART_MAX,
Actor_DrawDamageEffects(gPlayState, actor, bodyPartsPos, bodyPartsCount,
enFireFly->drawDmgEffScale * actor->scale.y * 200.0f,
enFireFly->drawDmgEffFrozenSteamScale, enFireFly->drawDmgEffAlpha,
enFireFly->drawDmgEffType);
} else if (actor->id == ACTOR_EN_FZ) { // Freezard
EnFz* enFz = (EnFz*)actor;
Vec3f* bodyPartsPos = va_arg(args, Vec3f*);
Actor_DrawDamageEffects(gPlayState, actor, bodyPartsPos, ARRAY_COUNT(bodyPartsPos),
Actor_DrawDamageEffects(gPlayState, actor, bodyPartsPos, bodyPartsCount,
enFz->drawDmgEffScale * 4.0f, 0.5f, enFz->drawDmgEffAlpha,
ACTOR_DRAW_DMGEFF_LIGHT_ORBS);
} else if (actor->id == ACTOR_EN_NEO_REEBA) { // Leever
EnNeoReeba* enNeoReeba = (EnNeoReeba*)actor;
Actor_DrawDamageEffects(gPlayState, actor, enNeoReeba->bodyPartsPos, EN_NEO_REEBA_BODYPART_MAX,
Actor_DrawDamageEffects(gPlayState, actor, bodyPartsPos, bodyPartsCount,
enNeoReeba->drawEffectScale, 0.5f, enNeoReeba->drawEffectAlpha,
enNeoReeba->drawEffectType);
}
Expand Down
3 changes: 2 additions & 1 deletion mm/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,8 @@ void EnFirefly_Draw(Actor* thisx, PlayState* play) {
POLY_OPA_DISP = gfx;
}

if (GameInteractor_Should(VB_USE_NULL_FOR_DRAW_DAMAGE_EFFECTS, true, this)) {
if (GameInteractor_Should(VB_USE_NULL_FOR_DRAW_DAMAGE_EFFECTS, true, this, this->bodyPartsPos,
KEESE_BODYPART_MAX)) {
Actor_DrawDamageEffects(play, NULL, this->bodyPartsPos, KEESE_BODYPART_MAX,
this->drawDmgEffScale * this->actor.scale.y * 200.0f, this->drawDmgEffFrozenSteamScale,
this->drawDmgEffAlpha, this->drawDmgEffType);
Expand Down
3 changes: 2 additions & 1 deletion mm/src/overlays/actors/ovl_En_Fz/z_en_fz.c
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,8 @@ void EnFz_Draw(Actor* thisx, PlayState* play) {
bodyPartsPos[1] = this->actor.world.pos;
bodyPartsPos[0].y += 20.0f;
bodyPartsPos[1].y += 40.0f;
if (GameInteractor_Should(VB_USE_NULL_FOR_DRAW_DAMAGE_EFFECTS, true, this, bodyPartsPos)) {
if (GameInteractor_Should(VB_USE_NULL_FOR_DRAW_DAMAGE_EFFECTS, true, this, bodyPartsPos,
ARRAY_COUNT(bodyPartsPos))) {
Actor_DrawDamageEffects(play, NULL, bodyPartsPos, ARRAY_COUNT(bodyPartsPos), this->drawDmgEffScale * 4.0f,
0.5f, this->drawDmgEffAlpha, ACTOR_DRAW_DMGEFF_LIGHT_ORBS);
}
Expand Down
3 changes: 2 additions & 1 deletion mm/src/overlays/actors/ovl_En_Neo_Reeba/z_en_neo_reeba.c
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,8 @@ void EnNeoReeba_DrawEffects(EnNeoReeba* this, PlayState* play) {
}

this->bodyPartsPos[EN_NEO_REEBA_BODYPART_3] = this->actor.world.pos;
if (GameInteractor_Should(VB_USE_NULL_FOR_DRAW_DAMAGE_EFFECTS, true, this)) {
if (GameInteractor_Should(VB_USE_NULL_FOR_DRAW_DAMAGE_EFFECTS, true, this, this->bodyPartsPos,
EN_NEO_REEBA_BODYPART_MAX)) {
Actor_DrawDamageEffects(play, NULL, this->bodyPartsPos, EN_NEO_REEBA_BODYPART_MAX, this->drawEffectScale,
0.5f, this->drawEffectAlpha, this->drawEffectType);
}
Expand Down

0 comments on commit 6cdf9d7

Please sign in to comment.