Ron Koenderink [Thu, 13 Jul 2006 21:14:16 +0000 (21:14 +0000)]
[_WIN32, __GNUC__]: Reorganize the include files for WIN32 to
separate the MinGW environment from the MSVC environment and
WIN32 environment. Reorganize the order of the includes so
the system files are always loaded first to prevent with misc.h defines.
Remove system file includes from misc.h.
Ron Koenderink [Wed, 12 Jul 2006 18:14:31 +0000 (18:14 +0000)]
(do_map): New. map() was split into two parts map() and do_map().
(map): Call new function do_map().
(display_region_map): Modify to use do_map() instead of map().
(tran_nmap, tran_pmap, cmd_move_map): Modify to accomodate
the modified display_region_map() function.
Ron Koenderink [Tue, 11 Jul 2006 22:30:19 +0000 (22:30 +0000)]
[_WIN32, __GNU__]: Use <string.h> for strncasecmp for MinGW.
MinGW environment has an issue with conversion of strncasecmp()
to support _WIN32 and a definition in <string.h> for strncasecmp().
Poorly worded, many little errors, not enough focus. Rewrite,
basically. Same outline, but almost every sentence is changed.
Replace some details by references. Document show sect properly.
Don't refer to Innards, it's obsolete. Clarify work. Talk about
petrol, not petroleum. Advise that resource depletion is
configurable. Clean up prose somewhat.
Ron Koenderink [Mon, 10 Jul 2006 23:14:26 +0000 (23:14 +0000)]
(obj_nameof): New.
(nameofitem): Remove, switch callers to to obj_nameof().
(mission, show_mission): Convert functions to use obj_nameof()
instead of nameofitem().
Break inclusion cycle: prototypes.h and commands.h included each
other. Ensure headers in include/ can be included in any order
(except for econfig-spec.h, which is special). New header types.h to
help avoid inclusion cycles. Sort include directives. Remove some
superflous includes.
Ron Koenderink [Sun, 9 Jul 2006 18:24:31 +0000 (18:24 +0000)]
(tran_map, tran_nmap, tran_pmap): Split tran_map() into tran_nmap()
and tran_pmap() so that unit number arguments are interpreted
sensibly. Users changed.
(display_region_map): New.
(cmd_move_map, tran_nmap, tran_pmap): Use it.
(LND_AMM): Became weird in 4.2.3: ammo use depends on l_dam if l_ammo
is non-zero; actual value of non-zero l_ammo was unimportant. Side
effect: it substantially increased ammunition consumption at high
tech, because the change made the value increase with tech. Back out
4.2.3's change, just use l_ammo. This lets deities customize
ammunition consumption independent of damage. Remove second
parameter. Callers changed.
Ron Koenderink [Fri, 7 Jul 2006 15:15:43 +0000 (15:15 +0000)]
(nxtitemp, trade_getitem, trade_desc, trade_check_item_ok, nxtitem,
oprange, show_mission, nameofitem, build_mission_list_type,
unit_map, xdvisible, trdswitchown, ontradingblock, trad, check_trade,
unit_type_name, start_stop_unit, scut, scra, mission, multifire,
perform_mission, fuel, NSC_GENITEM): Replace struct genitem with
struct empobj. Remove genitem.h and create a new file empobj.h.
Replace multiple instances of unions of ef_type structures with
one standard union empobj_storage which is a superset of the individual
instances.
Ron Koenderink [Thu, 29 Jun 2006 13:46:03 +0000 (13:46 +0000)]
(march): Modify map and bmap command options for march() to support
an user specified land unit number.
Without an user specified land unit number it will still default to the leader.
This will map and bmap commands consistent with commands like radar
and look. This is the same feature that was added to navi().
Ron Koenderink [Thu, 29 Jun 2006 03:36:14 +0000 (03:36 +0000)]
(navi): Modify map and bmap command options for navi() to support
an user specified ship number.
Without an user specified ship number it will still default to the flagship.
This will make map and bmap commands consistent with commands
like radar, sonar and look.
Ron Koenderink [Sat, 24 Jun 2006 17:29:40 +0000 (17:29 +0000)]
(map, unit_map, draw_map, player_coms[]):
Modify nmap command to allow mapping around a nuke.
Add new command nbmap for bmapping around a nuke.
Add a new mapping flag 'n' for adding nukes to a map.
Correct syntax description for pmap, pbmap, lmap and lbmap
in player_coms[].
Support definition of additional sector types in sector.config,
missing bits:
(budg, calc_all, update_main): Use SCT_TYPE_MAX instead of SCT_MAXDEF
to size tables.
(map_char): Update sanity check; use CANT_HAPPEN().
(show_sect_build, show_sect_stats, show_sect_capab): Use the sentinel
instead of SCT_MAXDEF.
Support definition of additional sector types in sector.config:
(SCT_TYPE_MAX): New.
(dchr): Use it instead of SCT_MAXDEF to size the table.
(SCT_EFFIC): Likewise. Move from sect.h to budg.h.
Rewrite rev. 1.69 to suppress immutable field match check when
extending any table, empty or not:
(cur_obj_is_blank): New.
(fldval_must_match): Use it instead of initialized[].
(getobj): Set it along with cur_obj.
(setstr): Move fldval_must_match() down, so that cur_obj_is_blank is
defined.
(initialized): Remove.