Commit Graph

4905 Commits

Author SHA1 Message Date
PatR
27d8b631cd isspace() usage
Replace most uses of isspace() with a simple test for ' ' after
processing the string buffer with mungspaces (which replaces tab
with space, converts instances of consecutive whitespace into a
single space, and removes leading and trailing spaces).  The uses
where this wasn't done now cast their argument to (uchar) so that
platforms with signed chars will never pass negative values to it.

I didn't mess with the menu coloring code (except for casts to the
isspace() argument); it almost certainly could benefit from using
mungspaces.  I did mess with the symset processing quite a bit,
and hope I haven't accidentally broken anything.  Default symbols
and DECgraphics symbols still parse and display ok, so the rest of
dat/symbols should be ok too.  I didn't test symbols in the user's
config file because I don't remember how that's supposed to work.
2015-04-25 02:11:13 -07:00
Pasi Kallinen
672ef5223a Fix adding doors to levels 2015-04-25 12:00:44 +03:00
Pasi Kallinen
8e6dde226f Fix out-of-map condition in buzz 2015-04-25 06:24:43 +03:00
nhmall
3d5415b33a Merge branch 'master' into win32-x64-working 2015-04-24 22:40:46 -04:00
PatR
1eff16afcb do_look fix fix
Avoid initializer for auto-class array since many pre-ANSI compilers
didn't support that.  Also, when ESC is used to cancel inventory
selection, don't continue on searching for that selection in invent.
2015-04-24 16:07:00 -07:00
nhmall
ed2e70b506 Merge branch 'master' into win32-x64-working 2015-04-24 11:50:34 -04:00
nhmall
65e699b646 fix an observed stack corruption
Changes to be committed:
	modified:   src/pager.c
2015-04-24 11:23:07 -04:00
keni
24eb44a8c0 force date change (another mail test) 2015-04-24 10:11:17 -04:00
keni
de87c7550c and fill in the line (another mail test) 2015-04-24 10:01:00 -04:00
keni
34508d5df2 add a date line (another mail test) 2015-04-24 09:56:24 -04:00
keni
5e39fdffde Merge branch 'master' of https://rodney.nethack.org:20040/git/NHsource 2015-04-24 09:33:35 -04:00
keni
2774278607 enable subst for all DEVEL/*.txt (really another mail test) 2015-04-24 09:32:50 -04:00
Pasi Kallinen
1369b17e3b Stop travel or run when you get hungry 2015-04-24 16:24:50 +03:00
keni
a2dcc89838 force the date (really testing email) 2015-04-24 09:11:33 -04:00
PatR
ce58721890 more data.base lookup tidbits
Still doesn't address the reported stack corruption.

* 'alt' points to a buffer which has already been processed by
  lcase(), so remove the redundant call to that routine;
* common error exit accessed via 'goto' could potentially leave
  a dangling window structure (only if 'data' is corrupted though;
  it's the only way a failure at that late point could occur).
2015-04-24 02:18:07 -07:00
Derek S. Ray
22ffe3b84e initial pass for toning down Elbereth 2015-04-23 23:04:35 -04:00
PatR
d65fba4ebe do_look bits
I didn't find Michael's crasher, but I did find a couple of minor
problems:

knight's saddled pony wasn't found in the file lookup either though
there is an entry for pony ("tame saddled <foo>" stripped off "tame "
but not "saddled "; "saddled <foo>" would only be found of there was
a wildcard entry key of "*<foo>", like "*horse" to catch both horse
and warhorse);

"wombat" matched the bat entry rather than reporting an unknown
entity.
2015-04-23 19:25:01 -07:00
Pasi Kallinen
aea472c0c0 Give honorifics to vampires and elves 2015-04-23 21:46:10 +03:00
Pasi Kallinen
ea6157c475 Give gnomes occasionally a candle
...and if in unlit area, light the candle.
2015-04-23 21:19:25 +03:00
Pasi Kallinen
23ad7a8635 Hallucinated currencies
Originally via UnNetHack by Patric Mueller
2015-04-23 20:30:59 +03:00
Pasi Kallinen
fbf787c4fe Indicate how far you fall down a hole or trapdoor
No extra message when falling down to the next level,
otherwise give "You fall down a [very] [deep] shaft!".
2015-04-23 19:27:12 +03:00
nhmall
5a87938c7d Merge branch 'master' into win32-x64-working
Conflicts:
	src/restore.c
	src/save.c
2015-04-23 07:03:45 -04:00
PatR
ae6eeec22a statue glyph save/restore
Remove the code that converted statues shown as monsters into stautes
shown as big rocks when saving and then reversed the effect when
restoring.  It was done to preserve save file compatability with 3.4.3
where statue-as-monster glyphs didn't exist, so is no longer useful.
2015-04-22 19:47:55 -07:00
nhmall
67e7565ee2 Merge branch 'master' into win32-x64-working
Conflicts:
	src/sp_lev.c
2015-04-22 22:33:22 -04:00
PatR
51a70d0277 sp_lev.c cleanup
* remove several unreachable panic() calls; alloc() already panics
  rather than return a null pointer;
* replace a couple of calls to malloc() with alloc() so that
  MONITOR_HEAP won't produce spurious alloc/free discrepancies;
* replace several instances of variable 'd' with 'd0' so that it
  doesn't conflict with the name of a function;
* comment out opvar_new_region() since it isn't used anywhere.
2015-04-22 19:18:57 -07:00
PatR
16d8074352 lint 2015-04-22 19:17:49 -07:00
nhmall
03dc59b763 put back resource file 2015-04-22 22:05:23 -04:00
nhmall
89c862b15a fix typo in typo fix 2015-04-22 21:44:04 -04:00
Alex Kompel
cd72c7ec68 win32: fix broken dependency for ttystub.o 2015-04-22 18:12:14 -07:00
nhmall
f7b5d2f751 tiles weren't being copied to the binary directory
Changes to be committed:
	modified:   win/win32/vs2013/NetHackW.vcxproj
2015-04-22 20:28:46 -04:00
nhmall
68a68e167a merge fallout from previous night 2015-04-22 20:05:27 -04:00
nhmall
98e691aa1d visual studio build fix
Changes to be committed:
	modified:   win/win32/vs2013/NetHack.vcxproj
	modified:   win/win32/vs2013/NetHackW.vcxproj
2015-04-22 19:56:05 -04:00
Pasi Kallinen
5a42ce4040 Unify boulder dropping on player
... and if you're swallowed, make the dropped boulder hit the monster.
(Changes from UnNetHack)
2015-04-22 20:22:55 +03:00
nhmall
c78d09a7d4 Merge branch 'master' into win32-x64-working
Conflicts:
	include/extern.h
	src/do.c
	src/mon.c

 Changes to be committed:
	modified:   include/extern.h
	modified:   src/ball.c
	modified:   src/do.c
	modified:   src/eat.c
	modified:   src/hack.c
	modified:   src/invent.c
	modified:   src/lock.c
	modified:   src/mon.c
	modified:   src/pickup.c
	modified:   src/pline.c
	modified:   src/save.c
	modified:   src/sp_lev.c
	modified:   src/steed.c
	modified:   src/trap.c
	modified:   src/uhitm.c
2015-04-22 08:08:50 -04:00
Pasi Kallinen
ed164ad324 Fix typo in func decl 2015-04-22 13:24:51 +03:00
Pasi Kallinen
65dcf2e2cc Fold another instance of "You are rooted" into u_rooted 2015-04-22 11:54:27 +03:00
Pasi Kallinen
bd69677933 Unify stumbling on door mimic 2015-04-22 09:23:54 +03:00
Pasi Kallinen
75e7d837e6 Unify food-related conducts when eating a monster 2015-04-22 09:16:49 +03:00
Pasi Kallinen
6d4aa312e6 Unify hero free hand check and msg 2015-04-22 09:02:38 +03:00
Pasi Kallinen
171e8284cd Unify monster gender setting 2015-04-22 08:58:04 +03:00
Pasi Kallinen
3bf2d17e2c Unify iron ball unwielding 2015-04-22 08:53:13 +03:00
Pasi Kallinen
34d5a4c1f9 Unify file removed -trickery 2015-04-22 08:45:03 +03:00
Pasi Kallinen
2783157f95 Unify "You are rooted" message 2015-04-22 08:35:14 +03:00
nhmall
3238303dc8 replace a couple of Makefile bits that shouldn't have been removed
Changes to be committed:
	modified:   sys/winnt/Makefile.gcc
	modified:   sys/winnt/Makefile.msc
2015-04-22 00:30:03 -04:00
nhmall
aaca36a6d5 build both tty NetHack.exe and gui NetHackW.exe
Changes to be committed:
	modified:   include/config.h
	modified:   include/extern.h
	modified:   include/flag.h
	modified:   include/global.h
	modified:   include/ntconf.h
	modified:   include/wintty.h
	modified:   src/cmd.c
	modified:   src/files.c
	modified:   src/options.c
	modified:   sys/share/pcmain.c
	modified:   sys/share/pcsys.c
	modified:   sys/share/pcunix.c
	modified:   sys/winnt/Makefile.gcc
	modified:   sys/winnt/Makefile.msc
	modified:   sys/winnt/nttty.c
	new file:   sys/winnt/stubs.c
	modified:   sys/winnt/winnt.c
	modified:   util/makedefs.c
	modified:   win/tty/wintty.c

Adjust the code and the command line Makefile so that
you no longer have to choose whether to build the tty
version NetHack.exe, or the gui version NetHackW.exe.

Both will now be built in a single 'nmake install' pass.
2015-04-22 00:07:46 -04:00
Derek S. Ray
0bef94cfde Make coalescence message be smart about status
- honor blindness and hallucination
- honor ability to see one of the mergees
- provide audible feedback if appropriate
- merging inside pack gets special-cased so player knows something
  different/unusual is happening
2015-04-21 21:47:33 -04:00
nhmall
9b63abf2b0 Merge branch 'master' into win32-x64-working 2015-04-21 17:52:40 -04:00
Pasi Kallinen
c9bb75eaf3 Unify dropping boulder on monster 2015-04-21 22:40:27 +03:00
nhmall
3969eb2af1 Merge branch 'master' into win32-x64-working
Conflicts:
	src/mon.c

 Changes to be committed:
	modified:   DEVEL/Developer.txt
	modified:   dat/endgame.des
	modified:   include/patchlevel.h
	modified:   include/you.h
	modified:   src/mon.c
	modified:   src/sounds.c
	modified:   src/spell.c
	modified:   src/vault.c
	modified:   win/share/tiletext.c
2015-04-21 06:39:52 -04:00
Pasi Kallinen
a155d1d474 Solidify the astral plane
...to prevent xorns appearing in the inaccessible map fringes
2015-04-21 11:22:34 +03:00