Skip to Content
The Alchemy Project

include/battle/playback_queue.h

The playback queue: the commands btPlaybackPush queues and the playback phases that play them.

Included by battle_effect_internal.h, ability_staging.h, battle_state.h, character.h and inventory.h.

Structures

NameDescription
structBATTLE_PLAYBACK_QUEUEThe playback queue: up to BATTLE_PLAYBACK_CAPACITY commands, each an opcode (BATTLE_PLAYBACK_COMMAND) and one operand, in the order they play.

Enumerations

NameDescription
enumanonymous enum { BATTLE_PLAYBACK_CAPACITY }The most commands the playback queue holds.
enumBATTLE_PLAYBACK_PHASE { BATTLE_PLAYBACK_PHASE_IDLE, BATTLE_PLAYBACK_PHASE_RESOLVE_TA … }BATTLE_PLAYBACK_STATE.phase: how far btPlaybackRun has got through the action's targets.
enumBATTLE_PLAYBACK_COMMAND { PLAYBACK_UNIT_NAME, PLAYBACK_NUMBER, PLAYBACK_ITEM_NAME, PLA … }The playback commands btPlaybackPush queues, each with one operand, for btPlaybackRun (or btPlaybackRunAll) to play in order.

Description

The playback queue: the commands btPlaybackPush queues and the playback phases that play them.

Enumerations in detail

anonymous enum

enum { BATTLE_PLAYBACK_CAPACITY }

The most commands the playback queue holds.

EnumeratorValueDescription
BATTLE_PLAYBACK_CAPACITY64

Definition at line 11 of file playback_queue.h.

BATTLE_PLAYBACK_PHASE

enum BATTLE_PLAYBACK_PHASE

BATTLE_PLAYBACK_STATE.phase: how far btPlaybackRun has got through the action's targets. Its message phases (PLAY_MESSAGE and the like) are private to battle_playback.c.

EnumeratorValueDescription
BATTLE_PLAYBACK_PHASE_IDLE0paused until the effect resumes it
BATTLE_PLAYBACK_PHASE_RESOLVE_TARGET1Resolves the next target's commands
BATTLE_PLAYBACK_PHASE_DISPATCH2plays the queued commands in order
BATTLE_PLAYBACK_PHASE_READY4every target has been played

Definition at line 19 of file playback_queue.h.

BATTLE_PLAYBACK_COMMAND

enum BATTLE_PLAYBACK_COMMAND

The playback commands btPlaybackPush queues, each with one operand, for btPlaybackRun (or btPlaybackRunAll) to play in order. The names, numbers and messages build what the player reads: the arguments first, then the message that shows them.

EnumeratorValueDescription
PLAYBACK_UNIT_NAME0a unit's name for the next message
PLAYBACK_NUMBER1a number for the next message
PLAYBACK_ITEM_NAME2an item's name for the next message
PLAYBACK_ABILITY_NAME3an ability's name for the next message
PLAYBACK_MESSAGE4a message, waiting for the player
PLAYBACK_MESSAGE_NO_WAIT5a message, going straight on
PLAYBACK_MARK6sets BattleMessageStateWork->marked
PLAYBACK_CLEAR_ARGUMENTS7forgets the names and numbers pushed
PLAYBACK_HIT8the unit flinches and flashes
PLAYBACK_DEFEAT9the unit falls; an enemy fades out
PLAYBACK_DRAW_STATUS10redraws the party's status
PLAYBACK_REFRESH_UNIT11the unit's status icons, colour, pose
PLAYBACK_REMOVE_UNIT12an enemy leaves the battle
PLAYBACK_DJINN_BONUS13later defeats give the Djinn bonus
PLAYBACK_SOUND14plays a sound

Definition at line 53 of file playback_queue.h.