Commit Graph
226 Commits
Author SHA1 Message Date
nhmall 29d378116e fix unplanned perm change 2019-11-15 22:22:19 -05:00
nhmall 298af2294f quiet some macosx warnings 2019-11-15 21:20:38 -05:00
Pasi Kallinen a6b752e6f1 Lua: Default dungeon and level chance is 100 2019-11-10 17:36:59 +02:00
nhmall 1281b3819d remove an unused variable warning 2019-11-08 15:39:21 -05:00
Pasi Kallinen 4e438e0146 Use lua_tointeger instead of lua_tonumber 2019-11-07 19:28:58 +02:00
nhmall bcb627100b Merge branch 'paxed-lua-merged3' into paxed-lua-v2-merged 2019-11-06 12:56:21 -05:00
Pasi Kallinen 9cd9280276 Lua: remove dgn_comp, use lua instead 2019-11-06 18:45:10 +02:00
nhmall 2dd9aac832 remove some old comments and bits 2019-07-15 07:52:43 -04:00
Bart House 97ca83fd02 Merge branch 'master' into NetHack-3.7
# Conflicts:
#	src/pline.c
#	sys/winnt/windmain.c
#	win/tty/topl.c
#	win/win32/scripts/fuzzer/longtest.bat
#	win/win32/scripts/fuzzer/restore.bat
#	win/win32/scripts/fuzzer/runtill.bat
2019-07-14 23:50:54 -07:00
Bart House cd1b650fb7 Merge branch 'NetHack-3.6'
# Conflicts:
#	DEVEL/Developer.txt
#	include/config.h
#	include/decl.h
#	include/display.h
#	include/extern.h
#	include/global.h
#	include/hack.h
#	include/patchlevel.h
#	src/display.c
#	src/dothrow.c
#	src/makemon.c
#	src/monst.c
#	src/objnam.c
#	src/sp_lev.c
#	src/wield.c
#	src/zap.c
#	sys/share/pmatchregex.c
#	sys/winnt/Makefile.msc
2019-07-14 23:36:56 -07:00
Bart House ec05e1ec70 Revert "Fix compiler warnings."
This reverts commit 90f5aa91b7.
2019-07-14 21:13:43 -07:00
nhmall 0d34f43830 remove STATIC_DCL, STATIC_OVL, STATIC_VAR, STATIC_PTR from core 2019-07-14 17:24:58 -04:00
nhmall 041a9ad9c1 Merge branch 'master' into NetHack-3.7 2019-07-14 09:57:32 -04:00
nhmall ec1b77ff80 Merge branch 'NetHack-3.6' 2019-07-14 09:39:24 -04:00
Bart House 90f5aa91b7 Fix compiler warnings. 2019-07-13 09:53:42 -07:00
PatR 8762c9498e couple of 3.7 build warnings 2019-07-03 14:05:19 -07:00
nhmall 7054e06e42 NetHack minor release checklist items - savefiles
Make some progress on a couple of next minor release checklist
items, hopefully without introducing too many new bugs. This
is just the initial commit, and work continues.

Checklist items:

Savefiles compatible between Windows versions, whether 64-bit
or 32-bit in little-endian field format.

Selection of file formats:
 historical (structlevel saves),
 lendian (little-endian, fieldlevel saves),
 and just for proof-of-concept, ascii fieldlevel saves
 (the ascii is huge! 10x bigger than little-endian).

For the fieldlevel save, all complex data structures recursively
get broken down until until it is one of the simple types that
can't be broken down any further, and that gets when it gets
written to the output file.

New files needed for this build:

hand-coded:
include/sfprocs.h
src/sfbase.c      - really a dispatcher to one of the
                    output/input format routines.
src/sflendian.c   - little-endian output writer/reader.
src/sfascii.c     - ascii text output writer/reader.

auto-coded (generated):
include/sfproto.h
src/sfdata.c

This is just one approach. I'm sure there are countless others
and they have different pros and cons.

For producing the auto-coded files a utility called
universal-ctags, that is actively maintained and evolving,
was used to do all the heavy-lifting of parsing the
NetHack C sources to tabulate the data fields, and store
them in an intermediate file called util/nethack.tags
(not required for building NetHack if you already have a
generated include/sfproto.h and src/sfdata.c)

util/readtags (also not required for building NetHack
itself) will decipher the nethack.tags file and produce
the functions that can deal with the NetHack struct data
fields.

You can obtain the source for universal-ctags by cloning it
from here:
https://github.com/universal-ctags/ctags.git

The combination universal-ctags + util/readtags has been
tried and tested under both Windows and Linux, so it is
not tied to a particular platform.

Note: util/readtags will work only with universal-ctags
output, so other ctags are unlikely to work as-is.
Universal-ctags can be build from source very easily
under Linux, or under Windows using visual studio.
2019-06-23 00:11:46 -04:00
PatR 9125b5943e 3.7: automatic annotation for vibrating square
Add "Gateway to Moloch's Sanctum" to the vibrating square level if you
step on the square or detect/magic map it as a pseudo-trap, an extra
hint for players who manage to get that far but then don't know what
to do next.  (I think I may also add a randomly placed floor engraving
along the lines of "For a good time, consult the Oracle of Delphi."
as a gag variant of "For a good time, call <name> at <phone number>."
Not very thematic for Gehennom but could conceivably nudge someone in
the right direction.  But it could give away the level for experienced
players who haven't located the vibrating square yet.)

The annotation sticks until the one for "Moloch's Sanctum" gets added.
That happens when the temple on the sanctum level is entered or the
altar there has become mapped (in view or via magic mapping).

Could break existing 3.7.0- save files (but probably won't, since
at least two bits were available unless using an ancient 'Bitfield()
allocates whole bytes' configuration).  That's the reason I didn't
put this into 3.6.2+.
2019-06-11 09:29:14 -07:00
nhmall 6dd7dfa66c Merge branch 'NetHack-3.6' 2019-06-02 16:19:53 -04:00
PatR 4e119f4f00 place_object(obj,0,0) debugging
Got a hit (on Plane of Water) pretty quickly.
2019-06-02 05:02:08 -07:00
nhmall 3fae8c7ce6 Merge branch 'NetHack-3.6' 2019-05-26 08:18:03 -04:00
PatR 5cc7301965 free overview->final_resting_place
The #overview command can provide some feedback about levels loaded
from bones files; that data wasn't being released at end of game.

(There are two copies of that data, one set always in memory with
the overview data [final_resting_place field in the 'mapseen' data],
and another set with portions attached to each relevant level [via
level.bonesinfo].  Neither set was being properly freed; this only
addresses one of them, so far. The per-level data can probably be
eliminated--for post-3.6--since DUNGEON_OVERVIEW isn't a conditional
feature as it was when that was implemented.)
2019-05-25 23:43:42 -07:00
nhmall d15496ba31 Merge branch 'NetHack-3.6.2' 2019-04-22 14:36:58 -04:00
nhmall dcf4da2150 preserve dknown field between fakeobj instances
Preserve temporary fake object's previous dknown value by storing it
as a flag value within the m_ap_type field of the posing monster, and
recalling it when it is needed.

This is intended to help eliminate observable differences in price display
between real objects and mimics posing as objects.

98% of this is just switching the code to utilize macro M_AP_TYPE(mon)
everywhere to ensure that the flag bits are stripped off when needed.
2019-04-22 14:17:18 -04:00
nhmall bfddda7c41 Merge branch 'NetHack-3.6.2' 2019-04-04 08:13:16 -04:00
PatR 505997a702 couple of comment tidbits 2019-04-03 18:31:25 -07:00
nhmall 73f186f5cc Merge branch 'NetHack-3.6.2' 2019-02-15 15:25:07 -05:00
PatR 109a9707ae array lint
Suppress a diagnostic from the VMS compiler that the '&' in '&array'
has no effect.
2019-02-13 16:11:23 -08:00
nhmall 98acd55fcc Merge branch 'NetHack-3.6.2' 2019-01-14 18:16:19 -05:00
PatR 355dec4d84 blocking or unblocking levitation or flight
when level teleporting or digging.  Level teleporting while levitation
was blocked due to being inside solid rock didn't notice that it should
be unblocked until you moved from whatever type of terrain you landed
on (room, for instance) to some other type (such as corridor).  Digging
down to make a pit or hole while inside solid rock converts that spot
to floor so should also check whether to unblock levitation/flying, and
not fall if unblocking occurs.
2019-01-13 15:17:40 -08:00
nhmall 58f2218c4e Merge branch 'NetHack-3.6.2' 2019-01-09 07:24:18 -05:00
Bart House 769ad91cc3 mthrowu, nhlan, options, regions, rip and role globals moved to g. 2018-12-25 16:26:27 -08:00
Bart House 0763046c38 zeroX, tc_gbl_data and fqn_prefix moved to instance globals. 2018-12-25 08:09:37 -08:00
Bart House be5cdcf77a killer, level and rooms move to instance globals. 2018-12-24 19:50:08 -08:00
Bart House 572ee347b9 Another round of instance globals changes. 2018-12-24 16:43:50 -08:00
Bart House 74edf42f1c Moved decl.c globals into instance globals. 2018-12-22 18:44:22 -08:00
Bart House 3645e415e3 Moved more globals to instance_globals. 2018-12-19 20:01:55 -08:00
PatR 1273d6817e provide dungeon location in ^X feedback
Dungeon level wasn't included in ^X output, so it wasn't actually
giving all status fields and attempting to rely on it when turning
off 'status_updates' was leaving a gap in feedback for the player.
Add an extra line to the first section where character's name and
patron deity are reported, giving current location.
|You are in the Dungeons of Doom, on level 5.
or
|You are in the endgame, on the Elemental Plane of Fire.

The information is more explicit than the basic status field, but
you can already get similar information via #overview so it isn't
giving away extra info.
2018-10-27 03:45:18 -07:00
keni d8c49ec9d1 Add updated copyright lines, part 1. 2018-04-25 15:00:13 -04:00
PatR f9f7eb9633 portal feedback from #wizwhere
The #wizwhere command (formerly ^O) has given the location of the
invocation position when on the relevant level for ages.  It was
extended in 3.6.0 to give magic portal location when on the any
of the four elemental plane levels.  Extend it again to show the
location of any magic portal when on a level which has one (so an
extra line of feedback at end of ^O output for quest entry, quest
home, Ft.Ludios entry once that's been assigned, and Ft.Ludios).
2018-04-09 14:12:43 -07:00
PatR 8710c2c29a minor fix for #annotate
Some github feedback pointed out that getting annotation input from
the player behaved differently from similar input for naming of
monsters and objects.  The complaint stated that hitting <return>
without supplying any input removed the old annotation, where other
naming would leave the old name intact.  3.6.0 did misbehave that
way; current code does too if EDIT_GETLIN is disabled but behaves
as desired when it's enabled.  (There's nothing that I can spot in
donamelevel() to explain why.  I'm confused.  Is tty_getlin()
returning the default answer instead of empty if that default text
is deleted at the prompt and no new text entered prior to <return>?)

Make donamelevel() work like mon/obj naming.  Empty input leaves
existing annotation, if any, intact.
2018-04-08 17:04:24 -07:00
Pasi Kallinen 2548d68dd3 Fix some warnings
Remove an unused variable, add missing FALLTHRUs, and use the same
FALLTHRU wording where it wasn't recognized by gcc
2018-03-30 19:42:50 +03:00
Pasi Kallinen 94ad7512a6 Compile-time option to allow some prompts remember the input
Define EDIT_GETLIN to make the tty, X11, and Qt4 windowports to
remember the input strings for wishing and annotation.
2018-03-26 23:04:53 +03:00
PatR f4b2b39931 formatting bit for u_on_rndspot()
Something trivial I noticed while looking into the stuck-in-wall
situation.
2018-02-06 02:20:26 -08:00
Pasi Kallinen f36d1036de Show in wizmode level teleport menu your current location 2017-09-16 18:19:25 +03:00
Pasi Kallinen 52ed881b2c Remove overview for wizmode regenerated map
The wizmakemap command throws away the current level, so don't keep
the overview data for it around.
2017-09-15 14:45:51 +03:00
Pasi Kallinen 189809a55c Rename terminate to nh_terminate so VS2015 can compile 2017-08-19 14:10:29 +03:00
PatR ad29017482 fix #H5333 - overview annotation for quest summons
The automatic annotations supplied for various special levels were
treating the quest leader's summons as being mutually exclusive with
the other things of interest.  It's not, so wasn't shown if the entry
portal was on either the bigroom level or the rogue level.  Handle it
differently from the rest so that it can stack with annotations for
those levels.  (The annotation for the portal itself, which doesn't
get added until traversed, was already handled differently and shown
correctly on those levels.)
2017-04-11 17:58:14 -07:00
Pasi Kallinen ac2fc526eb Fix complaint about uninitialized variable 2017-01-27 07:35:46 +02:00
Pasi Kallinen bf1c81c0b4 Accept custom level annotations at the level teleport prompt
via UnNetHack, original implementation by aaxelb
2016-10-18 23:19:16 +03:00