src/battle/battle_playback_queue.c
Battle playback: a downed unit's reset, waiting for the player, and the playback queue, filled by btPlaybackPush and played at once by btPlaybackRunAll. More…
Included by battle.c.
Macros
| Name | Description | |
|---|---|---|
#define | PLAYBACK_FLAG_DJINN_BONUS 1 | BATTLE_PLAYBACK_STATE.djinnBonus: a Djinni struck a weakness, so enemies that fall pay the Djinn bonus (btEnemyRecordDefeat). |
Functions
| Name | Description | |
|---|---|---|
UNREAD_RESULT | btUnitClearStatuses (Sint32 unitId) | Clears every status and stat change of a unit that goes down and works out its stats again. |
UNREAD_RESULT | btMessageWaitForAdvance (void) | Shows the bobbing arrow at the message window and waits for the player to go on. |
UNREAD_RESULT | btMessageWaitForAdvanceAt (Sint32 x, Sint32 y) | Shows the cursor bobbing at (x, y) and waits for the player to go on. |
void | btPlaybackMarkMessage (void) | Marks the next message, as PLAYBACK_MARK does. |
UNREAD_RESULT | btUnitRemoveEnemy (Sint32 unitId) | Takes an enemy out of the battle at once, one that leaves rather than falls. |
void | btPlaybackGrantDjinnBonus (BATTLE_PLAYBACK_STATE *runtime, Uint32 unused) | Grants the Djinn bonus for the rest of the action. |
Uint32 | btPlaybackRunAll (void) | |
Uint32 | btPlaybackPush (Uint32 opcode, Uint32 operand) | Queues one playback command with its operand, and returns the opcode. |
Description
Battle playback: a downed unit's reset, waiting for the player, and the
playback queue, filled by btPlaybackPush and played at once by
btPlaybackRunAll. Part of battle.c.
Macros in detail
PLAYBACK_FLAG_DJINN_BONUS
#define PLAYBACK_FLAG_DJINN_BONUS 1
BATTLE_PLAYBACK_STATE.djinnBonus: a Djinni struck a weakness, so enemies that
fall pay the Djinn bonus (btEnemyRecordDefeat).
Referenced by btPlaybackGrantDjinnBonus().
Definition at line 163 of file battle_playback_queue.c.
Functions in detail
btUnitClearStatuses
UNREAD_RESULT btUnitClearStatuses(Sint32 unitId)
Clears every status and stat change of a unit that goes down and works out its stats again.
References btObjectGet(), btUnitBuildStatusFlags(), gmUnitCalculateStub(), gmUnitGetStub() and Sint32.
Referenced by btPlaybackRun() and btPlaybackRunAll().
Definition at line 9 of file battle_playback_queue.c.
btMessageWaitForAdvance
UNREAD_RESULT btMessageWaitForAdvance(void)
Shows the bobbing arrow at the message window and waits for the player to go on.
References BattleMessageAdvanceArrowTiles, mnMessageAllTypedStub(), PerData, PerPush, Sint32, syIOWriteQueueClearBits16(), syIOWriteQueueSetBits16(), syOAMAddSpriteAtDepth(), sySoundPlayStub(), sySynch(), syVRAMCacheAllocateEntry(), syVRAMCacheFreeEntry(), syVRAMCacheReload() and TickCount.
Referenced by btActionRunBuild(), btAwardSpoils(), btIntroAnnounceEncounter(), btPlaybackRunAll(), btProcessTurnEnd(), btRun(), btStagingDispatchAction(), btStagingRunFlee() and btStagingRunMessages().
Definition at line 49 of file battle_playback_queue.c.
btMessageWaitForAdvanceAt
UNREAD_RESULT btMessageWaitForAdvanceAt(Sint32 x, Sint32 y)
Shows the cursor bobbing at (x, y) and waits for the player to go on.
References mnMessageAllTypedStub(), mnWindowSpriteGetPointerTilesStub(), PerPush, Sint32, syIOWriteQueueClearBits16(), syIOWriteQueueSetBits16(), syOAMAddSpriteAtDepth(), sySynch(), syVRAMCacheAllocateEntry(), syVRAMCacheFreeEntry(), syVRAMCacheReload() and TickCount.
Referenced by btRun().
Definition at line 98 of file battle_playback_queue.c.
btPlaybackMarkMessage
void btPlaybackMarkMessage(void)
Marks the next message, as PLAYBACK_MARK does.
Referenced by btActionRunBuild().
Definition at line 137 of file battle_playback_queue.c.
btUnitRemoveEnemy
UNREAD_RESULT btUnitRemoveEnemy(Sint32 unitId)
Takes an enemy out of the battle at once, one that leaves rather than falls.
References btObjectGet(), btObjectMarkForRelease(), btObjectRemoveFromLists(), fdActorReleaseStub(), gmUnitGetStub(), gmUnitSetHpStub() and Sint32.
Referenced by btPlaybackRun() and btPlaybackRunAll().
Definition at line 143 of file battle_playback_queue.c.
btPlaybackGrantDjinnBonus
void btPlaybackGrantDjinnBonus(BATTLE_PLAYBACK_STATE *runtime, Uint32 unused)
Grants the Djinn bonus for the rest of the action.
Referenced by btPlaybackRun() and btPlaybackRunAll().
Definition at line 166 of file battle_playback_queue.c.
btPlaybackRunAll
Uint32 btPlaybackRunAll(void)
References btEnemyRecordDefeat(), btMessageWaitForAdvance(), btMotionFlashHit(), btMotionShowDowned(), btObjectGet(), btObjectUpdatePose(), btPlaybackGrantDjinnBonus(), btPlaybackReset(), btUnitBuildStatusFlags(), btUnitClearStatuses(), btUnitRemoveEnemy(), mnBattleMessageShowAndWaitStub(), mnMessageArgumentClearAllStub(), mnMessageArgumentPushStub(), mnPartyStatusDrawStub(), Sint32 and sySoundPlayStub().
Referenced by btActionRunBuild(), btStagingRunAttack(), btStagingRunFullScreen(), btStagingRunItem(), btStagingRunMessages(), btStagingRunPlainAttack(), btStagingRunPsynergyCast() and btUnitProcessActionEnd().
Definition at line 177 of file battle_playback_queue.c.
btPlaybackPush
Uint32 btPlaybackPush(Uint32 opcode, Uint32 operand)
Queues one playback command with its operand, and returns the opcode. Nothing checks the queue's capacity.
Referenced by btAbilityApplyToTarget(), btActionRunBuild(), btProcessTurnEnd(), btStagingRunAttack(), btStagingRunFullScreen(), btStagingRunItem(), btStagingRunPsynergyCast() and btUnitProcessActionEnd().
Definition at line 261 of file battle_playback_queue.c.