Alchemy

fade_overlay.c

The fade overlay drawn on the ground beside an actor.

games/tbs/src/object/object/fade_overlay.c on GitHub

The fade overlay drawn on the ground beside an actor. Part of object.c, the field object, compiled only through it.

Functions

FadeOverlay_DrawMarks

void FadeOverlay_DrawMarks(void)

Each frame of the fade overlay: on each of the two cells beside the actor (left and right of it), where the ground one or two cells south rises above the actor's floor, draws a semi-transparent 16-pixel-wide sprite of colour 1 at the height of that ground. Registered as a scheduler callback by BattleFx_StartFadeOverlay; reads the work in heap slot 36 and queues the marks with Runtime_PushSlotEntry.

Used by BattleFx_StartFadeOverlay, FadeOverlay_Resume, FadeOverlay_Suspend.

Line 22

BattleFx_StartFadeOverlay

void BattleFx_StartFadeOverlay(void *object)

Starts the fade overlay on object (the party leader when NULL): loads its solid tiles, sets the blending and draws it each frame. Allocates heap slot 36 for its work, borrows heap block 14 for the tiles (0x200 bytes of colour 1, VRAM cache block 94) and registers FadeOverlay_DrawMarks. Called by seven scene overlays (Venus and Mercury Lighthouses, Kalay, the tunnel ruins, Crossbone Isle, the ice room by Imil and Fuchin Falls); Crossbone Isle then switches it on and off by setting the work's actor. No ☀️ code stops it (FadeOverlay_Suspend has no named caller): the work and the callback last until the next scene change resets the heap and the task table (Game_ResetForNewGame).

Used by ImilFuchinFalls_PrepareRoom, Kalay_PrepareTunnel, Scene_Initialize, Scene_RunEntrySetup, TunnelRuins_Initialize.

Line 116

FadeOverlay_Suspend

void FadeOverlay_Suspend(void)

Stops drawing the fade overlay, keeping its work. Reached only through a bare far-call veneer; no ☀️ code names it.

Line 142

FadeOverlay_Resume

void FadeOverlay_Resume(void)

Draws the fade overlay again after FadeOverlay_Suspend. Reached only through a bare far-call veneer.

Line 148

Structures

FadeView

struct FadeView

The map work in heap slot 8, seen as the halfwords of its view position: the high halves are the view's x and z in whole pixels.

FieldDeclared as
unk00u8 unk00[228]
cameras16 camera[4]

Used by FadeOverlay_DrawMarks.

Line 10

On this page