Commit Graph

3387 Commits

Author SHA1 Message Date
nhmall
87c22180f2 rolling back after criticism of approach 2015-06-13 22:31:31 -04:00
nhmall
13bc96ca98 avoid error
The presence of [...] in middle of tribute quote
wasn't handle correctly in the new formatting code.
2015-06-13 20:59:40 -04:00
nhmall
58f3611ec1 Ensure more consistent formatting of tribute passages
Changes to be committed:
	modified:   src/files.c
2015-06-13 19:18:01 -04:00
nhmall
e3850d8606 start new tribute content handling 2015-06-13 09:33:40 -04:00
nhmall
37f0eafa93 support for link-time option in #version
Changes to be committed:
	modified:   src/version.c
	modified:   sys/share/cppregex.cpp
	modified:   sys/share/pmatchregex.c
	modified:   sys/share/posixregex.c
	modified:   util/makedefs.c

Some options in 3.6.0 are determined by what you link with.
The choice of regex support is one.
Let #version show that linked option along with the compile-time options.
2015-06-12 19:23:18 -04:00
nhmall
d40b9b22de Merge branch 'master' into win32-x64-working 2015-06-12 07:12:10 -04:00
nhmall
23cbe049be some bk_glyph code iflags.use_background_glyph only 2015-06-12 07:10:46 -04:00
nhmall
017e826837 Merge branch 'master' into win32-x64-working
Conflicts:
	src/options.c
2015-06-11 22:24:42 -04:00
PatR
0bf3231f29 role selection: priest/priestess' prompt
Change "Shall I pick your priest/priestess' race, gender, ..." prompt
to "... priest/priestess's ...".

Unfortunately that makes it long enough to push the cursor onto the
next line for basic 80 column display.  If caveman/cavewoman's wasn't
already longer I think I would have left the clumsier phrasing/spelling.
2015-06-11 18:47:57 -07:00
PatR
af54125c22 characteristics disclosure
Change end of game disclosure's display for strength, dexterity, &c to
always show the maximum possible value instead of only when the final
value was less than maximum.  For both end of game and ^X, change the
description from "limit" to "innate limit" if the current value exceeds
limit due to worn items (gauntlets of power, +N ring of adornment, &c).
2015-06-11 18:19:09 -07:00
nhmall
f2daf4f7f8 punctuation in failed messages 2015-06-11 21:11:41 -04:00
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
Pasi Kallinen
4ead443847 Remove unused variable 2015-06-11 19:36:08 +03:00
Pasi Kallinen
183bf0fbf2 Fix unused variable thinko 2015-06-11 19:34:49 +03:00
nhmall
2e3a109826 alter beta identifier 2015-06-11 08:25:56 -04:00
nhmall
b2a1d142ab back as it was except when iflags.use_background_glyph is set 2015-06-11 08:19:29 -04:00
nhmall
30db04802c add flag to allow conditional exec of related
Changes to be committed:
	modified:   include/flag.h
	modified:   src/display.c
	modified:   src/options.c
2015-06-11 08:14:06 -04:00
nhmall
3b158eaa4a Merge branch 'master' into win32-x64-working 2015-06-10 21:11:15 -04:00
PatR
c9013bdc6a tribute passage 'summary'
When reading a passage from a tribute novel, put the final attribution
line "[$TITLE, by Terry Pratchett]" into message history, comparable to
the summary line for deliver-by-window quest messages.
2015-06-10 16:23:19 -07:00
nhmall
81d7d4ab22 Merge branch 'master' into win32-x64-working
Conflicts:
	src/display.c
2015-06-10 19:19:37 -04:00
nhmall
a0f769ae56 commit out NO_GLYPH return until win32 supports it
Changes to be committed:
	modified:   src/display.c
2015-06-10 04:35:05 -04:00
nhmall
a848660a38 more background tile work
- newsym() should always show glyph even if foreground glyph has not changed
- get_bk_glyph should operate on type of floor not on type of glyph.
2015-06-10 04:13:13 -04:00
nhmall
b9ab9aae2a use NO_GLYPH as an indicator to ignore background glyph
Changes to be committed:
	modified:   doc/window.doc
	modified:   src/display.c
2015-06-09 21:56:28 -04:00
nhmall
b2f9ba5de3 default to original background
Changes to be committed:
	modified:   src/display.c

The work for getting this working fully is now moving to the background_tiles branch.
In master, we just return the standard lit room tile for now, no change in behavior.
No ports utilize the new parameter as yet.
2015-06-09 21:33:08 -04: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
d5631bc448 Merge branch 'master' into AlexK-misc 2015-06-08 21:11:54 -04:00
nhmall
85e80f1e3e provide bkglyphs
Changes to be committed:
	modified:   src/display.c
2015-06-08 20:10:43 -04: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
Alex Kompel
6d8a591fc1 Chatting with priest converted to minion crashes the game (few code paths in priest_talk() assumed the priest has an altar) 2015-06-06 08:16:30 -07:00
PatR
4453ecac64 lookat again
Remove second 'alt_i' initialization, which was first in implementation.
Superseded by the preceding line, which came later.  Works either way,
but the conditional initalization avoids the two extra loop iterations
when they're not useful.
2015-06-05 23:37:02 -07:00
PatR
7218f2bfbd lookat issues for unknown/solid rock/dark room
Fix two things with the ';' and '/' commands, both for looking at blank
space.  The list of possibilies included "a dark part of a room or the
dark part of a room" even though the code involved goes out of its way
to avoid redundant clauses.  S_stone let dark part be prefixed by 'a',
S_room and S_darkroom forced it to be 'the' which is better phrasing
but outsmarted the redundancy check.  Make S_stone's use of "dark part
of a room" force 'the' too.

That's trivial; this is more complicated:  the new maze variations
exposed/aggravated an issue that's been there all along.  In a non-
WALLIFIED maze, doing look-at on the solid stone in-place-of-wall
next to you reported "dark part of a room" which is clearly wrong when
you can tell it's not a room.  (The same thing happens in any ordinary
corridor, but players rarely try to identify blank space next to them
it that circumstance so it hasn't mattered very much.)  This change
results in look-at listing "unexplored" and "stone" as additional
possibilities when looking at blank spots.  Final description will be
"unexplored" instead of dark room if you haven't seen the spot, "stone"
if you have and that's what it is, or "dark part of a room" otherwise.
2015-06-05 20:19:18 -07:00
PatR
c890269947 remove use of __FUNCTION__
The special level loader has been using __FUNCTION__ in error messages
for a few months now, but that is a gcc extension (evidently picked up
by other compilers since only Borland had an issue so far).  The
standard way to do the same thing is with __func__, but that's C99 so
we should avoid it.  (__FUNCTION__ came earlier; gcc supports both.)

This switches to convential C code to achieve the same effect, using
the name 'nhFunc' rather than __FUNCTION__:
  void foo()
  {
    static const char nhFunc[] = "foo";
    ... code that might report problem in nhFunc ...
    return;
  }
This has only been added to the functions which actually reference it,
not a blanket intrusion into every routine.  In special level loader's
case, the reference is hidden in the opvar_free() macro which is used
quite a lot.

At first I used a macro:
  void foo()
  {
  #define nhFunc "foo"
    ... code that might report problem in nhFunc ...
    return;
  #undef nhFunc
  }
but using an actual variable avoids duplicate copies of the function
name string when used more than once inside a given function, and it
can't accidentally carry over into the next function due to missing or
misspelled #undef.

If we someday switch alloc() to give more specific information than
__FILE__, the macro variation would be better since the function name
won't be used most of the time (ie, when MONITOR_HEAP isn't defined).
2015-06-05 18:18:19 -07:00
Pasi Kallinen
bb3ed07f0a Prevent rays from bouncing off Plane of Air edges 2015-06-05 16:54:33 +03:00
nhmall
159b29a85b ensure dummy obj owornmask is clear (from Alex)
Another minor oddity (did not have time to trace it). Charges for damaged
weapon refer to it as "weapon in hand":

--
As you read the scroll, it disappears.  Being confused, you mispronounce
the magic words...  Demirci's long sword is covered by a mottled purple
glow!  "You degrade that long sword, you pay for it!"
Call a scroll labeled VERR YED HORRE:
What do you want to wield? [- ajrw or ?*] j
j - a rustproof athame named Magicbane (weapon in hand) (10 aum).
What do you want to drop? [$a-df-rtwxM or ?*] r
You drop a long sword (40 aum).
Demirci offers 8 gold pieces for your long sword.  Sell it? [ynaq] (y) y
You sold a long sword (40 aum) for 8 gold pieces.
You see here a scale mail (250 aum).
You see here a ring mail (250 aum).
A rustproof long sword (weapon in hand) (40 aum) for 15 zorkmids.  Pay?
[yn] (n)
You paid for a rustproof long sword (weapon in hand) (40 aum) at a cost of
15 gold pieces.  "Thank you for shopping in Demirci's used armor
dealership!"
--
2015-06-05 06:36:00 -04:00
PatR
def2549592 shapeshifting on rogue level
Limit vampire shapeshifting on rogue level to vampire bats (only
choice represented by uppercase letter) and have other shapeshifting
try for uppercase.  The latter isn't rigorous because shapeshifters
(chameleon=':', doppelganger='@', sandestin='&') aren't uppercase
themselves, so won't be created there under ordinary circumstances.
It applies to the "summon nasties" monster spell and post-invocation/
post-Wizard's-death harassment effect too.
2015-06-04 15:31:25 -07:00
Pasi Kallinen
2de17b059c Make priest door opening check match dog_move 2015-06-04 21:27:36 +03:00
Pasi Kallinen
8d1e49f094 Dwarves may be generated with dwarvish spears 2015-06-04 21:01:45 +03:00
Pasi Kallinen
f86bbca9b6 Show detected pets with correct glyph
When detecting monsters with blessed potion of monster detection,
show pets with the correct glyph; highlights them if hilite_pet is on.
2015-06-04 18:02:23 +03:00
Pasi Kallinen
86b84568ea Monster detection shows pets with the correct glyph
Make pets hilited when detected with uncursed potion of monster detection
and hilite_pet is on.  Noticed by Raisse.
2015-06-04 17:39:27 +03:00
Pasi Kallinen
014547beb2 Fix looking around when swallowed
From Boudewijn:

> I am currently swallowed by an ice vortex, and used the ; command
> to identify the \ on my top right.
>
> It said: "\       an opulent throne (interior of a monster)"

Now, when you're swallowed, and look at anything else than yourself,
you'll get "\        the interior of a monster (interior of an ice vortex)".
Based on the comment in the code, it seems this was the original
intention anyway.
2015-06-04 15:36:29 +03:00
Pasi Kallinen
19fe4ece8c Move struct istat_s above prototypes using it 2015-06-03 17:41:01 +03:00
Pasi Kallinen
cf28b8ad71 Fix Rogue-level lighting bugs caused by dark room
Found by Boudewijn
2015-06-03 17:27:40 +03:00
PatR
64e0c99b62 enlightenment for unarmored, also blindness
Augment the existing enlightenment feedback for blindness:  "innately"
blind if poly'd into something without eyes, "permanently" blind if
using the blind-from-birth option, "deliberately" blind if blindness
is  solely due to a blindfold, or "temporarily" blind otherwise.

Add status of "not wearing any armor" when applicable, with slightly
different phrasing if it's due to adhering the OPTIONS:nudist conduct.
2015-06-02 17:39:19 -07:00
PatR
ad7310bec6 breaking blind-from-birth conduct
OPTIONS:blind starts the hero off blind, but putting on the Eyes of the
Overworld confers sight.  Make that break the blind-from-birth conduct.

Sight persists after removing the Eyes even though they aren't intended
to cure anything.  It doesn't make sense to restore the blind-from-birth
flag when taking the Eyes off, but we may want to add another flag, or
make u.uroleplay.blind into a bit mask that can track both can't-see-now
for play and could-never-see for conduct.  (Actually, u.uroleplay.blind
should track only the conduct, and starting the game with it enabled
should set one of the extra bits in u.uprops[BLINDED].intrinsic.  The
Eyes already override that, and taking them off would restore blindness
since the bit would still be set.  As a bonus, the expression in the
macro 'Blind' could be simplified.)
2015-06-02 16:57:42 -07:00
nhmall
fee1259e60 make option show as disabled
Changes to be committed:
	modified:   src/options.c

make option show as disabled if compile time options aren't defined.
2015-06-02 18:20:07 -04:00
nhmall
ab57384a99 win32 raw_printf needs better formatting to read
Changes to be committed:
	modified:   src/options.c

Noticed while testing status bits, the meaningful part of
the message is truncated on WIN32.
2015-06-02 17:20:23 -04:00
nhmall
429ad27a74 runtime enable statushilites if compiled in
Changes to be committed:
	modified:   src/options.c

default to runtime enabled of statushilites if compile time option set
2015-06-02 16:55:02 -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
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