diff options
-rw-r--r-- | engines/scumm/input.cpp | 8 | ||||
-rw-r--r-- | engines/scumm/intern.h | 4 | ||||
-rw-r--r-- | engines/scumm/verbs.cpp | 12 |
3 files changed, 20 insertions, 4 deletions
diff --git a/engines/scumm/input.cpp b/engines/scumm/input.cpp index c8bff3d504..692694851d 100644 --- a/engines/scumm/input.cpp +++ b/engines/scumm/input.cpp @@ -225,6 +225,14 @@ void ScummEngine::clearClickedStatus() { _rightBtnPressed &= ~msClicked; } +void ScummEngine_v0::processInput() { + // F1 - F3 + if (_keyPressed >= 315 && _keyPressed <= 317) { + switchActor(_keyPressed - 315); + } + + ScummEngine::processInput(); +} void ScummEngine::processInput() { int lastKeyHit = _keyPressed; _keyPressed = 0; diff --git a/engines/scumm/intern.h b/engines/scumm/intern.h index 1d6f21e6b2..7cecc612fc 100644 --- a/engines/scumm/intern.h +++ b/engines/scumm/intern.h @@ -447,6 +447,8 @@ protected: virtual void resetScummVars(); virtual void decodeParseString(); + virtual void processInput(); + virtual void saveOrLoad(Serializer *s); virtual void checkExecVerbs(); @@ -455,6 +457,8 @@ protected: void setNewKidVerbs(); void drawSentence(); + void switchActor(int slot); + virtual int getVarOrDirectWord(byte mask); virtual uint fetchScriptWord(); diff --git a/engines/scumm/verbs.cpp b/engines/scumm/verbs.cpp index 2287d42f19..76c45a8a47 100644 --- a/engines/scumm/verbs.cpp +++ b/engines/scumm/verbs.cpp @@ -149,6 +149,13 @@ void ScummEngine_v0::setNewKidVerbs() { setUserState(191); } +void ScummEngine_v0::switchActor(int slot) { + VAR(VAR_EGO) = VAR(97 + slot); + actorFollowCamera(VAR(VAR_EGO)); + resetVerbs(); + setUserState(247); +} + void ScummEngine_v2::initV2MouseOver() { int i; int arrow_color, color, hi_color; @@ -617,10 +624,7 @@ void ScummEngine_v0::checkExecVerbs() { if (_activeVerb == 7) { if (over) { _activeVerb = 13; - VAR(VAR_EGO) = VAR(96 + _verbs[over].verbid); - actorFollowCamera(VAR(VAR_EGO)); - resetVerbs(); - setUserState(247); + switchActor(_verbs[over].verbid - 1); } return; } |