[Scummvm-cvs-logs] CVS: scummvm/queen logic.cpp,1.15,1.16
Gregory Montoir
cyx at users.sourceforge.net
Fri Oct 3 13:00:04 CEST 2003
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/queen cutaway.cpp,1.5,1.6 cutaway.h,1.3,1.4 graphics.cpp,1.6,1.7 graphics.h,1.5,1.6 logic.cpp,1.14,1.15 logic.h,1.7,1.8 queen.cpp,1.2,1.3 queen.h,1.2,1.3 resource.cpp,1.5,1.6 resource.h,1.5,1.6 restables.cpp,1.1,1.2 version.cpp,1.1,1.2
- Next message: [Scummvm-cvs-logs] CVS: scummvm README,1.182,1.183
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/queen
In directory sc8-pr-cvs1:/tmp/cvs-serv26392
Modified Files:
logic.cpp
Log Message:
fix 2 cases not handled in findBob() (stupid me...) and match new/delete
Index: logic.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/logic.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- logic.cpp 3 Oct 2003 19:47:41 -0000 1.15
+++ logic.cpp 3 Oct 2003 19:59:19 -0000 1.16
@@ -31,7 +31,7 @@
}
QueenLogic::~QueenLogic() {
- free (_jas);
+ delete[] _jas;
//free(_graphicData);
}
@@ -280,16 +280,25 @@
++idxStatic;
}
}
+ else if(img == -1) {
+ ++idxStatic;
+ }
+ else if(img == -2) {
+ ++idxAnimated;
+ }
}
- // FIXME: _max*Frame variables should initialized in SETUP_FURNITURE and DISP_ROOM
+ // FIXME: _max*Frame variables should be initialized in SETUP_FURNITURE and DISP_ROOM
if(bobtype == 0) {
// static bob
- bobnum = 19 + _maxStaticFrame + idxStatic;
+ if(idxStatic > 0) {
+ bobnum = 19 + _maxStaticFrame + idxStatic;
+ }
}
else {
// animated bob
- bobnum = 4 + _maxAnimatedFrame + idxAnimated;
-
+ if(idxAnimated > 0) {
+ bobnum = 4 + _maxAnimatedFrame + idxAnimated;
+ }
}
}
}
@@ -355,7 +364,7 @@
if(img <= -10) {
GraphicData* pgd = &_graphicData[-(img + 10)];
if(pgd->lastFrame != 0) {
- idx += ABS(pgd->lastFrame - pgd->firstFrame) + 1;
+ idx += ABS(pgd->lastFrame) - pgd->firstFrame + 1;
}
else {
++idx;
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/queen cutaway.cpp,1.5,1.6 cutaway.h,1.3,1.4 graphics.cpp,1.6,1.7 graphics.h,1.5,1.6 logic.cpp,1.14,1.15 logic.h,1.7,1.8 queen.cpp,1.2,1.3 queen.h,1.2,1.3 resource.cpp,1.5,1.6 resource.h,1.5,1.6 restables.cpp,1.1,1.2 version.cpp,1.1,1.2
- Next message: [Scummvm-cvs-logs] CVS: scummvm README,1.182,1.183
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list