Fixed PalmOS ARM global object allocation

svn-id: r26697
This commit is contained in:
Chris Apers 2007-05-01 09:53:27 +00:00
parent 3aee6e3f8e
commit c72f840c77
3 changed files with 17 additions and 0 deletions

View File

@ -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() {

View File

@ -64,7 +64,11 @@ int16 main8;
int16 currentDiskNumber = 1;
#ifdef PALMOS_MODE
Common::File *_currentVolumeFile;
#else
Common::File currentVolumeFile;
#endif
int16 currentCursor;

View File

@ -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;