Skip to Content
The Alchemy Project

src/battle_effect/battle_effect_geode.c

Geode. More…

Included by battle_effect.c.

Macros

NameDescription
#defineGEODE_TICKS 74
#defineGEODE_CLOD_RINGS 16The clod of earth: the battlefield's picture wrapped round a cylinder of GEODE_CYLINDER_RADIUS, GEODE_CLOD_RINGS rings of GEODE_CLOD_RING_VERTICES stacked GEODE_RING_SPACING apart, which over GEODE_ROLL_TICKS rolls up into a ball of GEODE_CLOD_RADIUS, its rings from pole to pole.
#defineGEODE_CLOD_RING_VERTICES 16
#defineGEODE_CLOD_VERTICES (GEODE_CLOD_RINGS * GEODE_CLOD_RING_VERTICES)
#defineGEODE_RING_SPACING 8
#defineGEODE_CLOD_TOP (-GEODE_CLOD_RINGS * GEODE_RING_SPACING / 2)
#defineGEODE_RING_TURN (DEGtoANG(180) / (GEODE_CLOD_RINGS - 1))
#defineGEODE_CYLINDER_RADIUS 56
#defineGEODE_CLOD_RADIUS 48
#defineGEODE_ROLL_TICKS 16
#defineGEODE_TUMBLE_TICK 8From GEODE_TUMBLE_TICK the clod tumbles forward, faster and then slower, along a sine that advances GEODE_TUMBLE_STEP a tick.
#defineGEODE_TUMBLE_STEP 924
#defineGEODE_ZOOM_ONE 32BG2 shows the canvas at zoom / GEODE_ZOOM_ONE times its width: twice, the battlefield at its own size, while the clod is flat, and once when it is round.
#defineGEODE_FLIGHT_TICK 36From GEODE_FLIGHT_TICK the clod flies onto the target over GEODE_FLIGHT_TICKS, the Djinni streaking behind it, and lands at GEODE_CRASH_TICK.
#defineGEODE_FLIGHT_TICKS 12
#defineGEODE_CRASH_TICK (GEODE_FLIGHT_TICK + GEODE_FLIGHT_TICKS)
#defineGEODE_BILLOW_TILT 1000The billows lean back GEODE_BILLOW_TILT.
#defineGEODE_CLOD_CORNERS (GEODE_CLOD_VERTICES * sizeof(PROJECTED_VERTEX))The effect's pictures open with the clod's projected corners, then its corners and its mesh; BillowTexture and VenusDjinnSmallSheet are decoded further on.
#defineGEODE_CLOD_MESH
#defineGEODE_BILLOW 18192
#defineGEODE_DJINNI_PICTURE 26048the small Venus Djinni

Functions

NameDescription
voidbtEffectRunGeode (BATTLE_EFFECT_PARM *args)The battlefield itself rolls up into a clod of earth over the caster, spinning and tumbling, and flies onto the target with the Venus Djinni streaking behind it in fire; it lands in a white flash, billows of fire burst up and the screen shakes, and the backdrop comes back.

Description

Geode. Part of battle_effect.c.

Macros in detail

GEODE_TICKS

#define GEODE_TICKS 74

Referenced by btEffectRunGeode().

Definition at line 3 of file battle_effect_geode.c.

GEODE_CLOD_RINGS

#define GEODE_CLOD_RINGS 16

The clod of earth: the battlefield's picture wrapped round a cylinder of GEODE_CYLINDER_RADIUS, GEODE_CLOD_RINGS rings of GEODE_CLOD_RING_VERTICES stacked GEODE_RING_SPACING apart, which over GEODE_ROLL_TICKS rolls up into a ball of GEODE_CLOD_RADIUS, its rings from pole to pole.

Referenced by btEffectRunGeode().

Definition at line 9 of file battle_effect_geode.c.

GEODE_CLOD_RING_VERTICES

#define GEODE_CLOD_RING_VERTICES 16

Referenced by btEffectRunGeode().

Definition at line 10 of file battle_effect_geode.c.

GEODE_CLOD_VERTICES

#define GEODE_CLOD_VERTICES (GEODE_CLOD_RINGS * GEODE_CLOD_RING_VERTICES)

Referenced by btEffectRunGeode().

Definition at line 11 of file battle_effect_geode.c.

GEODE_RING_SPACING

#define GEODE_RING_SPACING 8

Referenced by btEffectRunGeode().

Definition at line 12 of file battle_effect_geode.c.

GEODE_CLOD_TOP

#define GEODE_CLOD_TOP (-GEODE_CLOD_RINGS * GEODE_RING_SPACING / 2)

Referenced by btEffectRunGeode().

Definition at line 13 of file battle_effect_geode.c.

GEODE_RING_TURN

#define GEODE_RING_TURN (DEGtoANG(180) / (GEODE_CLOD_RINGS - 1))

Referenced by btEffectRunGeode().

Definition at line 14 of file battle_effect_geode.c.

GEODE_CYLINDER_RADIUS

#define GEODE_CYLINDER_RADIUS 56

Referenced by btEffectRunGeode().

Definition at line 15 of file battle_effect_geode.c.

GEODE_CLOD_RADIUS

#define GEODE_CLOD_RADIUS 48

Referenced by btEffectRunGeode().

Definition at line 16 of file battle_effect_geode.c.

GEODE_ROLL_TICKS

#define GEODE_ROLL_TICKS 16

Referenced by btEffectRunGeode().

Definition at line 17 of file battle_effect_geode.c.

GEODE_TUMBLE_TICK

#define GEODE_TUMBLE_TICK 8

From GEODE_TUMBLE_TICK the clod tumbles forward, faster and then slower, along a sine that advances GEODE_TUMBLE_STEP a tick.

Referenced by btEffectRunGeode().

Definition at line 20 of file battle_effect_geode.c.

GEODE_TUMBLE_STEP

#define GEODE_TUMBLE_STEP 924

Referenced by btEffectRunGeode().

Definition at line 21 of file battle_effect_geode.c.

GEODE_ZOOM_ONE

#define GEODE_ZOOM_ONE 32

BG2 shows the canvas at zoom / GEODE_ZOOM_ONE times its width: twice, the battlefield at its own size, while the clod is flat, and once when it is round.

Referenced by btEffectRunGeode().

Definition at line 25 of file battle_effect_geode.c.

GEODE_FLIGHT_TICK

#define GEODE_FLIGHT_TICK 36

From GEODE_FLIGHT_TICK the clod flies onto the target over GEODE_FLIGHT_TICKS, the Djinni streaking behind it, and lands at GEODE_CRASH_TICK.

Referenced by btEffectRunGeode().

Definition at line 30 of file battle_effect_geode.c.

GEODE_FLIGHT_TICKS

#define GEODE_FLIGHT_TICKS 12

Referenced by btEffectRunGeode().

Definition at line 31 of file battle_effect_geode.c.

GEODE_CRASH_TICK

#define GEODE_CRASH_TICK (GEODE_FLIGHT_TICK + GEODE_FLIGHT_TICKS)

Referenced by btEffectRunGeode().

Definition at line 32 of file battle_effect_geode.c.

GEODE_BILLOW_TILT

#define GEODE_BILLOW_TILT 1000

The billows lean back GEODE_BILLOW_TILT.

Referenced by btEffectRunGeode().

Definition at line 34 of file battle_effect_geode.c.

GEODE_CLOD_CORNERS

#define GEODE_CLOD_CORNERS (GEODE_CLOD_VERTICES * sizeof(PROJECTED_VERTEX))

The effect's pictures open with the clod's projected corners, then its corners and its mesh; BillowTexture and VenusDjinnSmallSheet are decoded further on.

Referenced by btEffectRunGeode().

Definition at line 39 of file battle_effect_geode.c.

GEODE_CLOD_MESH

#define GEODE_CLOD_MESH

Referenced by btEffectRunGeode().

Definition at line 40 of file battle_effect_geode.c.

GEODE_BILLOW

#define GEODE_BILLOW 18192

Referenced by btEffectRunGeode().

Definition at line 42 of file battle_effect_geode.c.

GEODE_DJINNI_PICTURE

#define GEODE_DJINNI_PICTURE 26048

the small Venus Djinni

Referenced by btEffectRunGeode().

Definition at line 43 of file battle_effect_geode.c.

Functions in detail

btEffectRunGeode

void btEffectRunGeode(BATTLE_EFFECT_PARM *args)

The battlefield itself rolls up into a clod of earth over the caster, spinning and tumbling, and flies onto the target with the Venus Djinni streaking behind it in fire; it lands in a white flash, billows of fire burst up and the screen shakes, and the backdrop comes back.

Abilities: Geode.

References BattleEffectRingMesh, BgScrollWork, btBackgroundLoadStub(), btCameraShake(), btColorBufferScaleStub(), btDisplayApplyBg2Affine(), btEffectBuildCanvasTilemap(), btEffectConfigureEffectDisplay(), btEffectEndCanvasLayer(), btEffectPosProjectBattler(), btEffectProcessPendingBlock2Transfer(), btEffectRunDjinniEntrance(), btEffectStartCanvasLayer(), btEffectTintBattler(), btEffectTransferCanvas(), btMeshBuildGrid(), btObjectGetStub(), btRenderAllocateModelList(), btRenderDrawModelList(), btRenderTransformVertices(), btResourceLoadAndDecompress(), fdActorSetAnimationSpeedStub(), GeodeRingCorners, GeodeWaveGrowth, GeodeWaveHeights, GeodeWaveStarts, MapGridMetatileBuffer, Sint32, syCloseEvent(), syCos(), syHeapAllocateEWRAM(), syHeapRelease(), syHeapSlotRelease(), syInitMatrix(), syResourceGetTableEntry(), syRotX(), syRotY(), syScale(), sySetEvent(), sySin(), sySoundPlayStub() and syTranslate().

Referenced by BattleEffectHandlers.

Definition at line 51 of file battle_effect_geode.c.