Freeciv21
Develop your civilization from humble roots to a global empire
spaceship.h File Reference
#include "bitvector.h"
#include "support.h"
#include "fc_types.h"
+ Include dependency graph for spaceship.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  player_spaceship
 
struct  sship_part_info
 
struct  spaceship_component
 

Macros

#define NUM_SS_STRUCTURALS   32
 
#define NUM_SS_COMPONENTS   16
 
#define NUM_SS_MODULES   12
 

Enumerations

enum  spaceship_state { SSHIP_NONE , SSHIP_STARTED , SSHIP_LAUNCHED , SSHIP_ARRIVED }
 

Functions

 BV_DEFINE (bv_spaceship_structure, NUM_SS_STRUCTURALS)
 
void spaceship_init (struct player_spaceship *ship)
 Initialize spaceship struct; could also be used to "cancel" a spaceship (eg, if/when capital-capture effect implemented). More...
 
int num_spaceship_structurals_placed (const struct player_spaceship *ship)
 Count the number of structurals placed; that is, in ship->structure[]. More...
 
bool next_spaceship_component (struct player *pplayer, struct player_spaceship *ship, struct spaceship_component *fill)
 Find (default) place for next spaceship component. More...
 

Variables

const struct sship_part_info structurals_info [NUM_SS_STRUCTURALS]
 
const struct sship_part_info components_info [NUM_SS_COMPONENTS]
 
const struct sship_part_info modules_info [NUM_SS_MODULES]
 

Macro Definition Documentation

◆ NUM_SS_COMPONENTS

#define NUM_SS_COMPONENTS   16

Definition at line 85 of file spaceship.h.

◆ NUM_SS_MODULES

#define NUM_SS_MODULES   12

Definition at line 86 of file spaceship.h.

◆ NUM_SS_STRUCTURALS

#define NUM_SS_STRUCTURALS   32

Definition at line 84 of file spaceship.h.

Enumeration Type Documentation

◆ spaceship_state

Enumerator
SSHIP_NONE 
SSHIP_STARTED 
SSHIP_LAUNCHED 
SSHIP_ARRIVED 

Definition at line 77 of file spaceship.h.

Function Documentation

◆ BV_DEFINE()

BV_DEFINE ( bv_spaceship_structure  ,
NUM_SS_STRUCTURALS   
)

◆ next_spaceship_component()

bool next_spaceship_component ( struct player pplayer,
struct player_spaceship ship,
struct spaceship_component fill 
)

Find (default) place for next spaceship component.

Definition at line 79 of file spaceship.cpp.

Referenced by adv_spaceship_autoplace(), and spaceship_autoplace().

◆ num_spaceship_structurals_placed()

int num_spaceship_structurals_placed ( const struct player_spaceship ship)

Count the number of structurals placed; that is, in ship->structure[].

Definition at line 62 of file spaceship.cpp.

Referenced by do_spaceship_place(), and next_spaceship_component().

◆ spaceship_init()

void spaceship_init ( struct player_spaceship ship)

Initialize spaceship struct; could also be used to "cancel" a spaceship (eg, if/when capital-capture effect implemented).

Definition at line 45 of file spaceship.cpp.

Referenced by kill_player(), player_defaults(), sg_load_player_main(), and spaceship_lost().

Variable Documentation

◆ components_info

const struct sship_part_info components_info[NUM_SS_COMPONENTS]
extern

Definition at line 1 of file spaceship.cpp.

Referenced by next_spaceship_component(), and spaceship_calc_derived().

◆ modules_info

const struct sship_part_info modules_info[NUM_SS_MODULES]
extern

Definition at line 1 of file spaceship.cpp.

Referenced by next_spaceship_component(), and spaceship_calc_derived().

◆ structurals_info

const struct sship_part_info structurals_info[NUM_SS_STRUCTURALS]
extern

Definition at line 1 of file spaceship.cpp.

Referenced by do_spaceship_place(), and next_spaceship_component().