Skip to Content
The Alchemy Project

include/field/screen_transition.h

What the field engine's parts share with the files that define their tables: the item-display and Reveal scripts, the palette fade's colour curves, and the screen transitions' shapes, tables and window values.

Included by field_engine.h.

Structures

NameDescription
structTRANSITION_SPANA run of screen lines in a transition shape: one window edge pair for every line, or, when that is 0, edges moving from left x0 and right y0 to left x1 and right y1 down the run.
structTRANSITION_SHAPEOne step of WINDOW_TRANSITION_SHAPE, a row of ScreenTransitionShapes chosen by the progress: the WININ and WINOUT values, swapped as the transition opens or closes, and three runs of lines written one after another from the top of the screen.

Macros

NameDescription
#defineTRANSITION_OPEN 32A window transition's value: from 0, the screen covered, it opens to TRANSITION_OPEN and closes again to TRANSITION_CLOSED; a mode draws the opening half and the closing half mirrored.
#defineTRANSITION_CLOSED 64
#defineTRANSITION_SHOW_ALL 0x7f7fWININ or WINOUT showing every layer in both windows (bits 6 and 14 set too).
#defineTRANSITION_SHOW_LOW_BYTE 0x007fWININ or WINOUT showing every layer in its low byte (window 0, or outside both windows; bit 6 set too) and nothing in its high byte.
#defineTRANSITION_SHOW_BG0 (WININ_WIN0_BG0 | WININ_WIN1_BG0)WININ or WINOUT showing BG0 alone, in both bytes.

Functions

NameDescription
BoolfdIsRevealActive (struct ACTOR *interpreter)Returns 1 while Reveal is active, else 0.

Variables

NameDescription
extern const Sint32ItemDisplayGrowInScript []The found item's picture over the leader: growing in from half size, then pulsing to 1.5 times its size and resting, over and over.
extern 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).
extern const Sint32RevealMarkerScript []A Reveal marker's script, which releases it once fdIsRevealActive returns 0, Reveal having ended.
extern const Uint8ScreenTransitionBarWidths []Pixels: the width of WINDOW_TRANSITION_BARS' bar on each line, by progress.
extern const Sint8ScreenTransitionEdgeOffsets []Pixels: how far each line's edge of Reveal's rippling ellipse moves out.
extern TRANSITION_SHAPEScreenTransitionShapes [TRANSITION_OPEN]The window shape of each step of WINDOW_TRANSITION_SHAPE.
extern const Uint8ScreenTransitionDitherTable []The order in which the dissolve sets the 64 pixels of its tile.

Description

What the field engine's parts share with the files that define their tables: the item-display and Reveal scripts, the palette fade's colour curves, and the screen transitions' shapes, tables and window values.

Macros in detail

TRANSITION_OPEN

#define TRANSITION_OPEN 32

A window transition's value: from 0, the screen covered, it opens to TRANSITION_OPEN and closes again to TRANSITION_CLOSED; a mode draws the opening half and the closing half mirrored.

Referenced by fdScreenTransitionFinish(), fdScreenTransitionStart(), fdScreenTransitionUpdateDissolve(), fdScreenTransitionUpdateScanlineTable() and ScreenTransitionShapes.

Definition at line 30 of file screen_transition.h.

TRANSITION_CLOSED

#define TRANSITION_CLOSED 64

Referenced by fdScreenTransitionFinish() and fdScreenTransitionUpdateScanlineTable().

Definition at line 31 of file screen_transition.h.

TRANSITION_SHOW_ALL

#define TRANSITION_SHOW_ALL 0x7f7f

WININ or WINOUT showing every layer in both windows (bits 6 and 14 set too).

Referenced by fdScreenTransitionUpdateScanlineTable() and ScreenTransitionShapes.

Definition at line 34 of file screen_transition.h.

TRANSITION_SHOW_LOW_BYTE

#define TRANSITION_SHOW_LOW_BYTE 0x007f

WININ or WINOUT showing every layer in its low byte (window 0, or outside both windows; bit 6 set too) and nothing in its high byte.

Referenced by ScreenTransitionShapes.

Definition at line 38 of file screen_transition.h.

TRANSITION_SHOW_BG0

#define TRANSITION_SHOW_BG0 (WININ_WIN0_BG0 | WININ_WIN1_BG0)

WININ or WINOUT showing BG0 alone, in both bytes.

Referenced by ScreenTransitionShapes.

Definition at line 41 of file screen_transition.h.