Galactic Bloodshed
Functions | Variables
load.cc File Reference
#include "gb/load.h"
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include "gb/GB_server.h"
#include "gb/buffers.h"
#include "gb/defense.h"
#include "gb/files_shl.h"
#include "gb/fire.h"
#include "gb/getplace.h"
#include "gb/land.h"
#include "gb/move.h"
#include "gb/races.h"
#include "gb/ships.h"
#include "gb/shlmisc.h"
#include "gb/tweakables.h"
#include "gb/utils/rand.h"
#include "gb/vars.h"
Include dependency graph for load.cc:

Go to the source code of this file.

Functions

static int jettison_check (GameObj &, int, int)
 
static int landed_on (Ship *, shipnum_t)
 
static void do_transporter (Race *, GameObj &, Ship *)
 
static void unload_onto_alien_sector (GameObj &, Planet *, Ship *, Sector &, int, int)
 
void load (const command_t &argv, GameObj &g)
 
void jettison (const command_t &argv, GameObj &g)
 
void dump (const command_t &argv, GameObj &g)
 
void transfer (const command_t &argv, GameObj &g)
 
void mount (const command_t &argv, GameObj &g)
 
void use_fuel (Ship *s, double amt)
 
void use_destruct (Ship *s, int amt)
 
void use_resource (Ship *s, int amt)
 
void rcv_fuel (Ship *s, double amt)
 
void rcv_resource (Ship *s, int amt)
 
void rcv_destruct (Ship *s, int amt)
 
void rcv_popn (Ship *s, int amt, double mass)
 
void rcv_troops (Ship *s, int amt, double mass)
 
static void do_transporter (racetype *Race, GameObj &g, Ship *s)
 

Variables

static char buff [128]
 
static char bufr [128]
 
static char bufd [128]
 
static char bufc [128]
 
static char bufx [128]
 
static char bufm [128]
 

Function Documentation

◆ do_transporter() [1/2]

static void do_transporter ( Race ,
GameObj ,
Ship  
)
static

◆ do_transporter() [2/2]

static void do_transporter ( racetype Race,
GameObj g,
Ship s 
)
static

Definition at line 916 of file load.cc.

References bufc, bufd, buff, bufm, bufr, bufx, putship(), rcv_destruct(), rcv_fuel(), rcv_resource(), use_destruct(), use_fuel(), and use_resource().

Referenced by load().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dump()

void dump ( const command_t argv,
GameObj g 
)

Definition at line 622 of file load.cc.

References deductAPs(), enufAP(), getplanet(), getsdata(), getstar(), putplanet(), and putstar().

Here is the call graph for this function:

◆ jettison()

void jettison ( const command_t argv,
GameObj g 
)

Definition at line 470 of file load.cc.

References do_shiplist(), enufAP(), jettison_check(), putship(), use_destruct(), use_fuel(), and use_resource().

Here is the call graph for this function:

◆ jettison_check()

static int jettison_check ( GameObj g,
int  amt,
int  max 
)
static

Definition at line 606 of file load.cc.

Referenced by jettison().

Here is the caller graph for this function:

◆ landed_on()

static int landed_on ( Ship s,
shipnum_t  shipno 
)
static

Definition at line 1029 of file load.cc.

Referenced by load().

Here is the caller graph for this function:

◆ load()

void load ( const command_t argv,
GameObj g 
)

Definition at line 37 of file load.cc.

References bufc, bufd, buff, bufm, bufr, do_shiplist(), do_transporter(), enufAP(), getplanet(), getsector(), landed_on(), overloaded(), putplanet(), putsector(), putship(), rcv_fuel(), rcv_resource(), and unload_onto_alien_sector().

Here is the call graph for this function:

◆ mount()

void mount ( const command_t argv,
GameObj g 
)

Definition at line 806 of file load.cc.

References do_shiplist(), and putship().

Here is the call graph for this function:

◆ rcv_destruct()

void rcv_destruct ( Ship s,
int  amt 
)

Definition at line 901 of file load.cc.

Referenced by do_habitat(), do_merchant(), and do_transporter().

Here is the caller graph for this function:

◆ rcv_fuel()

void rcv_fuel ( Ship s,
double  amt 
)

Definition at line 891 of file load.cc.

Referenced by do_merchant(), do_transporter(), doplanet(), and load().

Here is the caller graph for this function:

◆ rcv_popn()

void rcv_popn ( Ship s,
int  amt,
double  mass 
)

Definition at line 906 of file load.cc.

◆ rcv_resource()

void rcv_resource ( Ship s,
int  amt 
)

Definition at line 896 of file load.cc.

Referenced by do_habitat(), do_merchant(), do_transporter(), and load().

Here is the caller graph for this function:

◆ rcv_troops()

void rcv_troops ( Ship s,
int  amt,
double  mass 
)

Definition at line 911 of file load.cc.

◆ transfer()

void transfer ( const command_t argv,
GameObj g 
)

Definition at line 710 of file load.cc.

References deductAPs(), enufAP(), getplanet(), and putplanet().

Here is the call graph for this function:

◆ unload_onto_alien_sector()

static void unload_onto_alien_sector ( GameObj g,
Planet planet,
Ship ship,
Sector sect,
int  what,
int  people 
)
static

Definition at line 1033 of file load.cc.

References ground_attack(), and putrace().

Referenced by load().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ use_destruct()

void use_destruct ( Ship s,
int  amt 
)

Definition at line 881 of file load.cc.

Referenced by bombard(), defend(), do_merchant(), do_transporter(), fire(), jettison(), mech_attack_people(), people_attack_mech(), and walk().

Here is the caller graph for this function:

◆ use_fuel()

void use_fuel ( Ship s,
double  amt 
)

Definition at line 876 of file load.cc.

Referenced by bombard(), defend(), do_ap(), do_habitat(), do_merchant(), do_transporter(), do_weapon_plant(), fire(), give_orders(), jettison(), land(), launch(), moveship(), plow(), terraform(), and walk().

Here is the caller graph for this function:

◆ use_resource()

void use_resource ( Ship s,
int  amt 
)

Definition at line 886 of file load.cc.

Referenced by do_dome(), do_merchant(), do_repair(), do_transporter(), do_weapon_plant(), and jettison().

Here is the caller graph for this function:

Variable Documentation

◆ bufc

char bufc[128]
static

Definition at line 28 of file load.cc.

Referenced by do_transporter(), and load().

◆ bufd

char bufd[128]
static

Definition at line 28 of file load.cc.

Referenced by do_transporter(), and load().

◆ buff

char buff[128]
static

Definition at line 28 of file load.cc.

Referenced by do_transporter(), and load().

◆ bufm

char bufm[128]
static

Definition at line 28 of file load.cc.

Referenced by do_transporter(), and load().

◆ bufr

char bufr[128]
static

Definition at line 28 of file load.cc.

Referenced by do_transporter(), and load().

◆ bufx

char bufx[128]
static

Definition at line 28 of file load.cc.

Referenced by do_transporter().