Alchemy
Loading...
Searching...
No Matches

battle_party.h

Go to the documentation of this file.
1#ifndef ALCHEMY_BATTLE_PARTY_H
2#define ALCHEMY_BATTLE_PARTY_H
3
4/// @file
5/// Which units are in a battle, and the Djinn recovery list.
6
7#include "edition.h"
8#include "static_assert.h"
9
10/// BattleUnit.side: which side a unit fights on, if it is in the battle.
15};
16
17/// Marks in a list of unit ids, such as BattleWork.partyUnits and enemyIds.
19 BATTLE_UNIT_REMOVED = 0xfe, ///< a place whose unit has left the battle
20 BATTLE_UNIT_LIST_END = 0xff ///< ends the list
21};
22
23/// Which sides a unit list takes, as BattleParty_ListLivingUnits reads it.
28};
29
30/// A Djinni on standby or recovering: its element and index, its owner, and
31/// the turns until it is set again.
33 u8 element; ///< enum Element
34 u8 index; ///< the Djinni within its element, 0 to 19
35 u8 unitId; ///< its owner
36 /// Turns until it is set again; -1 on standby
37 /// (DJINN_RECOVERY_AFTER_BATTLE), -2 while a summon uses it.
39};
40
41STATIC_ASSERT(sizeof(struct DjinnRecoveryEntry) == 4);
42
43/// One side's Djinn recovery list: up to 64 entries and their count.
46 s32 count; ///< entries in use
47};
48
49/// One side's Djinn recovery table, as Djinn_GetRecoveryTable returns it.
51 u8 unk00[8]; ///< its first word is BattleSummonState's availableMask
53};
54
55#endif
BattleUnitListMark
Marks in a list of unit ids, such as BattleWork.partyUnits and enemyIds.
@ BATTLE_UNIT_LIST_END
ends the list
@ BATTLE_UNIT_REMOVED
a place whose unit has left the battle
BattleUnitPresence
BattleUnit.side: which side a unit fights on, if it is in the battle.
@ BATTLE_UNIT_ABSENT
@ BATTLE_UNIT_ENEMY
@ BATTLE_UNIT_PARTY
BattleSideMask
Which sides a unit list takes, as BattleParty_ListLivingUnits reads it.
@ BATTLE_SIDE_PARTY
@ BATTLE_SIDE_ENEMIES
@ BATTLE_SIDE_BOTH
The edition's language, for C to compare (LANGUAGE == LANGUAGE_GERMAN).
STATIC_ASSERT, a compile-time check that emits nothing.
#define STATIC_ASSERT(condition)
C89 permits repeated extern declarations of the same array.
A Djinni on standby or recovering: its element and index, its owner, and the turns until it is set ag...
u8 unitId
its owner
s8 turns
Turns until it is set again; -1 on standby (DJINN_RECOVERY_AFTER_BATTLE), -2 while a summon uses it.
u8 element
enum Element
u8 index
the Djinni within its element, 0 to 19
One side's Djinn recovery list: up to 64 entries and their count.
struct DjinnRecoveryEntry entries[64]
s32 count
entries in use
One side's Djinn recovery table, as Djinn_GetRecoveryTable returns it.
struct DjinnRecoveryList list
u8 unk00[8]
its first word is BattleSummonState's availableMask
signed int s32
Definition types.h:14
signed char s8
Definition types.h:10
unsigned char u8
Definition types.h:11