Lephisto/src/ship.h

36 lines
612 B
C

#pragma once
#include "def.h"
#include "opengl.h"
enum ship_class { SHIP_CLASS_NULL, SHIP_CLASS_CIVILIAN };
typedef enum ship_class ship_class;
typedef struct {
char* name; // Ship name.
ship_class class; // Ship class.
// Movement.
double thrust, turn, speed;
// Graphics.
gl_texture* gfx_ship, *gfx_target;
// Characteristics.
int crew;
int mass;
// Health.
double armor, armor_regen;
double shield, shield_regen;
double energy, energy_regen;
// Capacity.
int cap_cargo, cap_weapon;
} Ship;
int ships_load(void);
void ships_free(void);
Ship* get_ship(const char* name);