src/battle_effect/battle_effect_falling.c
Ice and Douse: shards and drops of water falling on the targets' side. More…
Included by battle_effect.c.
Macros
| Name | Description | |
|---|---|---|
#define | FALLING_BUILD_SLANTED_WINDOW (line, i, lastY, slant, span) | Fills window 0's per-line edges: from line 8 to line lastY, slant, the band the shards and drops fall down, which moves along as the lines go down until the line before it reaches span, the targets' side; span on the other lines to the battle view's bottom; nothing below it. |
#define | FALLING_BAND (leftX) WIN_RANGE(leftX, (leftX) + CANVAS_SIZE) | The band from leftX, as wide as the canvas. |
#define | ICE_SHARDS (variant) IceCounts[(variant) * 2] | Each Ice variant's shards that fall, and its ticks; the damage shows 16 ticks before the end. |
#define | ICE_TICKS (variant) IceCounts[(variant) * 2 + 1] | |
#define | FALLING_LAND_Y (80 * 8 - 1) | A falling shard or drop keeps falling while its y, in eighths of a pixel, is at most this. |
#define | ICE_SHARD_WIDTH 32 | IceShardSheet: the shard, then its shatter, each picture 32x32. |
#define | ICE_SHARD_HEIGHT 32 | |
#define | FALLING_LANDED_LAST_TICK 14 | A landed shard or drop counts its ticks since landing up to one past this. |
#define | ICE_SHATTER_PICTURE_TICKS 3 | A landed shard shows its shatter's pictures from its first tick to FALLING_LANDED_LAST_TICK, ICE_SHATTER_PICTURE_TICKS each, and kicks up a puff on ticks ICE_PUFF_FIRST_TICK to ICE_PUFF_LAST_TICK. |
#define | ICE_PUFF_FIRST_TICK 9 | |
#define | ICE_PUFF_LAST_TICK 11 | |
#define | ICE_PUFF_TICKS 18 | A puff's ticks: the nine sparkle pictures, two ticks each. |
#define | DOUSE_DROPLET_BUFFER ((DROPLET_BUFFER *)RamMapMetatileBuffer) | RamMapMetatileBuffer as Douse uses it: window 0's table, then the drops' droplets, each free while its variant is -1. |
#define | DOUSE_FALLING_DROPS (variant) DouseCounts[(variant) * 4] | Each Douse variant: the drops that fall, of the 64 set out, the droplets each throws up, the pixels between drops along the slant, and its ticks; the damage shows 64 ticks before the end. |
#define | DOUSE_DROPLETS_PER_DROP (variant) DouseCounts[(variant) * 4 + 1] | |
#define | DOUSE_DROP_SPACING (variant) DouseCounts[(variant) * 4 + 2] | |
#define | DOUSE_TICKS (variant) DouseCounts[(variant) * 4 + 3] | |
#define | DOUSE_FALLING_PICTURE FLARE_SET_BYTES | BlueBeamSheet, after BlueGlowSheet's ten flare pictures: the falling drop, a blue bubble; the small splash it lands in; then the large splash. |
#define | DOUSE_SMALL_SPLASH_PICTURE | |
#define | DOUSE_LARGE_SPLASH_PICTURE |
Enumerations
| Name | Description | |
|---|---|---|
enum | anonymous enum { FALLING_SHARD_COUNT, FALLING_SHARD_PUFF_COUNT } | The shards or drops that can fall at once, and their puffs as they land. |
Functions
| Name | Description | |
|---|---|---|
void | btEffectRunIce (BATTLE_EFFECT_PARM *args) | Ice shards rain down diagonally onto the targets' side of the field and shatter into puffs of sparkle, flashing and shaking each target as they land. |
void | btEffectRunDouse (BATTLE_EFFECT_PARM *args) | Drops of water fall diagonally onto the targets' side of the field, 8 pixels down and 4 across a tick, each bursting in a splash that throws up droplets where it lands, while the targets flash; Deluge throws them higher. |
Description
Ice and Douse: shards and drops of water falling on the targets' side. Part
of battle_effect.c.
Macros in detail
FALLING_BUILD_SLANTED_WINDOW
#define FALLING_BUILD_SLANTED_WINDOW(line, i, lastY, slant, span)
Fills window 0's per-line edges: from line 8 to line lastY, slant, the band the shards and drops fall down, which moves along as the lines go down until the line before it reaches span, the targets' side; span on the other lines to the battle view's bottom; nothing below it.
Referenced by btEffectRunDouse() and btEffectRunIce().
Definition at line 8 of file battle_effect_falling.c.
FALLING_BAND
#define FALLING_BAND(leftX) WIN_RANGE(leftX, (leftX) + CANVAS_SIZE)
The band from leftX, as wide as the canvas.
Referenced by btEffectRunDouse() and btEffectRunIce().
Definition at line 19 of file battle_effect_falling.c.
ICE_SHARDS
#define ICE_SHARDS(variant) IceCounts[(variant) * 2]
Each Ice variant's shards that fall, and its ticks; the damage shows 16 ticks before the end.
Referenced by btEffectRunIce().
Definition at line 29 of file battle_effect_falling.c.
ICE_TICKS
#define ICE_TICKS(variant) IceCounts[(variant) * 2 + 1]
Referenced by btEffectRunIce().
Definition at line 30 of file battle_effect_falling.c.
FALLING_LAND_Y
#define FALLING_LAND_Y (80 * 8 - 1)
A falling shard or drop keeps falling while its y, in eighths of a pixel, is at most this.
Referenced by btEffectRunDouse() and btEffectRunIce().
Definition at line 41 of file battle_effect_falling.c.
ICE_SHARD_WIDTH
#define ICE_SHARD_WIDTH 32
IceShardSheet: the shard, then its shatter, each picture 32x32.
Referenced by btEffectRunIce().
Definition at line 43 of file battle_effect_falling.c.
ICE_SHARD_HEIGHT
#define ICE_SHARD_HEIGHT 32
Referenced by btEffectRunIce().
Definition at line 44 of file battle_effect_falling.c.
FALLING_LANDED_LAST_TICK
#define FALLING_LANDED_LAST_TICK 14
A landed shard or drop counts its ticks since landing up to one past this.
Referenced by btEffectRunDouse() and btEffectRunIce().
Definition at line 46 of file battle_effect_falling.c.
ICE_SHATTER_PICTURE_TICKS
#define ICE_SHATTER_PICTURE_TICKS 3
A landed shard shows its shatter's pictures from its first tick to
FALLING_LANDED_LAST_TICK, ICE_SHATTER_PICTURE_TICKS each, and kicks up a puff
on ticks ICE_PUFF_FIRST_TICK to ICE_PUFF_LAST_TICK.
Referenced by btEffectRunIce().
Definition at line 50 of file battle_effect_falling.c.
ICE_PUFF_FIRST_TICK
#define ICE_PUFF_FIRST_TICK 9
Referenced by btEffectRunIce().
Definition at line 51 of file battle_effect_falling.c.
ICE_PUFF_LAST_TICK
#define ICE_PUFF_LAST_TICK 11
Referenced by btEffectRunIce().
Definition at line 52 of file battle_effect_falling.c.
ICE_PUFF_TICKS
#define ICE_PUFF_TICKS 18
A puff's ticks: the nine sparkle pictures, two ticks each.
Referenced by btEffectRunIce().
Definition at line 54 of file battle_effect_falling.c.
DOUSE_DROPLET_BUFFER
#define DOUSE_DROPLET_BUFFER ((DROPLET_BUFFER *)RamMapMetatileBuffer)
RamMapMetatileBuffer as Douse uses it: window 0's table, then the drops'
droplets, each free while its variant is -1.
Referenced by btEffectRunDouse().
Definition at line 277 of file battle_effect_falling.c.
DOUSE_FALLING_DROPS
#define DOUSE_FALLING_DROPS(variant) DouseCounts[(variant) * 4]
Each Douse variant: the drops that fall, of the 64 set out, the droplets each throws up, the pixels between drops along the slant, and its ticks; the damage shows 64 ticks before the end.
Referenced by btEffectRunDouse().
Definition at line 282 of file battle_effect_falling.c.
DOUSE_DROPLETS_PER_DROP
#define DOUSE_DROPLETS_PER_DROP(variant) DouseCounts[(variant) * 4 + 1]
Referenced by btEffectRunDouse().
Definition at line 283 of file battle_effect_falling.c.
DOUSE_DROP_SPACING
#define DOUSE_DROP_SPACING(variant) DouseCounts[(variant) * 4 + 2]
Referenced by btEffectRunDouse().
Definition at line 284 of file battle_effect_falling.c.
DOUSE_TICKS
#define DOUSE_TICKS(variant) DouseCounts[(variant) * 4 + 3]
Referenced by btEffectRunDouse().
Definition at line 285 of file battle_effect_falling.c.
DOUSE_FALLING_PICTURE
#define DOUSE_FALLING_PICTURE FLARE_SET_BYTES
BlueBeamSheet, after BlueGlowSheet's ten flare pictures: the falling drop, a blue bubble; the small splash it lands in; then the large splash.
Referenced by btEffectRunDouse().
Definition at line 289 of file battle_effect_falling.c.
DOUSE_SMALL_SPLASH_PICTURE
#define DOUSE_SMALL_SPLASH_PICTURE
Referenced by btEffectRunDouse().
Definition at line 290 of file battle_effect_falling.c.
DOUSE_LARGE_SPLASH_PICTURE
#define DOUSE_LARGE_SPLASH_PICTURE
Referenced by btEffectRunDouse().
Definition at line 292 of file battle_effect_falling.c.
Enumerations in detail
anonymous enum
enum { FALLING_SHARD_COUNT, FALLING_SHARD_PUFF_COUNT }
The shards or drops that can fall at once, and their puffs as they land.
| Enumerator | Value | Description |
|---|---|---|
FALLING_SHARD_COUNT | 32 | |
FALLING_SHARD_PUFF_COUNT | 32 |
Definition at line 33 of file battle_effect_falling.c.
Functions in detail
btEffectRunIce
void btEffectRunIce(BATTLE_EFFECT_PARM *args)
Ice shards rain down diagonally onto the targets' side of the field and shatter into puffs of sparkle, flashing and shaking each target as they land.
Abilities: Ice, Ice Horn, Ice Missile.
References BattleEffectSparklePictures, BattleEffectSparkleSizes, btCameraShake(), btEffectArmWin0HBlankDMA(), btEffectConfigureEffectDisplay(), btEffectCountDownBattlerTints(), btEffectEndCanvasLayer(), btEffectTintBattler(), btEffectTransferCanvas(), btResourceLoadAndDecompress(), MapGridMetatileBuffer, Sint32, syCloseEvent(), syRandom(), sySetEvent() and sySoundPlayStub().
Referenced by BattleEffectHandlers.
Definition at line 60 of file battle_effect_falling.c.
btEffectRunDouse
void btEffectRunDouse(BATTLE_EFFECT_PARM *args)
Drops of water fall diagonally onto the targets' side of the field, 8 pixels down and 4 across a tick, each bursting in a splash that throws up droplets where it lands, while the targets flash; Deluge throws them higher.
Abilities: Douse, Drench, Deluge.
References btEffectArmWin0HBlankDMA(), btEffectConfigureEffectDisplay(), btEffectTintBattler(), btEffectTransferCanvas(), btParticleAdvanceWithGravity2D(), btResourceLoadAndDecompress(), MapGridMetatileBuffer, Sint32, syCloseEvent(), syRandom(), sySetEvent() and sySoundPlayStub().
Referenced by BattleEffectHandlers.
Definition at line 300 of file battle_effect_falling.c.