diff options
author | Filippos Karapetis | 2016-09-26 13:19:37 +0300 |
---|---|---|
committer | Filippos Karapetis | 2016-10-03 00:34:05 +0300 |
commit | 94a942755e745bc3553b3d8cc83e533688d867fa (patch) | |
tree | 264175e1708ccea286f18953b17e1dd5c81aea01 /engines/chewy/chewy.cpp | |
parent | 1de9019665d8e1d2791684ae84d4ca45f652bb38 (diff) | |
download | scummvm-rg350-94a942755e745bc3553b3d8cc83e533688d867fa.tar.gz scummvm-rg350-94a942755e745bc3553b3d8cc83e533688d867fa.tar.bz2 scummvm-rg350-94a942755e745bc3553b3d8cc83e533688d867fa.zip |
CHEWY: Initial support for game sprites
Diffstat (limited to 'engines/chewy/chewy.cpp')
-rw-r--r-- | engines/chewy/chewy.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/engines/chewy/chewy.cpp b/engines/chewy/chewy.cpp index e5dd7ec265..94cbee4559 100644 --- a/engines/chewy/chewy.cpp +++ b/engines/chewy/chewy.cpp @@ -79,22 +79,35 @@ Common::Error ChewyEngine::run() { //_graphics->playVideo(0); _graphics->drawImage("episode1.tgp", 0); + _graphics->showCursor(); + _graphics->setCursor(0); //_sound->playSpeech(1); //_sound->playSound(1); //_sound->playMusic(2); // Run a dummy loop Common::Event event; + uint curCursor = 0; + const uint maxCursors = 41; while (!shouldQuit()) { while (g_system->getEventManager()->pollEvent(event)) { if ((event.type == Common::EVENT_KEYDOWN && event.kbd.keycode == Common::KEYCODE_ESCAPE) || event.type == Common::EVENT_LBUTTONUP) g_engine->quitGame(); + if ((event.type == Common::EVENT_KEYDOWN && event.kbd.keycode == Common::KEYCODE_SPACE) || event.type == Common::EVENT_RBUTTONUP) { + curCursor++; + if (curCursor == maxCursors) + curCursor = 0; + _graphics->setCursor(curCursor); + } + if (event.type == Common::EVENT_KEYDOWN && event.kbd.flags & Common::KBD_CTRL && event.kbd.keycode == Common::KEYCODE_d) _console->attach(); } _console->onFrame(); + + g_system->updateScreen(); g_system->delayMillis(10); } |