Skip to content

Commit

Permalink
DM: Add MovesensMan
Browse files Browse the repository at this point in the history
  • Loading branch information
Bendegúz Nagy committed Aug 26, 2016
1 parent 23e0dfc commit 4b67e04
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 2 deletions.
6 changes: 5 additions & 1 deletion engines/dm/dm.cpp
Expand Up @@ -48,6 +48,7 @@
#include "objectman.h"
#include "inventory.h"
#include "text.h"
#include "movesens.h"

namespace DM {

Expand Down Expand Up @@ -83,7 +84,8 @@ DMEngine::DMEngine(OSystem *syst) : Engine(syst), _console(nullptr) {
_objectMan = nullptr;
_inventoryMan = nullptr;
_textMan = nullptr;

_movsens = nullptr;

_stopWaitingForPlayerInput = false;
_gameTimeTicking = false;
_restartGameAllowed = false;
Expand Down Expand Up @@ -111,6 +113,7 @@ DMEngine::~DMEngine() {
delete _objectMan;
delete _inventoryMan;
delete _textMan;
delete _movsens;

// clear debug channels
DebugMan.clearAllDebugChannels();
Expand Down Expand Up @@ -189,6 +192,7 @@ Common::Error DMEngine::run() {
_objectMan = new ObjectMan(this);
_inventoryMan = new InventoryMan(this);
_textMan = new TextMan(this);
_movsens = new MovesensMan(this);
_displayMan->setUpScreens(320, 200);

initializeGame(); // @ F0463_START_InitializeGame_CPSADEF
Expand Down
2 changes: 2 additions & 0 deletions engines/dm/dm.h
Expand Up @@ -45,6 +45,7 @@ class LoadsaveMan;
class ObjectMan;
class InventoryMan;
class TextMan;
class MovesensMan;


enum direction {
Expand Down Expand Up @@ -133,6 +134,7 @@ class DMEngine : public Engine {
ObjectMan *_objectMan;
InventoryMan *_inventoryMan;
TextMan *_textMan;
MovesensMan *_movsens;

bool _stopWaitingForPlayerInput; // G0321_B_StopWaitingForPlayerInput
bool _gameTimeTicking; // @ G0301_B_GameTimeTicking
Expand Down
3 changes: 2 additions & 1 deletion engines/dm/module.mk
Expand Up @@ -39,7 +39,8 @@ MODULE_OBJS := \
loadsave.o \
objectman.o \
inventory.o \
text.o
text.o \
movesens.o

MODULE_DIRS += \
engines/dm
Expand Down
37 changes: 37 additions & 0 deletions engines/dm/movesens.cpp
@@ -0,0 +1,37 @@
/* 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 "movesens.h"


namespace DM {

MovesensMan::MovesensMan(DMEngine* vm) : _vm(vm) {}


}
44 changes: 44 additions & 0 deletions engines/dm/movesens.h
@@ -0,0 +1,44 @@
/* 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/)
*/


#ifndef DM_MOVESENS_H
#define DM_MOVESENS_H

#include "dm.h"

namespace DM {

class MovesensMan {
DMEngine *_vm;
public:
explicit MovesensMan(DMEngine *vm);
};

}

#endif

0 comments on commit 4b67e04

Please sign in to comment.