Skip to content

Commit

Permalink
SCUMM HE: Moved Moonbase to ScummEngine_v100he
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed May 26, 2016
1 parent edb8e68 commit 36526cb
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 13 deletions.
3 changes: 2 additions & 1 deletion engines/scumm/he/intern_he.h
Expand Up @@ -591,7 +591,8 @@ class ScummEngine_v100he : public ScummEngine_v99he {

byte _debugInputBuffer[256];
public:
ScummEngine_v100he(OSystem *syst, const DetectorResult &dr) : ScummEngine_v99he(syst, dr) {}
ScummEngine_v100he(OSystem *syst, const DetectorResult &dr);
~ScummEngine_v100he();

virtual void resetScumm();

Expand Down
2 changes: 1 addition & 1 deletion engines/scumm/he/moonbase/moonbase.cpp
Expand Up @@ -26,7 +26,7 @@

namespace Scumm {

Moonbase::Moonbase(ScummEngine_v90he *vm) : _vm(vm) {
Moonbase::Moonbase(ScummEngine_v100he *vm) : _vm(vm) {
initFOW();

_ai = new AI(_vm);
Expand Down
4 changes: 2 additions & 2 deletions engines/scumm/he/moonbase/moonbase.h
Expand Up @@ -33,7 +33,7 @@ class AI;

class Moonbase {
public:
Moonbase(ScummEngine_v90he *vm);
Moonbase(ScummEngine_v100he *vm);
~Moonbase();

int readFromArray(int array, int y, int x);
Expand Down Expand Up @@ -71,7 +71,7 @@ class Moonbase {
AI *_ai;

private:
ScummEngine_v90he *_vm;
ScummEngine_v100he *_vm;

int _fowFrameBaseNumber;
int _fowAnimationFrames;
Expand Down
23 changes: 14 additions & 9 deletions engines/scumm/scumm.cpp
Expand Up @@ -885,7 +885,20 @@ ScummEngine_v90he::ScummEngine_v90he(OSystem *syst, const DetectorResult &dr)

VAR_U32_VERSION = 0xFF;
VAR_U32_ARRAY_UNK = 0xFF;
}

ScummEngine_v90he::~ScummEngine_v90he() {
delete _moviePlay;
delete _sprite;
if (_game.heversion >= 98) {
delete _logicHE;
}
if (_game.heversion >= 99) {
free(_hePalettes);
}
}

ScummEngine_v100he::ScummEngine_v100he(OSystem *syst, const DetectorResult &dr) : ScummEngine_v99he(syst, dr) {
/* Moonbase stuff */
_moonbase = 0;

Expand All @@ -900,15 +913,7 @@ ScummEngine_v90he::ScummEngine_v90he(OSystem *syst, const DetectorResult &dr)
VAR_U32_USER_VAR_F = 0xFF;
}

ScummEngine_v90he::~ScummEngine_v90he() {
delete _moviePlay;
delete _sprite;
if (_game.heversion >= 98) {
delete _logicHE;
}
if (_game.heversion >= 99) {
free(_hePalettes);
}
ScummEngine_v100he::~ScummEngine_v100he() {
delete _moonbase;
}

Expand Down

0 comments on commit 36526cb

Please sign in to comment.