split Zone::_oldPosition in two members

svn-id: r26182
This commit is contained in:
Nicola Mettifogo 2007-03-17 20:19:16 +00:00
parent d7f31cf55d
commit 54201ddaa9
5 changed files with 15 additions and 14 deletions

View File

@ -145,8 +145,8 @@ Animation *Parallaction::parseAnimation(Script& script, Node *list, char *name)
fillBuffers(script, true);
}
vD0->_zone._oldposition._x = -1000;
vD0->_zone._oldposition._y = -1000;
vD0->_zone._oldLeft = -1000;
vD0->_zone._oldTop = -1000;
vD0->_zone._flags |= 0x1000000;
@ -208,7 +208,7 @@ void jobDisplayAnimations(void *parm, Job *j) {
if (((v18->_zone._flags & kFlagsActive) == 0) && (v18->_zone._flags & kFlagsRemove)) {
v18->_zone._flags &= ~kFlagsRemove;
v18->_zone._oldposition._x = -1000;
v18->_zone._oldLeft = -1000;
}
if ((v18->_zone._flags & kFlagsActive) && (v18->_zone._flags & kFlagsRemove)) {
@ -234,12 +234,12 @@ void jobEraseAnimations(void *arg_0, Job *j) {
if (((a->_zone._flags & kFlagsActive) == 0) && ((a->_zone._flags & kFlagsRemove) == 0)) continue;
Common::Rect r(a->_cnv._width, a->_cnv._height);
r.moveTo(a->_zone._oldposition._x, a->_zone._oldposition._y);
r.moveTo(a->_zone._oldLeft, a->_zone._oldTop);
_vm->_gfx->restoreBackground(r);
if (arg_0) {
a->_zone._oldposition._x = a->_zone._left;
a->_zone._oldposition._y = a->_zone._top;
a->_zone._oldLeft = a->_zone._left;
a->_zone._oldTop = a->_zone._top;
}
}

View File

@ -384,8 +384,8 @@ void Parallaction::changeLocation(char *location) {
_gfx->copyScreen(Gfx::kBitBack, Gfx::kBit2);
debugC(1, kDebugLocation, "changeLocation: new location '%s' parsed", _saveData1);
_vm->_char._ani._zone._oldposition._x = -1000;
_vm->_char._ani._zone._oldposition._y = -1000;
_vm->_char._ani._zone._oldLeft = -1000;
_vm->_char._ani._zone._oldTop = -1000;
_vm->_char._ani.field_50 = 0;
if (_location._startPosition._x != -1000) {

View File

@ -258,8 +258,8 @@ struct Character {
_ani._zone._left = 150;
_ani._zone._top = 100;
_ani._z = 10;
_ani._zone._oldposition._x = -1000;
_ani._zone._oldposition._y = -1000;
_ani._zone._oldLeft = -1000;
_ani._zone._oldTop = -1000;
_ani._frame = 0;
_ani._zone._flags = kFlagsActive | kFlagsNoName;
_ani._zone._type = kZoneYou;

View File

@ -321,8 +321,8 @@ void jobWalk(void *parm, Job *j) {
// debugC(1, kDebugWalk, "jobWalk to (%i, %i)", node->_x + _vm->_char._ani._cnv._width / 2, node->_y + _vm->_char._ani._cnv._height);
_vm->_char._ani._zone._oldposition._x = _si;
_vm->_char._ani._zone._oldposition._y = _di;
_vm->_char._ani._zone._oldLeft = _si;
_vm->_char._ani._zone._oldTop = _di;
if ((node->_x == _si) && (node->_y == _di)) {
if (node->_next == NULL) {
@ -415,7 +415,7 @@ void jobWalk(void *parm, Job *j) {
_vm->_char._ani._zone._left = _si;
_vm->_char._ani._zone._top = _di;
if ((_si == _vm->_char._ani._zone._oldposition._x) && (_di == _vm->_char._ani._zone._oldposition._y)) {
if ((_si == _vm->_char._ani._zone._oldLeft) && (_di == _vm->_char._ani._zone._oldTop)) {
j->_finished = 1;
checkDoor();

View File

@ -129,7 +129,8 @@ struct Zone : public Node {
int16 _top;
int16 _right;
int16 _bottom;
Point _oldposition;
int16 _oldLeft;
int16 _oldTop;
uint32 _type;
uint32 _flags;