[Scummvm-cvs-logs] CVS: scummvm/queen command.cpp,1.46,1.47 command.h,1.14,1.15 resource.h,1.24,1.25
Gregory Montoir
cyx at users.sourceforge.net
Sun Dec 28 13:19:01 CET 2003
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/sword1 control.cpp,1.8,1.9 logic.cpp,1.23,1.24 resman.cpp,1.8,1.9 sword1.cpp,1.22,1.23
- Next message: [Scummvm-cvs-logs] CVS: scummvm/sword1 control.cpp,1.9,1.10 control.h,1.2,1.3 logic.cpp,1.24,1.25 mouse.cpp,1.12,1.13 music.cpp,1.8,1.9 screen.cpp,1.26,1.27 sound.cpp,1.18,1.19 sound.h,1.7,1.8 sword1.cpp,1.23,1.24
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/queen
In directory sc8-pr-cvs1:/tmp/cvs-serv8632/queen
Modified Files:
command.cpp command.h resource.h
Log Message:
cleanup
Index: command.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/command.cpp,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -d -r1.46 -r1.47
--- command.cpp 28 Dec 2003 01:17:29 -0000 1.46
+++ command.cpp 28 Dec 2003 21:18:02 -0000 1.47
@@ -232,8 +232,10 @@
void Command::updatePlayer() {
if (_vm->logic()->joeWalk() != JWM_MOVE) {
- lookForCurrentObject();
- lookForCurrentIcon();
+ int16 cx = _vm->input()->mousePosX();
+ int16 cy = _vm->input()->mousePosY();
+ lookForCurrentObject(cx, cy);
+ lookForCurrentIcon(cx, cy);
}
if (_vm->input()->keyVerb() != VERB_NONE) {
@@ -1269,16 +1271,9 @@
if (objDesc->lastSeenNumber == 0) {
// first time look at called
objDesc->lastSeenNumber = firstDesc;
+ break;
}
- else {
- // already displayed first, do a random
- i = objDesc->lastSeenNumber;
- while (i == objDesc->lastSeenNumber) {
- i = firstDesc + _vm->randomizer.getRandomNumber(diff);
- }
- objDesc->lastSeenNumber = i;
- }
- break;
+ // already displayed first, do a random
case 1:
i = objDesc->lastSeenNumber;
while (i == objDesc->lastSeenNumber) {
@@ -1368,9 +1363,9 @@
//}
-void Command::lookForCurrentObject() {
+void Command::lookForCurrentObject(int16 cx, int16 cy) {
- uint16 obj = _vm->logic()->findObjectUnderCursor(_vm->input()->mousePosX(), _vm->input()->mousePosY());
+ uint16 obj = _vm->logic()->findObjectUnderCursor(cx, cy);
_state.noun = _vm->logic()->findObjectNumber(obj);
if (_state.oldNoun == _state.noun) {
@@ -1426,9 +1421,9 @@
}
-void Command::lookForCurrentIcon() {
+void Command::lookForCurrentIcon(int16 cx, int16 cy) {
- _state.verb = _vm->logic()->findVerbUnderCursor(_vm->input()->mousePosX(), _vm->input()->mousePosY());
+ _state.verb = _vm->logic()->findVerbUnderCursor(cx, cy);
if (_state.oldVerb != _state.verb) {
if (_state.action == VERB_NONE) {
Index: command.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/command.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- command.h 14 Dec 2003 20:24:28 -0000 1.14
+++ command.h 28 Dec 2003 21:18:03 -0000 1.15
@@ -135,10 +135,10 @@
void lookAtSelectedObject();
//! get the current object under the cursor
- void lookForCurrentObject();
+ void lookForCurrentObject(int16 cx, int16 cy);
//! get the current icon panel under the cursor (inventory item or verb)
- void lookForCurrentIcon();
+ void lookForCurrentIcon(int16 cx, int16 cy);
bool isVerbAction(Verb v) const { return (v >= VERB_PANEL_COMMAND_FIRST && v <= VERB_PANEL_COMMAND_LAST) || (v == VERB_WALK_TO); };
bool isVerbInv(Verb v) const { return v >= VERB_INV_FIRST && v <= VERB_INV_LAST; }
Index: resource.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/resource.h,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- resource.h 28 Dec 2003 15:29:05 -0000 1.24
+++ resource.h 28 Dec 2003 21:18:03 -0000 1.25
@@ -79,7 +79,7 @@
bool isDemo() const { return !strcmp(_versionString, "PE100"); }
bool isInterview() const { return !strcmp(_versionString, "PEint"); }
bool isFloppy() const { return _versionString[0] == 'P'; }
- uint8 compression() const { return _compression; }
+ uint8 compression() const { return _compression; }
const char *JASVersion() const { return _versionString; }
Language getLanguage() const;
char *getJAS2Line();
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/sword1 control.cpp,1.8,1.9 logic.cpp,1.23,1.24 resman.cpp,1.8,1.9 sword1.cpp,1.22,1.23
- Next message: [Scummvm-cvs-logs] CVS: scummvm/sword1 control.cpp,1.9,1.10 control.h,1.2,1.3 logic.cpp,1.24,1.25 mouse.cpp,1.12,1.13 music.cpp,1.8,1.9 screen.cpp,1.26,1.27 sound.cpp,1.18,1.19 sound.h,1.7,1.8 sword1.cpp,1.23,1.24
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list