src/field/speaker_voices.c
The voice each sprite speaks in, and a few small actor scripts and tables: an actor's bounce, the dust puffs' lives and a blinking actor's colours.
#include "macros.h"#include "sounds.h"#include "sprite_ids.h"#include "field/actor_script.h"#include "field/sprite.h"
Macros
| Name | Description | |
|---|---|---|
#define | SPEAKER (sprite, voice) {sprite, SE_VOICE_##voice##_A - SE_VOICE_FIR … | Each sprite's voice as it speaks and the lines it says while Halted, as halfword pairs of a sprite id and a SPEAKER_DEFINITION's two bytes (field/speaker.h): fdSpeakerFindDefinition searches the first 243 rows by sprite id and gives the last, the default, for any other sprite. |
#define | SPEAKER_SILENT (sprite) {sprite, -1} | A sprite with no voice that Halt never stops (SPEAKER_VOICE_NONE and SPEAKER_HALTED_LINES_NONE). |
#define | SPEAKER_DEFAULT (voice) {0, SE_VOICE_##voice##_A - SE_VOICE_FIRST} | The voice of every sprite the table does not list. |
Variables
| Name | Description | |
|---|---|---|
const Sint16 | SpeakerDefinitions [][2] | Each sprite's voice and Halted lines, the default last. |
Description
The voice each sprite speaks in, and a few small actor scripts and tables: an actor's bounce, the dust puffs' lives and a blinking actor's colours.
Macros in detail
SPEAKER
#define SPEAKER(sprite, voice) {sprite, SE_VOICE_##voice##_A - SE_VOICE_FIRST}
Each sprite's voice as it speaks and the lines it says while Halted, as
halfword pairs of a sprite id and a SPEAKER_DEFINITION's two bytes
(field/speaker.h): fdSpeakerFindDefinition searches the first 243 rows by
sprite id and gives the last, the default, for any other sprite. No sprite
here has Halted lines of its own, so each says MsgPonderEllipsis's first
pair.
Definition at line 16 of file speaker_voices.c.
SPEAKER_SILENT
#define SPEAKER_SILENT(sprite) {sprite, -1}
A sprite with no voice that Halt never stops (SPEAKER_VOICE_NONE and
SPEAKER_HALTED_LINES_NONE).
Definition at line 19 of file speaker_voices.c.
SPEAKER_DEFAULT
#define SPEAKER_DEFAULT(voice) {0, SE_VOICE_##voice##_A - SE_VOICE_FIRST}
The voice of every sprite the table does not list.
Definition at line 21 of file speaker_voices.c.
Variables in detail
SpeakerDefinitions
const Sint16 SpeakerDefinitions[][2]
Each sprite's voice and Halted lines, the default last.
Referenced by fdSpeakerFindDefinition().
Definition at line 23 of file speaker_voices.c.