[Scummvm-cvs-logs] CVS: scummvm/queen defs.h,1.7,1.8 walk.h,1.7,1.8 walk.cpp,1.11,1.12
Gregory Montoir
cyx at users.sourceforge.net
Sat Oct 18 01:15:02 CEST 2003
Update of /cvsroot/scummvm/scummvm/queen
In directory sc8-pr-cvs1:/tmp/cvs-serv32443
Modified Files:
defs.h walk.h walk.cpp
Log Message:
minor changes to joeMove() code
Index: defs.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/defs.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- defs.h 15 Oct 2003 09:23:05 -0000 1.7
+++ defs.h 18 Oct 2003 08:12:56 -0000 1.8
@@ -67,8 +67,9 @@
//! GameState vars
enum {
- VAR_DRESSING_MODE = 19, // 0=normal clothes, 1=underwear, 2=dress
- VAR_INTRO_PLAYED = 117
+ VAR_DRESSING_MODE = 19, // 0=normal clothes, 1=underwear, 2=dress
+ VAR_ROOM73_CUTAWAY = 93,
+ VAR_INTRO_PLAYED = 117
};
Index: walk.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/walk.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- walk.h 14 Oct 2003 19:06:44 -0000 1.7
+++ walk.h 18 Oct 2003 08:12:56 -0000 1.8
@@ -48,6 +48,7 @@
// int16 sign; // never used
int16 dx, dy;
const Area *area;
+ uint16 areaNum; // extra stuff for joeMoveBlock
MovePersonAnim anim;
};
@@ -82,7 +83,7 @@
private:
- void joeMoveBlock(int facing);
+ void joeMoveBlock(int facing, uint16 areaNum, uint16 walkDataNum);
void animateJoePrepare();
void animateJoe();
@@ -123,6 +124,9 @@
uint16 _areaStrike[MAX_AREAS + 1];
uint16 _areaListCount;
uint16 _areaList[MAX_AREAS + 1];
+
+ //! set if joeMoveBlock() is called in joeAnimate()
+ bool _joeMoveBlock;
Logic *_logic;
Graphics *_graphics;
Index: walk.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/walk.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- walk.cpp 15 Oct 2003 08:46:04 -0000 1.11
+++ walk.cpp 18 Oct 2003 08:12:56 -0000 1.12
@@ -19,6 +19,7 @@
*
*/
+#include "stdafx.h"
#include "queen/walk.h"
#include "queen/logic.h"
#include "queen/graphics.h"
@@ -58,15 +59,22 @@
}
-void Walk::joeMoveBlock(int facing) {
+void Walk::joeMoveBlock(int facing, uint16 areaNum, uint16 walkDataNum) {
+
warning("Walk::moveJoeBlock() partially implemented");
_graphics->bob(0)->animating = false;
-// CAN=-2;
+
+ // XXX CAN=-2;
+
// Make Joe face the right direction
+ _joeMoveBlock = true;
_logic->joeFacing(facing);
_logic->joeFace();
- // TODO: cutaway calls
+ _logic->newRoom(0);
+ _logic->entryObj(0);
+
+ // XXX cutaway calls
}
@@ -125,8 +133,9 @@
WalkData *pwd = &_walkData[i];
+ // area has been turned off, see if we should execute a cutaway
if (pwd->area->mapNeighbours < 0) {
- joeMoveBlock(pwd->anim.facing);
+ joeMoveBlock(pwd->anim.facing, pwd->areaNum, i);
return;
}
if (lastDirection != pwd->anim.facing) {
@@ -158,10 +167,7 @@
}
lastDirection = pwd->anim.facing;
}
-// if (!cutQuit) {
- pbs->animating = false;
_logic->joeFacing(lastDirection);
-// }
}
@@ -313,7 +319,7 @@
uint16 oldPos = _logic->zoneInArea(ZONE_ROOM, oldx, oldy);
uint16 newPos = _logic->zoneInArea(ZONE_ROOM, endx, endy);
- debug(9, "Walk::joeMove(%d, %d, %d, %d, %d), old = %d, new = %d", direction, oldx, oldy, endx, endy, oldPos, newPos);
+ debug(9, "Walk::joeMove(%d, %d, %d, %d, %d) - old = %d, new = %d", direction, oldx, oldy, endx, endy, oldPos, newPos);
// if in cutaway, allow Joe to walk anywhere
if(newPos == 0 && inCutaway) {
@@ -324,15 +330,17 @@
}
if (_walkDataCount > 0) {
-//MOVE_JOE2:
animateJoePrepare();
animateJoe();
}
else {
// SPEAK(JOE_RESPstr[4],"JOE",find_cd_desc(4));
}
-//MOVE_JOE_EXIT:
- if (direction > 0) {
+
+ _graphics->bob(0)->animating = false;
+ // XXX if ((CAN==-1) && (walkgameload==0)) NEW_ROOM=0;
+ // XXX walkgameload=0;
+ if (!_joeMoveBlock && direction > 0) {
_logic->joeFacing(direction);
}
_logic->joePrevFacing(_logic->joeFacing());
@@ -361,7 +369,7 @@
uint16 oldPos = _logic->zoneInArea(ZONE_ROOM, oldx, oldy);
uint16 newPos = _logic->zoneInArea(ZONE_ROOM, endx, endy);
- debug(9, "Walk::personMove(%d, %d, %d, %d, %d), old = %d, new = %d", direction, oldx, oldy, endx, endy, oldPos, newPos);
+ debug(9, "Walk::personMove(%d, %d, %d, %d, %d) - old = %d, new = %d", direction, oldx, oldy, endx, endy, oldPos, newPos);
calc(oldPos, newPos, oldx, oldy, endx, endy);
@@ -586,19 +594,21 @@
memset(_areaStrike, 0, sizeof(_areaStrike));
_areaListCount = 0;
memset(_areaList, 0, sizeof(_areaList));
+ _joeMoveBlock = false;
}
-void Walk::incWalkData(uint16 px, uint16 py, uint16 x, uint16 y, uint16 area) {
+void Walk::incWalkData(uint16 px, uint16 py, uint16 x, uint16 y, uint16 areaNum) {
- debug(9, "Walk::incWalkData(%d, %d, %d)", (int16)(x - px), (int16)(y - py), area);
+ debug(9, "Walk::incWalkData(%d, %d, %d)", (int16)(x - px), (int16)(y - py), areaNum);
if (px != x || py != y) {
++_walkDataCount;
WalkData *pwd = &_walkData[_walkDataCount];
pwd->dx = x - px;
pwd->dy = y - py;
- pwd->area = _logic->currentRoomArea(area); //area;
+ pwd->area = _logic->currentRoomArea(areaNum);
+ pwd->areaNum = areaNum;
// pwd->sign = ((pwd->dx < 0) ? -1 : ((pwd->dx > 0) ? 1 : 0)) ;
}
}
More information about the Scummvm-git-logs
mailing list