Skip to Content
The Alchemy Project

include/battle/playback_queue.h

The battle event queue: the names, numbers, messages, hits and defeats an action queues for its playback to show in order.

Included by battle_internal.h and battle_state.h.

Structures

NameDescription
structBATTLE_PLAYBACK_QUEUEThe battle event queue: up to 64 events, each an opcode (enum BATTLE_PLAYBACK_COMMAND) and one operand, in the order they play.

Enumerations

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

Description

The battle event queue: the names, numbers, messages, hits and defeats an action queues for its playback to show in order.

Enumerations in detail

anonymous enum

enum { BATTLE_PLAYBACK_CAPACITY }

The most events a playback queues (BATTLE_PLAYBACK_STATE's opcodes and operands).

EnumeratorValueDescription
BATTLE_PLAYBACK_CAPACITY64

Definition at line 12 of file playback_queue.h.

BATTLE_PLAYBACK_PHASE

enum BATTLE_PLAYBACK_PHASE

BATTLE_PLAYBACK_STATE.phase: how far btPlaybackRun has got through the plan's targets.

EnumeratorValueDescription
BATTLE_PLAYBACK_PHASE_IDLE0paused until the effect resumes it
BATTLE_PLAYBACK_PHASE_RESOLVE_TARGET1resolves the next target's events
BATTLE_PLAYBACK_PHASE_DISPATCH2plays the queued events 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 battle events 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 RamHeapSlots->battleMsg->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
PLAYBACK_BLOW_AWAY15the unit leaves the lists, as one that flees

Definition at line 49 of file playback_queue.h.