aboutsummaryrefslogtreecommitdiff
path: root/queen/talk.h
diff options
context:
space:
mode:
authorDavid Eriksson2003-10-15 11:33:02 +0000
committerDavid Eriksson2003-10-15 11:33:02 +0000
commitde410e62f2f6ebde22948e2d31f444abeec7279a (patch)
tree767df03393f851bb1a61053e62bccd0aad65356f /queen/talk.h
parent233e33cf78d96dcc127715d7a544c403232fa1b4 (diff)
downloadscummvm-rg350-de410e62f2f6ebde22948e2d31f444abeec7279a.tar.gz
scummvm-rg350-de410e62f2f6ebde22948e2d31f444abeec7279a.tar.bz2
scummvm-rg350-de410e62f2f6ebde22948e2d31f444abeec7279a.zip
Improved talking.
svn-id: r10813
Diffstat (limited to 'queen/talk.h')
-rw-r--r--queen/talk.h37
1 files changed, 29 insertions, 8 deletions
diff --git a/queen/talk.h b/queen/talk.h
index a1fae9290d..45d7b6f678 100644
--- a/queen/talk.h
+++ b/queen/talk.h
@@ -45,7 +45,7 @@ class Talk {
//! Public interface to speak a sentence
static bool speak(
const char *sentence,
- const char *person,
+ Person *person,
const char *voiceFilePrefix,
Graphics *graphics,
Logic *logic,
@@ -73,6 +73,8 @@ class Talk {
SPEAK_FACE_RIGHT = -2,
SPEAK_FACE_FRONT = -3,
SPEAK_FACE_BACK = -4,
+ SPEAK_ORACLE = -5,
+ SPEAK_UNKNOWN_6 = -6,
SPEAK_AMAL_ON = -7,
SPEAK_PAUSE = -8,
SPEAK_NONE = -9
@@ -91,6 +93,14 @@ class Talk {
int16 gameStateValue;
};
+ struct SpeechParameters {
+ const char *name; // Nstr
+ signed char state,faceDirection; // S,F
+ signed char body,bf,rf,af;
+ const char *animation; // SANIMstr
+ signed char ff;
+ };
+
Graphics *_graphics;
Logic *_logic;
Resource *_resource;
@@ -122,6 +132,9 @@ class Talk {
//! Set to true to quit talking
bool _quit;
+ //! Is a talking head
+ bool _talkHead;
+
//! IDs for sentences
DialogueNode _dialogueTree[18][6];
@@ -137,6 +150,8 @@ class Talk {
char _talkString[5][MAX_STRING_SIZE];
char _joeVoiceFilePrefix[5][MAX_STRING_SIZE];
+ static const SpeechParameters _speechParameters[];
+
Talk(Graphics *graphics, Logic *logic, Resource *resource);
~Talk();
@@ -162,22 +177,28 @@ class Talk {
int16 selectSentence();
//! Speak sentence
- bool speak(const char *sentence, const char *person, const char *voiceFilePrefix);
+ bool speak(const char *sentence, Person *person, const char *voiceFilePrefix);
//! Convert command in sentence to command code
int getSpeakCommand(const char *sentence, unsigned &index);
//! Speak a part of a sentence
void speakSegment(
- const char *segment,
- int length,
- const char *person,
- int command,
- const char *voiceFilePrefix,
- int index);
+ const char *segment,
+ int length,
+ Person *person,
+ int command,
+ const char *voiceFilePrefix,
+ int index);
int countSpaces(const char *segment);
+ //! Get special parameters for speech
+ const SpeechParameters *findSpeechParameters(
+ const char *name,
+ int state,
+ int faceDirection); // FIND_SACTION
+
static int splitOption(const char *str, char optionText[5][MAX_STRING_SIZE]);