a537629d50
(nstr_exec_val): Failed to update category when evaluating symbolic
...
value.
2004-08-24 18:40:29 +00:00
498fe97332
(chr_camap): Make table names differ from file empfile[] names, so
...
that they properly identify the dump.
2004-08-24 18:29:09 +00:00
083ce69713
(dchr_ca, intrchr_ca, rpt_ca, tchr_ca): New.
...
(chr_camap): Use them, but disable rpt_ca[], since rpt[] lacks a
sentinel.
(xhdr): Print `XDUMP' rather than `DUMP' to avoid confusion with old
dumps. Don't print human readable timestamp.
2004-08-24 15:31:56 +00:00
b74f48fcc9
(improve): Fix confusing diagnostics when refusing to improve defense
...
because option DEFENSE_INFRA is off.
(improve): Simplify use of `value' to avoid compiler warning.
2004-08-24 08:23:09 +00:00
01e7ea7916
(move, explore): Simplify computation of destination sector's work and
...
loyalty to get rid of compiler warnings.
2004-08-24 07:08:59 +00:00
c06b330426
(sect_ca): Fix selector che.
2004-08-24 05:54:11 +00:00
eaa90d0590
(getsect, putsect, getsectp): Remove superflous casts, parenthesize
...
macro parameters properly.
2004-08-23 18:35:50 +00:00
dcfd251f95
caddr_t is obsolete. Replace by void *, except for struct empfile
...
member cache, which becomes char * to keep pointer arithmetic simple.
2004-08-23 18:29:44 +00:00
059353e957
(sctstr, sect_ca): Make sct_mines signed for same reasons as
...
sct_item[] (see sect.h rev. 1.10).
2004-08-23 15:50:32 +00:00
Ron Koenderink
4c4d5b7b94
Removed unnecessary #ifdef's for Windows.
2004-08-21 22:10:10 +00:00
b39e9ba094
(nstr_exec): Fix the previous rev.
2004-08-21 15:06:37 +00:00
ba9748027b
(NSC_STRINGY): New.
...
(nstr_promote, nstr_exec_val): Implement.
(nstr_exec_val): Ignored IDX for NSC_STRING values.
(nstr_exec): Implement NSC_STRING.
(ship_ca): New selector name.
2004-08-21 14:09:31 +00:00
7c4433c54b
(sect_ca): New selectors loyal, access.
...
(NSC_GENITEM): New selector radius.
(ship_ca): New selectors nland, access, xbuilt, ybuilt, builder.
(plane_ca): New selectors access, theta.
(land_ca): New selectors react, nland, access.
(lost_ca): New selector id.
2004-08-21 13:35:35 +00:00
75c03fba80
Doc clarifications.
2004-08-21 13:25:57 +00:00
d12995ff68
Reorder selectors to match struct member order, for easier consistency
...
checking.
2004-08-21 12:50:58 +00:00
3e5c0643db
(NSC_EXTRA): New.
...
(sect_ca, NSC_GENITEM, plane_ca, land_ca): Use it for aliases and
cached functions of tech.
(xdflds, xdfldnam): Skip NSC_EXTRA fields.
2004-08-21 12:36:13 +00:00
cd23036995
(ldump): Remove superflous casts.
2004-08-21 12:07:42 +00:00
930b30591a
(NSC_NATID): New.
...
(sect_ca, NSC_GENITEM, nuke_ca, treaty_ca, loan_ca, news_ca, lost_ca,
commodity_ca, trade_ca, nat_ca): Use it. Fixes sector selector
che_target.
(NSC_IELT, NSC_GENITEM, ship_ca, plane_ca, nuke_ca, treaty_ca,
news_ca, lost_ca, commodity_ca, trade_ca, nat_ca): Fix initializers
for ca_type. Harmless signed/unsigned mismatches, except for plane
selectors att, def, nuke selector types, treaty selector exp, news
selector time, commodity selectors type, xbuy, ybuy.
(commodity_ca): Remove NSC_DEITY from selector price.
2004-08-21 11:59:23 +00:00
0bd79fe5f3
(xdeval): Use NSC_NOTYPE instead of 0.
...
(xdprval): Cope with NSC_TYPEID. Check for bad types.
2004-08-21 11:48:59 +00:00
b523740a2b
Doc fixes & clarifications.
2004-08-21 11:47:17 +00:00
56be9a66b6
(plchr): Fix the previous rev.
2004-08-21 06:51:49 +00:00
5e381b6c57
(PLANENAMES, opt_PLANENAMES, Options, plchrstr, plchr_ca, plchr,
...
main): Remove nooption PLANENAMES.
2004-08-21 06:48:34 +00:00
914e21cdfd
(xdprval): Passed ptrdiff_t as field width.
2004-08-21 06:20:25 +00:00
Ron Koenderink
7cba668c39
(delete_old_announcements, copy_and_expire): Split off
...
copy_and_expire() to simplify cleanup. Previously, cleanup was
missing or incomplete on many less common code paths, which leaked
file descriptors and memory, and could corrupt the anno file. Use
stdio instead of POSIX I/O for writing. Check for I/O errors
properly. Treat bad telegram type just like bad telegram length (give
up). Closes #1013234 .
2004-08-21 00:44:20 +00:00
Marc Olzheim
739a695241
Combine the definitions of include/optlist.h and the use thereof in
...
src/lib/gen/emp_config.c into a single file: include/econfig-spec.h.
2004-08-20 15:44:24 +00:00
19f567bccf
Comments, cosmetics.
2004-08-20 13:18:28 +00:00
fe50838824
(xdump): New command xdump (experimental).
...
(player_coms): Add xdump under #if 0.
2004-08-20 12:39:16 +00:00
612f2dadb8
(valstr): Replace member val_as.off by val_as.sym, which contains
...
offset and index. This is for the new dumps; conditions can't use it,
yet.
(nstr_comp_val): Zero index.
(nstr_exec_val): Implement index.
(nstr_exec_val): Simplify coercion to WANT.
2004-08-20 12:21:04 +00:00
d1bf11a015
(loan_owed): New, factored out common code.
...
(coll, fina, repa, shark, disloan): Use it.
2004-08-20 11:46:01 +00:00
2feef76102
Use plain char * instead of s_char *.
2004-08-20 08:55:23 +00:00
bcc4a86944
(fina, repa, shark): Bankers never round down debts!
...
(repa, coll): Collect interest for the time the debtor is idling at
sub-prompts.
2004-08-20 08:47:00 +00:00
e7c9da21e5
(loan_owed): New, factored out common code.
...
(coll, fina, repa, shark, disloan): Use it.
2004-08-20 08:16:34 +00:00
e502056dab
(fina, repa, disloan): Fix the previous rev.
2004-08-20 07:11:18 +00:00
fcbe36e76c
(coll, fina, repa, shark, disloan): Fix calculation of regular and
...
extended (beyond due date) loan time. At the due date, or after a
last payment made at the due date, durations were zero in fina() and
unpredictable elsewhere. With luck, debtors could abuse this to repay
loans cheap (they couldn't gain cash, though), sharks to purchase
loans cheap, and creditors to collect excessively.
2004-08-20 07:01:26 +00:00
ef0060ec57
(tran_nuke, tran_plane, set, sell, move): Use military_control().
...
(tran_plane): Fix message for attempting to transport a plane in a
sector not owned by the player.
2004-08-19 18:12:28 +00:00
766538bc2f
(ship_bomb): Clarify.
2004-08-19 18:02:30 +00:00
ffeac61020
(SHOULD_PRODUCE): Silly. Simplify and inline at only call site.
2004-08-19 18:01:55 +00:00
5a725c9177
(nullify_objects): Use SCT_MAXDEF instead of sct_maxno. Loop no
...
longer covers the extra empty slots at the end of the dchr[]; doesn't
matter.
(sct_maxno): Unused, remove.
2004-08-19 17:45:36 +00:00
77a9f94c69
(calc_all): Change all parameters into out-parameters. Previously,
...
caller had to zero some. Caller changed.
(goodsect): Remove; use sct_typematch() instead.
(change_prio): New.
(budg): Use it to replace ugly and confusing priority change code.
(budg): Use prexpense() for industries as well. Fixes cost output
alignment bug.
(budg): Use splur() & friends.
2004-08-19 17:33:29 +00:00
0ebb14c8be
(PRI_SMAINT, PRI_PMAINT, PRI_LMAINT, PRI_SBUILD, PRI_PBUILD,
...
PRI_LBUILD): Turn macros into enumeration constants. Value
SCT_MAXDEF+1 was previously unused; use it.
(PRI_MAX): New; replacing the horrible SCT_MAXDEF+8.
(show_sect_build): Simply examine all sector types, don't skip the
first five. The code ignores them just fine.
(show_sect_build, show_sect_stats, show_sect_capab): Don't try to show
sector types beyond SCT_MAXDEF. The table has some empty extra slots,
for whatever reasons; no use examining them.
2004-08-19 16:59:36 +00:00
cff2deba4a
(main): Don't initialize budget priorities of unused nations; leave
...
that to add() like all the other initializations.
2004-08-19 15:49:43 +00:00
48a9ef7c04
(deliver): Grant packing bonus only to efficient sectors, as
...
everywhere else.
2004-08-19 12:40:35 +00:00
95d1d10591
Use plain char * instead of s_char *. Doc clarifications.
2004-08-17 19:22:43 +00:00
ec752ac390
Silence harmless compiler warning.
2004-08-17 19:00:18 +00:00
ed5c1b00ee
Remove dead code.
2004-08-17 18:59:52 +00:00
e1ebe41686
(M_TORP_SHELLS, SHP_TORP_SHELLS): Rename.
2004-08-17 18:45:04 +00:00
cdad6db4ac
(pln_onewaymission, carriersatxy): Change to match ordinary sorties:
...
offer carriers regardless of the sector they're in, require carriers
to be efficient. Closes #875376 .
2004-08-17 18:34:53 +00:00
4fd7da248a
(SHP_AIROPS_EFF, LND_AIROPS_EFF): New. Use it instead of literal 50.
2004-08-17 18:31:32 +00:00
90a61e245f
(real): Support argument #' in addition to
<NUMBER>' and
...
`#<NUMBER>'.
2004-08-17 17:12:44 +00:00
91c316afaa
(msl_intercept): msl_hit() expects plain WHAT argument, without owner.
...
Passing it with owner gets the owner printed twice. Fix.
2004-08-17 16:57:43 +00:00