FS2_Open
Open source remastering of the Freespace 2 engine
hudartillery.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) Volition, Inc. 1999. All rights reserved.
3  *
4  * All source code herein is the property of Volition, Inc. You may not sell
5  * or otherwise commercially exploit the source or things you created based on the
6  * source.
7  *
8 */
9 
10 
11 
12 #ifndef _FS2_HUD_ARTILLERY_HEADER_FILE
13 #define _FS2_HUD_ARTILLERY_HEADER_FILE
14 
15 #include "globalincs/globals.h"
16 #include "globalincs/pstypes.h"
17 
18 // -----------------------------------------------------------------------------------------------------------------------
19 // ARTILLERY DEFINES/VARS
20 //
21 
22 // SSM shapes
23 #define SSM_SHAPE_POINT 0
24 #define SSM_SHAPE_CIRCLE 1
25 #define SSM_SHAPE_SPHERE 2
26 
27 // global ssm types
28 typedef struct ssm_info {
29  char name[NAME_LENGTH]; // strike name
30  int count; // # of missiles in this type of strike
31  int max_count; // Maximum # of missiles in this type of strike (-1 for no variance)
32  int weapon_info_index; // missile type
33  float warp_radius; // radius of associated warp effect
34  float warp_time; // how long the warp effect lasts
35  float radius; // radius around the target ship
36  float max_radius; // Maximum radius around the target ship (-1.0f for no variance)
37  float offset; // offset in front of the target ship
38  float max_offset; // Maximum offset in front of the target ship (-1.0f for no variance)
43  int shape;
44 } ssm_info;
45 
46 // creation info for the strike (useful for multiplayer)
47 typedef struct ssm_firing_info {
49  SCP_vector<vec3d> start_pos; // start positions
50 
51  int count; // The ssm_info count may be variable; this stores the actual number of projectiles for this strike.
52  int ssm_index; // index info ssm_info array
53  class object* target; // target for the strike
54  int ssm_team; // team that fired the ssm.
55  float duration; // how far into the warp effect to fire
57 
58 // the strike itself
59 typedef struct ssm_strike {
60  SCP_vector<int> fireballs; // warpin effect fireballs
61  SCP_vector<bool> done_flags; // when we've fired off the individual missiles
62 
63  // this is the info that controls how the strike behaves (just like for beam weapons)
65 } ssm_strike;
66 
67 
69 
70 
71 // -----------------------------------------------------------------------------------------------------------------------
72 // ARTILLERY FUNCTIONS
73 //
74 
75 // level init
76 void hud_init_artillery();
77 
78 // update all hud artillery related stuff
80 
81 // render all hud artillery related stuff
83 
84 // start a subspace missile effect
85 void ssm_create(object *target, vec3d *start, size_t ssm_index, ssm_firing_info *override, int team);
86 
87 // Goober5000
88 extern int ssm_info_lookup(const char *name);
89 
90 #endif
SCP_vector< vec3d > start_pos
Definition: hudartillery.h:49
Definition: pstypes.h:88
int weapon_info_index
Definition: hudartillery.h:32
SCP_vector< int > fireballs
Definition: hudartillery.h:60
CButton * team
void hud_init_artillery()
GLenum GLuint GLenum GLsizei const GLchar * message
Definition: Glext.h:5156
void hud_artillery_update()
SCP_vector< int > delay_stamp
Definition: hudartillery.h:48
class object * target
Definition: hudartillery.h:53
float warp_radius
Definition: hudartillery.h:33
float warp_time
Definition: hudartillery.h:34
struct ssm_firing_info ssm_firing_info
float max_offset
Definition: hudartillery.h:38
float max_radius
Definition: hudartillery.h:36
float offset
Definition: hudartillery.h:37
SCP_vector< bool > done_flags
Definition: hudartillery.h:61
Definition: object.h:141
SCP_vector< ssm_info > Ssm_info
GLuint start
Definition: Gl.h:1502
GLuint const GLchar * name
Definition: Glext.h:5608
#define NAME_LENGTH
Definition: globals.h:15
float radius
Definition: hudartillery.h:35
GLenum target
Definition: Glext.h:6872
bool send_message
Definition: hudartillery.h:41
int sound_index
Definition: hudartillery.h:42
int ssm_info_lookup(const char *name)
struct ssm_strike ssm_strike
bool use_custom_message
Definition: hudartillery.h:40
struct ssm_info ssm_info
void hud_artillery_render()
int max_count
Definition: hudartillery.h:31
ssm_firing_info sinfo
Definition: hudartillery.h:64
void ssm_create(object *target, vec3d *start, size_t ssm_index, ssm_firing_info *override, int team)