Vegastrike 0.5.1 rc1  1.0
Original sources for Vegastrike Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
universe.h
Go to the documentation of this file.
1 /*
2  * Vega Strike
3  * Copyright (C) 2001-2002 Daniel Horn
4  *
5  * http://vegastrike.sourceforge.net/
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20  */
21 #ifndef _WrapGFX_H
22 #define _WrapGFX_H
23 
24 #include "universe_generic.h"
25 #include "gfx/camera.h"
26 #include "star_system.h"
27 #include "gfx/cockpit.h"
28 #include "faction_generic.h"
29 
39 class GameUniverse : public Universe
40 {
41 protected:
43 //unsigned int current_cockpit;
44 //std::vector <Cockpit *> cockpit;
48  void StartGL();
49 
50 private:
51 //so it can get all cockpits
52  friend void bootstrap_main_loop();
54 
55 public:
56  StarSystem * GenerateStarSystem( const char *file, const char *jumpback, Vector origin );
57  void WriteSaveGame( bool auto_save );
58  void SetupCockpits( std::vector< std::string >players );
59  void activateLightMap( int stage = 1 );
60  Texture * getLightMap();
62  GameUniverse( int argc, char **argv, const char *galaxy );
63  GameUniverse();
64  void Init( int argc, char **argv, const char *galaxy );
65  ~GameUniverse();
67  void StartGFX();
69  class StarSystem * Init( string systemfile, const Vector &centroid = Vector( 0, 0, 0 ), const string planetname = string() );
71  void StartDraw();
73  void Loop( void main_loop() );
75  void SelectCamera( int cam )
76  {
77  AccessCockpit()->SelectCamera( cam );
78  }
80 //unsigned int CurrentCockpit(){return current_cockpit;}
81 //Cockpit *AccessCockpit() {return cockpit[current_cockpit];}
82 //Cockpit *AccessCockpit (int i) {return cockpit[i];}
84  Camera * AccessCamera( int num )
85  {
86  return AccessCockpit()->AccessCamera( num );
87  }
90  {
91  return AccessCockpit()->AccessCamera();
92  }
95  {
96  return &hud_camera;
97  }
99  void SetViewport()
100  {
102  }
103 };
104 #endif
105