some more ScummVM::Rect
svn-id: r7548
This commit is contained in:
parent
69c118a43e
commit
a8603e5bfc
4 changed files with 16 additions and 18 deletions
|
@ -355,10 +355,10 @@ void Scumm::saveOrLoad(Serializer *s, uint32 savegameVersion) {
|
||||||
MKLINE(VerbSlot, y, sleInt16, VER_V8),
|
MKLINE(VerbSlot, y, sleInt16, VER_V8),
|
||||||
MKLINE(VerbSlot, right, sleInt16, VER_V8),
|
MKLINE(VerbSlot, right, sleInt16, VER_V8),
|
||||||
MKLINE(VerbSlot, bottom, sleInt16, VER_V8),
|
MKLINE(VerbSlot, bottom, sleInt16, VER_V8),
|
||||||
MKLINE(VerbSlot, oldleft, sleInt16, VER_V8),
|
MKLINE(VerbSlot, old.left, sleInt16, VER_V8),
|
||||||
MKLINE(VerbSlot, oldtop, sleInt16, VER_V8),
|
MKLINE(VerbSlot, old.top, sleInt16, VER_V8),
|
||||||
MKLINE(VerbSlot, oldright, sleInt16, VER_V8),
|
MKLINE(VerbSlot, old.right, sleInt16, VER_V8),
|
||||||
MKLINE(VerbSlot, oldbottom, sleInt16, VER_V8),
|
MKLINE(VerbSlot, old.bottom, sleInt16, VER_V8),
|
||||||
|
|
||||||
MKLINE_OLD(VerbSlot, verbid, sleByte, VER_V8, VER_V11),
|
MKLINE_OLD(VerbSlot, verbid, sleByte, VER_V8, VER_V11),
|
||||||
MKLINE(VerbSlot, verbid, sleInt16, VER_V12),
|
MKLINE(VerbSlot, verbid, sleInt16, VER_V12),
|
||||||
|
|
|
@ -701,7 +701,7 @@ void Scumm::scummInit() {
|
||||||
for (i = 0; i < _maxVerbs; i++) {
|
for (i = 0; i < _maxVerbs; i++) {
|
||||||
_verbs[i].verbid = 0;
|
_verbs[i].verbid = 0;
|
||||||
_verbs[i].right = _screenWidth - 1;
|
_verbs[i].right = _screenWidth - 1;
|
||||||
_verbs[i].oldleft = -1;
|
_verbs[i].old.left = -1;
|
||||||
_verbs[i].type = 0;
|
_verbs[i].type = 0;
|
||||||
_verbs[i].color = 2;
|
_verbs[i].color = 2;
|
||||||
_verbs[i].hicolor = 0;
|
_verbs[i].hicolor = 0;
|
||||||
|
|
|
@ -186,10 +186,7 @@ void Scumm::drawVerb(int verb, int mode) {
|
||||||
|
|
||||||
vs->right = _charset->_str.right;
|
vs->right = _charset->_str.right;
|
||||||
vs->bottom = _charset->_str.bottom;
|
vs->bottom = _charset->_str.bottom;
|
||||||
vs->oldleft = _charset->_str.left;
|
vs->old = _charset->_str;
|
||||||
vs->oldright = _charset->_str.right;
|
|
||||||
vs->oldtop = _charset->_str.top;
|
|
||||||
vs->oldbottom = _charset->_str.bottom;
|
|
||||||
_charset->_str.left = _charset->_str.right;
|
_charset->_str.left = _charset->_str.right;
|
||||||
} else {
|
} else {
|
||||||
restoreVerbBG(verb);
|
restoreVerbBG(verb);
|
||||||
|
@ -201,9 +198,9 @@ void Scumm::restoreVerbBG(int verb) {
|
||||||
|
|
||||||
vs = &_verbs[verb];
|
vs = &_verbs[verb];
|
||||||
|
|
||||||
if (vs->oldleft != -1) {
|
if (vs->old.left != -1) {
|
||||||
restoreBG(ScummVM::Rect(vs->oldleft, vs->oldtop, vs->oldright, vs->oldbottom), vs->bkcolor);
|
restoreBG(vs->old, vs->bkcolor);
|
||||||
vs->oldleft = -1;
|
vs->old.left = -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -276,10 +273,10 @@ void Scumm::drawVerbBitmap(int verb, int x, int y) {
|
||||||
vst = &_verbs[verb];
|
vst = &_verbs[verb];
|
||||||
vst->right = vst->x + imgw * 8;
|
vst->right = vst->x + imgw * 8;
|
||||||
vst->bottom = vst->y + imgh * 8;
|
vst->bottom = vst->y + imgh * 8;
|
||||||
vst->oldleft = vst->x;
|
vst->old.left = vst->x;
|
||||||
vst->oldright = vst->right;
|
vst->old.right = vst->right;
|
||||||
vst->oldtop = vst->y;
|
vst->old.top = vst->y;
|
||||||
vst->oldbottom = vst->bottom;
|
vst->old.bottom = vst->bottom;
|
||||||
|
|
||||||
gdi.enableZBuffer();
|
gdi.enableZBuffer();
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,8 @@
|
||||||
#ifndef VERBS_H
|
#ifndef VERBS_H
|
||||||
#define VERBS_H
|
#define VERBS_H
|
||||||
|
|
||||||
#include "scummsys.h"
|
#include "common/scummsys.h"
|
||||||
|
#include "common/rect.h"
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
kTextVerbType = 0,
|
kTextVerbType = 0,
|
||||||
|
@ -31,7 +32,7 @@ enum {
|
||||||
struct VerbSlot {
|
struct VerbSlot {
|
||||||
int16 x, y;
|
int16 x, y;
|
||||||
int16 right, bottom;
|
int16 right, bottom;
|
||||||
int16 oldleft, oldtop, oldright, oldbottom;
|
ScummVM::Rect old;
|
||||||
uint16 verbid;
|
uint16 verbid;
|
||||||
uint8 color, hicolor, dimcolor, bkcolor, type;
|
uint8 color, hicolor, dimcolor, bkcolor, type;
|
||||||
uint8 charset_nr, curmode;
|
uint8 charset_nr, curmode;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue