diff options
author | Travis Howell | 2005-09-24 10:15:17 +0000 |
---|---|---|
committer | Travis Howell | 2005-09-24 10:15:17 +0000 |
commit | 25dfb36b7d4f2b9948628bde5a4c3592b3fff654 (patch) | |
tree | b704ed813a4cc34060a230aa7699c464a16283f5 | |
parent | ee4b2ccb02bc53f3c861ac899985796ebd0ce2a0 (diff) | |
download | scummvm-rg350-25dfb36b7d4f2b9948628bde5a4c3592b3fff654.tar.gz scummvm-rg350-25dfb36b7d4f2b9948628bde5a4c3592b3fff654.tar.bz2 scummvm-rg350-25dfb36b7d4f2b9948628bde5a4c3592b3fff654.zip |
C64 maniac handles input and verbs manually.
svn-id: r18875
-rw-r--r-- | scumm/intern.h | 3 | ||||
-rw-r--r-- | scumm/room.cpp | 2 | ||||
-rw-r--r-- | scumm/scumm.h | 4 | ||||
-rw-r--r-- | scumm/vars.cpp | 4 | ||||
-rw-r--r-- | scumm/verbs.cpp | 39 |
5 files changed, 35 insertions, 17 deletions
diff --git a/scumm/intern.h b/scumm/intern.h index 68bfb06c9d..2958daae15 100644 --- a/scumm/intern.h +++ b/scumm/intern.h @@ -408,6 +408,9 @@ protected: virtual void setupScummVars(); virtual void decodeParseString(); + virtual void redrawVerbs(); + virtual void checkExecVerbs(); + virtual int getVarOrDirectWord(byte mask); virtual uint fetchScriptWord(); diff --git a/scumm/room.cpp b/scumm/room.cpp index db8a6951e8..0e5fc4971c 100644 --- a/scumm/room.cpp +++ b/scumm/room.cpp @@ -689,7 +689,7 @@ void ScummEngine_v3old::initRoomSubBlocks() { res.nukeResource(rtMatrix, 1); res.nukeResource(rtMatrix, 2); - // TODO: Different box format used + // TODO: Convert older walkbox format if (_gameId == GID_MANIAC && _platform == Common::kPlatformC64) return; diff --git a/scumm/scumm.h b/scumm/scumm.h index bfe32f7f36..412759aec6 100644 --- a/scumm/scumm.h +++ b/scumm/scumm.h @@ -814,9 +814,9 @@ protected: int _activeObject; virtual void handleMouseOver(bool updateInventory); + virtual void redrawVerbs(); + virtual void checkExecVerbs(); - void redrawVerbs(); - void checkExecVerbs(); void verbMouseOver(int verb); int findVerbAtPos(int x, int y) const; virtual void drawVerb(int verb, int mode); diff --git a/scumm/vars.cpp b/scumm/vars.cpp index da0fa66f6d..843bb372c3 100644 --- a/scumm/vars.cpp +++ b/scumm/vars.cpp @@ -523,6 +523,10 @@ void ScummEngine_v8::setupScummVars() { void ScummEngine_v2::initScummVars() { + if (_platform == Common::kPlatformC64 && _gameId == GID_MANIAC) { + VAR(VAR_EGO) = 3; + } + // This needs to be at least greater than 40 to get the more // elaborate version of the EGA Zak into. I don't know where // else it makes any difference. diff --git a/scumm/verbs.cpp b/scumm/verbs.cpp index 520fc9d371..e747647da2 100644 --- a/scumm/verbs.cpp +++ b/scumm/verbs.cpp @@ -21,6 +21,7 @@ */ #include "common/stdafx.h" +#include "scumm/actor.h" #include "scumm/charset.h" #include "scumm/intern.h" #include "scumm/object.h" @@ -350,6 +351,10 @@ void ScummEngine::redrawVerbs() { _verbMouseOver = verb; } +void ScummEngine_c64::redrawVerbs() { + // TODO +} + void ScummEngine::handleMouseOver(bool updateInventory) { if (_completeScreenRedraw) { verbMouseOver(0); @@ -385,20 +390,6 @@ void ScummEngine::checkExecVerbs() { if (VAR_MOUSE_STATE != 0xFF) VAR(VAR_MOUSE_STATE) = _mouseAndKeyboardStat; - if (_platform == Common::kPlatformC64 && _gameId == GID_MANIAC) { - // TODO - - int object = findObject(_mouse.x, _mouse.y); - if (object) { - _activeObject = object; - runObjectScript(object, 15, false, false, NULL); - } else { - - } - - return; - } - if (_mouseAndKeyboardStat < MBS_MAX_KEY) { /* Check keypresses */ vs = &_verbs[1]; @@ -453,6 +444,26 @@ void ScummEngine::checkExecVerbs() { } } +void ScummEngine_c64::checkExecVerbs() { + if (_userPut <= 0 || _mouseAndKeyboardStat == 0) + return; + + if (_platform == Common::kPlatformC64 && _gameId == GID_MANIAC) { + // TODO + + int object = findObject(_mouse.x, _mouse.y); + if (object) { + _activeObject = object; + runObjectScript(object, 15, false, false, NULL); + } else { + Actor *a = derefActor(VAR(VAR_EGO), "checkExecVerbs"); + int y = _mouse.y; + int x = _mouse.x; + a->startWalkActor(x, y, -1); + } + } +} + void ScummEngine::verbMouseOver(int verb) { // Don't do anything unless verbs are active if (_version <= 2 && !(_userState & 128)) |