Main Page | Class Hierarchy | Compound List | File List | Compound Members | File Members | Related Pages

Prefs.h

Go to the documentation of this file.
00001 /*
00002  *  Prefs.h - Global preferences
00003  *
00004  *  Frodo (C) 1994-1997 Christian Bauer
00005  */
00006 
00007 #ifndef _PREFS_H
00008 #define _PREFS_H
00009 
00010 #include "sysdeps.h"
00011 
00012 // prefs are ordered in this sequence:
00013 //
00014 // 1541
00015 // Joystick
00016 // VIC
00017 // SID
00018 // CPU
00019 // Stuff
00020 
00021 
00022 // Drive types
00023 enum {
00024         DRVTYPE_DIR,    // 1541 emulation in host file system
00025         DRVTYPE_D64,    // 1541 emulation in .d64 file
00026         DRVTYPE_T64             // 1541 emulation in .t64 file
00027 };
00028 
00029 
00030 // SID types
00031 enum {
00032         SIDTYPE_NONE,           // SID emulation off
00033         SIDTYPE_DIGITAL,        // Digital SID emulation
00034         SIDTYPE_SIDCARD         // SID card
00035 };
00036 
00037 
00038 // REU sizes
00039 enum {
00040         REU_NONE,               // No REU
00041         REU_128K,               // 128K
00042         REU_256K,               // 256K
00043         REU_512K                // 512K
00044 };
00045 
00046 
00047 // Display types (BeOS)
00048 enum {
00049         DISPTYPE_WINDOW,        // BWindow
00050         DISPTYPE_SCREEN         // BWindowScreen
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         // preference variabels
00072 
00073 
00074         // 1541
00075         bool Emul1541Proc;               
00076         int   DriveType[4];              
00077         char  DrivePath[4][256]; 
00078 
00079         // Joystick
00080         bool Joystick1On;               
00081         bool Joystick2On;               
00082 
00083         // VIC
00084         int   SkipFrames;               
00085         bool SpritesOn;             
00086         bool SpriteCollisions;  
00087 
00088         // SID
00089         int   SIDType;                  
00090         bool SIDFilters;                
00091         int   LatencyMin;               
00092         int   LatencyMax;               
00093         int   LatencyAvg;               
00094 
00095         // CPU
00096         int NormalCycles;               
00097         int BadLineCycles;              
00098         int CIACycles;                  
00099         int FloppyCycles;               
00100 
00101         // Stuff
00102         int   REUSize;                  
00103         bool LimitSpeed;                
00104         bool FastReset;             
00105         bool iShowToolbar;      
00106 
00107         // Colors
00108         uint8 ColorTbl[16];             
00109 
00110 #ifdef __SYMBIAN32__
00111         TPoint iOffset;         
00112         TInt iVolume;           
00113 #endif // __SYMBIAN32__
00114 
00115         
00116         // prefs not used in Epoc32 version
00117 #ifndef __SYMBIAN32__
00118         bool CIAIRQHack;                // Write to CIA ICR clears IRQ
00119         bool MapSlash;                  // Map '/' in C64 filenames
00120         int ScalingNumerator;   // Window scaling numerator (Win32)
00121         int ScalingDenominator; // Window scaling denominator (Win32)
00122         bool JoystickSwap;              // Swap joysticks 1<->2
00123         char ViewPort[256];             // Size of the C64 screen to display (Win32)
00124         char DisplayMode[256];  // Video mode to use for full screen (Win32)
00125         int DisplayType;                // Display type (BeOS)
00126         bool DoubleScan;                // Double scan lines (BeOS, if DisplayType == DISPTYPE_SCREEN)
00127         bool HideCursor;                // Hide mouse cursor when visible (Win32)
00128         bool DirectSound;               // Use direct sound (instead of wav) (Win32)
00129         bool ExclusiveSound;    // Use exclusive mode with direct sound (Win32)
00130         bool AutoPause;                 // Auto pause when not foreground app (Win32)
00131         bool PrefsAtStartup;    // Show prefs dialog at startup (Win32)
00132         bool SystemMemory;              // Put view work surface in system mem (Win32)
00133         bool AlwaysCopy;                // Always use a work surface (Win32)
00134         bool SystemKeys;                // Enable system keys and menu keys (Win32)
00135         bool ShowLEDs;                  // Show LEDs (Win32)
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 // These are the active preferences
00162 extern Prefs ThePrefs;
00163 
00164 // Theses are the preferences on disk
00165 extern Prefs ThePrefsOnDisk;
00166 
00167 #endif // GLOBAL_PREFS
00168 
00169 
00170 #endif // _PREFS_H

Generated on Tue Feb 8 04:08:03 2005 for E32frodo by doxygen 1.3.3