00001
00002
00003
00004
00005
00006
00007 #ifndef _PREFS_H
00008 #define _PREFS_H
00009
00010 #include "sysdeps.h"
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 enum {
00024 DRVTYPE_DIR,
00025 DRVTYPE_D64,
00026 DRVTYPE_T64
00027 };
00028
00029
00030
00031 enum {
00032 SIDTYPE_NONE,
00033 SIDTYPE_DIGITAL,
00034 SIDTYPE_SIDCARD
00035 };
00036
00037
00038
00039 enum {
00040 REU_NONE,
00041 REU_128K,
00042 REU_256K,
00043 REU_512K
00044 };
00045
00046
00047
00048 enum {
00049 DISPTYPE_WINDOW,
00050 DISPTYPE_SCREEN
00051 };
00052
00053
00057 class Prefs
00058 {
00059 public:
00060 Prefs();
00061 ~Prefs();
00062
00063 bool ShowEditor(bool startup, char *prefs_name);
00064 void Check(void);
00065 bool Load(char *filename);
00066 bool Save(char *filename);
00067
00068 bool operator==(const Prefs &rhs) const;
00069 bool operator!=(const Prefs &rhs) const;
00070
00071
00072
00073
00074
00075 bool Emul1541Proc;
00076 int DriveType[4];
00077 char DrivePath[4][256];
00078
00079
00080 bool Joystick1On;
00081 bool Joystick2On;
00082
00083
00084 int SkipFrames;
00085 bool SpritesOn;
00086 bool SpriteCollisions;
00087
00088
00089 int SIDType;
00090 bool SIDFilters;
00091 int LatencyMin;
00092 int LatencyMax;
00093 int LatencyAvg;
00094
00095
00096 int NormalCycles;
00097 int BadLineCycles;
00098 int CIACycles;
00099 int FloppyCycles;
00100
00101
00102 int REUSize;
00103 bool LimitSpeed;
00104 bool FastReset;
00105 bool iShowToolbar;
00106
00107
00108 uint8 ColorTbl[16];
00109
00110 #ifdef __SYMBIAN32__
00111 TPoint iOffset;
00112 TInt iVolume;
00113 #endif // __SYMBIAN32__
00114
00115
00116
00117 #ifndef __SYMBIAN32__
00118 bool CIAIRQHack;
00119 bool MapSlash;
00120 int ScalingNumerator;
00121 int ScalingDenominator;
00122 bool JoystickSwap;
00123 char ViewPort[256];
00124 char DisplayMode[256];
00125 int DisplayType;
00126 bool DoubleScan;
00127 bool HideCursor;
00128 bool DirectSound;
00129 bool ExclusiveSound;
00130 bool AutoPause;
00131 bool PrefsAtStartup;
00132 bool SystemMemory;
00133 bool AlwaysCopy;
00134 bool SystemKeys;
00135 bool ShowLEDs;
00136 #endif
00137
00138 #ifdef __mac__
00139 void ChangeDisks(void);
00140 #endif
00141
00142 #ifdef WIN32
00143 private:
00144 static BOOL CALLBACK StandardDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
00145 static BOOL CALLBACK WIN32DialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
00146 BOOL DialogProc(int page, HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
00147 void SetupControls(int page);
00148 void SetValues(int page);
00149 void GetValues(int page);
00150 void BrowseForDevice(int id);
00151
00152 static Prefs *edit_prefs;
00153 static char *edit_prefs_name;
00154 static HWND hDlg;
00155 #endif
00156
00157 };
00158
00159 #ifdef GLOBAL_PREFS
00160
00161
00162 extern Prefs ThePrefs;
00163
00164
00165 extern Prefs ThePrefsOnDisk;
00166
00167 #endif // GLOBAL_PREFS
00168
00169
00170 #endif // _PREFS_H