diff options
author | uruk | 2014-06-08 07:38:16 +0200 |
---|---|---|
committer | uruk | 2014-06-08 07:38:16 +0200 |
commit | 8c3e63e47139c4ff168e93b105297e7f8f669016 (patch) | |
tree | 7b0842756324ff17008df63e9431b7b8ec1416fc | |
parent | 9aa80d6d05f11afcb0682699c1a631ed9287341b (diff) | |
download | scummvm-rg350-8c3e63e47139c4ff168e93b105297e7f8f669016.tar.gz scummvm-rg350-8c3e63e47139c4ff168e93b105297e7f8f669016.tar.bz2 scummvm-rg350-8c3e63e47139c4ff168e93b105297e7f8f669016.zip |
CGE2: Reduce number of unhandled commands (seemingly).
-rw-r--r-- | engines/cge2/cge2.h | 2 | ||||
-rw-r--r-- | engines/cge2/snail.cpp | 17 |
2 files changed, 17 insertions, 2 deletions
diff --git a/engines/cge2/cge2.h b/engines/cge2/cge2.h index be2bbd33e3..dcbffdf389 100644 --- a/engines/cge2/cge2.h +++ b/engines/cge2/cge2.h @@ -181,10 +181,12 @@ public: void snBackPt(Sprite *spr, int val); void snFlash(int val); void snLight(int val); + void snCycle(int cnt); void snWalk(Sprite *spr, int val); void snReach(Sprite *spr, int val); void snSound(Sprite *spr, int wav); void snRoom(Sprite *spr, int val); + void snDim(Sprite *spr, int val); void snGhost(Bitmap *bmp); void hide1(Sprite *spr); diff --git a/engines/cge2/snail.cpp b/engines/cge2/snail.cpp index 7961e6d054..1368652e3b 100644 --- a/engines/cge2/snail.cpp +++ b/engines/cge2/snail.cpp @@ -276,7 +276,7 @@ void CommandHandler::runCommand() { _vm->snLight(tailCmd._val != 0); break; case kCmdCycle: - warning("Unhandled command - kCmdCycle"); + _vm->snCycle(tailCmd._val); break; case kCmdWalk: _vm->snWalk(spr, tailCmd._val); @@ -298,7 +298,7 @@ void CommandHandler::runCommand() { _vm->snRoom(spr, tailCmd._val); break; case kCmdDim: - warning("Unhandled command - kCmdDim"); + _vm->snDim(spr, tailCmd._val); break; case kCmdExec: warning("Unhandled command - kCmdExec"); @@ -491,6 +491,10 @@ void CGE2Engine::snLight(int val) { warning("STUB: CGE2Engine::snLight()"); } +void CGE2Engine::snCycle(int cnt) { + warning("STUB: CGE2Engine::snCycle()"); +} + void CGE2Engine::snWalk(Sprite *spr, int val) { warning("STUB: CGE2Engine::snWalk()"); } @@ -520,6 +524,15 @@ void CGE2Engine::snRoom(Sprite *spr, int val) { warning("STUB: CGE2Engine::snRoom()"); } +void CGE2Engine::snDim(Sprite *spr, int val) { + if (isHero(spr)) { + if (val > 0) + ++*(Hero*)spr; + if (val < 0) + --*(Hero*)spr; + } +} + void CGE2Engine::snGhost(Bitmap *bmp) { V2D p(this, *bmp->_v & 0xFFFF, *bmp->_v >> 16); bmp->hide(p.x, p.y); |