aboutsummaryrefslogtreecommitdiff
path: root/engines/cge2/snail.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/cge2/snail.cpp')
-rw-r--r--engines/cge2/snail.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/engines/cge2/snail.cpp b/engines/cge2/snail.cpp
index bf9108df26..f8664b4ea0 100644
--- a/engines/cge2/snail.cpp
+++ b/engines/cge2/snail.cpp
@@ -559,7 +559,8 @@ void CGE2Engine::snWalk(Sprite *spr, int val) {
}
void CGE2Engine::snReach(Sprite *spr, int val) {
- warning("STUB: CGE2Engine::snReach()");
+ if (isHero(spr))
+ ((Hero *)spr)->reach(val);
}
void CGE2Engine::snSound(Sprite *spr, int wav) {
@@ -647,7 +648,20 @@ void CommandHandler::addCallback(CommandType com, int ref, int val, CallbackType
}
void CommandHandler::insertCommand(CommandType com, int ref, int val, void *ptr) {
- warning("STUB: CommandHandler::insertCommand()");
+ if (ref == -2)
+ ref = 142 - _vm->_sex;
+ --_tail;
+ Command *tailCmd = &_commandList[_tail];
+ tailCmd->_commandType = com;
+ tailCmd->_ref = ref;
+ tailCmd->_val = val;
+ tailCmd->_spritePtr = ptr;
+ tailCmd->_cbType = kNullCB;
+ if (com == kCmdClear) {
+ _tail = _head;
+ _vm->killText();
+ _timerExpiry = 0;
+ }
}
bool CommandHandler::idle() {