Lephisto/src/ship.h
Allanis 998a1bf68b [Add] Rudimentary shooting. This needs some work.
[Add] Layers should be working properly.
2013-02-05 16:50:56 +00:00

54 lines
914 B
C

#pragma once
#include "main.h"
#include "outfit.h"
#include "opengl.h"
enum ship_class {
SHIP_CLASS_NULL,
SHIP_CLASS_CIV_LIGHT,
SHIP_CLASS_CIV_MEDIUM,
SHIP_CLASS_CIV_HEAVY
};
typedef enum ship_class ship_class;
// Small wrapper for the outfits.
typedef struct ShipOutfit {
struct ShipOutfit* next; // Linked list.
Outfit* data; // Data itself.
int quantity;
} ShipOutfit;
// Ship structure.
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;
// Outfits
ShipOutfit* outfit;
} Ship;
int ships_load(void);
void ships_free(void);
Ship* get_ship(const char* name);