aboutsummaryrefslogtreecommitdiff
path: root/saga/sfuncs.cpp
diff options
context:
space:
mode:
authorTorbjörn Andersson2004-12-03 19:15:44 +0000
committerTorbjörn Andersson2004-12-03 19:15:44 +0000
commitc64c7eb4d4edd087031603df446abf271f616480 (patch)
treedcd747faca1c7f8d8fc0a9ba42a1bf1d076e83a7 /saga/sfuncs.cpp
parent2cfdcb5a59dec0e66e81dc91be142224156de473 (diff)
downloadscummvm-rg350-c64c7eb4d4edd087031603df446abf271f616480.tar.gz
scummvm-rg350-c64c7eb4d4edd087031603df446abf271f616480.tar.bz2
scummvm-rg350-c64c7eb4d4edd087031603df446abf271f616480.zip
First pass at migrating from the old Reinherit console to the ScummVM
console. Some things are likely to have broken. For instance, I believe the old console was could be visible during gameplay, while ScummVM's is modal. So any place where we output something to the console during gameplay should probably be removed. Some things I've stubbed out. Basically any code that registers a variable. Most of the debugging commands are untested. Syntax may have changed because of different command-line parsing. (I never actually used the old console, so I don't know for sure. :-) Actually, I'm not that interested in reproducing the old console commands faithfully. What we should do now is to make the immediately useful console stuff work. Anything that remains unimplemented should probably be removed. svn-id: r15976
Diffstat (limited to 'saga/sfuncs.cpp')
-rw-r--r--saga/sfuncs.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/saga/sfuncs.cpp b/saga/sfuncs.cpp
index 398d075e13..ade1c34114 100644
--- a/saga/sfuncs.cpp
+++ b/saga/sfuncs.cpp
@@ -219,7 +219,7 @@ int Script::SF_actorWalkTo(SCRIPTFUNC_PARAMS) {
actor_id = _vm->_sdata->readWordS(actor_parm);
actor_idx = _vm->_actor->getActorIndex(actor_id);
if (actor_idx < 0) {
- _vm->_console->print(S_WARN_PREFIX "SF.08: Actor id 0x%X not found.", actor_id);
+ _vm->_console->DebugPrintf(S_WARN_PREFIX "SF.08: Actor id 0x%X not found.\n", actor_id);
return FAILURE;
}
@@ -262,7 +262,7 @@ int Script::SF_setFacing(SCRIPTFUNC_PARAMS) {
orientation = _vm->_sdata->readWordS(orient_parm);
actor_idx = _vm->_actor->getActorIndex(actor_id);
if (actor_idx < 0) {
- _vm->_console->print(S_WARN_PREFIX "SF.08: Actor id 0x%X not found.", actor_id);
+ _vm->_console->DebugPrintf(S_WARN_PREFIX "SF.08: Actor id 0x%X not found.\n", actor_id);
return FAILURE;
}
@@ -468,7 +468,7 @@ int Script::SF_startAnim(SCRIPTFUNC_PARAMS) {
anim_id = _vm->_sdata->readWordS(anim_id_parm);
if (_vm->_anim->play(anim_id, 0) != SUCCESS) {
- _vm->_console->print(S_WARN_PREFIX "SF.26: Anim::play() failed. Anim id: %u\n", anim_id);
+ _vm->_console->DebugPrintf(S_WARN_PREFIX "SF.26: Anim::play() failed. Anim id: %u\n", anim_id);
return FAILURE;
}
@@ -495,7 +495,7 @@ int Script::SF_actorWalkToAsync(SCRIPTFUNC_PARAMS) {
actor_id = _vm->_sdata->readWordS(actor_parm);
actor_idx = _vm->_actor->getActorIndex(actor_id);
if (actor_idx < 0) {
- _vm->_console->print(S_WARN_PREFIX "SF.08: Actor id 0x%X not found.",
+ _vm->_console->DebugPrintf(S_WARN_PREFIX "SF.08: Actor id 0x%X not found.\n",
actor_id);
return FAILURE;
}
@@ -551,7 +551,7 @@ int Script::SF_moveTo(SCRIPTFUNC_PARAMS) {
if (!_vm->_actor->actorExists(actor_id)) {
result = _vm->_actor->create(actor_id, pt.x, pt.y);
if (result != SUCCESS) {
- _vm->_console->print(S_WARN_PREFIX "SF.30: Couldn't create actor 0x%X.", actor_id);
+ _vm->_console->DebugPrintf(S_WARN_PREFIX "SF.30: Couldn't create actor 0x%X.\n", actor_id);
return FAILURE;
}
} else {
@@ -646,7 +646,7 @@ int Script::SF_actorWalk(SCRIPTFUNC_PARAMS) {
actor_idx = _vm->_actor->getActorIndex(_vm->_sdata->readWordS(actor_parm));
if (actor_idx < 0) {
- _vm->_console->print(S_WARN_PREFIX "SF.36: Actor id 0x%X not found.", (int)actor_parm);
+ _vm->_console->DebugPrintf(S_WARN_PREFIX "SF.36: Actor id 0x%X not found.\n", (int)actor_parm);
return FAILURE;
}
@@ -688,7 +688,7 @@ int Script::SF_cycleActorFrames(SCRIPTFUNC_PARAMS) {
actor_idx = _vm->_actor->getActorIndex(actor_id);
if (_vm->_actor->setAction(actor_idx, action, ACTION_NONE) != SUCCESS) {
- _vm->_console->print(S_WARN_PREFIX "SF.37: Actor::setAction() failed.");
+ _vm->_console->DebugPrintf(S_WARN_PREFIX "SF.37: Actor::setAction() failed.\n");
return FAILURE;
}
@@ -720,7 +720,7 @@ int Script::SF_setFrame(SCRIPTFUNC_PARAMS) {
actor_idx = _vm->_actor->getActorIndex(actor_id);
if (_vm->_actor->setAction(actor_idx, action, ACTION_NONE) != SUCCESS) {
- _vm->_console->print(S_WARN_PREFIX "SF.38: Actor::setAction() failed.");
+ _vm->_console->DebugPrintf(S_WARN_PREFIX "SF.38: Actor::setAction() failed.\n");
return FAILURE;
}
@@ -768,7 +768,7 @@ int Script::SF_linkAnim(SCRIPTFUNC_PARAMS) {
anim_id2 = _vm->_sdata->readWordU(anim2_parm);
if (_vm->_anim->link(anim_id1, anim_id2) != SUCCESS) {
- _vm->_console->print(S_WARN_PREFIX "SF.41: Anim::link() failed. (%u->%u)\n", anim_id1, anim_id2);
+ _vm->_console->DebugPrintf(S_WARN_PREFIX "SF.41: Anim::link() failed. (%u->%u)\n", anim_id1, anim_id2);
return FAILURE;
}
@@ -824,7 +824,7 @@ int Script::SF_placeActor(SCRIPTFUNC_PARAMS) {
if (!_vm->_actor->actorExists(actor_id)) {
result = _vm->_actor->create(actor_id, pt.x, pt.y);
if (result != SUCCESS) {
- _vm->_console->print(S_WARN_PREFIX "SF.43: Couldn't create actor 0x%X.", actor_id);
+ _vm->_console->DebugPrintf(S_WARN_PREFIX "SF.43: Couldn't create actor 0x%X.\n", actor_id);
return FAILURE;
}
} else {