src/battle/battle_sprite.c
Reading a unit's row of BattleSprites by its id (UNIT.id): an enemy's sprite, palette, size, attack and defeat sound. More…
Included by battle.c.
Macros
| Name | Description | |
|---|---|---|
#define | BATTLE_SPRITE_ROW_LAST 171 | The last row of BattleSprites (battle_sprites.c). |
Functions
| Name | Description | |
|---|---|---|
Uint32 | btSpriteGetDefeatSound (Sint32 index) | Returns the enemy's defeat-sound kind, 0 to 4, or -1 for none; a fallen enemy's sound is SE_ENEMY_CRY plus it. |
Sint32 | btSpriteGetSprite (Sint32 index) | Returns the enemy's battle sprite, row 0's for an index out of range. |
Sint32 | btSpriteGetPalette (Sint32 index) | Open question (no evidence in reach): whether returning the sprite for a bad index is a slip copied from btSpriteGetSprite. |
Sint32 | btSpriteIsSmall (Sint32 index) | Returns 1 for a small enemy, which takes one enemy sprite slot instead of two and stands closer to its neighbours; 0 out of range. |
Uint32 | btSpriteGetAttackEffect (Uint32 index) | Returns the beam an enemy's plain attack shows, 1 for none or out of range. |
Uint32 | btSpriteGetAttackHop (Uint32 index) | Returns how high an enemy hops as it runs up to attack, in pixels; 0 out of range. |
Sint32 | btSpriteHasHeavyImpact (Sint32 index) | Returns 1 for an enemy whose blow lands with SE_HEAVY_IMPACT, the Venus Lighthouse aerie's bosses. |
Sint32 | btSpriteGetEffectHeight (Sint32 index) | Returns the height a battle effect is drawn at over an enemy, in pixels, or 0 for its size's default; 0 out of range. |
Description
Reading a unit's row of BattleSprites by its id (UNIT.id): an enemy's sprite,
palette, size, attack and defeat sound. Part of battle.c.
Macros in detail
BATTLE_SPRITE_ROW_LAST
#define BATTLE_SPRITE_ROW_LAST 171
The last row of BattleSprites (battle_sprites.c).
Referenced by btSpriteGetAttackEffect(), btSpriteGetAttackHop(), btSpriteGetEffectHeight(), btSpriteGetPalette(), btSpriteGetSprite(), btSpriteHasHeavyImpact() and btSpriteIsSmall().
Definition at line 18 of file battle_sprite.c.
Functions in detail
btSpriteGetDefeatSound
Uint32 btSpriteGetDefeatSound(Sint32 index)
Returns the enemy's defeat-sound kind, 0 to 4, or -1 for none; a fallen
enemy's sound is SE_ENEMY_CRY plus it. Reads any index unchecked.
References BattleSprites and Sint32.
Referenced by btPlaybackRun().
Definition at line 8 of file battle_sprite.c.
btSpriteGetSprite
Sint32 btSpriteGetSprite(Sint32 index)
Returns the enemy's battle sprite, row 0's for an index out of range.
References BattleSprites and Sint32.
Referenced by btEnemySpriteLoadIntoSlots() and btObjectMake().
Definition at line 21 of file battle_sprite.c.
btSpriteGetPalette
Sint32 btSpriteGetPalette(Sint32 index)
Open question (no evidence in reach): whether returning the sprite for a bad index is a slip
copied from btSpriteGetSprite. Returns the enemy's sprite palette. For an
index out of range it returns row 0's sprite, not a palette.
References BattleSprites and Sint32.
Referenced by btEnemySpriteLoadIntoSlots() and btObjectMake().
Definition at line 31 of file battle_sprite.c.
btSpriteIsSmall
Sint32 btSpriteIsSmall(Sint32 index)
Returns 1 for a small enemy, which takes one enemy sprite slot instead of two and stands closer to its neighbours; 0 out of range.
References BattleSprites and Sint32.
Referenced by btEnemyHasSpriteRoom(), btEnemySpriteLoadIntoSlots(), btFormationBuildEnemyList(), btMotionProjectCursorPoint(), btPlacementLayoutEnemies() and btUnitGetEffectHeight().
Definition at line 40 of file battle_sprite.c.
btSpriteGetAttackEffect
Uint32 btSpriteGetAttackEffect(Uint32 index)
Returns the beam an enemy's plain attack shows, 1 for none or out of range.
References BattleSprites.
Referenced by btActionRunBuild().
Definition at line 53 of file battle_sprite.c.
btSpriteGetAttackHop
Uint32 btSpriteGetAttackHop(Uint32 index)
Returns how high an enemy hops as it runs up to attack, in pixels; 0 out of range.
References BattleSprites.
Referenced by btStagingRunAttack().
Definition at line 65 of file battle_sprite.c.
btSpriteHasHeavyImpact
Sint32 btSpriteHasHeavyImpact(Sint32 index)
Returns 1 for an enemy whose blow lands with SE_HEAVY_IMPACT, the Venus
Lighthouse aerie's bosses.
References BattleSprites and Sint32.
Definition at line 77 of file battle_sprite.c.
btSpriteGetEffectHeight
Sint32 btSpriteGetEffectHeight(Sint32 index)
Returns the height a battle effect is drawn at over an enemy, in pixels, or 0 for its size's default; 0 out of range.
References BattleSprites and Sint32.
Referenced by btUnitGetEffectHeight().
Definition at line 86 of file battle_sprite.c.