[Scummvm-cvs-logs] CVS: scummvm/queen command.cpp,1.35,1.36 logic.cpp,1.128,1.129 logic.h,1.84,1.85 talk.cpp,1.57,1.58 xref.txt,1.46,1.47
Gregory Montoir
cyx at users.sourceforge.net
Thu Dec 11 05:27:01 CET 2003
Update of /cvsroot/scummvm/scummvm/queen
In directory sc8-pr-cvs1:/tmp/cvs-serv30742/queen
Modified Files:
command.cpp logic.cpp logic.h talk.cpp xref.txt
Log Message:
merged Logic::joeGrab & Logic::joeGrabDirection and removed speed argument as it always equals 0
Index: command.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/command.cpp,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- command.cpp 11 Dec 2003 10:03:35 -0000 1.35
+++ command.cpp 11 Dec 2003 13:26:13 -0000 1.36
@@ -371,10 +371,10 @@
// Don't grab if action is TALK or WALK
if (_selCmd.action.value() != VERB_TALK_TO && _selCmd.action.value() != VERB_WALK_TO) {
if (_curCmd.subject1 > 0) {
- _logic->joeGrab(_logic->objectData(_curCmd.subject1)->state, 0);
+ _logic->joeGrab(State::findGrab(_logic->objectData(_curCmd.subject1)->state));
}
if (_curCmd.subject2 > 0) {
- _logic->joeGrab(_logic->objectData(_curCmd.subject2)->state, 0);
+ _logic->joeGrab(State::findGrab(_logic->objectData(_curCmd.subject2)->state));
}
}
Index: logic.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/logic.cpp,v
retrieving revision 1.128
retrieving revision 1.129
diff -u -d -r1.128 -r1.129
--- logic.cpp 11 Dec 2003 10:24:27 -0000 1.128
+++ logic.cpp 11 Dec 2003 13:26:13 -0000 1.129
@@ -32,6 +32,7 @@
#include "queen/journal.h"
#include "queen/resource.h"
#include "queen/sound.h"
+#include "queen/state.h"
#include "queen/talk.h"
#include "queen/walk.h"
@@ -1647,23 +1648,12 @@
}
-void Logic::joeGrab(uint16 state, uint16 speed) {
-
- StateGrab sg = State::findGrab(state);
- if (sg != STATE_GRAB_NONE) {
- joeGrabDirection(sg, speed);
- }
-}
-
-
-void Logic::joeGrabDirection(StateGrab grab, uint16 speed) {
-
- // if speed == 0, then keep Joe in position
+void Logic::joeGrab(int16 grabState) {
uint16 frame = 0;
BobSlot *bobJoe = _graphics->bob(0);
-
- switch (grab) {
+
+ switch (grabState) {
case STATE_GRAB_NONE:
break;
@@ -1700,12 +1690,7 @@
bobJoe->scale = joeScale();
update();
// turn back
- if (speed == 0) {
- frame = 7;
- }
- else {
- frame = 5;
- }
+ frame = 7;
break;
}
@@ -1716,13 +1701,9 @@
update();
// extra delay for grab down
- if (grab == STATE_GRAB_DOWN) {
+ if (grabState == STATE_GRAB_DOWN) {
update();
update();
- }
-
- if (speed > 0) {
- joeFace();
}
}
}
Index: logic.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/logic.h,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -d -r1.84 -r1.85
--- logic.h 11 Dec 2003 10:24:27 -0000 1.84
+++ logic.h 11 Dec 2003 13:26:13 -0000 1.85
@@ -25,7 +25,6 @@
#include "common/util.h"
#include "queen/defs.h"
#include "queen/structs.h"
-#include "queen/state.h" // for joeGrabDirection()
#include "queen/verb.h"
namespace Queen {
@@ -191,8 +190,7 @@
ObjectData *joeSetupInRoom(bool autoPosition, uint16 scale);
uint16 joeFace();
- void joeGrab(uint16 state, uint16 speed);
- void joeGrabDirection(StateGrab grab, uint16 speed);
+ void joeGrab(int16 grabState);
void joeUseDress(bool showCut);
void joeUseClothes(bool showCut);
Index: talk.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/talk.cpp,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -d -r1.57 -r1.58
--- talk.cpp 11 Dec 2003 10:03:35 -0000 1.57
+++ talk.cpp 11 Dec 2003 13:26:13 -0000 1.58
@@ -540,10 +540,10 @@
case 'G':
switch (sentence[index + 1]) {
case 'D':
- _logic->joeGrabDirection(STATE_GRAB_DOWN, 0);
+ _logic->joeGrab(STATE_GRAB_DOWN);
break;
case 'M':
- _logic->joeGrabDirection(STATE_GRAB_MID, 0);
+ _logic->joeGrab(STATE_GRAB_MID);
break;
default:
warning("Unknown command string: '%2s'", sentence + index);
Index: xref.txt
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/xref.txt,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -d -r1.46 -r1.47
--- xref.txt 10 Dec 2003 20:13:25 -0000 1.46
+++ xref.txt 11 Dec 2003 13:26:13 -0000 1.47
@@ -172,8 +172,7 @@
JOE
===
FACE_JOE() Logic::joeFace
-GRAB_DIR() Logic::joeGrabDirection
-GRAB_JOE() Logic::joeGrab
+GRAB_DIR(),GRAB_JOE() Logic::joeGrab
SETUP_HERO() Logic::joeSetupInRoom
SETUP_JOE() Logic::joeSetup
USE_UNDERWEAR() Logic::joeUseUnderwear
More information about the Scummvm-git-logs
mailing list