[Scummvm-cvs-logs] CVS: scummvm/queen cutaway.cpp,1.22,1.23 cutaway.h,1.10,1.11 logic.cpp,1.41,1.42
David Eriksson
twogood at users.sourceforge.net
Wed Oct 15 03:03:05 CEST 2003
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm camera.cpp,2.16,2.17 script_v5.cpp,1.200,1.201
- Next message: [Scummvm-cvs-logs] CVS: scummvm/queen talk.cpp,1.8,1.9 talk.h,1.6,1.7 cutaway.cpp,1.23,1.24 xref.txt,1.5,1.6
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/queen
In directory sc8-pr-cvs1:/tmp/cvs-serv23814a
Modified Files:
cutaway.cpp cutaway.h logic.cpp
Log Message:
- Use Logic::roomRefreshObject() in Cutaway
- Fix tiny bugs in Logic::roomRefreshObject()
Index: cutaway.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/cutaway.cpp,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- cutaway.cpp 15 Oct 2003 09:23:05 -0000 1.22
+++ cutaway.cpp 15 Oct 2003 10:01:54 -0000 1.23
@@ -227,8 +227,10 @@
error("Wrong number of values read");
// Make ugly reuse of data less ugly
- if (object.limitBobX1 < 0)
+ if (object.limitBobX1 < 0) {
object.song = -object.limitBobX1;
+ object.limitBobX1 = 0;
+ }
else
object.song = 0;
@@ -244,9 +246,9 @@
switch (object.objectNumber) {
case -1: objectNumberStr = "MESSAGE"; break;
case 0: objectNumberStr = "Joe"; break;
- case 196: objectNumberStr = "Chef"; break;
- case 548: objectNumberStr = "Anderson"; break;
- default: objectNumberStr = "unknown"; break;
+ default:
+ objectNumberStr = _logic->objectName(_logic->objectData(object.objectNumber)->name);
+ break;
}
debug(0, "objectNumber = %i (%s)", object.objectNumber, objectNumberStr);
@@ -455,8 +457,7 @@
objectData->name = abs(objectData->name);
}
- // XXX REDISP_OBJECT(OBJECT);
- debug(0, "REDISP_OBJECT needed for object %i", object.objectNumber);
+ _logic->roomRefreshObject(object.objectNumber);
// Skip doing any anim stuff
objectType = OBJECT_TYPE_NO_ANIMATION;
@@ -1002,15 +1003,13 @@
objectData->name = abs(objectData->name);
if (fromObject > 0)
objectCopy(fromObject, objectIndex);
- // XXX REDISP_OBJECT(objectIndex);
- debug(0, "REDISP_OBJECT needed for object %i", objectIndex);
+ _logic->roomRefreshObject(objectIndex);
}
else if (objectIndex < 0) { // Hide the object
objectIndex = -objectIndex;
ObjectData *objectData = _logic->objectData(objectIndex);
objectData->name = -abs(objectData->name);
- // XXX REDISP_OBJECT(objectIndex);
- debug(0, "REDISP_OBJECT needed for object %i", objectIndex);
+ _logic->roomRefreshObject(objectIndex);
}
if (areaIndex > 0) {
Index: cutaway.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/cutaway.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- cutaway.h 15 Oct 2003 09:23:05 -0000 1.10
+++ cutaway.h 15 Oct 2003 10:01:54 -0000 1.11
@@ -263,7 +263,7 @@
static byte *getCutawayObject(byte *ptr, CutawayObject &object);
//! Dump a CutawayObject with debug()
- static void dumpCutawayObject(int index, CutawayObject &object);
+ void dumpCutawayObject(int index, CutawayObject &object);
//! Dump CutawayAnum data with debug()
static void dumpCutawayAnim(CutawayAnim &anim);
Index: logic.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/logic.cpp,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- logic.cpp 15 Oct 2003 09:23:05 -0000 1.41
+++ logic.cpp 15 Oct 2003 10:01:54 -0000 1.42
@@ -968,7 +968,7 @@
uint16 Logic::roomRefreshObject(uint16 obj) {
- warning("Logic::roomSetupObjects() not fully implemented");
+ warning("Logic::roomRefreshObject() not fully implemented");
uint16 curImage = _numFrames;
ObjectData *pod = &_objectData[obj];
@@ -978,7 +978,8 @@
// check the object is in the current room
if (pod->room != _currentRoom) {
- warning("Logic::roomRefreshObject() - Trying to display an object that is not in room");
+ warning("Logic::roomRefreshObject() - Trying to display an object (%i=%s) that is not in room (object room=%i, current room=%i)",
+ obj, _objName[obj], pod->room, _currentRoom);
return curImage;
}
@@ -1020,8 +1021,12 @@
// find frame used for object
curImage = findFrame(obj);
- if (pod->image > 5000) {
- GraphicData *pgd = &_graphicData[pod->image - 5000];
+ int image = pod->image;
+ if (pod->image > 5000)
+ image -= 5000;
+
+
+ GraphicData *pgd = &_graphicData[image];
bool rebound = false;
int16 lastFrame = pgd->lastFrame;
if (lastFrame < 0) {
@@ -1061,7 +1066,7 @@
pbs->y = pgd->y;
pbs->frameNum = curImage;
}
- }
+
return curImage;
}
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm camera.cpp,2.16,2.17 script_v5.cpp,1.200,1.201
- Next message: [Scummvm-cvs-logs] CVS: scummvm/queen talk.cpp,1.8,1.9 talk.h,1.6,1.7 cutaway.cpp,1.23,1.24 xref.txt,1.5,1.6
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list