[Scummvm-cvs-logs] CVS: scummvm/queen command.cpp,1.26,1.27 cutaway.cpp,1.73,1.74 graphics.h,1.39,1.40 graphics.cpp,1.48,1.49 logic.cpp,1.107,1.108 talk.cpp,1.47,1.48
Gregory Montoir
cyx at users.sourceforge.net
Wed Nov 26 15:04:05 CET 2003
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/queen logic.h,1.70,1.71 logic.cpp,1.106,1.107 cutaway.cpp,1.72,1.73 command.cpp,1.25,1.26
- Next message: [Scummvm-cvs-logs] CVS: scummvm/queen logic.cpp,1.108,1.109
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/queen
In directory sc8-pr-cvs1:/tmp/cvs-serv22412
Modified Files:
command.cpp cutaway.cpp graphics.h graphics.cpp logic.cpp
talk.cpp
Log Message:
fix some animation issues
Index: command.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/command.cpp,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- command.cpp 26 Nov 2003 21:46:29 -0000 1.26
+++ command.cpp 26 Nov 2003 23:03:20 -0000 1.27
@@ -1297,7 +1297,7 @@
uint16 dstObj = ABS(cmdObj->dstObj);
ObjectData *objData = _logic->objectData(dstObj);
- debug(0, "Command::setObjects() - dstObj=%X srcObj=%X", cmdObj->dstObj, cmdObj->srcObj);
+ debug(0, "Command::setObjects() - dstObj=%X srcObj=%X _curCmd.subject1=%X", cmdObj->dstObj, cmdObj->srcObj, _curCmd.subject1);
if (cmdObj->dstObj > 0) {
// show the object
Index: cutaway.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/cutaway.cpp,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -d -r1.73 -r1.74
--- cutaway.cpp 26 Nov 2003 21:46:29 -0000 1.73
+++ cutaway.cpp 26 Nov 2003 23:03:20 -0000 1.74
@@ -1374,7 +1374,6 @@
k++;
if (object->name > 0) {
BobSlot *bs = _graphics->bob(k);
- bs->animating = true;
bs->animReset();
}
}
Index: graphics.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/graphics.h,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- graphics.h 26 Nov 2003 20:41:54 -0000 1.39
+++ graphics.h 26 Nov 2003 23:03:20 -0000 1.40
@@ -142,7 +142,7 @@
void bobAnimString(uint32 bobnum, const AnimFrame *buf); // stringanim()
void bobAnimNormal(uint32 bobnum, uint16 firstFrame, uint16 lastFrame, uint16 speed, bool rebound, bool xflip); // makeanim()
void bobMove(uint32 bobnum, int16 endx, int16 endy, int16 speed); // movebob()
- void bobDraw(uint32 bobnum, int16 x, int16 y, uint16 scale, bool xflip, const Box& box); // bob()
+ void bobDraw(uint32 frameNum, int16 x, int16 y, uint16 scale, bool xflip, const Box& box); // bob()
void bobDrawInventoryItem(uint32 bobnum, uint16 x, uint16 y); // invbob()
void bobPaste(uint32 frameNum, int16 x, int16 y); // bobpaste()
void bobShrink(const BobFrame* pbf, uint16 percentage); // shrinkbob()
Index: graphics.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/graphics.cpp,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- graphics.cpp 20 Nov 2003 09:39:29 -0000 1.48
+++ graphics.cpp 26 Nov 2003 23:03:20 -0000 1.49
@@ -323,29 +323,31 @@
void BobSlot::animReset() {
- if(active && animating) {
+ if(active) {
const AnimFrame *af = anim.string.buffer;
if (af != NULL) {
+ animating = true;
anim.string.curPos = af;
frameNum = af->frame;
anim.speed = af->speed / 4;
}
else {
- anim.speed = anim.speedBak;
- frameNum = anim.normal.firstFrame;
- frameDir = 1;
+ animating = false;
+// anim.speed = anim.speedBak;
+// frameNum = anim.normal.firstFrame;
+// frameDir = 1;
}
}
}
-void Graphics::bobDraw(uint32 bobnum, int16 x, int16 y, uint16 scale, bool xflip, const Box& box) {
+void Graphics::bobDraw(uint32 frameNum, int16 x, int16 y, uint16 scale, bool xflip, const Box& box) {
uint16 w, h;
- debug(9, "Graphics::bobDraw(%d, %d, %d, %d)", bobnum, x, y, scale);
+ debug(9, "Graphics::bobDraw(%d, %d, %d, %d)", frameNum, x, y, scale);
- BobFrame *pbf = &_frames[bobnum];
+ BobFrame *pbf = &_frames[frameNum];
if (scale < 100) {
bobShrink(pbf, scale);
pbf = &_shrinkBuffer;
@@ -531,6 +533,7 @@
for (i = 0; i < _sortedBobsCount; ++i) {
BobSlot *pbs = _sortedBobs[i];
if (pbs->active) {
+
BobFrame *pbf = &_frames[ pbs->frameNum ];
uint16 xh, yh, x, y;
Index: logic.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/logic.cpp,v
retrieving revision 1.107
retrieving revision 1.108
diff -u -d -r1.107 -r1.108
--- logic.cpp 26 Nov 2003 21:46:28 -0000 1.107
+++ logic.cpp 26 Nov 2003 23:03:20 -0000 1.108
@@ -566,7 +566,7 @@
img = _objectData[i].image;
if(img <= -10) {
GraphicData* pgd = &_graphicData[-(img + 10)];
- if(pgd->lastFrame != 0) {
+ if(pgd->lastFrame > 0) {
// skip all the frames of the animation
idx += ABS(pgd->lastFrame) - pgd->firstFrame + 1;
}
@@ -1131,14 +1131,14 @@
return curImage;
}
+ // find frame used for object
+ curImage = findFrame(obj);
+
if (pod->name < 0 || pod->image < 0) {
// object is hidden or disabled
_graphics->bobClear(curBob);
return curImage;
}
-
- // find frame used for object
- curImage = findFrame(obj);
int image = pod->image;
if (image > 5000) {
Index: talk.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/talk.cpp,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -d -r1.47 -r1.48
--- talk.cpp 24 Nov 2003 19:22:52 -0000 1.47
+++ talk.cpp 26 Nov 2003 23:03:21 -0000 1.48
@@ -352,7 +352,6 @@
pbs->y = person.actor->y;
// Better kick start the persons anim sequence
- pbs->animating = true;
pbs->animReset();
}
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/queen logic.h,1.70,1.71 logic.cpp,1.106,1.107 cutaway.cpp,1.72,1.73 command.cpp,1.25,1.26
- Next message: [Scummvm-cvs-logs] CVS: scummvm/queen logic.cpp,1.108,1.109
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list