Commit Graph

6978 Commits

Author SHA1 Message Date
keni
0e51afc7cd update Files attributes with priorities and %s substitution 2018-05-31 21:42:06 -04:00
keni
a1b19734e9 update autogenerated Files file 2018-05-29 19:33:33 -04:00
keni
13db5d2db8 add autogenerated Files 2018-05-29 19:31:40 -04:00
keni
e7b901419b Merge branch 'NetHack-3.6.2' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6.2 2018-05-29 19:31:18 -04:00
keni
9858f69fa8 update .gitattributes files for auto-generation of Files 2018-05-29 19:28:26 -04:00
nhmall
1886492a91 Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2 2018-05-28 08:46:17 -04:00
nhmall
15995375dd Guidebook date for merge verification 2018-05-28 08:45:35 -04:00
nhmall
29ecc5761b Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2 2018-05-28 08:30:06 -04:00
nhmall
2b52b093e7 expand on patch 2 so far in patchlevel.h 2018-05-27 21:39:20 -04:00
nhmall
959f0e557b Guidebook 2018-05-27 13:44:46 -04:00
nhmall
dfdd44249e Guidebook 2018-05-27 17:39:16 +00:00
nhmall
d9975e5afc Revert "update some history"
This reverts commit 61bf743fb1.
2018-05-27 11:50:57 -04:00
nhmall
acfc1d1fe8 Revert "Guidebook.tex typo"
This reverts commit d9ce033915.
2018-05-27 11:50:36 -04:00
nhmall
2b1b4cc768 Revert "Update Guidebook.txt"
This reverts commit ad52611a6b.
2018-05-27 11:50:19 -04:00
nhmall
283bcbbfd0 Revert "yet more Guidebook"
This reverts commit ff80f6be74.
2018-05-27 11:49:59 -04:00
nhmall
6f82802364 Revert "more pre-release updates"
This reverts commit 175b0b1960.
2018-05-27 11:04:46 -04:00
nhmall
ec8c01f310 Revert "update Files"
This reverts commit e4f23a929c.
2018-05-27 11:04:19 -04:00
nhmall
b92296dc54 Revert "generted files not present in the source tree updated in Files"
This reverts commit d2788d0c04.
2018-05-27 11:03:56 -04:00
nhmall
e6eb8162c3 Revert "prep bit makedefs.c"
This reverts commit 9ad1690bdb.
2018-05-27 11:03:32 -04:00
nhmall
1007dd0672 Revert "remove unmaintained Files from distribution"
This reverts commit d09d427831.
2018-05-27 11:03:07 -04:00
nhmall
0dda4b4546 Revert "README bit"
This reverts commit aec409262e.
2018-05-27 11:02:45 -04:00
nhmall
aec409262e README bit 2018-05-26 20:37:06 -04:00
nhmall
d09d427831 remove unmaintained Files from distribution 2018-05-26 20:15:37 -04:00
nhmall
9ad1690bdb prep bit makedefs.c 2018-05-26 20:04:04 -04:00
nhmall
d2788d0c04 generted files not present in the source tree updated in Files 2018-05-26 19:47:00 -04:00
nhmall
e4f23a929c update Files
Done via automation
2018-05-26 19:27:00 -04:00
nhmall
175b0b1960 more pre-release updates 2018-05-26 18:55:28 -04:00
nhmall
8cec582b9b Merge branch 'NetHack-3.6.2' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6.2 2018-05-26 18:47:16 -04:00
nhmall
ff80f6be74 yet more Guidebook 2018-05-26 22:43:09 +00:00
nhmall
afcbf56168 more Guidebook 2018-05-26 18:39:19 -04:00
nhmall
ad52611a6b Update Guidebook.txt 2018-05-26 22:32:46 +00:00
nhmall
d9ce033915 Guidebook.tex typo 2018-05-26 18:27:29 -04:00
nhmall
61bf743fb1 update some history 2018-05-26 18:23:19 -04:00
nhmall
e41c80e5eb missed one 2018-05-25 18:57:41 -04:00
nhmall
6c9aa091cd guidebk.txt over guideboo.txt 2018-05-25 18:52:26 -04:00
nhmall
4d7f2869c6 Merge branch 'msdos-build' of https://github.com/chasonr/NetHack into msdos 2018-05-25 18:42:50 -04:00
Ray Chason
bd5743f758 MS-DOS does not use getreturn_enabled 2018-05-23 21:44:42 -04:00
Ray Chason
2357cb3fc2 Work around quirky FreeDOS behavior 2018-05-23 21:44:20 -04:00
PatR
645e1ac5b3 hilite_status title when polymorphed
Make a 'textmatch' rule for title that matches a specific monster type
while polymorphed take precedence over a "none of the above" one.
2018-05-22 19:23:03 -07:00
PatR
cb02e77589 hilite_status, what else?
While deciding which highlights to apply, give 'percentage' and/or
'absolute' rules that match precedence over 'always' rules regardless
of order within the config settings.

When using 'O' to add 'up/down/changed' rule, don't include 'down'
as a choice for field 'time'.

When using 'O' to add rules, don't squeeze out spaces if adding a
'textmatch' rule for title (to support "field worker", "high priest",
"student of stones", and so forth).

While deciding which highlights to apply, ignore double quotes when
testing whether a 'textmatch' rule matches the current text of a
field.  This allows rules to specify string values as '"value"'
instead of just 'value'.  It not does validate them to ensure quotes
are paired at beginning and end, it just ignores them.  New rules
created via 'O' for rank title include them when displaying what the
new rule would look like as a config file option.  Other text fields
haven't been changed to show quotes but ignoring such applies to all
'textmatch' comparisons.

Expand the menu for adding 'textmatch' rules for title.  When a rank
has separate male and female titles, list three entries instead of
just one
  "male rank"
  "female rank"
  "male rank" or "female rank"
(the order of the first two entries and of the two titles in the
third entry is reversed if the current character is female).  If the
user picks the third entry, two rules are added instead of just one,
identical to each other except for the text to match.

Further expand that menu with
  "none of the above (polymorphed)"
at the end.  When deciding which highlights to apply, "none of the
above" and "(polymorphed)" and the full string are treated as
equivalent (with spaces, quotes, and parentheses ignored).  Rather
than comparing anything against the title text, it matches if the
hero is polymorphed (where title will be "<hero> the <monster-type>"
instead of "<hero> the <rank>").  Note that the user can have config
file 'textmatch' rules for title to match specific "<monster-type>"
values but the 'O' menu doesn't offer any opportunity for that.
(I've just realized that rules for specific monster types should be
given precedence over "none of the above" but at present that isn't
done; the order of the rules will determine which wins out.)
2018-05-22 10:40:55 -07:00
PatR
1e0f546740 hilite_status string comparison
Simplify the string comparison done when checking 'textmatch' rules
to decide whether to highlight something.

Fix the menu titles when setting up a textmatch via 'O':  the title
for color referred to attribute and the one for attribute used the
default.  The two tiles are set up in advance; the one for color was
set correctly but then the one for attribute was written into the
wrong buffer.

When using 'O' to manipulate hilite_status rules, if there are any
when you're done and the 'statushilites' option (iflags.hilite_delta)
is 0, give a message reminding that it needs to be non-zero for
highlighting to be activated.
2018-05-22 02:42:08 -07:00
PatR
2b8160a70d status_hilite: no more ANY_UINT
The fact that the index to the array of hunger strings is an unsigned
field in 'struct you' is unimportant as far as its usage for status
highlighting.  Since it is the only ANY_UINT field, change BL_HUNGER
to plain 'int' so that there'll be no need for ANY_UINT handling.

And some more validation when setting up highlight rules.  For 'O',
in the menu to choose a relationship after supplying a number N,
don't include "less than N" and "N or less" for percentage or
absolute--other than AC--unless N is greater than 0, and don't
include "N or more" and "more than N" for percentage unless N < 100.

Also, when 'O' prompted for a number, if you entered <X or =X (for X
not a sequence of digits), it remembered the '<' or '=' (or '>=', &c)
when reprompting for a valid number.  If the 'X' portion is invalid,
discard the relationship operator before asking for another number.
2018-05-21 19:11:18 -07:00
nhmall
f614b9e27e fix access violation in status_finish() if window port not initialized 2018-05-21 18:31:45 -04:00
nhmall
81e422189c Windows wouldn't compile without TTY_GRAPHICS defined 2018-05-21 16:44:19 -04:00
nhmall
d95dae3cf4 fix early crash during config file error processing 2018-05-21 16:39:16 -04:00
nhmall
fcc26f2c44 fixes update for previous static prototype move in rip.c 2018-05-21 10:20:17 -04:00
nhmall
8f73f85ac4 static prototype could be left orphaned depending on #defines 2018-05-21 10:14:39 -04:00
nhmall
7508b0e34e Merge branch 'NetHack-3.6.2' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6.2 2018-05-21 09:55:44 -04:00
nhmall
6311985d57 don't highlight the leading space before gold field on the status line 2018-05-21 09:35:38 -04:00
PatR
dc00df935b hilite_status support for <=, >=, explicit =
Add threshold relationships <= and >= so that the change to make <
and > perform their expected comparison can be resolved.  "Point
release shouldn't force players to update their config files" does
not carry sufficient weight given that they already had to do that
to turn on status highlighting when going from 3.6.0 to 3.6.1.  The
3.6.2 release notes can warn them about the need to update their
status highlight options if they're currently using '<' and/or '>'.

Entering new hilite rules via the 'O' command accepted '=' prefix
for numbers, but rules from config files did not.  Now they do.
The '=' prefix is optional in both situations.

With 'O', percent rules and absolute rules had separate menu entries
so picking one was already choosing the rule type, but entering a
numeric value without percent sign (for percent) or with one (for
absolute) would change the type on the fly.  If someone has already
picked percentage they shouldn't be required to append '%' to the
digits, so that is now optional.  If explicitly included with the
number after having picked absolute, the value is rejected.  It is
trivial to back up in those menus and choose the alternate type if
someone changes his/her mind part way through.

If a status field has both persistent (percent, absolute, always)
and temporary highlights (up, down, changed), give the temporary one
precedence when the value has changed.  To do that with 3.6.1, the
rules for temporary had to follow the ones for persistent highlights
since whichever matched last was the one used.  Now their order
relative to each other doesn't matter.  If a value increases and
there is both an 'up' rule and a 'changed' rule, the more specific
'up' takes precedence, regardless of their relative order; likewise
for decreases and 'down' vs 'changed'.

There were a couple more tweaks needed to support negative values;
I overlooked the 'O' menu handling before.  >-1% and <101% now work
for both the config file and interactive adding via 'O' methods of
defining highlight rules, although new >=0% and <=100% will be
clearer to anyone examining a rule set.

'enum relationship' was forcing LT_VALUE to be -1 but that fact was
never utilized anywhere, and the code was using magic number -2 to
mean "no relationship yet".  This adds NO_LTEQGT to replace the
latter and gives it value -1.  EQ_VALUE is still 0 so effectively
the default if a highlight hasn't been fully set up yet.  LT_VALUE
is now just another positive value along with GT_VALUE, LE_VALUE, &c.

The Guidebook hasn't caught up with the code yet.

The rule choosing code used when deciding how to highlight something
only supports 'int' fields and relies on 'long' having the same bits.
It needs to be extended to support 'long' properly.  Fixing should
be straightforward (except maybe for the initialization of min/max
best fit handling) but this doesn't address that.  Also, data type
for encumbrance/carrying-capacity should be changed from unsigned to
plain int so that no extra handling for just one field will be needed.
2018-05-21 05:58:01 -07:00