36#define ENEMY_SPRITE_SLOTS 6
51 if (needsSingleSlot != 0)
84 spritePart = result.value;
100 if (slot < ENEMY_SPRITE_SLOTS - 1 && battle->spriteSlots[slot + 1] == 0)
122 result.value = (slot << 12) | sprite;
125 if (!needsSingleSlot)
131 }
while (++spritePart <= 1);
156#define WEAPON_ITEM_MASK 0x1ff
157#define WEAPON_KIND_SHIFT 9
158#define WEAPON_KIND_NONE 6
165 struct SlotAssignmentView {
166 volatile u16 entries[52];
170 u32 reloadedAssignment;
173 for (assignmentIndex = 0;; assignmentIndex++) {
181 ->entries[assignmentIndex];
185 if ((
s16)assignment == -1) {
s32 BattleClass_GetPalette(s32 index)
Returns the class's sprite palette.
s32 BattleClass_IsSmall(s32 index)
Returns 1 for a small class, which takes one enemy sprite slot instead of two and stands closer to it...
s32 BattleClass_GetSprite(s32 index)
Returns the class's battle sprite, row 0's for a class out of range.
s32 BattleParty_ListActorIds(s32 sideMask, u16 *unitIds)
Lists the units in the battle's unit lists on the sides in sideMask, party first, skipping those remo...
void BattleActor_SpawnObjectsForList(s16 *unitIds, s32 refreshPoses)
Readies the sprites of the units in list: releases those of every place list lacks,...
struct BattleObj * BattleObjGet(s32 unitId)
Returns unitId's battle object, through its place, or null for a unit with no place.
void BattleObjPut(void)
Readies the sprite of every unit in the battle (releasing those of units that left) and sets each one...
void BattleParty_ListAllUnitsAndSubmit(void)
Readies the sprite of every unit in the battle (releasing those of units that left),...
s32 SummonSlot_RegisterActorSprites(s32 unitId)
Loads an enemy unit's battle sprite into the first free enemy sprite slots (one for a small enemy,...
s32 BattleUnit_LookupWeaponValueByClass(s32 unitId)
Returns the weapon sprite a party member's attack shows for the kind of weapon they have equipped (gB...
s32 BattleUnit_GetWeaponKind(s32 itemId)
Returns the kind of the weapon whose item id is itemId (0 to 5), which picks a party member's attack ...
#define ENEMY_SPRITE_SLOTS
The battle has six enemy sprite slots; a large enemy takes two side by side, a small one (BattleClass...
s32 BattleMotion_ReleaseObjectSlotByValue(s32 unitId)
Frees every enemy sprite slot unit unitId holds, unloading its sprite.
#define WEAPON_KIND_SHIFT
s32 EnemyCheck(s32 classId)
Returns 1 if an enemy of class classId would find room among the enemy sprite slots: one free slot fo...
s32 BattleMotion_GetSlotPalette(s32 id)
Returns the palette of unit id's battle object.
u16 gBattleUnit_WeaponAnimsClass2[]
u16 gBattleUnit_WeaponAnimsClass3[]
u16 gResource_SlotAssignments[]
u16 gBattleUnit_WeaponAnimsClass5[]
u16 gBattleUnit_WeaponAnimsClass1[]
u16 gBattleUnit_WeaponAnimsClass0[]
What every part of the battle object shares: its includes, in their original order,...
#define SPRITE_WITH_SECOND_PART_B
#define EQUIP_WEAPON
The inventory's weapon slot, for Inventory_FindEquippedFar.
#define SPRITE_WITH_SECOND_PART_A
The two battle sprites whose next sprite is loaded with them (into a second free place),...
struct BattleWork * gBattleWork
s32 ResourceSlot_LoadFar(u32 slot, u32 *buffer, s32 number, u32 variant)
struct BattleUnit * UnitGetFar(u32 owner)
s32 Inventory_FindEquippedFar(s32 owner, s32 type)
#define Ram_ActorSpriteSlots
s32 palette
the unit sprite's palette
A unit in battle: a party member's or an enemy's stats, Psynergy, items, Djinn and ailments.
u8 classId
Who the unit is: a character's id (ISAAC to JENNA, below 8) or an enemy's id (BattleUnitSet).
u8 classIndex
The character's class, worked out from its Djinn (Unit_UpdateClass); 0 marks an enemy,...
u16 inventory[15]
Items held, one entry each: bits 15..11 quantity | 10 broken | 9 equipped | 8..0 item id (INVENTORY_*...
The battle's own work: its enemies, units and their objects, the turn's actions, the spoils,...
s16 spriteSlots[6]
the unit in each enemy sprite slot, 0 when free