aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorChris Apers2004-09-12 13:32:27 +0000
committerChris Apers2004-09-12 13:32:27 +0000
commit2be4ef999fddab612b0435c7ad5eec7e92d91808 (patch)
tree232220dabd2339096185a19ceb1b993c220e13df /backends
parentc3f2f286ccfccc2ba0d076013443eb89433648f8 (diff)
downloadscummvm-rg350-2be4ef999fddab612b0435c7ad5eec7e92d91808.tar.gz
scummvm-rg350-2be4ef999fddab612b0435c7ad5eec7e92d91808.tar.bz2
scummvm-rg350-2be4ef999fddab612b0435c7ad5eec7e92d91808.zip
- Music and sound options can now be defined for each games
- updated games config svn-id: r15058
Diffstat (limited to 'backends')
-rw-r--r--backends/PalmOS/Src/games.cpp57
-rw-r--r--backends/PalmOS/Src/games.h35
2 files changed, 88 insertions, 4 deletions
diff --git a/backends/PalmOS/Src/games.cpp b/backends/PalmOS/Src/games.cpp
index 868d87ceef..4f6a60f1ec 100644
--- a/backends/PalmOS/Src/games.cpp
+++ b/backends/PalmOS/Src/games.cpp
@@ -64,8 +64,39 @@ static Err GamUpdateList() {
FrmDrawForm(frmP);
SysTaskDelay(200);
- if (version == itemVersion_2) {
- // need conversion from V2 -> V2.5
+ MemSet(&gitCur, sizeof(GameInfoType), 0);
+
+ if (version == itemVersion_27 ||
+ version == itemVersion_26 ||
+ version == itemVersion_25) {
+
+ for (index = 0; index < numRecs; index++) {
+
+ // get old data
+ tmpH = DmQueryRecord(gameDB, index);
+ tmpP = MemHandleLock(tmpH);
+ 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;
+
+ gitCur.musicInfo.sound.tempo = 100;
+ gitCur.musicInfo.sound.defaultTrackLength = 10;
+ gitCur.musicInfo.sound.firstTrack = 1;
+
+ // simply resize the old record
+ tmpH = DmResizeRecord(gameDB, index, sizeof(GameInfoType)); // TODO : check error on resize tmpH==NULL
+ tmpP = MemHandleLock(tmpH);
+ DmWrite(tmpP, 0, &gitCur, sizeof(GameInfoType));
+ MemPtrUnlock(tmpP);
+ }
+
+ } else if (version == itemVersion_20) {
+ // need conversion from V2 -> V2.7
GameInfoTypeV2 git0;
for (index = 0; index < numRecs; index++) {
@@ -96,14 +127,24 @@ static Err GamUpdateList() {
gitCur.talkValue = git0.talkValue;
gitCur.platform = git0.platform;
gitCur.language = git0.language;
+
+ 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;
+
tmpH = DmResizeRecord(gameDB, index, sizeof(GameInfoType)); // TODO : check error on resize tmpH==NULL
tmpP = MemHandleLock(tmpH);
DmWrite(tmpP, 0, &gitCur, sizeof(GameInfoType));
MemPtrUnlock(tmpP);
}
} else {
- // need conversion from V0 -> V2.5
+ // need conversion from V0 -> V2.7
GameInfoTypeV0 git0;
for (index = 0; index < numRecs; index++) {
@@ -134,7 +175,17 @@ static Err GamUpdateList() {
gitCur.talkValue = git0.talkValue;
gitCur.platform = 0; // default to amiga
gitCur.language = git0.language;
+
+ 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;
+
tmpH = DmResizeRecord(gameDB, index, sizeof(GameInfoType)); // TODO : check error on resize tmpH==NULL
tmpP = MemHandleLock(tmpH);
DmWrite(tmpP, 0, &gitCur, sizeof(GameInfoType));
diff --git a/backends/PalmOS/Src/games.h b/backends/PalmOS/Src/games.h
index a381388629..3bd6b44c6c 100644
--- a/backends/PalmOS/Src/games.h
+++ b/backends/PalmOS/Src/games.h
@@ -70,8 +70,35 @@ typedef struct {
} GameInfoTypeV2;
+
// Current config
typedef struct {
+ struct {
+ UInt16 master;
+ UInt16 music;
+ UInt16 sfx;
+ UInt16 speech;
+ UInt16 audiocd;
+ } volume;
+
+ struct {
+ // midi
+ Boolean multiMidi;
+ Boolean music;
+ UInt8 drvMusic;
+ UInt8 tempo;
+ // sound FX
+ Boolean sfx;
+ UInt8 rate;
+ // CD audio
+ Boolean CD;
+ UInt8 drvCD, frtCD;
+ UInt16 defaultTrackLength;
+ UInt16 firstTrack;
+ } sound;
+} MusicInfoType;
+
+typedef struct {
UInt32 version;
UInt16 icnID; // icon to display on the list
Boolean selected;
@@ -91,7 +118,13 @@ typedef struct {
UInt16 bootValue;
UInt16 talkValue;
UInt8 platform;
- UInt8 language;
+ UInt8 language; // |- v2.5
+
+ Boolean filter; // v2.6
+ Boolean fullscreen; // |
+ Boolean aspectRatio; // |- v2.7
+
+ MusicInfoType musicInfo;// v3.0
} GameInfoType;