src/battle_effect/battle_effect_odyssey.c
Odyssey, a cloud swirl nothing shows, Iris's screen wipe and teardown, and the shade ramps Iris's textures are filled with. More…
Included by battle_effect.c.
Macros
| Name | Description | |
|---|---|---|
#define | ODYSSEY_TICKS 114 | |
#define | ODYSSEY_SWORD_WIDTH 40 | The effect's pictures: GiantSwordSheet's sword at their start, then GiantSwordBladeSheet's top half of the colossal sword, then DustBlobSheet. |
#define | ODYSSEY_SWORD_HEIGHT 80 | |
#define | ODYSSEY_COLOSSAL_SWORD PICTURE_BYTES(ODYSSEY_SWORD) | |
#define | ODYSSEY_COLOSSAL_SWORD_WIDTH 158 | |
#define | ODYSSEY_COLOSSAL_SWORD_HEIGHT 56 | |
#define | ODYSSEY_DUST_BLOB | |
#define | ODYSSEY_FLAME_GRADIENT (128 * 128) | Where FlameGradientTexture is decoded in the map cell buffer, after FireRingTexture's 128 by 128 texels. |
#define | ODYSSEY_SHARDS ((PARTICLE *)(RamMapMetatileBuffer + 24576)) | The shards the hit scatters, in the map cell buffer. |
#define | ODYSSEY_SHARD_COUNT 128 | |
#define | ODYSSEY_SHARD_LEVEL 32 | The shards' canvas levels, eight from this one. |
#define | ODYSSEY_SWORDS 2 | The two swords plunge onto the target ODYSSEY_SWORD_INTERVAL ticks apart from ODYSSEY_SWORD_TICK, the first from above and the second from below; each strikes ODYSSEY_SWORD_PLUNGE_TICKS later and stays until the colossal sword's blow. |
#define | ODYSSEY_SWORD_TICK 24 | |
#define | ODYSSEY_SWORD_INTERVAL 16 | |
#define | ODYSSEY_SWORD_PLUNGE_TICKS 8 | |
#define | ODYSSEY_SWORD_HIT_TICK (ODYSSEY_SWORD_TICK + ODYSSEY_SWORD_PLUNGE_TICKS) | |
#define | ODYSSEY_SWORD_SPARKS 16 | The sparks each sword's hit scatters, in its half of the particles. |
#define | ODYSSEY_RING_TICKS 16 | The rings of light, FireRingTexture flashing out from the caster as the effect starts and from the target as each sword strikes. |
#define | ODYSSEY_RING_SHINE_TICKS 8 | |
#define | ODYSSEY_GATHER_TICK 64 | From ODYSSEY_GATHER_TICK, two rings of light close in on the caster, each for ODYSSEY_GATHER_RING_TICKS, and the caster flashes white with each. |
#define | ODYSSEY_GATHER_RING_TICKS 11 | |
#define | SWIRL_MAX_TICKS 312000 | The swirl runs until A is pressed, at most this many ticks. |
#define | SWIRL_FIRST_COLOR (6 * PALETTE_COLORS) | The swirl's colours are BG palettes 6 on, the battle background's. |
#define | SWIRL_CENTER_X (DISPLAY_WIDTH / 2) | BG2 turns the swirl about this point of the screen, where the canvas's centre stays. |
#define | SWIRL_CENTER_Y 72 | |
#define | SWIRL_STEP_DIVISOR 532 | BG2 shows the swirl at about twice its size: the steps of its matrix are the 16.16 sine and cosine of its turn divided by this. |
#define | WIPE_DISTANCE 192 | The wipe's band slides this far along BG2, from just off one edge of the screen until it has passed the other. |
#define | WIPE_EDGE_WIDTH 32 | The band brightens over this many columns at its left and dims over as many at its right. |
Functions
| Name | Description | |
|---|---|---|
void | btEffectRunOdyssey (BATTLE_EFFECT_PARM *args) | "Pierce a foe with a colossal sword." The red haze, turned blue, scrolls behind the caster and the target alone; two rings of light flash out from the caster, and two swords plunge onto the target, one from above and one from below, each with a ring and a burst of sparks. |
void | btEffectRunCloudSwirl (BATTLE_EFFECT_PARM *args) | Unused: reached only from btEffectRunBackgroundFadeIn, which nothing refers to. |
void | btIrisWipeScreen (Uint8 side, Uint8 speed, void (*midpoint)(void)) | Iris's screen wipe: a soft-edged white band, drawn once into the canvas and stretched across BG2, slides over the screen from the right (side 0, a positive speed) or from the left (side 1, a negative speed), speed pixels a tick. |
void | btSpriteSetColorMode (SPR *sprite, Sint32 mode) | Unused: sets the colour mode of each running animation layer of a sprite and marks it for redrawing, as fdActorSetSpriteColor does for an actor's. |
void | btEffectBuildShadeRamp (Uint8 *table, Uint32 count, Sint32 scale) | Unused: nothing calls it. |
void | btEffectBuildShadeRampWave (Uint8 *table, Uint32 count, Uint32 repeats, Sint32 scale) | Unused: nothing calls it. |
void | btEffectBuildSteepShadeRampWave (Uint8 *table, Uint32 count, Uint32 repeats, Sint32 scale) | As btEffectBuildShadeRampWave, at twice the step. |
void | btIrisRestoreBattle (void) | Iris's teardown: sets each target back on the ground at the battle origin with the usual bounce, frees the battle background, centres the projection again, reloads the sprites' basic colours and brings back the battle's own backdrop. |
Description
Odyssey, a cloud swirl nothing shows, Iris's screen wipe and teardown, and
the shade ramps Iris's textures are filled with. Part of battle_effect.c.
Macros in detail
ODYSSEY_TICKS
#define ODYSSEY_TICKS 114
Referenced by btEffectRunOdyssey().
Definition at line 4 of file battle_effect_odyssey.c.
ODYSSEY_SWORD_WIDTH
#define ODYSSEY_SWORD_WIDTH 40
The effect's pictures: GiantSwordSheet's sword at their start, then GiantSwordBladeSheet's top half of the colossal sword, then DustBlobSheet.
Referenced by btEffectRunOdyssey().
Definition at line 8 of file battle_effect_odyssey.c.
ODYSSEY_SWORD_HEIGHT
#define ODYSSEY_SWORD_HEIGHT 80
Referenced by btEffectRunOdyssey().
Definition at line 9 of file battle_effect_odyssey.c.
ODYSSEY_COLOSSAL_SWORD
#define ODYSSEY_COLOSSAL_SWORD PICTURE_BYTES(ODYSSEY_SWORD)
Referenced by btEffectRunOdyssey().
Definition at line 10 of file battle_effect_odyssey.c.
ODYSSEY_COLOSSAL_SWORD_WIDTH
#define ODYSSEY_COLOSSAL_SWORD_WIDTH 158
Referenced by btEffectRunOdyssey().
Definition at line 11 of file battle_effect_odyssey.c.
ODYSSEY_COLOSSAL_SWORD_HEIGHT
#define ODYSSEY_COLOSSAL_SWORD_HEIGHT 56
Referenced by btEffectRunOdyssey().
Definition at line 12 of file battle_effect_odyssey.c.
ODYSSEY_DUST_BLOB
#define ODYSSEY_DUST_BLOB
Referenced by btEffectRunOdyssey().
Definition at line 13 of file battle_effect_odyssey.c.
ODYSSEY_FLAME_GRADIENT
#define ODYSSEY_FLAME_GRADIENT (128 * 128)
Where FlameGradientTexture is decoded in the map cell buffer, after FireRingTexture's 128 by 128 texels.
Referenced by btEffectRunOdyssey().
Definition at line 18 of file battle_effect_odyssey.c.
ODYSSEY_SHARDS
#define ODYSSEY_SHARDS ((PARTICLE *)(RamMapMetatileBuffer + 24576))
The shards the hit scatters, in the map cell buffer.
Referenced by btEffectRunOdyssey().
Definition at line 21 of file battle_effect_odyssey.c.
ODYSSEY_SHARD_COUNT
#define ODYSSEY_SHARD_COUNT 128
Referenced by btEffectRunOdyssey().
Definition at line 22 of file battle_effect_odyssey.c.
ODYSSEY_SHARD_LEVEL
#define ODYSSEY_SHARD_LEVEL 32
The shards' canvas levels, eight from this one.
Referenced by btEffectRunOdyssey().
Definition at line 24 of file battle_effect_odyssey.c.
ODYSSEY_SWORDS
#define ODYSSEY_SWORDS 2
The two swords plunge onto the target ODYSSEY_SWORD_INTERVAL ticks apart from
ODYSSEY_SWORD_TICK, the first from above and the second from below; each
strikes ODYSSEY_SWORD_PLUNGE_TICKS later and stays until the colossal sword's
blow.
Referenced by btEffectRunOdyssey().
Definition at line 30 of file battle_effect_odyssey.c.
ODYSSEY_SWORD_TICK
#define ODYSSEY_SWORD_TICK 24
Referenced by btEffectRunOdyssey().
Definition at line 31 of file battle_effect_odyssey.c.
ODYSSEY_SWORD_INTERVAL
#define ODYSSEY_SWORD_INTERVAL 16
Referenced by btEffectRunOdyssey().
Definition at line 32 of file battle_effect_odyssey.c.
ODYSSEY_SWORD_PLUNGE_TICKS
#define ODYSSEY_SWORD_PLUNGE_TICKS 8
Referenced by btEffectRunOdyssey().
Definition at line 33 of file battle_effect_odyssey.c.
ODYSSEY_SWORD_HIT_TICK
#define ODYSSEY_SWORD_HIT_TICK (ODYSSEY_SWORD_TICK + ODYSSEY_SWORD_PLUNGE_TICKS)
Referenced by btEffectRunOdyssey().
Definition at line 34 of file battle_effect_odyssey.c.
ODYSSEY_SWORD_SPARKS
#define ODYSSEY_SWORD_SPARKS 16
The sparks each sword's hit scatters, in its half of the particles.
Referenced by btEffectRunOdyssey().
Definition at line 36 of file battle_effect_odyssey.c.
ODYSSEY_RING_TICKS
#define ODYSSEY_RING_TICKS 16
The rings of light, FireRingTexture flashing out from the caster as the
effect starts and from the target as each sword strikes. Each is drawn for
ODYSSEY_RING_TICKS: it shines for ODYSSEY_RING_SHINE_TICKS, then fades 8
levels a tick.
Referenced by btEffectRunOdyssey().
Definition at line 42 of file battle_effect_odyssey.c.
ODYSSEY_RING_SHINE_TICKS
#define ODYSSEY_RING_SHINE_TICKS 8
Referenced by btEffectRunOdyssey().
Definition at line 43 of file battle_effect_odyssey.c.
ODYSSEY_GATHER_TICK
#define ODYSSEY_GATHER_TICK 64
From ODYSSEY_GATHER_TICK, two rings of light close in on the caster, each for
ODYSSEY_GATHER_RING_TICKS, and the caster flashes white with each.
Referenced by btEffectRunOdyssey().
Definition at line 47 of file battle_effect_odyssey.c.
ODYSSEY_GATHER_RING_TICKS
#define ODYSSEY_GATHER_RING_TICKS 11
Referenced by btEffectRunOdyssey().
Definition at line 48 of file battle_effect_odyssey.c.
SWIRL_MAX_TICKS
#define SWIRL_MAX_TICKS 312000
The swirl runs until A is pressed, at most this many ticks.
Referenced by btEffectRunCloudSwirl().
Definition at line 555 of file battle_effect_odyssey.c.
SWIRL_FIRST_COLOR
#define SWIRL_FIRST_COLOR (6 * PALETTE_COLORS)
The swirl's colours are BG palettes 6 on, the battle background's.
Referenced by btEffectRunCloudSwirl().
Definition at line 558 of file battle_effect_odyssey.c.
SWIRL_CENTER_X
#define SWIRL_CENTER_X (DISPLAY_WIDTH / 2)
BG2 turns the swirl about this point of the screen, where the canvas's centre stays.
Referenced by btEffectRunCloudSwirl().
Definition at line 562 of file battle_effect_odyssey.c.
SWIRL_CENTER_Y
#define SWIRL_CENTER_Y 72
Referenced by btEffectRunCloudSwirl().
Definition at line 563 of file battle_effect_odyssey.c.
SWIRL_STEP_DIVISOR
#define SWIRL_STEP_DIVISOR 532
BG2 shows the swirl at about twice its size: the steps of its matrix are the 16.16 sine and cosine of its turn divided by this.
Referenced by btEffectRunCloudSwirl().
Definition at line 567 of file battle_effect_odyssey.c.
WIPE_DISTANCE
#define WIPE_DISTANCE 192
The wipe's band slides this far along BG2, from just off one edge of the screen until it has passed the other.
Referenced by btIrisWipeScreen().
Definition at line 698 of file battle_effect_odyssey.c.
WIPE_EDGE_WIDTH
#define WIPE_EDGE_WIDTH 32
The band brightens over this many columns at its left and dims over as many at its right.
Referenced by btIrisWipeScreen().
Definition at line 701 of file battle_effect_odyssey.c.
Functions in detail
btEffectRunOdyssey
void btEffectRunOdyssey(BATTLE_EFFECT_PARM *args)
"Pierce a foe with a colossal sword." The red haze, turned blue, scrolls behind the caster and the target alone; two rings of light flash out from the caster, and two swords plunge onto the target, one from above and one from below, each with a ring and a burst of sparks. Rings close in on the caster, who charges (tick 84); the colossal sword sweeps across the screen (86) and pierces the target (90), scattering 128 tumbling shards, and from tick 100 everything fades to white before the battle's own backdrop returns.
Abilities: Odyssey.
References BattleEffectLargeSquareMesh, BattleEffectMotePictures, BattleEffectSquareCorners, BattleEffectTriangleCorners, BattleEffectTriangleMesh, BgScrollWork, btActorSpawnObjectsForListStub(), btBackgroundLoadStub(), btCameraApplyVerticalShake(), btEffectBuildRepeatingTilemap(), btEffectPosProjectScaledBattler(), btEffectSetApproachMotion(), btEffectStartCanvasLayer(), btEffectTintBattler(), btGraphicsLoadGreyRamp(), btObjectGetStub(), btObjectPutStub(), btPaletteBrightenBgEntries(), btParticleAdvanceWithGravity2D(), btParticleAdvanceWithGravity3D(), btRenderAllocateModelList(), btRenderDrawModelList(), btRenderTransformVertices(), btResourceLoadAndDecompress(), fdActorSelectAnimationStub(), fdActorSetAnimationSpeedStub(), MapGridMetatileBuffer, OdysseyFlashPitches, OdysseyFlashYaws, Sint32, syCos(), syHeapAllocateEWRAM(), syHeapRelease(), syHeapSlotRelease(), syInitMatrix(), syRandom(), syRotX(), syRotY(), syScale(), sySin(), sySoundPlayStub() and syTranslate().
Referenced by BattleEffectHandlers.
Definition at line 59 of file battle_effect_odyssey.c.
btEffectRunCloudSwirl
void btEffectRunCloudSwirl(BATTLE_EFFECT_PARM *args)
Unused: reached only from btEffectRunBackgroundFadeIn, which nothing refers
to. A turning cloud swirl on BG2: the cloud sprite sheet is drawn once into
the canvas in the battle background's colours and copied twice across the map
buffer; then BG2 turns about the screen while BG1 scrolls, the palette
flashes white at the start, steps toward BlueFlameSheet's colours every
fourth tick and from tick 120 dims. B starts it over and A ends it.
References BgScrollWork, btEffectBuildBlitter(), btEffectEndCanvasLayer(), btEffectStartCanvasLayer(), btEffectStepPaletteToResource(), btEffectTransferCanvas(), btEffectTransferFullScreenImage(), btPaletteBrightenBgEntries(), btResourceLoadAndDecompress(), PerWork, Sint32, syCloseEvent(), syCos(), syDecompressTaggedLZ(), syHeapSlotRelease(), syResourceGetTableEntry(), sySetEvent(), sySin(), sySynch() and syWordsCopy().
Referenced by btEffectRunBackgroundFadeIn().
Definition at line 575 of file battle_effect_odyssey.c.
btIrisWipeScreen
void btIrisWipeScreen(Uint8 side, Uint8 speed, void (*midpoint)(void))
Iris's screen wipe: a soft-edged white band, drawn once into the canvas and stretched across BG2, slides over the screen from the right (side 0, a positive speed) or from the left (side 1, a negative speed), speed pixels a tick. Halfway through, while the band covers the screen, it calls midpoint to change the scene behind it.
References Sint32 and syHeapSlotRelease().
Referenced by btEffectRunIris().
Definition at line 708 of file battle_effect_odyssey.c.
btSpriteSetColorMode
void btSpriteSetColorMode(SPR *sprite, Sint32 mode)
Unused: sets the colour mode of each running animation layer of a sprite and
marks it for redrawing, as fdActorSetSpriteColor does for an actor's.
References Sint32.
Definition at line 779 of file battle_effect_odyssey.c.
btEffectBuildShadeRamp
void btEffectBuildShadeRamp(Uint8 *table, Uint32 count, Sint32 scale)
Unused: nothing calls it. Fills count bytes of table with a rising shade ramp
(0 to CANVAS_LEVEL_BRIGHTEST, by a step scaled by scale), then repeats it
seven more times.
References Sint32.
Definition at line 796 of file battle_effect_odyssey.c.
btEffectBuildShadeRampWave
void btEffectBuildShadeRampWave(Uint8 *table, Uint32 count, Uint32 repeats, Sint32 scale)
Unused: nothing calls it. Fills table with a shade ramp that rises over count bytes and falls back, repeated repeats times.
References Sint32.
Definition at line 827 of file battle_effect_odyssey.c.
btEffectBuildSteepShadeRampWave
void btEffectBuildSteepShadeRampWave(Uint8 *table, Uint32 count, Uint32 repeats, Sint32 scale)
As btEffectBuildShadeRampWave, at twice the step.
References Sint32.
Referenced by btEffectRunIris().
Definition at line 862 of file battle_effect_odyssey.c.
btIrisRestoreBattle
void btIrisRestoreBattle(void)
Iris's teardown: sets each target back on the ground at the battle origin with the usual bounce, frees the battle background, centres the projection again, reloads the sprites' basic colours and brings back the battle's own backdrop.
References btBackgroundLoadStub(), btMotionApplyKnockbackStub(), btObjectGetStub(), ProjectionWork, Sint32 and syPaletteLoadBasicSpriteColors().
Referenced by btEffectRunIris().
Definition at line 901 of file battle_effect_odyssey.c.