diff options
| -rw-r--r-- | backends/PalmOS/Src/games.cpp | 57 | ||||
| -rw-r--r-- | backends/PalmOS/Src/games.h | 35 | 
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; | 
