[Scummvm-cvs-logs] CVS: scummvm/queen command.cpp,1.62,1.63 logic.cpp,1.177,1.178 talk.cpp,1.82,1.83 walk.cpp,1.40,1.41
Gregory Montoir
cyx at users.sourceforge.net
Fri Jan 16 07:52:02 CET 2004
Update of /cvsroot/scummvm/scummvm/queen
In directory sc8-pr-cvs1:/tmp/cvs-serv32096/queen
Modified Files:
command.cpp logic.cpp talk.cpp walk.cpp
Log Message:
some assert() calls
Index: command.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/command.cpp,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -d -r1.62 -r1.63
--- command.cpp 16 Jan 2004 14:15:44 -0000 1.62
+++ command.cpp 16 Jan 2004 15:51:23 -0000 1.63
@@ -143,6 +143,7 @@
uint16 i;
for (i = 1; i <= _numCmdList; ++i, ++cmdList) {
if (cmdList->match(_state.selAction, _state.subject[0], _state.subject[1])) {
+ assert(comMax < MAX_MATCHING_CMDS);
matchingCmds[comMax] = i;
++comMax;
}
Index: logic.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/logic.cpp,v
retrieving revision 1.177
retrieving revision 1.178
diff -u -d -r1.177 -r1.178
--- logic.cpp 16 Jan 2004 15:03:52 -0000 1.177
+++ logic.cpp 16 Jan 2004 15:51:23 -0000 1.178
@@ -299,8 +299,7 @@
img -= 5000;
}
- if (img > _numGraphics)
- warning("img (%i) > _numGraphics (%i)", img, _numGraphics);
+ assert (img <= _numGraphics);
if(_graphicData[img].lastFrame != 0) {
++idxAnimated;
Index: talk.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/talk.cpp,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -d -r1.82 -r1.83
--- talk.cpp 14 Jan 2004 14:34:05 -0000 1.82
+++ talk.cpp 16 Jan 2004 15:51:23 -0000 1.83
@@ -1289,7 +1289,7 @@
// Function TALK_BOB (lines 577-739) in talk.c
int selectedSentence = 0;
- int scrollX = 0; // XXX: global variable
+ int scrollX = _vm->display()->horizontalScroll();
int startOption = 1;
int optionLines = 0;
char optionText[5][MAX_STRING_SIZE];
Index: walk.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/walk.cpp,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- walk.cpp 14 Jan 2004 14:34:05 -0000 1.40
+++ walk.cpp 16 Jan 2004 15:51:23 -0000 1.41
@@ -540,9 +540,11 @@
area = _areaList[_areaListCount];
} else {
++_areaListCount;
+ assert(_areaListCount < MAX_WALK_DATA);
_areaList[_areaListCount] = area;
if(!isAreaStruck(area)) {
++_areaStrikeCount;
+ assert(_areaStrikeCount < MAX_WALK_DATA);
_areaStrike[_areaStrikeCount] = area;
}
}
@@ -567,6 +569,7 @@
debug(9, "Walk::incWalkData(%d, %d, %d)", (x - px), (y - py), areaNum);
if (px != x || py != y) {
++_walkDataCount;
+ assert(_walkDataCount < MAX_WALK_DATA);
WalkData *pwd = &_walkData[_walkDataCount];
pwd->dx = x - px;
pwd->dy = y - py;
More information about the Scummvm-git-logs
mailing list