Commit graph

1091 commits

Author SHA1 Message Date
Ron Koenderink
14d94c2509 (sect_has_dock): New.
(fuel, load, nav_loadship): Use it.
2006-01-17 23:38:51 +00:00
Ron Koenderink
80be15204b (load): Fix the printing of city when describing loadable sectors.
Broken in Rev. 1.21.
2006-01-17 22:23: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
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
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
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
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
d21d7a0230 (set_target): Simplify using natarg(). 2006-01-06 18:07:30 +00:00
8a8fad04a4 (tele): Fix prompting for telegram recipient.
(tele): Spelling fix.
2006-01-06 17:53: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
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
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
7b6fbbc3d2 (cens, cens_hdr): Column fall used to be shown only with FALLOUT.
Show it always.
2006-01-05 16:03:51 +00:00
e5f9175394 (repo_header, repo_list): HIDDEN used to suppress column status.
Don't; report status with less detail for HIDDEN instead, like the
country command.
2006-01-05 15:36:49 +00:00
60680a6a2e (rela) Relation columns were slightly wider for opt_SLOW_WAR. Use
wider columns unconditionally.
2006-01-05 15:23:07 +00:00
3e400c018c Update copyright notice. 2006-01-05 13:36:57 +00:00
8b16c31223 Change nation status from bits to a simple enum:
(nat_status, STAT_UNUSED, STAT_VIS, STAT_ACTIVE): New.
(STAT_NEW, STAT_SANCT, STAT_GOD): Change into nat_status members.
(STAT_INUSE, STAT_NORM): Remove.
(natstr): Use new nat_status for nat_stat.
    New value       Old value
    STAT_UNUSED     0
    STAT_NEW        STAT_INUSE | STAT_NEW
    STAT_VIS        STAT_INUSE
    STAT_SANCT      STAT_INUSE | STAT_SANCT
    STAT_ACTIVE     STAT_INUSE | STAT_NORM
    STAT_GOD        STAT_INUSE | STAT_NORM | STAT_GOD
Users changed.
2006-01-04 22:49:42 +00:00
41c2c27376 (powe): Simplify. 2006-01-04 22:04:52 +00:00
78dd01ab8e (docountry): Telex country on nat_reserve editing unconditionally.
The condition was never true due to a coding mistake.  Other edits
don't have such conditions.
2006-01-04 21:25:23 +00:00
b69173eea4 (orig): Allow moving origin to another country's origin. This is a
superset of the offset command.
(offs): Redundant, underdocumented, remove.

(orig): Allow deities to reset origin to absolute 0,0.
2006-01-04 14:36:21 +00:00
9101fe2bd9 Fix the previous revision. 2006-01-03 19:07:53 +00:00
de8aea7a0f (xdvisible): New.
(xditem): Use it.  This plugs all known information leaks.  It also
avoids dumping of unused records.
2006-01-03 17:07:41 +00:00
Ron Koenderink
ce4190caf7 (info) [_WIN32]: Add brackets to ensure the right combination of
ORs and ANDs.

(apro) [_WIN32]: Remove space to fix formatting for logerror().
Fix printing type for lhitlim in the format string for logerror() call.
2006-01-01 19:55:53 +00:00
Ron Koenderink
f1d9a5eba3 (info, apro) [_WIN32]: Correct parameter order for calls
to logerror() where GetLastError() is used.
Change the format to "lu" for printing GetLastError().
2006-01-01 19:47:46 +00:00
3db4e34ba4 (natstr): Members nat_xstart, nat_ystart are used write-only. Remove.
Users changed.
2005-12-31 10:50:24 +00:00
Ron Koenderink
27fe2e7be6 (prod): Add material limit for resource depletion to prod()
that is in place in the normal update sequence.
2005-12-31 02:42:55 +00:00
acd2c7c2a8 (cuto, show_mission): Fix justification of coordinate output. 2005-12-30 17:28:24 +00:00
1969a3890a (opt_UPDATESCHED): Remove nooption UPDATESCHED. It had no effect on
the actual update, only on the update command.  Believed to be broken
since Empire2.
2005-12-29 13:38:57 +00:00
aff6cfcafe src/lib/commands/sona.c rev. 1.6 changed first argument of
line_of_sight() to char *.  The changeset failed to change callers.
Fix.
2005-12-28 22:43:39 +00:00
24a07cd249 player.h rev. 1.9 changed struct player member argp to char *. The
changeset failed to adapt some s_char * operands.  Fix.
2005-12-28 22:21:42 +00:00
0d267e0b24 There's no reason to include <time.h> in empio.h, except it's missing
in a couple of other files.  Include it where it's needed.
2005-12-28 21:25:39 +00:00
3aebb68ee7 Include config.h. 2005-12-27 18:04:19 +00:00
ade510f787 Turn options into ordinary econfig keys:
(configkeys): Add options.
(KM_OPTION): New.
(vers): Find options in configkeys[] instead of Options[].
(xdump): Remove xdump opt syntax.
(xdopt): Remove.
(emp_config, print_config): Remove option special case.
(option_list, Options, setoption): Remove.
2005-12-25 10:32:50 +00:00