From 12c531284b4108ce1935982a924971339bec188a Mon Sep 17 00:00:00 2001 From: uruk Date: Mon, 9 Jun 2014 23:54:45 +0200 Subject: CGE2: Implement a couple of command handling functions. --- engines/cge2/snail.cpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'engines') diff --git a/engines/cge2/snail.cpp b/engines/cge2/snail.cpp index d41aa80aa7..3af4c88d37 100644 --- a/engines/cge2/snail.cpp +++ b/engines/cge2/snail.cpp @@ -422,7 +422,13 @@ void CGE2Engine::snGive(Sprite *spr, int val) { } void CGE2Engine::snGoto(Sprite *spr, int val) { - warning("STUB: CGE2Engine::snGoto()"); + if (spr) { + V3D eye = *_eye; + if (spr->_scene > 0) + setEye(*_eyeTab[spr->_scene]); + spr->gotoxyz(*_point[val]); + setEye(eye); + } } void CGE2Engine::snMove(Sprite *spr, V3D pos) { @@ -446,7 +452,11 @@ void CGE2Engine::snMouse(int val) { } void CGE2Engine::snNNext(Sprite *spr, Action act, int val) { - warning("STUB: CGE2Engine::snNNext()"); + if (spr) { + if (val > 255) + val = spr->labVal(act, val >> 8); + spr->_actionCtrl[act]._ptr = val; + } } void CGE2Engine::snRNNext(Sprite *spr, int val) { @@ -466,7 +476,8 @@ void CGE2Engine::snRmNear(Sprite *spr) { } void CGE2Engine::snRmMTake(Sprite *spr) { - warning("STUB: CGE2Engine::snRmMTake()"); + if (spr) + spr->_actionCtrl[kMTake]._cnt = 0; } void CGE2Engine::snRmFTake(Sprite *spr) { -- cgit v1.2.3