1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113
|
/*
* Species_Defs.h
* Extended Species Support for FS2 Open
*
* You may not sell or otherwise commercially exploit the source or things you
* create based on the source.
*
*/
#ifndef _SPECIES_DEFS_H_
#define _SPECIES_DEFS_H_
#include "gamesnd/gamesnd.h"
#include "globalincs/globals.h"
#include "globalincs/pstypes.h"
#include "graphics/generic.h"
#include "hud/hudparse.h"
#include "mission/missionbriefcommon.h"
// for bitmap thrusters
typedef struct thrust_pair_bitmap {
generic_bitmap normal;
generic_bitmap afterburn;
} thrust_pair_bitmap;
// for animated thrusters
typedef struct thrust_pair {
generic_anim normal;
generic_anim afterburn;
} thrust_pair;
typedef struct thrust_info {
thrust_pair flames;
thrust_pair glow;
} thrust_info;
// Currently the only species-specific feature not in species_info is ship debris. This is because
// ship debris chunks are treated as asteroids and tied so tightly into the asteroid code that
// separating them makes the code much more complicated.
class species_info
{
public:
char species_name[NAME_LENGTH];
int default_iff;
float awacs_multiplier;
union {
struct {
int r, g, b;
} rgb;
int a1d[3];
} fred_color;
generic_bitmap debris_texture;
generic_anim shield_anim;
thrust_info thruster_info;
// Bobboau's thruster stuff
thrust_pair_bitmap thruster_secondary_glow_info;
thrust_pair_bitmap thruster_tertiary_glow_info;
thrust_pair_bitmap thruster_distortion_info;
int warpin_params_index;
int warpout_params_index;
// the members below this comment are not parsed in species_defs.tbl
game_snd snd_flyby_fighter;
game_snd snd_flyby_bomber;
int borrows_flyby_sounds_species;
int bii_indices[MIN_BRIEF_ICONS];
int borrows_bii_index_species; // species that this species borrows all of its briefing icons from, -1 if none
// countermeasures by species
char cmeasure_name[NAME_LENGTH];
int cmeasure_index;
// ditto for support ships - naomimyselfandi
char support_ship_name[NAME_LENGTH];
int support_ship_index;
species_info()
{
warpin_params_index = -1;
warpout_params_index = -1;
for (int i = 0; i < MIN_BRIEF_ICONS; i++)
bii_indices[i] = -1;
cmeasure_name[0] = '\0';
cmeasure_index = -1;
support_ship_name[0] = '\0';
support_ship_index = -1;
borrows_bii_index_species = -1;
borrows_flyby_sounds_species = -1;
}
};
extern SCP_vector<species_info> Species_info;
// load up the species_defs.tbl into the correct data areas
// IMPORTANT: If Num_species != 3, icons.tbl, asteroid.tbl, and sounds.tbl have to be modified to compensate!
void species_init();
int species_info_lookup(const char *species_name);
#endif
|