Skip to Content
The Alchemy Project

src/field/field_effect_scripts.c

Four effect scripts of the field engine module, the found item's picture growing in and pulsing, a sinking particle and a Reveal marker, then the screen transitions' tables and the palette tints' channel curves, as The Broken Seal's field_engine_tables.c has them.

Variables

NameDescription
const Sint32ItemDisplayGrowInScript []The found item's picture growing in over the leader, from half size to full size, a step every 2 ticks (field_engine_item_display.c).
const Sint32ItemDisplayPulseScript []Pulses twice, to 1.5 times full size, then rests, over and over: the found item's picture held over the leader (field_engine_item_display.c).
const Sint32ItemDisplaySparkleScript []A sparkle round the found item, sinking a quarter pixel a tick for 60 ticks before it goes (field_engine_item_display.c).
const Sint32RevealMarkerScript []A Reveal marker: stays while fdIsRevealActive returns nonzero (SC_CALL runs it again each tick), and releases itself once Reveal ends; the same as The Broken Seal's RevealMarkerScript.
const Uint8ScreenTransitionBarWidths [34]The width of the bars of WINDOW_TRANSITION_BARS, by progress.
const Sint8ScreenTransitionEdgeOffsets [32]The wobble of the circle edge of WINDOW_TRANSITION_RIPPLE.
const Uint8ScreenTransitionDitherTable [64]0 to 63 shuffled: the order in which the dissolve sets the pixels.
Uint16FieldEffectChannelCurve [32]Colour channel curves of the palette tints (field_engine_palette_fade.c): each maps a 5-bit channel (0 to 31) to a palette fade channel, shifted up 10 bits, so 31 is 31 << 10.
Uint16FieldEffectChannelCurveLight [32]
Uint16FieldEffectChannelCurveContrast [32]

Description

Four effect scripts of the field engine module, the found item's picture growing in and pulsing, a sinking particle and a Reveal marker, then the screen transitions' tables and the palette tints' channel curves, as The Broken Seal's field_engine_tables.c has them.

Variables in detail

ItemDisplayGrowInScript

const Sint32 ItemDisplayGrowInScript[]

The found item's picture growing in over the leader, from half size to full size, a step every 2 ticks (field_engine_item_display.c).

References Sint32.

Referenced by fdItemDisplayShowItemInFront() and fdItemDisplayShowPicture().

Definition at line 11 of file field_effect_scripts.c.

ItemDisplayPulseScript

const Sint32 ItemDisplayPulseScript[]

Pulses twice, to 1.5 times full size, then rests, over and over: the found item's picture held over the leader (field_engine_item_display.c).

References Sint32.

Referenced by fdItemDisplayRaiseAboveLeader().

Definition at line 31 of file field_effect_scripts.c.

ItemDisplaySparkleScript

const Sint32 ItemDisplaySparkleScript[]

A sparkle round the found item, sinking a quarter pixel a tick for 60 ticks before it goes (field_engine_item_display.c).

References Sint32.

Referenced by fdActorInitSparkle() and fdItemDisplayShowItemInFront().

Definition at line 64 of file field_effect_scripts.c.

RevealMarkerScript

const Sint32 RevealMarkerScript[]

A Reveal marker: stays while fdIsRevealActive returns nonzero (SC_CALL runs it again each tick), and releases itself once Reveal ends; the same as The Broken Seal's RevealMarkerScript.

References fdIsRevealActive() and Sint32.

Referenced by fdEffectSpawnRevealMarkers() and fdItemDisplayShowItemInFront().

Definition at line 74 of file field_effect_scripts.c.

ScreenTransitionBarWidths

const Uint8 ScreenTransitionBarWidths[34]

The width of the bars of WINDOW_TRANSITION_BARS, by progress.

Referenced by fdScreenTransitionUpdateScanlineTable().

Definition at line 82 of file field_effect_scripts.c.

ScreenTransitionEdgeOffsets

const Sint8 ScreenTransitionEdgeOffsets[32]

The wobble of the circle edge of WINDOW_TRANSITION_RIPPLE.

Referenced by fdScreenTransitionUpdateScanlineTable().

Definition at line 88 of file field_effect_scripts.c.

ScreenTransitionDitherTable

const Uint8 ScreenTransitionDitherTable[64]

0 to 63 shuffled: the order in which the dissolve sets the pixels.

Referenced by fdScreenTransitionUpdateDissolve().

Definition at line 94 of file field_effect_scripts.c.

FieldEffectChannelCurve

Uint16 FieldEffectChannelCurve[32]

Colour channel curves of the palette tints (field_engine_palette_fade.c): each maps a 5-bit channel (0 to 31) to a palette fade channel, shifted up 10 bits, so 31 is 31 << 10. The plain curve bends a little toward dark, the light one less, and the contrast one deepens the darks and is full from 25 up.

Referenced by fdPaletteFadeBuild().

Definition at line 105 of file field_effect_scripts.c.

FieldEffectChannelCurveLight

Uint16 FieldEffectChannelCurveLight[32]

Referenced by fdPaletteFadeBuild().

Definition at line 111 of file field_effect_scripts.c.

FieldEffectChannelCurveContrast

Uint16 FieldEffectChannelCurveContrast[32]

Referenced by fdPaletteFadeBuild().

Definition at line 117 of file field_effect_scripts.c.