aboutsummaryrefslogtreecommitdiff
path: root/queen/talk.cpp
diff options
context:
space:
mode:
authorChris Apers2004-03-17 14:10:51 +0000
committerChris Apers2004-03-17 14:10:51 +0000
commit6e1200dc6788ee24e46f17d084254f6cd84bb95a (patch)
tree105ebc42e9766e757d30aad36097d13939ed013a /queen/talk.cpp
parent1ca917d81bef47379066d229142f8f86c1aae1e7 (diff)
downloadscummvm-rg350-6e1200dc6788ee24e46f17d084254f6cd84bb95a.tar.gz
scummvm-rg350-6e1200dc6788ee24e46f17d084254f6cd84bb95a.tar.bz2
scummvm-rg350-6e1200dc6788ee24e46f17d084254f6cd84bb95a.zip
Added PalmOS support
svn-id: r13336
Diffstat (limited to 'queen/talk.cpp')
-rw-r--r--queen/talk.cpp26
1 files changed, 25 insertions, 1 deletions
diff --git a/queen/talk.cpp b/queen/talk.cpp
index b4f3e2c822..26c114648e 100644
--- a/queen/talk.cpp
+++ b/queen/talk.cpp
@@ -38,6 +38,10 @@
namespace Queen {
+#ifdef __PALM_OS__
+static const Talk::SpeechParameters *_speechParameters;
+#endif
+
void Talk::talk(
const char *filename,
int personInRoom,
@@ -892,7 +896,13 @@ void Talk::speakSegment(
segment[length] = '\0';
char voiceFileName[MAX_STRING_SIZE];
+#ifndef __PALM_OS__
snprintf(voiceFileName, sizeof(voiceFileName), "%s%1x", voiceFilePrefix, index + 1);
+#else
+ // %(X)x is not supported on PalmOS
+ sprintf(voiceFileName, "%s%1x", voiceFilePrefix, index + 1);
+ strncpy(voiceFileName + strlen(voiceFileName) - 8, voiceFileName + strlen(voiceFileName) - 1, 2);
+#endif
// debug(6, "Sentence segment '%*s' is said by person '%s' and voice file '%s' is played",
// length, segment, person->name, voiceFileName);
@@ -1415,6 +1425,7 @@ int16 Talk::selectSentence() {
return selectedSentence;
}
+#ifndef __PALM_OS__
const Talk::SpeechParameters Talk::_speechParameters[] = {
{ "JOE",0,1,1,10,2,3,"",0},
{ "JOE",0,3,3,28,2,3,"",0},
@@ -1875,6 +1886,19 @@ const Talk::SpeechParameters Talk::_speechParameters[] = {
{ "*",0,0,0,0,0,0,"",0}
};
-
+#endif
} // End of namespace Queen
+
+#ifdef __PALM_OS__
+#include "scumm_globals.h"
+
+_GINIT(Queen_Talk)
+_GSETPTR(Queen::_speechParameters, GBVARS_SPEECHPARAMETERS_INDEX, Queen::Talk::SpeechParameters, GBVARS_QUEEN)
+_GEND
+
+_GRELEASE(Queen_Talk)
+_GRELEASEPTR(GBVARS_SPEECHPARAMETERS_INDEX, GBVARS_QUEEN)
+_GEND
+
+#endif