--- Frodo4/Src/main.h 2003/07/02 14:46:24 1.4 +++ Frodo4/Src/main.h 2007/01/28 16:08:37 1.9 @@ -1,7 +1,7 @@ /* * main.h - Main program * - * Frodo (C) 1994-1997,2002-2003 Christian Bauer + * Frodo (C) 1994-1997,2002-2005 Christian Bauer * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -71,8 +71,6 @@ public: virtual bool QuitRequested(void); virtual void AboutRequested(void); - C64 *TheC64; - private: void load_rom(const char *which, const char *path, uint8 *where, size_t size, const uint8 *builtin); void load_rom_files(); @@ -101,8 +99,6 @@ public: void ReadyToRun(void); void RunPrefsEditor(void); - C64 *TheC64; - private: void load_rom(const char *which, const char *path, uint8 *where, size_t size, const uint8 *builtin); void load_rom_files(); @@ -130,9 +126,7 @@ public: void ArgvReceived(int argc, char **argv); void ReadyToRun(void); static Prefs *reload_prefs(void); - - C64 *TheC64; - + static char* get_prefs_path() { return prefs_path; }; private: void load_rom(const char *which, const char *path, uint8 *where, size_t size, const uint8 *builtin); void load_rom_files(); @@ -154,7 +148,6 @@ public: Frodo(); void Run(void); - C64 *TheC64; private: void load_rom(const char *which, const char *path, uint8 *where, size_t size, const uint8 *builtin); @@ -178,7 +171,6 @@ public: void ReadyToRun(); void RunPrefsEditor(); - C64 *TheC64; char prefs_path[256]; // Pathname of current preferences file private: @@ -195,29 +187,6 @@ extern HWND hwnd; // Command line options. extern BOOL full_screen; -#if defined(DEBUG) - -inline void Debug(const char *format, ...) -{ - va_list args; - va_start(args, format); - char tmp[256]; - vsprintf(tmp, format, args); - va_end(args); - OutputDebugString(tmp); -} - -#else - -inline void Debug(const char *format, ...) -{ -} - -#endif - -#define DebugResult(message, val) \ - Debug("%s: 0x%x (%d)\n", message, val, HRESULT_CODE(val)) - #endif @@ -234,8 +203,6 @@ public: ~Frodo(); void ReadyToRun(void); - C64 *TheC64; - private: void load_rom(const char *which, const char *path, uint8 *where, size_t size, const uint8 *builtin); void load_rom_files(); @@ -243,5 +210,15 @@ private: #endif +// Global C64 object +extern C64 *TheC64; + + +/* + * Functions + */ + +// Determine whether path name refers to a directory +extern bool IsDirectory(const char *path); #endif