Commit graph

1490 commits

Author SHA1 Message Date
99975ef076 (EXEEXT): New.
(util, client, server): Use it.
2006-01-15 18:07:58 +00:00
441c314f1e (distclean): Clean up another rev. 1.11 leftover. 2006-01-15 18:02:01 +00:00
aa35988ec8 (distclean): Clean up rev. 1.11 leftover. 2006-01-15 12:57:49 +00:00
7203926ea4 The code to fail when new subject's file exists failed always. Fix. 2006-01-15 08:05:13 +00:00
0fe877e1cd Remove useless width from printf conversion %c. 2006-01-14 20:06:29 +00:00
9eba732cc3 (EF_COUNTRY, cou_ca): New.
(empfile): Add it.
(xdvisible): Deal with it.
(ef_open_srv, ef_close_srv): Set it up.
(ef_init_view, ef_fina_view): New.
2006-01-14 16:28:33 +00:00
21e3c9d55e Avoid compiler warnings triggered by the previous revision. 2006-01-14 16:13:30 +00:00
48c6a88768 Fix the previous revision. 2006-01-14 16:11:22 +00:00
Ron Koenderink
d6f5688b75 (sona): Simplify the memory allocation for rad[] and vis[].
No functional changes.
2006-01-14 15:50:16 +00:00
8a3dc2d846 (list_realm): Fix type of parameter curr (broken in rev. 1.9).
Simplify.
2006-01-14 15:30:18 +00:00
8b047abe53 (real): Fix the previous revision. 2006-01-14 15:20:24 +00:00
Ron Koenderink
4898eb65e5 (sona): Fix memory allocation for rad[] and vis[]. The space request
for rad[] and vis[] is too small because it did not consider the size
of the array element.  Broken in rev. 1.15.
2006-01-13 22:56:41 +00:00
Ron Koenderink
45adbdb00e Move realms from the nation file into a new realms file:
(boundstr, realmstr): Rename, new members ef_type, r_cnum, r_uid,
r_realm, r_timestamp.
(natstr): Remove member nat_b[].
(EF_REALM, realm_ca): New.
(empfile): Add it.
(ef_open_srv, ef_close_srv, main): Deal with new file.
(getrealm, putrealm): New.
(add, new, real, list_realm, sarg_getrange): Use them.
2006-01-13 13:18:56 +00:00
Ron Koenderink
04a8b84592 (ship_bomb, deli, do_demo, fuel, grin, look_ship)
(ltend, multifire, quite_bigdef, mine, landmine)
(do_loan, prod, printdiff, sell, sona, stre)
(tend, fire_dchrg, vers, work, ac_planedamage)
(ac_shipflak, ask_off, get_mine_dsupport, att_fight)
(ask_move_in_off, detonate, sd, land_gun)
(land_unitgun, lnd_fort_interdiction, lnd_fortify)
(perform_mission, pln_mine, pln_mobcost)
(retreat_ship1, retreat_land1, shp_sweep)
(shp_fort_interdiction, shp_missle_defense)
(new_work, growfood, upd_land, land_repair)
(get_materials, do_mob_ship, do_mob_land)
(load_it, unload_it, prod_plane, produce)
(guerrilla, upd_buildeff, spread_fallout)
(upd_ship, ship_repair, min, dmin, MIN):
Remove min() and dmin() functions and replace
with a MIN macro in misc.h.  Remove local MIN
macros and use the new one in misc.h.  This
change removes the need for the special
case for _WIN32.

(fuel, look_ship, multifire, mission, sona)
(plane_sona, ef_open, player_accept, player_main)
(ac_dog, att_get_combat, calc_mobcost)
(ask_move_in_off, intelligence_report)
(build_mission_list_type, perform_mission)
(show_mission, use_supply, dodistribute)
(allocate_memory, max, dmax, MAX):
Remove max() and dmax() functions and replace
with a MAX macro in misc.h.  Remove local MAX
macros and use the new one in misc.h.  This
change removes the need for the special
case for _WIN32.
2006-01-12 14:23:55 +00:00
Ron Koenderink
b89de57d51 (EF_BAD, EF_SECTOR, EF_SHIP, EF_PLANE, EF_LAND, EF_NUKE)
(EF_NEWS, EF_TREATY, EF_TRADE, EF_POWER, EF_NATION)
(EF_LOAN, EF_MAP, EF_BMAP, EF_COMM, EF_LOST)
(EF_SECTOR_CHR, EF_SHIP_CHR, EF_PLANE_CHR)
(EF_LAND_CHR, EF_NUKE_CHR, EF_NEWS_CHR)
( EF_TREATY_FLAGS, EF_ITEM, EF_INFRASTRUCTURE)
(EF_PRODUCT, EF_TABLE, EF_SHIP_CHR_FLAGS)
(EF_PLANE_CHR_FLAGS, EF_LAND_CHR_FLAGS)
(EF_NUKE_CHR_FLAGS, EF_META)
(EF_META_TYPE, EF_META_FLAGS, EF_MISSIONS)
(EF_PLANE_FLAGS, EF_RETREAT_FLAGS, EF_NATION_FLAGS)
(EF_NATION_RELATIONS, EF_LEVEL, EF_AGREEMENT_STATUS)
(EF_PLAGUE_STAGES, EF_PACKING, EF_RESOURCES)
(EF_NATION_STATUS, EF_MAX): Turn into enumeration constants.
2006-01-10 19:53:34 +00:00
Ron Koenderink
a9c98f6c9e (acce): Remove unused variable 'n'. 2006-01-08 22:07:49 +00:00
Ron Koenderink
e28c14f023 (L_XLIGHT, lchr[], land_chr_flags[], take_plane_off_land,
put_plane_on_land, load_plane_land, can_fly):
Remove L_XLIGHT flag and replace with checks of lnd_maxlight.
Closes #758459.
2006-01-08 19:12:04 +00:00
Ron Koenderink
cf384676e8 (xuloadrow): Add support for NSC_SHORT. 2006-01-08 04:11:15 +00:00
c3ff418ed2 (share_incr): Simplify country status check for tech bleed
participation.  Only STAT_SANCT and STAT_ACTIVE receive, and only
STAT_ACTIVE bleed.  Both used to be STAT_NEW, STAT_SANCT, STAT_ACTIVE.
2006-01-07 09:35:39 +00:00
cd668a99a6 (age_levels): Simplify country status check for leaking tech. Don't
leak to countries in state STAT_NEW.
2006-01-07 09:26:49 +00:00
604fe007c0 (acce, rea, rela, snxtitem): Pass NULL as prompt when the prompt won't
be used.
2006-01-06 21:37:40 +00:00
1b63d30a51 (edit): natarg() no longer supports access to unused countries. Do
it by hand.  Switch to natargp() while we're at it.

(docountry): Remove redundant parameter nat.

(prnat): Change parameter from natid to struct natstr.
2006-01-06 21:31:11 +00:00
1b9641d6d1 (natargp): Only return countries in use. Unused countries could lead
to confusing output and were useless except perhaps for the edit
command.
2006-01-06 21:16:49 +00:00
ad05ff70a1 (acce): Use natargp() rather than natarg(), because acce() should not
require contact.

(acce): Used to show only contacted active and deity countries, except
for #0.  Change to show all countries, to match current version of
reject.
2006-01-06 21:08:18 +00:00
c3d5ed801c (reje): Do not require contact. Closes #890722. 2006-01-06 21:00:50 +00:00
39ce96c63d (nati): Use natargp() rather than natarg(), to avoid pointless
complaints about lack of contact.

(nati): Improve not-deity error message and change error code to
RET_FAIL.
2006-01-06 20:46:31 +00:00
35941f97eb (new): Simplify using new natargp().
(new): Use RET_OK instead of literal 0.

(new, isok, ok): s_char purge.
2006-01-06 20:36:53 +00:00
402c47b66e (natargp): New, factored out of natarg(). 2006-01-06 20:27:17 +00:00
ba554cbb1f (natarg): Use new cnumb() values to improve diagnostics. 2006-01-06 20:11:14 +00:00
87aa405823 (status): src/lib/subs/mtch.c rev. 1.10 broke deity commands that
require CAP or MONEY.  Fix by setting them in ncomstat.
2006-01-06 20:07:13 +00:00
ffa21cf379 (cnumb): Return the same error values as stmtch(). Callers don't
(yet) care for the difference.
2006-01-06 19:42:27 +00:00
c949d84774 (cnumb): Ignore countries not in use instead of countries with empty
names.  Clearer and safer.
2006-01-06 19:40:24 +00:00
d21d7a0230 (set_target): Simplify using natarg(). 2006-01-06 18:07:30 +00:00
c791849595 (rejectname): Use static storage duration for rejects[]. 2006-01-06 17:58:21 +00:00
8a8fad04a4 (tele): Fix prompting for telegram recipient.
(tele): Spelling fix.
2006-01-06 17:53:45 +00:00
4f3007c6a7 Clarify syntax. 2006-01-06 17:50:10 +00:00
a9f96eaaaf (player_coms): Fix c_form for telegram. 2006-01-06 17:50:10 +00:00
1ab98751cd (natarg): No caller distinguishes between the two different failure
values.  Simplify to just one.
2006-01-06 17:47:45 +00:00
011f88fec8 (acce, flash, nati, new, rela): Don't bother to complain about bad
country argument, natarg() does that.

(acce, flash, nati, rela): natarg() ensures getnatp() succeeds, no
need to check.
2006-01-06 17:44:31 +00:00
e3443c78eb (tele): Treat telegram to country not yet contacted as failure. This
matches behavior of other commands.
2006-01-06 17:03:47 +00:00
6a5d398c6d (natarg): Don't attempt to hide names of countries not yet contacted
with HIDDEN.

(natarg): Clearer error messages.
2006-01-06 17:00:18 +00:00
8e5d576fff (nxtitemp): Use void * for generic pointer function value. 2006-01-06 16:55:17 +00:00
e66d0bfb83 (shar): Fix prompting for first argument. 2006-01-06 16:10:52 +00:00
7b7608d5ca (check, tryprdiff): Rename. Remove parameter buf, just print.
Callers changed.
2006-01-06 15:48:26 +00:00
53c3101e77 (stats): Remove, simply pass around natstr * instead.
(repo): Don't suppress part of the header if the report is empty and
HIDDEN is disabled.

(repo, repo_list): Concentrate decision whether to report on a country
in repo().

(repo_header): Simplify.

(repo_list): Remove redundant parameter cn.

(repo_list, printdiff): Move reporting on self from printdiff() to
repo_list().

(repo_list): Simplify.  Move research value one character to the right
for player->god, to match format of the report on self.

(printdiff): Remove redundant parameter ours.
2006-01-06 15:34:37 +00:00
57808ef10c (set_target): Improve rejection message. 2006-01-06 14:20:03 +00:00
8d578153c7 (cede): Require recipient is in STAT_ACTIVE. Should not make a
difference, because the recipient must have suitable assets nearby,
but is clearer.
2006-01-06 13:47:32 +00:00
b94b3b1b7f (mchrstr, lchrstr): Change element types of m_item[] and l_item[] to
short, to match shp_item and lnd_item.
(mchr_ca, lchr_ca): Replace selector item by selectors for the items.
lchr_ca's item selector was incorrect and worked only by accident.
2006-01-05 16:49:52 +00:00
f6987ca3ef (news): Used to silently ignore argument when HIDDEN is enabled.
Complain and fail instead.

(news): Treat non-numeric argument like zero, not like no argument,
for consistency with other commands.
2006-01-05 16:22:43 +00:00
c6979cb0e0 (output, translate_continents): When BLITZ is enabled, country numbers
in the newcap script used to be permuted so that start islands are
ordered from top left to bottom right.  Undocumented, unobvious.
Deathtrap if a deity disables BLITZ after running fairland for a real
game.  Remove.
2006-01-05 16:10:39 +00:00