Added now required palm_main(...) function

svn-id: r21799
This commit is contained in:
Chris Apers 2006-04-11 18:08:51 +00:00
parent cbe570756b
commit d32320da0f
2 changed files with 58 additions and 3 deletions

View File

@ -91,6 +91,31 @@ void run(int argc, char *argv[]) {
#else
#include "stdafx.h"
#include "base/main.h"
#include "be_zodiac.h"
#include "be_os5ex.h"
static void palm_main(int argc, char **argvP) {
#ifdef COMPILE_OS5
if (gVars->advancedMode)
g_system = new OSystem_PalmOS5Ex();
else
g_system = new OSystem_PalmOS5();
#elif defined(COMPILE_ZODIAC)
g_system = new OSystem_PalmZodiac();
#else
#error "No target defined."
#endif
assert(g_system);
// Invoke the actual ScummVM main entry point:
scummvm_main(argc, argvP);
g_system->quit(); // TODO: Consider removing / replacing this!
}
void run(int argc, char *argv[]) {
MathlibInit();
@ -119,7 +144,7 @@ void run(int argc, char *argv[]) {
// be sure to have a VG
void *__ptr = StuffsForceVG();
DO_EXIT( main(argc, argv); )
DO_EXIT( palm_main(argc, argv); )
// be sure to release features memory
FREE_FTR(ftrBufferOverlay)

View File

@ -37,10 +37,41 @@
#include <AdnDebugMgr.h>
//#define DEBUG_ARM
#include "stdafx.h"
#include "base/main.h"
#include "be_zodiac.h"
#include "be_os5ex.h"
GlobalsDataType g_vars;
GlobalsDataPtr gVars = &g_vars;
UInt32 g_stackSize;
static void palm_main(int argc, char **argvP) {
#ifdef COMPILE_OS5
if (gVars->advancedMode)
g_system = new OSystem_PalmOS5Ex();
else
g_system = new OSystem_PalmOS5();
#elif defined(COMPILE_ZODIAC)
g_system = new OSystem_PalmZodiac();
#else
#error "No target defined."
#endif
assert(g_system);
// Invoke the actual ScummVM main entry point:
extern void initGlobalHashes();
initGlobalHashes();
scummvm_main(argc, argvP);
extern void freeGlobalHashes();
freeGlobalHashes();
g_system->quit(); // TODO: Consider removing / replacing this!
}
static void Go() {
void *tmp;
char **argvP;
@ -76,8 +107,7 @@ static void Go() {
if (HWR_INIT(INIT_VIBRATOR)) gVars->vibrator = RumbleInit();
// run ...
extern int main(int, char **);
DO_EXIT ( main(argc, argvP); )
DO_EXIT ( palm_main(argc, argvP); )
// release
if (HWR_INIT(INIT_VIBRATOR)) RumbleRelease();