Skip to Content
The Alchemy Project

include/game/main_routine.h

The main routine, which runs the game's engines one after another, and the scene changes between them.

Included by system.h.

Enumerations

NameDescription
enumGAME_START { GAME_START_TITLE, GAME_START_DEBUG_VENUS_LIGHTHOUSE, GAME_ST … }gmMainRoutineRun's mode: where the game starts.

Functions

NameDescription
voidgmTakeExit (Sint32 exitId)game/main_routine.c documents each.
voidgmReturnFromEngine (Sint32 result)Chooses where the game continues after an engine other than the field engine (see gmMainRoutineRun).
Sint32gmGetArea (Sint32 sceneId)Returns the area sceneId belongs to.
voidgmLoadOverlay (Sint32 unused)Loads the current scene's overlay code (its resource) into OverlayArea.
voidgmArrive (Sint32 unused, Sint32 keep)Updates the flags and state that last for one scene or one area, on entering the current scene.

Description

The main routine, which runs the game's engines one after another, and the scene changes between them.

Enumerations in detail

GAME_START

enum GAME_START

gmMainRoutineRun's mode: where the game starts. Only GAME_START_TITLE is passed (syInit, gmRestartQuest); the others are its debug starts.

EnumeratorValueDescription
GAME_START_TITLE0the Title, with the state cleared
GAME_START_DEBUG_VENUS_LIGHTHOUSE1SCENE_VENUS_LIGHTHOUSE_ENTRANCE
GAME_START_DEBUG_CLEAR2SCENE_CLEAR, as from the title
GAME_START_DEBUG_MT_ALEPH3SCENE_MT_ALEPH_SUMMIT
GAME_START_DEBUG_TITLE4the story crawl

Definition at line 11 of file main_routine.h.