aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backends/platform/PalmOS/Rsc/Resource.Frk/Starter.rsrcbin53276 -> 53544 bytes
-rw-r--r--backends/platform/PalmOS/Rsc/StarterRsc.h3
-rw-r--r--backends/platform/PalmOS/Src/launcher/app.cpp1
-rw-r--r--backends/platform/PalmOS/Src/launcher/forms/formCards.cpp5
-rw-r--r--backends/platform/PalmOS/Src/launcher/games.cpp8
-rw-r--r--backends/platform/PalmOS/Src/launcher/games.h3
-rw-r--r--backends/platform/PalmOS/Src/launcher/launch.cpp36
-rw-r--r--backends/platform/PalmOS/Src/launcher/start.h1
8 files changed, 48 insertions, 9 deletions
diff --git a/backends/platform/PalmOS/Rsc/Resource.Frk/Starter.rsrc b/backends/platform/PalmOS/Rsc/Resource.Frk/Starter.rsrc
index 026c42d300..f7661a3121 100644
--- a/backends/platform/PalmOS/Rsc/Resource.Frk/Starter.rsrc
+++ b/backends/platform/PalmOS/Rsc/Resource.Frk/Starter.rsrc
Binary files differ
diff --git a/backends/platform/PalmOS/Rsc/StarterRsc.h b/backends/platform/PalmOS/Rsc/StarterRsc.h
index 0f2d7476f2..58a1f79ab0 100644
--- a/backends/platform/PalmOS/Rsc/StarterRsc.h
+++ b/backends/platform/PalmOS/Rsc/StarterRsc.h
@@ -3,7 +3,7 @@
// Header generated by Constructor for Palm OS (R) 1.9.1
//
-// Generated at 20:53:03 on lundi 5 juin 2006
+// Generated at 17:51:34 on dimanche 14 janvier 2007
//
// Generated for file: Starter.rsrc
//
@@ -234,6 +234,7 @@
// Resource: tFRM 1600
#define TabCardConfigForm 1600 //(Left Origin = 0, Top Origin = 0, Width = 160, Height = 110, Usable = 1, Modal = 0, Save Behind = 0, Help ID = 0, Menu Bar ID = 0, Default Button ID = 0)
+#define TabCardConfigDetectCheckbox 1602 //(Left Origin = 4, Top Origin = 86, Width = 150, Height = 12, Usable = 1, Selected = 0, Group ID = 0, Font = Standard)
#define TabCardConfigCacheCheckbox 1604 //(Left Origin = 4, Top Origin = 62, Width = 120, Height = 12, Usable = 1, Selected = 0, Group ID = 0, Font = Standard)
#define TabCardConfigLedCheckbox 1608 //(Left Origin = 4, Top Origin = 50, Width = 130, Height = 12, Usable = 1, Selected = 0, Group ID = 0, Font = Standard)
#define TabCardConfigCacheSizeField 1606 //(Left Origin = 68, Top Origin = 74, Width = 18, Height = 12, Usable = 1, Editable = 1, Underline = 1, Single Line = 1, Dynamic Size = 0, Left Justified = 1, Max Characters = 3, Font = Standard, Auto Shift = 0, Has Scroll Bar = 0, Numeric = 1)
diff --git a/backends/platform/PalmOS/Src/launcher/app.cpp b/backends/platform/PalmOS/Src/launcher/app.cpp
index 784ad935c2..ea028e6b7f 100644
--- a/backends/platform/PalmOS/Src/launcher/app.cpp
+++ b/backends/platform/PalmOS/Src/launcher/app.cpp
@@ -269,6 +269,7 @@ Err AppStart(void) {
gPrefs->card.cacheSize = 4096;
gPrefs->card.useCache = true;
gPrefs->card.showLED = true;
+ gPrefs->card.autoDetect = true;
gPrefs->autoOff = true;
gPrefs->vibrator = RumbleExists();
diff --git a/backends/platform/PalmOS/Src/launcher/forms/formCards.cpp b/backends/platform/PalmOS/Src/launcher/forms/formCards.cpp
index 1c22ea647a..ccb3d09f8a 100644
--- a/backends/platform/PalmOS/Src/launcher/forms/formCards.cpp
+++ b/backends/platform/PalmOS/Src/launcher/forms/formCards.cpp
@@ -191,6 +191,7 @@ static void ConfigTabInit(Boolean update = false) {
FldSetTextHandle(fld1P, cacheH);
CtlSetValue((ControlType *)GetObjectPtr(TabCardConfigCacheCheckbox), gPrefs->card.useCache);
CtlSetValue((ControlType *)GetObjectPtr(TabCardConfigLedCheckbox), gPrefs->card.showLED);
+ CtlSetValue((ControlType *)GetObjectPtr(TabCardConfigDetectCheckbox), gPrefs->card.autoDetect);
// update ? redraw the list
} else {
WinScreenLock(winLockCopy);
@@ -200,7 +201,7 @@ static void ConfigTabInit(Boolean update = false) {
}
static UInt16 ConfigTabSave() {
- ControlType *cckP[2];
+ ControlType *cckP[3];
FieldType *fld1P;
ListPtr listP;
FormPtr frmP;
@@ -208,9 +209,11 @@ static UInt16 ConfigTabSave() {
cckP[0] = (ControlType *)GetObjectPtr(TabCardConfigCacheCheckbox);
cckP[1] = (ControlType *)GetObjectPtr(TabCardConfigLedCheckbox);
+ cckP[2] = (ControlType *)GetObjectPtr(TabCardConfigDetectCheckbox);
gPrefs->card.useCache = CtlGetValue(cckP[0]);
gPrefs->card.showLED = CtlGetValue(cckP[1]);
+ gPrefs->card.autoDetect = CtlGetValue(cckP[2]);
fld1P = (FieldType *)GetObjectPtr(TabCardConfigCacheSizeField);
frmP = FrmGetActiveForm();
diff --git a/backends/platform/PalmOS/Src/launcher/games.cpp b/backends/platform/PalmOS/Src/launcher/games.cpp
index 09d961e631..c5151cf899 100644
--- a/backends/platform/PalmOS/Src/launcher/games.cpp
+++ b/backends/platform/PalmOS/Src/launcher/games.cpp
@@ -69,7 +69,8 @@ static Err GamUpdateList() {
MemSet(&gitCur, sizeof(GameInfoType), 0);
- if (version == itemVersion_355 ||
+ if (version == itemVersion_356 ||
+ version == itemVersion_355 ||
version == itemVersion_354 ||
version == itemVersion_353 ||
version == itemVersion_352 ||
@@ -198,6 +199,11 @@ static Err GamUpdateList() {
gitCur.engine = ENGINE_AGOS;
}
+ if (version <= itemVersion_356) {
+ if (gitCur.platform >= 3)
+ gitCur.platform++;
+ }
+
if (gitCur.musicInfo.volume.palm > 100)
gitCur.musicInfo.volume.palm = 50;
diff --git a/backends/platform/PalmOS/Src/launcher/games.h b/backends/platform/PalmOS/Src/launcher/games.h
index 4e784b8154..43c1406b29 100644
--- a/backends/platform/PalmOS/Src/launcher/games.h
+++ b/backends/platform/PalmOS/Src/launcher/games.h
@@ -25,9 +25,10 @@
#ifndef __GAMES_H__
#define __GAMES_H__
-#define curItemVersion sysMakeROMVersion(3,5,6,0,0) // Changed : Simon -> AGOS
+#define curItemVersion sysMakeROMVersion(3,5,7,0,0) // Added : Apple IIgs
+#define itemVersion_356 sysMakeROMVersion(3,5,6,0,0) // Changed : Simon -> AGOS
#define itemVersion_355 sysMakeROMVersion(3,5,5,0,0) // Added : AGI engine
#define itemVersion_354 sysMakeROMVersion(3,5,4,0,0) // Added : Default/Auto music driver
#define itemVersion_353 sysMakeROMVersion(3,5,3,0,0) // Added : CinE engine and 3DO platform
diff --git a/backends/platform/PalmOS/Src/launcher/launch.cpp b/backends/platform/PalmOS/Src/launcher/launch.cpp
index c57738bb5f..7dd775d77d 100644
--- a/backends/platform/PalmOS/Src/launcher/launch.cpp
+++ b/backends/platform/PalmOS/Src/launcher/launch.cpp
@@ -23,6 +23,7 @@
*/
#include <PalmOS.h>
+#include <PmPalmOSNVFS.h>
#include "StarterRsc.h"
#include "games.h"
@@ -52,15 +53,20 @@
StrCat(filename, h); \
StrCat(filename, m);
+#define FIND_FILE() \
+ if (*volRefNum == vfsInvalidVolRef) \
+ *volRefNum = ModFind(filename);
+
+
#define CHECK_FILE(m) \
- e = VFSFileOpen(volRefNum, filename, vfsModeRead, &file); \
+ e = VFSFileOpen(*volRefNum, filename, vfsModeRead, &file); \
if (e) \
BUILD_ERROR(m) \
else \
VFSFileClose(file);
#define IMPRT_FILE(m) \
- e = VFSImportDatabaseFromFile(volRefNum, filename, &cardNo, &dbID); \
+ e = VFSImportDatabaseFromFile(*volRefNum, filename, &cardNo, &dbID); \
if (e) \
BUILD_ERROR(m)
@@ -77,6 +83,22 @@ void ModDelete() {
DELET_FILE("ScummVM-Engine");
}
+UInt16 ModFind(const Char *f) {
+ Err e;
+ UInt16 volRefNum;
+ FileRef r;
+ UInt32 volIterator = vfsIteratorStart|vfsIncludePrivateVolumes;
+ while (volIterator != vfsIteratorStop) {
+ e = VFSVolumeEnumerate(&volRefNum, &volIterator);
+
+ if (!e) e = VFSFileOpen(volRefNum, f, vfsModeRead, &r);
+ if (!e) e = VFSFileClose(r);
+ if (!e) break;
+ }
+
+ return volRefNum;
+}
+
static void ModSetStack(UInt32 newSize, UInt16 cardNo, LocalID dbID) {
DmOpenRef dbRef = DmOpenDatabase(cardNo, dbID, dmModeReadWrite);
@@ -103,7 +125,7 @@ static void ModSetStack(UInt32 newSize, UInt16 cardNo, LocalID dbID) {
}
}
-static Err ModImport(UInt16 volRefNum, UInt8 engine, Boolean *armP) {
+static Err ModImport(UInt16 *volRefNum, UInt8 engine, Boolean *armP) {
#ifndef _DEBUG_ENGINE
char filename[256];
UInt16 cardNo;
@@ -124,6 +146,7 @@ static Err ModImport(UInt16 volRefNum, UInt8 engine, Boolean *armP) {
#ifndef _DEBUG_ENGINE
// engine file ?
BUILD_FILE(engines[engine].fileP, ".engine");
+ FIND_FILE ();
CHECK_FILE("ScummVM engine file was not found !");
IMPRT_FILE("Cannot import engine file !");
@@ -132,6 +155,7 @@ static Err ModImport(UInt16 volRefNum, UInt8 engine, Boolean *armP) {
e = SysAppLaunch(cardNo, dbID, 0, sysAppLaunchCustomEngineGetInfo, 0, &result);
*armP = ((result & GET_MODEARM) == GET_MODEARM);
+/* ARM ONLY FOR NOW, NOT REQUIRED
// common file ?
if (!e && (result & GET_DATACOMMON)) {
BUILD_FILE("common", ".data");
@@ -144,6 +168,7 @@ static Err ModImport(UInt16 volRefNum, UInt8 engine, Boolean *armP) {
CHECK_FILE("Engine data file was not found !");
IMPRT_FILE("Cannot import engine data file !");
}
+*/
#endif
// if error, cleanup
if (e) ModDelete();
@@ -303,6 +328,7 @@ Boolean StartScummVM() {
"3do",
"acorn",
"amiga",
+ "2gs",
"atari",
"c64",
"pc",
@@ -429,7 +455,7 @@ Boolean StartScummVM() {
// gVars values
// (gVars->HRrefNum defined in checkHRmode on Clié)
- gVars->VFS.volRefNum = gPrefs->card.volRefNum;
+ gVars->VFS.volRefNum = (gPrefs->card.autoDetect ? vfsInvalidVolRef : gPrefs->card.volRefNum);
gVars->vibrator = gPrefs->vibrator;
gVars->stdPalette = gPrefs->stdPalette;
gVars->VFS.cacheSize = (gPrefs->card.useCache ? gPrefs->card.cacheSize : 0);
@@ -460,7 +486,7 @@ Boolean StartScummVM() {
HWR_SET(INIT_PA1LIB);
}
*/
- if (ModImport(gVars->VFS.volRefNum, engine, &isARM) != errNone) {
+ if (ModImport(&gVars->VFS.volRefNum, engine, &isARM) != errNone) {
if (bDirectMode) {
// and force exit if nothing selected
EventType event;
diff --git a/backends/platform/PalmOS/Src/launcher/start.h b/backends/platform/PalmOS/Src/launcher/start.h
index a30414a54f..f08d551763 100644
--- a/backends/platform/PalmOS/Src/launcher/start.h
+++ b/backends/platform/PalmOS/Src/launcher/start.h
@@ -53,6 +53,7 @@ typedef struct {
UInt32 cacheSize;
Boolean useCache;
Boolean showLED;
+ Boolean autoDetect;
Boolean moveDB;
Boolean deleteDB;
Boolean confirmMoveDB;