[Scummvm-cvs-logs] CVS: scummvm/queen cutaway.cpp,1.59,1.60
David Eriksson
twogood at users.sourceforge.net
Sun Nov 9 04:20:37 CET 2003
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/queen command.cpp,1.11,1.12 cutaway.cpp,1.58,1.59 display.cpp,1.23,1.24 graphics.cpp,1.42,1.43 input.cpp,1.9,1.10 logic.cpp,1.84,1.85 logic.h,1.61,1.62 queen.cpp,1.34,1.35 resource.cpp,1.24,1.25 sound.cpp,1.10,1.11 talk.cpp,1.33,1.34 talk.h,1.18,1.19 walk.cpp,1.20,1.21 walk.h,1.11,1.12
- Next message: [Scummvm-cvs-logs] CVS: tools extract.h,NONE,1.1 util.h,NONE,1.1 descumm.h,1.7,1.8 simon2mp3.c,1.14,1.15 mm_nes_extract.c,1.6,1.7 extract.c,1.26,1.27
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/queen
In directory sc8-pr-cvs1:/tmp/cvs-serv1117/queen
Modified Files:
cutaway.cpp
Log Message:
- Fix cutaway bug that made Joe end up in the wrong location when the
cutaway was cancelled.
- Fix cutaway bugs that made it very bad to cancel the cutaway where Joe
looks out from the hotel window.
Index: cutaway.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/cutaway.cpp,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -d -r1.59 -r1.60
--- cutaway.cpp 8 Nov 2003 23:45:45 -0000 1.59
+++ cutaway.cpp 9 Nov 2003 12:19:47 -0000 1.60
@@ -1193,8 +1193,10 @@
_currentImage = _logic->numFrames();
- int initialJoeX = _logic->joeX();
- int initialJoeY = _logic->joeY();
+ BobSlot *joeBob = _graphics->bob(0);
+ int initialJoeX = joeBob->x;
+ int initialJoeY = joeBob->y;
+ debug(0, "[Cutaway::run] Joe started at (%i, %i)", initialJoeX, initialJoeY);
_input->cutawayRunning(true);
@@ -1320,20 +1322,21 @@
restorePersonData();
+ debug(0, "_logic->entryObj() = %i", _logic->entryObj());
if (_logic->entryObj() > 0)
_initialRoom = _logic->objectData(_logic->entryObj())->room;
else {
// We're not returning to new room, so return to old Joe X,Y coords
+ debug(0, "[Cutaway::run] Moving joe to (%i, %i)", initialJoeX, initialJoeY);
_logic->joeX(initialJoeX);
- _logic->joeX(initialJoeY);
+ _logic->joeY(initialJoeY);
}
if (_logic->currentRoom() != _initialRoom) {
- _logic->currentRoom(_initialRoom);
- // XXX should call SETUP_ROOM here but that would introduce a circual dependency...
- // if (_logic->currentRoom() == _logic->newRoom())
- // _logic->newRoom(0);
- // XXX so I try to set newRoom to the room instead
+ // XXX should call SETUP_ROOM here but that would introduce a
+ // circual dependency, so we try to set newRoom to the room
+ // instead
+ debug(0, "[Cutaway::run] Not calling SETUP_ROOM here, just setting newRoom to %i", _initialRoom);
_logic->newRoom(_initialRoom);
}
}
@@ -1370,7 +1373,6 @@
}
- BobSlot *joeBob = _graphics->bob(0);
joeBob->animating = 0;
joeBob->moving = 0;
// Make sure Joe is clipped!
@@ -1399,16 +1401,18 @@
int16 joeRoom = READ_BE_UINT16(ptr); ptr += 2;
int16 joeX = READ_BE_UINT16(ptr); ptr += 2;
int16 joeY = READ_BE_UINT16(ptr); ptr += 2;
+
+ debug(0, "[Cutaway::stop] Final position is room %i and coordinates (%i, %i)",
+ joeRoom, joeX, joeY);
if ((!_input->cutawayQuit() || (!_anotherCutaway && joeRoom == _finalRoom)) &&
joeRoom != _temporaryRoom &&
joeRoom != 0) {
-
- debug(0, "[Cutaway::stop] Changing room to %i and moving Joe to (%i, %i)",
- joeRoom, joeX, joeY);
+
+ debug(0, "[Cutaway::stop] Changing rooms and moving Joe");
_logic->joeX(joeX);
- _logic->joeY(joeX);
+ _logic->joeY(joeY);
_logic->currentRoom(joeRoom);
_logic->oldRoom(_initialRoom);
_logic->roomDisplay(_logic->roomName(_logic->currentRoom()), RDM_FADE_JOE_XY, 0, _comPanel, true);
@@ -1513,6 +1517,9 @@
joeRoom != 106 && // XXX hard coded room number
(joeX || joeY)) {
BobSlot *joeBob = _graphics->bob(0);
+
+ debug(0, "[Cutaway::stop] Moving Joe");
+
joeBob->x = joeX;
joeBob->y = joeY;
joeBob->scale = _logic->findScale(joeX, joeY);
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/queen command.cpp,1.11,1.12 cutaway.cpp,1.58,1.59 display.cpp,1.23,1.24 graphics.cpp,1.42,1.43 input.cpp,1.9,1.10 logic.cpp,1.84,1.85 logic.h,1.61,1.62 queen.cpp,1.34,1.35 resource.cpp,1.24,1.25 sound.cpp,1.10,1.11 talk.cpp,1.33,1.34 talk.h,1.18,1.19 walk.cpp,1.20,1.21 walk.h,1.11,1.12
- Next message: [Scummvm-cvs-logs] CVS: tools extract.h,NONE,1.1 util.h,NONE,1.1 descumm.h,1.7,1.8 simon2mp3.c,1.14,1.15 mm_nes_extract.c,1.6,1.7 extract.c,1.26,1.27
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list