Dialogue commands
ScriptDialogueCommand · signed byte, first operand of Dialogue screen
Script instructions · Virtual machine
The illustrated dialogue screen is driven by one instruction with several commands: enter and leave the screen, draw a picture, show a text, open a dialogue box, or ask the player to choose an answer.1
The names describe the routines each command calls; they do not establish every effect of those routines. Other bytes take a default path whose purpose is unknown.
typedef enum ScriptDialogueCommand {
SCRIPT_DIALOGUE_BITMAP = 0xd3, /* Draw a region of a named picture. */
SCRIPT_DIALOGUE_RESTORE = 0xd4, /* Leave the dialogue screen and forget the last picture. */
SCRIPT_DIALOGUE_INITIALIZE = 0xd5, /* Enter the dialogue screen and read TEXT.DAT. */
SCRIPT_DIALOGUE_BOX = 0xd6, /* Call the dialogue-box routine. */
SCRIPT_DIALOGUE_CHOICE = 0xd8, /* Show a text and store the chosen answer (1-based) in the run variable. */
SCRIPT_DIALOGUE_TEXT = 0xf8 /* Show a TEXT.DAT text, then an optional wait prompt. */
} ScriptDialogueCommand;
The picture command takes a frame and options. The operands and the order of operations of every command are on the Dialogue screen page. Conditions read the chosen answer back through the run variable; see condition expression tokens.
Sources
Locations refer to the game executable reference.