src/battle_effect/battle_effect_meteor_blow.c
Meteor Blow: a flight through a sky of stars behind a burning meteor, which then crashes down on the foes. More…
Included by battle_effect.c.
Structures
| Name | Description | |
|---|---|---|
struct | METEOR_STAR | One star of the sky the meteor flies through: a point on a sphere and the picture it is drawn with, or METEOR_BLOW_PIXEL_STAR. |
Macros
| Name | Description | |
|---|---|---|
#define | METEOR_BLOW_STAR_COUNT 256 | The sky, drawn over the battle background's image in the map cell buffer: METEOR_BLOW_STAR_COUNT stars on a sphere METEOR_BLOW_SKY_RADIUS across, centred at (METEOR_BLOW_SKY_CENTER_X, METEOR_BLOW_SKY_CENTER_Y). |
#define | METEOR_BLOW_SKY_RADIUS 160 | |
#define | METEOR_BLOW_SKY_CENTER_X 120 | |
#define | METEOR_BLOW_SKY_CENTER_Y 64 | |
#define | METEOR_BLOW_STARS_PER_ORB 32 | |
#define | METEOR_BLOW_ORB_PICTURE_COUNT 7 | |
#define | METEOR_BLOW_PIXEL_STAR METEOR_BLOW_ORB_PICTURE_COUNT | |
#define | METEOR_BLOW_BIG_ORB_SIZE 30 | |
#define | METEOR_BLOW_STARS | |
#define | METEOR_BLOW_FLIGHT_TICKS 160 | The flight lasts METEOR_BLOW_FLIGHT_TICKS. |
#define | METEOR_BLOW_START_PITCH 3328 | |
#define | METEOR_BLOW_START_YAW 9472 | |
#define | METEOR_BLOW_YAW_STILL_TICK 112 | From tick 48 the turn round slows by 4 a tick, until it stops at METEOR_BLOW_YAW_STILL_TICK. |
#define | METEOR_BLOW_PITCH_STILL_TICK 152 | |
#define | METEOR_BLOW_SKY_FADE_TICK 96 | The flight's last stretch. |
#define | METEOR_BLOW_SKY_FADE_TICKS 16 | |
#define | METEOR_BLOW_CONE_TICK 116 | |
#define | METEOR_BLOW_PLUNGE_TICK 128 | |
#define | METEOR_BLOW_SKY_BASE_LEVEL 16 | The sky's colour, the backdrop's a line at a time over the battle view: each line's level is a quarter of its line plus a base, half of state->frame (which rises as the meteor comes) over METEOR_BLOW_SKY_BASE_LEVEL; its blue rises from level METEOR_BLOW_SKY_BLUE_LEVEL and its green, with half as much red, from METEOR_BLOW_SKY_GREEN_LEVEL. |
#define | METEOR_BLOW_SKY_BLUE_LEVEL 32 | |
#define | METEOR_BLOW_SKY_GREEN_LEVEL 80 | |
#define | METEOR_BLOW_CONE_ROWS 16 | The cone of flame the meteor plunges in: METEOR_BLOW_CONE_ROWS rings of two corners down an arc of a circle METEOR_BLOW_CONE_RADIUS across, six degrees apart, a strip of DustBlobSheet's picture drawn METEOR_BLOW_CONE_STRIPS times round it, each METEOR_BLOW_CONE_STRIP_SCROLL texels further down the picture; its corners, their projections and its mesh are kept in the effect's pictures. |
#define | METEOR_BLOW_CONE_RADIUS 48 | |
#define | METEOR_BLOW_CONE_STRIPS 5 | |
#define | METEOR_BLOW_CONE_STRIP_SCROLL 20 | |
#define | METEOR_BLOW_CONE_PROJECTED 22336 | |
#define | METEOR_BLOW_CONE_CORNERS 24384 | |
#define | METEOR_BLOW_CONE_MESH 25408 | |
#define | METEOR_BLOW_DUST_BLOB_PICTURES 8192 | Where DustBlobSheet, BillowTexture and FlameBandTexture are decoded in the effect's pictures. |
#define | METEOR_BLOW_BILLOW 16384 | |
#define | METEOR_BLOW_FLAME_BAND 20480 | |
#define | METEOR_BLOW_FLIGHT_STEP (trig, speed) (((trig) * (speed)) >> 10) | The meteor's step on one axis each tick of its flight: its speed times the heading's sine or cosine, times 64. |
#define | METEOR_BLOW_HEADING_TURN 286 | The meteor's heading starts at DEGtoANG(135); from tick 24 it swings towards 0 by METEOR_BLOW_HEADING_TURN a tick, as if it had swung since METEOR_BLOW_HEADING_TURN_TICK, and stays at 0 from tick 102. |
#define | METEOR_BLOW_HEADING_TURN_TICK 16 | |
#define | METEOR_BLOW_TICKS 50 | The landing: the meteor comes down on the foes from METEOR_BLOW_LANDING_X, and METEOR_BLOW_SPARKS burst from it at METEOR_BLOW_BURST_TICK. |
#define | METEOR_BLOW_LANDING_X 144 | |
#define | METEOR_BLOW_BURST_TICK 16 | |
#define | METEOR_BLOW_SPARKS 256 | |
#define | METEOR_BLOW_LANDING_TINT_RED 5 | |
#define | METEOR_BLOW_LANDING_TINT_GREEN (-4) | |
#define | METEOR_BLOW_LANDING_TINT_BLUE (-12) | |
#define | METEOR_BLOW_BILLOW_TILT 1000 | The billows lean back METEOR_BLOW_BILLOW_TILT and the rings of fire METEOR_BLOW_RING_TILT. |
#define | METEOR_BLOW_RING_TILT 2000 |
Functions
| Name | Description | |
|---|---|---|
void | btEffectArmMeteorBlowPaletteDMA (void) | Meteor Blow's horizontal-blank callback, the same function as battle_effect_starfield_fall.c's btEffectArmPaletteHBlankDMA: stops DMA 0, then arms it to copy one BG palette word per scanline from the line table in the effect state, so the backdrop's colour changes down the screen. |
void | btMeshBuildGrid (MESH_TRIANGLE *triangles, Sint32 columns, Sint32 rows, Sint32 cellWidth, Sint32 cellHeight) | Fills a grid of columns by rows vertices with two triangles a cell, each cell cellWidth by cellHeight texels of the texture, and ends the list with an all-zero triangle. |
void | btEffectRunMeteorBlow (BATTLE_EFFECT_PARM *args) | Meteor Blow: the screen goes black and the view flies through a sky of stars as a burning meteor comes in, growing, and plunges in a cone of flame; then it lands on the foes, rings of fire and billows spread from it and sparks fly up as every foe is thrown back. |
Variables
| Name | Description | |
|---|---|---|
extern const SCALE | MeteorBlowDoubleScale | The summon's scale in Meteor Blow, twice its size. |
Description
Meteor Blow: a flight through a sky of stars behind a burning meteor, which
then crashes down on the foes. Part of battle_effect.c.
Macros in detail
METEOR_BLOW_STAR_COUNT
#define METEOR_BLOW_STAR_COUNT 256
The sky, drawn over the battle background's image in the map cell buffer:
METEOR_BLOW_STAR_COUNT stars on a sphere METEOR_BLOW_SKY_RADIUS across,
centred at (METEOR_BLOW_SKY_CENTER_X, METEOR_BLOW_SKY_CENTER_Y). Every
METEOR_BLOW_STARS_PER_ORB-th is a glowing orb, one of GlowOrbSetSheet's
METEOR_BLOW_ORB_PICTURE_COUNT pictures in turn; the rest are single pixels of
the first orb's middle row, METEOR_BLOW_BIG_ORB_SIZE across. The stars are
kept in the effect's pictures after the orbs'.
Referenced by btEffectRunMeteorBlow().
Definition at line 98 of file battle_effect_meteor_blow.c.
METEOR_BLOW_SKY_RADIUS
#define METEOR_BLOW_SKY_RADIUS 160
Referenced by btEffectRunMeteorBlow().
Definition at line 99 of file battle_effect_meteor_blow.c.
METEOR_BLOW_SKY_CENTER_X
#define METEOR_BLOW_SKY_CENTER_X 120
Referenced by btEffectRunMeteorBlow().
Definition at line 100 of file battle_effect_meteor_blow.c.
METEOR_BLOW_SKY_CENTER_Y
#define METEOR_BLOW_SKY_CENTER_Y 64
Referenced by btEffectRunMeteorBlow().
Definition at line 101 of file battle_effect_meteor_blow.c.
METEOR_BLOW_STARS_PER_ORB
#define METEOR_BLOW_STARS_PER_ORB 32
Referenced by btEffectRunMeteorBlow().
Definition at line 102 of file battle_effect_meteor_blow.c.
METEOR_BLOW_ORB_PICTURE_COUNT
#define METEOR_BLOW_ORB_PICTURE_COUNT 7
Referenced by btEffectRunMeteorBlow().
Definition at line 103 of file battle_effect_meteor_blow.c.
METEOR_BLOW_PIXEL_STAR
#define METEOR_BLOW_PIXEL_STAR METEOR_BLOW_ORB_PICTURE_COUNT
Referenced by btEffectRunMeteorBlow().
Definition at line 104 of file battle_effect_meteor_blow.c.
METEOR_BLOW_BIG_ORB_SIZE
#define METEOR_BLOW_BIG_ORB_SIZE 30
Referenced by btEffectRunMeteorBlow().
Definition at line 105 of file battle_effect_meteor_blow.c.
METEOR_BLOW_STARS
#define METEOR_BLOW_STARS
Referenced by btEffectRunMeteorBlow().
Definition at line 106 of file battle_effect_meteor_blow.c.
METEOR_BLOW_FLIGHT_TICKS
#define METEOR_BLOW_FLIGHT_TICKS 160
The flight lasts METEOR_BLOW_FLIGHT_TICKS. The view starts turned up
METEOR_BLOW_START_PITCH and round METEOR_BLOW_START_YAW, and turns a 256th of
a turn a tick on each.
Referenced by btEffectRunMeteorBlow().
Definition at line 112 of file battle_effect_meteor_blow.c.
METEOR_BLOW_START_PITCH
#define METEOR_BLOW_START_PITCH 3328
Referenced by btEffectRunMeteorBlow().
Definition at line 113 of file battle_effect_meteor_blow.c.
METEOR_BLOW_START_YAW
#define METEOR_BLOW_START_YAW 9472
Referenced by btEffectRunMeteorBlow().
Definition at line 114 of file battle_effect_meteor_blow.c.
METEOR_BLOW_YAW_STILL_TICK
#define METEOR_BLOW_YAW_STILL_TICK 112
From tick 48 the turn round slows by 4 a tick, until it stops at
METEOR_BLOW_YAW_STILL_TICK. The turn up would slow by 8 a tick from tick 160,
as if it were to stop at METEOR_BLOW_PITCH_STILL_TICK, but the sky is drawn
only until METEOR_BLOW_CONE_TICK.
Referenced by btEffectRunMeteorBlow().
Definition at line 119 of file battle_effect_meteor_blow.c.
METEOR_BLOW_PITCH_STILL_TICK
#define METEOR_BLOW_PITCH_STILL_TICK 152
Referenced by btEffectRunMeteorBlow().
Definition at line 120 of file battle_effect_meteor_blow.c.
METEOR_BLOW_SKY_FADE_TICK
#define METEOR_BLOW_SKY_FADE_TICK 96
The flight's last stretch. From METEOR_BLOW_SKY_FADE_TICK the stars fade out
over METEOR_BLOW_SKY_FADE_TICKS; at METEOR_BLOW_CONE_TICK the canvas takes
the sky's place, shown at twice its width, and the cone of flame appears
round the meteor, white; from METEOR_BLOW_PLUNGE_TICK the meteor plunges down
the screen as the cone widens and turns orange.
Referenced by btEffectRunMeteorBlow().
Definition at line 126 of file battle_effect_meteor_blow.c.
METEOR_BLOW_SKY_FADE_TICKS
#define METEOR_BLOW_SKY_FADE_TICKS 16
Referenced by btEffectRunMeteorBlow().
Definition at line 127 of file battle_effect_meteor_blow.c.
METEOR_BLOW_CONE_TICK
#define METEOR_BLOW_CONE_TICK 116
Referenced by btEffectRunMeteorBlow().
Definition at line 128 of file battle_effect_meteor_blow.c.
METEOR_BLOW_PLUNGE_TICK
#define METEOR_BLOW_PLUNGE_TICK 128
Referenced by btEffectRunMeteorBlow().
Definition at line 129 of file battle_effect_meteor_blow.c.
METEOR_BLOW_SKY_BASE_LEVEL
#define METEOR_BLOW_SKY_BASE_LEVEL 16
The sky's colour, the backdrop's a line at a time over the battle view: each
line's level is a quarter of its line plus a base, half of state->frame
(which rises as the meteor comes) over METEOR_BLOW_SKY_BASE_LEVEL; its blue
rises from level METEOR_BLOW_SKY_BLUE_LEVEL and its green, with half as much
red, from METEOR_BLOW_SKY_GREEN_LEVEL.
Referenced by btEffectRunMeteorBlow().
Definition at line 136 of file battle_effect_meteor_blow.c.
METEOR_BLOW_SKY_BLUE_LEVEL
#define METEOR_BLOW_SKY_BLUE_LEVEL 32
Referenced by btEffectRunMeteorBlow().
Definition at line 137 of file battle_effect_meteor_blow.c.
METEOR_BLOW_SKY_GREEN_LEVEL
#define METEOR_BLOW_SKY_GREEN_LEVEL 80
Referenced by btEffectRunMeteorBlow().
Definition at line 138 of file battle_effect_meteor_blow.c.
METEOR_BLOW_CONE_ROWS
#define METEOR_BLOW_CONE_ROWS 16
The cone of flame the meteor plunges in: METEOR_BLOW_CONE_ROWS rings of two
corners down an arc of a circle METEOR_BLOW_CONE_RADIUS across, six degrees
apart, a strip of DustBlobSheet's picture drawn METEOR_BLOW_CONE_STRIPS times
round it, each METEOR_BLOW_CONE_STRIP_SCROLL texels further down the picture;
its corners, their projections and its mesh are kept in the effect's
pictures.
Referenced by btEffectRunMeteorBlow().
Definition at line 146 of file battle_effect_meteor_blow.c.
METEOR_BLOW_CONE_RADIUS
#define METEOR_BLOW_CONE_RADIUS 48
Referenced by btEffectRunMeteorBlow().
Definition at line 147 of file battle_effect_meteor_blow.c.
METEOR_BLOW_CONE_STRIPS
#define METEOR_BLOW_CONE_STRIPS 5
Referenced by btEffectRunMeteorBlow().
Definition at line 148 of file battle_effect_meteor_blow.c.
METEOR_BLOW_CONE_STRIP_SCROLL
#define METEOR_BLOW_CONE_STRIP_SCROLL 20
Referenced by btEffectRunMeteorBlow().
Definition at line 149 of file battle_effect_meteor_blow.c.
METEOR_BLOW_CONE_PROJECTED
#define METEOR_BLOW_CONE_PROJECTED 22336
Referenced by btEffectRunMeteorBlow().
Definition at line 150 of file battle_effect_meteor_blow.c.
METEOR_BLOW_CONE_CORNERS
#define METEOR_BLOW_CONE_CORNERS 24384
Referenced by btEffectRunMeteorBlow().
Definition at line 151 of file battle_effect_meteor_blow.c.
METEOR_BLOW_CONE_MESH
#define METEOR_BLOW_CONE_MESH 25408
Referenced by btEffectRunMeteorBlow().
Definition at line 152 of file battle_effect_meteor_blow.c.
METEOR_BLOW_DUST_BLOB_PICTURES
#define METEOR_BLOW_DUST_BLOB_PICTURES 8192
Where DustBlobSheet, BillowTexture and FlameBandTexture are decoded in the effect's pictures.
Referenced by btEffectRunMeteorBlow().
Definition at line 156 of file battle_effect_meteor_blow.c.
METEOR_BLOW_BILLOW
#define METEOR_BLOW_BILLOW 16384
Referenced by btEffectRunMeteorBlow().
Definition at line 157 of file battle_effect_meteor_blow.c.
METEOR_BLOW_FLAME_BAND
#define METEOR_BLOW_FLAME_BAND 20480
Referenced by btEffectRunMeteorBlow().
Definition at line 158 of file battle_effect_meteor_blow.c.
METEOR_BLOW_FLIGHT_STEP
#define METEOR_BLOW_FLIGHT_STEP(trig, speed) (((trig) * (speed)) >> 10)
The meteor's step on one axis each tick of its flight: its speed times the heading's sine or cosine, times 64.
Referenced by btEffectRunMeteorBlow().
Definition at line 162 of file battle_effect_meteor_blow.c.
METEOR_BLOW_HEADING_TURN
#define METEOR_BLOW_HEADING_TURN 286
The meteor's heading starts at DEGtoANG(135); from tick 24 it swings towards
0 by METEOR_BLOW_HEADING_TURN a tick, as if it had swung since
METEOR_BLOW_HEADING_TURN_TICK, and stays at 0 from tick 102.
Referenced by btEffectRunMeteorBlow().
Definition at line 166 of file battle_effect_meteor_blow.c.
METEOR_BLOW_HEADING_TURN_TICK
#define METEOR_BLOW_HEADING_TURN_TICK 16
Referenced by btEffectRunMeteorBlow().
Definition at line 167 of file battle_effect_meteor_blow.c.
METEOR_BLOW_TICKS
#define METEOR_BLOW_TICKS 50
The landing: the meteor comes down on the foes from METEOR_BLOW_LANDING_X,
and METEOR_BLOW_SPARKS burst from it at METEOR_BLOW_BURST_TICK. The battle
background is tinted dark orange for it, its red raised by
METEOR_BLOW_LANDING_TINT_RED levels and its green and blue lowered.
Referenced by btEffectRunMeteorBlow().
Definition at line 173 of file battle_effect_meteor_blow.c.
METEOR_BLOW_LANDING_X
#define METEOR_BLOW_LANDING_X 144
Referenced by btEffectRunMeteorBlow().
Definition at line 174 of file battle_effect_meteor_blow.c.
METEOR_BLOW_BURST_TICK
#define METEOR_BLOW_BURST_TICK 16
Referenced by btEffectRunMeteorBlow().
Definition at line 175 of file battle_effect_meteor_blow.c.
METEOR_BLOW_SPARKS
#define METEOR_BLOW_SPARKS 256
Referenced by btEffectRunMeteorBlow().
Definition at line 176 of file battle_effect_meteor_blow.c.
METEOR_BLOW_LANDING_TINT_RED
#define METEOR_BLOW_LANDING_TINT_RED 5
Referenced by btEffectRunMeteorBlow().
Definition at line 177 of file battle_effect_meteor_blow.c.
METEOR_BLOW_LANDING_TINT_GREEN
#define METEOR_BLOW_LANDING_TINT_GREEN (-4)
Referenced by btEffectRunMeteorBlow().
Definition at line 178 of file battle_effect_meteor_blow.c.
METEOR_BLOW_LANDING_TINT_BLUE
#define METEOR_BLOW_LANDING_TINT_BLUE (-12)
Referenced by btEffectRunMeteorBlow().
Definition at line 179 of file battle_effect_meteor_blow.c.
METEOR_BLOW_BILLOW_TILT
#define METEOR_BLOW_BILLOW_TILT 1000
The billows lean back METEOR_BLOW_BILLOW_TILT and the rings of fire
METEOR_BLOW_RING_TILT.
Referenced by btEffectRunMeteorBlow().
Definition at line 182 of file battle_effect_meteor_blow.c.
METEOR_BLOW_RING_TILT
#define METEOR_BLOW_RING_TILT 2000
Referenced by btEffectRunMeteorBlow().
Definition at line 183 of file battle_effect_meteor_blow.c.
Functions in detail
btEffectArmMeteorBlowPaletteDMA
void btEffectArmMeteorBlowPaletteDMA(void)
Meteor Blow's horizontal-blank callback, the same function as
battle_effect_starfield_fall.c's btEffectArmPaletteHBlankDMA: stops DMA 0,
then arms it to copy one BG palette word per scanline from the line table in
the effect state, so the backdrop's colour changes down the screen.
References syDMAXCopy().
Referenced by btEffectRunMeteorBlow().
Definition at line 8 of file battle_effect_meteor_blow.c.
btMeshBuildGrid
void btMeshBuildGrid(MESH_TRIANGLE *triangles, Sint32 columns, Sint32 rows, Sint32 cellWidth, Sint32 cellHeight)
Fills a grid of columns by rows vertices with two triangles a cell, each cell cellWidth by cellHeight texels of the texture, and ends the list with an all-zero triangle.
References Sint32.
Referenced by btEffectRunAzul(), btEffectRunDjinniCharge(), btEffectRunEclipse(), btEffectRunGeode() and btEffectRunMeteorBlow().
Definition at line 25 of file battle_effect_meteor_blow.c.
btEffectRunMeteorBlow
void btEffectRunMeteorBlow(BATTLE_EFFECT_PARM *args)
Meteor Blow: the screen goes black and the view flies through a sky of stars as a burning meteor comes in, growing, and plunges in a cone of flame; then it lands on the foes, rings of fire and billows spread from it and sparks fly up as every foe is thrown back.
Abilities: Meteor Blow.
References BattleEffectCylinderCorners, BattleEffectCylinderMesh, BattleEffectMotePictures, BattleEffectRingCorners, BattleEffectRingMesh, BgScrollWork, btCameraShake(), btEffectArmMeteorBlowPaletteDMA(), btEffectBuildBlitter(), btEffectConfigureEffectDisplay(), btEffectCreateSprites(), btEffectEndCanvasLayer(), btEffectSetupBlendedDisplay(), btEffectShowLivingTargets(), btEffectStepPaletteToResource(), btEffectTintBattler(), btEffectTransferCanvas(), btEffectTransferFullScreenImage(), btEffectWipeCanvas(), btGraphicsLoadGreyRamp(), btMeshBuildGrid(), btMotionApplyKnockbackStub(), btPaletteBrightenBattleBg(), btParticleAdvanceWithGravity2D(), btRenderAllocateModelList(), btRenderDrawModelList(), btRenderTransformVertices(), btResourceLoadAndDecompress(), fdRenderApplyProjectedPlacementStub(), fdSpriteDestroyStub(), MapGridMetatileBuffer, MeteorBlowDoubleScale, MeteorBlowPictureHeights, MeteorBlowPictures, MeteorBlowPictureWidths, MeteorBlowRingGrowth, MeteorBlowRingHeights, MeteorBlowRingStarts, MeteorBlowWaveGrowth, MeteorBlowWaveStarts, MeteorBlowWaveStretch, PerWork, ProjectionWork, Sint32, syCloseEvent(), syConvert3Dto2D(), syCos(), syHeapAllocateEWRAM(), syHeapRelease(), syHeapSlotRelease() and 12 more.
Referenced by btEffectRunSummon().
Definition at line 191 of file battle_effect_meteor_blow.c.