1 |
|
/* |
2 |
|
* main.h - Main program |
3 |
|
* |
4 |
< |
* Frodo (C) 1994-1997,2002-2003 Christian Bauer |
4 |
> |
* Frodo Copyright (C) Christian Bauer |
5 |
|
* |
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 |
71 |
|
virtual bool QuitRequested(void); |
72 |
|
virtual void AboutRequested(void); |
73 |
|
|
74 |
– |
C64 *TheC64; |
75 |
– |
|
74 |
|
private: |
75 |
|
void load_rom(const char *which, const char *path, uint8 *where, size_t size, const uint8 *builtin); |
76 |
|
void load_rom_files(); |
99 |
|
void ReadyToRun(void); |
100 |
|
void RunPrefsEditor(void); |
101 |
|
|
104 |
– |
C64 *TheC64; |
105 |
– |
|
102 |
|
private: |
103 |
|
void load_rom(const char *which, const char *path, uint8 *where, size_t size, const uint8 *builtin); |
104 |
|
void load_rom_files(); |
124 |
|
public: |
125 |
|
Frodo(); |
126 |
|
void ArgvReceived(int argc, char **argv); |
127 |
< |
void ReadyToRun(void); |
128 |
< |
static Prefs *reload_prefs(void); |
127 |
> |
void ReadyToRun(); |
128 |
> |
bool RunPrefsEditor(); |
129 |
|
|
130 |
< |
C64 *TheC64; |
130 |
> |
static const char *get_prefs_path() { return prefs_path; } |
131 |
|
|
132 |
|
private: |
133 |
|
void load_rom(const char *which, const char *path, uint8 *where, size_t size, const uint8 *builtin); |
136 |
|
static char prefs_path[256]; // Pathname of current preferences file |
137 |
|
}; |
138 |
|
|
139 |
+ |
extern Frodo *TheApp; // Pointer to Frodo object |
140 |
+ |
|
141 |
|
#endif |
142 |
|
|
143 |
|
|
152 |
|
Frodo(); |
153 |
|
|
154 |
|
void Run(void); |
157 |
– |
C64 *TheC64; |
155 |
|
|
156 |
|
private: |
157 |
|
void load_rom(const char *which, const char *path, uint8 *where, size_t size, const uint8 *builtin); |
175 |
|
void ReadyToRun(); |
176 |
|
void RunPrefsEditor(); |
177 |
|
|
181 |
– |
C64 *TheC64; |
178 |
|
char prefs_path[256]; // Pathname of current preferences file |
179 |
|
|
180 |
|
private: |
191 |
|
// Command line options. |
192 |
|
extern BOOL full_screen; |
193 |
|
|
198 |
– |
#if defined(DEBUG) |
199 |
– |
|
200 |
– |
inline void Debug(const char *format, ...) |
201 |
– |
{ |
202 |
– |
va_list args; |
203 |
– |
va_start(args, format); |
204 |
– |
char tmp[256]; |
205 |
– |
vsprintf(tmp, format, args); |
206 |
– |
va_end(args); |
207 |
– |
OutputDebugString(tmp); |
208 |
– |
} |
209 |
– |
|
210 |
– |
#else |
211 |
– |
|
212 |
– |
inline void Debug(const char *format, ...) |
213 |
– |
{ |
214 |
– |
} |
215 |
– |
|
216 |
– |
#endif |
217 |
– |
|
218 |
– |
#define DebugResult(message, val) \ |
219 |
– |
Debug("%s: 0x%x (%d)\n", message, val, HRESULT_CODE(val)) |
220 |
– |
|
194 |
|
#endif |
195 |
|
|
196 |
|
|
207 |
|
~Frodo(); |
208 |
|
void ReadyToRun(void); |
209 |
|
|
237 |
– |
C64 *TheC64; |
238 |
– |
|
210 |
|
private: |
211 |
|
void load_rom(const char *which, const char *path, uint8 *where, size_t size, const uint8 *builtin); |
212 |
|
void load_rom_files(); |
214 |
|
|
215 |
|
#endif |
216 |
|
|
217 |
+ |
// Global C64 object |
218 |
+ |
extern C64 *TheC64; |
219 |
+ |
|
220 |
+ |
|
221 |
+ |
/* |
222 |
+ |
* Functions |
223 |
+ |
*/ |
224 |
+ |
|
225 |
+ |
// Determine whether path name refers to a directory |
226 |
+ |
extern bool IsDirectory(const char *path); |
227 |
|
|
228 |
|
#endif |