Alchemy
Loading...
Searching...
No Matches

speakers.c File Reference

Speaker definitions: portraits and idle lines by sprite. More...

Go to the source code of this file.

Functions

struct BattleEffectEntry * BattleFx_FindDefinition (u32 id)
 Returns the speaker definition of sprite id from gBattleFx_DefinitionTable, or its last entry when there is none.
s32 BattleFx_GetAnimationValue (s32 id)
 Returns the sprite id stored by a live actor's animated sprite, or 0 when that actor has no animated sprite or its sprite-id pointer is absent.
s32 BattleFx_GetResourceId (u32 id)
 Returns the portrait shown beside the messages of sprite id (0x100 plus its definition's value), or 0 with no portrait or with gGameState.speech off.
s32 BattleFx_GetFlags (s32 id)
 Returns the definition flags of actor id's sprite, which choose its line when it has nothing to say.

Detailed Description

Speaker definitions: portraits and idle lines by sprite.

Part of object.c, the field object, compiled only through it.

Definition in file speakers.c.

Function Documentation

◆ BattleFx_FindDefinition()

struct BattleEffectEntry * BattleFx_FindDefinition ( u32 id)

Returns the speaker definition of sprite id from gBattleFx_DefinitionTable, or its last entry when there is none.

The search stops after 0x82 entries, all but the table's last of its 131.

Definition at line 10 of file speakers.c.

Referenced by BattleFx_ClearRandomParticles(), BattleFx_FindDefinition(), BattleFx_GetFlags(), and BattleFx_GetResourceId().

◆ BattleFx_GetAnimationValue()

s32 BattleFx_GetAnimationValue ( s32 id)

Returns the sprite id stored by a live actor's animated sprite, or 0 when that actor has no animated sprite or its sprite-id pointer is absent.

Definition at line 27 of file speakers.c.

Referenced by BattleFx_ClearRandomParticles(), BattleFx_GetAnimationValue(), and BattleFx_GetFlags().

◆ BattleFx_GetResourceId()

s32 BattleFx_GetResourceId ( u32 id)

Returns the portrait shown beside the messages of sprite id (0x100 plus its definition's value), or 0 with no portrait or with gGameState.speech off.

Definition at line 40 of file speakers.c.

Referenced by Battle_ShowPairedUnitWorkAndWait(), BattleFx_ClearRandomParticles(), BattleFx_GetResourceId(), Ui_SetMessageVoiceFromActor(), and UiText_OpenMessageAtObject().

◆ BattleFx_GetFlags()

s32 BattleFx_GetFlags ( s32 id)

Returns the definition flags of actor id's sprite, which choose its line when it has nothing to say.

Definition at line 52 of file speakers.c.

Referenced by BattleFx_ClearRandomParticles(), BattleFx_FilterObjectIdByFlags(), BattleFx_GetFlags(), and Scene_TalkToActor().