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.
Structures
| Name | Description | |
|---|---|---|
struct | DROP_SPLASH_BUFFER | RamMapGridMetatileBuffer as Douse uses it: window 0's table, then the drops' droplets. |
Macros
| Name | Description | |
|---|---|---|
#define | FALLING_BUILD_SLANTED_WINDOW (line, i, last, slant, span) | Fills window 0's per-line edges: from line 8 to line last, 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 (left) WIN_RANGE(left, (left) + CANVAS_SIZE) | The band from left, as wide as the canvas. |
#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_SPLASH_BUFFER ((DROP_SPLASH_BUFFER *)RamMapGridMetatileBuffer) | RamMapGridMetatileBuffer seen as Douse's DROP_SPLASH_BUFFER. |
#define | DOUSE_DROP_WIDTH 24 | BlueBeamSheet, after BlueGlowSheet's ten flare pictures (as many bytes as two sets of motes): the falling drop, a blue bubble; the white flash it lands in, as large as the drop; then the white splash that spreads. |
#define | DOUSE_DROP_HEIGHT 24 | |
#define | DOUSE_BURST_PICTURE_WIDTH 42 | |
#define | DOUSE_BURST_PICTURE_HEIGHT 42 | |
#define | DOUSE_FALLING_PICTURE (2 * MOTE_SET_BYTES) | |
#define | DOUSE_FLASH_PICTURE (DOUSE_FALLING_PICTURE + PICTURE_BYTES(DOUSE_DROP)) | |
#define | DOUSE_BURST_PICTURE (DOUSE_FLASH_PICTURE + PICTURE_BYTES(DOUSE_DROP)) |
Enumerations
| Name | Description | |
|---|---|---|
enum | anonymous enum { FALLING_SHARD_COUNT, FALLING_SHARD_PUFF_COUNT } | The shards or drops that fall, and the slots for the sparkle or splash they burst into, which follow them in PARTICLES. |
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, last, slant, span)
Fills window 0's per-line edges: from line 8 to line last, 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(left) WIN_RANGE(left, (left) + CANVAS_SIZE)
The band from left, as wide as the canvas.
Referenced by btEffectRunDouse() and btEffectRunIce().
Definition at line 19 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 37 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 39 of file battle_effect_falling.c.
ICE_SHARD_HEIGHT
#define ICE_SHARD_HEIGHT 32
Referenced by btEffectRunIce().
Definition at line 40 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 42 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 46 of file battle_effect_falling.c.
ICE_PUFF_FIRST_TICK
#define ICE_PUFF_FIRST_TICK 9
Referenced by btEffectRunIce().
Definition at line 47 of file battle_effect_falling.c.
ICE_PUFF_LAST_TICK
#define ICE_PUFF_LAST_TICK 11
Referenced by btEffectRunIce().
Definition at line 48 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 50 of file battle_effect_falling.c.
DOUSE_SPLASH_BUFFER
#define DOUSE_SPLASH_BUFFER ((DROP_SPLASH_BUFFER *)RamMapGridMetatileBuffer)
RamMapGridMetatileBuffer seen as Douse's DROP_SPLASH_BUFFER.
Referenced by btEffectRunDouse().
Definition at line 284 of file battle_effect_falling.c.
DOUSE_DROP_WIDTH
#define DOUSE_DROP_WIDTH 24
BlueBeamSheet, after BlueGlowSheet's ten flare pictures (as many bytes as two sets of motes): the falling drop, a blue bubble; the white flash it lands in, as large as the drop; then the white splash that spreads.
Referenced by btEffectRunDouse().
Definition at line 289 of file battle_effect_falling.c.
DOUSE_DROP_HEIGHT
#define DOUSE_DROP_HEIGHT 24
Referenced by btEffectRunDouse().
Definition at line 290 of file battle_effect_falling.c.
DOUSE_BURST_PICTURE_WIDTH
#define DOUSE_BURST_PICTURE_WIDTH 42
Referenced by btEffectRunDouse().
Definition at line 291 of file battle_effect_falling.c.
DOUSE_BURST_PICTURE_HEIGHT
#define DOUSE_BURST_PICTURE_HEIGHT 42
Referenced by btEffectRunDouse().
Definition at line 292 of file battle_effect_falling.c.
DOUSE_FALLING_PICTURE
#define DOUSE_FALLING_PICTURE (2 * MOTE_SET_BYTES)
Referenced by btEffectRunDouse().
Definition at line 293 of file battle_effect_falling.c.
DOUSE_FLASH_PICTURE
#define DOUSE_FLASH_PICTURE (DOUSE_FALLING_PICTURE + PICTURE_BYTES(DOUSE_DROP))
Referenced by btEffectRunDouse().
Definition at line 294 of file battle_effect_falling.c.
DOUSE_BURST_PICTURE
#define DOUSE_BURST_PICTURE (DOUSE_FLASH_PICTURE + PICTURE_BYTES(DOUSE_DROP))
Referenced by btEffectRunDouse().
Definition at line 295 of file battle_effect_falling.c.
Enumerations in detail
anonymous enum
enum { FALLING_SHARD_COUNT, FALLING_SHARD_PUFF_COUNT }
The shards or drops that fall, and the slots for the sparkle or splash they
burst into, which follow them in PARTICLES.
| Enumerator | Value | Description |
|---|---|---|
FALLING_SHARD_COUNT | 32 | |
FALLING_SHARD_PUFF_COUNT | 32 |
Definition at line 29 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(), IceCounts, line, Sint32, state, syCloseEvent(), syRandom(), sySetEvent() and sySoundPlayStub().
Referenced by BattleEffectHandlers.
Definition at line 56 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(), DouseCounts, line, Sint32, state, syCloseEvent(), syRandom(), sySetEvent() and sySoundPlayStub().
Referenced by BattleEffectHandlers.
Definition at line 302 of file battle_effect_falling.c.