ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/Frodo4/Src/Prefs.h
Revision: 1.8
Committed: 2010-04-21T22:05:38Z (13 years, 11 months ago) by cebix
Content type: text/plain
Branch: MAIN
CVS Tags: HEAD
Changes since 1.7: +3 -3 lines
Log Message:
- const correctness
- dummy prefs editor for X

File Contents

# User Rev Content
1 cebix 1.1 /*
2     * Prefs.h - Global preferences
3     *
4 cebix 1.8 * Frodo Copyright (C) Christian Bauer
5 cebix 1.1 *
6     * This program is free software; you can redistribute it and/or modify
7     * it under the terms of the GNU General Public License as published by
8     * the Free Software Foundation; either version 2 of the License, or
9     * (at your option) any later version.
10     *
11     * This program is distributed in the hope that it will be useful,
12     * but WITHOUT ANY WARRANTY; without even the implied warranty of
13     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14     * GNU General Public License for more details.
15     *
16     * You should have received a copy of the GNU General Public License
17     * along with this program; if not, write to the Free Software
18     * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19     */
20    
21     #ifndef _PREFS_H
22     #define _PREFS_H
23    
24    
25     // SID types
26     enum {
27     SIDTYPE_NONE, // SID emulation off
28     SIDTYPE_DIGITAL, // Digital SID emulation
29     SIDTYPE_SIDCARD // SID card
30     };
31    
32    
33     // REU sizes
34     enum {
35     REU_NONE, // No REU
36     REU_128K, // 128K
37     REU_256K, // 256K
38     REU_512K // 512K
39     };
40    
41    
42 cebix 1.4 // Display types
43 cebix 1.1 enum {
44 cebix 1.4 DISPTYPE_WINDOW, // Window
45     DISPTYPE_SCREEN // Fullscreen
46 cebix 1.1 };
47    
48    
49     // Preferences data
50     class Prefs {
51     public:
52     Prefs();
53     bool ShowEditor(bool startup, char *prefs_name);
54     void Check(void);
55 cebix 1.8 void Load(const char *filename);
56     bool Save(const char *filename);
57 cebix 1.1
58     bool operator==(const Prefs &rhs) const;
59     bool operator!=(const Prefs &rhs) const;
60    
61     int NormalCycles; // Available CPU cycles in normal raster lines
62     int BadLineCycles; // Available CPU cycles in Bad Lines
63     int CIACycles; // CIA timer ticks per raster line
64     int FloppyCycles; // Available 1541 CPU cycles per line
65     int SkipFrames; // Draw every n-th frame
66    
67     char DrivePath[4][256]; // Path for drive 8..11
68    
69     char ViewPort[256]; // Size of the C64 screen to display (Win32)
70     char DisplayMode[256]; // Video mode to use for full screen (Win32)
71    
72     int SIDType; // SID emulation type
73     int REUSize; // Size of REU
74     int DisplayType; // Display type (BeOS)
75 cebix 1.3 int Joystick1Port; // Port that joystick 1 is connected to (0 = no joystick, all other values are system dependant)
76     int Joystick2Port; // Port that joystick 2 is connected to
77 cebix 1.1 int LatencyMin; // Min msecs ahead of sound buffer (Win32)
78     int LatencyMax; // Max msecs ahead of sound buffer (Win32)
79     int LatencyAvg; // Averaging interval in msecs (Win32)
80     int ScalingNumerator; // Window scaling numerator (Win32)
81     int ScalingDenominator; // Window scaling denominator (Win32)
82    
83     bool SpritesOn; // Sprite display is on
84     bool SpriteCollisions; // Sprite collision detection is on
85     bool JoystickSwap; // Swap joysticks 1<->2
86     bool LimitSpeed; // Limit speed to 100%
87     bool FastReset; // Skip RAM test on reset
88     bool CIAIRQHack; // Write to CIA ICR clears IRQ
89     bool MapSlash; // Map '/' in C64 filenames
90     bool Emul1541Proc; // Enable processor-level 1541 emulation
91     bool SIDFilters; // Emulate SID filters
92     bool DoubleScan; // Double scan lines (BeOS, if DisplayType == DISPTYPE_SCREEN)
93 cebix 1.3 bool JoystickGeekPort; // Enable GeekPort joystick adapter
94 cebix 1.1 bool HideCursor; // Hide mouse cursor when visible (Win32)
95     bool DirectSound; // Use direct sound (instead of wav) (Win32)
96     bool ExclusiveSound; // Use exclusive mode with direct sound (Win32)
97     bool AutoPause; // Auto pause when not foreground app (Win32)
98     bool PrefsAtStartup; // Show prefs dialog at startup (Win32)
99     bool SystemMemory; // Put view work surface in system mem (Win32)
100     bool AlwaysCopy; // Always use a work surface (Win32)
101     bool SystemKeys; // Enable system keys and menu keys (Win32)
102     bool ShowLEDs; // Show LEDs (Win32)
103    
104     #ifdef __mac__
105     void ChangeDisks(void);
106     #endif
107    
108     #ifdef WIN32
109     private:
110     static BOOL CALLBACK StandardDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
111     static BOOL CALLBACK WIN32DialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
112     BOOL DialogProc(int page, HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
113     void SetupControls(int page);
114     void SetValues(int page);
115     void GetValues(int page);
116     void BrowseForDevice(int id);
117    
118     static Prefs *edit_prefs;
119     static char *edit_prefs_name;
120     static HWND hDlg;
121     #endif
122     };
123    
124    
125     // These are the active preferences
126     extern Prefs ThePrefs;
127    
128     // Theses are the preferences on disk
129     extern Prefs ThePrefsOnDisk;
130    
131     #endif