aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/he/moonbase
diff options
context:
space:
mode:
Diffstat (limited to 'engines/scumm/he/moonbase')
-rw-r--r--engines/scumm/he/moonbase/moonbase.cpp1
-rw-r--r--engines/scumm/he/moonbase/moonbase.h5
-rw-r--r--engines/scumm/he/moonbase/moonbase_fow.cpp12
3 files changed, 17 insertions, 1 deletions
diff --git a/engines/scumm/he/moonbase/moonbase.cpp b/engines/scumm/he/moonbase/moonbase.cpp
index a07a874b48..57a2efa117 100644
--- a/engines/scumm/he/moonbase/moonbase.cpp
+++ b/engines/scumm/he/moonbase/moonbase.cpp
@@ -21,6 +21,7 @@
*/
#include "scumm/he/intern_he.h"
+#include "scumm/he/moonbase/moonbase.h"
namespace Scumm {
diff --git a/engines/scumm/he/moonbase/moonbase.h b/engines/scumm/he/moonbase/moonbase.h
index e50337ddeb..c312ddd758 100644
--- a/engines/scumm/he/moonbase/moonbase.h
+++ b/engines/scumm/he/moonbase/moonbase.h
@@ -25,6 +25,8 @@
#ifdef ENABLE_HE
+#include "common/winexe_pe.h"
+
namespace Scumm {
class Moonbase {
@@ -86,6 +88,9 @@ private:
bool _fowBlackMode;
int _fowRenderTable[32768];
+
+ Common::PEResources _exe;
+ Common::String _fileName;
};
#endif
diff --git a/engines/scumm/he/moonbase/moonbase_fow.cpp b/engines/scumm/he/moonbase/moonbase_fow.cpp
index f76bebf89e..e907449f13 100644
--- a/engines/scumm/he/moonbase/moonbase_fow.cpp
+++ b/engines/scumm/he/moonbase/moonbase_fow.cpp
@@ -21,7 +21,9 @@
*/
#include "common/config-manager.h"
+
#include "scumm/he/intern_he.h"
+#include "scumm/he/moonbase/moonbase.h"
namespace Scumm {
@@ -108,10 +110,18 @@ bool Moonbase::setFOWImage(int image) {
// PIECES BUBBLES CIRCLES SIMPLE* WEDGEY BUBBLE2
// WEDGE2 SPIKEY ANGLES SMOOTHED WUZZY SYS7-BEVELED
- if (image >= -1 && image <= 12)
+ if (image >= -12 && image <= -1)
resType = 210 - image; // 211-222 range
else
resType = 214; // default, SIMPLE
+
+ if (_fileName.empty()) { // We are running for the first time
+ _fileName = _vm->generateFilename(-3);
+
+ if (!_exe.loadFromEXE(_fileName))
+ error("Cannot open file %s", _fileName.c_str());
+ }
+
#if 0 // TODO
HRSRC hResource = FindResource(g_hInst, resType, 10);
if (hResource) {