Commit graph

  • 6d3f24f9d7 (prod): Rename variables to match produce() more closely. No functional changes. Markus Armbruster 2004-05-14 17:19:20 +00:00
  • 7f4e59fb8d (new_work, do_feed, prod, newe): Factor out calculation of work into new_work(). Markus Armbruster 2004-05-10 20:30:38 +00:00
  • b665d57de1 Should have been committed yesterday, together with sona.c. Markus Armbruster 2004-05-10 20:20:50 +00:00
  • 1639c26424 (multifire): After charging ship mobility (option NOMOBCOST off), the code sometimes failed to call putship(). Firing at ships was usually free. Markus Armbruster 2004-05-10 19:48:42 +00:00
  • d7e697b1f9 (M_TORP_SHELLS): New. (perform_mission, torp, fire_torp, quiet_bigdef, use_ammo): Use it. Closes #917459. Markus Armbruster 2004-05-09 20:55:30 +00:00
  • a6bd408323 (do_desi): Don't complain unless FOR_REAL. Closes #923105. Markus Armbruster 2004-05-09 20:19:54 +00:00
  • 6611a5c595 (stre): Always report mines to deities. Closes #917911. Markus Armbruster 2004-05-09 19:57:28 +00:00
  • 07f5489977 (opt_SHIP_DECAY, Options, shiprepair): Remove option SHIP_DECAY. Markus Armbruster 2004-05-09 19:06:48 +00:00
  • cca6abf934 (do_desi): Zap efficiency only when sct_type really changes. Closes #935750. Markus Armbruster 2004-05-09 17:00:16 +00:00
  • c6678f3899 (line_of_sight): Normalize coordinates before indexing. Closes #950514. Markus Armbruster 2004-05-09 15:54:00 +00:00
  • e4d1c38c96 (nstr_exec, nstr_comp_val, nstr_exec_val): Values of type NSTR aren't implemented and thus cannot occur. Document this more clearly. Markus Armbruster 2004-05-09 15:44:54 +00:00
  • b845997df3 Remove superflous include. Markus Armbruster 2004-05-09 15:22:17 +00:00
  • 60541ccfaf (flash, wall): Long arguments could smash the stack; fix insufficient buffers. Closes #940792. Markus Armbruster 2004-04-25 13:09:41 +00:00
  • 40c88d77d8 Don't try to let patch read from unreadable or nonexisting files. Marc Olzheim 2004-04-14 23:25:31 +00:00
  • ca80c373bf (comstr, buy, check_market, display_mark, reset, sell): Change comstr member com_type from mnemo character to item type. (whichitem): Unused, remove. Markus Armbruster 2004-04-10 18:48:30 +00:00
  • 988f9a8be7 (commfil, comminit, make): Unused, remove. Markus Armbruster 2004-04-10 17:07:43 +00:00
  • 60bbb6b0c0 (buy, mark, display_mark): Move argument evaluation from display_mark() to callers. buy() no longer accepts "all". It used to display all lots, but didn't let you buy any. Similar nonsense happened for "" if buy() prompted for it. Markus Armbruster 2004-04-10 08:43:19 +00:00
  • b0627a97cb (i_packing): New. Use where appropriate. (NPKG, WPKG, UPKG, BPKG, NUMPKG): Turn macros into enumeration constants. (NPKG, WPKG, UPKG, BPKG): Move from sect.h to item.h. Markus Armbruster 2004-04-09 06:30:21 +00:00
  • d12359938b (iop, iop_t): Unused, remove. Markus Armbruster 2004-04-08 19:53:17 +00:00
  • 70a87bb3b4 Remove types that no longer exist. Markus Armbruster 2004-04-08 19:47:51 +00:00
  • 647ca5cec2 (player_coms): Fix move and test syntax. Markus Armbruster 2004-04-08 19:30:12 +00:00
  • a8a6f5649f (item_by_name): New, factored out of whatitem(). Use it to simplify some uses of whatitem(). Markus Armbruster 2004-04-08 19:26:55 +00:00
  • e42f7e8210 (build_ship, orde, qorde, nav_loadship, load_it, unload_it): Store item types instead of mnemo characters in shpstr members shp_tstart[] and shp_tend[]. (com_num): No longer used, remove. Markus Armbruster 2004-04-08 19:14:09 +00:00
  • 7b42409c9a (I_NONE): New. To be used as item type error value and such. Markus Armbruster 2004-04-08 19:05:42 +00:00
  • 48175e9beb (getstring, getstarg): Use plain char * instead of s_char *. Markus Armbruster 2004-04-08 17:56:12 +00:00
  • 8f007f7095 (ac_doflak, ac_shipflak): Simplify, no functional changes. Markus Armbruster 2004-04-08 16:42:19 +00:00
  • b985192f6f (prod, upd_buildeff): Truncated work to even before sector building. Fix. Markus Armbruster 2004-04-08 16:31:31 +00:00
  • 5a0216893f (prod): The production limit due to work was rounded incorrectly. Ron Koenderink 2004-04-07 22:06:48 +00:00
  • 83478bd79e (OFFSET): Remove, use standard offsetof(). (SETOFF): Unused, remove. Markus Armbruster 2004-04-07 17:38:43 +00:00
  • 5d302eaad5 (strtox, strtoy): New. Use it instead of inputxy() to avoid the double-remainder problem: x-coordinate SHRT_MAX+1 is truncated to 0 by cast to coord, then converted by xabs(). This is wrong unless WORLD_X divides SHRT_MAX+1. (sarg_xy, sarg_getrange, sarg_range): Use them. (inputxy): No longer used, remove. Markus Armbruster 2004-04-07 17:13:47 +00:00
  • 543b0cba4f (NS_UNDEF, NS_LIST, NS_DIST, NS_AREA, NS_ALL, NS_XY, NS_GROUP): Turn macros into enumeration constants. (ns_seltype): New. Use where appropriate. Markus Armbruster 2004-04-06 21:37:52 +00:00
  • 276c188655 (snxtitem): Assigning NS_UNDEF to NP->type is an application domain type error not reflected in C. The former is a selection type, the latter is a file type. Harmless, as the variable is overwritten on all paths to successful return. Markus Armbruster 2004-04-06 18:47:54 +00:00
  • 392ad15567 Use CANT_HAPPEN() rather than logerror() for some internal errors. Markus Armbruster 2004-04-06 18:33:40 +00:00
  • acdee1e3b6 (weekday, daytime, daytime_range): New; replace kw_parse(). Parsing is somewhat stricter. (is_wday_allowed, is_daytime_allowed, is_daytime_nar, min_to_next_daytime): New. (demand_update_time, scheduled_update_time, next_scheduled_time, update_time, gamehours): Use them to replace kw_parse(). (kw_parse): No longer used, remove. Markus Armbruster 2004-04-04 15:52:26 +00:00
  • ded3daf70d (gamehours): All callers ignore the value assigned to hour[]. Remove parameter. Remove calls without effect. Other callers changed. Markus Armbruster 2004-04-04 14:20:30 +00:00
  • 2df3f002e1 (getminleft): Parameter hours unused since the previous rev., remove. Change parameter mpd from int * to int, because its only use is *mpd as r-value. Callers changed. Markus Armbruster 2004-04-04 14:07:51 +00:00
  • 05acaece48 (kw_read, kw_find, kwtab, kw_list): Were used to evaluate the hours file until 4.2.7. Since then kw_read() is unused, and kw_find() always returns NULL. Remove. kw_find() callers changed. Markus Armbruster 2004-04-04 13:54:30 +00:00
  • 5dec30d66c (player_coms): Fix survey syntax. Markus Armbruster 2004-04-04 11:13:43 +00:00
  • 5dbcb08904 Incomplete, inadequate, rewrite. Markus Armbruster 2004-04-04 11:12:18 +00:00
  • 4366c5ac6e Selector rewrite: values other than long, interpret identifiers according to context, to make `lstat * ?type#spy&spy>1' work. Closes bug#825363, #905809, #905814 and #922968. (nsc_type, packed_nsc_type, nsc_cat, packed_nsc_cat, nsc_flags): New. (valstr): New. Old code encoded values in type long, which was somewhat hard to read and could only support signed integer values. (nscstr): Redesign. Use valstr. Typed operator. (castr): Split ca_code into ca_type, ca_flags, ca_off. Tables changed. (nstr_comp, nstr_exec): Redesign and rewrite. Callers changed. They used the old design incorrectly, which let players smash the stack by supplying more than NCOND conditions. (encode, nstr_comp_val, decode, nstr_exec_val): Rename, redesign, and rewrite. Callers changed. (nstr_coerce_val): New. (var_ca, sect_ca, ship_ca, land_ca): Checking both var_ca[] and the object's ca complicates proper recognition of unique abbreviations. Copy contents of var_ca[] into the ca of objects, remove var_ca[]. Markus Armbruster 2004-04-02 19:02:12 +00:00
  • 47c8a32ae3 (debug): New. (main): Set it on -d. (oops, CANT_HAPPEN): New. Markus Armbruster 2004-04-02 15:40:43 +00:00
  • f1edf905e9 Firing from fortresses needs 5 mil, not 2. Closes bug#923723. Marc Olzheim 2004-04-01 08:12:14 +00:00
  • 1617ba7d4f Remove CVS keywords Source and Id. No functional change. Marc Olzheim 2004-03-23 19:08:38 +00:00
  • 4a4923f951 A sandbox system to automate the building of the source tree and reporting differences in compiler output with the output of the previous build. Marc Olzheim 2004-03-23 16:32:45 +00:00
  • 8ed9644253 Don't shadow existing variables. No functional changes. Marc Olzheim 2004-03-23 16:02:41 +00:00
  • 16761c8c29 (qprint): Change it into a printf()-like function. Simplify callers. No functional changes. From Marc Olzheim. Markus Armbruster 2004-03-23 15:20:17 +00:00
  • 0608bff5b4 (RANDOM, SRANDOM): New, to allow overriding the PRNG on the compiler command line for reproducible automated tests. This is expected to be a temporary solution until we get more capable system configuration. Callers of random(), srandom() changed. From Marc Olzheim. Markus Armbruster 2004-03-23 15:05:20 +00:00
  • 43c511e8ad (rnd_seed, main, parse_args, allocate_memory): New option -R to set the PRNG seed. Print the seed. From Marc Olzheim. Markus Armbruster 2004-03-23 14:54:48 +00:00
  • 0c47be1cb5 Use .ig to comment out stuff, it doesn't produce empty lines. v4.2.14 Markus Armbruster 2004-03-22 10:40:15 +00:00
  • 333f106137 Implement request ig, except for argument. Markus Armbruster 2004-03-22 10:34:49 +00:00
  • d5ef02c34f Fix markup. Markus Armbruster 2004-03-22 10:12:28 +00:00
  • 4ed5eed9c3 The previous revision screwed up intentation. Markus Armbruster 2004-03-22 09:54:58 +00:00
  • 16264e6ebe 4.2.14 last minute changes. Markus Armbruster 2004-03-22 09:21:24 +00:00
  • d6a2519342 Can't use gcc function attribute `format' when s_char is not plain char; gcc chokes on it. Markus Armbruster 2004-03-22 08:51:10 +00:00
  • 8454e6f54e (configkeys): Rev 1.5 failed to update member km_func for keys s_p_etu and adj_update. From Marc Olzheim. Markus Armbruster 2004-03-20 21:33:19 +00:00
  • abed385878 Fix RES_POP maximum population formula. Markus Armbruster 2004-03-20 21:23:26 +00:00
  • cae5cfbfab Document all undocumented capabilities and stats. Clarify meaning of land unit capability `light'. Closes #781116. Markus Armbruster 2004-03-20 21:21:32 +00:00
  • 18e460f3c7 Said `enemy civilians', but code happily lets you shoot your own civilians. Fix. Closes #905200. Markus Armbruster 2004-03-20 21:13:38 +00:00
  • 908e094a36 Delete lie about Steve still heading Wolfpack. Closes #902831. Markus Armbruster 2004-03-20 21:02:25 +00:00
  • 2d2a57fc0f Update for 4.2.14. Markus Armbruster 2004-03-17 07:29:39 +00:00
  • 382162fb0a Fix 4.2.10's release date to match doc/CHANGES4.X. Markus Armbruster 2004-03-17 07:24:40 +00:00
  • e5919ac353 (lwpStackCheckUsed): Fix confusing output. Markus Armbruster 2004-03-17 07:12:31 +00:00
  • 82bd722ec8 Should have been removed along with the commands. Markus Armbruster 2004-03-17 07:06:45 +00:00
  • 38a81836e1 Command has been commented out for ages. Remove until it isn't. Markus Armbruster 2004-03-17 07:06:45 +00:00
  • fe3e648e4c Regenerated. Markus Armbruster 2004-03-17 07:04:15 +00:00
  • 07dd220699 (main, write_newcap_script): Don't warn when resources were added, that's expected nowadays. Warn when resources were not added. Don't mention the ore program, as it doesn't work and we no longer distribute it. Markus Armbruster 2004-03-17 06:53:57 +00:00
  • b387ed3b6c (gen_power): Force mtime update under Windows. From Ron Koenderink. Markus Armbruster 2004-03-17 06:40:44 +00:00
  • 1dc9f35b06 Update to match code. There's currently no command that allows trade and commodity selectors; comment them out. Markus Armbruster 2004-03-16 21:24:30 +00:00
  • 16da32fd2e (loan_ca): Remove selector "sell". Markus Armbruster 2004-03-16 21:19:54 +00:00
  • a031aaa65c Talks about files that were removed. Remove. Markus Armbruster 2004-03-16 20:15:12 +00:00
  • 1b30679f05 (growfood): Simplify. Rev. 1.6 made it less robust against overflow; fix that. Markus Armbruster 2004-03-16 19:45:38 +00:00
  • 02d380d74f (produce): Fix consumed materials when production hits the 999 limit. This can't happen currently, because produce() never gets called with work>999. Markus Armbruster 2004-03-16 19:25:13 +00:00
  • 9b7a65b865 (buy, move, prod, dodistribute, produce): Obey ITEM_MAX. Previous change to move() was incomplete. Markus Armbruster 2004-03-16 18:56:14 +00:00
  • 913774e53e (play_list): Cast time_t to long for printing. Markus Armbruster 2004-03-12 06:14:52 +00:00
  • 98e72b6fa7 (sell): Simplify. Markus Armbruster 2004-03-11 22:12:49 +00:00
  • fa09979e36 Fix plague formula. Fix markup. Markus Armbruster 2004-03-11 22:10:58 +00:00
  • 91cc2ddc42 Remove unused variables and such. No functional changes. Markus Armbruster 2004-03-11 22:10:19 +00:00
  • 245b5a21e2 (getvec, putvec): No longer used, remove. Markus Armbruster 2004-03-11 22:08:16 +00:00
  • b62aca0ecd (produce_sect): Unless player->simulation, work directly on item arrays instead of copies made by getvec(). This is safe, because the old code made single copies and always flushed them back into the unit structures. Else make copies by hand, not with getvec. (starv_sects): Replace getvec() by direct, read-only item access. (upd_buildeff, enlist, materials_charge, materials_cost, produce, grow_people, growfood, trunc_people, do_feed, feed_people): Change argument type to match uncopied item arrays. (growfood): Obey ITEM_MAX. Markus Armbruster 2004-03-11 22:00:58 +00:00
  • 61d57719c2 (feed_people): Simplify. No functional changes. Markus Armbruster 2004-03-11 20:20:35 +00:00
  • eb94c88806 (do_fallout, meltitems): Work directly on item arrays instead of copies made by getvec(). This is safe, because the old code made single copies and always flushed them back into the unit structures. Markus Armbruster 2004-03-11 18:36:43 +00:00
  • c922b571db (upd_ship, upd_land, do_plague): Work directly on item arrays instead of copies made by getvec(). This is safe, because the new code changes the item array precisely when the old code writes back a changed copy. (starv_ships, starv_units): Replace getvec() by direct, read-only item access. (feed_ship, feed_land): Remove parameter vec, work with sp->shp_item[] and lp->lnd_item[] instead. (plague_people): Change argument type to match uncopied item arrays. Markus Armbruster 2004-03-11 18:10:25 +00:00
  • 979f74709b (infect_people): Remove parameters vec, eff, mobil and work with sp->sct_item, sp->sct_effic, sp->sct_mobil instead. This is safe, because the only caller passed a copy of sp->sct_item created with getvec(), and infect_people() doesn't change it. Caller changed. (infect_people): Rewrite plague risk computation for clarity. Markus Armbruster 2004-03-11 17:18:05 +00:00
  • abaf9e06ec (feed_land): Simplify. Amount of food taken from ship could be off by one due to rounding, fix. However, the fixed code is currently unreachable, as caller runs resupply_commod() before feed_land(). (feed_ship): Simplify. No functional changes. Markus Armbruster 2004-03-11 15:27:59 +00:00
  • 0652930d67 (upd_ship, upd_land): Simplify. No functional changes. Markus Armbruster 2004-03-11 13:31:28 +00:00
  • c7d3a8ffa8 (shiprepair): Remove parameter vec, work with ship->shp_item[] instead. This is safe, because the only caller passed a copy of the latter created with getvec(), and shiprepair() doesn't change it. Caller changed. Markus Armbruster 2004-03-11 13:15:02 +00:00
  • 902a1c9f17 (feed_ship): Work directly on land item arrays instead of copies made by getvec(). This is safe, because the new code changes the item array precisely when the old code writes back a changed copy. Markus Armbruster 2004-03-11 13:04:58 +00:00
  • 0716438b5b (landrepair): Remove unused parameter `vec'. Caller changed. Markus Armbruster 2004-03-11 12:57:33 +00:00
  • 4ea31b120b (feed_land): Work directly on ship item arrays instead of copies made by getvec(). This is safe, because the new code changes the item array precisely when the old code writes back a changed copy. Markus Armbruster 2004-03-11 12:51:34 +00:00
  • d64fa8d529 (opt_NEWPOWER, Options, gen_power): Remove nooption NEWPOWER. Markus Armbruster 2004-03-11 10:36:55 +00:00
  • 71411189b4 (set_option, delete_option): Gripe about unknown options. If multiple options have identical names in Options[], all but the first are ignored. This should never happen. Markus Armbruster 2004-03-11 10:07:38 +00:00
  • 4caf8bb440 (get_materials): Work directly on item arrays instead of copies made by getvec(). This is safe, because the new code changes the item array precisely when the old code writes back a changed copy. Markus Armbruster 2004-03-11 09:04:44 +00:00
  • 689f435aff (opt_GRAB_THINGS, Options, get_materials): Remove option GRAB_THINGS. Markus Armbruster 2004-03-11 08:53:27 +00:00
  • 9ad7afbf17 (dodistribute): Work directly on item arrays instead of copies made by getvec(). This is safe, because the old code made single copies and always flushed them back into the unit structures. Markus Armbruster 2004-03-10 18:32:42 +00:00
  • d68a0b96c6 (dodeliver): Remove parameter vec, work with sp->sct_item[] instead. This is safe, because the only caller passed a copy of the latter created with getvec(), and dodeliver() doesn't change it. Caller changed. Return value no longer needed, remove. Markus Armbruster 2004-03-10 18:25:05 +00:00
  • a46cee180a (populace): Remove parameter vec, work with sp->sct_item[] instead. This is safe, because the only caller passed a copy of the latter created with getvec(), and populace() doesn't change it. (tax): Replace getvec() by direct, read-only item access. Markus Armbruster 2004-03-10 17:59:37 +00:00
  • 5fb761ab45 (pln_equip, mission_pln_equip): Work directly on item arrays instead of copies made by getvec(). This is safe, because the old code made single copies and always flushed them back into the unit structures before flushing those. Simplify. Markus Armbruster 2004-03-10 13:35:54 +00:00
  • e3390b9e0d (pln_equip, mission_pln_equip): Rename item to itype. Use struct ichrstr member i_vtype instead of pointer arithmetic to map from `struct ichrstr *' to item type. No functional changes. Markus Armbruster 2004-03-10 13:22:48 +00:00
  • 522f1cdf9a (sd, shp_missile_defense): Replace getvec() by direct, read-only item access. This is correct, because the old code doesn't use the copy after it changes the original in the unit structure. (dd): Remove call of getvec() that has no effect. Markus Armbruster 2004-03-10 13:16:46 +00:00
  • 364f452a3c (quiet_bigdef): Work directly on item arrays instead of copies made by getvec(). This is safe, because the old code made single copies and always flushed them back into the unit structures before flushing those, in use_ammo(), or discarded both the copy and the unit structure. Markus Armbruster 2004-03-10 12:52:24 +00:00