Fixed autotools stuff
[construo.git] / construo_main.hxx
blob61c229f787c15fced3c1dda1c984dc8429d92ff3
1 // $Id: construo_main.hxx,v 1.11 2003/07/25 23:03:52 grumbel Exp $
2 //
3 // Construo - A wire-frame construction game
4 // Copyright (C) 2002 Ingo Ruhnke <grumbel@gmx.de>
5 //
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.
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.
20 #ifndef CONSTRUO_HH
21 #define CONSTRUO_HH
23 #include <vector>
24 #include <iostream>
25 #include <list>
26 #include "config.hxx"
28 class GUIManager;
29 class World;
30 class X11Display;
31 class GlutDisplay;
32 class UnixSystem;
34 class ConstruoMain
36 private:
37 #ifdef USE_X11_DISPLAY
38 X11Display* display;
39 #elif USE_GLUT_DISPLAY
40 GlutDisplay* display;
41 #endif
42 UnixSystem* system;
44 bool do_quit;
45 Config config;
46 GUIManager* gui_manager;
47 public:
48 ConstruoMain ();
49 virtual ~ConstruoMain ();
51 char* get_title ();
52 int main (int argc, char* argv[]);
54 /** Exit ConstruoMain and do all stuff necesarry for a clean
55 shutdown */
56 void exit();
57 private:
58 /** Called once the game is going to end, used to do the lastsave
59 and similar things */
60 void on_exit();
62 /** Initialize the graphic context and the system */
63 void init_system();
65 /** Shutdown the graphic display and everything else */
66 void deinit_system();
68 void process_events ();
71 extern ConstruoMain* construo_main;
73 #endif
75 /* EOF */