aboutsummaryrefslogtreecommitdiff
path: root/scumm/script_v2.cpp
diff options
context:
space:
mode:
authorMax Horn2003-05-18 12:52:27 +0000
committerMax Horn2003-05-18 12:52:27 +0000
commit657c8ca2e3960346a601aaf16e7d3b4068820bed (patch)
tree0b1c7db73b576169ec3df19c97abdf0b3425e757 /scumm/script_v2.cpp
parenta38c3599ce915424c3add0725546cc850dcd2684 (diff)
downloadscummvm-rg350-657c8ca2e3960346a601aaf16e7d3b4068820bed.tar.gz
scummvm-rg350-657c8ca2e3960346a601aaf16e7d3b4068820bed.tar.bz2
scummvm-rg350-657c8ca2e3960346a601aaf16e7d3b4068820bed.zip
more V2 sentence cleanup
svn-id: r7631
Diffstat (limited to 'scumm/script_v2.cpp')
-rw-r--r--scumm/script_v2.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/scumm/script_v2.cpp b/scumm/script_v2.cpp
index 9a30c3fe51..81b5412311 100644
--- a/scumm/script_v2.cpp
+++ b/scumm/script_v2.cpp
@@ -829,11 +829,10 @@ void Scumm_v2::o2_doSentence() {
if (a == 0xFB) {
_sentenceNum = 0;
stopScriptNr(SENTENCE_SCRIPT);
- clearClickedStatus();
return;
}
if (a == 0xFC) {
- clearClickedStatus();
+ resetSentence();
return;
}
@@ -1065,6 +1064,8 @@ void Scumm_v2::o2_loadRoomWithEgo() {
_fullRedraw = 1;
+ resetSentence();
+
if (x != -1) {
a->startWalkActor(x, y, -1);
}
@@ -1134,7 +1135,7 @@ void Scumm_v2::o2_cutscene() {
warning("TODO o2_cutscene()");
_sentenceNum = 0;
stopScriptNr(SENTENCE_SCRIPT);
- clearClickedStatus();
+ resetSentence();
}
void Scumm_v2::o2_endCutscene() {
@@ -1213,6 +1214,10 @@ void Scumm_v2::o2_cursorCommand() {
int cmd = getVarOrDirectWord(0x80);
int a2 = cmd >> 8;
+ if (cmd & 0xFF) {
+ _scummVars[21] = cmd & 0xFF;
+ printf("Set cmd %d\n", cmd & 0xFF);
+ }
if (a2 & 4) {
_userPut = 1;
warning("TODO: o2_cursorCommand(userface)");
@@ -1249,3 +1254,9 @@ void Scumm_v2::o2_dummy() {
warning("o2_dummy invoked (opcode %d)", _opcode);
}
+void Scumm_v2::resetSentence() {
+ _scummVars[VAR_SENTENCE_VERB] = _scummVars[VAR_BACKUP_VERB];
+ _scummVars[VAR_SENTENCE_OBJECT1] = 0;
+ _scummVars[VAR_SENTENCE_OBJECT2] = 0;
+ _scummVars[29] = 0;
+}