aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2016-03-15 11:03:50 +0100
committerEugene Sandulenko2016-03-15 11:27:49 +0100
commit53806622fc5a0aecdc0c950b73f07e962f082432 (patch)
tree15130b27f1eed1c67b2a2b5f9420207c968e29e5
parent2762e693ff5d415030e39c8e72caed1131a56da4 (diff)
downloadscummvm-rg350-53806622fc5a0aecdc0c950b73f07e962f082432.tar.gz
scummvm-rg350-53806622fc5a0aecdc0c950b73f07e962f082432.tar.bz2
scummvm-rg350-53806622fc5a0aecdc0c950b73f07e962f082432.zip
WAGE: Added engine debugger stub
-rw-r--r--engines/wage/debugger.cpp47
-rw-r--r--engines/wage/debugger.h46
-rw-r--r--engines/wage/module.mk1
3 files changed, 94 insertions, 0 deletions
diff --git a/engines/wage/debugger.cpp b/engines/wage/debugger.cpp
new file mode 100644
index 0000000000..f4444f8f55
--- /dev/null
+++ b/engines/wage/debugger.cpp
@@ -0,0 +1,47 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * 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/file.h"
+#include "wage/wage.h"
+#include "wage/debugger.h"
+#include "wage/entities.h"
+#include "wage/world.h"
+
+namespace Wage {
+
+Debugger::Debugger(WageEngine *vm) : GUI::Debugger(), _vm(vm) {
+ registerCmd("continue", WRAP_METHOD(Debugger, cmdExit));
+ registerCmd("scenes", WRAP_METHOD(Debugger, Cmd_ListScenes));
+}
+
+Debugger::~Debugger() {
+}
+
+bool Debugger::Cmd_ListScenes(int argc, const char **argv) {
+ for (uint i = 0; i < _vm->_world->_orderedScenes.size(); i++) {
+ debugPrintf("%d: %s\n", i, _vm->_world->_orderedScenes[i]->_name.c_str());
+ }
+
+ return true;
+}
+
+} // End of namespace Wage
diff --git a/engines/wage/debugger.h b/engines/wage/debugger.h
new file mode 100644
index 0000000000..e1d3b1c416
--- /dev/null
+++ b/engines/wage/debugger.h
@@ -0,0 +1,46 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * 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.
+ *
+ */
+
+#ifndef WAGE_DEBUGGER_H
+#define WAGE_DEBUGGER_H
+
+#include "common/scummsys.h"
+#include "gui/debugger.h"
+
+namespace Wage {
+
+class WageEngine;
+
+class Debugger : public GUI::Debugger {
+protected:
+ WageEngine *_vm;
+
+ bool Cmd_ListScenes(int argc, const char **argv);
+
+public:
+ Debugger(WageEngine *vm);
+ virtual ~Debugger();
+};
+
+} // End of namespace Wage
+
+#endif
diff --git a/engines/wage/module.mk b/engines/wage/module.mk
index 548e440c28..21316bbf83 100644
--- a/engines/wage/module.mk
+++ b/engines/wage/module.mk
@@ -2,6 +2,7 @@ MODULE := engines/wage
MODULE_OBJS := \
combat.o \
+ debugger.o \
design.o \
detection.o \
dialog.o \