aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
Diffstat (limited to 'scumm')
-rw-r--r--scumm/saveload.cpp8
-rw-r--r--scumm/scummvm.cpp2
-rw-r--r--scumm/verbs.cpp19
-rw-r--r--scumm/verbs.h5
4 files changed, 16 insertions, 18 deletions
diff --git a/scumm/saveload.cpp b/scumm/saveload.cpp
index 81a48e7f49..852fe2e5a9 100644
--- a/scumm/saveload.cpp
+++ b/scumm/saveload.cpp
@@ -355,10 +355,10 @@ void Scumm::saveOrLoad(Serializer *s, uint32 savegameVersion) {
MKLINE(VerbSlot, y, sleInt16, VER_V8),
MKLINE(VerbSlot, right, sleInt16, VER_V8),
MKLINE(VerbSlot, bottom, sleInt16, VER_V8),
- MKLINE(VerbSlot, oldleft, sleInt16, VER_V8),
- MKLINE(VerbSlot, oldtop, sleInt16, VER_V8),
- MKLINE(VerbSlot, oldright, sleInt16, VER_V8),
- MKLINE(VerbSlot, oldbottom, sleInt16, VER_V8),
+ MKLINE(VerbSlot, old.left, sleInt16, VER_V8),
+ MKLINE(VerbSlot, old.top, sleInt16, VER_V8),
+ MKLINE(VerbSlot, old.right, sleInt16, VER_V8),
+ MKLINE(VerbSlot, old.bottom, sleInt16, VER_V8),
MKLINE_OLD(VerbSlot, verbid, sleByte, VER_V8, VER_V11),
MKLINE(VerbSlot, verbid, sleInt16, VER_V12),
diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp
index 489ccf5f3e..6d6ac1d384 100644
--- a/scumm/scummvm.cpp
+++ b/scumm/scummvm.cpp
@@ -701,7 +701,7 @@ void Scumm::scummInit() {
for (i = 0; i < _maxVerbs; i++) {
_verbs[i].verbid = 0;
_verbs[i].right = _screenWidth - 1;
- _verbs[i].oldleft = -1;
+ _verbs[i].old.left = -1;
_verbs[i].type = 0;
_verbs[i].color = 2;
_verbs[i].hicolor = 0;
diff --git a/scumm/verbs.cpp b/scumm/verbs.cpp
index 266049705f..f0ef24e6d4 100644
--- a/scumm/verbs.cpp
+++ b/scumm/verbs.cpp
@@ -186,10 +186,7 @@ void Scumm::drawVerb(int verb, int mode) {
vs->right = _charset->_str.right;
vs->bottom = _charset->_str.bottom;
- vs->oldleft = _charset->_str.left;
- vs->oldright = _charset->_str.right;
- vs->oldtop = _charset->_str.top;
- vs->oldbottom = _charset->_str.bottom;
+ vs->old = _charset->_str;
_charset->_str.left = _charset->_str.right;
} else {
restoreVerbBG(verb);
@@ -201,9 +198,9 @@ void Scumm::restoreVerbBG(int verb) {
vs = &_verbs[verb];
- if (vs->oldleft != -1) {
- restoreBG(ScummVM::Rect(vs->oldleft, vs->oldtop, vs->oldright, vs->oldbottom), vs->bkcolor);
- vs->oldleft = -1;
+ if (vs->old.left != -1) {
+ restoreBG(vs->old, vs->bkcolor);
+ vs->old.left = -1;
}
}
@@ -276,10 +273,10 @@ void Scumm::drawVerbBitmap(int verb, int x, int y) {
vst = &_verbs[verb];
vst->right = vst->x + imgw * 8;
vst->bottom = vst->y + imgh * 8;
- vst->oldleft = vst->x;
- vst->oldright = vst->right;
- vst->oldtop = vst->y;
- vst->oldbottom = vst->bottom;
+ vst->old.left = vst->x;
+ vst->old.right = vst->right;
+ vst->old.top = vst->y;
+ vst->old.bottom = vst->bottom;
gdi.enableZBuffer();
diff --git a/scumm/verbs.h b/scumm/verbs.h
index 839017683d..40fe3d47d7 100644
--- a/scumm/verbs.h
+++ b/scumm/verbs.h
@@ -21,7 +21,8 @@
#ifndef VERBS_H
#define VERBS_H
-#include "scummsys.h"
+#include "common/scummsys.h"
+#include "common/rect.h"
enum {
kTextVerbType = 0,
@@ -31,7 +32,7 @@ enum {
struct VerbSlot {
int16 x, y;
int16 right, bottom;
- int16 oldleft, oldtop, oldright, oldbottom;
+ ScummVM::Rect old;
uint16 verbid;
uint8 color, hicolor, dimcolor, bkcolor, type;
uint8 charset_nr, curmode;