Remove trailing whitespaces.

svn-id: r18604
This commit is contained in:
Eugene Sandulenko 2005-07-30 21:11:48 +00:00
parent 86ab70b149
commit 6b4484472b
560 changed files with 11703 additions and 11703 deletions

View file

@ -38,7 +38,7 @@ DmOpenRef gameDB = NULL;
static Err GamUpdateList() {
if (gameDB) {
UInt16 numRecs = DmNumRecords(gameDB);
if (numRecs > 0) {
MemHandle tmpH;
UInt32 version, size;
@ -57,7 +57,7 @@ static Err GamUpdateList() {
GameInfoType gitCur;
void *tmpP;
FormPtr ofmP, frmP;
// show dialog
ofmP = FrmGetActiveForm();
frmP = FrmInitForm(ConvertForm);
@ -73,25 +73,25 @@ static Err GamUpdateList() {
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);
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.engine = 0;
// simply resize the old record
@ -100,13 +100,13 @@ static Err GamUpdateList() {
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++) {
// get old data
tmpH = DmQueryRecord(gameDB, index);
tmpP = MemHandleLock(tmpH);
@ -121,7 +121,7 @@ static Err GamUpdateList() {
StrCopy(gitCur.pathP, git0.pathP);
StrCopy(gitCur.gameP, git0.gameP);
gitCur.gfxMode = git0.gfxMode;
gitCur.autoLoad = git0.autoLoad;
gitCur.bootParam = git0.bootParam;
gitCur.setPlatform = git0.setPlatform;
@ -139,11 +139,11 @@ static Err GamUpdateList() {
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.engine = 0;
tmpH = DmResizeRecord(gameDB, index, sizeof(GameInfoType)); // TODO : check error on resize tmpH==NULL
@ -156,7 +156,7 @@ static Err GamUpdateList() {
GameInfoTypeV0 git0;
for (index = 0; index < numRecs; index++) {
// get old data
tmpH = DmQueryRecord(gameDB, index);
tmpP = MemHandleLock(tmpH);
@ -171,7 +171,7 @@ static Err GamUpdateList() {
StrCopy(gitCur.pathP, git0.pathP);
StrCopy(gitCur.gameP, git0.gameP);
gitCur.gfxMode = git0.gfxMode;
gitCur.autoLoad = git0.autoLoad;
gitCur.bootParam = git0.bootParam;
gitCur.setPlatform = git0.amiga; // amiga become platform amiga/atari-st/machintosh
@ -189,11 +189,11 @@ static Err GamUpdateList() {
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.engine = 0;
tmpH = DmResizeRecord(gameDB, index, sizeof(GameInfoType)); // TODO : check error on resize tmpH==NULL
@ -207,10 +207,10 @@ static Err GamUpdateList() {
FrmDeleteForm(frmP);
if (ofmP)
FrmReturnToForm(MainForm);
}
}
}
}
return errNone;
}
@ -223,7 +223,7 @@ Err GamOpenDatabase() {
err = DmCreateDatabase(0, "ScummVM-Data", appFileCreator, 'DATA', false);
if (!err) {
gameDB = DmOpenDatabaseByTypeCreator( 'DATA', appFileCreator, dmModeReadWrite);
if (!gameDB)
err = DmGetLastErr();
}
@ -241,7 +241,7 @@ void GamImportDatabase() {
if (gPrefs->card.volRefNum != sysInvalidRefNum && gPrefs->card.moveDB) {
FileRef file;
Err e;
e = VFSFileOpen(gPrefs->card.volRefNum, "/Palm/Programs/ScummVM/listdata.pdb", vfsModeRead, &file);
if (!e) {
UInt16 oCardNo, nCardNo;
@ -254,7 +254,7 @@ void GamImportDatabase() {
gPrefs->card.moveDB = false;
return;
}
// get current db info and rename it
DmOpenDatabaseInfo(gameDB, &oDbID, 0, 0, &oCardNo, 0);
GamCloseDatabase(true);
@ -273,7 +273,7 @@ void GamCloseDatabase(Boolean ignoreCardParams) {
if (gameDB) {
LocalID dbID;
UInt16 cardNo;
DmOpenDatabaseInfo(gameDB, &dbID, 0, 0, &cardNo, 0);
DmCloseDatabase(gameDB);
@ -309,13 +309,13 @@ void GamUnselect() {
UInt16 index;
index = GamGetSelected();
if (index != dmMaxRecordIndex) {
Boolean newValue;
recordH = DmGetRecord(gameDB, index);
game = (GameInfoType *)MemHandleLock(recordH);
newValue = false;
DmWrite(game, OffsetOf(GameInfoType,selected), &newValue, sizeof(Boolean));
@ -329,7 +329,7 @@ UInt16 GamGetSelected() {
GameInfoType *game;
Boolean selected;
UInt16 index = DmNumRecords(gameDB)-1;
while (index != (UInt16)-1) {
record = DmQueryRecord(gameDB, index);
game = (GameInfoType *)MemHandleLock(record);
@ -356,7 +356,7 @@ Boolean GamJumpTo(Char letter) {
while (index < maxIndex) {
record = DmGetRecord(gameDB, index);
game = (GameInfoType *)MemHandleLock(record);
if (tolower(game->nameP[0]) == tolower(letter)) {
found = true;
@ -370,7 +370,7 @@ Boolean GamJumpTo(Char letter) {
GamUnselect();
DmWrite(game, OffsetOf(GameInfoType,selected), &newValue, sizeof(Boolean));
if (index < gPrefs->listPosition || index >= (gPrefs->listPosition + maxView))
gPrefs->listPosition = index;
}
@ -380,7 +380,7 @@ Boolean GamJumpTo(Char letter) {
DmReleaseRecord (gameDB, index, 0);
index++;
if (found)
return found;
}