Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
Vegastrike 0.5.1 rc1
Todo List
Modules
Namespaces
Classes
Files
File List
src
aldrv
audio
cmd
ai
collide2
script
c_alike
director.cpp
director_generic.cpp
director_server.cpp
flightgroup.cpp
flightgroup.h
flightgroup_server.cpp
mission.cpp
mission.h
mission_script.cpp
mission_types.h
msgcenter.cpp
msgcenter.h
pythonmission.cpp
pythonmission.h
script_call_briefing.cpp
script_call_olist.cpp
script_call_omap.cpp
script_call_order.cpp
script_call_string.cpp
script_call_unit.cpp
script_call_unit_generic.cpp
script_call_unit_server.cpp
script_callbacks.cpp
script_expression.cpp
script_generic.cpp
script_statement.cpp
script_util.cpp
script_variables.cpp
testcollection
alphacurve.cpp
alphacurve.h
asteroid.cpp
asteroid.h
asteroid_generic.cpp
asteroid_generic.h
atmosphere.cpp
atmosphere.h
atmosphere_server.cpp
base.h
base_init.cpp
base_interface.cpp
base_util.cpp
base_util.h
base_util_server.cpp
base_write_python.cpp
base_write_xml.cpp
base_xml.cpp
basecomputer.cpp
basecomputer.h
beam.cpp
beam.h
beam_generic.cpp
beam_server.cpp
bolt.cpp
bolt.h
bolt_generic.cpp
bolt_server.cpp
briefing.cpp
briefing.h
building.cpp
building.h
building_generic.cpp
building_generic.h
click_list.cpp
click_list.h
collection.cpp
collection.h
collide.cpp
collide.h
collide_map.cpp
collide_map.h
cont_terrain.cpp
cont_terrain.h
container.cpp
container.h
csv.cpp
csv.h
enhancement.h
enhancement_generic.h
faction_xml.cpp
faction_xml_server.cpp
fg_util.cpp
fg_util.h
images.cpp
images.h
images_server.cpp
key_mutable_set.h
missile.h
missile_generic.cpp
missile_generic.h
mount.cpp
music.cpp
music.h
nebula.cpp
nebula.h
nebula_generic.cpp
nebula_generic.h
oldcollection.cpp
oldcollection.h
pilot.cpp
pilot.h
pilot_server.cpp
planet.cpp
planet.h
planet_generic.cpp
planet_generic.h
role_bitmask.cpp
role_bitmask.h
terrain.cpp
terrain.h
unit.cpp
unit.h
unit_armorshield.h
unit_click.h
unit_collide.cpp
unit_collide.h
unit_const_cache.cpp
unit_const_cache.h
unit_csv.cpp
unit_csv.h
unit_customize.h
unit_damage.h
unit_factory.cpp
unit_factory.h
unit_factory_generic.cpp
unit_factory_server.cpp
unit_find.h
unit_functions.cpp
unit_functions_generic.cpp
unit_functions_server.cpp
unit_generic.cpp
unit_generic.h
unit_jump.h
unit_physics.h
unit_server.cpp
unit_template.h
unit_util.cpp
unit_util.h
unit_util_generic.cpp
unit_util_server.cpp
unit_xml.cpp
unit_xml.h
weapon_xml.cpp
weapon_xml.h
common
gfx
gldrv
gui
networking
python
accountserver.cpp
audiolib.h
cg_global.cpp
cg_global.h
command.cpp
command.h
config_xml.cpp
config_xml.h
configxml.cpp
configxml.h
cs_boostpython.h
cs_boostpythonclass.h
cs_boostpythonobj.h
cs_python.h
debug_vs.cpp
debug_vs.h
easydom.cpp
easydom.h
endianness.cpp
endianness.h
faction_generic.cpp
faction_generic.h
faction_util.cpp
faction_util_generic.cpp
faction_util_server.cpp
fastmath.cpp
ffmpeg_init.cpp
ffmpeg_init.h
file_main.h
force_feedback.cpp
force_feedback.h
force_feedback_server.cpp
functors.h
galaxy.cpp
galaxy_gen.cpp
galaxy_gen.h
galaxy_xml.cpp
galaxy_xml.h
gamemenu.cpp
gamemenu.h
gfxlib.h
gfxlib_struct.cpp
gfxlib_struct.h
gfxlib_struct_server.cpp
gnuhash.h
hashtable.cpp
hashtable.h
in.h
in_handler.h
in_joystick.cpp
in_joystick.h
in_kb.cpp
in_kb.h
in_kb_data.h
in_main.cpp
in_main.h
in_mouse.cpp
in_mouse.h
in_sdl.cpp
junk.c
libaudioserver.cpp
libserver.cpp
lin_time.cpp
lin_time.h
linecollide.h
load_mission.cpp
load_mission.h
macosx_math.cpp
macosx_math.h
macquartz.cpp
main.cpp
main_loop.cpp
main_loop.h
mmorpgclient.cpp
mmorpgclient.h
options.cpp
options.h
physics.cpp
physics.h
pk3.cpp
pk3.h
posh.cpp
posh.h
precompiled.h
profile.h
rendertext.cpp
rendertext.h
replaceall.py
resizable.h
save_util.h
savegame.cpp
savegame.h
SharedPool.cpp
SharedPool.h
ship_commands.cpp
ship_commands.h
Singleton.h
star_system.cpp
star_system.h
star_system_generic.cpp
star_system_generic.h
star_system_jump.cpp
star_system_xml.cpp
stardate.cpp
stardate.h
universe.cpp
universe.h
universe_generic.cpp
universe_generic.h
universe_util.cpp
universe_util.h
universe_util_generic.cpp
universe_util_server.cpp
vegaserver.cpp
vegastrike.h
vs_globals.cpp
vs_globals.h
vs_math.h
vs_random.h
vsfilesystem.cpp
vsfilesystem.h
VSFileXMLSerializer.cpp
VSFileXMLSerializer.h
xml_serializer.cpp
xml_serializer.h
xml_support.cpp
xml_support.h
XMLDocument.cpp
XMLDocument.h
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
flightgroup.h
Go to the documentation of this file.
1
#ifndef _FLIGHTGROUP_H_
2
#define _FLIGHTGROUP_H_
3
#include "config.h"
4
#include "
cmd/container.h
"
5
#include "
mission.h
"
6
#include <string>
7
#include <vector>
8
#include <
gnuhash.h
>
9
10
class
Texture
;
11
12
class
Flightgroup
13
{
14
private
:
15
std::string squadLogoStr;
16
public
:
17
UnitContainer
leader
;
//I'm on the leader
18
UnitContainer
target
;
//this is my target, what i'm doing with it depends on things
19
int
leader_decision
;
//-1 if decision is made
20
Texture
*
squadLogo
;
//null if not there
21
std::string
directive
;
//"a" for attack target "b" for attack at will "h" for help out "f" for form up.... missions can get this..and set this
22
std::string
name
;
//flightgroup name
23
std::string
type
;
24
std::string
ainame
;
//.agg.xml and .int.xml get appended to this
25
std::string
faction
;
26
int
flightgroup_nr
;
//running fg number
27
int
nr_ships
;
//total ships nr
28
QVector
pos
;
29
int
nr_ships_left
;
30
int
nr_waves_left
;
31
vsUMap< std::string, std::string >
ordermap
;
32
std::vector< class varInst* > *
orderlist
;
33
//removes a ship from the flightgroup below
34
void
Decrement
(
Unit
*trashed )
35
{
36
nr_ships
--;
37
nr_ships_left
--;
38
if
(
leader
.
GetUnit
() == trashed)
39
leader
.
SetUnit
( NULL );
40
}
41
static
Flightgroup
*
newFlightgroup
(
const
std::string&
name
,
42
const
std::string&
type
,
43
const
std::string&
faction
,
44
const
std::string&order,
45
int
num_ships,
46
int
num_waves,
47
const
std::string&texname,
48
const
std::string&alphname,
49
class
Mission
*mis );
50
Flightgroup
() :
pos
( 0, 0, 0 )
51
{
52
//betterto have a flightgroup constructor
53
//fprintf (stderr,"constructing FG 0x%x\n",this);
54
orderlist
= NULL;
55
nr_waves_left
=
nr_ships_left
=
nr_ships
=
flightgroup_nr
= 0;
56
leader_decision
= -1;
57
squadLogo
= NULL;
58
}
59
void
Init
(
Flightgroup
*fg,
60
const
std::string &
name
,
61
const
std::string &
type
,
62
const
std::string &
faction
,
63
const
std::string &order,
64
int
num_ships,
65
int
num_waves,
66
Mission
*mis )
67
{
68
bool
new_fg =
false
;
69
if
(fg == NULL) {
70
new_fg =
true
;
71
this->name =
name
;
72
this->
directive
=
"b"
;
73
this->faction =
faction
;
74
}
else
{
75
new_fg = (this->
nr_waves_left
== 0 && this->
nr_ships_left
== 0);
76
}
77
if
(new_fg) {
78
this->
nr_waves_left
= num_waves-1;
79
mission
->
AddFlightgroup
(
this
);
80
}
81
this->
target
= NULL;
82
this->
leader
= NULL;
83
this->
ainame
= order;
84
this->type =
type
;
85
this->
nr_ships
+= num_ships;
86
this->
nr_ships_left
+= num_ships;
87
}
88
Flightgroup
(
Flightgroup
&other )
89
{
90
*
this
= other;
91
}
92
Flightgroup
&
operator=
(
Flightgroup
&other );
93
~Flightgroup
();
94
};
95
96
class
CreateFlightgroup
97
{
98
public
:
99
Flightgroup
*
fg
;
100
int
terrain_nr
;
//which terrain to use. -1 for normal unit -2 for mission ter
101
enum
{
UNIT
,
VEHICLE
,
BUILDING
}
unittype
;
102
int
waves
,
nr_ships
;
//number of waves, number of ships per wave
103
float
rot
[3];
104
class
easyDomNode
*
domnode
;
105
};
106
107
#endif
108
src
cmd
script
flightgroup.h
Generated on Fri May 29 2015 23:07:15 for Vegastrike 0.5.1 rc1 by
1.8.4