Commit graph

753 commits

Author SHA1 Message Date
345ad3dfe0 Update copyright notice. 2005-03-16 22:03:16 +00:00
6b68f73ca8 Doc fix. 2005-03-12 18:06:31 +00:00
0595ff4d4e Indentation fixes. 2005-03-12 15:05:23 +00:00
256724c39f (multifire, new): Reseeding the PRNG with the current time is not a
good idea.  Letting players trigger it is an extraordinarily bad idea.
Remove.
2005-03-11 17:01:38 +00:00
Ron Koenderink
6fb90fb62c (newe): Remove wforce, not used anymore. 2005-03-10 22:25:58 +00:00
7f000ce9cc Fix ugly line breaks. 2005-03-10 19:17:15 +00:00
Ron Koenderink
0b172c6553 (NS_ALL) [_WIN32]: Change NS_EVERYTHING back to NS_ALL, #undef NS_ALL to prevent conflict with winsock2.h 2005-03-08 00:04:43 +00:00
Ron Koenderink
55e6aca9e0 (wrmakesrc,wripglob,wrgamesdef,info,apro,mobupdate,rea,turn
upda,ef_open,logerror,emp_config,match_user,show_motd,gamedown,
typed_wu,delete_old_announcements,mobility_check,mobility_init,
allocate_memory,write_newcap_script,main,files,fairland,doconfig,)
[_WIN32]: Switchback to default mode of text.
"t" (text) is not included the ISO/ANSI C standard but "b" (binary)
is included.
2005-03-02 12:47:15 +00:00
Ron Koenderink
df7dc203c4 (turn): Change to stdio.
(turn): Always close the file after attempting to write.
Fixes bug where the file is not close when there is writing
error.
2005-02-28 23:21:05 +00:00
0aaf0084aa (as_extend, as_costcomp, gen_power, powcmp): Fix non-portable function
cast.
(qsort_func_t): Unused, remove.
2005-02-24 18:47:26 +00:00
b360d076d3 (ship_bomb): Clarify. Also gets rid of compiler warning. 2005-02-24 17:55:28 +00:00
58512e4813 First step towards generalizing NSC_TYPEID to arbitrary dictionaries.
(nsc_cat) New category NSC_ID.
(nstr_comp): Resolve identifiers instead of relying on nstr_comp_val()
and nstr_coerce_val().
(valstr, nstr_coerce_val): Remove valstr member val_as_type.
(nstr_parse_val, nstr_match_ca, nstr_match_val, nstr_resolve_id)
(nstr_resolve_sel, nstr_mkselval): New.
(nstr_comp_val): Rewrite using the above.
2005-02-24 16:14:53 +00:00
929b3ba412 (retr): Use RET_GROUP instead of literal 1. No functional changes. 2005-02-23 15:27:19 +00:00
4113cdab5c Fix bad line break. No functional changes. 2005-02-23 15:26:36 +00:00
39a2710482 (reco): Fix check for empty flight path. Aborting the command at the
flight path prompt now works.

(reco): Pass P_ESC to pln_arm() for consistency with call of pln_sel()
and similar code elsewhere.  Believed not to make a difference.
2005-02-23 15:17:27 +00:00
Ron Koenderink
bca00f35f5 (powe): Do not round totals for deity countries. 2005-02-22 01:28:43 +00:00
Ron Koenderink
aebdf80864 (powe): Fix the deity check to use player->god instead of
player->cnum == 0.  Partial Fix for #863419.
2005-02-21 20:35:37 +00:00
5ba8cab9b5 (total_work): Remove redundant conversion to int.
(total_work): New parameter maxpop.  Callers changed.
(newe, prod): Use total_work().  Old code failed to limit military
workers, thus didn't match the update.
(do_feed): Simplify.
2005-02-20 19:36:41 +00:00
43d07b458d (prod): Widen column will make so that product p_sname is not
truncated.
2005-02-20 18:51:55 +00:00
c46c6cf87e (prod): Several columns were too narrow, and didn't align properly for
large values.  Remove column wkfc to make space, widen other columns.
Columns use2, use3 and max2, max3 lack separating space on the left
for large values, which don't occur in normal game configurations.
2005-02-20 18:39:59 +00:00
e5804f8dd8 (prod, produce, upd_ship): struct pchrstr p_nrndx refers to u_char,
not s_char.  Fix types.

(upd_ship): Catch resource underflow (should not happen).
2005-02-19 17:28:30 +00:00
ff67d93711 (max_population): New, factored out of max_pop().
(max_pop): Use it.  Don't support null argument anymore.
(nati, gen_power): Use max_population() instead of max_pop() with null
argument.
(show_sect_stats): Use max_population() to simplify the code.
(prod, upd_buildeff): Use max_population() to get correct new maximum
population for limiting work when tearing down a big city.
Previously, this was broken in upd_buildeff().  In prod(), it was
broken when the new designation had odd maximum population, which
should not occur.
2005-02-17 21:04:08 +00:00
f8b2860ec5 (prod, nati): Use max_pop() instead of hardcoded values. Before,
struct dchrstr member d_maxpop had no effect in some cases.
2005-02-13 18:25:30 +00:00
41da51e548 (newe): Fix for max_pop() > 999. 2005-02-13 18:25:14 +00:00
afa65c8f27 Break inclusion cycles. To simplify the change, move a few
declarations to other, no less sensible places.
2005-02-12 19:26:59 +00:00
858839f063 (dchr_ca): New selector maxpop. 2005-02-12 17:06:21 +00:00
aa26c53e47 (multifire): If firing at a submarine with something that can't drop
depth charges, don't disclose the target is a submarine.  Old code
allowed players to find all submarine uids.
2005-02-12 16:43:08 +00:00
Ron Koenderink
c0618aec6e (news, fina): Report bad conditionals as syntax error. Closes #775475. 2005-01-06 02:09:30 +00:00
Ron Koenderink
c99a5b4f43 (tend_nxtitem,nxtitem,sarg_type,snxtitem,snxtitem_all,snxtsct,nxtitemp):
change NS_ALL to NS_EVERYTHING in ns_seltype because of a
conflict with winsock2.h which is used in the WIN32 build.
2004-12-31 20:14:10 +00:00
Ron Koenderink
9b56e4d5a0 (rea): Add brackets to prevent 'else' ambiguity. 2004-12-31 14:12:34 +00:00
Ron Koenderink
667b137216 (new) [_WIN32]: Rely on misc.h to provide BSD random functions. 2004-12-30 13:57:04 +00:00
Ron Koenderink
7a95982a21 (multifire) [_WIN32]: Rely on misc.h to provide BSD random functions.
(multifire): switch the random seeding with the current random
value to seeding with the current time.  Seeding with the
current random value does not actually improve the randomness.
2004-12-30 13:53:46 +00:00
Ron Koenderink
cc1a92e512 (rea): Code cleanup. 2004-12-30 01:43:39 +00:00
Ron Koenderink
1a8488bc45 (main,mobility_check,upda,turn,rea,mobupdate,ef_open,logerror,
emp_config,gamedown,show_motd,match_user,typed_wu,
delete_old_announcements) [_WIN32]: switch the default file mode to
binary to match POSIX.  Remove the now unneccessary ifdef for
the open/fopen. Add text mode for user files (econfig/auth).
2004-12-30 01:31:03 +00:00
6ce77efd82 Fix rev. 1.5's placement of braces. No functional changes. 2004-12-21 12:23:01 +00:00
Ron Koenderink
537735f512 switched comment from // format to /* */ format. 2004-12-21 03:16:18 +00:00
46608d6c83 (ORBIT, opt_ORBIT, Options, launch_sat, pdump, plan, prod_plane):
Remove nooption ORBIT.
2004-12-17 19:29:36 +00:00
Marc Olzheim
09b73000c2 "(turn): Fix comparing the output of write() to an unsigned sizeof by
casting the sizeof to write's most used return-type (ssize_t). Introduce
a typedef for ssize_t for WIN32."
2004-12-17 15:39:28 +00:00
0ad644b11b (info): Polish output for ambigous topic argument. 2004-12-17 13:58:10 +00:00
b0ce8c0253 (xdump): Fail unless GUINEA_PIGS is enabled. 2004-12-16 22:05:15 +00:00
Ron Koenderink
2c4b89e2d1 (ac_calc_flak,ac_fireflak,pinflak_planedamage): New ac_calc_flak().
Move common flak damage code from ac_fireflak() and
pinflak_planedamage() to ac_calc_flak().
2004-12-16 19:40:06 +00:00
Marc Olzheim
d9f0f475da (turn): Change the command to allow for both an MOTD and a no-login
message.  Clean 'register' and 's_char' remnants on the way.
Circumvents bug #813167.
2004-12-16 14:17:08 +00:00
Ron Koenderink
b3f62f7d66 (ship_bomb): Prevent bombing of subs that where not found by the ASW plane. 2004-12-16 12:42:53 +00:00
Ron Koenderink
042372d4c2 (have_looked,have_found,set_have_looked,set_have_found,print_found):
collapse to shiplist function set (add,free,print,on). Fix bug where ship
uid was a unsigned char instead of short.  Switch to head pointer instead
of head record with a linked list. Add a free().
2004-12-16 11:12:28 +00:00
Ron Koenderink
8a8bf00c5e (scuttle_tradeship): Remove carriage return. 2004-12-15 03:00:08 +00:00
Marc Olzheim
1fbbccfe72 (prod): Fix bug #1083175. Use max_pop() not just when opt_RES_POP is
enabled to determine the new working population of a sector.
2004-12-14 19:45:47 +00:00
Marc Olzheim
7a593d9083 (orde,eta_calc): Remove unaccessed leftover variables nships,mcp.
No functional changes.
2004-12-14 17:47:03 +00:00
Marc Olzheim
0847b87afa (ship_bomb,land_bomb): Remove unaccessed leftover variables lcp,onsea.
No functional changes.
2004-12-14 17:43:54 +00:00
Marc Olzheim
70e1ee220f (scut): Remove unaccessed remnants from before 1.1. No functional changes. 2004-12-13 17:36:43 +00:00
Marc Olzheim
c6ef918f3a Cleanup #includes of (mostly a long time) unused header files.
No functional changes.
2004-12-13 16:47:13 +00:00