Skip to Content
The Alchemy Project

src/field/field_engine_speakers.c

Who speaks: each sprite's speaker definition, its voice and its halted lines, and the pair table. More…

Included by field_engine.c.

Macros

NameDescription
#defineSPEAKER_DEFINITION_COUNT 243The rows of SpeakerDefinitions fdSpeakerFindDefinition searches; the row after them is the default.

Functions

NameDescription
SPEAKER_DEFINITION *fdSpeakerFindDefinition (Uint32 id)Returns the speaker definition of sprite id from SpeakerDefinitions, or its last entry, the default, when there is none.
Sint32fdSpeakerGetActorSprite (Uint32 actorId)Returns the sprite actor actorId shows, or 0 when it shows no animated sprite.
Sint32fdSpeakerGetVoice (Sint32 id)Returns the voice of sprite id's messages: the first of its four blip sounds, SE_VOICE_FIRST plus its definition's value, or 0 for none (SPEAKER_VOICE_NONE) or with the Speech option off (MainRoutineStateWork.speech).
Sint32fdSpeakerGetHaltedLines (Sint32 id)Returns SPEAKER_DEFINITION.haltedLines of actor id's sprite: the pair of lines fdTalkToActor gives it while Halted, or SPEAKER_HALTED_LINES_NONE when Halt passes it over (fdPsynergyFilterHaltTarget).
Sint32fdPairTableFind (Sint32 key)Unused: only the two below call it, and nothing calls them or the stub calls engine_stubs.s exports for the three.
Sint32fdPairTableFindAndIgnore (Sint32 key)Unused.
Sint32fdPairTableFindCopy (Sint32 key)Unused.

Variables

NameDescription
extern const Sint32PairTable []{key, value} rows ended by a key of -1; this list has only the end.

Description

Who speaks: each sprite's speaker definition, its voice and its halted lines, and the pair table. Part of field_engine.c.

Macros in detail

SPEAKER_DEFINITION_COUNT

#define SPEAKER_DEFINITION_COUNT 243

The rows of SpeakerDefinitions fdSpeakerFindDefinition searches; the row after them is the default.

Referenced by fdSpeakerFindDefinition().

Definition at line 6 of file field_engine_speakers.c.

Functions in detail

fdSpeakerFindDefinition

SPEAKER_DEFINITION *fdSpeakerFindDefinition(Uint32 id)

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

References SpeakerDefinitions.

Referenced by fdSpeakerGetHaltedLines() and fdSpeakerGetVoice().

Definition at line 10 of file field_engine_speakers.c.

fdSpeakerGetActorSprite

Sint32 fdSpeakerGetActorSprite(Uint32 actorId)

Returns the sprite actor actorId shows, or 0 when it shows no animated sprite.

References fdActorLookup() and Sint32.

Referenced by fdSpeakerGetHaltedLines().

Definition at line 30 of file field_engine_speakers.c.

fdSpeakerGetVoice

Sint32 fdSpeakerGetVoice(Sint32 id)

Returns the voice of sprite id's messages: the first of its four blip sounds, SE_VOICE_FIRST plus its definition's value, or 0 for none (SPEAKER_VOICE_NONE) or with the Speech option off (MainRoutineStateWork.speech). mnMessageOpenWindowStub takes it in the high half of its last argument.

References fdSpeakerFindDefinition(), MainRoutineStateWork and Sint32.

Referenced by fdMessageSetVoiceFromActor(), fdMessageShowAtActor(), fdScriptShowTwoMessagesAndWait(), scChampaShowTwoMessages(), scEpilogueShowLineAt() and scLemuriaEntranceShowLineWithPortrait().

Definition at line 47 of file field_engine_speakers.c.

fdSpeakerGetHaltedLines

Sint32 fdSpeakerGetHaltedLines(Sint32 id)

Returns SPEAKER_DEFINITION.haltedLines of actor id's sprite: the pair of lines fdTalkToActor gives it while Halted, or SPEAKER_HALTED_LINES_NONE when Halt passes it over (fdPsynergyFilterHaltTarget).

References fdSpeakerFindDefinition(), fdSpeakerGetActorSprite() and Sint32.

Referenced by fdPsynergyFilterHaltTarget() and fdTalkToActor().

Definition at line 60 of file field_engine_speakers.c.

fdPairTableFind

Sint32 fdPairTableFind(Sint32 key)

Unused: only the two below call it, and nothing calls them or the stub calls engine_stubs.s exports for the three. Looks key up in PairTable's {key, value} rows and returns its value, or -1; the table holds only its end, so every key gets -1.

References PairTable and Sint32.

Referenced by fdPairTableFindAndIgnore() and fdPairTableFindCopy().

Definition at line 71 of file field_engine_speakers.c.

fdPairTableFindAndIgnore

Sint32 fdPairTableFindAndIgnore(Sint32 key)

Unused. Looks key up as fdPairTableFind does and returns 0.

References fdPairTableFind() and Sint32.

Definition at line 88 of file field_engine_speakers.c.

fdPairTableFindCopy

Sint32 fdPairTableFindCopy(Sint32 key)

Unused. fdPairTableFind again.

References fdPairTableFind() and Sint32.

Definition at line 95 of file field_engine_speakers.c.