36 lines
596 B
C
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);
|
|
|