aboutsummaryrefslogtreecommitdiff
path: root/kyra/script_v1.cpp
diff options
context:
space:
mode:
authorOystein Eftevaag2006-02-09 12:19:53 +0000
committerOystein Eftevaag2006-02-09 12:19:53 +0000
commit60bbd5e470db1946d9c6d02951a1c9ec6b8aba35 (patch)
tree1ce30a8f7a8a1590040f4be477cc7f5c0b3d7211 /kyra/script_v1.cpp
parent56d918edbe5feecb4c0239a8927adb60602ae154 (diff)
downloadscummvm-rg350-60bbd5e470db1946d9c6d02951a1c9ec6b8aba35.tar.gz
scummvm-rg350-60bbd5e470db1946d9c6d02951a1c9ec6b8aba35.tar.bz2
scummvm-rg350-60bbd5e470db1946d9c6d02951a1c9ec6b8aba35.zip
1. Replaced the $Header$ tags in the Kyra files
2. Added code to let the player skip past dialogue by leftclicking or hitting '.' 3. Removed the waitTicks() function and replaced all usage with delay() 4. Corrected various speed issues, the intro should run at the correct pace now 5. Talkie versions will no longer display the story screen during the intro, as in the original. 6. Moved the delay() function adjacent to other delay functions. svn-id: r20438
Diffstat (limited to 'kyra/script_v1.cpp')
-rw-r--r--kyra/script_v1.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/kyra/script_v1.cpp b/kyra/script_v1.cpp
index 53310f1237..209e894023 100644
--- a/kyra/script_v1.cpp
+++ b/kyra/script_v1.cpp
@@ -15,7 +15,8 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $Header$
+ * $URL$
+ * $Id$
*
*/
@@ -40,14 +41,7 @@ int KyraEngine::cmd_magicInMouseItem(ScriptState *script) {
}
int KyraEngine::cmd_characterSays(ScriptState *script) {
- // Japanese version?
- /*const char *str1 = "âuâëâôââôüAé?é¢ùêé¢é+é®üH";
- const char *str2 = "âuâëâôâ\\âôüAé?é¢ùêé¢é+é®üH";
-
- if (strcmp(stackPosString(0), str1) == 0)
- characterSays((char *)str2, stackPos(1), stackPos(2));
- else*/
-
+ _skipFlag = false;
if (_features & GF_TALKIE) {
debug(3, "cmd_characterSays(0x%X) (%d, '%s', %d, %d)", script, stackPos(0), stackPosString(1), stackPos(2), stackPos(3));
snd_voiceWaitForFinish();
@@ -351,8 +345,9 @@ int KyraEngine::cmd_setBrandonStatusBit(ScriptState *script) {
int KyraEngine::cmd_pauseSeconds(ScriptState *script) {
debug(3, "cmd_pauseSeconds(0x%X) (%d)", script, stackPos(0));
- if (stackPos(0) > 0)
+ if (stackPos(0) > 0 && !_skipFlag)
delay(stackPos(0)*1000, true);
+ _skipFlag = false;
return 0;
}
@@ -489,7 +484,7 @@ int KyraEngine::cmd_displayWSAFrame(ScriptState *script) {
_movieObjects[wsaIndex]->displayFrame(frame);
_animator->_updateScreen = true;
uint32 continueTime = waitTime * _tickLength + _system->getMillis();
- while (_system->getMillis() < continueTime) {
+ while (_system->getMillis() < continueTime && !_skipFlag) {
_sprites->updateSceneAnims();
_animator->updateAllObjectShapes();
if (continueTime - _system->getMillis() >= 10)
@@ -617,12 +612,14 @@ int KyraEngine::cmd_customPrintTalkString(ScriptState *script) {
debug(3, "cmd_customPrintTalkString(0x%X) (%d, '%s', %d, %d, %d)", script, stackPos(0), stackPosString(1), stackPos(2), stackPos(3), stackPos(4) & 0xFF);
snd_voiceWaitForFinish();
snd_playVoiceFile(stackPos(0));
+ _skipFlag = false;
_text->printTalkTextMessage(stackPosString(1), stackPos(2), stackPos(3), stackPos(4) & 0xFF, 0, 2);
} else {
debug(3, "cmd_customPrintTalkString(0x%X) ('%s', %d, %d, %d)", script, stackPosString(0), stackPos(1), stackPos(2), stackPos(3) & 0xFF);
+ _skipFlag = false;
_text->printTalkTextMessage(stackPosString(0), stackPos(1), stackPos(2), stackPos(3) & 0xFF, 0, 2);
}
- _animator->_updateScreen = true;
+ _screen->updateScreen();
return 0;
}
@@ -755,7 +752,7 @@ int KyraEngine::cmd_displayWSASequentialFrames(ScriptState *script) {
_movieObjects[wsaIndex]->displayFrame(frame);
_animator->_updateScreen = true;
uint32 continueTime = waitTime * _tickLength + _system->getMillis();
- while (_system->getMillis() < continueTime) {
+ while (_system->getMillis() < continueTime && !_skipFlag) {
_sprites->updateSceneAnims();
_animator->updateAllObjectShapes();
if (continueTime - _system->getMillis() >= 10)
@@ -769,7 +766,7 @@ int KyraEngine::cmd_displayWSASequentialFrames(ScriptState *script) {
_movieObjects[wsaIndex]->displayFrame(frame);
_animator->_updateScreen = true;
uint32 continueTime = waitTime * _tickLength + _system->getMillis();
- while (_system->getMillis() < continueTime) {
+ while (_system->getMillis() < continueTime && !_skipFlag) {
_sprites->updateSceneAnims();
_animator->updateAllObjectShapes();
if (continueTime - _system->getMillis() >= 10)
@@ -778,7 +775,10 @@ int KyraEngine::cmd_displayWSASequentialFrames(ScriptState *script) {
--frame;
}
}
- ++curTime;
+ if (!_skipFlag)
+ break;
+ else
+ ++curTime;
}
_screen->showMouse();