diff options
author | Chris Apers | 2004-09-12 13:32:27 +0000 |
---|---|---|
committer | Chris Apers | 2004-09-12 13:32:27 +0000 |
commit | 2be4ef999fddab612b0435c7ad5eec7e92d91808 (patch) | |
tree | 232220dabd2339096185a19ceb1b993c220e13df /backends/PalmOS/Src/games.cpp | |
parent | c3f2f286ccfccc2ba0d076013443eb89433648f8 (diff) | |
download | scummvm-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/PalmOS/Src/games.cpp')
-rw-r--r-- | backends/PalmOS/Src/games.cpp | 57 |
1 files changed, 54 insertions, 3 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)); |