aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/dm/dialog.cpp36
-rw-r--r--engines/dm/dialog.h39
-rw-r--r--engines/dm/dm.cpp4
-rw-r--r--engines/dm/dm.h2
-rw-r--r--engines/dm/dungeonman.cpp3
-rw-r--r--engines/dm/module.mk1
6 files changed, 84 insertions, 1 deletions
diff --git a/engines/dm/dialog.cpp b/engines/dm/dialog.cpp
new file mode 100644
index 0000000000..87bf7d5705
--- /dev/null
+++ b/engines/dm/dialog.cpp
@@ -0,0 +1,36 @@
+/* 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.
+*
+*/
+
+/*
+* Based on the Reverse Engineering work of Christophe Fontanel,
+* maintainer of the Dungeon Master Encyclopaedia (http://dmweb.free.fr/)
+*/
+
+#include "dialog.h"
+
+
+namespace DM {
+
+DialogMan::DialogMan(DMEngine* vm): _vm(vm) {}
+
+
+} \ No newline at end of file
diff --git a/engines/dm/dialog.h b/engines/dm/dialog.h
new file mode 100644
index 0000000000..1cd5a6f441
--- /dev/null
+++ b/engines/dm/dialog.h
@@ -0,0 +1,39 @@
+/* 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.
+*
+*/
+
+/*
+* Based on the Reverse Engineering work of Christophe Fontanel,
+* maintainer of the Dungeon Master Encyclopaedia (http://dmweb.free.fr/)
+*/
+
+#include "dm.h"
+
+
+namespace DM {
+
+class DialogMan {
+ DMEngine *_vm;
+public:
+ explicit DialogMan(DMEngine *vm);
+};
+
+} \ No newline at end of file
diff --git a/engines/dm/dm.cpp b/engines/dm/dm.cpp
index 55a2b6e055..e7bb4a704d 100644
--- a/engines/dm/dm.cpp
+++ b/engines/dm/dm.cpp
@@ -54,6 +54,7 @@
#include "group.h"
#include "timeline.h"
#include "projexpl.h"
+#include "dialog.h"
namespace DM {
void warning(bool repeat, const char* s, ...) {
@@ -147,6 +148,7 @@ DMEngine::DMEngine(OSystem *syst) : Engine(syst), _console(nullptr) {
_groupMan = nullptr;
_timeline = nullptr;
_projexpl = nullptr;
+ _displayMan = nullptr;
_g528_saveFormat = 0;
_g527_platform = 0;
@@ -197,6 +199,7 @@ DMEngine::~DMEngine() {
delete _groupMan;
delete _timeline;
delete _projexpl;
+ delete _dialog;
// clear debug channels
DebugMan.clearAllDebugChannels();
@@ -315,6 +318,7 @@ Common::Error DMEngine::run() {
_groupMan = new GroupMan(this);
_timeline = new Timeline(this);
_projexpl = new ProjExpl(this);
+ _dialog = new DialogMan(this);
_displayMan->setUpScreens(320, 200);
f463_initializeGame();
diff --git a/engines/dm/dm.h b/engines/dm/dm.h
index 653afb581f..4d48c94c83 100644
--- a/engines/dm/dm.h
+++ b/engines/dm/dm.h
@@ -52,6 +52,7 @@ class MovesensMan;
class GroupMan;
class Timeline;
class ProjExpl;
+class DialogMan;
void warning(bool repeat, const char *s, ...);
@@ -243,6 +244,7 @@ public:
GroupMan *_groupMan;
Timeline *_timeline;
ProjExpl *_projexpl;
+ DialogMan *_dialog;
int16 _g298_newGame; // @ G0298_B_NewGame
diff --git a/engines/dm/dungeonman.cpp b/engines/dm/dungeonman.cpp
index 956232bcd7..6f13c9bf63 100644
--- a/engines/dm/dungeonman.cpp
+++ b/engines/dm/dungeonman.cpp
@@ -536,7 +536,8 @@ const Thing Thing::_explRebirthStep2(0xFFE5); // @ C0xFFE5_THING_EXPLOSION_REBIR
const Thing Thing::_party(0xFFFF); // @ C0xFFFF_THING_PARTY
void DungeonMan::f434_loadDungeonFile() {
- if (_vm->_g298_newGame)
+
+ if(!_rawDunFileData)
f455_decompressDungeonFile();
Common::MemoryReadStream dunDataStream(_rawDunFileData, _rawDunFileDataSize, DisposeAfterUse::NO);
diff --git a/engines/dm/module.mk b/engines/dm/module.mk
index 50a8364cd4..75b4385421 100644
--- a/engines/dm/module.mk
+++ b/engines/dm/module.mk
@@ -31,6 +31,7 @@ MODULE := engines/dm
MODULE_OBJS := \
champion.o \
detection.o \
+ dialog.o \
dm.o \
dmglobals.o \
dungeonman.o \