Galactic Bloodshed
Classes | Macros | Typedefs | Functions | Variables
rst.cc File Reference
#include "gb/commands/rst.h"
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include "gb/GB_server.h"
#include "gb/buffers.h"
#include "gb/build.h"
#include "gb/files_shl.h"
#include "gb/fire.h"
#include "gb/getplace.h"
#include "gb/order.h"
#include "gb/races.h"
#include "gb/ships.h"
#include "gb/shlmisc.h"
#include "gb/shootblast.h"
#include "gb/tweakables.h"
#include "gb/vars.h"
Include dependency graph for rst.cc:

Go to the source code of this file.

Classes

struct  reportdata
 

Macros

#define PLANET   1
 

Typedefs

using report_array = std::array< char, NUMSTYPES >
 

Functions

static void Free_rlist ()
 
static int Getrship (player_t, governor_t, shipnum_t)
 
static int listed (int, char *)
 
static void plan_getrships (player_t, governor_t, starnum_t, planetnum_t)
 
static void ship_report (GameObj &, shipnum_t, const report_array &)
 
static void star_getrships (player_t, governor_t, starnum_t)
 
void rst (const command_t &argv, GameObj &g)
 

Variables

static const char Caliber [] = {' ', 'L', 'M', 'H'}
 
static char shiplist [256]
 
static unsigned char Status
 
static unsigned char SHip
 
static unsigned char Stock
 
static unsigned char Report
 
static unsigned char Weapons
 
static unsigned char Factories
 
static unsigned char first
 
static bool Tactical
 
static struct reportdatard
 
static int enemies_only
 
static int who
 

Macro Definition Documentation

◆ PLANET

#define PLANET   1

Definition at line 33 of file rst.cc.

Typedef Documentation

◆ report_array

using report_array = std::array<char, NUMSTYPES>

Definition at line 53 of file rst.cc.

Function Documentation

◆ Free_rlist()

static void Free_rlist ( )
static

Definition at line 557 of file rst.cc.

References rd.

Referenced by rst().

Here is the caller graph for this function:

◆ Getrship()

static int Getrship ( player_t  Playernum,
governor_t  Governor,
shipnum_t  shipno 
)
static

Definition at line 541 of file rst.cc.

References reportdata::n, rd, reportdata::s, reportdata::type, reportdata::x, and reportdata::y.

Referenced by plan_getrships(), rst(), and star_getrships().

Here is the caller graph for this function:

◆ listed()

static int listed ( int  type,
char *  string 
)
static

Definition at line 559 of file rst.cc.

Referenced by ship_report().

Here is the caller graph for this function:

◆ plan_getrships()

static void plan_getrships ( player_t  Playernum,
governor_t  Governor,
starnum_t  snum,
planetnum_t  pnum 
)
static

Definition at line 509 of file rst.cc.

References getplanet(), Getrship(), reportdata::n, reportdata::p, reportdata::pnum, rd, reportdata::s, reportdata::star, reportdata::type, reportdata::x, and reportdata::y.

Referenced by rst(), and star_getrships().

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

◆ rst()

void rst ( const command_t argv,
GameObj g 
)

Definition at line 65 of file rst.cc.

References enemies_only, Factories, first, Free_rlist(), Getrship(), Numships(), plan_getrships(), rd, Report, reportdata::s, SHip, star_getrships(), Status, Stock, Tactical, Weapons, and who.

Here is the call graph for this function:

◆ ship_report()

static void ship_report ( GameObj g,
shipnum_t  indx,
const report_array rep_on 
)
static

Definition at line 192 of file rst.cc.

References Caliber, current_caliber(), Dispshiploc_brief(), Factories, first, hit_odds(), listed(), reportdata::n, reportdata::p, reportdata::pnum, rd, Report, reportdata::s, SHip, shiplist, reportdata::star, Status, Stock, Tactical, reportdata::type, Weapons, and who.

Here is the call graph for this function:

◆ star_getrships()

static void star_getrships ( player_t  Playernum,
governor_t  Governor,
starnum_t  snum 
)
static

Definition at line 529 of file rst.cc.

References Getrship(), plan_getrships(), rd, and reportdata::s.

Referenced by rst().

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

Variable Documentation

◆ Caliber

const char Caliber[] = {' ', 'L', 'M', 'H'}
static

Definition at line 35 of file rst.cc.

Referenced by ship_report().

◆ enemies_only

int enemies_only
static

Definition at line 56 of file rst.cc.

Referenced by rst().

◆ Factories

unsigned char Factories
static

Definition at line 38 of file rst.cc.

Referenced by rst(), and ship_report().

◆ first

unsigned char first
static

Definition at line 38 of file rst.cc.

Referenced by rst(), and ship_report().

◆ rd

struct reportdata* rd
static

Definition at line 55 of file rst.cc.

Referenced by Free_rlist(), Getrship(), plan_getrships(), rst(), ship_report(), and star_getrships().

◆ Report

unsigned char Report
static

Definition at line 38 of file rst.cc.

Referenced by rst(), and ship_report().

◆ SHip

unsigned char SHip
static

Definition at line 38 of file rst.cc.

Referenced by rst(), and ship_report().

◆ shiplist

char shiplist[256]
static

Definition at line 36 of file rst.cc.

Referenced by ship_report().

◆ Status

unsigned char Status
static

Definition at line 38 of file rst.cc.

Referenced by rst(), and ship_report().

◆ Stock

unsigned char Stock
static

Definition at line 38 of file rst.cc.

Referenced by rst(), and ship_report().

◆ Tactical

bool Tactical
static

Definition at line 40 of file rst.cc.

Referenced by rst(), and ship_report().

◆ Weapons

unsigned char Weapons
static

Definition at line 38 of file rst.cc.

Referenced by rst(), and ship_report().

◆ who

int who
static

Definition at line 56 of file rst.cc.

Referenced by rst(), and ship_report().