diff options
author | Chris Apers | 2003-05-02 14:34:22 +0000 |
---|---|---|
committer | Chris Apers | 2003-05-02 14:34:22 +0000 |
commit | f26516ee7f59ba847c1356b0111d54ec39988248 (patch) | |
tree | b4e2043ab4e6ff65073a1fc6fb87c4c542573412 /backends/PalmOS | |
parent | b4944983ece49268fdb56dd6c61680b209b2eae9 (diff) | |
download | scummvm-rg350-f26516ee7f59ba847c1356b0111d54ec39988248.tar.gz scummvm-rg350-f26516ee7f59ba847c1356b0111d54ec39988248.tar.bz2 scummvm-rg350-f26516ee7f59ba847c1356b0111d54ec39988248.zip |
Add Tempo (-t) and Write ScummVM.ini (-w)
svn-id: r7266
Diffstat (limited to 'backends/PalmOS')
-rw-r--r-- | backends/PalmOS/Rsc/Resource.Frk/Starter.rsrc | bin | 20925 -> 20866 bytes | |||
-rw-r--r-- | backends/PalmOS/Rsc/StarterRsc.h | 35 | ||||
-rw-r--r-- | backends/PalmOS/Src/palmstart.cpp | 65 |
3 files changed, 58 insertions, 42 deletions
diff --git a/backends/PalmOS/Rsc/Resource.Frk/Starter.rsrc b/backends/PalmOS/Rsc/Resource.Frk/Starter.rsrc Binary files differindex f8a4956806..7a31fc860a 100644 --- a/backends/PalmOS/Rsc/Resource.Frk/Starter.rsrc +++ b/backends/PalmOS/Rsc/Resource.Frk/Starter.rsrc diff --git a/backends/PalmOS/Rsc/StarterRsc.h b/backends/PalmOS/Rsc/StarterRsc.h index 14c0a8cbc8..26688b0ce6 100644 --- a/backends/PalmOS/Rsc/StarterRsc.h +++ b/backends/PalmOS/Rsc/StarterRsc.h @@ -1,6 +1,6 @@ // Header generated by Constructor for Palm OS (R) 1.9 // -// Generated at 16:39:35 on vendredi 25 avril 2003 +// Generated at 16:18:37 on vendredi 2 mai 2003 // // Generated for file: Starter.rsrc // @@ -24,14 +24,13 @@ #define AboutForm 1100 //(Left Origin = 2, Top Origin = 2, Width = 156, Height = 156, Usable = 1, Modal = 1, Save Behind = 1, Help ID = 0, Menu Bar ID = 0, Default Button ID = 0) #define AboutOKButton 1105 //(Left Origin = 121, Top Origin = 139, Width = 30, Height = 12, Usable = 1, Anchor Left = 1, Frame = 1, Non-bold Frame = 1, Font = Standard) #define AboutUnnamed1108BitMap 1000 //(Left Origin = 69, Top Origin = 15, Bitmap Resource ID = 1000, Usable = 1) -#define AboutUnnamed1102Label 1102 //(Left Origin = 34, Top Origin = 49, Usable = 1, Font = Standard) -#define AboutUnnamed1103Label 1103 //(Left Origin = 38, Top Origin = 67, Usable = 1, Font = Bold) -#define AboutUnnamed1104Label 1104 //(Left Origin = 9, Top Origin = 106, Usable = 1, Font = Bold) -#define AboutUnnamed1106Label 1106 //(Left Origin = 18, Top Origin = 116, Usable = 1, Font = Standard) +#define AboutUnnamed1103Label 1103 //(Left Origin = 38, Top Origin = 61, Usable = 1, Font = Bold) +#define AboutUnnamed1104Label 1104 //(Left Origin = 9, Top Origin = 104, Usable = 1, Font = Bold) +#define AboutUnnamed1106Label 1106 //(Left Origin = 18, Top Origin = 114, Usable = 1, Font = Standard) #define AboutVersionLabel 1107 //(Left Origin = 4, Top Origin = 139, Usable = 1, Font = Standard) -#define AboutUnnamed1109Label 1109 //(Left Origin = 54, Top Origin = 77, Usable = 1, Font = Standard) -#define AboutUnnamed1110Label 1110 //(Left Origin = 8, Top Origin = 87, Usable = 1, Font = Standard) -#define AboutUnnamed1111Label 1111 //(Left Origin = 26, Top Origin = 39, Usable = 1, Font = Standard) +#define AboutUnnamed1109Label 1109 //(Left Origin = 54, Top Origin = 71, Usable = 1, Font = Standard) +#define AboutUnnamed1110Label 1110 //(Left Origin = 8, Top Origin = 81, Usable = 1, Font = Standard) +#define AboutUnnamed1111Label 1111 //(Left Origin = 31, Top Origin = 39, Usable = 1, Font = Standard) // Resource: tFRM 1300 #define HelpForm 1300 //(Left Origin = 2, Top Origin = 2, Width = 156, Height = 156, Usable = 1, Modal = 1, Save Behind = 1, Help ID = 0, Menu Bar ID = 0, Default Button ID = 0) @@ -77,13 +76,14 @@ #define CardSlotSlotList 1502 //(Left Origin = 5, Top Origin = 17, Width = 90, Usable = 1, Font = Standard, Visible Items = 3) // Resource: tFRM 1600 -#define MiscOptionsForm 1600 //(Left Origin = 2, Top Origin = 28, Width = 156, Height = 130, Usable = 1, Modal = 1, Save Behind = 1, Help ID = 0, Menu Bar ID = 0, Default Button ID = 0) -#define MiscOptionsOKButton 1608 //(Left Origin = 5, Top Origin = 113, Width = 36, Height = 12, Usable = 1, Anchor Left = 1, Frame = 1, Non-bold Frame = 1, Font = Standard) -#define MiscOptionsCancelButton 1609 //(Left Origin = 46, Top Origin = 113, Width = 36, Height = 12, Usable = 1, Anchor Left = 1, Frame = 1, Non-bold Frame = 1, Font = Standard) +#define MiscOptionsForm 1600 //(Left Origin = 2, Top Origin = 22, Width = 156, Height = 136, Usable = 1, Modal = 1, Save Behind = 1, Help ID = 0, Menu Bar ID = 0, Default Button ID = 0) +#define MiscOptionsOKButton 1608 //(Left Origin = 5, Top Origin = 119, Width = 36, Height = 12, Usable = 1, Anchor Left = 1, Frame = 1, Non-bold Frame = 1, Font = Standard) +#define MiscOptionsCancelButton 1609 //(Left Origin = 46, Top Origin = 119, Width = 36, Height = 12, Usable = 1, Anchor Left = 1, Frame = 1, Non-bold Frame = 1, Font = Standard) #define MiscOptionsVibratorCheckbox 1602 //(Left Origin = 4, Top Origin = 28, Width = 128, Height = 12, Usable = 1, Selected = 0, Group ID = 0, Font = Standard) #define MiscOptionsNoAutoOffCheckbox 1603 //(Left Origin = 4, Top Origin = 40, Width = 152, Height = 12, Usable = 1, Selected = 0, Group ID = 0, Font = Standard) #define MiscOptionsStdPaletteCheckbox 1604 //(Left Origin = 4, Top Origin = 52, Width = 146, Height = 12, Usable = 1, Selected = 0, Group ID = 0, Font = Standard) #define MiscOptionsDebugCheckbox 1606 //(Left Origin = 4, Top Origin = 86, Width = 100, Height = 12, Usable = 1, Selected = 0, Group ID = 0, Font = Standard) +#define MiscOptionsWriteIniCheckbox 1610 //(Left Origin = 4, Top Origin = 98, Width = 99, Height = 12, Usable = 1, Selected = 0, Group ID = 0, Font = Standard) #define MiscOptionsDebugLevelField 1607 //(Left Origin = 103, Top Origin = 86, Width = 12, Height = 12, Usable = 1, Editable = 1, Underline = 1, Single Line = 1, Dynamic Size = 0, Left Justified = 1, Max Characters = 1, Font = Standard, Auto Shift = 0, Has Scroll Bar = 0, Numeric = 1) #define MiscOptionsUnnamed1601Label 1601 //(Left Origin = 4, Top Origin = 16, Usable = 1, Font = Bold) #define MiscOptionsUnnamed1605Label 1605 //(Left Origin = 4, Top Origin = 74, Usable = 1, Font = Bold) @@ -106,18 +106,17 @@ #define VolumeSfxSliderControl 1711 //(Left Origin = 60, Top Origin = 110, Width = 93, Height = 15, Usable = 1, Initial Value = 0, Minimum Value = 0, Maximum Value = 255, Page Jump Amount = 1, Thumb Bitmap = 0, Background Bitmap = 0) // Resource: tFRM 1800 -#define SoundForm 1800 //(Left Origin = 2, Top Origin = 34, Width = 156, Height = 124, Usable = 1, Modal = 1, Save Behind = 1, Help ID = 0, Menu Bar ID = 0, Default Button ID = 0) -#define SoundOKButton 1809 //(Left Origin = 5, Top Origin = 106, Width = 36, Height = 12, Usable = 1, Anchor Left = 1, Frame = 1, Non-bold Frame = 1, Font = Standard) -#define SoundCancelButton 1810 //(Left Origin = 47, Top Origin = 106, Width = 36, Height = 12, Usable = 1, Anchor Left = 1, Frame = 1, Non-bold Frame = 1, Font = Standard) +#define SoundForm 1800 //(Left Origin = 2, Top Origin = 68, Width = 156, Height = 90, Usable = 1, Modal = 1, Save Behind = 1, Help ID = 0, Menu Bar ID = 0, Default Button ID = 0) +#define SoundOKButton 1809 //(Left Origin = 5, Top Origin = 73, Width = 36, Height = 12, Usable = 1, Anchor Left = 1, Frame = 1, Non-bold Frame = 1, Font = Standard) +#define SoundCancelButton 1810 //(Left Origin = 47, Top Origin = 73, Width = 36, Height = 12, Usable = 1, Anchor Left = 1, Frame = 1, Non-bold Frame = 1, Font = Standard) #define SoundMusicCheckbox 1801 //(Left Origin = 4, Top Origin = 28, Width = 79, Height = 12, Usable = 1, Selected = 1, Group ID = 0, Font = Standard) -#define SoundSfxCheckbox 1802 //(Left Origin = 4, Top Origin = 82, Width = 106, Height = 12, Usable = 1, Selected = 1, Group ID = 0, Font = Standard) -#define SoundTempoField 1808 //(Left Origin = 64, Top Origin = 52, Width = 50, Height = 12, Usable = 1, Editable = 1, Underline = 1, Single Line = 1, Dynamic Size = 0, Left Justified = 1, Max Characters = 8, Font = Standard, Auto Shift = 0, Has Scroll Bar = 0, Numeric = 0) #define SoundUnnamed1803Label 1803 //(Left Origin = 4, Top Origin = 16, Usable = 1, Font = Bold) #define SoundUnnamed1804Label 1804 //(Left Origin = 21, Top Origin = 40, Usable = 1, Font = Standard) #define SoundUnnamed1806Label 1806 //(Left Origin = 18, Top Origin = 52, Usable = 1, Font = Standard) -#define SoundUnnamed1807Label 1807 //(Left Origin = 4, Top Origin = 70, Usable = 1, Font = Bold) +#define SoundTempoList 1802 //(Left Origin = 52, Top Origin = 54, Width = 87, Usable = 0, Font = Standard, Visible Items = 3) #define SoundDriverList 1811 //(Left Origin = 54, Top Origin = 40, Width = 70, Usable = 0, Font = Standard, Visible Items = 2) -#define SoundDriverPopTrigger 1805 //(Left Origin = 54, Top Origin = 40, Width = 73, Height = 14, Usable = 1, Anchor Left = 1, Font = Standard, List ID = 1811) +#define SoundDriverPopTrigger 1805 //(Left Origin = 54, Top Origin = 40, Width = 73, Height = 12, Usable = 1, Anchor Left = 1, Font = Standard, List ID = 1811) +#define SoundTempoPopTrigger 1808 //(Left Origin = 54, Top Origin = 52, Width = 89, Height = 12, Usable = 1, Anchor Left = 1, Font = Standard, List ID = 1802) // Resource: Talt 1001 diff --git a/backends/PalmOS/Src/palmstart.cpp b/backends/PalmOS/Src/palmstart.cpp index 14162f64e7..832c64c82d 100644 --- a/backends/PalmOS/Src/palmstart.cpp +++ b/backends/PalmOS/Src/palmstart.cpp @@ -90,9 +90,9 @@ typedef struct { Boolean debug; UInt16 debugLevel; - + Boolean saveConfig; Boolean stdPalette; - + struct { UInt16 speaker; UInt16 headphone; @@ -105,10 +105,9 @@ typedef struct { struct { Boolean music; UInt8 driver; - UInt32 tempo; + UInt8 tempo; Boolean sfx; } sound; - } GlobalsPreferenceType; @@ -1407,38 +1406,35 @@ static Boolean VolumeFormHandleEvent(EventPtr eventP) { } static void SoundFormSave() { - ControlType *cck1P, *cck2P; - ListType *listP; - FieldType *fld1P; + ControlType *cck1P; + ListType *list1P, *list2P; - fld1P = (FieldType *)GetObjectPtr(SoundTempoField); cck1P = (ControlType *)GetObjectPtr(SoundMusicCheckbox); - cck2P = (ControlType *)GetObjectPtr(SoundSfxCheckbox); - listP = (ListType *)GetObjectPtr(SoundDriverList); + list1P = (ListType *)GetObjectPtr(SoundDriverList); + list2P = (ListType *)GetObjectPtr(SoundTempoList); gPrefs->sound.music = CtlGetValue(cck1P); - gPrefs->sound.sfx = CtlGetValue(cck2P); - gPrefs->sound.driver = LstGetSelection(listP); + gPrefs->sound.driver = LstGetSelection(list1P); + gPrefs->sound.tempo = LstGetSelection(list2P); FrmReturnToForm (MainForm); } static void SoundFormInit() { - ControlType *cck1P, *cck2P; - ListType *listP; - FieldType *fld1P; + ControlType *cck1P; + ListType *list1P, *list2P; FormPtr frmP; - fld1P = (FieldType *)GetObjectPtr(SoundTempoField); cck1P = (ControlType *)GetObjectPtr(SoundMusicCheckbox); - cck2P = (ControlType *)GetObjectPtr(SoundSfxCheckbox); - listP = (ListType *)GetObjectPtr(SoundDriverList); + list1P = (ListType *)GetObjectPtr(SoundDriverList); + list2P = (ListType *)GetObjectPtr(SoundTempoList); CtlSetValue(cck1P, gPrefs->sound.music); - CtlSetValue(cck2P, gPrefs->sound.sfx); - LstSetSelection(listP, gPrefs->sound.driver); - CtlSetLabel((ControlType *)GetObjectPtr(SoundDriverPopTrigger), LstGetSelectionText(listP, LstGetSelection(listP))); + LstSetSelection(list1P, gPrefs->sound.driver); + LstSetSelection(list2P, gPrefs->sound.tempo); + CtlSetLabel((ControlType *)GetObjectPtr(SoundDriverPopTrigger), LstGetSelectionText(list1P, LstGetSelection(list1P))); + CtlSetLabel((ControlType *)GetObjectPtr(SoundTempoPopTrigger), LstGetSelectionText(list2P, LstGetSelection(list2P))); frmP = FrmGetActiveForm(); FrmDrawForm(frmP); @@ -1468,6 +1464,10 @@ static Boolean SoundFormHandleEvent(EventPtr eventP) { FrmList(eventP, SoundDriverList); break; + case SoundTempoPopTrigger: + FrmList(eventP, SoundTempoList); + break; + } handled = true; break; @@ -1494,7 +1494,7 @@ static Boolean SoundFormHandleEvent(EventPtr eventP) { static void MiscOptionsFormSave() { FieldType *fld1P; - ControlType *cck1P, *cck2P, *cck3P, *cck4P; + ControlType *cck1P, *cck2P, *cck3P, *cck4P, *cck5P; FormPtr frmP; fld1P = (FieldType *)GetObjectPtr(MiscOptionsDebugLevelField); @@ -1503,6 +1503,7 @@ static void MiscOptionsFormSave() { cck2P = (ControlType *)GetObjectPtr(MiscOptionsNoAutoOffCheckbox); cck3P = (ControlType *)GetObjectPtr(MiscOptionsStdPaletteCheckbox); cck4P = (ControlType *)GetObjectPtr(MiscOptionsDebugCheckbox); + cck5P = (ControlType *)GetObjectPtr(MiscOptionsWriteIniCheckbox); frmP = FrmGetActiveForm(); @@ -1516,6 +1517,8 @@ static void MiscOptionsFormSave() { gPrefs->autoOff = !CtlGetValue(cck2P); gPrefs->stdPalette = CtlGetValue(cck3P); gPrefs->debug = CtlGetValue(cck4P); + gPrefs->saveConfig = CtlGetValue(cck5P); + gPrefs->debugLevel = StrAToI(FldGetTextPtr(fld1P)); FrmReturnToForm (MainForm); @@ -1533,6 +1536,7 @@ static void MiscOptionsFormInit() { CtlSetValue((ControlType *)GetObjectPtr(MiscOptionsNoAutoOffCheckbox), !gPrefs->autoOff); CtlSetValue((ControlType *)GetObjectPtr(MiscOptionsStdPaletteCheckbox), gPrefs->stdPalette); CtlSetValue((ControlType *)GetObjectPtr(MiscOptionsDebugCheckbox), gPrefs->debug); + CtlSetValue((ControlType *)GetObjectPtr(MiscOptionsWriteIniCheckbox), gPrefs->saveConfig); fld1P = (FieldType *)GetObjectPtr(MiscOptionsDebugLevelField); @@ -2284,7 +2288,10 @@ static void StartScummVM() } */ AddArg(&argvP[argc], "ScummVM", NULL, &argc); - // AddArg(&argvP[argc], "-w", NULL, &argc); + + // save scummvm.ini ? + if (gPrefs->saveConfig) + AddArg(&argvP[argc], "-w", NULL, &argc); // path AddArg(&argvP[argc], "-p", pathP, &argc); @@ -2343,7 +2350,7 @@ static void StartScummVM() case 0: // NULL AddArg(&argvP[argc], "-e", "null", &argc); break; - case 1: // yam ha Pa1 + case 1: // yamaha Pa1 AddArg(&argvP[argc], "-e", "ypa1", &argc); break; } @@ -2351,6 +2358,16 @@ static void StartScummVM() else // NULL as default AddArg(&argvP[argc], "-e", "null", &argc); + // music tempo + switch (gPrefs->sound.tempo) { + case 1: // Adlib : 0x1D9000 -> no fcuntion to convert hex->dec on palmos + AddArg(&argvP[argc], "-t", "1937408", &argc); + break; + case 2: // Midi : 0x4A0000 -> no fcuntion to convert hex->dec on palmos + AddArg(&argvP[argc], "-t", "4849664", &argc); + break; + } + // volume control StrIToA(num, gPrefs->volume.master); AddArg(&argvP[argc], "-o", num, &argc); |