Lephisto/src/ship.h
Allanis 85bec426ba [Add] libxml for ship data etc.
[Fix] Memory leaks.
[Fix] fixed #1 For dear old KonoM.
2013-01-31 01:30:51 +00:00

36 lines
596 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.
FP thrust, turn, speed;
// Graphics.
gl_texture* gfx_ship, *gfx_target;
// Characteristics.
int crew;
int mass;
// Health.
FP armor, armor_regen;
FP shield, shield_regen;
FP energy, energy_regen;
// Capacity.
int cap_cargo, cap_weapon;
} Ship;
int ships_load(void);
void ships_free(void);
Ship* get_ship(const char* name);