DM: Add InventoryMan, G0041_s_Graphic562_Box_ViewportFloppyZzzCross

This commit is contained in:
Bendegúz Nagy 2016-06-19 16:17:28 +02:00
parent 7782754d68
commit f4f4c867a4
5 changed files with 33 additions and 1 deletions

View File

@ -19,6 +19,7 @@
#include "champion.h"
#include "loadsave.h"
#include "objectman.h"
#include "inventory.h"
namespace DM {
@ -51,6 +52,7 @@ DMEngine::DMEngine(OSystem *syst) : Engine(syst), _console(nullptr) {
_championMan = nullptr;
_loadsaveMan = nullptr;
_objectMan = nullptr;
_inventoryMan = nullptr;
_stopWaitingForPlayerInput = false;
_gameTimeTicking = false;
@ -70,6 +72,7 @@ DMEngine::~DMEngine() {
delete _championMan;
delete _loadsaveMan;
delete _objectMan;
delete _inventoryMan;
// clear debug channels
DebugMan.clearAllDebugChannels();
@ -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

View File

@ -16,6 +16,7 @@ class MenuMan;
class ChampionMan;
class LoadsaveMan;
class ObjectMan;
class InventoryMan;
enum direction {
@ -101,6 +102,7 @@ public:
ChampionMan *_championMan;
LoadsaveMan *_loadsaveMan;
ObjectMan *_objectMan;
InventoryMan *_inventoryMan;
bool _stopWaitingForPlayerInput; // G0321_B_StopWaitingForPlayerInput
bool _gameTimeTicking; // @ G0301_B_GameTimeTicking
bool _restartGameAllowed; // @ G0524_B_RestartGameAllowed

11
engines/dm/inventory.cpp Normal file
View File

@ -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
engines/dm/inventory.h Normal file
View File

@ -0,0 +1,14 @@
#include "dm.h"
#include "gfx.h"
namespace DM {
class InventoryMan {
DMEngine *_vm;
public:
InventoryMan(DMEngine *vm);
};
}

View File

@ -9,7 +9,8 @@ MODULE_OBJS := \
menus.o \
champion.o \
loadsave.o \
objectman.o
objectman.o \
inventory.o
MODULE_DIRS += \
engines/dm