diff options
author | Eugene Sandulenko | 2004-10-05 02:16:26 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2004-10-05 02:16:26 +0000 |
commit | f1ffeaf3ecebbbb1806645d70b3b745d9da4b7ea (patch) | |
tree | c6c9c5a84ead2ac4d07161f55fd397b7aeae6301 /saga/interface.cpp | |
parent | 53d807ab169572a9991c18cc1373b585a8ec44d8 (diff) | |
download | scummvm-rg350-f1ffeaf3ecebbbb1806645d70b3b745d9da4b7ea.tar.gz scummvm-rg350-f1ffeaf3ecebbbb1806645d70b3b745d9da4b7ea.tar.bz2 scummvm-rg350-f1ffeaf3ecebbbb1806645d70b3b745d9da4b7ea.zip |
o Convert some objectMap methods to more C++-like.
o Add stubs for unhandled scene resources in first scene
o Fix object map entry structure
o Fix bug with objject_info() debug command
All this was done in attempt to make room exits work until I realized that
they are different hit zone list which is activate at end of walk sequence.
svn-id: r15416
Diffstat (limited to 'saga/interface.cpp')
-rw-r--r-- | saga/interface.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/saga/interface.cpp b/saga/interface.cpp index 72d38dc5fa..8ad46fa0a5 100644 --- a/saga/interface.cpp +++ b/saga/interface.cpp @@ -32,6 +32,7 @@ #include "saga/font.h" #include "saga/objectmap.h" #include "saga/rscfile_mod.h" +#include "saga/scene.h" #include "saga/script.h" #include "saga/sprite.h" @@ -492,13 +493,10 @@ int Interface::handlePlayfieldClick(R_SURFACE *ds, Point *imouse_pt) { return R_SUCCESS; } - if (_vm->_objectMap->getFlags(object_num, &object_flags) != R_SUCCESS) { - _vm->_console->print("Invalid object number: %d\n", object_num); - return R_FAILURE; - } + object_flags = _vm->_objectMap->getFlags(object_num); if (object_flags & R_OBJECT_NORMAL) { - if (_vm->_objectMap->getEPNum(object_num, &script_num) == R_SUCCESS) { + if ((script_num = _vm->_objectMap->getEPNum(object_num)) != -1) { // Set active verb in script module _vm->_sdata->putWord(4, 4, I_VerbData[_activeVerb].s_verb); @@ -535,12 +533,9 @@ int Interface::handlePlayfieldUpdate(R_SURFACE *ds, Point *imouse_pt) { return R_SUCCESS; } - if (_vm->_objectMap->getFlags(object_num, &object_flags) != R_SUCCESS) { - _vm->_console->print("Invalid object number: %d\n", object_num); - return R_FAILURE; - } + object_flags = _vm->_objectMap->getFlags(object_num); - _vm->_objectMap->getName(object_num, &object_name); + object_name = _vm->_objectMap->getName(object_num); if (object_flags & R_OBJECT_NORMAL) { // Normal scene object - display as subject of verb |