1 |
|
/* |
2 |
|
* main.h - Main program |
3 |
|
* |
4 |
< |
* Frodo (C) 1994-1997,2002 Christian Bauer |
4 |
> |
* Frodo (C) 1994-1997,2002-2005 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 |
< |
bool load_rom_files(void); |
75 |
> |
void load_rom(const char *which, const char *path, uint8 *where, size_t size, const uint8 *builtin); |
76 |
> |
void load_rom_files(); |
77 |
|
|
78 |
|
char prefs_path[1024]; // Pathname of current preferences file |
79 |
|
bool prefs_showing; // true: Preferences editor is on screen |
99 |
|
void ReadyToRun(void); |
100 |
|
void RunPrefsEditor(void); |
101 |
|
|
103 |
– |
C64 *TheC64; |
104 |
– |
|
102 |
|
private: |
103 |
< |
bool load_rom_files(void); |
103 |
> |
void load_rom(const char *which, const char *path, uint8 *where, size_t size, const uint8 *builtin); |
104 |
> |
void load_rom_files(); |
105 |
|
|
106 |
|
char prefs_path[256]; // Pathname of current preferences file |
107 |
|
}; |
126 |
|
void ArgvReceived(int argc, char **argv); |
127 |
|
void ReadyToRun(void); |
128 |
|
static Prefs *reload_prefs(void); |
129 |
< |
|
132 |
< |
C64 *TheC64; |
133 |
< |
|
129 |
> |
static char* get_prefs_path() { return prefs_path; }; |
130 |
|
private: |
131 |
< |
bool load_rom_files(void); |
131 |
> |
void load_rom(const char *which, const char *path, uint8 *where, size_t size, const uint8 *builtin); |
132 |
> |
void load_rom_files(); |
133 |
|
|
134 |
|
static char prefs_path[256]; // Pathname of current preferences file |
135 |
|
}; |
148 |
|
Frodo(); |
149 |
|
|
150 |
|
void Run(void); |
154 |
– |
C64 *TheC64; |
151 |
|
|
152 |
|
private: |
153 |
< |
bool load_rom_files(void); |
153 |
> |
void load_rom(const char *which, const char *path, uint8 *where, size_t size, const uint8 *builtin); |
154 |
> |
void load_rom_files(); |
155 |
|
}; |
156 |
|
|
157 |
|
#endif |
171 |
|
void ReadyToRun(); |
172 |
|
void RunPrefsEditor(); |
173 |
|
|
177 |
– |
C64 *TheC64; |
174 |
|
char prefs_path[256]; // Pathname of current preferences file |
175 |
|
|
176 |
|
private: |
177 |
< |
bool load_rom_files(); |
177 |
> |
void load_rom(const char *which, const char *path, uint8 *where, size_t size, const uint8 *builtin); |
178 |
> |
void load_rom_files(); |
179 |
|
}; |
180 |
|
|
181 |
|
// Global variables |
187 |
|
// Command line options. |
188 |
|
extern BOOL full_screen; |
189 |
|
|
193 |
– |
#if defined(DEBUG) |
194 |
– |
|
195 |
– |
inline void Debug(const char *format, ...) |
196 |
– |
{ |
197 |
– |
va_list args; |
198 |
– |
va_start(args, format); |
199 |
– |
char tmp[256]; |
200 |
– |
vsprintf(tmp, format, args); |
201 |
– |
va_end(args); |
202 |
– |
OutputDebugString(tmp); |
203 |
– |
} |
204 |
– |
|
205 |
– |
#else |
206 |
– |
|
207 |
– |
inline void Debug(const char *format, ...) |
208 |
– |
{ |
209 |
– |
} |
210 |
– |
|
211 |
– |
#endif |
212 |
– |
|
213 |
– |
#define DebugResult(message, val) \ |
214 |
– |
Debug("%s: 0x%x (%d)\n", message, val, HRESULT_CODE(val)) |
215 |
– |
|
190 |
|
#endif |
191 |
|
|
192 |
|
|
198 |
|
|
199 |
|
class Frodo |
200 |
|
{ |
201 |
< |
public: |
202 |
< |
Frodo(void); |
203 |
< |
~Frodo(void); |
204 |
< |
void ReadyToRun(void); |
231 |
< |
|
232 |
< |
C64 *TheC64; |
201 |
> |
public: |
202 |
> |
Frodo(); |
203 |
> |
~Frodo(); |
204 |
> |
void ReadyToRun(void); |
205 |
|
|
206 |
< |
private: |
207 |
< |
bool load_rom_files(void); |
206 |
> |
private: |
207 |
> |
void load_rom(const char *which, const char *path, uint8 *where, size_t size, const uint8 *builtin); |
208 |
> |
void load_rom_files(); |
209 |
|
}; |
210 |
|
|
211 |
|
#endif |
212 |
|
|
213 |
+ |
// Global C64 object |
214 |
+ |
extern C64 *TheC64; |
215 |
+ |
|
216 |
+ |
|
217 |
+ |
/* |
218 |
+ |
* Functions |
219 |
+ |
*/ |
220 |
+ |
|
221 |
+ |
// Determine whether path name refers to a directory |
222 |
+ |
extern bool IsDirectory(const char *path); |
223 |
|
|
224 |
|
#endif |