aboutsummaryrefslogtreecommitdiff
path: root/engines/cruise
diff options
context:
space:
mode:
authorChris Apers2007-05-01 09:53:27 +0000
committerChris Apers2007-05-01 09:53:27 +0000
commitc72f840c77ebd96abd6e376da206d2e0249e23db (patch)
tree1d58a530b3e6576fe98e4ed25418f31ba8daaee9 /engines/cruise
parent3aee6e3f8e50f249ad2a57d348c8bc6b5a50d45a (diff)
downloadscummvm-rg350-c72f840c77ebd96abd6e376da206d2e0249e23db.tar.gz
scummvm-rg350-c72f840c77ebd96abd6e376da206d2e0249e23db.tar.bz2
scummvm-rg350-c72f840c77ebd96abd6e376da206d2e0249e23db.zip
Fixed PalmOS ARM global object allocation
svn-id: r26697
Diffstat (limited to 'engines/cruise')
-rw-r--r--engines/cruise/cruise.cpp8
-rw-r--r--engines/cruise/vars.cpp4
-rw-r--r--engines/cruise/vars.h5
3 files changed, 17 insertions, 0 deletions
diff --git a/engines/cruise/cruise.cpp b/engines/cruise/cruise.cpp
index ccb89ce049..3704842019 100644
--- a/engines/cruise/cruise.cpp
+++ b/engines/cruise/cruise.cpp
@@ -45,6 +45,11 @@ Common::SaveFileManager * g_saveFileMan;
CruiseEngine *g_cruise;
CruiseEngine::CruiseEngine(OSystem * syst) : Engine(syst) {
+
+#ifdef PALMOS_MODE
+ _currentVolumeFile = new Common::File();
+#endif
+
Common::addSpecialDebugLevel(kCruiseDebugScript, "Script",
"Script debug level");
@@ -62,6 +67,9 @@ CruiseEngine::CruiseEngine(OSystem * syst) : Engine(syst) {
}
CruiseEngine::~CruiseEngine() {
+#ifdef PALMOS_MODE
+ delete _currentVolumeFile;
+#endif
}
int CruiseEngine::init() {
diff --git a/engines/cruise/vars.cpp b/engines/cruise/vars.cpp
index f37595afa2..daee27e2d1 100644
--- a/engines/cruise/vars.cpp
+++ b/engines/cruise/vars.cpp
@@ -64,7 +64,11 @@ int16 main8;
int16 currentDiskNumber = 1;
+#ifdef PALMOS_MODE
+Common::File *_currentVolumeFile;
+#else
Common::File currentVolumeFile;
+#endif
int16 currentCursor;
diff --git a/engines/cruise/vars.h b/engines/cruise/vars.h
index 31ec0365f6..7f66ed389f 100644
--- a/engines/cruise/vars.h
+++ b/engines/cruise/vars.h
@@ -190,7 +190,12 @@ extern int16 main8;
extern int16 currentDiskNumber;
+#ifdef PALMOS_MODE
+extern Common::File *_currentVolumeFile;
+#define currentVolumeFile (*_currentVolumeFile)
+#else
extern Common::File currentVolumeFile;
+#endif
extern int16 currentCursor;