Alchemy
Loading...
Searching...
No Matches

battle_event.h File Reference

The battle event queue: the events BattleEvPush queues and the playback phases that play them. More...

Go to the source code of this file.

Data Structures

struct  BattleEventQueue
 The battle event queue: up to 64 events, each an opcode (enum BattleEventOpcode) and one operand, in the order they play. More...

Enumerations

enum  { BATTLE_EVENT_CAPACITY = 64 }
enum  BattlePlaybackPhase { BATTLE_PLAYBACK_IDLE = 0 , BATTLE_PLAYBACK_RESOLVE_TARGET = 1 , BATTLE_PLAYBACK_DISPATCH = 2 , BATTLE_PLAYBACK_READY = 4 }
 BattleEventState.phase: how far BattleEvent_Playback has got through the plan's targets. More...
enum  BattleEventOpcode {
  BATTLE_EVENT_UNIT_NAME = 0 , BATTLE_EVENT_NUMBER = 1 , BATTLE_EVENT_ITEM_NAME = 2 , BATTLE_EVENT_ABILITY_NAME = 3 ,
  BATTLE_EVENT_MESSAGE = 4 , BATTLE_EVENT_MESSAGE_NO_WAIT = 5 , BATTLE_EVENT_MARK = 6 , BATTLE_EVENT_CLEAR_ARGUMENTS = 7 ,
  BATTLE_EVENT_HIT = 8 , BATTLE_EVENT_DEFEAT = 9 , BATTLE_EVENT_DRAW_STATUS = 10 , BATTLE_EVENT_REFRESH_UNIT = 11 ,
  BATTLE_EVENT_REMOVE_UNIT = 12 , BATTLE_EVENT_DJINN_BONUS = 13 , BATTLE_EVENT_SOUND = 14
}
 The battle events BattleEvPush queues, each with one operand, for BattleEvent_Playback (or BattleEv_DispatchQueued) to play in order. More...

Functions

 STATIC_ASSERT (sizeof(struct BattleEventQueue)==0x148)
 STATIC_ASSERT (offsetof(struct BattleEventQueue, operands)==0x040)
 STATIC_ASSERT (offsetof(struct BattleEventQueue, targetIndex)==0x140)
 STATIC_ASSERT (offsetof(struct BattleEventQueue, count)==0x144)

Detailed Description

The battle event queue: the events BattleEvPush queues and the playback phases that play them.

Definition in file battle_event.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
BATTLE_EVENT_CAPACITY 

Definition at line 11 of file battle_event.h.

◆ BattlePlaybackPhase

BattleEventState.phase: how far BattleEvent_Playback has got through the plan's targets.

Its message phases (PLAY_MESSAGE and the like) are private to playback.c.

Enumerator
BATTLE_PLAYBACK_IDLE 

paused until the effect resumes it

BATTLE_PLAYBACK_RESOLVE_TARGET 

resolves the next target's events

BATTLE_PLAYBACK_DISPATCH 

plays the queued events in order

BATTLE_PLAYBACK_READY 

every target has been played

Definition at line 16 of file battle_event.h.

◆ BattleEventOpcode

The battle events BattleEvPush queues, each with one operand, for BattleEvent_Playback (or BattleEv_DispatchQueued) to play in order.

The names, numbers and messages build what the player reads: the arguments first, then the message that shows them.

Enumerator
BATTLE_EVENT_UNIT_NAME 

a unit's name for the next message

BATTLE_EVENT_NUMBER 

a number for the next message

BATTLE_EVENT_ITEM_NAME 

an item's name for the next message

BATTLE_EVENT_ABILITY_NAME 

an ability's name for the next message

BATTLE_EVENT_MESSAGE 

a message, waiting for the player

BATTLE_EVENT_MESSAGE_NO_WAIT 

a message, going straight on

BATTLE_EVENT_MARK 

sets gBattleDisplayWork->marked

BATTLE_EVENT_CLEAR_ARGUMENTS 

forgets the names and numbers pushed

BATTLE_EVENT_HIT 

the unit flinches and flashes

BATTLE_EVENT_DEFEAT 

the unit falls; an enemy fades out

BATTLE_EVENT_DRAW_STATUS 

redraws the party's status

BATTLE_EVENT_REFRESH_UNIT 

the unit's status icons, colour, pose

BATTLE_EVENT_REMOVE_UNIT 

an enemy leaves the battle

BATTLE_EVENT_DJINN_BONUS 

later defeats give the Djinn bonus

BATTLE_EVENT_SOUND 

plays a sound

Definition at line 41 of file battle_event.h.

Function Documentation

◆ STATIC_ASSERT() [1/4]

STATIC_ASSERT ( sizeof(struct BattleEventQueue) = =0x148)

◆ STATIC_ASSERT() [2/4]

STATIC_ASSERT ( offsetof(struct BattleEventQueue, operands) = =0x040)

◆ STATIC_ASSERT() [3/4]

STATIC_ASSERT ( offsetof(struct BattleEventQueue, targetIndex) = =0x140)

◆ STATIC_ASSERT() [4/4]

STATIC_ASSERT ( offsetof(struct BattleEventQueue, count) = =0x144)