3 // SuperTux - A Jump'n Run
4 // Copyright (C) 2000 Bill Kendrick <bill@newbreedsoftware.com>
6 // This program is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU General Public License
8 // as published by the Free Software Foundation; either version 2
9 // of the License, or (at your option) any later version.
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.
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.
20 #ifndef SUPERTUX_SETUP_H
21 #define SUPERTUX_SETUP_H
29 /// File system utility functions
32 static bool faccessible(const std::string& filename);
33 static bool fcreatedir(const std::string& relative_dir);
34 static bool fwriteable(const std::string& filename);
35 static std::set<std::string> read_directory(const std::string& pathname);
36 static std::set<std::string> dsubdirs(const std::string& rel_path, const std::string& expected_file);
37 static std::set<std::string> dfiles(const std::string& rel_path, const std::string& glob, const std::string& exception_str);
39 static std::string dirname(const std::string& filename);
42 /// All you need to get an application up and running
45 static void init(const std::string& _package_name, const std::string& _package_symbol_name, const std::string& _package_version);
46 static void directories(void);
47 static void general(void);
48 static void general_free();
49 static void video(unsigned int screen_w, unsigned int screen_h);
50 static void audio(void);
51 static void joystick(void);
52 static void parseargs(int argc, char * argv[]);
55 static void video_sdl(unsigned int screen_w, unsigned int screen_h);
56 static void video_gl(unsigned int screen_w, unsigned int screen_h);
59 /// Termination handling
62 static void shutdown(void);
63 static void abort(const std::string& reason, const std::string& details);
66 } //namespace SuperTux
68 #endif /*SUPERTUX_SETUP_H*/