From c9c862989a14d99c358cf7075ac7092e06794372 Mon Sep 17 00:00:00 2001 From: Chris Apers Date: Tue, 9 Nov 2004 11:49:07 +0000 Subject: [PATCH] Updated based on last changes svn-id: r15768 --- backends/PalmOS/Src/games.cpp | 30 ++++++++++++++++++++---------- backends/PalmOS/Src/games.h | 17 +++++++++++++++++ 2 files changed, 37 insertions(+), 10 deletions(-) diff --git a/backends/PalmOS/Src/games.cpp b/backends/PalmOS/Src/games.cpp index 4f6a60f1ec3..fe85a8fe4cc 100644 --- a/backends/PalmOS/Src/games.cpp +++ b/backends/PalmOS/Src/games.cpp @@ -25,6 +25,7 @@ #include #include "globals.h" +#include "palmdefs.h" #include "start.h" #include "games.h" #include "skin.h" @@ -62,11 +63,12 @@ static Err GamUpdateList() { frmP = FrmInitForm(ConvertForm); FrmSetActiveForm(frmP); FrmDrawForm(frmP); - SysTaskDelay(200); + SysTaskDelay(1 * SysTicksPerSecond()); MemSet(&gitCur, sizeof(GameInfoType), 0); - if (version == itemVersion_27 || + if (version == itemVersion_30 || + version == itemVersion_27 || version == itemVersion_26 || version == itemVersion_25) { @@ -78,15 +80,19 @@ static Err GamUpdateList() { MemMove(&gitCur, tmpP, MemHandleSize(tmpH)); MemHandleUnlock(tmpH); - gitCur.musicInfo.volume.master = 192; - gitCur.musicInfo.volume.music = 192; - gitCur.musicInfo.volume.sfx = 192; - gitCur.musicInfo.volume.speech = 192; - gitCur.musicInfo.volume.audiocd = 50; + if (version != itemVersion_30) { + gitCur.musicInfo.volume.master = 192; + gitCur.musicInfo.volume.music = 192; + gitCur.musicInfo.volume.sfx = 192; + gitCur.musicInfo.volume.speech = 192; + gitCur.musicInfo.volume.audiocd = 50; + + gitCur.musicInfo.sound.tempo = 100; + gitCur.musicInfo.sound.defaultTrackLength = 10; + gitCur.musicInfo.sound.firstTrack = 1; + } - gitCur.musicInfo.sound.tempo = 100; - gitCur.musicInfo.sound.defaultTrackLength = 10; - gitCur.musicInfo.sound.firstTrack = 1; + gitCur.engine = 0; // simply resize the old record tmpH = DmResizeRecord(gameDB, index, sizeof(GameInfoType)); // TODO : check error on resize tmpH==NULL @@ -137,6 +143,8 @@ static Err GamUpdateList() { gitCur.musicInfo.sound.tempo = 100; gitCur.musicInfo.sound.defaultTrackLength = 10; gitCur.musicInfo.sound.firstTrack = 1; + + gitCur.engine = 0; tmpH = DmResizeRecord(gameDB, index, sizeof(GameInfoType)); // TODO : check error on resize tmpH==NULL tmpP = MemHandleLock(tmpH); @@ -185,6 +193,8 @@ static Err GamUpdateList() { gitCur.musicInfo.sound.tempo = 100; gitCur.musicInfo.sound.defaultTrackLength = 10; gitCur.musicInfo.sound.firstTrack = 1; + + gitCur.engine = 0; tmpH = DmResizeRecord(gameDB, index, sizeof(GameInfoType)); // TODO : check error on resize tmpH==NULL tmpP = MemHandleLock(tmpH); diff --git a/backends/PalmOS/Src/games.h b/backends/PalmOS/Src/games.h index 3bd6b44c6cf..71e3f2a0d4a 100644 --- a/backends/PalmOS/Src/games.h +++ b/backends/PalmOS/Src/games.h @@ -23,6 +23,14 @@ #ifndef __GAMES_H__ #define __GAMES_H__ +#define curItemVersion sysMakeROMVersion(3,1,0,0,0) + +#define itemVersion_30 sysMakeROMVersion(3,0,0,0,0) +#define itemVersion_27 sysMakeROMVersion(2,7,0,0,0) +#define itemVersion_26 sysMakeROMVersion(2,6,0,0,0) +#define itemVersion_25 sysMakeROMVersion(2,5,0,0,0) +#define itemVersion_20 sysMakeROMVersion(2,0,0,0,0) + // old config structs typedef struct { UInt32 version; @@ -125,9 +133,18 @@ typedef struct { Boolean aspectRatio; // |- v2.7 MusicInfoType musicInfo;// v3.0 + + UInt8 engine; // |- v3.1 } GameInfoType; +enum { + ENGINE_SCUMM = 0, + ENGINE_SIMON, + ENGINE_QUEEN, + ENGINE_SWORD1 +}; + // protos Err GamOpenDatabase (); void GamImportDatabase ();