Commit Graph

836 Commits

Author SHA1 Message Date
nhmall
74c5f489ae adjust PREFIXES_IN_USE for SYSCF 2015-03-22 11:11:41 -04:00
nhmall
c3c968f87c options and config file handling
With SYSCF, the SYSCF_FILE name was overwriting the
default config file name making it unavailable for
subsequent user config file options handling.

- Keep the name of the last config file successfully opened.
- Do it without orphaning the default config file name needed
  for the next pass.
2015-03-22 10:44:36 -04:00
nhmall
41ac4aef92 fix SYSCF so that things build when first defined
Things won't build for ports that first
define SYSCF.

This moves assure_syscf_file() from unixmain.c
to files.c and adjusts extern.h to get it
out from under #ifdef UNIX.

The call to assure_syscf_file() in options.c was
only #ifdef SYSCF, SYSCF_FILE and not UNIX,
so new ports #defining SYSCF would get an erro.

assure_syscf_file() will be utilized by mswin
when SYSCF is defined.
2015-03-21 15:38:31 -04:00
nhmall
e3eb74166f obj change to support some upcoming work
This is an enabling patch for upcoming work. It breaks
save/bones so editlevel is incremented.

I'd like to a second overloadable int field in struct obj,
instead of just the one that is typically overloaded - corpsenm.

The second one can be used for things that are being tallied
up as opposed to a static one time assignment for reference/linkage
purposes.

The differentiation will allow both uses to co-exist for the
same object.
2015-03-21 10:46:11 -04:00
Pasi Kallinen
2ec4ff0b8c Fix C343-108 (e- leaves prompt on screen)
You'll get "You mime eating something."
2015-03-20 19:25:24 +02:00
Pasi Kallinen
3cc3709d95 Save xlogfile time_t fields correctly 2015-03-19 17:41:14 +02:00
Pasi Kallinen
debdf7ca48 Move some hard-coded string arrays into data files.
Random epitaphs, engravings and hallucinatory monsters now
live in text data files.
2015-03-18 22:05:10 +02:00
Pasi Kallinen
27add21e7e Merge branch 'paxed-xlogfile' 2015-03-18 18:57:52 +02:00
PatR
562fa952ce allow DEBUGFILES to be overridden via getenv()
If getenv("DEBUGFILES") yields a value then it takes precedence over
sysconf.DEBUGFILES or sys.c's #define DEBUGFILES.  (It probably should
only be controlled via environment since it is not a system-wide
attribute, but I haven't taken out the SYSCF handling for it.)
2015-03-16 15:54:10 -07:00
PatR
a983a58b6a free 'sysopt' strings upon termination 2015-03-16 02:03:40 -07:00
PatR
14525ed0c6 DEBUG/debugpline() fixup
* Replace variadic debugpline() with fixed argument debugpline0(str),
   debugpline1(fmt,arg), and so on so that C99 support isn't required;
 * showdebug() becomes a function rather than a macro and handles a
   bit more;
 * two debugpline() calls in light.c have been changed to impossible();
 * DEBUGFILES macro (in sys.c) can substitute for SYSCF's DEBUGFILES
   setting in !SYSCF configuration (I hope that's temporary).
2015-03-15 18:02:26 -07:00
nhmall
6e0a3dda2e catch up on half-physical damage docs
This is catching up on some things that were changed
in development years ago that Dave C. suggested be
documented.

For the record:
-The things that were evaluated and ruled out
are now documented in include/youprop.h so they don't
come up again.

- The things that were evaluated and deemed to be susceptible
to the intrinsic and thus led to a modification in the code
are listed below in this commit message.

Modifications:
- A crystal ball exploding on being applied
- Artifacts' blasting
- Being a fish out of water
- Being hit by Mjollnir on the return
- Being thwacked by an iron ball chained to you
- Boiling/freezing potions
- Broken wands
- Bumping head on ceiling by cursed levitation
- Burning (un)holy water
- Chest/door/tin traps
- Dipping a lit lamp into a potion of oil
- Exploding rings and wands (under all circumstances)
- Exploding spellbooks
- Falling downstairs
- Falling into a (spiked) pit
- Falling off or failing to mount a steed
- Falling on a sink while levitating
- Getting squished in a pit under a boulder
- Hitting your foot with a bullwhip
- Hitting yourself with your pick-axe
- Hooking yourself with a grappling hook
- iron-ball-pulling yourself out of a bear trap
- Jumping/Newton's-Thirding into something solid
- Kicking something that makes you go "Ouch!"
- Land mine explosion
- Sitting in a spiked pit
- Stinking cloud damage
- Thrown potion (bottle)
- Zapping yourself with a wand, horn or spell
- Jumping yourself out of a bear trap
2015-03-15 12:36:45 -04:00
Pasi Kallinen
3bbbb01c53 Death talks in CAPITAL LETTERS 2015-03-15 09:53:34 +02:00
Pasi Kallinen
f8aced5480 Add Extended Logfile 2015-03-12 21:35:04 +02:00
Pasi Kallinen
400d842a8f Fix warnings 2015-03-12 17:57:13 +02:00
Pasi Kallinen
a335f8306f Add MAX_STATUENAME_RANK sysconf setting
MAX_STATUENAME_RANK tells how many score file entries to use
for random statue names.
2015-03-11 19:59:52 +02:00
Pasi Kallinen
d5abd07dad Add boolean option "bones"
Setting bones off prevents saving and loading bones files.
2015-03-10 19:50:29 +02:00
Pasi Kallinen
8e31929ef5 Define for generic usernames which prompt for name
Instead of hard-coding the "play", "player", etc. usernames
which will prompt the user for their name, allow defining
the names in config.h
2015-03-09 18:42:53 +02:00
Pasi Kallinen
1609081320 Implement fcntl(2) file locking
If you run a server, then you know of the somewhat annoying perm_lock
errors that creep up, requiring your attention before anyone else can
start a game.

This patch properly implements fcntl(2) locking on systems that can
handle it (*nix systems), that results in the lock being automatically
released on program termination, whether abnormal or not.

Original patch by Drew Streib, update by Edoardo Spadolini
2015-03-07 15:11:41 +02:00
Pasi Kallinen
9da976f004 Fix TTY crashing when a location has more than 32k items 2015-03-02 20:34:25 +02:00
Sean Hunt
777328bd5c Merge fire-based erosion to common codepaths.
This finally eliminates all direct increases of `oeroded` and `oeroded2`
and moves them all to go via `erode_obj()`. They are still manipulated
directly in a few places, but not to erode objects.

This now merges the `fire_damage()` function to a common codepath, used
for items on lava and burning oil, but fire needs more work. There is
still a duplication between `destroy_item()` and `fire_damage()`; the
two codepaths should eventually be merged in some manner so that there
is only one codepath to say "an object was affected by fire". This path
might require some parameters, such as whether the fire will just erode
objects or burn them outright, but that can happen another day.
2015-03-02 12:50:03 -05:00
Sean Hunt
3acd3c4a00 Fold get_wet() into water_damage().
This now ensures that dipping into water works like other sources of
water damage. There is a potentially significant gameplay change here:
dipping a container into uncursed water will wet all its contents. If
this is a problem, then we should add another parameter to water_damage
which will suppress this behaviour for dipping.
2015-03-02 12:50:01 -05:00
Sean Hunt
57dcad3774 Rename rust_dmg() to erode_obj(). 2015-03-02 12:50:01 -05:00
Sean Hunt
3a049cf66e Eliminate erode_obj() and other erosion.
Now all erosion that isn't fire-based goes through `rust_dmg()`
2015-03-02 12:50:00 -05:00
Sean Hunt
7e0d552b06 A lot more cleanup to rust and water. 2015-03-02 12:49:59 -05:00
Sean Hunt
d588210a77 Cover a couple of corner cases with rust_dmg(). 2015-03-02 12:49:57 -05:00
Sean Hunt
9c4b0113aa Remove the victim argument to rust_dmg().
The argument can be calculated from `otmp`.
2015-03-02 12:49:57 -05:00
Sean Hunt
5ffd5a3000 Factor out a new is_moat function.
The fact that Juiblex's swamp is MOAT but not moat is weird and should
probably be looked at at some point.
2015-03-02 12:49:56 -05:00
keni
6fd30ab1ce Manually fix botched NHDT-Branch expansions. 2015-03-01 20:32:28 -05:00
Derek S. Ray
4dddb97301 remove and transfer INVISIBLE_OBJECTS to branch 2015-02-27 19:34:32 -05:00
Sean Hunt
a3faa93403 Remove experimental Unicode support.
This reverts commit 7f0f43e6f9 and some related
subsequent commits.

This compiles, but I have not done extensive testing.

Conflicts:
	include/config.h
	include/decl.h
	include/extern.h
	include/global.h
	include/tradstdc.h
	include/wintty.h
	src/drawing.c
	src/files.c
	src/hacklib.c
	src/mapglyph.c
	src/options.c
	sys/winnt/nttty.c
	win/tty/getline.c
	win/tty/topl.c
	win/tty/wintty.c
2015-02-27 19:34:29 -05:00
Sean Hunt
7c09285a8c Make EXP_ON_BOTL unconditional. 2015-02-27 19:34:26 -05:00
Sean Hunt
0001534d04 Make REDO unconditional. 2015-02-27 19:33:52 -05:00
Sean Hunt
d218bedbf7 Make LOADSYMSETS unconditional.
There are some bugs here, but this functionality should make it into the release
in some form.
2015-02-27 19:33:51 -05:00
Sean Hunt
74e741bbbc Make AUTOPICKUP_EXCEPTIONS unconditional. 2015-02-27 19:33:50 -05:00
Sean Hunt
b138d380ea Make BARGETHROUGH unconditional. 2015-02-27 19:33:48 -05:00
Sean Hunt
6e9fa71b05 Make SEDUCE unconditional. 2015-02-27 19:33:48 -05:00
Pasi Kallinen
612852f7de Apply paxed's DEBUG patch to remove DEBUG/D_DEBUG.
Move debugging output into couple preprocessor defines, which
    are no-op without DEBUG.  To show debugging output from a
    certain source files, use sysconf:

    DEBUGFILES=dungeon.c questpgr.c

    Also fix couple debug lines which did not compile.

This also includes fixes due to Derek Ray to depugpline to work better
on other platforms.
2015-02-27 19:33:45 -05:00
Sean Hunt
ac108cd365 Make GOLDOBJ unconditional. 2015-02-27 19:33:40 -05:00
Sean Hunt
4f59f5c6fd Make WIZARD unconditional. 2015-02-27 19:33:22 -05:00
Sean Hunt
ad82ca80f3 Make DUNGEON_OVERVIEW unconditional. 2015-02-27 19:33:20 -05:00
Sean Hunt
1edadd1d48 Make REINCARNATION unconditional.
There is a lot of code affected by this, and Pat Rankin correctly
observes that it would be better to store roguelike as a level flag
rather than just using Is_rogue_level. A note for the future.
2015-02-27 19:33:16 -05:00
Sean Hunt
260f7ea860 Make TOURIST unconditional. 2015-02-27 19:33:12 -05:00
Sean Hunt
5ee71d2757 Make SINKS unconditional. 2015-02-27 19:33:06 -05:00
Sean Hunt
b066b7c170 Make KOPS unconditional. 2015-02-27 19:33:04 -05:00
Sean Hunt
9e65758947 Make STEED unconditional. 2015-02-27 19:33:01 -05:00
Sean Hunt
264dc66129 Make ELBERETH unconditional. 2015-02-27 19:32:53 -05:00
keni
03140969ee Bulk recovery of file CVS headers and addition of NHDT- headers. 2015-02-26 09:19:03 -05:00
Sean Hunt
a3b1cb8432 Remove the 'nul' variable. 2015-02-18 23:51:31 -05:00
Sean Hunt
862d32c2ec Fix a few compiler (clang) warnings. 2015-02-16 00:23:48 -05:00