Commit Graph

1051 Commits

Author SHA1 Message Date
PatR
12c013ee28 more menustyle
Make the list of menustyle values in the game match their order in the
revised documentation:  traditional, combination, full, partial.
2015-06-11 14:09:17 -07:00
nhmall
00d25adab2 actual field is always around anyway
Changes to be committed:
	modified:   include/flag.h
2015-06-10 20:48:29 -04:00
Pasi Kallinen
b4cc349a46 X11: Hilight piles of objects 2015-06-09 19:59:38 +03:00
Pasi Kallinen
174e6f47b3 TTY: Hilight piles of objects
Add MG_OBJPILE flag, which windowports can use to check if a location
has more than one object stack. If use_inverse is on, TTY will use
inverse to show such piles.  If a boulder is the topmost item on a pile,
then the object pile flag is not used; mainly because boulders are "solid",
boulders dropped by monsters are nearly always over other objects, and so
that special levels such a Sokoban can "hide" items under the boulders.

TODO: a "pilemark", analogous to "petmark", perhaps a green plus sign,
which can be used by windowports with tiles.
2015-06-09 16:54:48 +03:00
nhmall
c3a77914a9 Modify the window interface for print_glyph
Changes to be committed:
	modified:   doc/window.doc
	modified:   include/qt_win.h
	modified:   include/trampoli.h
	modified:   include/winX.h
	modified:   include/wingem.h
	modified:   include/winprocs.h
	modified:   include/wintty.h
	modified:   src/display.c
	modified:   src/windows.c
	modified:   sys/amiga/winami.p
	modified:   sys/amiga/winfuncs.c
	modified:   sys/amiga/winproto.h
	modified:   sys/wince/mswproc.c
	modified:   sys/wince/winMS.h
	modified:   win/Qt/qt_win.cpp
	modified:   win/X11/winmap.c
	modified:   win/chain/wc_chainin.c
	modified:   win/chain/wc_chainout.c
	modified:   win/chain/wc_trace.c
	modified:   win/gem/wingem.c
	modified:   win/gem/wingem1.c
	modified:   win/gnome/gnbind.c
	modified:   win/tty/wintty.c
	modified:   win/win32/mswproc.c
	modified:   win/win32/winMS.h

print_glyph now takes a second parameter.

Tiles on tiled ports always looked odd on places like the plane of air
where the background color of the tile didn't match the general background
of the surrounding area.

3.6 made that even worse and more glaringly noticeable with the introduction
of darkened room tiles.

The code to actually send something useful through the new parameter
for window ports to take advantage if they want will follow.
2015-06-08 19:37:26 -04:00
PatR
a1aebc336c blind-from-birth fix
The Blindfolded_only macro didn't track u.uroleplay.blind so would
give a false positive if wearing a blindfold, not able to see due to
the blind option, and not afflicted with any other blindness factors.
Dipping a worn blindfold into holy or unholy water is supposed to
reveal a glow if that blindfold is the only reason for blindness but
the glow was described even when blind-from-birth.

There's no feedback at all when the glow isn't seen.  I'm punting on
that one.  (This change didn't introduce that, just added one extra
situation where it happens.)
2015-06-02 17:30:16 -07:00
nhmall
856b59d8e9 status conditional code commented oout for merge 2015-06-02 17:09:39 -04:00
nhmall
66ae23a77e option name change to statushilites
Changes to be committed:
	modified:   doc/Guidebook.mn
	modified:   doc/Guidebook.tex
	modified:   include/flag.h
	modified:   src/options.c
	modified:   win/tty/wintty.c

example:
OPTIONS=statushilites
OPTIONS=hilite_status:hitpoints/30%/bright-magenta/normal
2015-06-01 22:30:04 -04:00
nhmall
9999ba9700 Merge branch 'master' into status_hilite
Conflicts:
	include/extern.h
	win/tty/wintty.c
2015-06-01 22:13:41 -04:00
nhmall
c7c5895ad3 ready for testing
Changes to be committed:
	modified:   doc/Guidebook.mn
	modified:   doc/Guidebook.tex
	modified:   include/config.h
	modified:   win/tty/wintty.c
2015-06-01 21:41:00 -04:00
PatR
f0904157c5 tty role selection when filter by options
Honor things like OPTIONS:role=!tourist and NETHACKOPTIONS='race=!orc'
when performing interactive role selection.  I don't think it was
completely correct when players let the program choose, but it must
have been close enough because we haven't gotten any complaints.
The post-3.4.3 interactive selection was ignoring options-base filtering
entirely and did get complaints for the pre-beta.

Role selection has a ton of code which bloats the program without doing
anything useful for actual game play.  It ought to be split off into a
separate front end.
2015-06-01 18:18:47 -07:00
nhmall
ec92c2007a Merge branch 'master' into status_hilite
Conflicts:
	include/extern.h
	src/options.c
2015-06-01 09:09:44 -04:00
nhmall
ca8f25d4b6 more updates and on/off option 2015-06-01 08:33:17 -04:00
nhmall
3cb2c66f35 more work on the tty status_hilite code
Changes to be committed:
	modified:   include/wintty.h
	modified:   src/botl.c
	modified:   win/tty/wintty.c
2015-05-31 19:39:28 -04:00
nhmall
1c00f3b8f3 yet more updates
Changes to be committed:
	modified:   include/botl.h
	modified:   include/extern.h
	modified:   include/wintty.h
	modified:   src/botl.c
	modified:   src/options.c
	modified:   src/windows.c
	modified:   win/tty/wintty.c

get the tty versions started
2015-05-31 16:50:08 -04:00
nhmall
40f1dc8bc3 more updates
Changes to be committed:
	modified:   include/botl.h
	modified:   src/botl.c
	modified:   src/windows.c
	modified:   win/tty/wintty.c
2015-05-31 15:18:59 -04:00
nhmall
7e4074b61f more status_hilite work
Changes to be committed:
	modified:   include/extern.h
	modified:   src/botl.c
	modified:   src/options.c
	modified:   src/windows.c

defer notification of the window port until after
proper initialization. Options are processed very
early in 3.6.0
2015-05-31 11:54:06 -04:00
nhmall
ef0c00d99b interim updates
Changes to be committed:
	modified:   include/botl.h
	modified:   src/botl.c
	modified:   src/windows.c
	modified:   win/tty/wintty.c

Move the windowport stuff out of botl.c and into windows.c
where it belongs.
2015-05-31 10:26:54 -04:00
PatR
0171345aad more Sting,&c
Add "(glowing light blue)" to the formatted object description when
Sting or Orcrist is glowing due to presence of orcs or "(glowing red)"
if Grimtooth is glowing due to elves.  Use "(glowing)" if blind;
assumes that some aspect of the glow (perhaps warmth or vibration) can
be noticed via touch.

Make enlightenment's "you are warned about <monster class> because of
<artifact>" catch up with Orcrist and Grimtooth.  It was attributing
Orcrist's warning against orcs to Sting, and Grimtooth's warning was
against "something" rather than elves.

The glow color is now a new field in artilist[], so the biggest part
of this patch is adding an extra value to each artifact's definition.
2015-05-30 22:41:30 -07:00
nhmall
4ccbf2edc8 some updates
Changes to be committed:
	modified:   include/botl.h
	modified:   src/botl.c
2015-05-30 22:22:39 -04:00
PatR
37763d030e add warning glow for Orcrist & Grimtooth
Make Orcrist glow light blue when orcs are present, just like Sting.
(Sting supposedly glowed because it was made by the elves of Gondolin
rather than any particular attribute built into it, and Orcrist was
made there too.  I think it also glowed in the Hobbit; that was how
Bilbo recognized what the situation was when he first saw Sting glow.
Maybe it was the other sword rather than Orcrist, but they were treated
as being functionally equivalent.)

Also make Grimtooth glow red when elves are present.  That's from thin
air, to give it some novelty.  Unlike Sting, whose double-damage bonus
is restricted to orc targets, Grimtooth's weak 1d6 bonus still applies
to all targets.
2015-05-29 17:42:15 -07:00
Pasi Kallinen
4c43b88732 Renumber glyphs for vibrasquare trap conversion 2015-05-29 22:42:11 +03:00
PatR
7d74a25a14 using #name to call a floor object
Implement Boudewijn's suggestion that #name be extended to allow naming
something of the floor.  I'm sure he wants this so that he can avoid
picking up gray stones, but it's something I started to implement years
ago (probably at an earlier suggestion from him...) and then forgot all
about.

This changes the #name menu to be
   m - a monster
   i - a particular object in inventory
   o - the type of an object in inventory
   f - the type of an object upon the floor
   d - the type of an object on discoveries list
   a - record an annotation for the current level
   What do you want to name?
with the i and o choices omitted when inventory is empty.  If the
'lootabc' option is set it will use a through f instead, but then the
last three entries change letters when inventory is empty.  'y' and 'n'
are still accelerators (effectively hidden choices) for the i and o
entries, corresponding to the answers for the 3.4.3 and earlier "name
an individual object?" prompt.

The floor choice asks you to pick a location.  If you pick yourself,
then the top object of the pile underneath you is targetted.  Otherwise,
the target must be an object glyph, and the object must have its dknown
bit set, so have previously been seen up close or revealed via blessed
potion of object detection.  To make it be more useful, targetting an
object on an adjacent square will set the dknown bit.  (Just the top
object if there is a pile there.)  There's no cockatrice corpse touch
check since you aren't actually touching anything, just looking.

The setting of dknown bit for an adjacent object has been extended to
the '/' and ';' commands for examining things on the screen as well.
It's only done for adjacent spots you actively select, not all 8 spots
around you.
2015-05-29 02:07:50 -07:00
Pasi Kallinen
2944dc6935 Show cost of merchandise when walking over it
This is another feature the betatesters seemed to miss a lot.
2015-05-27 21:45:00 +03:00
Pasi Kallinen
773eecc472 Rename omit_buc option to implicit_uncursed
... so the name is less cryptic.
2015-05-27 20:43:22 +03:00
Pasi Kallinen
f0eca282a8 Add MSGTYPE config option
MSGTYPE allows the user to define how messages in the message
area behave. For example:

  MSGTYPE=stop "You swap places with "

would always make that message prompt for -more-.  Allowed types
are "show" (normal message), "hide" (do not show), "stop" (wait
for user), and "norep" (do not repeat message).

Adding this, because it's relatively simple, proven to work, and
it seemed to be the major thing betatesters felt was lacking when
compared to NAO.
2015-05-27 20:21:57 +03:00
Pasi Kallinen
5fabcdf692 Add omit_buc -option
The option defaults to on, which is the old-style behaviour.
Turning the option off will never omit the "uncursed" -status
from inventory lines. This is pretty much required if users
want to use menucolors based on the BUC state.
2015-05-27 12:46:35 +03:00
PatR
fca75c5766 questpgr.c's in_line[], out_line[]
Replace static in_line[] and out_line[] with local variables that are
released when the quest pager code returns to caller.  QTEXT_IN_SIZ
was already removed from makedefs; now QTEXT_OUTSIZ is removed from
nethack.  Use regular BUFSZ for them instead of trying to maintain a
separate size for quest text.
2015-05-25 15:49:44 -07:00
Pasi Kallinen
fd1932075e Fix dark room glyphs on level re-entry 2015-05-25 10:02:09 +03:00
Sean Hunt
1c081b1647 Remove stale version control lines. 2015-05-25 09:21:31 +09:00
Sean Hunt
8b57d96fd2 Reformat .h files.
I did my best to exempt some of the bigger aligned blocks from the reformatting
using the /* clang-format off */ and /* clang-format on */ tags. Probably some
that shouldn't have been formatted were anyway; if you encounter them, please
fix.

The clang-format tags were left in on the basis that it's much easier to prune
those out later than to put them back in, and it means that, modulo my custom
version of clang-format, I should be able to run clang-format on the source tree
again without changing anything, now that Pat has fixed the VA_DECL issues.
2015-05-25 09:21:15 +09:00
Sean Hunt
26ee7dc370 Convert the vibrating square to a trap
Patch due to ais523 in NetHack 4.

This is not ready to be merged yet; the vibrating square needs a tile
image for tiles builds.
2015-05-25 09:19:20 +09:00
Sean Hunt
b6f32e7eff Warning cleanup. 2015-05-24 11:12:58 -04:00
nhmall
194fd2f78c merge two sets of patches to makedefs.c,qtext.h
Changes to be committed:
	modified:   include/qtext.h
	modified:   util/makedefs.c
2015-05-24 10:27:03 -04:00
Sean Hunt
84d63e169b Use the common regex engine in more places.
In particular, in autopickup_exceptions and user sounds.
2015-05-24 10:17:58 -04:00
Sean Hunt
49b9f6c926 Modify makedefs to use dynamic buffers for reading.
This will prevent crashing due to excessively long lines.
2015-05-24 10:17:28 -04:00
nhmall
f477645774 prep for sean's emailed patch 2015-05-24 10:16:38 -04:00
nhmall
57e404250a prep for sean's emailed patch 2015-05-24 10:09:44 -04:00
PatR
5f0a55f2cd makedefs -q fix
Make the input buffer for quest messages bigger so that the expanded
header line from nhsub won't be too long.  Also, makedefs will notice
and report too long lines ('makedefs -q' only) and sanely proceed with
the rest of the file instead of treating the excess part of a long
line as a separate line.
2015-05-23 23:11:41 -07:00
nhmall
56266a0800 Merge branch 'master' of https://rodney.nethack.org:20040/git/NHsource 2015-05-21 20:46:58 -04:00
nhmall
43006357bd comment out experimentals 2015-05-21 20:44:32 -04:00
PatR
168572fd0d #terrain update
Make the post-3.4.3 '#terrain' command be more versatile by allowing the
player to choose between floor-only, floor+traps, and floor+traps+objects
so that it is possible to view known traps covered by objects or monsters
and remembered objects covered by monsters.  The extra explore mode and
wizard mode choices aren't affected.
2015-05-21 16:53:46 -07:00
PatR
f0370f5f86 you feel {a,an unexpected} draft
Move the message given when a monster digs through a closed door
or a secret corridor into a separate routine.  In theory, nethack
should determine whether there is a path between the new opening
and the hero's location in order to decide whether a draft can
be felt.  (I don't think anyone is likely to implement that--I'm
certainly not.  Checking whether the hero is in a room with no
breaches in its walls could at least catch being inside a vault.)

While at it, add some USA-centric puns about feeling the prospect
of imminent military conscription instead of air current if it
happens while hallucinating.
2015-05-18 18:25:44 -07:00
PatR
fabf9cd901 VA_DECL/VA_END usage
Make the variadic functions look more like ordinary code rather than
have the function opening brace be hidden inside the VA_DECL() macro.
That brace is still there, but VA_DECL() now needs to be followed by
a visible brace (which introduces a nested block rather than the
start of the funciton).  VA_END() now provides a hidden closing brace
to end the nested block, and the existing closing brace still matches
the one in VA_DECL().

Sample usage:
void foo VA_DECL(int, arg)  --macro expansion has a hidden opening brace
{  --new, explicit opening brace (actually introduces a nested block)
  VA_START(bar);
  ...code for foo...
  VA_END();  --expansion now provides a closing brace for the nested block
}  --existing closing brace, still pairs with the hidden one in VA_DECL()

This should help if/when another round of reformatting ever takes place,
and also with editors or other tools that do brace/bracket/parenthesis
matching.

I had forgotten that there were variadic functions in sys/* and ended
up modifying a lot more files than intended.  The majority of changes
to those just inserted a new '{' line so that revised VA_END()'s '}'
won't introduce a syntax error.  A couple of them needed VA_END() moved
so that local variables wouldn't go out of scope too soon.  Only the
Unix ones have been tested.
2015-05-15 17:45:21 -07:00
PatR
2dc2091626 display.h cleanup
I started out just to replace the weird partial expression in the
maybe_display_usteed macro but ended up cleaning up some other stuff
such as line wrapping.

There are still tabs present.
2015-05-09 16:54:05 -07:00
Sean Hunt
167800afdf Fix type compatibility warning. 2015-05-09 13:07:49 -04:00
Derek S. Ray
d0fb68795d Merge branch 'derek-elbereth'
* derek-elbereth:
  ensure that the 'safe' objects remain safe
  finish up the changes to trigger erosion on use
  initial pass for toning down Elbereth

Conflicts:
	dat/castle.des
	dat/sokoban.des
	include/extern.h
	src/engrave.c
	src/mklev.c
	src/monmove.c
	src/zap.c
2015-05-09 11:58:36 -04:00
nhmall
5011459c7e Merge branch 'master' into win32-x64-working 2015-05-07 05:00:36 -04:00
nhmall
b901acc7d6 make internal numbering match updated headers 2015-05-07 04:58:59 -04:00
nhmall
20069798d4 Merge branch 'master' into win32-x64-working 2015-05-07 04:52:30 -04:00