diff options
author | Travis Howell | 2007-03-06 09:21:41 +0000 |
---|---|---|
committer | Travis Howell | 2007-03-06 09:21:41 +0000 |
commit | 4730229dffc12a0e126b0b212fa9ce8aab6170ca (patch) | |
tree | 5e53097df35c0a9c42fb1512e3ccb0c82415e3b1 /engines/scumm | |
parent | c4260e7d8fd532dca6fba734caacaf3d8f2833b8 (diff) | |
download | scummvm-rg350-4730229dffc12a0e126b0b212fa9ce8aab6170ca.tar.gz scummvm-rg350-4730229dffc12a0e126b0b212fa9ce8aab6170ca.tar.bz2 scummvm-rg350-4730229dffc12a0e126b0b212fa9ce8aab6170ca.zip |
Add F1 - F3 keys for Apple II and Commodore 64 verisons of Maniac Mansion.
svn-id: r26004
Diffstat (limited to 'engines/scumm')
-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; } |