Commit Graph

4199 Commits

Author SHA1 Message Date
nhmall
7c65f47dfd One VS Makefile for Nethack that works with VS2010-VS2015 2015-03-10 14:25:54 -04:00
nhmall
67aab26a83 typo in format string on previous commit 2015-03-09 22:11:49 -04:00
nhmall
7113829de0 more do_look() glyph usage without it being set properly
Changes to be committed:
	modified:   src/pager.c

When the previous occurrence that triggered a segfault
was fixed, I didn't check for more of them. It turns out there
were more instances.

This also removes some dead code.
2015-03-09 22:05:48 -04:00
nhmall
941c3378ad Merge branch 'master' of https://rodney.nethack.org:20040/git/NHsource 2015-03-09 21:19:37 -04:00
nhmall
fa04eff282 fix a segfault in mapglyph reported by Pasi earlier today
Changes to be committed:
	modified:   src/pager.c

Steps to reproduce the reported segfault:
Use / command, answer n, press space and enter

In do_look() variable glyph is only set to a proper
value if using the screen (from_screen) or the
mouse (clicklook).

On the code path that triggered the segfault,
glyph was being passed to mapglyph with a random
arbitrary value.

If glyph had been initialized at the start of
do_look(), it would have prevented the segfault,
but would have always displayed a giant ant or
something silly instead of the correct thing.

Don't use glyph except under
from_screen || clicklook.
2015-03-09 21:08:26 -04:00
Pasi Kallinen
560898d3d4 Change command X to twoweapon toggle
Explore mode is now an extended command #exploremode.
There's no sense that a command used max. once per game, and
in normal games not at all, takes up a key. So, analogous to
the 'x' command (swap weapons), 'X' now toggles two-weapon
combat.
2015-03-09 22:53:43 +02:00
Pasi Kallinen
fa186c0156 Comment typofix 2015-03-09 22:22:32 +02:00
Pasi Kallinen
c0a5b49e62 Use a menu to loot multiple containers
When looting a location with multiple containers, show a menu for user
to pick the containers to loot instead of asking a yes/no question for
each container.
2015-03-09 21:08:42 +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
8c048e6086 TTY: Prevent accidental escapes from string entries
On NAO, one of the major complaints was accidental escaping
from wishing prompt when using cursor keys.  The users were
trying to go "back" on the entry to fix a typo, but lost
the wish instead.

This prevents escaping out of a text prompt if there is any
text entered into the prompt; pressing escape clears the prompt.
2015-03-08 15:11:01 +02:00
Pasi Kallinen
a66b498dda TTY: Do not cut off statuslines at 80 characters
Show as much of the status line as possible, instead of chopping
it at COLNO - this prevents possible game-influencing status
effects (Ill, Burdened, etc) from being hidden.
2015-03-08 10:40:26 +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
f2ab8f336b You_hear already checks deafness 2015-03-06 21:01:02 +02:00
nhmall
06b7534af3 Merge branch 'master' of https://rodney.nethack.org:20040/git/NHsource 2015-03-05 20:52:37 -05:00
nhmall
e9a03fd094 Fix some README mistakes that Janet spotted 2015-03-05 20:45:17 -05:00
Pasi Kallinen
44c0534a97 Add database entry for land mine 2015-03-05 16:34:16 +02:00
Pasi Kallinen
4cc1316163 Add database entry for fedora 2015-03-05 16:15:40 +02:00
Pasi Kallinen
cc25d29490 Make shuriken entry also match throwing star. 2015-03-05 14:23:23 +02:00
Pasi Kallinen
c427f450ca Fix shuriken attribution 2015-03-05 14:22:19 +02:00
Pasi Kallinen
40851d2e69 Add database entry for shuriken 2015-03-05 14:21:21 +02:00
Pasi Kallinen
e37d4224b3 Fix data.base entries
-"bat" overrode later "combat" entry.
 -"gelatinous cube" and "jack boot" have their own entries.
 -"vampire bat" matched twice; use the bat entry.
 -dagger attribution started with spaces instead of tabs.
2015-03-05 14:03:56 +02:00
nhmall
4a0935114c Updated README
On 3/1/2015 10:37 AM, coppro wrote:
> >>          Sun SPARC based machine running SunOS 4.x, Solaris 2.x, or
> Solaris 7
>
> By release time, I should have access to a BSD flavour installed on a SPARC
> machine. Would out be helpful for me to do cursory tests?

On 3/1/2015 10:41 AM, lorimer wrote:
> I have access to a Borland environment too, so I'll be
> borrowing that at some point.  [Just not soon.]

I didn't include the above, just in case they don't happen.
The README can, of course, be updated again once they have
been tried.
2015-03-03 20:13:51 -05:00
keni
23f213bc63 Fix NHtext when GIT_DIR is not defined. 2015-03-02 16:32:29 -05: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
f64e530bff Make a few fixes to code that was confusing indent 2015-03-02 13:25:41 -05:00
Pasi Kallinen
748d9ea55b Fix segfault when MD termcap is not defined 2015-03-02 20:21:34 +02:00
Pasi Kallinen
d829b92f0e Sanitize petnames and fruit to prevent escape codes 2015-03-02 20:10:18 +02:00
Sean Hunt
bd62873ee2 Print lava item destructions only if surviving.
This partially reverts commit 72c2ae233d
in order to prevent players from using hangups during the destruction
messages to save themselves.
2015-03-02 12:52:04 -05: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
keni
774e6c2f6f Switch NHtext from "git branch" to "git symbolic-ref" to avoid corner cases. 2015-03-01 20:26:29 -05:00
nhmall
a609bda996 catch up fixes with some recent changes; also add 'community patch' section 2015-03-01 09:28:09 -05:00
Pasi Kallinen
d7c9abe0f8 Remove useless dungeon.def mangling 2015-03-01 14:33:03 +02:00
Pasi Kallinen
6c4c53bfd2 Remove mention of compile-time AUTOPICKUP_EXCEPTIONS 2015-03-01 12:03:51 +02:00
Pasi Kallinen
7cbd2fd592 Remove last mention of EXP_ON_BOTL 2015-03-01 10:26:24 +02:00
Pasi Kallinen
7754afd9fa Remove last mention of DUNGEON_OVERVIEW 2015-03-01 10:16:00 +02:00
keni
91b96e2331 Change NHtext to double the speed of "git checkout" 2015-02-28 17:52:19 -05:00
Pasi Kallinen
b7537e0fbf Add new parameters to makedefs: --debug and --make
"makedefs --debug --make q" is equivalent to "makedefs -q" with
DEBUG defined.
2015-02-27 19:34:34 -05:00
Derek S. Ray
4dddb97301 remove and transfer INVISIBLE_OBJECTS to branch 2015-02-27 19:34:32 -05:00
Derek S. Ray
5ee52039ca Remove unused size from questpgr.c 2015-02-27 19:34:31 -05:00
Sean Hunt
17ea9ff9ab Fix some warnings on the unconditionals branch. 2015-02-27 19:34:31 -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