aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorMax Horn2002-12-27 16:49:08 +0000
committerMax Horn2002-12-27 16:49:08 +0000
commit21226d1fb0c9ddf23ffc8e9f3211af1f71dd0b87 (patch)
tree36e9141cdd1064a3003055f6cb5114978fd84424 /scumm
parentad06190dd95365f1e6154791541d8f314f820407 (diff)
downloadscummvm-rg350-21226d1fb0c9ddf23ffc8e9f3211af1f71dd0b87.tar.gz
scummvm-rg350-21226d1fb0c9ddf23ffc8e9f3211af1f71dd0b87.tar.bz2
scummvm-rg350-21226d1fb0c9ddf23ffc8e9f3211af1f71dd0b87.zip
verb ids can be > 255 in V8; more V8 verbop corrections
svn-id: r6204
Diffstat (limited to 'scumm')
-rw-r--r--scumm/script_v6.cpp8
-rw-r--r--scumm/script_v8.cpp13
-rw-r--r--scumm/string.cpp5
-rw-r--r--scumm/verbs.h4
4 files changed, 22 insertions, 8 deletions
diff --git a/scumm/script_v6.cpp b/scumm/script_v6.cpp
index 2acdb068aa..3271cf10d7 100644
--- a/scumm/script_v6.cpp
+++ b/scumm/script_v6.cpp
@@ -2012,7 +2012,13 @@ void Scumm_v6::o6_saveRestoreVerbs()
b = pop();
a = pop();
- switch (fetchScriptByte()) {
+ byte subOp = fetchScriptByte();
+ if (_features & GF_AFTER_V8) {
+ subOp = (subOp - 141) + 0xB4;
+ printf("o8_saveRestoreVerbs:%d\n", (int)subOp);
+ }
+
+ switch (subOp) {
case 141:
while (a <= b) {
slot = getVerbSlot(a, 0);
diff --git a/scumm/script_v8.cpp b/scumm/script_v8.cpp
index 410fa733a3..acf62fb92c 100644
--- a/scumm/script_v8.cpp
+++ b/scumm/script_v8.cpp
@@ -1202,13 +1202,16 @@ void Scumm_v8::o8_cameraOps()
void Scumm_v8::o8_verbOps()
{
- // TODO
byte subOp = fetchScriptByte();
VerbSlot *vs = NULL;
int slot, a, b;
+ _verbRedraw = true;
+
if (0 <= _curVerbSlot && _curVerbSlot < _maxVerbs)
vs = &_verbs[_curVerbSlot];
+ if (subOp != 0x96)
+ assert(vs);
switch (subOp) {
case 0x96: // SO_VERB_INIT Choose verb number for editing
@@ -1217,8 +1220,7 @@ void Scumm_v8::o8_verbOps()
checkRange(_maxVerbs - 1, 0, _curVerbSlot, "Illegal new verb slot %d");
break;
case 0x97: // SO_VERB_NEW New verb
- slot = getVerbSlot(_curVerb, 0);
- if (slot == 0) {
+ if (_curVerbSlot == 0) {
for (slot = 1; slot < _maxVerbs; slot++) {
if (_verbs[slot].verbid == 0)
break;
@@ -1227,7 +1229,7 @@ void Scumm_v8::o8_verbOps()
error("Too many verbs");
_curVerbSlot = slot;
}
- vs = &_verbs[slot];
+ vs = &_verbs[_curVerbSlot];
vs->verbid = _curVerb;
vs->color = 2;
vs->hicolor = 0;
@@ -1302,6 +1304,9 @@ void Scumm_v8::o8_verbOps()
break;
case 0xA7: // SO_VERB_LINE_SPACING Choose linespacing for verb
// FIXME - TODO
+ // Note: it seems that var596 stores the "line spacing". It is used by various
+ // scripts that place verbs for that.
+ // Also, var595 contains the vertical position at which to start placing verbs (330)
pop();
break;
default:
diff --git a/scumm/string.cpp b/scumm/string.cpp
index 7e0d14343c..d75868f11c 100644
--- a/scumm/string.cpp
+++ b/scumm/string.cpp
@@ -485,9 +485,12 @@ void Scumm::drawString(int a)
// and never time out. We can't do it blindly for all games, because
// it causes problem with the FOA intro.
- if (_gameId == GID_FT && a == 4)
+ if ((_gameId == GID_FT || _features & GF_AFTER_V8) && a == 4)
_talkDelay = -1;
+ if (_features & GF_AFTER_V8)
+ printf("Drawing string '%s'\n", buf);
+
if (!buf[0]) {
buf[0] = ' ';
buf[1] = 0;
diff --git a/scumm/verbs.h b/scumm/verbs.h
index 3fadefca61..be8f84d7a5 100644
--- a/scumm/verbs.h
+++ b/scumm/verbs.h
@@ -32,10 +32,10 @@ struct VerbSlot {
int16 x, y;
int16 right, bottom;
int16 oldleft, oldtop, oldright, oldbottom;
- uint8 verbid;
+ uint16 verbid;
uint8 color, hicolor, dimcolor, bkcolor, type;
uint8 charset_nr, curmode;
- uint8 saveid;
+ uint16 saveid;
uint8 key;
bool center;
uint8 field_1B;