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

Go to the source code of this file.

Functions

static void mech_defend (int, int, int *, int, const Planet &, int, int, const Sector &)
 
static void mech_attack_people (Ship *, int *, int *, Race *, Race *, const Sector &, int, int, int, char *, char *)
 
static void people_attack_mech (Ship *, int, int, Race *, Race *, const Sector &, int, int, char *, char *)
 
void arm (const command_t &argv, GameObj &g)
 
void move_popn (const command_t &argv, GameObj &g)
 
void walk (const command_t &argv, GameObj &g)
 
int get_move (char direction, int x, int y, int *x2, int *y2, const Planet &planet)
 
static void mech_attack_people (Ship *ship, int *civ, int *mil, racetype *Race, racetype *alien, const Sector &sect, int x, int y, int ignore, char *long_msg, char *short_msg)
 
static void people_attack_mech (Ship *ship, int civ, int mil, racetype *Race, racetype *alien, const Sector &sect, int x, int y, char *long_msg, char *short_msg)
 
void ground_attack (racetype *Race, racetype *alien, int *people, int what, population_t *civ, population_t *mil, unsigned int def1, unsigned int def2, double alikes, double dlikes, double *astrength, double *dstrength, int *casualties, int *casualties2, int *casualties3)
 

Function Documentation

◆ arm()

void arm ( const command_t argv,
GameObj g 
)

Definition at line 39 of file move.cc.

References control(), getplanet(), getsector(), putplanet(), putrace(), and putsector().

Here is the call graph for this function:

◆ get_move()

int get_move ( char  direction,
int  x,
int  y,
int *  x2,
int *  y2,
const Planet planet 
)

Definition at line 624 of file move.cc.

Referenced by moveship_onplanet().

Here is the caller graph for this function:

◆ ground_attack()

void ground_attack ( racetype Race,
racetype alien,
int *  people,
int  what,
population_t civ,
population_t mil,
unsigned int  def1,
unsigned int  def2,
double  alikes,
double  dlikes,
double *  astrength,
double *  dstrength,
int *  casualties,
int *  casualties2,
int *  casualties3 
)

Definition at line 832 of file move.cc.

References morale_factor().

Referenced by move_popn(), and unload_onto_alien_sector().

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

◆ mech_attack_people() [1/2]

static void mech_attack_people ( Ship ,
int *  ,
int *  ,
Race ,
Race ,
const Sector ,
int  ,
int  ,
int  ,
char *  ,
char *   
)
static

◆ mech_attack_people() [2/2]

static void mech_attack_people ( Ship ship,
int *  civ,
int *  mil,
racetype Race,
racetype alien,
const Sector sect,
int  x,
int  y,
int  ignore,
char *  long_msg,
char *  short_msg 
)
static

Definition at line 724 of file move.cc.

References morale_factor(), retal_strength(), and use_destruct().

Referenced by mech_defend(), and walk().

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

◆ mech_defend()

static void mech_defend ( int  Playernum,
int  Governor,
int *  people,
int  type,
const Planet p,
int  x2,
int  y2,
const Sector s2 
)
static

Definition at line 680 of file move.cc.

References mech_attack_people(), people_attack_mech(), putship(), and retal_strength().

Referenced by move_popn().

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

◆ move_popn()

void move_popn ( const command_t argv,
GameObj g 
)

Definition at line 150 of file move.cc.

References adjacent(), control(), deductAPs(), enufAP(), getplanet(), getsector(), ground_attack(), mech_defend(), putplanet(), putrace(), and putsector().

Here is the call graph for this function:

◆ people_attack_mech() [1/2]

static void people_attack_mech ( Ship ,
int  ,
int  ,
Race ,
Race ,
const Sector ,
int  ,
int  ,
char *  ,
char *   
)
static

◆ people_attack_mech() [2/2]

static void people_attack_mech ( Ship ship,
int  civ,
int  mil,
racetype Race,
racetype alien,
const Sector sect,
int  x,
int  y,
char *  long_msg,
char *  short_msg 
)
static

Definition at line 779 of file move.cc.

References do_collateral(), morale_factor(), retal_strength(), and use_destruct().

Referenced by mech_defend(), and walk().

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

◆ walk()

void walk ( const command_t argv,
GameObj g 
)

Definition at line 449 of file move.cc.

References deductAPs(), enufAP(), getplanet(), getsector(), mech_attack_people(), people_attack_mech(), post(), putplanet(), putrace(), putsector(), putship(), retal_strength(), testship(), use_destruct(), and use_fuel().

Here is the call graph for this function: