diff options
| -rw-r--r-- | queen/command.cpp | 25 | ||||
| -rw-r--r-- | queen/command.h | 4 | ||||
| -rw-r--r-- | queen/resource.h | 2 | 
3 files changed, 13 insertions, 18 deletions
| diff --git a/queen/command.cpp b/queen/command.cpp index a0b444bf2c..34351e06e8 100644 --- a/queen/command.cpp +++ b/queen/command.cpp @@ -232,8 +232,10 @@ void Command::executeCurrentAction() {  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 @@ uint16 Command::nextObjectDescription(ObjectDescription* objDesc, uint16 firstDe  		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::lookAtSelectedObject() {  //} -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::lookForCurrentObject() {  } -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) { diff --git a/queen/command.h b/queen/command.h index 0bf7c4d754..d0bc224b0a 100644 --- a/queen/command.h +++ b/queen/command.h @@ -135,10 +135,10 @@ private:  	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; } diff --git a/queen/resource.h b/queen/resource.h index 2a85e7707b..dae72aff0c 100644 --- a/queen/resource.h +++ b/queen/resource.h @@ -79,7 +79,7 @@ public:  	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(); | 
