Skip to Content
The Alchemy Project

src/battle_effect/battle_effect_megiddo.c

Megiddo, the Sol Blade's unleash. More…

Included by battle_effect.c.

Macros

NameDescription
#defineMEGIDDO_TICKS 188
#defineMEGIDDO_GLOW_BAND 2048Where the textures are decoded: FlameGradientTexture at the start of the effect's pictures, then GlowBandTextureA, FireStripesTexture's five 64x16 pictures of the corona's flames and DustBlobSheet's 32x32 cloud; FireRingTexture in the map cell buffer.
#defineMEGIDDO_FIRE_STRIPES 4096
#defineMEGIDDO_FIRE_STRIPES_WIDTH 64
#defineMEGIDDO_FIRE_STRIPES_HEIGHT 16
#defineMEGIDDO_FIRE_STRIPES_PICTURES 5
#defineMEGIDDO_DUST_BLOB 9216
#defineMEGIDDO_DUST_BLOB_SIZE 32
#defineMEGIDDO_FIRE_RING 16384
#defineMEGIDDO_TRANSFORMED (RamMapMetatileBuffer + 4096)The turned corners of the corona and of the flames, and the corona's strip, in the map cell buffer; the flames' corners and their strip in the effect's pictures.
#defineMEGIDDO_CORONA_MESH (RamMapMetatileBuffer + 8192)
#defineMEGIDDO_FLAME_CORNERS 24384
#defineMEGIDDO_FLAME_MESH 25408
#defineMEGIDDO_CORONA_QUADS 32The sun's corona: a ring of MEGIDDO_CORONA_QUADS quads of the fire stripes round the sun, from MEGIDDO_CORONA_INNER_RADIUS out to a flickering MEGIDDO_CORONA_OUTER_RADIUS, scaled by MEGIDDO_CORONA_SCALE with the sun.
#defineMEGIDDO_CORONA_VERTICES ((MEGIDDO_CORONA_QUADS + 1) * 2)
#defineMEGIDDO_CORONA_INNER_RADIUS 80
#defineMEGIDDO_CORONA_OUTER_RADIUS 120
#defineMEGIDDO_CORONA_SCALE toFIXED(0.71009)
#defineMEGIDDO_FLAMES 10The flames that wrap the falling sun: MEGIDDO_FLAMES bands of the cloud turned 3/32 of a turn apart about it, each a quarter circle of MEGIDDO_FLAME_ROWS rows from its point to its rim, MEGIDDO_FLAME_RADIUS round and an eighth of a turn wide.
#defineMEGIDDO_FLAME_ROWS 16
#defineMEGIDDO_FLAME_VERTICES (MEGIDDO_FLAME_ROWS * 2)
#defineMEGIDDO_FLAME_RADIUS 48
#defineMEGIDDO_FLAME_SCROLL_STEP 20
#defineMEGIDDO_FLAME_SCROLL_MASK 0x7f
#defineMEGIDDO_FALL_TILT (TRIG_TURN * 3 / 16)As the sun falls, its flames and the sparks about it start turned by MEGIDDO_FALL_TILT about the screen's horizontal and turn back over MEGIDDO_FALL_TILT_TICKS.
#defineMEGIDDO_FALL_TILT_TICKS 32
#defineMEGIDDO_SUN_GROWTH toFIXED(0.01886)How much the falling sun's scale grows a tick, from a quarter to three quarters.
#defineMEGIDDO_HAZE_SPEED 16How many lines a tick the red haze scrolls at its fastest; it slows to a stop at MEGIDDO_HAZE_REST_TICK.
#defineMEGIDDO_HAZE_REST_TICK 72
#defineMEGIDDO_HAZE_FADE_RED 8The red haze's colours: raised as it loads, its red by MEGIDDO_HAZE_FADE_RED and its green and blue by MEGIDDO_HAZE_FADE; lowered again as the sun falls, the red by MEGIDDO_HAZE_FALL_FADE_RED, below where it loaded.
#defineMEGIDDO_HAZE_FADE 2
#defineMEGIDDO_HAZE_FALL_FADE_RED 12
#defineMEGIDDO_STRIKE_FILL_LEVEL 16Once the sun strikes, the canvas is filled at this level after each copy.
#defineMEGIDDO_FLASHES 5The rings of light, FireRingTexture flashing out from the caster as the effect starts and from the target as the sun strikes (MegiddoFlash*).
#defineMEGIDDO_FLASH_SHINE_TICKS 8
#defineMEGIDDO_RAYS 8The rays that fan out about the caster (MegiddoRay*), the flame of FlameGradientTexture stretched long: one every two ticks from MEGIDDO_RAYS_START, each for MEGIDDO_RAY_TICKS, shrinking away over the last MEGIDDO_RAY_SHRINK_TICKS.
#defineMEGIDDO_RAYS_START 16
#defineMEGIDDO_RAY_TICKS 64
#defineMEGIDDO_RAY_SHRINK_TICKS 16

Functions

NameDescription
voidbtEffectRunMegiddo (BATTLE_EFFECT_PARM *args)Megiddo: the caster leaps and hangs in the air before a red haze, rings of light flashing round them, rays fanning out about them and sparks rising; a burning sun sweeps down across the sky, then falls onto the target wrapped in flames and bursts in rings of light.

Description

Megiddo, the Sol Blade's unleash. Part of battle_effect.c.

Macros in detail

MEGIDDO_TICKS

#define MEGIDDO_TICKS 188

Referenced by btEffectRunMegiddo().

Definition at line 3 of file battle_effect_megiddo.c.

MEGIDDO_GLOW_BAND

#define MEGIDDO_GLOW_BAND 2048

Where the textures are decoded: FlameGradientTexture at the start of the effect's pictures, then GlowBandTextureA, FireStripesTexture's five 64x16 pictures of the corona's flames and DustBlobSheet's 32x32 cloud; FireRingTexture in the map cell buffer.

Referenced by btEffectRunMegiddo().

Definition at line 9 of file battle_effect_megiddo.c.

MEGIDDO_FIRE_STRIPES

#define MEGIDDO_FIRE_STRIPES 4096

Referenced by btEffectRunMegiddo().

Definition at line 10 of file battle_effect_megiddo.c.

MEGIDDO_FIRE_STRIPES_WIDTH

#define MEGIDDO_FIRE_STRIPES_WIDTH 64

Definition at line 11 of file battle_effect_megiddo.c.

MEGIDDO_FIRE_STRIPES_HEIGHT

#define MEGIDDO_FIRE_STRIPES_HEIGHT 16

Referenced by btEffectRunMegiddo().

Definition at line 12 of file battle_effect_megiddo.c.

MEGIDDO_FIRE_STRIPES_PICTURES

#define MEGIDDO_FIRE_STRIPES_PICTURES 5

Referenced by btEffectRunMegiddo().

Definition at line 13 of file battle_effect_megiddo.c.

MEGIDDO_DUST_BLOB

#define MEGIDDO_DUST_BLOB 9216

Referenced by btEffectRunMegiddo().

Definition at line 14 of file battle_effect_megiddo.c.

MEGIDDO_DUST_BLOB_SIZE

#define MEGIDDO_DUST_BLOB_SIZE 32

Referenced by btEffectRunMegiddo().

Definition at line 15 of file battle_effect_megiddo.c.

MEGIDDO_FIRE_RING

#define MEGIDDO_FIRE_RING 16384

Referenced by btEffectRunMegiddo().

Definition at line 16 of file battle_effect_megiddo.c.

MEGIDDO_TRANSFORMED

#define MEGIDDO_TRANSFORMED (RamMapMetatileBuffer + 4096)

The turned corners of the corona and of the flames, and the corona's strip, in the map cell buffer; the flames' corners and their strip in the effect's pictures.

Referenced by btEffectRunMegiddo().

Definition at line 21 of file battle_effect_megiddo.c.

MEGIDDO_CORONA_MESH

#define MEGIDDO_CORONA_MESH (RamMapMetatileBuffer + 8192)

Referenced by btEffectRunMegiddo().

Definition at line 22 of file battle_effect_megiddo.c.

MEGIDDO_FLAME_CORNERS

#define MEGIDDO_FLAME_CORNERS 24384

Referenced by btEffectRunMegiddo().

Definition at line 23 of file battle_effect_megiddo.c.

MEGIDDO_FLAME_MESH

#define MEGIDDO_FLAME_MESH 25408

Referenced by btEffectRunMegiddo().

Definition at line 24 of file battle_effect_megiddo.c.

MEGIDDO_CORONA_QUADS

#define MEGIDDO_CORONA_QUADS 32

The sun's corona: a ring of MEGIDDO_CORONA_QUADS quads of the fire stripes round the sun, from MEGIDDO_CORONA_INNER_RADIUS out to a flickering MEGIDDO_CORONA_OUTER_RADIUS, scaled by MEGIDDO_CORONA_SCALE with the sun.

Referenced by btEffectRunMegiddo().

Definition at line 29 of file battle_effect_megiddo.c.

MEGIDDO_CORONA_VERTICES

#define MEGIDDO_CORONA_VERTICES ((MEGIDDO_CORONA_QUADS + 1) * 2)

Referenced by btEffectRunMegiddo().

Definition at line 30 of file battle_effect_megiddo.c.

MEGIDDO_CORONA_INNER_RADIUS

#define MEGIDDO_CORONA_INNER_RADIUS 80

Referenced by btEffectRunMegiddo().

Definition at line 31 of file battle_effect_megiddo.c.

MEGIDDO_CORONA_OUTER_RADIUS

#define MEGIDDO_CORONA_OUTER_RADIUS 120

Referenced by btEffectRunMegiddo().

Definition at line 32 of file battle_effect_megiddo.c.

MEGIDDO_CORONA_SCALE

#define MEGIDDO_CORONA_SCALE toFIXED(0.71009)

Referenced by btEffectRunMegiddo().

Definition at line 33 of file battle_effect_megiddo.c.

MEGIDDO_FLAMES

#define MEGIDDO_FLAMES 10

The flames that wrap the falling sun: MEGIDDO_FLAMES bands of the cloud turned 3/32 of a turn apart about it, each a quarter circle of MEGIDDO_FLAME_ROWS rows from its point to its rim, MEGIDDO_FLAME_RADIUS round and an eighth of a turn wide. Each band's cloud is scrolled MEGIDDO_FLAME_SCROLL_STEP texels on from the one before.

Referenced by btEffectRunMegiddo().

Definition at line 40 of file battle_effect_megiddo.c.

MEGIDDO_FLAME_ROWS

#define MEGIDDO_FLAME_ROWS 16

Referenced by btEffectRunMegiddo().

Definition at line 41 of file battle_effect_megiddo.c.

MEGIDDO_FLAME_VERTICES

#define MEGIDDO_FLAME_VERTICES (MEGIDDO_FLAME_ROWS * 2)

Referenced by btEffectRunMegiddo().

Definition at line 42 of file battle_effect_megiddo.c.

MEGIDDO_FLAME_RADIUS

#define MEGIDDO_FLAME_RADIUS 48

Referenced by btEffectRunMegiddo().

Definition at line 43 of file battle_effect_megiddo.c.

MEGIDDO_FLAME_SCROLL_STEP

#define MEGIDDO_FLAME_SCROLL_STEP 20

Referenced by btEffectRunMegiddo().

Definition at line 44 of file battle_effect_megiddo.c.

MEGIDDO_FLAME_SCROLL_MASK

#define MEGIDDO_FLAME_SCROLL_MASK 0x7f

Referenced by btEffectRunMegiddo().

Definition at line 45 of file battle_effect_megiddo.c.

MEGIDDO_FALL_TILT

#define MEGIDDO_FALL_TILT (TRIG_TURN * 3 / 16)

As the sun falls, its flames and the sparks about it start turned by MEGIDDO_FALL_TILT about the screen's horizontal and turn back over MEGIDDO_FALL_TILT_TICKS.

Referenced by btEffectRunMegiddo().

Definition at line 50 of file battle_effect_megiddo.c.

MEGIDDO_FALL_TILT_TICKS

#define MEGIDDO_FALL_TILT_TICKS 32

Referenced by btEffectRunMegiddo().

Definition at line 51 of file battle_effect_megiddo.c.

MEGIDDO_SUN_GROWTH

#define MEGIDDO_SUN_GROWTH toFIXED(0.01886)

How much the falling sun's scale grows a tick, from a quarter to three quarters.

Referenced by btEffectRunMegiddo().

Definition at line 55 of file battle_effect_megiddo.c.

MEGIDDO_HAZE_SPEED

#define MEGIDDO_HAZE_SPEED 16

How many lines a tick the red haze scrolls at its fastest; it slows to a stop at MEGIDDO_HAZE_REST_TICK.

Referenced by btEffectRunMegiddo().

Definition at line 59 of file battle_effect_megiddo.c.

MEGIDDO_HAZE_REST_TICK

#define MEGIDDO_HAZE_REST_TICK 72

Referenced by btEffectRunMegiddo().

Definition at line 60 of file battle_effect_megiddo.c.

MEGIDDO_HAZE_FADE_RED

#define MEGIDDO_HAZE_FADE_RED 8

The red haze's colours: raised as it loads, its red by MEGIDDO_HAZE_FADE_RED and its green and blue by MEGIDDO_HAZE_FADE; lowered again as the sun falls, the red by MEGIDDO_HAZE_FALL_FADE_RED, below where it loaded.

Referenced by btEffectRunMegiddo().

Definition at line 64 of file battle_effect_megiddo.c.

MEGIDDO_HAZE_FADE

#define MEGIDDO_HAZE_FADE 2

Referenced by btEffectRunMegiddo().

Definition at line 65 of file battle_effect_megiddo.c.

MEGIDDO_HAZE_FALL_FADE_RED

#define MEGIDDO_HAZE_FALL_FADE_RED 12

Referenced by btEffectRunMegiddo().

Definition at line 66 of file battle_effect_megiddo.c.

MEGIDDO_STRIKE_FILL_LEVEL

#define MEGIDDO_STRIKE_FILL_LEVEL 16

Once the sun strikes, the canvas is filled at this level after each copy.

Referenced by btEffectRunMegiddo().

Definition at line 69 of file battle_effect_megiddo.c.

MEGIDDO_FLASHES

#define MEGIDDO_FLASHES 5

The rings of light, FireRingTexture flashing out from the caster as the effect starts and from the target as the sun strikes (MegiddoFlash*). Each shines for MEGIDDO_FLASH_SHINE_TICKS, then fades 8 levels a tick.

Referenced by btEffectRunMegiddo().

Definition at line 74 of file battle_effect_megiddo.c.

MEGIDDO_FLASH_SHINE_TICKS

#define MEGIDDO_FLASH_SHINE_TICKS 8

Referenced by btEffectRunMegiddo().

Definition at line 75 of file battle_effect_megiddo.c.

MEGIDDO_RAYS

#define MEGIDDO_RAYS 8

The rays that fan out about the caster (MegiddoRay*), the flame of FlameGradientTexture stretched long: one every two ticks from MEGIDDO_RAYS_START, each for MEGIDDO_RAY_TICKS, shrinking away over the last MEGIDDO_RAY_SHRINK_TICKS.

Referenced by btEffectRunMegiddo().

Definition at line 81 of file battle_effect_megiddo.c.

MEGIDDO_RAYS_START

#define MEGIDDO_RAYS_START 16

Referenced by btEffectRunMegiddo().

Definition at line 82 of file battle_effect_megiddo.c.

MEGIDDO_RAY_TICKS

#define MEGIDDO_RAY_TICKS 64

Referenced by btEffectRunMegiddo().

Definition at line 83 of file battle_effect_megiddo.c.

MEGIDDO_RAY_SHRINK_TICKS

#define MEGIDDO_RAY_SHRINK_TICKS 16

Referenced by btEffectRunMegiddo().

Definition at line 84 of file battle_effect_megiddo.c.

Functions in detail

btEffectRunMegiddo

void btEffectRunMegiddo(BATTLE_EFFECT_PARM *args)

Megiddo: the caster leaps and hangs in the air before a red haze, rings of light flashing round them, rays fanning out about them and sparks rising; a burning sun sweeps down across the sky, then falls onto the target wrapped in flames and bursts in rings of light.

Abilities: Megiddo.

References BattleEffectLargeSquareMesh, BattleEffectMotePictures, BattleEffectSquareCorners, BattleEffectStandingSquareCorners, BattleEffectTallMesh, BgScrollWork, btActorSpawnObjectsForListStub(), btBackgroundLoadStub(), btEffectBuildRepeatingTilemap(), btEffectCreateSprites(), btEffectPosProjectScaledBattler(), btEffectStartCanvasLayer(), btEffectStepPaletteToResource(), btEffectTintBattler(), btGraphicsLoadGreyRamp(), btMotionApplyKnockbackStub(), btMotionApproachTargetStub(), btObjectGetStub(), btObjectPutStub(), btPaletteBrightenBattleBg(), btPaletteBrightenBgEntries(), btRenderAllocateModelList(), btRenderBuildQuadStrip(), btRenderDrawModelList(), btRenderTransformVertices(), btResourceLoadAndDecompress(), fdActorSetAnimationSpeedStub(), fdRenderApplyProjectedPlacementStub(), fdSpriteDestroyStub(), MapGridMetatileBuffer, MegiddoFlashPitches, MegiddoFlashStarts, MegiddoFlashYaws, MegiddoRayPitches, MegiddoRayRolls, MegiddoRayX, MegiddoRayY, MegiddoRayYaws, PerWork, ProjectionWork, Sint32, syConvert3Dto2D(), syCos(), syHeapAllocateEWRAM(), syHeapRelease(), syInitMatrix(), syMatrixScaleUniform(), syRandom(), syRotX(), syRotY() and 5 more.

Referenced by BattleEffectHandlers.

Definition at line 92 of file battle_effect_megiddo.c.