Commit Graph

8189 Commits

Author SHA1 Message Date
nhmall
465368ce3e merge 2 2018-12-30 08:48:15 -05:00
nhmall
5b3168e1c5 Merge branch 'NetHack-3.6.2' 2018-12-30 08:43:54 -05:00
nhmall
31c4a3fca4 Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2 2018-12-30 08:01:30 -05:00
nhmall
83e8033f72 remove curses date.h dependency in Windows Makefiles 2018-12-30 07:58:39 -05:00
PatR
adf64764f4 minor memory leak
I ran the fuzzer with MONITOR_HEAP enabled and heaputil found a dozen
or so un-free'd allocations, all made by the same dupstr() call in
special_handling() for "symset" and "roguesymset".  (Reproducible with
a few tens of thousands of fuzzer moves, although you have to take
over from the fuzzer and make a clean exit rather than just interrupt
it or there'll be lots of other un-free'd memory.)  I haven't actually
figured out how/why it was leaking, but reorganizing the code has made
the leak go away (according to a couple of even longer fuzzer runs) so
I'm settling for that.
2018-12-29 20:41:16 -08:00
PatR
39b6f7f462 alphabet sour warning
A recently added impossible to check for an(Null) and an("") was
triggered by the fuzzer:  Alphabet soup: 'an("")'.  I reproduced it a
couple of times and tracked it do_screen_description(for '/' command)
matching the symbol from mapglyph to monster class #0, a placeholder
with symbol value '\0'.  So mapglyph() returned a symbol of '\0', but
not necessary from showsyms[0 + SYM_OFF_M].

The pager lookup code's monster loop shouldn't have been attempting
to match against class #0, and since this fix I haven't been able to
reproduce the situation again.  But I also didn't trigger it with a
bunch of temporary checks in mapglyph() so don't know what is really
going on under the hood.
2018-12-29 20:39:11 -08:00
PatR
d418008b31 curses splash/copyright screen, role prompt
Back out '#include "date.h"' so that cursinit.c won't be recompiled
every time any other file(s) need to be compiled.  It doesn't need
patchlevel.h either.  There is already a straightforward way to fetch
the copyright banner lines from version.c.

The splash screen (ascii art spelling "NetHack" preceding the normal
copyright lines) was invisible when showing white text on white-ish
background.  Make it honor !guicolor.

"Shall I pick a character's role, race, gender and alignment for you?
 [ynaq] (y) " was too wide to accept the answer on the same line on
an 80-column display so "(y) " was placed on the second line.  That's
constructed in the core; change the construction to omit " a" when
using "character" rather than a role name.  (tty shortens it by omitting
the default " (y)"; with " a" gone, it could revert to normal prompt.)

Also a bit of lint cleanup and some reformatting of cursinit.c....
2018-12-29 18:38:30 -08:00
keni
9a9f76bf5c fix typos in header line so expansion works 2018-12-29 19:19:30 -05:00
nhmall
fac470096b Merge branch 'NetHack-3.6.2' 2018-12-29 12:37:27 -05:00
nhmall
367ad8de51 Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2 2018-12-29 12:36:19 -05:00
nhmall
eed7c4bdd1 nttty topten output processing
switch back to using the safe routines
after tty port exits on Windows console
tty port.

Fixes H7758
1613
2018-12-29 12:26:33 -05:00
nhmall
a09d2248cb Merge branch 'NetHack-3.6.2' 2018-12-29 08:47:16 -05:00
nhmall
f1bce74af6 Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2 2018-12-29 08:46:43 -05:00
PatR
5882832ef0 X11 on OSX
The change to Makefile.src for X11+XPM on linux broke linking X11 on
OSX.  This updates the hints files (except for the -qt one) so that
 make WANT_WIN_X11=1
and
 make WANT_WIN_X11=1 USE_XPM=1
work correctly.

The comment in macosx10.14 about what version(s) it's intended for
and been tested on is just cloned from 10.10 and should be updated.
2018-12-29 03:28:07 -08:00
Pasi Kallinen
45e06d638f Curses: Remove useless inventory label
The inventory window used a line to say "Inventory:", which is pretty
useless, and that was the only window showing such a label.

Also don't duplicate the "Not carrying anything" text from core.
2018-12-29 13:16:51 +02:00
PatR
4cbfb7d05f X11 USE_XPM lint 2018-12-29 03:02:07 -08:00
Pasi Kallinen
6ac681b5fa X11: default to XPM-format tile file and rip screen
People have been wondering how to change the tiles on the X11
version, and the old default of NetHack-specific binary tile data
isn't directly editable with image editing tools.

Also show in the #version info if xpm and graphic rip are enabled.
2018-12-29 07:19:24 +02:00
PatR
c4bda6a6a8 create_particular 'I' vs mkclass
The revised mkclass() [actually new mkclass_aligned()] has an extra
check which didn't used to be there, and attempting to create a
monster of class 'I' with ^G triggered impossible "mkclass found no
class 35 monsters" which the fuzzer escalates to panic.
2018-12-28 19:10:54 -08:00
PatR
5846aee283 memory #stats
obj->oextra->omonst might contain monst->mextra plus mextra->edog, &c.
That was being ignored when summing up memory allocated for objects.
2018-12-28 15:06:45 -08:00
nhmall
1d7f75ac9e Merge branch 'NetHack-3.6.2' 2018-12-28 12:57:16 -05:00
nhmall
8235825883 Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2 2018-12-28 12:56:44 -05:00
nhmall
fc504dfa89 yet more Windows Makefile
Now that the dependency lines are corrected for the
correct output files in the Makefile, it revealed a
dependency on a non-existent file.
2018-12-28 12:51:11 -05:00
nhmall
49b70c1c10 Merge branch 'NetHack-3.6.2' 2018-12-28 12:39:05 -05:00
nhmall
f3004a8973 Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2 2018-12-28 12:37:56 -05:00
nhmall
be67656932 More Windows Makefile corrections 2018-12-28 12:34:41 -05:00
nhmall
1cdb9c561c Windows Makefile updates 2018-12-28 12:29:12 -05:00
nhmall
678d87db4f Merge branch 'NetHack-3.6.2' 2018-12-28 10:21:04 -05:00
nhmall
599d4f3063 Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2 2018-12-28 10:20:47 -05:00
nhmall
a5f154d925 a couple of source spelling consistencies for /*FALLTHRU*/ 2018-12-28 10:08:56 -05:00
nhmall
1a77387345 Merge branch 'NetHack-3.6.2' 2018-12-28 09:42:37 -05:00
Tangles
9fd28fb852 curses - fix count selection not working for PICK_ONE menus.
eg: d2b would drop 2 of item b, but using d* to pick from a menu
and then selecting 2b would ignore the count and just drop the
whole stack.
2018-12-28 15:42:32 +01:00
nhmall
47ef36c3d8 Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2 2018-12-28 09:42:20 -05:00
Patric Mueller
19f0a2d3ba Fix missing compilation dependency for cursinit.c 2018-12-28 15:21:33 +01:00
nhmall
3d756c8ec8 Merge branch 'NetHack-3.6.2' 2018-12-28 08:29:45 -05:00
nhmall
067379b896 Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2 2018-12-28 08:29:26 -05:00
Pasi Kallinen
ca336bbf4b curses: include date.h
This way the curses port will show the version and compile date
on the startup banner, just like tty does.
2018-12-28 11:34:01 +02:00
nhmall
178aae42f4 Merge branch 'NetHack-3.6.2' 2018-12-27 22:47:26 -05:00
nhmall
50f55e92c0 Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2 2018-12-27 22:44:16 -05:00
PatR
c056ca1b35 fix github issue #170 - stacks of non-missiles
Fixes #170

Monsters never throw athames or scalpels but some fake player monsters
on the Astral Plane are given those.  Since they're stackable the
quantity usually gets boosted but there's no point in having more than
one if they won't be thrown.

This could have been fixed by letting monsters throw those two items,
but I prevented the quantity from being boosted instead.
2018-12-27 18:36:26 -08:00
PatR
96eaca731a stack merging vs shop pricing
When merging one stack into another and they have different obj->o_id
price adjustments, keep the o_id of whichever one commands the higher
shop price.
2018-12-27 15:37:06 -08:00
PatR
9e0d945961 stack splitting vs shop prices
I misread part of the original code and the revision introduced a bug
based on that.  obj->o_id price variations are used for all types of
non-IDed items, not just non-glass gems.
2018-12-27 15:01:15 -08:00
nhmall
fb42fb47c8 Merge branch 'NetHack-3.6.2' 2018-12-27 17:42:14 -05:00
nhmall
57ff5c179d Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2 2018-12-27 17:37:34 -05:00
nhmall
0a2b6fb53f Merge branch 'NetHack-3.6.2' 2018-12-27 17:33:05 -05:00
nhmall
ae02682cd1 Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2 2018-12-27 17:26:56 -05:00
PatR
a6b4322034 fix #H7103 - shop pricing
Player came across a stack of 2 gray stones in a shop and kicked one.
That one ended up with a different (in his case, lower) price once it
was separate.  This behavior only applies to non-glass gems which add
a price variation derived from internal ID (obj->o_id) number.  Make
splitting stacks always yield the same price per item in the new stack
as was being charged in the old stack by choosing a similar o_id.  Do
it for all splits (that can vary price by ID, so just non-glass gems),
not just ones performed inside shops.

He picked up the lower priced one and dropped it back on the original
higher priced one; the combined stack took on the lower price.  That
will no longer happen if they come from splitting a stack, but this
fix doesn't address merging with different prices when they start out
as separate stacks.  (Unpaid items won't merge in inventory if prices
are different, but shop-owned items will merge on floor.)
2018-12-27 14:12:48 -08:00
PatR
f8b4ad3fdc mines luckstone as achievement marker
It was possible to have the guaranteed luckstone at Mines' End become
merged with a random one and lose its specialness for achievement
tracking.  Mark it 'nomerge' when created and clear that if/when the
achievement is recorded.
2018-12-27 13:31:42 -08:00
nhmall
c6f34ccd44 Merge branch 'NetHack-3.6.2' 2018-12-26 12:20:40 -05:00
nhmall
43906fe70b Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2 2018-12-26 12:20:14 -05:00
PatR
ceb446eaea curses lint 2018-12-26 01:45:17 -08:00