#include <time.h>#include "item.h"#include "queue.h"#include "retreat.h"#include "types.h"Include dependency graph for ship.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Data Structures | |
| struct | shpstr |
| struct | mchrstr |
Defines | |
| #define | SHP_TYPE_MAX 46 |
| #define | SHIP_MINEFF 20 |
| #define | AN_AUTONAV bit(2) |
| #define | AN_STANDBY bit(3) |
| #define | AN_LOADING bit(4) |
| #define | AN_SCUTTLE bit(5) |
| #define | TMAX 6 |
| #define | MAXSHPPATH 28 |
| #define | MAXSHPNAMLEN 24 |
| #define | M_FOOD bit(0) |
| #define | M_TORP bit(1) |
| #define | M_DCH bit(2) |
| #define | M_FLY bit(3) |
| #define | M_MSL bit(4) |
| #define | M_OIL bit(5) |
| #define | M_SONAR bit(6) |
| #define | M_MINE bit(7) |
| #define | M_SWEEP bit(8) |
| #define | M_SUB bit(9) |
| #define | M_LAND bit(11) |
| #define | M_SUBT bit(12) |
| #define | M_TRADE bit(13) |
| #define | M_SEMILAND bit(14) |
| #define | M_OILER bit(17) |
| #define | M_SUPPLY bit(18) |
| #define | M_CANAL bit(19) |
| #define | M_ANTIMISSILE bit(20) |
| #define | getship(n, p) ef_read(EF_SHIP, (n), (p)) |
| #define | putship(n, p) ef_write(EF_SHIP, (n), (p)) |
| #define | getshipp(n) ((struct shpstr *)ef_ptr(EF_SHIP, (n))) |
| #define | SHP_DEF(b, t) |
| #define | SHP_SPD(b, t) |
| #define | SHP_VIS(b, t) (b * (1 - (sqrt(t) / 50))) |
| #define | SHP_RNG(b, t) |
| #define | SHP_FIR(b, t) |
| #define | SHP_BLD_WORK(lcm, hcm) (20 + (lcm) + 2 * (hcm)) |
| #define | CN_NAVIGABLE 0 |
| #define | CN_LANDLOCKED 1 |
| #define | CN_CONSTRUCTION 2 |
| #define | CN_ERROR -1 |
Enumerations | |
| enum | { SHP_AIROPS_EFF = 50, SHP_TORP_SHELLS = 3 } |
Variables | |
| mchrstr | mchr [46+2] |
| #define AN_AUTONAV bit(2) |
Definition at line 51 of file ship.h.
Referenced by cmd_sail_ship(), foll(), nav_check_atdest(), nav_ship(), orde(), qorde(), show_sail(), and sorde().
| #define AN_LOADING bit(4) |
Definition at line 53 of file ship.h.
Referenced by load_it(), nav_check_atdest(), nav_loadship(), nav_ship(), orde(), sorde(), and swap().
| #define AN_SCUTTLE bit(5) |
Definition at line 54 of file ship.h.
Referenced by nav_check_atdest(), orde(), qorde(), scuttle_it(), and sorde().
| #define AN_STANDBY bit(3) |
Definition at line 52 of file ship.h.
Referenced by cmd_sail_ship(), foll(), nav_ship(), orde(), and sorde().
| #define CN_CONSTRUCTION 2 |
Definition at line 182 of file ship.h.
Referenced by retreat_ship1(), shp_check_nav(), and shp_nav().
| #define CN_ERROR -1 |
| #define CN_LANDLOCKED 1 |
Definition at line 181 of file ship.h.
Referenced by fuel(), retreat_ship1(), sail_nav_fleet(), shp_check_nav(), shp_nav(), and shp_nav_one_sector().
| #define CN_NAVIGABLE 0 |
Definition at line 180 of file ship.h.
Referenced by retreat_ship1(), sail_nav_fleet(), shp_check_nav(), shp_nav(), and shp_nav_one_sector().
| #define getship | ( | n, | |||
| p | ) | ef_read(EF_SHIP, (n), (p)) |
Definition at line 160 of file ship.h.
Referenced by ac_planedamage(), anti_torp(), att_approach(), att_combat_eff(), att_get_combat(), att_move_in_off(), auto_fuel_ship(), boar(), board_abort(), calc_mobcost(), check_ship_ok(), check_trade(), detonate(), do_defdam(), edit(), fly(), foll(), laun(), launch_missile(), lnd_postread(), mission_pln_equip(), msl_hit(), multifire(), pinflak_planedamage(), plane_sona(), pln_airbase_ok(), pln_equip(), pln_newlanding(), pln_oneway_to_carrier_ok(), pln_onewaymission(), pln_postread(), pln_put(), print_shiplist(), put_combat(), resupply_commod(), retreat_ship(), sail_nav_fleet(), scut(), ship_bomb(), shp_missdef(), shp_nav(), shp_prewrite(), tend_land(), torp(), and use_ammo().
| #define getshipp | ( | n | ) | ((struct shpstr *)ef_ptr(EF_SHIP, (n))) |
Definition at line 162 of file ship.h.
Referenced by do_fallout(), fltp_to_list(), look_ship(), mob_ship(), planerepair(), prod_ship(), sail_find_fleet(), sail_nav_fleet(), sail_ship(), and upd_slmilcosts().
| #define M_ANTIMISSILE bit(20) |
| #define M_CANAL bit(19) |
| #define M_DCH bit(2) |
Definition at line 138 of file ship.h.
Referenced by candchrg(), canshoot(), multifire(), and perform_mission().
| #define M_FLY bit(3) |
Definition at line 139 of file ship.h.
Referenced by carrier_planes(), fit_plane_on_ship(), and init_mchr().
| #define M_FOOD bit(0) |
Definition at line 136 of file ship.h.
Referenced by nav_load_ship_at_sea(), unit_view(), and upd_ship().
| #define M_LAND bit(11) |
| #define M_MSL bit(4) |
Definition at line 142 of file ship.h.
Referenced by carrier_planes(), fit_plane_on_ship(), and init_mchr().
| #define M_OIL bit(5) |
Definition at line 143 of file ship.h.
Referenced by nav_load_ship_at_sea(), unit_view(), and upd_ship().
| #define M_SEMILAND bit(14) |
| #define M_SONAR bit(6) |
Definition at line 144 of file ship.h.
Referenced by do_unit_move(), look_ship(), perform_mission(), plane_sona(), radar(), shp_nav_one_sector(), and sona().
| #define M_SUB bit(9) |
Definition at line 147 of file ship.h.
Referenced by ac_encounter(), ac_shipflak(), anti_torp(), asw_shipsatxy(), board_abort(), candchrg(), canshoot(), cantorp(), coas(), detonate(), do_fallout(), do_unit_move(), fire_dchrg(), fire_torp(), laun(), launch_missile(), load_land_ship(), look_ship(), most_valuable_ship(), msl_hit(), multifire(), notify_coastguard(), only_subs(), perform_mission(), pin_bomb(), plane_sona(), prsub(), quiet_bigdef(), radmap2(), satdisp_units(), satmap(), sd(), ship_bomb(), shp_fort_interdiction(), shp_hardtarget(), shp_interdict(), sona(), tend_land(), torp(), and use_ammo().
| #define M_SUBT bit(12) |
Definition at line 150 of file ship.h.
Referenced by canshoot(), cantorp(), perform_mission(), and torp().
| #define M_SUPPLY bit(18) |
| #define M_SWEEP bit(8) |
Definition at line 146 of file ship.h.
Referenced by retreat_ship1(), shp_hit_mine(), and shp_sweep().
| #define M_TRADE bit(13) |
Definition at line 151 of file ship.h.
Referenced by buil(), orde(), payo(), scra(), scut(), scuttle_it(), show_ship_build(), show_ship_capab(), and show_ship_stats().
| #define MAXSHPNAMLEN 24 |
| #define putship | ( | n, | |||
| p | ) | ef_write(EF_SHIP, (n), (p)) |
Definition at line 161 of file ship.h.
Referenced by ac_shipflak(), att_approach(), att_move_in_off(), auto_fuel_ship(), boar(), build_ship(), cede_ship(), check_trade(), cmd_sail_ship(), cmd_unsail_ship(), count_planes(), count_units(), detonate(), do_defdam(), fire_dchrg(), fire_torp(), flee(), foll(), fuel(), launch_missile(), load(), load_land_ship(), ltend(), mine(), mission_pln_equip(), mobq(), msl_hit(), multifire(), name(), nav_ship(), orde(), perform_mission(), pln_dropoff(), pln_equip(), pln_newlanding(), put_combat(), put_plane_on_ship(), resupply_commod(), retr(), retreat_ship(), retreat_ship1(), s_commod(), sail_nav_fleet(), scra(), scuttle_ship(), sd(), ship_bomb(), shp_check_one_mines(), shp_damage_one(), shp_mess(), shp_missile_defense(), shp_nav_one_sector(), shp_sel(), shp_sweep(), sona(), supgr(), take_plane_off_ship(), takeover_ship(), tend(), tend_land(), torp(), and use_ammo().
| #define SHIP_MINEFF 20 |
Definition at line 47 of file ship.h.
Referenced by anti_torp(), asw_shipsatxy(), att_approach(), build_ship(), carriersatxy(), count_planes(), count_units(), doship(), get_assembly_point(), launch_missile(), lnd_postread(), multifire(), num_shipsatxy(), pln_postread(), pln_put(), prod_ship(), retreat_ship1(), shipsatxy(), shp_prewrite(), torp(), and upd_ship().
| #define SHP_BLD_WORK | ( | lcm, | |||
| hcm | ) | (20 + (lcm) + 2 * (hcm)) |
Definition at line 177 of file ship.h.
Referenced by build_ship(), shiprepair(), show_ship_build(), and supgr().
| #define SHP_DEF | ( | b, | |||
| t | ) |
| #define SHP_FIR | ( | b, | |||
| t | ) |
| #define SHP_RNG | ( | b, | |||
| t | ) |
| #define SHP_SPD | ( | b, | |||
| t | ) |
| #define SHP_VIS | ( | b, | |||
| t | ) | (b * (1 - (sqrt(t) / 50))) |
| #define TMAX 6 |
Definition at line 57 of file ship.h.
Referenced by build_ship(), nav_loadship(), orde(), qorde(), swap(), unload_it(), and vers().
| anonymous enum |
Definition at line 185 of file ship.h.
00185 { 00186 SHP_AIROPS_EFF = 50, /* min. efficiency for air ops */ 00187 SHP_TORP_SHELLS = 3 /* number of shells used by a torpedo */ 00188 };
Definition at line 47 of file ship.c.
Referenced by ac_encounter(), ac_shipflak(), anti_torp(), asw_shipsatxy(), att_get_combat(), auto_fuel_ship(), buil(), build_ship(), candchrg(), canshoot(), cantorp(), carg(), carrier_planes(), coas(), detonate(), do_fallout(), do_mob_ship(), do_unit_move(), doship(), ef_elt_byname(), emp_obj_chr_name(), fire_dchrg(), fire_torp(), fit_plane_on_ship(), fltp_to_list(), fuel(), gen_power(), get_empobj_chr(), init_mchr(), laun(), launch_missile(), load_comm_ship(), load_it(), load_land_ship(), load_plane_ship(), look_ship(), ltend(), make_new_list(), mine(), mission(), msl_hit(), multifire(), nav_load_ship_at_sea(), nav_ship(), num_shipsatxy(), orde(), payo(), plane_sona(), pln_dropoff(), print_shiplist(), prship(), prsub(), qorde(), quiet_bigdef(), radar(), radmap2(), retr(), retreat_ship1(), s_commod(), satdisp_units(), satmap(), scra(), scut(), scuttle_it(), scuttle_tradeship(), sd(), shi(), ship_bomb(), shiprepair(), shipsatxy(), show_sail(), shp_check_nav(), shp_hardtarget(), shp_missdef(), shp_missile_defense(), shp_sel(), shp_set_tech(), sona(), sorde(), sstat(), starv_ships(), supgr(), tend(), tend_land(), torp(), trade_nameof(), unit_type_name(), upd_ship(), and use_ammo().
1.5.2