diff options
author | uruk | 2014-06-19 12:30:44 +0200 |
---|---|---|
committer | uruk | 2014-06-19 12:30:44 +0200 |
commit | fcd387553f5242139e78db87f91047c55705e259 (patch) | |
tree | 92cfd3b490ec32d2d6b4e5f03b1c7550387d6c65 | |
parent | 76846bf4f5567a314c185b77629c0313c9dab22f (diff) | |
download | scummvm-rg350-fcd387553f5242139e78db87f91047c55705e259.tar.gz scummvm-rg350-fcd387553f5242139e78db87f91047c55705e259.tar.bz2 scummvm-rg350-fcd387553f5242139e78db87f91047c55705e259.zip |
CGE2: Implement optionTouch().
Add stubs for called functions.
-rw-r--r-- | engines/cge2/cge2.h | 9 | ||||
-rw-r--r-- | engines/cge2/cge2_main.cpp | 57 |
2 files changed, 64 insertions, 2 deletions
diff --git a/engines/cge2/cge2.h b/engines/cge2/cge2.h index 62d57fb63a..db79c64d7c 100644 --- a/engines/cge2/cge2.h +++ b/engines/cge2/cge2.h @@ -141,7 +141,6 @@ public: void loadPos(); void releasePocket(Sprite *spr); void switchHero(int sex); - void optionTouch(int opt, uint16 mask); void offUse(); void setAutoColors(); bool cross(const V2D &a, const V2D &b, const V2D &c, const V2D &d); @@ -151,6 +150,14 @@ public: int mapCross(const V2D &a, const V2D &b); Sprite *spriteAt(V2D pos); + void optionTouch(int opt, uint16 mask); + void switchColorMode(); + void switchMusic(); + void quit(); + void setVolume(int idx, int cnt); + void switchCap(); + void switchVox(); + void setEye(const V3D &e); void setEye(const V2D& e2, int z = -kScrWidth); void setEye(const char *s); diff --git a/engines/cge2/cge2_main.cpp b/engines/cge2/cge2_main.cpp index 816eea1889..f16f0ce340 100644 --- a/engines/cge2/cge2_main.cpp +++ b/engines/cge2/cge2_main.cpp @@ -1032,7 +1032,62 @@ void Sprite::touch(uint16 mask, V2D pos, Common::KeyCode keyCode) { } void CGE2Engine::optionTouch(int opt, uint16 mask) { - warning("STUB: CGE2Engine::optionTouch()"); + switch (opt) { + case 1: + if (mask & kMouseLeftUp) + switchColorMode(); + break; + case 2: + if (mask & kMouseLeftUp) + switchMusic(); + break; + case 3: + if (mask & kMouseLeftUp) + quit(); + break; + case 4: + if (mask & (kMouseLeftUp | kMouseRightUp)) + setVolume(opt - 4, (mask & kMouseLeftUp) ? 1 : -1); + break; + case 5: + if (mask & (kMouseLeftUp | kMouseRightUp)) + setVolume(opt - 4, (mask & kMouseLeftUp) ? 1 : -1); + break; + case 8: + if (mask & kMouseLeftUp) + switchCap(); + break; + case 9: + if (mask & kMouseLeftUp) + switchVox(); + break; + default: + break; + } +} + +void CGE2Engine::switchColorMode() { + warning("STUB: CGE2Engine::switchColorMode()"); +} + +void CGE2Engine::switchMusic() { + warning("STUB: CGE2Engine::switchMusic()"); +} + +void CGE2Engine::quit() { + warning("STUB: CGE2Engine::quit()"); +} + +void CGE2Engine::setVolume(int idx, int cnt) { + warning("STUB: CGE2Engine::setVolume()"); +} + +void CGE2Engine::switchCap() { + warning("STUB: CGE2Engine::switchCap()"); +} + +void CGE2Engine::switchVox() { + warning("STUB: CGE2Engine::switchVox()"); } void CGE2Engine::offUse() { |