Skip to Content
The Alchemy Project

src/battle_effect/battle_effect_moloch.c

The Moloch and Iris summons: Moloch's snowstorm and frosty breath, and Iris's opening, petals, drops, pillars and fountain of light, with the diagonal canvas line her light bars are drawn with. More…

Included by battle_effect.c.

Structures

NameDescription
structIRIS_PETAL_SETThe petal objects' state, in the map cell buffer at byte 8000.
structIRIS_POINTA point of a streak: the head moves, the other nine trail it.
structIRIS_OPENINGThe opening's circle of light and its fifteen streaks, at byte 12000.

Macros

NameDescription
#defineMOLOCH_TICKS 296Moloch's ticks, and the tick A or B skips to.
#defineMOLOCH_SKIP_TO 232
#defineMOLOCH_SNOWFLAKES 256The snowflakes, in the map cell buffer; the snow cloud, billows rising in columns four pixels apart from MOLOCH_BILLOW_LEFT (MOLOCH_BILLOWS_SET_UP are set up, the first MOLOCH_BILLOWS drawn); the puffs of Moloch's frosty breath, from state->particles[MOLOCH_FIRST_BREATH_PUFF]; and Moloch's own sprites.
#defineMOLOCH_BILLOWS 12
#defineMOLOCH_BILLOWS_SET_UP 16
#defineMOLOCH_BILLOW_LEFT 44
#defineMOLOCH_FIRST_BREATH_PUFF 24
#defineMOLOCH_BREATH_PUFFS 16
#defineMOLOCH_SPRITES 12
#defineMOLOCH_PUFF_LIFE (6 * 4)A billow or a puff of breath lives four ticks on each of FlashBurstSheet's six pictures; the rings' texture follows them.
#defineMOLOCH_RING_TEXTURE (6 * PICTURE_BYTES(FLASH_BURST))
#defineMOLOCH_GROUND_Y 114The snowflakes land here; each falls a quarter pixel a tick for every pixel of its size.
#defineMOLOCH_SPREAD_TICK 136At this tick the snow cloud parts on Moloch and the rings start to spread.
#defineMOLOCH_RING_TILT 3000How far the rings lean back.
#defineMOLOCH_WHITENING_LEVEL 16The level the canvas is cleared to each tick as the screen whitens, before its last two ticks at the brightest.
#defineIRIS_MOTE_FADES 8Iris's sprite sheet, state->sheet: the mote set and its fading copies, then the drops' pictures (eight of each size, each a shaded circle mirrored and dimmer than the last), later overwritten by the strips' and the glow's 32x64 textures.
#defineIRIS_DROPS 6930
#defineIRIS_DROP_WIDTH 20
#defineIRIS_DROP_HEIGHT 40
#defineIRIS_SMALL_DROPS 19474
#defineIRIS_SMALL_DROP_WIDTH 12
#defineIRIS_SMALL_DROP_HEIGHT 24
#defineIRIS_DROP_PICTURES 8
#defineIRIS_TEXTURES (IRIS_MOTE_FADES * MOTE_SET_BYTES)
#defineIRIS_TEXTURE_WIDTH 32
#defineIRIS_TEXTURE_HEIGHT 64
#defineIRIS_TEXTURE_BYTES PICTURE_BYTES(IRIS_TEXTURE)
#defineIRIS_PILLAR_TEXTURE MOTE_SET_BYTESThe pillars' 16x16 texture follows the first mote set; its shaded circle is drawn first at IRIS_PILLAR_CIRCLE and mirrored into it.
#defineIRIS_PILLAR_TEXTURE_SIZE 16
#defineIRIS_PILLAR_CIRCLE 1000
#defineIRIS_RING_FADES 3The splashes' pictures, in the particle sprite sheet (RamHeapSlots->battleSheet): IRIS_RING_FADES fades each of a large and a small ring mote, IRIS_DOT_FADES of a dot and the spray's column.
#defineIRIS_DOT_FADES 8
#defineIRIS_RING_FADE_STEP 16How much dimmer each fade of a ring mote and of a dot is than the last.
#defineIRIS_DOT_FADE_STEP 8
#defineIRIS_LARGE_RING_WIDTH 7
#defineIRIS_LARGE_RING_HEIGHT 14
#defineIRIS_SMALL_RING_WIDTH 5
#defineIRIS_SMALL_RING_HEIGHT 10
#defineIRIS_DOT_WIDTH 2
#defineIRIS_DOT_HEIGHT 4
#defineIRIS_SPRAY_WIDTH 8
#defineIRIS_SPRAY_HEIGHT 32
#defineIRIS_SPLASHESA splash's rings of dots are drawn at this many points around; its ring motes turn about it as spokes, taking their next picture every IRIS_RING_FADE_TICKS.
#defineIRIS_SPLASH_POINTS 64
#defineIRIS_SPLASH_SPOKES 8
#defineIRIS_RING_FADE_TICKS 12
#defineIRIS_TURN_64THS (n) ((n) << 10)An angle of n 64ths of a turn (TRIG_TURN / 64 each): a splash's ring has IRIS_SPLASH_POINTS points about a turn.
#defineDIAGONAL_LINE_MAX 48the most pixels a diagonal line runs
#defineIRIS_PETALS 36Iris's runs: the pink petals (PinkPetalsTiles, fifteen pictures of a petal tumbling), the motes in state->particles, and the opening's streaks, each a head and the points that trail it.
#defineIRIS_PETAL_PICTURES 15
#defineIRIS_PETAL_SIZE 16A petal's 16-colour sprite, in IRIS_PETAL_PALETTE.
#defineIRIS_PETAL_BYTES (IRIS_PETAL_SIZE * IRIS_PETAL_SIZE / 2)
#defineIRIS_PETAL_PALETTE 15
#defineIRIS_PETAL_TICK (1 << 8)One tick of a petal's life, which counts down in its high byte; the petal is drawn at twice its life's scale.
#defineIRIS_PETAL_SHRINK (ticks) ((ticks) >> 1 << 11)As she appears her petals fly out, shrinking a 32nd of their size (toFIXED(1) / 32) every two ticks; IRIS_PETAL_SHRINK is how much after so many ticks.
#defineIRIS_SCREEN_X_FX (canvasX) ((canvasX) << 17)A canvas x as a 16.16 x on the screen, where the canvas is shown at twice its width.
#defineIRIS_MOTES 32
#defineIRIS_MOTE_SIZE 0xfA mote's variant: its size in pixels in the low bits; IRIS_MOTE_FADING to fade through the faded mote sets once it is IRIS_MOTE_FADE_AGE ticks old; IRIS_MOTE_GLOWING to be drawn instead as a glow, a textured quad that grows and fades through the IRIS_GLOW_TEXTURES once it is IRIS_GLOW_FADE_AGE ticks old.
#defineIRIS_MOTE_FADING 0x10
#defineIRIS_MOTE_GLOWING 0x100
#defineIRIS_MOTE_FADE_AGE 32
#defineIRIS_GLOW_FADE_AGE 24
#defineIRIS_GLOW_TEXTURES 8
#defineIRIS_FIRST_MOTES 12The motes that burst from her as she appears, half each way, and the random part of their speed, in sixteenths of a pixel a tick.
#defineIRIS_MOTE_DRIFT_MASK 31
#defineIRIS_STREAKS 15
#defineIRIS_STREAK_LENGTH 10
#defineIRIS_GODDESS_COLUMNS 4Iris herself, RobedGoddessTiles as a 4 x 4 grid of 32x32 sprites.
#defineIRIS_GODDESS_ROWS 4
#defineIRIS_GODDESS_SPRITES (IRIS_GODDESS_COLUMNS * IRIS_GODDESS_ROWS)
#defineIRIS_GODDESS_TILE 32
#defineIRIS_GODDESS_SPRITE_BYTES (IRIS_GODDESS_TILE * IRIS_GODDESS_TILE)A sprite of her 256-colour figure, a byte a pixel.
#defineIRIS_DURING (tick, first, last)Whether tick is one of first to last, both included.
#defineIRIS_APPEAR_TICK 176The summon's milestones.
#defineIRIS_ARRIVAL_TICK 229She comes to rest, and the next tick the drops' pictures are made.
#defineIRIS_DROPS_TICK 230
#defineIRIS_DARKEN_TICK 240The sunset darkens from here.
#defineIRIS_LEAVE_TICK 351She turns white and sinks, then rises away, and is gone.
#defineIRIS_RISE_TICK 366
#defineIRIS_GONE_TICK 386
#defineIRIS_SPLASH_PETALS_TICK 279The petals the splashes throw fly from the first splash's (IrisSplashStarts[0] + 48) to ten ticks into the band of light's rise.
#defineIRIS_SPLASH_PETALS_END_TICK 411
#defineIRIS_PILLARS_TICK 370The pillars of light climb, until a band of light rises over them, from IRIS_BAND_TICK, and the sunset behind fades darker.
#defineIRIS_BAND_TICK 401
#defineIRIS_BAND_END_TICK 431
#defineIRIS_PILLARS_END_TICK 422
#defineIRIS_FOUNTAIN_TICK 446The fountain starts under the starfield; A or B after her appearance skips to it.
#defineIRIS_RIGHT_STRIP_FADE_TICK 470The fountain's two white strips throw petals every eight ticks, and the right one motes every four up from the bottom of the screen.
#defineIRIS_LEFT_STRIP_FADE_TICK 500
#defineIRIS_RIGHT_STRIP_PETALS_END_TICK 501
#defineIRIS_WIDE_MOTES_END_TICK 509
#defineIRIS_STRIPS_END_TICK 563
#defineIRIS_HEAL_TICK 639The rings of the healing; a launch sound six times, twelve ticks apart, as they spread.
#defineIRIS_LAUNCH_SOUND_TICK 644
#defineIRIS_LAUNCH_SOUNDS 6
#defineIRIS_LAUNCH_SOUND_GAP 12
#defineIRIS_GLOW_TICK 754The glow's textures are made; the canvas flashes white for three ticks, the cone of light reaches out a tick later, and the tall ring of motes follows.
#defineIRIS_CONE_TICK 759
#defineIRIS_TALL_RING_TICK 783
#defineIRIS_WHITE_OUT_TICK 817The backdrop whitens, with the bane escape sound three ticks in, and the summon ends.
#defineIRIS_END_TICK 850
#defineIRIS_ARRIVAL_DROP toFIXED(20.4453125)From her appearance to IRIS_ARRIVAL_TICK she drops into place on a sine, a 1024th of a turn a tick and 64 pixels high; this is how far it has carried her by then, taken off so that she comes to rest there.
#defineIRIS_BAR_TICKS 210The five light bars of the fountain, 45-degree lines growing a pixel a tick up and right from where they start.
#defineIRIS_CORNER_BAR_TICK 513
#defineIRIS_INNER_LEFT_BAR_TICK 522
#defineIRIS_INNER_LOWER_BAR_TICK 531
#defineIRIS_OUTER_LEFT_BAR_TICK 535
#defineIRIS_OUTER_LOWER_BAR_TICK 554
#defineIRIS_BAR_SHOWN (tick, start)
#defineIRIS_BAR_SHADE (tick, start) ((start) + IRIS_BAR_TICKS - (tick))
#defineIRIS_BAR_LENGTH (tick, start) ((tick) - ((start) - 1))
#defineIRIS_STREAK_TOP 59The opening's streaks rise until their heads reach this row.
#defineIRIS_PSYNERGY_SOUNDS 11The sounds at the ticks of IrisPsynergySoundTicks, IrisDoorSoundTicks and IrisPowerUpSoundTicks.
#defineIRIS_DOOR_SOUNDS 5
#defineIRIS_POWER_UP_SOUNDS 6
#defineIRIS_APPEAR_RING_POINTS 256As she appears, a ring of IRIS_APPEAR_RING_POINTS motes spreads about her, a pixel a tick.
#defineIRIS_APPEAR_RING_MOTE 4Its motes' size.
#defineIRIS_CANVAS_FADE_SHARE 70The share of each pixel's level her canvas keeps a tick: any share but CANVAS_FADE_HALF keeps three quarters.
#defineIRIS_BAND_HEIGHT 40The bands of light that rise up the canvas, eight rows a tick.
#defineIRIS_UNSEEN_CIRCLE_SIZE 14The fountain's first tick draws three shaded circles from this size, two pixels apart, that the mote fades overwrite before they are seen.
#defineIRIS_WIDENING_STEP 19The pillars of light: those that widen or narrow change width every so many pixels they rise.
#defineIRIS_NARROWING_STEP 21
#defineIRIS_HEAL_RINGS 10The healing's rings: IRIS_HEAL_RINGS of IRIS_HEAL_RING_POINTS motes each, IRIS_HEAL_RING_GAP ticks apart; then a wide arc and a tall ring of motes, IRIS_SWEEP_STEP apart, of IRIS_SWEEP_MOTE pixels.
#defineIRIS_HEAL_RING_GAP 8
#defineIRIS_HEAL_RING_TICKS 31Each ring's life.
#defineIRIS_HEAL_RING_POINTS 128
#defineIRIS_WIDE_ARC_MOTES 96
#defineIRIS_TALL_RING_MOTES 197
#defineIRIS_SWEEP_STEP (TRIG_TURN * 3 / 512)
#defineIRIS_SWEEP_MOTE 6
#defineIRIS_HALF_PIXELS_FX (n) ((n) << 15)A speed of n half pixels a tick, as 16.16 (toFIXED(n) / 2).
#defineIRIS_CONE_TEXTUREThe cone of light's texture, after the glow textures.
#defineIRIS_CONE_TEXTURE_SIZE 32
#defineIRIS_CONE_GROWTH (ticks) ((ticks) << 10)How far the cone stretches toward its full size (toFIXED(1)) in so many ticks: a 64th a tick.
#defineIRIS_CAMERA_YAW (offsetof(BATTLE_CAMERA, yaw) / sizeof(Sint16))The battle camera's yaw (BATTLE_CAMERA.yaw), read as a signed halfword of the camera state.
#defineIRIS_FADE_COLORS 128The 128 background colours the scene fades (entries 96 to 223).
#defineIRIS_FADE_TARGET_RED 23The colour they step toward, a level at a time, once the circle of light widens.
#defineIRIS_FADE_TARGET_GREEN 1
#defineIRIS_FADE_TARGET_BLUE 15
#defineIRIS_PETAL_STATE (*(IRIS_PETAL_SET *)(RamMapMetatileBuffer + 8000))Iris's state, laid out in the map cell buffer: the petals, the opening's circle, and the streaks' points.
#defineIRIS_OPENING_STATE (*(IRIS_OPENING *)(RamMapMetatileBuffer + 12000))
#defineIRIS_STREAK_POINTS
#defineSTREAK (i, j)Point j of streak i of the iris's streaks.
#defineFADE_PLTT ((Uint16 *)&BG_PLTT_COLOR(6, 0))BG palette 6, where the fade's colours are written.

Enumerations

NameDescription
enumMOLOCH_BILLOW_DRAW { MOLOCH_BILLOW_BRIGHTER, MOLOCH_BILLOW_ADDED, MOLOCH_BILLOW_D … }How a billow of the snow cloud is drawn (its velocityZ): over the canvas keeping the brighter level, then while the cloud thickens added to it, and at last no more.
enumIRIS_SPLASH_PICTURE { IRIS_LARGE_RINGS, IRIS_SMALL_RINGS, IRIS_DOTS, IRIS_SPRAY }Where each run of the splashes' pictures starts in the particle sprite sheet, in bytes.

Functions

NameDescription
voidbtEffectRunMoloch (BATTLE_EFFECT_PARM *args)Snow falls over the battle and, from tick 91, drifts toward the middle; from tick 97 a white cloud of snow billows up, and at tick 136 it parts on Moloch, a great white horned beast, as rings spread out about it.
voidbtIrisChangeBackdrop (void)Iris's change of backdrop, made behind the wipe: each target is set over the middle, a little above the ground and halfway nearer, no actors stand on the field, and the violet sky is loaded with its 128 colours (BG palette entries 96 on) darkened and their channels turned round (red to green, green to blue, blue to red).
voidbtIrisDrawDrop (Uint32 tick, Sint32 x, Sint32 y, Sint32 small)Iris: draws one falling drop at (x, y), large (20x40) when small is 0 and small (12x24) otherwise, its animation picture chosen by tick / 2, and under it a trail of particles every half size down to row 112.
voidbtIrisDrawPillar (Sint32 halfWidth, Sint32 x, Sint32 height)Iris: draws one rising pillar, a textured strip of six vertices whose two lower rows come from IrisPillarVertices and whose top row is raised to height. x is the pillar's screen column (63 is the centre); the base sits height pixels below row 63, so the pillar grows upward from there.
voidbtEffectDrawDiagonalCanvasLine (Sint32 x, Sint32 y, Sint32 length, Uint8 color)Draws a 45-degree canvas line from (x + length / 2, y - length / 2) down-left toward (x, y), at most DIAGONAL_LINE_MAX pixels long, in the given colour.
static inline voidbtIrisDrawSplash (Sint32 t, Sint32 x, Sint32 y, Sint32 small)A splash where a drop lands: rings spread from (x, y) for twice the splash's duration, then a smaller pair of rings and a column of spray rises while the screen shakes; the drop itself is drawn last.
voidbtEffectRunIris (BATTLE_EFFECT_PARM *args)Iris: a circle of light opens over a dark field while fifteen streaks swirl up out of it; Iris herself appears, a 4 x 4 grid of sprites, amid two bursts of pink petals and later rises away; drops fall and splash in rings; pillars of light climb, the scene fills with rising motes, rays turn about the centre, and the screen whitens as she heals the party.

Variables

NameDescription
extern const MODEL_VERTEXIrisPillarVertices [6]An Iris pillar's six corners, {x, y, z} in pixels: three rows of two, 16 either side of its centre, at y -16, 12 and 0.
extern const FIVE_WIDTHSIrisRisingPillarWidthsThe rising pillars' widths, left to right.
extern const SEVEN_WIDTHSIrisWideningPillarWidthsThe widening pillars' widths, left to right.
extern const SEVEN_WIDTHSIrisNarrowingPillarWidthsThe narrowing pillars' widths, left to right.
extern const FOUR_SPANSIrisLeftStripSpansThe left strip's four spans where petals start, {left, width} in pixels.
extern const FOUR_SPANSIrisRightStripSpansThe right strip's four spans where petals start, {left, width} in pixels.

Description

The Moloch and Iris summons: Moloch's snowstorm and frosty breath, and Iris's opening, petals, drops, pillars and fountain of light, with the diagonal canvas line her light bars are drawn with. Part of battle_effect.c.

Macros in detail

MOLOCH_TICKS

#define MOLOCH_TICKS 296

Moloch's ticks, and the tick A or B skips to.

Referenced by btEffectRunMoloch().

Definition at line 10 of file battle_effect_moloch.c.

MOLOCH_SKIP_TO

#define MOLOCH_SKIP_TO 232

Referenced by btEffectRunMoloch().

Definition at line 11 of file battle_effect_moloch.c.

MOLOCH_SNOWFLAKES

#define MOLOCH_SNOWFLAKES 256

The snowflakes, in the map cell buffer; the snow cloud, billows rising in columns four pixels apart from MOLOCH_BILLOW_LEFT (MOLOCH_BILLOWS_SET_UP are set up, the first MOLOCH_BILLOWS drawn); the puffs of Moloch's frosty breath, from state->particles[MOLOCH_FIRST_BREATH_PUFF]; and Moloch's own sprites.

Referenced by btEffectRunMoloch().

Definition at line 16 of file battle_effect_moloch.c.

MOLOCH_BILLOWS

#define MOLOCH_BILLOWS 12

Referenced by btEffectRunMoloch().

Definition at line 17 of file battle_effect_moloch.c.

MOLOCH_BILLOWS_SET_UP

#define MOLOCH_BILLOWS_SET_UP 16

Referenced by btEffectRunMoloch().

Definition at line 18 of file battle_effect_moloch.c.

MOLOCH_BILLOW_LEFT

#define MOLOCH_BILLOW_LEFT 44

Referenced by btEffectRunMoloch().

Definition at line 19 of file battle_effect_moloch.c.

MOLOCH_FIRST_BREATH_PUFF

#define MOLOCH_FIRST_BREATH_PUFF 24

Referenced by btEffectRunMoloch().

Definition at line 20 of file battle_effect_moloch.c.

MOLOCH_BREATH_PUFFS

#define MOLOCH_BREATH_PUFFS 16

Referenced by btEffectRunMoloch().

Definition at line 21 of file battle_effect_moloch.c.

MOLOCH_SPRITES

#define MOLOCH_SPRITES 12

Referenced by btEffectRunMoloch().

Definition at line 22 of file battle_effect_moloch.c.

MOLOCH_PUFF_LIFE

#define MOLOCH_PUFF_LIFE (6 * 4)

A billow or a puff of breath lives four ticks on each of FlashBurstSheet's six pictures; the rings' texture follows them.

Referenced by btEffectRunMoloch().

Definition at line 25 of file battle_effect_moloch.c.

MOLOCH_RING_TEXTURE

#define MOLOCH_RING_TEXTURE (6 * PICTURE_BYTES(FLASH_BURST))

Referenced by btEffectRunMoloch().

Definition at line 26 of file battle_effect_moloch.c.

MOLOCH_GROUND_Y

#define MOLOCH_GROUND_Y 114

The snowflakes land here; each falls a quarter pixel a tick for every pixel of its size.

Referenced by btEffectRunMoloch().

Definition at line 29 of file battle_effect_moloch.c.

MOLOCH_SPREAD_TICK

#define MOLOCH_SPREAD_TICK 136

At this tick the snow cloud parts on Moloch and the rings start to spread.

Referenced by btEffectRunMoloch().

Definition at line 31 of file battle_effect_moloch.c.

MOLOCH_RING_TILT

#define MOLOCH_RING_TILT 3000

How far the rings lean back.

Referenced by btEffectRunMoloch().

Definition at line 33 of file battle_effect_moloch.c.

MOLOCH_WHITENING_LEVEL

#define MOLOCH_WHITENING_LEVEL 16

The level the canvas is cleared to each tick as the screen whitens, before its last two ticks at the brightest.

Referenced by btEffectRunMoloch().

Definition at line 36 of file battle_effect_moloch.c.

IRIS_MOTE_FADES

#define IRIS_MOTE_FADES 8

Iris's sprite sheet, state->sheet: the mote set and its fading copies, then the drops' pictures (eight of each size, each a shaded circle mirrored and dimmer than the last), later overwritten by the strips' and the glow's 32x64 textures.

Referenced by btEffectRunIris().

Definition at line 499 of file battle_effect_moloch.c.

IRIS_DROPS

#define IRIS_DROPS 6930

Referenced by btEffectRunIris(), btIrisDrawDrop() and btIrisDrawSplash().

Definition at line 500 of file battle_effect_moloch.c.

IRIS_DROP_WIDTH

#define IRIS_DROP_WIDTH 20

Referenced by btEffectRunIris(), btIrisDrawDrop() and btIrisDrawSplash().

Definition at line 501 of file battle_effect_moloch.c.

IRIS_DROP_HEIGHT

#define IRIS_DROP_HEIGHT 40

Referenced by btIrisDrawDrop() and btIrisDrawSplash().

Definition at line 502 of file battle_effect_moloch.c.

IRIS_SMALL_DROPS

#define IRIS_SMALL_DROPS 19474

Referenced by btEffectRunIris(), btIrisDrawDrop() and btIrisDrawSplash().

Definition at line 503 of file battle_effect_moloch.c.

IRIS_SMALL_DROP_WIDTH

#define IRIS_SMALL_DROP_WIDTH 12

Referenced by btEffectRunIris(), btIrisDrawDrop() and btIrisDrawSplash().

Definition at line 504 of file battle_effect_moloch.c.

IRIS_SMALL_DROP_HEIGHT

#define IRIS_SMALL_DROP_HEIGHT 24

Referenced by btIrisDrawDrop() and btIrisDrawSplash().

Definition at line 505 of file battle_effect_moloch.c.

IRIS_DROP_PICTURES

#define IRIS_DROP_PICTURES 8

Referenced by btEffectRunIris().

Definition at line 506 of file battle_effect_moloch.c.

IRIS_TEXTURES

#define IRIS_TEXTURES (IRIS_MOTE_FADES * MOTE_SET_BYTES)

Referenced by btEffectRunIris().

Definition at line 507 of file battle_effect_moloch.c.

IRIS_TEXTURE_WIDTH

#define IRIS_TEXTURE_WIDTH 32

Referenced by btEffectRunIris().

Definition at line 508 of file battle_effect_moloch.c.

IRIS_TEXTURE_HEIGHT

#define IRIS_TEXTURE_HEIGHT 64

Referenced by btEffectRunIris().

Definition at line 509 of file battle_effect_moloch.c.

IRIS_TEXTURE_BYTES

#define IRIS_TEXTURE_BYTES PICTURE_BYTES(IRIS_TEXTURE)

Referenced by btEffectRunIris().

Definition at line 510 of file battle_effect_moloch.c.

IRIS_PILLAR_TEXTURE

#define IRIS_PILLAR_TEXTURE MOTE_SET_BYTES

The pillars' 16x16 texture follows the first mote set; its shaded circle is drawn first at IRIS_PILLAR_CIRCLE and mirrored into it.

Referenced by btEffectRunIris() and btIrisDrawPillar().

Definition at line 513 of file battle_effect_moloch.c.

IRIS_PILLAR_TEXTURE_SIZE

#define IRIS_PILLAR_TEXTURE_SIZE 16

Referenced by btEffectRunIris().

Definition at line 514 of file battle_effect_moloch.c.

IRIS_PILLAR_CIRCLE

#define IRIS_PILLAR_CIRCLE 1000

Referenced by btEffectRunIris().

Definition at line 515 of file battle_effect_moloch.c.

IRIS_RING_FADES

#define IRIS_RING_FADES 3

The splashes' pictures, in the particle sprite sheet (RamHeapSlots->battleSheet): IRIS_RING_FADES fades each of a large and a small ring mote, IRIS_DOT_FADES of a dot and the spray's column.

Referenced by btEffectRunIris().

Definition at line 520 of file battle_effect_moloch.c.

IRIS_DOT_FADES

#define IRIS_DOT_FADES 8

Referenced by btEffectRunIris() and btIrisDrawSplash().

Definition at line 521 of file battle_effect_moloch.c.

IRIS_RING_FADE_STEP

#define IRIS_RING_FADE_STEP 16

How much dimmer each fade of a ring mote and of a dot is than the last.

Referenced by btEffectRunIris().

Definition at line 523 of file battle_effect_moloch.c.

IRIS_DOT_FADE_STEP

#define IRIS_DOT_FADE_STEP 8

Referenced by btEffectRunIris().

Definition at line 524 of file battle_effect_moloch.c.

IRIS_LARGE_RING_WIDTH

#define IRIS_LARGE_RING_WIDTH 7

Referenced by btIrisDrawSplash().

Definition at line 525 of file battle_effect_moloch.c.

IRIS_LARGE_RING_HEIGHT

#define IRIS_LARGE_RING_HEIGHT 14

Referenced by btIrisDrawSplash().

Definition at line 526 of file battle_effect_moloch.c.

IRIS_SMALL_RING_WIDTH

#define IRIS_SMALL_RING_WIDTH 5

Referenced by btIrisDrawSplash().

Definition at line 527 of file battle_effect_moloch.c.

IRIS_SMALL_RING_HEIGHT

#define IRIS_SMALL_RING_HEIGHT 10

Referenced by btIrisDrawSplash().

Definition at line 528 of file battle_effect_moloch.c.

IRIS_DOT_WIDTH

#define IRIS_DOT_WIDTH 2

Referenced by btEffectRunIris() and btIrisDrawSplash().

Definition at line 529 of file battle_effect_moloch.c.

IRIS_DOT_HEIGHT

#define IRIS_DOT_HEIGHT 4

Referenced by btIrisDrawSplash().

Definition at line 530 of file battle_effect_moloch.c.

IRIS_SPRAY_WIDTH

#define IRIS_SPRAY_WIDTH 8

Referenced by btEffectRunIris() and btIrisDrawSplash().

Definition at line 531 of file battle_effect_moloch.c.

IRIS_SPRAY_HEIGHT

#define IRIS_SPRAY_HEIGHT 32

Referenced by btEffectRunIris() and btIrisDrawSplash().

Definition at line 532 of file battle_effect_moloch.c.

IRIS_SPLASHES

#define IRIS_SPLASHES

A splash's rings of dots are drawn at this many points around; its ring motes turn about it as spokes, taking their next picture every IRIS_RING_FADE_TICKS.

Referenced by btEffectRunIris().

Definition at line 549 of file battle_effect_moloch.c.

IRIS_SPLASH_POINTS

#define IRIS_SPLASH_POINTS 64

Referenced by btIrisDrawSplash().

Definition at line 551 of file battle_effect_moloch.c.

IRIS_SPLASH_SPOKES

#define IRIS_SPLASH_SPOKES 8

Referenced by btIrisDrawSplash().

Definition at line 552 of file battle_effect_moloch.c.

IRIS_RING_FADE_TICKS

#define IRIS_RING_FADE_TICKS 12

Referenced by btIrisDrawSplash().

Definition at line 553 of file battle_effect_moloch.c.

IRIS_TURN_64THS

#define IRIS_TURN_64THS(n) ((n) << 10)

An angle of n 64ths of a turn (TRIG_TURN / 64 each): a splash's ring has IRIS_SPLASH_POINTS points about a turn.

Referenced by btEffectRunIris() and btIrisDrawSplash().

Definition at line 556 of file battle_effect_moloch.c.

DIAGONAL_LINE_MAX

#define DIAGONAL_LINE_MAX 48

the most pixels a diagonal line runs

Referenced by btEffectDrawDiagonalCanvasLine().

Definition at line 660 of file battle_effect_moloch.c.

IRIS_PETALS

#define IRIS_PETALS 36

Iris's runs: the pink petals (PinkPetalsTiles, fifteen pictures of a petal tumbling), the motes in state->particles, and the opening's streaks, each a head and the points that trail it.

Referenced by btEffectRunIris().

Definition at line 685 of file battle_effect_moloch.c.

IRIS_PETAL_PICTURES

#define IRIS_PETAL_PICTURES 15

Referenced by btEffectRunIris().

Definition at line 686 of file battle_effect_moloch.c.

IRIS_PETAL_SIZE

#define IRIS_PETAL_SIZE 16

A petal's 16-colour sprite, in IRIS_PETAL_PALETTE.

Referenced by btEffectRunIris().

Definition at line 688 of file battle_effect_moloch.c.

IRIS_PETAL_BYTES

#define IRIS_PETAL_BYTES (IRIS_PETAL_SIZE * IRIS_PETAL_SIZE / 2)

Referenced by btEffectRunIris().

Definition at line 689 of file battle_effect_moloch.c.

IRIS_PETAL_PALETTE

#define IRIS_PETAL_PALETTE 15

Referenced by btEffectRunIris().

Definition at line 690 of file battle_effect_moloch.c.

IRIS_PETAL_TICK

#define IRIS_PETAL_TICK (1 << 8)

One tick of a petal's life, which counts down in its high byte; the petal is drawn at twice its life's scale.

Referenced by btEffectRunIris().

Definition at line 693 of file battle_effect_moloch.c.

IRIS_PETAL_SHRINK

#define IRIS_PETAL_SHRINK(ticks) ((ticks) >> 1 << 11)

As she appears her petals fly out, shrinking a 32nd of their size (toFIXED(1) / 32) every two ticks; IRIS_PETAL_SHRINK is how much after so many ticks.

Referenced by btEffectRunIris().

Definition at line 696 of file battle_effect_moloch.c.

IRIS_SCREEN_X_FX

#define IRIS_SCREEN_X_FX(canvasX) ((canvasX) << 17)

A canvas x as a 16.16 x on the screen, where the canvas is shown at twice its width.

Referenced by btEffectRunIris().

Definition at line 699 of file battle_effect_moloch.c.

IRIS_MOTES

#define IRIS_MOTES 32

Referenced by btEffectRunIris().

Definition at line 700 of file battle_effect_moloch.c.

IRIS_MOTE_SIZE

#define IRIS_MOTE_SIZE 0xf

A mote's variant: its size in pixels in the low bits; IRIS_MOTE_FADING to fade through the faded mote sets once it is IRIS_MOTE_FADE_AGE ticks old; IRIS_MOTE_GLOWING to be drawn instead as a glow, a textured quad that grows and fades through the IRIS_GLOW_TEXTURES once it is IRIS_GLOW_FADE_AGE ticks old.

Referenced by btEffectRunIris().

Definition at line 706 of file battle_effect_moloch.c.

IRIS_MOTE_FADING

#define IRIS_MOTE_FADING 0x10

Referenced by btEffectRunIris().

Definition at line 707 of file battle_effect_moloch.c.

IRIS_MOTE_GLOWING

#define IRIS_MOTE_GLOWING 0x100

Referenced by btEffectRunIris().

Definition at line 708 of file battle_effect_moloch.c.

IRIS_MOTE_FADE_AGE

#define IRIS_MOTE_FADE_AGE 32

Referenced by btEffectRunIris().

Definition at line 709 of file battle_effect_moloch.c.

IRIS_GLOW_FADE_AGE

#define IRIS_GLOW_FADE_AGE 24

Referenced by btEffectRunIris().

Definition at line 710 of file battle_effect_moloch.c.

IRIS_GLOW_TEXTURES

#define IRIS_GLOW_TEXTURES 8

Referenced by btEffectRunIris().

Definition at line 711 of file battle_effect_moloch.c.

IRIS_FIRST_MOTES

#define IRIS_FIRST_MOTES 12

The motes that burst from her as she appears, half each way, and the random part of their speed, in sixteenths of a pixel a tick.

Referenced by btEffectRunIris().

Definition at line 714 of file battle_effect_moloch.c.

IRIS_MOTE_DRIFT_MASK

#define IRIS_MOTE_DRIFT_MASK 31

Referenced by btEffectRunIris().

Definition at line 715 of file battle_effect_moloch.c.

IRIS_STREAKS

#define IRIS_STREAKS 15

Referenced by btEffectRunIris().

Definition at line 716 of file battle_effect_moloch.c.

IRIS_STREAK_LENGTH

#define IRIS_STREAK_LENGTH 10

Referenced by btEffectRunIris().

Definition at line 717 of file battle_effect_moloch.c.

IRIS_GODDESS_COLUMNS

#define IRIS_GODDESS_COLUMNS 4

Iris herself, RobedGoddessTiles as a 4 x 4 grid of 32x32 sprites.

Referenced by btEffectRunIris().

Definition at line 719 of file battle_effect_moloch.c.

IRIS_GODDESS_ROWS

#define IRIS_GODDESS_ROWS 4

Referenced by btEffectRunIris().

Definition at line 720 of file battle_effect_moloch.c.

IRIS_GODDESS_SPRITES

#define IRIS_GODDESS_SPRITES (IRIS_GODDESS_COLUMNS * IRIS_GODDESS_ROWS)

Referenced by btEffectRunIris().

Definition at line 721 of file battle_effect_moloch.c.

IRIS_GODDESS_TILE

#define IRIS_GODDESS_TILE 32

Referenced by btEffectRunIris().

Definition at line 722 of file battle_effect_moloch.c.

IRIS_GODDESS_SPRITE_BYTES

#define IRIS_GODDESS_SPRITE_BYTES (IRIS_GODDESS_TILE * IRIS_GODDESS_TILE)

A sprite of her 256-colour figure, a byte a pixel.

Referenced by btEffectRunIris().

Definition at line 724 of file battle_effect_moloch.c.

IRIS_DURING

#define IRIS_DURING(tick, first, last)

Whether tick is one of first to last, both included.

Referenced by btEffectRunIris().

Definition at line 726 of file battle_effect_moloch.c.

IRIS_APPEAR_TICK

#define IRIS_APPEAR_TICK 176

The summon's milestones. The opening's circle of light and streaks run to IRIS_APPEAR_TICK, when she appears; A or B skips the opening to it.

Referenced by btEffectRunIris().

Definition at line 730 of file battle_effect_moloch.c.

IRIS_ARRIVAL_TICK

#define IRIS_ARRIVAL_TICK 229

She comes to rest, and the next tick the drops' pictures are made.

Referenced by btEffectRunIris().

Definition at line 732 of file battle_effect_moloch.c.

IRIS_DROPS_TICK

#define IRIS_DROPS_TICK 230

Referenced by btEffectRunIris().

Definition at line 733 of file battle_effect_moloch.c.

IRIS_DARKEN_TICK

#define IRIS_DARKEN_TICK 240

The sunset darkens from here.

Referenced by btEffectRunIris().

Definition at line 735 of file battle_effect_moloch.c.

IRIS_LEAVE_TICK

#define IRIS_LEAVE_TICK 351

She turns white and sinks, then rises away, and is gone.

Referenced by btEffectRunIris().

Definition at line 737 of file battle_effect_moloch.c.

IRIS_RISE_TICK

#define IRIS_RISE_TICK 366

Referenced by btEffectRunIris().

Definition at line 738 of file battle_effect_moloch.c.

IRIS_GONE_TICK

#define IRIS_GONE_TICK 386

Referenced by btEffectRunIris().

Definition at line 739 of file battle_effect_moloch.c.

IRIS_SPLASH_PETALS_TICK

#define IRIS_SPLASH_PETALS_TICK 279

The petals the splashes throw fly from the first splash's (IrisSplashStarts[0] + 48) to ten ticks into the band of light's rise.

Referenced by btEffectRunIris().

Definition at line 742 of file battle_effect_moloch.c.

IRIS_SPLASH_PETALS_END_TICK

#define IRIS_SPLASH_PETALS_END_TICK 411

Referenced by btEffectRunIris().

Definition at line 743 of file battle_effect_moloch.c.

IRIS_PILLARS_TICK

#define IRIS_PILLARS_TICK 370

The pillars of light climb, until a band of light rises over them, from IRIS_BAND_TICK, and the sunset behind fades darker.

Referenced by btEffectRunIris().

Definition at line 746 of file battle_effect_moloch.c.

IRIS_BAND_TICK

#define IRIS_BAND_TICK 401

Referenced by btEffectRunIris().

Definition at line 747 of file battle_effect_moloch.c.

IRIS_BAND_END_TICK

#define IRIS_BAND_END_TICK 431

Referenced by btEffectRunIris().

Definition at line 748 of file battle_effect_moloch.c.

IRIS_PILLARS_END_TICK

#define IRIS_PILLARS_END_TICK 422

Referenced by btEffectRunIris().

Definition at line 749 of file battle_effect_moloch.c.

IRIS_FOUNTAIN_TICK

#define IRIS_FOUNTAIN_TICK 446

The fountain starts under the starfield; A or B after her appearance skips to it.

Referenced by btEffectRunIris().

Definition at line 752 of file battle_effect_moloch.c.

IRIS_RIGHT_STRIP_FADE_TICK

#define IRIS_RIGHT_STRIP_FADE_TICK 470

The fountain's two white strips throw petals every eight ticks, and the right one motes every four up from the bottom of the screen. Each strip fades away from its foot from its own tick, its picture stepping back through the fading textures; the right strip's petals stop at IRIS_RIGHT_STRIP_PETALS_END_TICK, its motes rise from a narrower spread after IRIS_WIDE_MOTES_END_TICK, and both strips are gone after IRIS_STRIPS_END_TICK.

Referenced by btEffectRunIris().

Definition at line 759 of file battle_effect_moloch.c.

IRIS_LEFT_STRIP_FADE_TICK

#define IRIS_LEFT_STRIP_FADE_TICK 500

Referenced by btEffectRunIris().

Definition at line 760 of file battle_effect_moloch.c.

IRIS_RIGHT_STRIP_PETALS_END_TICK

#define IRIS_RIGHT_STRIP_PETALS_END_TICK 501

Referenced by btEffectRunIris().

Definition at line 761 of file battle_effect_moloch.c.

IRIS_WIDE_MOTES_END_TICK

#define IRIS_WIDE_MOTES_END_TICK 509

Referenced by btEffectRunIris().

Definition at line 762 of file battle_effect_moloch.c.

IRIS_STRIPS_END_TICK

#define IRIS_STRIPS_END_TICK 563

Referenced by btEffectRunIris().

Definition at line 763 of file battle_effect_moloch.c.

IRIS_HEAL_TICK

#define IRIS_HEAL_TICK 639

The rings of the healing; a launch sound six times, twelve ticks apart, as they spread.

Referenced by btEffectRunIris().

Definition at line 766 of file battle_effect_moloch.c.

IRIS_LAUNCH_SOUND_TICK

#define IRIS_LAUNCH_SOUND_TICK 644

Referenced by btEffectRunIris().

Definition at line 767 of file battle_effect_moloch.c.

IRIS_LAUNCH_SOUNDS

#define IRIS_LAUNCH_SOUNDS 6

Referenced by btEffectRunIris().

Definition at line 768 of file battle_effect_moloch.c.

IRIS_LAUNCH_SOUND_GAP

#define IRIS_LAUNCH_SOUND_GAP 12

Referenced by btEffectRunIris().

Definition at line 769 of file battle_effect_moloch.c.

IRIS_GLOW_TICK

#define IRIS_GLOW_TICK 754

The glow's textures are made; the canvas flashes white for three ticks, the cone of light reaches out a tick later, and the tall ring of motes follows.

Referenced by btEffectRunIris().

Definition at line 772 of file battle_effect_moloch.c.

IRIS_CONE_TICK

#define IRIS_CONE_TICK 759

Referenced by btEffectRunIris().

Definition at line 773 of file battle_effect_moloch.c.

IRIS_TALL_RING_TICK

#define IRIS_TALL_RING_TICK 783

Referenced by btEffectRunIris().

Definition at line 774 of file battle_effect_moloch.c.

IRIS_WHITE_OUT_TICK

#define IRIS_WHITE_OUT_TICK 817

The backdrop whitens, with the bane escape sound three ticks in, and the summon ends.

Referenced by btEffectRunIris().

Definition at line 777 of file battle_effect_moloch.c.

IRIS_END_TICK

#define IRIS_END_TICK 850

Referenced by btEffectRunIris().

Definition at line 778 of file battle_effect_moloch.c.

IRIS_ARRIVAL_DROP

#define IRIS_ARRIVAL_DROP toFIXED(20.4453125)

From her appearance to IRIS_ARRIVAL_TICK she drops into place on a sine, a 1024th of a turn a tick and 64 pixels high; this is how far it has carried her by then, taken off so that she comes to rest there.

Referenced by btEffectRunIris().

Definition at line 782 of file battle_effect_moloch.c.

IRIS_BAR_TICKS

#define IRIS_BAR_TICKS 210

The five light bars of the fountain, 45-degree lines growing a pixel a tick up and right from where they start. Each lasts IRIS_BAR_TICKS from its own first tick, fading over its last 31.

Definition at line 786 of file battle_effect_moloch.c.

IRIS_CORNER_BAR_TICK

#define IRIS_CORNER_BAR_TICK 513

Referenced by btEffectRunIris().

Definition at line 787 of file battle_effect_moloch.c.

IRIS_INNER_LEFT_BAR_TICK

#define IRIS_INNER_LEFT_BAR_TICK 522

Referenced by btEffectRunIris().

Definition at line 788 of file battle_effect_moloch.c.

IRIS_INNER_LOWER_BAR_TICK

#define IRIS_INNER_LOWER_BAR_TICK 531

Referenced by btEffectRunIris().

Definition at line 789 of file battle_effect_moloch.c.

IRIS_OUTER_LEFT_BAR_TICK

#define IRIS_OUTER_LEFT_BAR_TICK 535

Referenced by btEffectRunIris().

Definition at line 790 of file battle_effect_moloch.c.

IRIS_OUTER_LOWER_BAR_TICK

#define IRIS_OUTER_LOWER_BAR_TICK 554

Referenced by btEffectRunIris().

Definition at line 791 of file battle_effect_moloch.c.

IRIS_BAR_SHOWN

#define IRIS_BAR_SHOWN(tick, start)

Referenced by btEffectRunIris().

Definition at line 792 of file battle_effect_moloch.c.

IRIS_BAR_SHADE

#define IRIS_BAR_SHADE(tick, start) ((start) + IRIS_BAR_TICKS - (tick))

Referenced by btEffectRunIris().

Definition at line 794 of file battle_effect_moloch.c.

IRIS_BAR_LENGTH

#define IRIS_BAR_LENGTH(tick, start) ((tick) - ((start) - 1))

Referenced by btEffectRunIris().

Definition at line 795 of file battle_effect_moloch.c.

IRIS_STREAK_TOP

#define IRIS_STREAK_TOP 59

The opening's streaks rise until their heads reach this row.

Referenced by btEffectRunIris().

Definition at line 797 of file battle_effect_moloch.c.

IRIS_PSYNERGY_SOUNDS

#define IRIS_PSYNERGY_SOUNDS 11

The sounds at the ticks of IrisPsynergySoundTicks, IrisDoorSoundTicks and IrisPowerUpSoundTicks.

Referenced by btEffectRunIris().

Definition at line 800 of file battle_effect_moloch.c.

IRIS_DOOR_SOUNDS

#define IRIS_DOOR_SOUNDS 5

Referenced by btEffectRunIris().

Definition at line 801 of file battle_effect_moloch.c.

IRIS_POWER_UP_SOUNDS

#define IRIS_POWER_UP_SOUNDS 6

Referenced by btEffectRunIris().

Definition at line 802 of file battle_effect_moloch.c.

IRIS_APPEAR_RING_POINTS

#define IRIS_APPEAR_RING_POINTS 256

As she appears, a ring of IRIS_APPEAR_RING_POINTS motes spreads about her, a pixel a tick.

Referenced by btEffectRunIris().

Definition at line 805 of file battle_effect_moloch.c.

IRIS_APPEAR_RING_MOTE

#define IRIS_APPEAR_RING_MOTE 4

Its motes' size.

Referenced by btEffectRunIris().

Definition at line 807 of file battle_effect_moloch.c.

IRIS_CANVAS_FADE_SHARE

#define IRIS_CANVAS_FADE_SHARE 70

The share of each pixel's level her canvas keeps a tick: any share but CANVAS_FADE_HALF keeps three quarters.

Referenced by btEffectRunIris().

Definition at line 810 of file battle_effect_moloch.c.

IRIS_BAND_HEIGHT

#define IRIS_BAND_HEIGHT 40

The bands of light that rise up the canvas, eight rows a tick.

Referenced by btEffectRunIris().

Definition at line 812 of file battle_effect_moloch.c.

IRIS_UNSEEN_CIRCLE_SIZE

#define IRIS_UNSEEN_CIRCLE_SIZE 14

The fountain's first tick draws three shaded circles from this size, two pixels apart, that the mote fades overwrite before they are seen.

Referenced by btEffectRunIris().

Definition at line 815 of file battle_effect_moloch.c.

IRIS_WIDENING_STEP

#define IRIS_WIDENING_STEP 19

The pillars of light: those that widen or narrow change width every so many pixels they rise.

Referenced by btEffectRunIris().

Definition at line 818 of file battle_effect_moloch.c.

IRIS_NARROWING_STEP

#define IRIS_NARROWING_STEP 21

Referenced by btEffectRunIris().

Definition at line 819 of file battle_effect_moloch.c.

IRIS_HEAL_RINGS

#define IRIS_HEAL_RINGS 10

The healing's rings: IRIS_HEAL_RINGS of IRIS_HEAL_RING_POINTS motes each, IRIS_HEAL_RING_GAP ticks apart; then a wide arc and a tall ring of motes, IRIS_SWEEP_STEP apart, of IRIS_SWEEP_MOTE pixels.

Referenced by btEffectRunIris().

Definition at line 823 of file battle_effect_moloch.c.

IRIS_HEAL_RING_GAP

#define IRIS_HEAL_RING_GAP 8

Referenced by btEffectRunIris().

Definition at line 824 of file battle_effect_moloch.c.

IRIS_HEAL_RING_TICKS

#define IRIS_HEAL_RING_TICKS 31

Each ring's life.

Referenced by btEffectRunIris().

Definition at line 826 of file battle_effect_moloch.c.

IRIS_HEAL_RING_POINTS

#define IRIS_HEAL_RING_POINTS 128

Referenced by btEffectRunIris().

Definition at line 827 of file battle_effect_moloch.c.

IRIS_WIDE_ARC_MOTES

#define IRIS_WIDE_ARC_MOTES 96

Referenced by btEffectRunIris().

Definition at line 828 of file battle_effect_moloch.c.

IRIS_TALL_RING_MOTES

#define IRIS_TALL_RING_MOTES 197

Referenced by btEffectRunIris().

Definition at line 829 of file battle_effect_moloch.c.

IRIS_SWEEP_STEP

#define IRIS_SWEEP_STEP (TRIG_TURN * 3 / 512)

Referenced by btEffectRunIris().

Definition at line 830 of file battle_effect_moloch.c.

IRIS_SWEEP_MOTE

#define IRIS_SWEEP_MOTE 6

Referenced by btEffectRunIris().

Definition at line 831 of file battle_effect_moloch.c.

IRIS_HALF_PIXELS_FX

#define IRIS_HALF_PIXELS_FX(n) ((n) << 15)

A speed of n half pixels a tick, as 16.16 (toFIXED(n) / 2).

Referenced by btEffectRunIris().

Definition at line 833 of file battle_effect_moloch.c.

IRIS_CONE_TEXTURE

#define IRIS_CONE_TEXTURE

The cone of light's texture, after the glow textures.

Referenced by btEffectRunIris().

Definition at line 835 of file battle_effect_moloch.c.

IRIS_CONE_TEXTURE_SIZE

#define IRIS_CONE_TEXTURE_SIZE 32

Referenced by btEffectRunIris().

Definition at line 837 of file battle_effect_moloch.c.

IRIS_CONE_GROWTH

#define IRIS_CONE_GROWTH(ticks) ((ticks) << 10)

How far the cone stretches toward its full size (toFIXED(1)) in so many ticks: a 64th a tick.

Referenced by btEffectRunIris().

Definition at line 840 of file battle_effect_moloch.c.

IRIS_CAMERA_YAW

#define IRIS_CAMERA_YAW (offsetof(BATTLE_CAMERA, yaw) / sizeof(Sint16))

The battle camera's yaw (BATTLE_CAMERA.yaw), read as a signed halfword of the camera state.

Referenced by btEffectRunIris().

Definition at line 843 of file battle_effect_moloch.c.

IRIS_FADE_COLORS

#define IRIS_FADE_COLORS 128

The 128 background colours the scene fades (entries 96 to 223).

Referenced by btEffectRunIris().

Definition at line 845 of file battle_effect_moloch.c.

IRIS_FADE_TARGET_RED

#define IRIS_FADE_TARGET_RED 23

The colour they step toward, a level at a time, once the circle of light widens.

Referenced by btEffectRunIris().

Definition at line 848 of file battle_effect_moloch.c.

IRIS_FADE_TARGET_GREEN

#define IRIS_FADE_TARGET_GREEN 1

Referenced by btEffectRunIris().

Definition at line 849 of file battle_effect_moloch.c.

IRIS_FADE_TARGET_BLUE

#define IRIS_FADE_TARGET_BLUE 15

Referenced by btEffectRunIris().

Definition at line 850 of file battle_effect_moloch.c.

IRIS_PETAL_STATE

#define IRIS_PETAL_STATE (*(IRIS_PETAL_SET *)(RamMapMetatileBuffer + 8000))

Iris's state, laid out in the map cell buffer: the petals, the opening's circle, and the streaks' points.

Referenced by btEffectRunIris().

Definition at line 937 of file battle_effect_moloch.c.

IRIS_OPENING_STATE

#define IRIS_OPENING_STATE (*(IRIS_OPENING *)(RamMapMetatileBuffer + 12000))

Referenced by btEffectRunIris().

Definition at line 938 of file battle_effect_moloch.c.

IRIS_STREAK_POINTS

#define IRIS_STREAK_POINTS

Referenced by btEffectRunIris().

Definition at line 939 of file battle_effect_moloch.c.

STREAK

#define STREAK(i, j)

Point j of streak i of the iris's streaks.

Referenced by btEffectRunIris() and btEffectRunStreakVolley().

Definition at line 950 of file battle_effect_moloch.c.

FADE_PLTT

#define FADE_PLTT ((Uint16 *)&BG_PLTT_COLOR(6, 0))

BG palette 6, where the fade's colours are written.

Referenced by btEffectRunIris().

Definition at line 953 of file battle_effect_moloch.c.

Enumerations in detail

MOLOCH_BILLOW_DRAW

enum MOLOCH_BILLOW_DRAW

How a billow of the snow cloud is drawn (its velocityZ): over the canvas keeping the brighter level, then while the cloud thickens added to it, and at last no more.

EnumeratorValueDescription
MOLOCH_BILLOW_BRIGHTER
MOLOCH_BILLOW_ADDED
MOLOCH_BILLOW_DONE

Definition at line 41 of file battle_effect_moloch.c.

IRIS_SPLASH_PICTURE

enum IRIS_SPLASH_PICTURE

Where each run of the splashes' pictures starts in the particle sprite sheet, in bytes.

EnumeratorValueDescription
IRIS_LARGE_RINGS0
IRIS_SMALL_RINGSIRIS_LARGE_RINGS + IRIS_RING_FADES * PICTURE_BYTES(IRIS_LARGE_RING)
IRIS_DOTSIRIS_SMALL_RINGS + IRIS_RING_FADES * PICTURE_BYTES(IRIS_SMALL_RING)
IRIS_SPRAYIRIS_DOTS + IRIS_DOT_FADES * PICTURE_BYTES(IRIS_DOT)

Definition at line 536 of file battle_effect_moloch.c.

Functions in detail

btEffectRunMoloch

void btEffectRunMoloch(BATTLE_EFFECT_PARM *args)

Snow falls over the battle and, from tick 91, drifts toward the middle; from tick 97 a white cloud of snow billows up, and at tick 136 it parts on Moloch, a great white horned beast, as rings spread out about it. From tick 201 it breathes frost to the left, the foes are struck in turn from tick 212, and the screen whitens before the battle returns. A or B skips to tick 232.

Abilities: Moloch.

References BattleEffectCylinderCorners, BattleEffectCylinderMesh, BattleEffectMotePictures, btCameraShake(), btEffectBuildCanvasBlitters(), btEffectCountDownBattlerTints(), btEffectCreateSprites(), btEffectEndCanvasLayer(), btEffectPlaceFormationSprites(), btEffectRunImpactBurst(), btEffectShowLivingTargets(), btEffectStartActorMotion(), btEffectStartCanvasLayer(), btEffectTintBattler(), btEffectTransferCanvas(), btGraphicsLoadGreyRamp(), btPaletteBrightenBgEntries(), btRenderAllocateModelList(), btRenderDrawModelList(), btRenderTransformVertices(), btResourceLoadAndDecompress(), fdSpriteDestroyStub(), MapGridMetatileBuffer, MolochMoteSizes, MolochRingGrowth, MolochRingHeights, MolochRingStarts, PerWork, Sint32, syCloseEvent(), syHeapAllocateEWRAM(), syHeapRelease(), syInitMatrix(), syRandom(), syRotX(), syScale(), sySin(), sySoundPlayStub(), sySynch() and syTranslate().

Referenced by btEffectRunSummon().

Definition at line 55 of file battle_effect_moloch.c.

btIrisChangeBackdrop

void btIrisChangeBackdrop(void)

Iris's change of backdrop, made behind the wipe: each target is set over the middle, a little above the ground and halfway nearer, no actors stand on the field, and the violet sky is loaded with its 128 colours (BG palette entries 96 on) darkened and their channels turned round (red to green, green to blue, blue to red).

References BgScrollWork, btActorSpawnObjectsForListStub(), btBackgroundLoadStub(), btObjectGetStub(), ProjectionWork, Sint32 and syRandom().

Referenced by btEffectRunIris().

Definition at line 441 of file battle_effect_moloch.c.

btIrisDrawDrop

void btIrisDrawDrop(Uint32 tick, Sint32 x, Sint32 y, Sint32 small)

Iris: draws one falling drop at (x, y), large (20x40) when small is 0 and small (12x24) otherwise, its animation picture chosen by tick / 2, and under it a trail of particles every half size down to row 112.

References BattleEffectMotePictures and Sint32.

Referenced by btEffectRunIris().

Definition at line 561 of file battle_effect_moloch.c.

btIrisDrawPillar

void btIrisDrawPillar(Sint32 halfWidth, Sint32 x, Sint32 height)

Iris: draws one rising pillar, a textured strip of six vertices whose two lower rows come from IrisPillarVertices and whose top row is raised to height. x is the pillar's screen column (63 is the centre); the base sits height pixels below row 63, so the pillar grows upward from there.

References btRenderAllocateModelList(), btRenderDrawModelList(), btRenderTransformVertices(), IrisPillarMesh, IrisPillarVertices, memcpy(), Sint32, syHeapAllocateEWRAM(), syHeapRelease(), syInitMatrix() and syMatrixTranslateVector().

Referenced by btEffectRunIris().

Definition at line 619 of file battle_effect_moloch.c.

btEffectDrawDiagonalCanvasLine

void btEffectDrawDiagonalCanvasLine(Sint32 x, Sint32 y, Sint32 length, Uint8 color)

Draws a 45-degree canvas line from (x + length / 2, y - length / 2) down-left toward (x, y), at most DIAGONAL_LINE_MAX pixels long, in the given colour.

References btEffectDrawClippedCanvasLine() and Sint32.

Referenced by btEffectRunIris().

Definition at line 664 of file battle_effect_moloch.c.

btIrisDrawSplash

static inline void btIrisDrawSplash(Sint32 t, Sint32 x, Sint32 y, Sint32 small)

A splash where a drop lands: rings spread from (x, y) for twice the splash's duration, then a smaller pair of rings and a column of spray rises while the screen shakes; the drop itself is drawn last.

References BattleEffectMotePictures, BgScrollWork, IrisSplashOffsetsY, IrisSplashRadii, Sint32, syCos() and sySin().

Referenced by btEffectRunIris().

Definition at line 958 of file battle_effect_moloch.c.

btEffectRunIris

void btEffectRunIris(BATTLE_EFFECT_PARM *args)

Iris: a circle of light opens over a dark field while fifteen streaks swirl up out of it; Iris herself appears, a 4 x 4 grid of sprites, amid two bursts of pink petals and later rises away; drops fall and splash in rings; pillars of light climb, the scene fills with rising motes, rays turn about the centre, and the screen whitens as she heals the party.

The scene runs by tick, its phases named in the IRIS_*_TICK list above: the opening to IRIS_APPEAR_TICK; her arrival to IRIS_ARRIVAL_TICK; the drops and splashes from IRIS_DROPS_TICK under a darkening sunset; her leaving from IRIS_LEAVE_TICK; the pillars and the band of light from IRIS_PILLARS_TICK; the fountain over the starfield from IRIS_FOUNTAIN_TICK, with its strips and light bars; the healing's rings from IRIS_HEAL_TICK; the glow, the cone of light and the tall ring from IRIS_GLOW_TICK; and the white-out from IRIS_WHITE_OUT_TICK to IRIS_END_TICK.

References BattleEffectMotePictures, BgScrollWork, btBackgroundLoadStub(), btCanvasBlitMirroredQuarters(), btEffectBuildSteepShadeRampWave(), btEffectConfigureEffectDisplay(), btEffectDrawDiagonalCanvasLine(), btEffectDrawShadedDisc(), btEffectDrawShadedDiscQuarter(), btEffectEndCanvasLayer(), btEffectShowLivingTargets(), btEffectSpriteAcquire(), btEffectSpriteCreateWithTiles(), btEffectStartCanvasLayer(), btEffectTintBattler(), btEffectTransferCanvas(), btGraphicsLoadGreyRamp(), btIrisChangeBackdrop(), btIrisDrawDrop(), btIrisDrawPillar(), btIrisDrawSplash(), btIrisRestoreBattle(), btIrisWipeScreen(), btPaletteBrightenSavedBattleBg(), btRenderAllocateModelList(), btRenderDrawModelList(), btRenderTransformVertices(), btResourceLoadAndDecompress(), fdRenderApplyProjectedPlacementStub(), fdSpriteDestroyStub(), IrisConeCorners, IrisConeMesh, IrisDoorSoundTicks, IrisDropPictureSteps, IrisDropSpeeds, IrisDropTicks, IrisLeftStripCorners, IrisLeftStripSpans, IrisLineShades, IrisMoteSizes, IrisNarrowingPillarWidths, IrisParticleCorners, IrisParticleMesh, IrisPowerUpSoundTicks, IrisPsynergySoundTicks, IrisRightStripCorners, IrisRightStripSpans, IrisRisingPillarWidths, IrisSplashEnds, IrisSplashSmall and 33 more.

Referenced by btEffectRunSummon().

Definition at line 1196 of file battle_effect_moloch.c.

On this page

StructuresMacrosEnumerationsFunctionsVariablesDescriptionMacros in detailMOLOCH_TICKSMOLOCH_SKIP_TOMOLOCH_SNOWFLAKESMOLOCH_BILLOWSMOLOCH_BILLOWS_SET_UPMOLOCH_BILLOW_LEFTMOLOCH_FIRST_BREATH_PUFFMOLOCH_BREATH_PUFFSMOLOCH_SPRITESMOLOCH_PUFF_LIFEMOLOCH_RING_TEXTUREMOLOCH_GROUND_YMOLOCH_SPREAD_TICKMOLOCH_RING_TILTMOLOCH_WHITENING_LEVELIRIS_MOTE_FADESIRIS_DROPSIRIS_DROP_WIDTHIRIS_DROP_HEIGHTIRIS_SMALL_DROPSIRIS_SMALL_DROP_WIDTHIRIS_SMALL_DROP_HEIGHTIRIS_DROP_PICTURESIRIS_TEXTURESIRIS_TEXTURE_WIDTHIRIS_TEXTURE_HEIGHTIRIS_TEXTURE_BYTESIRIS_PILLAR_TEXTUREIRIS_PILLAR_TEXTURE_SIZEIRIS_PILLAR_CIRCLEIRIS_RING_FADESIRIS_DOT_FADESIRIS_RING_FADE_STEPIRIS_DOT_FADE_STEPIRIS_LARGE_RING_WIDTHIRIS_LARGE_RING_HEIGHTIRIS_SMALL_RING_WIDTHIRIS_SMALL_RING_HEIGHTIRIS_DOT_WIDTHIRIS_DOT_HEIGHTIRIS_SPRAY_WIDTHIRIS_SPRAY_HEIGHTIRIS_SPLASHESIRIS_SPLASH_POINTSIRIS_SPLASH_SPOKESIRIS_RING_FADE_TICKSIRIS_TURN_64THSDIAGONAL_LINE_MAXIRIS_PETALSIRIS_PETAL_PICTURESIRIS_PETAL_SIZEIRIS_PETAL_BYTESIRIS_PETAL_PALETTEIRIS_PETAL_TICKIRIS_PETAL_SHRINKIRIS_SCREEN_X_FXIRIS_MOTESIRIS_MOTE_SIZEIRIS_MOTE_FADINGIRIS_MOTE_GLOWINGIRIS_MOTE_FADE_AGEIRIS_GLOW_FADE_AGEIRIS_GLOW_TEXTURESIRIS_FIRST_MOTESIRIS_MOTE_DRIFT_MASKIRIS_STREAKSIRIS_STREAK_LENGTHIRIS_GODDESS_COLUMNSIRIS_GODDESS_ROWSIRIS_GODDESS_SPRITESIRIS_GODDESS_TILEIRIS_GODDESS_SPRITE_BYTESIRIS_DURINGIRIS_APPEAR_TICKIRIS_ARRIVAL_TICKIRIS_DROPS_TICKIRIS_DARKEN_TICKIRIS_LEAVE_TICKIRIS_RISE_TICKIRIS_GONE_TICKIRIS_SPLASH_PETALS_TICKIRIS_SPLASH_PETALS_END_TICKIRIS_PILLARS_TICKIRIS_BAND_TICKIRIS_BAND_END_TICKIRIS_PILLARS_END_TICKIRIS_FOUNTAIN_TICKIRIS_RIGHT_STRIP_FADE_TICKIRIS_LEFT_STRIP_FADE_TICKIRIS_RIGHT_STRIP_PETALS_END_TICKIRIS_WIDE_MOTES_END_TICKIRIS_STRIPS_END_TICKIRIS_HEAL_TICKIRIS_LAUNCH_SOUND_TICKIRIS_LAUNCH_SOUNDSIRIS_LAUNCH_SOUND_GAPIRIS_GLOW_TICKIRIS_CONE_TICKIRIS_TALL_RING_TICKIRIS_WHITE_OUT_TICKIRIS_END_TICKIRIS_ARRIVAL_DROPIRIS_BAR_TICKSIRIS_CORNER_BAR_TICKIRIS_INNER_LEFT_BAR_TICKIRIS_INNER_LOWER_BAR_TICKIRIS_OUTER_LEFT_BAR_TICKIRIS_OUTER_LOWER_BAR_TICKIRIS_BAR_SHOWNIRIS_BAR_SHADEIRIS_BAR_LENGTHIRIS_STREAK_TOPIRIS_PSYNERGY_SOUNDSIRIS_DOOR_SOUNDSIRIS_POWER_UP_SOUNDSIRIS_APPEAR_RING_POINTSIRIS_APPEAR_RING_MOTEIRIS_CANVAS_FADE_SHAREIRIS_BAND_HEIGHTIRIS_UNSEEN_CIRCLE_SIZEIRIS_WIDENING_STEPIRIS_NARROWING_STEPIRIS_HEAL_RINGSIRIS_HEAL_RING_GAPIRIS_HEAL_RING_TICKSIRIS_HEAL_RING_POINTSIRIS_WIDE_ARC_MOTESIRIS_TALL_RING_MOTESIRIS_SWEEP_STEPIRIS_SWEEP_MOTEIRIS_HALF_PIXELS_FXIRIS_CONE_TEXTUREIRIS_CONE_TEXTURE_SIZEIRIS_CONE_GROWTHIRIS_CAMERA_YAWIRIS_FADE_COLORSIRIS_FADE_TARGET_REDIRIS_FADE_TARGET_GREENIRIS_FADE_TARGET_BLUEIRIS_PETAL_STATEIRIS_OPENING_STATEIRIS_STREAK_POINTSSTREAKFADE_PLTTEnumerations in detailMOLOCH_BILLOW_DRAWIRIS_SPLASH_PICTUREFunctions in detailbtEffectRunMolochbtIrisChangeBackdropbtIrisDrawDropbtIrisDrawPillarbtEffectDrawDiagonalCanvasLinebtIrisDrawSplashbtEffectRunIris