spider_web.c
Poison Beat, Spinning Beat and Spider Web.
games/tbs/src/effect/parts/spider_web.c on GitHub
Poison Beat, Spinning Beat and Spider Web. Part of effect.c, the battle effect object, compiled only through it.
Functions
BattleFx_RunPoisonBeat
void BattleFx_RunPoisonBeat(struct BattleEffectArgument *effect)
A lime swipe that knocks the target back.
Abilities: Poison Beat (kind 382).
Used by gBattleFx_EffectHandlers.
BattleFx_RunSpinningBeat
void BattleFx_RunSpinningBeat(struct BattleEffectArgument *effect)
A magenta swipe that throws the target into the air.
Abilities: Spinning Beat (kind 383).
Used by gBattleFx_EffectHandlers.
BattleFx_RunSwirlSwipe
void BattleFx_RunSwirlSwipe(struct BattleEffectArgument *effect, s32 mode)
A swirling swipe across the first target, six images four frames each, from the user's side: the first four from the swirl sheet, the last two from the tail sheet. The swipe lands on frame 8.
Called by BattleFx_RunPoisonBeat and BattleFx_RunSpinningBeat. Decodes the tail sheet into Ram_MapCellBuffer, moves BG2X so the swipe crosses the target, and sets work->shakeFrames on the hit; mode 0 loads its colours over the first 64 of the background palette, and mode 1 throws the target's object into the air.
mode 0 : lime colours; the battle shows the damage at once and the target
recoils. 48 frames.
mode 1 : the target flashes, is thrown up on frame 13 and the battle shows
the damage as it lands on frame 65. 74 frames.Used by BattleFx_RunPoisonBeat, BattleFx_RunSpinningBeat.
BattleFx_RunSpiderWeb
void BattleFx_RunSpiderWeb(struct BattleEffectArgument *effect)
A spider web spreads over the targets, drawn as four mirrored 32x32 quarters around the point between the first and last target.
Abilities: Spider Web (kind 345).
It fades in over 8 frames; the targets flash on frame 10, the battle shows the damage on frame 32, and it fades out from frame 54.
Builds and frees its blitter four times a frame, one for each quarter's flip.
Used by gBattleFx_EffectHandlers.
Macros, without a comment: SPIDER_WEB_FRAMES.