diff options
-rw-r--r-- | backends/PalmOS/Src/games.cpp | 26 | ||||
-rw-r--r-- | backends/PalmOS/Src/games.h | 11 |
2 files changed, 30 insertions, 7 deletions
diff --git a/backends/PalmOS/Src/games.cpp b/backends/PalmOS/Src/games.cpp index 988f2d407d..364bfd6c3e 100644 --- a/backends/PalmOS/Src/games.cpp +++ b/backends/PalmOS/Src/games.cpp @@ -81,13 +81,13 @@ static Err GamUpdateList() { gitCur.gfxMode = git0.gfxMode; gitCur.autoLoad = git0.autoLoad; - gitCur.autoRoom = git0.autoRoom; + gitCur.bootParam = git0.bootParam; gitCur.setPlatform = git0.amiga; // amiga become platform amiga/atari-st/machintosh gitCur.subtitles = git0.subtitles; gitCur.talkSpeed = git0.talkSpeed; gitCur.loadSlot = git0.loadSlot; - gitCur.roomNum = git0.roomNum; + gitCur.bootValue = git0.bootValue; gitCur.talkValue = git0.talkValue; gitCur.platform = 0; // default to amiga gitCur.language = git0.language; @@ -205,6 +205,28 @@ Err GamSortList() { return DmQuickSort (gameDB, (DmComparF *)GamCompare, 0); } +void GamUnselect() { + GameInfoType modGame; + GameInfoType *game; + + MemHandle recordH; + UInt16 index; + + index = GamGetSelected(); + + if (index != dmMaxRecordIndex) { + recordH = DmGetRecord(gameDB, index); + game = (GameInfoType *)MemHandleLock(recordH); + + MemMove(&modGame, game, sizeof(GameInfoType)); + modGame.selected = !modGame.selected; + DmWrite(game, 0, &modGame, sizeof(GameInfoType)); + + MemHandleUnlock(recordH); + DmReleaseRecord (gameDB, index, 0); + } +} + UInt16 GamGetSelected() { MemHandle record; GameInfoType *game; diff --git a/backends/PalmOS/Src/games.h b/backends/PalmOS/Src/games.h index ed60d1fb79..1dcbcb33a1 100644 --- a/backends/PalmOS/Src/games.h +++ b/backends/PalmOS/Src/games.h @@ -36,8 +36,8 @@ typedef struct { Boolean autoLoad; UInt16 loadSlot; - Boolean autoRoom; - UInt16 roomNum; + Boolean bootParam; + UInt16 bootValue; Boolean amiga; Boolean subtitles; Boolean talkSpeed; @@ -58,13 +58,13 @@ typedef struct { UInt16 gfxMode; Boolean autoLoad; - Boolean autoRoom; + Boolean bootParam; Boolean setPlatform; Boolean subtitles; Boolean talkSpeed; UInt16 loadSlot; - UInt16 roomNum; + UInt16 bootValue; UInt16 talkValue; UInt8 platform; UInt8 language; @@ -77,7 +77,8 @@ void GamImportDatabase (); void GamCloseDatabase (Boolean ignoreCardParams); Err GamSortList (); UInt16 GamGetSelected (); +void GamUnselect (); extern DmOpenRef gameDB; -#endif
\ No newline at end of file +#endif |