Skip to content

Commit

Permalink
DM: Add InventoryMan, G0041_s_Graphic562_Box_ViewportFloppyZzzCross
Browse files Browse the repository at this point in the history
  • Loading branch information
Bendegúz Nagy committed Aug 26, 2016
1 parent 7782754 commit f4f4c86
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 1 deletion.
4 changes: 4 additions & 0 deletions engines/dm/dm.cpp
Expand Up @@ -19,6 +19,7 @@
#include "champion.h"
#include "loadsave.h"
#include "objectman.h"
#include "inventory.h"

namespace DM {

Expand Down Expand Up @@ -51,6 +52,7 @@ DMEngine::DMEngine(OSystem *syst) : Engine(syst), _console(nullptr) {
_championMan = nullptr;
_loadsaveMan = nullptr;
_objectMan = nullptr;
_inventoryMan = nullptr;
_stopWaitingForPlayerInput = false;
_gameTimeTicking = false;

Expand All @@ -70,6 +72,7 @@ DMEngine::~DMEngine() {
delete _championMan;
delete _loadsaveMan;
delete _objectMan;
delete _inventoryMan;

// clear debug channels
DebugMan.clearAllDebugChannels();
Expand Down Expand Up @@ -146,6 +149,7 @@ Common::Error DMEngine::run() {
_championMan = new ChampionMan(this);
_loadsaveMan = new LoadsaveMan(this);
_objectMan = new ObjectMan(this);
_inventoryMan = new InventoryMan(this);
_displayMan->setUpScreens(320, 200);

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


enum direction {
Expand Down Expand Up @@ -101,6 +102,7 @@ class DMEngine : public Engine {
ChampionMan *_championMan;
LoadsaveMan *_loadsaveMan;
ObjectMan *_objectMan;
InventoryMan *_inventoryMan;
bool _stopWaitingForPlayerInput; // G0321_B_StopWaitingForPlayerInput
bool _gameTimeTicking; // @ G0301_B_GameTimeTicking
bool _restartGameAllowed; // @ G0524_B_RestartGameAllowed
Expand Down
11 changes: 11 additions & 0 deletions engines/dm/inventory.cpp
@@ -0,0 +1,11 @@
#include "inventory.h"



namespace DM {

Viewport gViewportFloppyZzzCross = {174, 2}; // @ G0041_s_Graphic562_Box_ViewportFloppyZzzCross

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

}
14 changes: 14 additions & 0 deletions engines/dm/inventory.h
@@ -0,0 +1,14 @@
#include "dm.h"
#include "gfx.h"



namespace DM {

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

}
3 changes: 2 additions & 1 deletion engines/dm/module.mk
Expand Up @@ -9,7 +9,8 @@ MODULE_OBJS := \
menus.o \
champion.o \
loadsave.o \
objectman.o
objectman.o \
inventory.o

MODULE_DIRS += \
engines/dm
Expand Down

0 comments on commit f4f4c86

Please sign in to comment.