aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/he/resource_he.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/scumm/he/resource_he.cpp')
-rw-r--r--engines/scumm/he/resource_he.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/engines/scumm/he/resource_he.cpp b/engines/scumm/he/resource_he.cpp
index ddde352686..0d2c6f5365 100644
--- a/engines/scumm/he/resource_he.cpp
+++ b/engines/scumm/he/resource_he.cpp
@@ -35,6 +35,7 @@
#include "common/archive.h"
#include "common/memstream.h"
#include "common/system.h"
+#include "common/winexe_pe.h"
namespace Scumm {
@@ -114,13 +115,18 @@ void ResExtractor::setCursor(int id) {
Win32ResExtractor::Win32ResExtractor(ScummEngine_v70he *scumm) : ResExtractor(scumm) {
+ _exe = new Common::PEResources();
+}
+
+Win32ResExtractor::~Win32ResExtractor() {
+ delete _exe;
}
bool Win32ResExtractor::extractResource(int id, CachedCursor *cc) {
if (_fileName.empty()) { // We are running for the first time
_fileName = _vm->generateFilename(-3);
- if (!_exe.loadFromEXE(_fileName))
+ if (!_exe->loadFromEXE(_fileName))
error("Cannot open file %s", _fileName.c_str());
}