diff options
Diffstat (limited to 'engines/agos/subroutine.cpp')
-rw-r--r-- | engines/agos/subroutine.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/engines/agos/subroutine.cpp b/engines/agos/subroutine.cpp index f5aad2dcc8..1e6ecaa829 100644 --- a/engines/agos/subroutine.cpp +++ b/engines/agos/subroutine.cpp @@ -8,20 +8,19 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ - - +#include "common/debug-channels.h" #include "common/file.h" #include "common/textconsole.h" @@ -266,8 +265,8 @@ Common::SeekableReadStream *AGOSEngine::openTablesFile(const char *filename) { } Common::SeekableReadStream *AGOSEngine::openTablesFile_simon1(const char *filename) { - Common::SeekableReadStream *in = _archives.createReadStreamForMember(filename); - if (!in) + Common::File *in = new Common::File(); + if (!in->open(filename)) error("openTablesFile: Can't open '%s'", filename); return in; } @@ -531,7 +530,7 @@ int AGOSEngine::startSubroutine(Subroutine *sub) { _classMode1 = 0; _classMode2 = 0; - if (_dumpScripts) + if (DebugMan.isDebugChannelEnabled(kDebugSubroutine)) dumpSubroutine(sub); if (++_recursionDepth > 40) @@ -564,8 +563,7 @@ restart: else _codePtr += 8; - if (_dumpOpcodes) - debug("; %d", sub->id); + debugC(kDebugOpcode, "; %d", sub->id); result = runScript(); if (result != 0) { break; |