Skip to Content
The Alchemy Project

src/battle_effect/battle_effect_charon.c

The Charon summon, and btRenderBuildQuadStrip, which builds the strip meshes many effects lay their bands, ribbons and flames on (Catastrophe's smoke, Cruel Ruin's ribbons, Megiddo's corona). More…

Included by battle_effect.c.

Structures

NameDescription
structSTRIP_QUADOne quad of a vertex strip: its upper and lower triangles.

Macros

NameDescription
#defineBUBBLES (state->particles)The attack's particles in the effect state: the bubbles, each target's curse (where on the screen it caught the target, and the ticks since, -1 before) and its home, then the shadow's four bands; the last particle's variant holds the radius of the disc the shadow closes in as.
#defineCURSES (state->particles + 16)
#defineHOMES (state->particles + 32)
#defineSHADOW_BANDS (state->particles + 48)
#defineSHADOW_RADIUS (state->particles[63].variant)
#defineCHARON_BUBBLE_SLOTS 16The bubbles that billow off the shadow's edge, rising and drifting left: their particles, how many are drawn, and their size, shaded circles of this radius in the act's pictures.
#defineCHARON_BUBBLES 12
#defineCHARON_BUBBLE_RADIUS 16
#defineCHARON_SHADOW_BANDS 4The shadow is drawn as four bands, each this tall and the next this much lower, its left end rounded by a shaded quarter circle of size CHARON_SHADOW_EDGE.
#defineCHARON_SHADOW_BAND_HEIGHT 30
#defineCHARON_SHADOW_EDGE 56
#defineSUMMON_SPRITES ((SPR **)state->sprites)The summon's sprites in the effect state: the red dome's until CHARON_ARRIVAL_TICK, then Charon's.
#defineCHARON_BEAST_SPRITES 12Charon (CrimsonBeastTiles) as a grid of sprites four across and three down, its wisp (WhiteWispsTiles, in a sprite palette of its own) and the 64x64 sprite the red orb is revealed in.
#defineCHARON_BEAST_COLUMNS 4
#defineCHARON_BEAST_SPRITE_SIZE 32
#defineCHARON_WISP 12
#defineCHARON_REVEAL 13
#defineCHARON_SUMMON_SPRITE_COUNT 14
#defineCHARON_WISP_PALETTE 14
#defineCHARON_SHARD_PICTURES 16The dark shards (TumblingShardTiles, in a sprite palette of their own): the pictures of an 8x8 shard tumbling, and the sprites that swarm with them.
#defineCHARON_SHARDS 48
#defineCHARON_SHARD_PALETTE 15
#defineCHARON_SHARD_TURN 256
#defineSHARD_SPRITES ((SPR **)RamMapMetatileBuffer)The map cell buffer: the shards' sprites from its start, where the attack later decodes FlashBurstSheet's pictures.
#defineBURST_PICTURES MapGridMetatileBuffer
#defineHIDDEN_SPRITE_LIST ((Uint32 *)(MapGridMetatileBuffer + 16384))
#defineCHARON_HIDDEN_SPRITES 64
#defineORB_PICTURE (MapGridMetatileBuffer + 16384)
#defineREVEAL_SOURCE (RamMapMetatileBuffer + 16384)
#defineCHARON_PARTICLES ((PARTICLE *)(RamMapMetatileBuffer + 16896))
#defineCHARON_SWARM 128The swarm: CHARON_SWARM particles fly up from CHARON_ARRIVAL_TICK, the shards ride those from CHARON_SWARM_SHARDS on, the first CHARON_LARGE_SHARDS a quarter larger, and each CHARON_SWARM_GROUP particles tumble a step faster than the group before.
#defineCHARON_SWARM_SHARDS (CHARON_PARTICLES + 64)
#defineCHARON_LARGE_SHARDS 10
#defineCHARON_SWARM_GROUP 16
#defineCHARON_CURSE_MOTES 16The attack's particles: the motes of each target's curse, the flash bursts (FlashBurstSheet's six pictures, four ticks each) and the sparks among them.
#defineCHARON_MOTE_COUNT (ENEMY_BATTLE_SIZE * CHARON_CURSE_MOTES)
#defineCHARON_BURSTS (CHARON_PARTICLES + CHARON_MOTE_COUNT)
#defineCHARON_BURST_COUNT 32
#defineCHARON_BURSTS_DRAWN 16
#defineCHARON_BURST_TICKS 24
#defineCHARON_SPARKS (CHARON_BURSTS + CHARON_BURST_COUNT)
#defineCHARON_SPARK_COUNT 128
#defineCHARON_DOME_FIRST_COLOR 32The colours of the 256-colour sprites: the red dome's (RedDomeTiles) from CHARON_DOME_FIRST_COLOR, Charon's from the first, and the red orb's (RedOrbTiles) in the two palettes from CHARON_ORB_PALETTE.
#defineCHARON_DOME_COLORS 160
#defineCHARON_BEAST_COLORS 192
#defineCHARON_ORB_PALETTE 12
#defineCHARON_ORB_FIRST_COLOR (CHARON_ORB_PALETTE * PALETTE_COLORS)
#defineCHARON_ORB_COLORS 32
#defineCHARON_REVEAL_TILES (OBJ_64X64_8BPP_BYTES / TILE_SIZE_8BPP)The red orb is revealed in its sprite two pixels at a time, the same pair in each of its tiles, in a shuffled order of the tile's pairs.
#defineCHARON_DISSOLVE_PAIRS (TILE_SIZE_8BPP / 2)
#defineCHARON_SEAL_TILES (BG_CHAR_BLOCK(2) + (5 * 32 + 4) * 64)The battle background's tiles from column 4 of row 5, where the rune seal is stamped.
#defineCHARON_SEAL_PALETTE 14The rune seal's colours take a background palette of their own: a seal pixel of colour c is stamped as the byte c + CHARON_SEAL_COLOR, which wraps to colour c of that palette.
#defineCHARON_SEAL_COLOR
#defineCHARON_BEAST_PICTURES 9216Where the pictures that load once are decoded in the effect's sprite sheet: the rune seal as it is stamped (RuneSealSheet, 184 by 80), then at CHARON_ARRIVAL_TICK Charon's, its wisp's and BlueGlowSheet's in turn.
#defineCHARON_RUNE_SEAL 9216
#defineRUNE_SEAL_WIDTH 184
#defineRUNE_SEAL_HEIGHT 80
#defineCHARON_ACT_PICTURES 4096Where each act decodes its own sprite sheet in the effect's pictures: SwirlTexture with CharmRingSheet, CurseSealSheet, FireRingTexture or shaded circles.
#defineCHARON_SHADOW_BLOCK 8192A block at the canvas's brightest level, which the shadow's bands are drawn from, and GlowRingTexture made all bright.
#defineCHARON_GLOW_RING 12288
#defineCHARON_TEXTURE_BYTES (64 * 64)The bytes of either, a 64x64 texture.
#defineCHARON_RING_MOTES 256The ring of motes the seal sends out: CHARON_RING_MOTES motes of mote picture CHARON_RING_MOTE (4 pixels wide, 8 tall), drawn from CHARON_RING_SHADES copies in the battle sprite sheet, each 7 levels darker than the last.
#defineCHARON_RING_MOTE 4
#defineCHARON_RING_SHADES 10
#defineCHARON_RING_MOTE_BYTES (CHARON_RING_MOTE * CHARON_RING_MOTE * 2)
#defineCHARON_SWIRL_SCALE 115536The opening's swirl: it shrinks from CHARON_SWIRL_SCALE by CHARON_SCALE_STEP a tick until the seal is stamped, then grows again from half its size.
#defineCHARON_SCALE_STEP 1524
#defineCHARON_INNER_SWIRL_SCALE 42768
#defineCHARON_CHARM_RING_SCALE 22768
#defineCHARON_INNER_RING_SCALE 12768
#defineCHARON_SWIRL_SHADE_MIN (-48)
#defineCHARON_FALL_SCALE 100000The curse seal falls at tick 200 and the swirl under it at 232, both from CHARON_FALL_SCALE: the seal shrinks CHARON_SCALE_STEP a tick down to CHARON_SEAL_SCALE_MIN, the swirl CHARON_SWIRL_SHRINK.
#defineCHARON_SEAL_SCALE_MIN 13800
#defineCHARON_SWIRL_SHRINK 1200
#defineCHARON_GLOW_RING_GROWTH 1016The glow ring that rises at each cursed target grows this much a step.
#defineCHARON_TICKS 394The ticks of Charon's coming, unless A or B skips it.
#defineCHARON_ATTACK_TICKS 180Ticks of the attack that follows.
#defineCHARON_FLASHES 3The backdrop's flashes, at CharonFlashTicks.
#defineCHARON_DRAIN_TICK 32Charon's coming, in ticks.
#defineCHARON_SEAL_TICK 56
#defineCHARON_SWIRL_FADE_TICK 96
#defineCHARON_GREEN_DRAIN_TICK 108
#defineCHARON_ARRIVAL_TICK 132
#defineCHARON_DUSK_TICK 168
#defineCHARON_CURSE_TICK 200
#defineCHARON_VIOLET_TICK 214
#defineCHARON_CURSE_SWIRL_TICK 232
#defineCHARON_ORB_TICK 244
#defineCHARON_VIOLET_FADE_TICK 251
#defineCHARON_CURSE_FADE_TICK 254
#defineCHARON_RINGS_TICK 302
#defineCHARON_ORB_GONE_TICK 310
#defineCHARON_MAGENTA_TICK 330
#defineCHARON_DISC_TICK 347
#defineCHARON_REDDEN_TICK 348
#defineCHARON_SWARM_END_TICK 240The shards swarm, and the backdrop and Charon's colours fade in from the flash's white, until CHARON_SWARM_END_TICK.
#defineCHARON_TINT_TICKS 32
#defineCHARON_DRAIN_DIMMING 20As the red drains, the backdrop's green is held this many levels darker, and its blue comes back from as dark; at the seal, half as dark in green and as dark in blue.
#defineCHARON_SEAL_GLOW 16The rune seal glows this many levels brighter than its own colours, pulsing by CHARON_SEAL_GLOW_PULSE either way.
#defineCHARON_SEAL_GLOW_PULSE 12
#defineCHARON_DUSK_DIMMING 16The red dusk the backdrop fades toward: its own colours this many levels darker in green and blue and CHARON_DUSK_REDDENING redder, and after the flash that brings the rings of fire, CHARON_DEEP_DUSK_DIMMING darker.
#defineCHARON_DEEP_DUSK_DIMMING 20
#defineCHARON_DUSK_REDDENING 8
#defineCHARON_WISP_RED_MIN 12The deep red the wisp darkens to from white.
#defineCHARON_WISP_GREEN_MIN 4
#defineCHARON_WISP_BLUE_MIN 4
#defineCHARON_DISC_X 54The dark disc rimmed in magenta swells at this x on the canvas, and from CHARON_DISC_SWAY_TICK sways as far either side of it.
#defineCHARON_DISC_SWAY_TICK 350
#defineCHARON_RAMP_GREEN 8The top of the attack's ramp, a pink violet: full red with these levels of green and blue.
#defineCHARON_RAMP_BLUE 27
#defineCHARON_FLASH_DIMMING 20Each flash as the targets are drawn in fades the background back to this many levels darker in green, and half that in red and blue.

Functions

NameDescription
voidbtEffectRunCharon (BATTLE_EFFECT_PARM *args)Charon: over a red wasteland a violet whirlpool turns about a red dome that rises out of it; in a white flash among dark shards Charon appears and slashes across the vortex.
voidbtRenderBuildQuadStrip (STRIP_QUAD *quad, Sint32 width, Sint32 height, Sint32 count)Builds count quads of a vertex strip two vertices apart, each width texels wide and height texels tall, and ends the list with an empty triangle.

Variables

NameDescription
extern const SCALECharonSwarmScaleCharon's swarm scale, before it is set to one and a quarter.
extern const SCALECharonPulseScaleCharon's pulse scale, before the pulse sets it from a sine.
extern const SCALECharonRevealScaleCharon's scale while he is revealed.
extern const SCALECharonFinaleScaleCharon's scale in the finale.

Description

The Charon summon, and btRenderBuildQuadStrip, which builds the strip meshes many effects lay their bands, ribbons and flames on (Catastrophe's smoke, Cruel Ruin's ribbons, Megiddo's corona). Part of battle_effect.c.

Macros in detail

BUBBLES

#define BUBBLES (state->particles)

The attack's particles in the effect state: the bubbles, each target's curse (where on the screen it caught the target, and the ticks since, -1 before) and its home, then the shadow's four bands; the last particle's variant holds the radius of the disc the shadow closes in as.

The attack's canvas ramp runs from pink violet at its faintest to black at its brightest, so what it draws brightest shows as the black of the shadow.

Referenced by btEffectRunBubbleColumn(), btEffectRunCharon() and btEffectRunCoatlicue().

Definition at line 12 of file battle_effect_charon.c.

CURSES

#define CURSES (state->particles + 16)

Referenced by btEffectRunCharon().

Definition at line 13 of file battle_effect_charon.c.

HOMES

#define HOMES (state->particles + 32)

Referenced by btEffectRunCharon().

Definition at line 14 of file battle_effect_charon.c.

SHADOW_BANDS

#define SHADOW_BANDS (state->particles + 48)

Referenced by btEffectRunCharon().

Definition at line 15 of file battle_effect_charon.c.

SHADOW_RADIUS

#define SHADOW_RADIUS (state->particles[63].variant)

Referenced by btEffectRunCharon().

Definition at line 16 of file battle_effect_charon.c.

CHARON_BUBBLE_SLOTS

#define CHARON_BUBBLE_SLOTS 16

The bubbles that billow off the shadow's edge, rising and drifting left: their particles, how many are drawn, and their size, shaded circles of this radius in the act's pictures.

Referenced by btEffectRunCharon().

Definition at line 20 of file battle_effect_charon.c.

CHARON_BUBBLES

#define CHARON_BUBBLES 12

Referenced by btEffectRunCharon().

Definition at line 21 of file battle_effect_charon.c.

CHARON_BUBBLE_RADIUS

#define CHARON_BUBBLE_RADIUS 16

Referenced by btEffectRunCharon().

Definition at line 22 of file battle_effect_charon.c.

CHARON_SHADOW_BANDS

#define CHARON_SHADOW_BANDS 4

The shadow is drawn as four bands, each this tall and the next this much lower, its left end rounded by a shaded quarter circle of size CHARON_SHADOW_EDGE.

Referenced by btEffectRunCharon().

Definition at line 26 of file battle_effect_charon.c.

CHARON_SHADOW_BAND_HEIGHT

#define CHARON_SHADOW_BAND_HEIGHT 30

Referenced by btEffectRunCharon().

Definition at line 27 of file battle_effect_charon.c.

CHARON_SHADOW_EDGE

#define CHARON_SHADOW_EDGE 56

Referenced by btEffectRunCharon().

Definition at line 28 of file battle_effect_charon.c.

SUMMON_SPRITES

#define SUMMON_SPRITES ((SPR **)state->sprites)

The summon's sprites in the effect state: the red dome's until CHARON_ARRIVAL_TICK, then Charon's.

Referenced by btEffectRunCharon().

Definition at line 31 of file battle_effect_charon.c.

CHARON_BEAST_SPRITES

#define CHARON_BEAST_SPRITES 12

Charon (CrimsonBeastTiles) as a grid of sprites four across and three down, its wisp (WhiteWispsTiles, in a sprite palette of its own) and the 64x64 sprite the red orb is revealed in.

Referenced by btEffectRunCharon().

Definition at line 35 of file battle_effect_charon.c.

CHARON_BEAST_COLUMNS

#define CHARON_BEAST_COLUMNS 4

Referenced by btEffectRunCharon().

Definition at line 36 of file battle_effect_charon.c.

CHARON_BEAST_SPRITE_SIZE

#define CHARON_BEAST_SPRITE_SIZE 32

Referenced by btEffectRunCharon().

Definition at line 37 of file battle_effect_charon.c.

CHARON_WISP

#define CHARON_WISP 12

Referenced by btEffectRunCharon().

Definition at line 38 of file battle_effect_charon.c.

CHARON_REVEAL

#define CHARON_REVEAL 13

Referenced by btEffectRunCharon().

Definition at line 39 of file battle_effect_charon.c.

CHARON_SUMMON_SPRITE_COUNT

#define CHARON_SUMMON_SPRITE_COUNT 14

Referenced by btEffectRunCharon().

Definition at line 40 of file battle_effect_charon.c.

CHARON_WISP_PALETTE

#define CHARON_WISP_PALETTE 14

Referenced by btEffectRunCharon().

Definition at line 41 of file battle_effect_charon.c.

CHARON_SHARD_PICTURES

#define CHARON_SHARD_PICTURES 16

The dark shards (TumblingShardTiles, in a sprite palette of their own): the pictures of an 8x8 shard tumbling, and the sprites that swarm with them. A shard's tumble counts CHARON_SHARD_TURN to a turn of its pictures.

Referenced by btEffectRunCharon().

Definition at line 45 of file battle_effect_charon.c.

CHARON_SHARDS

#define CHARON_SHARDS 48

Referenced by btEffectRunCharon().

Definition at line 46 of file battle_effect_charon.c.

CHARON_SHARD_PALETTE

#define CHARON_SHARD_PALETTE 15

Referenced by btEffectRunCharon().

Definition at line 47 of file battle_effect_charon.c.

CHARON_SHARD_TURN

#define CHARON_SHARD_TURN 256

Referenced by btEffectRunCharon().

Definition at line 48 of file battle_effect_charon.c.

SHARD_SPRITES

#define SHARD_SPRITES ((SPR **)RamMapMetatileBuffer)

The map cell buffer: the shards' sprites from its start, where the attack later decodes FlashBurstSheet's pictures. At 16384, a list of CHARON_HIDDEN_SPRITES sprites' OAM entries built at tick 0, which the summon never reads; from the tick before CHARON_ORB_TICK the red orb's 64x64 picture (RedOrbTiles) over it, which the reveal copies from (REVEAL_SOURCE is ORB_PICTURE), and the order it is revealed in after it. Then the particles.

Referenced by btEffectRunCharon().

Definition at line 56 of file battle_effect_charon.c.

BURST_PICTURES

#define BURST_PICTURES MapGridMetatileBuffer

Referenced by btEffectRunCharon().

Definition at line 57 of file battle_effect_charon.c.

HIDDEN_SPRITE_LIST

#define HIDDEN_SPRITE_LIST ((Uint32 *)(MapGridMetatileBuffer + 16384))

Referenced by btEffectRunCharon().

Definition at line 58 of file battle_effect_charon.c.

CHARON_HIDDEN_SPRITES

#define CHARON_HIDDEN_SPRITES 64

Referenced by btEffectRunCharon().

Definition at line 59 of file battle_effect_charon.c.

ORB_PICTURE

#define ORB_PICTURE (MapGridMetatileBuffer + 16384)

Referenced by btEffectRunCharon().

Definition at line 60 of file battle_effect_charon.c.

REVEAL_SOURCE

#define REVEAL_SOURCE (RamMapMetatileBuffer + 16384)

Referenced by btEffectRunCharon().

Definition at line 61 of file battle_effect_charon.c.

CHARON_PARTICLES

#define CHARON_PARTICLES ((PARTICLE *)(RamMapMetatileBuffer + 16896))

Referenced by btEffectRunCharon().

Definition at line 62 of file battle_effect_charon.c.

CHARON_SWARM

#define CHARON_SWARM 128

The swarm: CHARON_SWARM particles fly up from CHARON_ARRIVAL_TICK, the shards ride those from CHARON_SWARM_SHARDS on, the first CHARON_LARGE_SHARDS a quarter larger, and each CHARON_SWARM_GROUP particles tumble a step faster than the group before.

Referenced by btEffectRunCharon().

Definition at line 67 of file battle_effect_charon.c.

CHARON_SWARM_SHARDS

#define CHARON_SWARM_SHARDS (CHARON_PARTICLES + 64)

Referenced by btEffectRunCharon().

Definition at line 68 of file battle_effect_charon.c.

CHARON_LARGE_SHARDS

#define CHARON_LARGE_SHARDS 10

Referenced by btEffectRunCharon().

Definition at line 69 of file battle_effect_charon.c.

CHARON_SWARM_GROUP

#define CHARON_SWARM_GROUP 16

Referenced by btEffectRunCharon().

Definition at line 70 of file battle_effect_charon.c.

CHARON_CURSE_MOTES

#define CHARON_CURSE_MOTES 16

The attack's particles: the motes of each target's curse, the flash bursts (FlashBurstSheet's six pictures, four ticks each) and the sparks among them.

for each target

Referenced by btEffectRunCharon().

Definition at line 73 of file battle_effect_charon.c.

CHARON_MOTE_COUNT

#define CHARON_MOTE_COUNT (ENEMY_BATTLE_SIZE * CHARON_CURSE_MOTES)

Referenced by btEffectRunCharon().

Definition at line 74 of file battle_effect_charon.c.

CHARON_BURSTS

#define CHARON_BURSTS (CHARON_PARTICLES + CHARON_MOTE_COUNT)

Referenced by btEffectRunCharon().

Definition at line 75 of file battle_effect_charon.c.

CHARON_BURST_COUNT

#define CHARON_BURST_COUNT 32

Referenced by btEffectRunCharon().

Definition at line 76 of file battle_effect_charon.c.

CHARON_BURSTS_DRAWN

#define CHARON_BURSTS_DRAWN 16

Referenced by btEffectRunCharon().

Definition at line 77 of file battle_effect_charon.c.

CHARON_BURST_TICKS

#define CHARON_BURST_TICKS 24

Referenced by btEffectRunCharon().

Definition at line 78 of file battle_effect_charon.c.

CHARON_SPARKS

#define CHARON_SPARKS (CHARON_BURSTS + CHARON_BURST_COUNT)

Referenced by btEffectRunCharon().

Definition at line 79 of file battle_effect_charon.c.

CHARON_SPARK_COUNT

#define CHARON_SPARK_COUNT 128

Referenced by btEffectRunCharon().

Definition at line 80 of file battle_effect_charon.c.

CHARON_DOME_FIRST_COLOR

#define CHARON_DOME_FIRST_COLOR 32

The colours of the 256-colour sprites: the red dome's (RedDomeTiles) from CHARON_DOME_FIRST_COLOR, Charon's from the first, and the red orb's (RedOrbTiles) in the two palettes from CHARON_ORB_PALETTE.

Referenced by btEffectRunCharon().

Definition at line 84 of file battle_effect_charon.c.

CHARON_DOME_COLORS

#define CHARON_DOME_COLORS 160

Referenced by btEffectRunCharon().

Definition at line 85 of file battle_effect_charon.c.

CHARON_BEAST_COLORS

#define CHARON_BEAST_COLORS 192

Referenced by btEffectRunCharon().

Definition at line 86 of file battle_effect_charon.c.

CHARON_ORB_PALETTE

#define CHARON_ORB_PALETTE 12

Referenced by btEffectRunCharon().

Definition at line 87 of file battle_effect_charon.c.

CHARON_ORB_FIRST_COLOR

#define CHARON_ORB_FIRST_COLOR (CHARON_ORB_PALETTE * PALETTE_COLORS)

Referenced by btEffectRunCharon().

Definition at line 88 of file battle_effect_charon.c.

CHARON_ORB_COLORS

#define CHARON_ORB_COLORS 32

Referenced by btEffectRunCharon().

Definition at line 89 of file battle_effect_charon.c.

CHARON_REVEAL_TILES

#define CHARON_REVEAL_TILES (OBJ_64X64_8BPP_BYTES / TILE_SIZE_8BPP)

The red orb is revealed in its sprite two pixels at a time, the same pair in each of its tiles, in a shuffled order of the tile's pairs.

Referenced by btEffectRunCharon().

Definition at line 92 of file battle_effect_charon.c.

CHARON_DISSOLVE_PAIRS

#define CHARON_DISSOLVE_PAIRS (TILE_SIZE_8BPP / 2)

Referenced by btEffectRunCharon().

Definition at line 93 of file battle_effect_charon.c.

CHARON_SEAL_TILES

#define CHARON_SEAL_TILES (BG_CHAR_BLOCK(2) + (5 * 32 + 4) * 64)

The battle background's tiles from column 4 of row 5, where the rune seal is stamped.

Referenced by btEffectRunCharon().

Definition at line 96 of file battle_effect_charon.c.

CHARON_SEAL_PALETTE

#define CHARON_SEAL_PALETTE 14

The rune seal's colours take a background palette of their own: a seal pixel of colour c is stamped as the byte c + CHARON_SEAL_COLOR, which wraps to colour c of that palette.

Referenced by btEffectRunCharon().

Definition at line 100 of file battle_effect_charon.c.

CHARON_SEAL_COLOR

#define CHARON_SEAL_COLOR

Referenced by btEffectRunCharon().

Definition at line 101 of file battle_effect_charon.c.

CHARON_BEAST_PICTURES

#define CHARON_BEAST_PICTURES 9216

Where the pictures that load once are decoded in the effect's sprite sheet: the rune seal as it is stamped (RuneSealSheet, 184 by 80), then at CHARON_ARRIVAL_TICK Charon's, its wisp's and BlueGlowSheet's in turn.

Referenced by btEffectRunCharon().

Definition at line 112 of file battle_effect_charon.c.

CHARON_RUNE_SEAL

#define CHARON_RUNE_SEAL 9216

Referenced by btEffectRunCharon().

Definition at line 113 of file battle_effect_charon.c.

RUNE_SEAL_WIDTH

#define RUNE_SEAL_WIDTH 184

Referenced by btEffectRunCharon().

Definition at line 114 of file battle_effect_charon.c.

RUNE_SEAL_HEIGHT

#define RUNE_SEAL_HEIGHT 80

Referenced by btEffectRunCharon().

Definition at line 115 of file battle_effect_charon.c.

CHARON_ACT_PICTURES

#define CHARON_ACT_PICTURES 4096

Where each act decodes its own sprite sheet in the effect's pictures: SwirlTexture with CharmRingSheet, CurseSealSheet, FireRingTexture or shaded circles.

Referenced by btEffectRunCharon().

Definition at line 119 of file battle_effect_charon.c.

CHARON_SHADOW_BLOCK

#define CHARON_SHADOW_BLOCK 8192

A block at the canvas's brightest level, which the shadow's bands are drawn from, and GlowRingTexture made all bright.

Referenced by btEffectRunCharon().

Definition at line 122 of file battle_effect_charon.c.

CHARON_GLOW_RING

#define CHARON_GLOW_RING 12288

Referenced by btEffectRunCharon().

Definition at line 123 of file battle_effect_charon.c.

CHARON_TEXTURE_BYTES

#define CHARON_TEXTURE_BYTES (64 * 64)

The bytes of either, a 64x64 texture.

Referenced by btEffectRunCharon().

Definition at line 125 of file battle_effect_charon.c.

CHARON_RING_MOTES

#define CHARON_RING_MOTES 256

The ring of motes the seal sends out: CHARON_RING_MOTES motes of mote picture CHARON_RING_MOTE (4 pixels wide, 8 tall), drawn from CHARON_RING_SHADES copies in the battle sprite sheet, each 7 levels darker than the last.

Referenced by btEffectRunCharon().

Definition at line 130 of file battle_effect_charon.c.

CHARON_RING_MOTE

#define CHARON_RING_MOTE 4

Referenced by btEffectRunCharon().

Definition at line 131 of file battle_effect_charon.c.

CHARON_RING_SHADES

#define CHARON_RING_SHADES 10

Referenced by btEffectRunCharon().

Definition at line 132 of file battle_effect_charon.c.

CHARON_RING_MOTE_BYTES

#define CHARON_RING_MOTE_BYTES (CHARON_RING_MOTE * CHARON_RING_MOTE * 2)

Referenced by btEffectRunCharon().

Definition at line 133 of file battle_effect_charon.c.

CHARON_SWIRL_SCALE

#define CHARON_SWIRL_SCALE 115536

The opening's swirl: it shrinks from CHARON_SWIRL_SCALE by CHARON_SCALE_STEP a tick until the seal is stamped, then grows again from half its size. A second swirl, mirrored, turns the other way inside it, and from the seal on the charm ring turns with a smaller mirrored one inside it. The swirls are drawn only while brighter than CHARON_SWIRL_SHADE_MIN.

Referenced by btEffectRunCharon().

Definition at line 140 of file battle_effect_charon.c.

CHARON_SCALE_STEP

#define CHARON_SCALE_STEP 1524

Referenced by btEffectRunCharon().

Definition at line 141 of file battle_effect_charon.c.

CHARON_INNER_SWIRL_SCALE

#define CHARON_INNER_SWIRL_SCALE 42768

Referenced by btEffectRunCharon().

Definition at line 142 of file battle_effect_charon.c.

CHARON_CHARM_RING_SCALE

#define CHARON_CHARM_RING_SCALE 22768

Referenced by btEffectRunCharon().

Definition at line 143 of file battle_effect_charon.c.

CHARON_INNER_RING_SCALE

#define CHARON_INNER_RING_SCALE 12768

Referenced by btEffectRunCharon().

Definition at line 144 of file battle_effect_charon.c.

CHARON_SWIRL_SHADE_MIN

#define CHARON_SWIRL_SHADE_MIN (-48)

Referenced by btEffectRunCharon().

Definition at line 145 of file battle_effect_charon.c.

CHARON_FALL_SCALE

#define CHARON_FALL_SCALE 100000

The curse seal falls at tick 200 and the swirl under it at 232, both from CHARON_FALL_SCALE: the seal shrinks CHARON_SCALE_STEP a tick down to CHARON_SEAL_SCALE_MIN, the swirl CHARON_SWIRL_SHRINK.

Referenced by btEffectRunCharon().

Definition at line 149 of file battle_effect_charon.c.

CHARON_SEAL_SCALE_MIN

#define CHARON_SEAL_SCALE_MIN 13800

Referenced by btEffectRunCharon().

Definition at line 150 of file battle_effect_charon.c.

CHARON_SWIRL_SHRINK

#define CHARON_SWIRL_SHRINK 1200

Referenced by btEffectRunCharon().

Definition at line 151 of file battle_effect_charon.c.

CHARON_GLOW_RING_GROWTH

#define CHARON_GLOW_RING_GROWTH 1016

The glow ring that rises at each cursed target grows this much a step.

Referenced by btEffectRunCharon().

Definition at line 153 of file battle_effect_charon.c.

CHARON_TICKS

#define CHARON_TICKS 394

The ticks of Charon's coming, unless A or B skips it.

Referenced by btEffectRunCharon().

Definition at line 156 of file battle_effect_charon.c.

CHARON_ATTACK_TICKS

#define CHARON_ATTACK_TICKS 180

Ticks of the attack that follows.

Referenced by btEffectRunCharon().

Definition at line 158 of file battle_effect_charon.c.

CHARON_FLASHES

#define CHARON_FLASHES 3

The backdrop's flashes, at CharonFlashTicks.

Referenced by btEffectRunCharon().

Definition at line 160 of file battle_effect_charon.c.

CHARON_DRAIN_TICK

#define CHARON_DRAIN_TICK 32

Charon's coming, in ticks. From CHARON_DRAIN_TICK the backdrop's red drains away and its blue comes back; the rune seal is stamped on the ground after the canvas flashes (CHARON_SEAL_TICK), and the swirls fade from CHARON_SWIRL_FADE_TICK. The backdrop's green and then its red drain away from CHARON_GREEN_DRAIN_TICK, and in a white flash Charon appears among a swarm of shards (CHARON_ARRIVAL_TICK); the backdrop fades toward a red dusk from CHARON_DUSK_TICK. The curse seal falls turning (CHARON_CURSE_TICK), the swirl turns under it from CHARON_CURSE_SWIRL_TICK, and it fades from CHARON_CURSE_FADE_TICK; the red orb is revealed from CHARON_ORB_TICK and is gone at CHARON_ORB_GONE_TICK. A white flash brings three rings of fire (CHARON_RINGS_TICK); the orb comes back magenta and swells (CHARON_MAGENTA_TICK), and the dark disc rimmed in magenta swells over the canvas from CHARON_DISC_TICK. Charon's own colours are tinted toward violet from CHARON_VIOLET_TICK, back from CHARON_VIOLET_FADE_TICK, and toward red from CHARON_REDDEN_TICK.

Referenced by btEffectRunCharon().

Definition at line 176 of file battle_effect_charon.c.

CHARON_SEAL_TICK

#define CHARON_SEAL_TICK 56

Referenced by btEffectRunCharon().

Definition at line 177 of file battle_effect_charon.c.

CHARON_SWIRL_FADE_TICK

#define CHARON_SWIRL_FADE_TICK 96

Referenced by btEffectRunCharon().

Definition at line 178 of file battle_effect_charon.c.

CHARON_GREEN_DRAIN_TICK

#define CHARON_GREEN_DRAIN_TICK 108

Referenced by btEffectRunCharon().

Definition at line 179 of file battle_effect_charon.c.

CHARON_ARRIVAL_TICK

#define CHARON_ARRIVAL_TICK 132

Referenced by btEffectRunCharon().

Definition at line 180 of file battle_effect_charon.c.

CHARON_DUSK_TICK

#define CHARON_DUSK_TICK 168

Referenced by btEffectRunCharon().

Definition at line 181 of file battle_effect_charon.c.

CHARON_CURSE_TICK

#define CHARON_CURSE_TICK 200

Referenced by btEffectRunCharon().

Definition at line 182 of file battle_effect_charon.c.

CHARON_VIOLET_TICK

#define CHARON_VIOLET_TICK 214

Referenced by btEffectRunCharon().

Definition at line 183 of file battle_effect_charon.c.

CHARON_CURSE_SWIRL_TICK

#define CHARON_CURSE_SWIRL_TICK 232

Referenced by btEffectRunCharon().

Definition at line 184 of file battle_effect_charon.c.

CHARON_ORB_TICK

#define CHARON_ORB_TICK 244

Referenced by btEffectRunCharon().

Definition at line 185 of file battle_effect_charon.c.

CHARON_VIOLET_FADE_TICK

#define CHARON_VIOLET_FADE_TICK 251

Referenced by btEffectRunCharon().

Definition at line 186 of file battle_effect_charon.c.

CHARON_CURSE_FADE_TICK

#define CHARON_CURSE_FADE_TICK 254

Referenced by btEffectRunCharon().

Definition at line 187 of file battle_effect_charon.c.

CHARON_RINGS_TICK

#define CHARON_RINGS_TICK 302

Referenced by btEffectRunCharon().

Definition at line 188 of file battle_effect_charon.c.

CHARON_ORB_GONE_TICK

#define CHARON_ORB_GONE_TICK 310

Referenced by btEffectRunCharon().

Definition at line 189 of file battle_effect_charon.c.

CHARON_MAGENTA_TICK

#define CHARON_MAGENTA_TICK 330

Referenced by btEffectRunCharon().

Definition at line 190 of file battle_effect_charon.c.

CHARON_DISC_TICK

#define CHARON_DISC_TICK 347

Referenced by btEffectRunCharon().

Definition at line 191 of file battle_effect_charon.c.

CHARON_REDDEN_TICK

#define CHARON_REDDEN_TICK 348

Referenced by btEffectRunCharon().

Definition at line 192 of file battle_effect_charon.c.

CHARON_SWARM_END_TICK

#define CHARON_SWARM_END_TICK 240

The shards swarm, and the backdrop and Charon's colours fade in from the flash's white, until CHARON_SWARM_END_TICK. The tints toward violet and back take CHARON_TINT_TICKS each.

Referenced by btEffectRunCharon().

Definition at line 196 of file battle_effect_charon.c.

CHARON_TINT_TICKS

#define CHARON_TINT_TICKS 32

Referenced by btEffectRunCharon().

Definition at line 197 of file battle_effect_charon.c.

CHARON_DRAIN_DIMMING

#define CHARON_DRAIN_DIMMING 20

As the red drains, the backdrop's green is held this many levels darker, and its blue comes back from as dark; at the seal, half as dark in green and as dark in blue.

Referenced by btEffectRunCharon().

Definition at line 201 of file battle_effect_charon.c.

CHARON_SEAL_GLOW

#define CHARON_SEAL_GLOW 16

The rune seal glows this many levels brighter than its own colours, pulsing by CHARON_SEAL_GLOW_PULSE either way.

Referenced by btEffectRunCharon().

Definition at line 204 of file battle_effect_charon.c.

CHARON_SEAL_GLOW_PULSE

#define CHARON_SEAL_GLOW_PULSE 12

Referenced by btEffectRunCharon().

Definition at line 205 of file battle_effect_charon.c.

CHARON_DUSK_DIMMING

#define CHARON_DUSK_DIMMING 16

The red dusk the backdrop fades toward: its own colours this many levels darker in green and blue and CHARON_DUSK_REDDENING redder, and after the flash that brings the rings of fire, CHARON_DEEP_DUSK_DIMMING darker.

Referenced by btEffectRunCharon().

Definition at line 209 of file battle_effect_charon.c.

CHARON_DEEP_DUSK_DIMMING

#define CHARON_DEEP_DUSK_DIMMING 20

Referenced by btEffectRunCharon().

Definition at line 210 of file battle_effect_charon.c.

CHARON_DUSK_REDDENING

#define CHARON_DUSK_REDDENING 8

Referenced by btEffectRunCharon().

Definition at line 211 of file battle_effect_charon.c.

CHARON_WISP_RED_MIN

#define CHARON_WISP_RED_MIN 12

The deep red the wisp darkens to from white.

Referenced by btEffectRunCharon().

Definition at line 213 of file battle_effect_charon.c.

CHARON_WISP_GREEN_MIN

#define CHARON_WISP_GREEN_MIN 4

Referenced by btEffectRunCharon().

Definition at line 214 of file battle_effect_charon.c.

CHARON_WISP_BLUE_MIN

#define CHARON_WISP_BLUE_MIN 4

Referenced by btEffectRunCharon().

Definition at line 215 of file battle_effect_charon.c.

CHARON_DISC_X

#define CHARON_DISC_X 54

The dark disc rimmed in magenta swells at this x on the canvas, and from CHARON_DISC_SWAY_TICK sways as far either side of it.

Referenced by btEffectRunCharon().

Definition at line 218 of file battle_effect_charon.c.

CHARON_DISC_SWAY_TICK

#define CHARON_DISC_SWAY_TICK 350

Referenced by btEffectRunCharon().

Definition at line 219 of file battle_effect_charon.c.

CHARON_RAMP_GREEN

#define CHARON_RAMP_GREEN 8

The top of the attack's ramp, a pink violet: full red with these levels of green and blue.

Referenced by btEffectRunCharon().

Definition at line 222 of file battle_effect_charon.c.

CHARON_RAMP_BLUE

#define CHARON_RAMP_BLUE 27

Referenced by btEffectRunCharon().

Definition at line 223 of file battle_effect_charon.c.

CHARON_FLASH_DIMMING

#define CHARON_FLASH_DIMMING 20

Each flash as the targets are drawn in fades the background back to this many levels darker in green, and half that in red and blue.

Referenced by btEffectRunCharon().

Definition at line 226 of file battle_effect_charon.c.

Functions in detail

btEffectRunCharon

void btEffectRunCharon(BATTLE_EFFECT_PARM *args)

Charon: over a red wasteland a violet whirlpool turns about a red dome that rises out of it; in a white flash among dark shards Charon appears and slashes across the vortex. Then a black shadow rimmed in pink violet draws back to the right, the foes are carried into it from the left, and it sweeps back over the screen, closes into a disc and bursts, throwing them out.

Abilities: Charon.

References BattleEffectGroundSquareCorners, BattleEffectLargeSquareMesh, BattleEffectMotePictures, BattleEffectSquareMesh, BgScrollWork, btActorSpawnObjectsForListStub(), btBackgroundLoadStub(), btCameraApplyVerticalShake(), btCanvasBlitMirroredQuarters(), btColorBufferScaleStub(), btEffectBuildCanvasBlitters(), btEffectConfigureEffectDisplay(), btEffectCountDownBattlerTints(), btEffectDrawShadedDiscQuarter(), btEffectEndCanvasLayer(), btEffectPosProjectScaledBattler(), btEffectSpriteAcquire(), btEffectSpriteCreateWithTiles(), btEffectStartActorMotion(), btEffectStartCanvasLayer(), btEffectTintBattler(), btEffectTransferCanvas(), btEffectWipeCanvas(), btGraphicsLoadGreyRamp(), btObjectGetStub(), btPaletteBrightenSavedBattleBg(), btParticleAdvanceWithGravity2D(), btRenderAllocateModelList(), btRenderDrawModelList(), btRenderTransformVertices(), btResourceLoadAndDecompress(), CharonFinaleScale, CharonFlashTicks, CharonPulseScale, CharonRevealScale, CharonSwarmScale, fdRenderApplyProjectedPlacementStub(), fdSpriteDestroyStub(), MapGridMetatileBuffer, PerWork, ProjectionWork, Sint32, syCloseEvent(), syCos(), syDecompressTaggedLZ(), syHeapAllocateEWRAM(), syHeapRelease(), syHeapSlotRelease(), syInitMatrix(), syMatrixScaleUniform() and 15 more.

Referenced by btEffectRunSummon().

Definition at line 235 of file battle_effect_charon.c.

btRenderBuildQuadStrip

void btRenderBuildQuadStrip(STRIP_QUAD *quad, Sint32 width, Sint32 height, Sint32 count)

Builds count quads of a vertex strip two vertices apart, each width texels wide and height texels tall, and ends the list with an empty triangle.

References Sint32.

Referenced by btEffectRunCatastrophe(), btEffectRunCruelRuin(), btEffectRunFirePuppet(), btEffectRunFume(), btEffectRunMegiddo(), btEffectRunRisingDragon(), btEffectRunRisingDragonEnemy(), btEffectRunTwistingColumn() and btEffectRunWindFunnel().

Definition at line 2314 of file battle_effect_charon.c.

On this page

StructuresMacrosFunctionsVariablesDescriptionMacros in detailBUBBLESCURSESHOMESSHADOW_BANDSSHADOW_RADIUSCHARON_BUBBLE_SLOTSCHARON_BUBBLESCHARON_BUBBLE_RADIUSCHARON_SHADOW_BANDSCHARON_SHADOW_BAND_HEIGHTCHARON_SHADOW_EDGESUMMON_SPRITESCHARON_BEAST_SPRITESCHARON_BEAST_COLUMNSCHARON_BEAST_SPRITE_SIZECHARON_WISPCHARON_REVEALCHARON_SUMMON_SPRITE_COUNTCHARON_WISP_PALETTECHARON_SHARD_PICTURESCHARON_SHARDSCHARON_SHARD_PALETTECHARON_SHARD_TURNSHARD_SPRITESBURST_PICTURESHIDDEN_SPRITE_LISTCHARON_HIDDEN_SPRITESORB_PICTUREREVEAL_SOURCECHARON_PARTICLESCHARON_SWARMCHARON_SWARM_SHARDSCHARON_LARGE_SHARDSCHARON_SWARM_GROUPCHARON_CURSE_MOTESCHARON_MOTE_COUNTCHARON_BURSTSCHARON_BURST_COUNTCHARON_BURSTS_DRAWNCHARON_BURST_TICKSCHARON_SPARKSCHARON_SPARK_COUNTCHARON_DOME_FIRST_COLORCHARON_DOME_COLORSCHARON_BEAST_COLORSCHARON_ORB_PALETTECHARON_ORB_FIRST_COLORCHARON_ORB_COLORSCHARON_REVEAL_TILESCHARON_DISSOLVE_PAIRSCHARON_SEAL_TILESCHARON_SEAL_PALETTECHARON_SEAL_COLORCHARON_BEAST_PICTURESCHARON_RUNE_SEALRUNE_SEAL_WIDTHRUNE_SEAL_HEIGHTCHARON_ACT_PICTURESCHARON_SHADOW_BLOCKCHARON_GLOW_RINGCHARON_TEXTURE_BYTESCHARON_RING_MOTESCHARON_RING_MOTECHARON_RING_SHADESCHARON_RING_MOTE_BYTESCHARON_SWIRL_SCALECHARON_SCALE_STEPCHARON_INNER_SWIRL_SCALECHARON_CHARM_RING_SCALECHARON_INNER_RING_SCALECHARON_SWIRL_SHADE_MINCHARON_FALL_SCALECHARON_SEAL_SCALE_MINCHARON_SWIRL_SHRINKCHARON_GLOW_RING_GROWTHCHARON_TICKSCHARON_ATTACK_TICKSCHARON_FLASHESCHARON_DRAIN_TICKCHARON_SEAL_TICKCHARON_SWIRL_FADE_TICKCHARON_GREEN_DRAIN_TICKCHARON_ARRIVAL_TICKCHARON_DUSK_TICKCHARON_CURSE_TICKCHARON_VIOLET_TICKCHARON_CURSE_SWIRL_TICKCHARON_ORB_TICKCHARON_VIOLET_FADE_TICKCHARON_CURSE_FADE_TICKCHARON_RINGS_TICKCHARON_ORB_GONE_TICKCHARON_MAGENTA_TICKCHARON_DISC_TICKCHARON_REDDEN_TICKCHARON_SWARM_END_TICKCHARON_TINT_TICKSCHARON_DRAIN_DIMMINGCHARON_SEAL_GLOWCHARON_SEAL_GLOW_PULSECHARON_DUSK_DIMMINGCHARON_DEEP_DUSK_DIMMINGCHARON_DUSK_REDDENINGCHARON_WISP_RED_MINCHARON_WISP_GREEN_MINCHARON_WISP_BLUE_MINCHARON_DISC_XCHARON_DISC_SWAY_TICKCHARON_RAMP_GREENCHARON_RAMP_BLUECHARON_FLASH_DIMMINGFunctions in detailbtEffectRunCharonbtRenderBuildQuadStrip