Open source remastering of the Freespace 2 engine
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 */
12 #ifndef __FREESPACE_SWARM_H__
13 #define __FREESPACE_SWARM_H__
15 #include "globalincs/pstypes.h"
17 class object;
18 class ship_subsys;
20 typedef struct turret_swarm_info {
21  int flags;
34 typedef struct swarm_info {
35  int flags;
42  int path_num; // which path swarm missile is currently following
43  int homing_objnum; // object number that swarm missile is homing on, -1 if not homing
44  int change_time; // when swarm missile should next update direction, based on missile speed
45  float angle_offset;
46  float last_dist; // last distance to target
47 } swarm_info;
49 #define SWARM_DEFAULT_NUM_MISSILES_FIRED 4 // number of swarm missiles that launch when fired
51 #define MAX_SWARM_MISSILES 100
54 #define MAX_TURRET_SWARM_INFO 100
57 void swarm_level_init();
58 void swarm_delete(int index);
59 int swarm_create();
60 void swarm_update_direction(object *objp, float frametime);
61 void swarm_maybe_fire_missile(int shipnum);
64 void turret_swarm_delete(int i);
65 void turret_swarm_set_up_info(int parent_objnum, ship_subsys *turret, struct weapon_info *wip, int weapon_num);
68 #endif /* __FREESPACE_SWARM_H__ */
ship_subsys * target_subsys
Definition: swarm.h:29
void turret_swarm_check_validity()
Definition: swarm.cpp:632
float last_dist
Definition: swarm.h:46
int i
Definition: multi_pxo.cpp:466
int target_sig
Definition: swarm.h:27
void swarm_maybe_fire_missile(int shipnum)
Definition: swarm.cpp:90
void swarm_level_init()
Definition: swarm.cpp:52
GLuint index
Definition: Glext.h:5608
int path_num
Definition: swarm.h:42
int num_to_launch
Definition: swarm.h:23
int weapon_num
Definition: swarm.h:31
Definition: pstypes.h:88
int flags
Definition: swarm.h:35
int parent_objnum
Definition: swarm.h:24
void turret_swarm_delete(int i)
Definition: swarm.cpp:408
object * objp
Definition: lua.cpp:3105
void swarm_delete(int index)
Definition: swarm.cpp:165
vec3d last_offset
Definition: swarm.h:40
vec3d circle_uvec
Definition: swarm.h:39
struct turret_swarm_info turret_swarm_info
struct swarm_info swarm_info
unsigned int uint
Definition: pstypes.h:64
vec3d circle_rvec
Definition: swarm.h:39
void swarm_update_direction(object *objp, float frametime)
Definition: swarm.cpp:184
swarm_info Swarm_missiles[MAX_SWARM_MISSILES]
Definition: swarm.cpp:41
int homing_objnum
Definition: swarm.h:43
int parent_sig
Definition: swarm.h:25
int time_to_fire
Definition: swarm.h:30
int weapon_class
Definition: swarm.h:22
Definition: object.h:141
Definition: swarm.h:51
vec3d original_target
Definition: swarm.h:37
ship_subsys * turret
Definition: swarm.h:28
void turret_swarm_set_up_info(int parent_objnum, ship_subsys *turret, struct weapon_info *wip, int weapon_num)
Definition: swarm.cpp:423
int swarm_create()
Definition: swarm.cpp:136
int target_objnum
Definition: swarm.h:26
turret_swarm_info Turret_swarm_info[MAX_TURRET_SWARM_INFO]
Definition: swarm.cpp:43
int change_timestamp
Definition: swarm.h:36
int turret_swarm_create()
Definition: swarm.cpp:374
vec3d new_target
Definition: swarm.h:38
float angle_offset
Definition: swarm.h:45
int change_time
Definition: swarm.h:44
uint change_count
Definition: swarm.h:41
Definition: swarm.h:54