SCUMM HE: Fix compiling with HE v71+ disabled.

This commit is contained in:
Little Cat 2024-05-05 01:04:14 -03:00 committed by Eugene Sandulenko
parent 267bfc9d03
commit 4d3f6b7064
3 changed files with 8 additions and 0 deletions

View File

@ -47,7 +47,9 @@ class Moonbase;
#endif
class ScummEngine_v60he : public ScummEngine_v6 {
#ifdef ENABLE_HE
friend class Moonbase;
#endif
protected:
enum SubOpType {
SO_ACTOR_DEFAULT_CLIPPED = 30,
@ -77,8 +79,10 @@ public:
void setHETimer(int timer);
void pauseHETimers(bool pause);
#ifdef ENABLE_HE
public:
Moonbase *_moonbase;
#endif
public:
ScummEngine_v60he(OSystem *syst, const DetectorResult &dr);

View File

@ -188,11 +188,13 @@ Common::String ScummEngine_v60he::convertSavePathOld(const byte *src) {
}
Common::SeekableReadStream *ScummEngine_v60he::openFileForReading(const byte *fileName) {
#ifdef ENABLE_HE
if (_moonbase) {
Common::SeekableReadStream *substitutedFile = _moonbase->_map->substituteFile(fileName);
if (substitutedFile)
return substitutedFile;
}
#endif
Common::SeekableReadStream *saveFile = openSaveFileForReading(fileName);
if (saveFile)

View File

@ -649,7 +649,9 @@ ScummEngine_v6::ScummEngine_v6(OSystem *syst, const DetectorResult &dr)
ScummEngine_v60he::ScummEngine_v60he(OSystem *syst, const DetectorResult &dr)
: ScummEngine_v6(syst, dr) {
#ifdef ENABLE_HE
_moonbase = 0;
#endif
memset(_hInFileTable, 0, sizeof(_hInFileTable));
memset(_hOutFileTable, 0, sizeof(_hOutFileTable));