vegastrike
0.5.1.r1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
vs_globals.h
Go to the documentation of this file.
1
#ifndef __VS_GLOBALS_H_
2
#define __VS_GLOBALS_H_
3
#include "config.h"
4
#include <vector>
5
6
#include "
universe_generic.h
"
7
#include "
command.h
"
8
extern
commandI
*
CommandInterpretor
;
9
extern
Universe
*
_Universe
;
10
/*
11
* #ifdef _SERVER
12
* #include "universe_generic.h"
13
* extern Universe _Universe;
14
* #else
15
* #include "universe.h"
16
* extern GameUniverse _Universe;
17
* #endif
18
*/
19
20
extern
void
cleanup
();
21
extern
void
VSExit
(
int
code );
22
extern
bool
STATIC_VARS_DESTROYED
;
23
extern
char
SERVER
;
24
extern
int
loop_count
;
25
extern
double
avg_loop
;
26
extern
int
nb_checks
;
27
extern
double
last_check
;
28
extern
double
cur_check
;
29
extern
bool
cleanexit
;
30
extern
bool
run_only_player_starsystem
;
31
32
/* All global data is stored in a variable of this type */
33
typedef
struct
34
{
35
char
use_textures
;
36
char
use_animations
;
37
char
use_videos
;
38
char
use_sprites
;
39
char
use_logos
;
40
char
use_ship_textures
;
41
char
use_planet_textures
;
42
int
audio_frequency_mode
;
//0==11025/8 1==22050/8 2==44100/8 3==11025/16 4==22050/16 5==44100/16
43
int
sound_enabled
;
44
int
music_enabled
;
45
int
sound_volume
;
46
int
music_volume
;
47
int
max_sound_sources
;
48
int
warning_level
;
49
int
capture_mouse
;
50
float
MouseSensitivityX
;
51
float
MouseSensitivityY
;
52
float
detaillevel
;
/*how much the LOD calculation gets multiplied by...higher="bigger" */
53
int
y_resolution
;
54
int
x_resolution
;
55
float
znear
;
56
float
zfar
;
57
float
fov
;
58
float
aspect
;
59
float
difficulty
;
60
char
vsdebug
;
61
}
game_data_t
;
62
63
extern
game_data_t
g_game
;
64
class
Music;
65
extern
Music *
muzak
;
66
extern
int
muzak_count
;
67
class
VegaConfig
;
68
extern
VegaConfig
*
vs_config
;
69
class
NetServer;
70
class
NetClient
;
71
extern
NetClient
*
Network
;
72
extern
NetServer *
VSServer
;
73
74
class
Mission;
75
extern
Mission *
mission
;
76
template
<
class
MyType >
77
class
LeakVector
78
{
79
std::vector< MyType > *active_missions;
80
public
:
81
bool
empty
()
const
82
{
83
return
active_missions->empty();
84
}
85
void
push_back
( MyType mis )
86
{
87
active_missions->push_back( mis );
88
}
89
MyType
back
()
90
{
91
return
active_missions->back();
92
}
93
LeakVector
()
94
{
95
active_missions =
new
std::vector< MyType > ();
96
}
97
98
unsigned
int
size
()
const
99
{
100
return
(active_missions)->size();
101
}
102
MyType
operator[]
(
unsigned
int
i )
103
{
104
return
(*active_missions)[i];
105
}
106
~LeakVector
()
107
{
108
/* DO NOTHING OR DIE INTENTIONAL LEAK We need this data after Exit*/
109
}
110
std::vector< MyType > *
Get
()
111
{
112
return
active_missions;
113
}
114
};
115
116
extern
LeakVector< Mission* >
active_missions
;
117
class
ForceFeedback
;
118
extern
ForceFeedback
*
forcefeedback
;
119
120
extern
double
benchmark
;
121
122
#endif
123
src
vs_globals.h
Generated on Fri Feb 14 2014 09:03:12 for vegastrike by
1.8.4