Commit Graph

5547 Commits

Author SHA1 Message Date
Pasi Kallinen
ddd8b7d9a5 Remove vestiges of quest text data file 2019-11-25 16:30:54 +02:00
Pasi Kallinen
b66bcc2f5a Fix lua quest data output types
...so the texts are given exactly the same way as they were given previously.
2019-11-25 09:21:37 +02:00
nhmall
a9425159eb fix a transcription error 2019-11-24 23:42:27 -05:00
nhmall
d830f3578a Merge branch 'NetHack-3.7' into paxed-quest-lua 2019-11-24 23:11:30 -05:00
PatR
9adeff5e27 3.7: fix #9397 - pronouns when hallucinating
Developed for 3.6 but deferred to 3.7.  Most of the testing was with
the earlier incarnation.

Report was that pronouns were accurate for the underlying monsters
when hallucination was describing something random, and also that the
gender prefix flag from bogusmon.txt wasn't being used.  The latter
is still the case, but pronouns are now chosen at random while under
the influence of hallucination.  One of the choices is plural and an
attempt is made to make the monster name and verb fit that usage.

|The homunculus picks up a wand of speed monster.
|The large cats zap themselves with a wand of speed monster!
|The blue dragon is suddenly moving faster.

There is no attempt to match gender for the singular cases; you might
get
|The succubus zaps himself [...]
or
|The incubus zaps herself [...]
2019-11-24 18:29:14 -08:00
PatR
8f5cca8e3d 3.7 build cleanup
Unix Makefile.utl wasn't aware of the dependency of makedefs.o on
src/mdlib.c so didn't rebuild makedefs when it should have.

Eliminate several warnings:
mdlib.c  - #if inside the arguments to macro Sprintf();
nhlua.c  - nhl_error() ends with a call to lua_error() which doesn't
           return, but neither of them were declared that way;
nhlsel.c - because of the previous, the 'else error' case of
           l_selection_ellipse() led to complaints about uninitialized
	   variables;
sp_lev.c - missing 'const'.

I did minimal testing which went ok, but revisiting a couple of levels
gave me un-freed memory allocated by restore.c line 1337.  (I haven't
looked at that at all.)
2019-11-24 17:56:01 -08:00
nhmall
2770df9c22 Merge branch 'NetHack-3.7' into paxed-quest-lua 2019-11-24 18:57:46 -05:00
nhmall
47a24d507e Merge branch 'NetHack-3.6' 2019-11-24 18:55:18 -05:00
nhmall
b070cb10ca Merge branch 'NetHack-3.6' 2019-11-24 18:51:59 -05:00
PatR
2288b94ae4 fix #H9462 - segfault with levitation boots
This is similar to the helm of opposite alignment case fixed some
time ago.  Deferring the setting of foo->known until an item is fully
worn (because it used to get set earlier but gave away information if
the wear operation was interrupted) didn't take into account that foo
might end up Null in various circumstances.  So Boots_on() needs to
validate uarmf before setting uarmf->known in case putting on boots
of levitation while on a sink caused them to come right back off.

I put similar validation into all foo_on() just in case (as far as
I'm aware, only Boots_on() and Helmet_on() actually need that).
2019-11-24 15:33:16 -08:00
nhmall
2a187c47c7 more warnings 2019-11-24 18:01:48 -05:00
nhmall
5d778f7418 clean up some macosx build warnings 2019-11-24 17:26:35 -05:00
nhmall
e6f5899200 added protection in Makefile for cross-compile (although should not happen): 2019-11-24 12:39:00 -05:00
nhmall
0e7d62bcf5 remove warning for unused variable 2019-11-24 12:03:11 -05:00
Pasi Kallinen
8b87013fba Move quest texts to lua 2019-11-24 17:41:39 +02:00
nhmall
ac315adaf1 Revert "attempt to avoid questpgr convert woes on cross-compile by making the int sizes fixed"
This reverts commit b8a6d82c57.
2019-11-24 00:40:00 -05:00
nhmall
b8a6d82c57 attempt to avoid questpgr convert woes on cross-compile by making the int sizes fixed 2019-11-24 00:11:26 -05:00
nhmall
55f2fa350d Merge branch 'NetHack-3.7' 2019-11-23 17:32:44 -05:00
nhmall
9ed1d8ad37 Merge branch 'NetHack-3.6' 2019-11-23 17:32:36 -05:00
PatR
fe2826c856 more #H9375 - Rider bargethrough
I think the previous expression would allow moving (via swapping
places) from a pool to solid rock or closed door which was not what
was intended (but moot since there aren't any pools on the Astral
level).  This revised expression does what is intended:  can only
swap to a pool location if already located in/over (the Riders fly?
they should probably be non-breathing) another pool.
2019-11-23 09:28:08 -08:00
Pasi Kallinen
acf48fa305 Fix the lua integration parts marked for review
Also, explicitly allow traps of type "random".
2019-11-23 17:42:14 +02:00
nhmall
fe5c7b4292 Merge branch 'NetHack-3.7' 2019-11-22 23:38:02 -05:00
nhmall
0024ea5ce4 Merge branch 'NetHack-3.6' 2019-11-22 23:37:48 -05:00
nhmall
1e0c03b3f6 incremental improvements to cross-compiling support in NetHack 3.7
Some support of new code #defines to faciliate cross-compiling:

    OPTIONS_AT_RUNTIME    If this is defined, code to support obtaining
                          the compile time options and features is
                          included. If you define this, you'll also have
                          to compile sys/mdlib.c and link the resulting
                          object file into your game binary/executable.

    CROSSCOMPILE          Flags that this is a cross-compiled NetHack build,
                          where there are two stages:
                          1. makedefs and some other utilities are compiled
                          on the host platform and executed there to generate
                          some output files and header files needed by the
                          game.
                          2. the NetHack game files are compiled by a
                          cross-compiler to generate binary/executables for
                          a different platform than the one the build is
                          being run on. The executables produced for the
                          target platform may not be able to execute on the
                          build platform, except perhaps via a software
                          emulator.

                          The 2-stage process (1. host, 2.target) can be done
                          on the same platform to test the cross-compile
                          process. In that case, the host and target platforms
                          would be the same.

    CROSSCOMPILE_HOST     Separates/identifies code paths that should only be
                          be included in the compile on the host side, for
                          utilities that will be run on the host as part of
                          stage 1 to produce output files needed to build the
                          game. Examples are the code for makedefs, tile
                          conversion utilities, uudecode, dlb, etc.

    CROSSCOMPILE_TARGET   Separates/identifies code paths that should be
                          included on the build for the target platform
                          during stage 2, the cross-compiler stage. That
                          includes most of the pieces of the game itself
                          but the code is only flagged as such if it must
                          not execute on the host.

If you don't define any of those, things should build as before.
One follow-on change that is likely required is setting the new dependency
makedefs has on src/mdlib.c in Makefiles etc.

More information about the changes:

    makedefs

    - splinter off some of makedefs functionality into a separate file
      called src/mdlib.c.
        - src/mdlib.c, while included during the compile of makedefs.c
          for producing the makedefs utility, can also be compiled
          as a stand-alone object file for inclusion in the link step
          of your NetHack game build. The src/mdlib.c code can then
          deliver the same functionality that it provided to makedefs
          right to your NetHack game code at run-time.
          For example, do_runtime_info() will provide the caller with
          the features and options that were built into the game.
          Previously, that information was produced at build time on the
          host and stored in a dat file. Under a cross-compile situation,
          those values are highly suspect and might not even reflect the
          correct options and setting for the cross-compiled target
          platform's binary/executable. The compile of those values and
          the functionality to obtain them needs to move to the target
          cross-compiler stage of the build (stage 2).
        - date information on the target-side binary is produced from
          the cross-compiler preprocessor pre-defined macros __DATE__
          and __TIME__, as they reflect the actual compile time of the
          cross-compiled target and not host-side execution of a utility
          to produce them. The cross-compiler itself, through those
          pre-defined preprocessor macros, provides them to the target
          platform binary/executable. They reflect the actual build
          time of the target binary/executable (not values produced
          at the time the makefiles utility was built and the
          appropriate option selected to store them in a text file.)
        - most Makefiles should not require adding the new file
          src/mdlib.c because util/makedefs.c has a preprocessor
          include "../src/mdlib.c" to draw in its contents. As previously
          stated though, the Makefile dependency may be required:
		makedefs.o: ../util/makedefs.c ../src/mdlib.c
                                               ^^^^^^^^^^^^^^^
2019-11-22 22:35:48 -05:00
PatR
ce46c97e6e fix #H9375 - unintended Rider corpse suppression
Don't let Riders swap places with something (fog or ooze, perhaps)
located at a closed door spot because if it gets killed there, there
won't be any corpse and it will stop auto-reviving.

Just avoid moving to spots where mondied() won't place a corpse
instead of worrying about whether a bargethrough creature (if there
ever are any besides the Riders) might be able to survive at the
destination (so ignore pass-walls, door-opening, swimming, &c).
2019-11-22 18:16:59 -08:00
nhmall
fa4552e09e Merge branch 'NetHack-3.6' 2019-11-22 07:41:53 -05:00
PatR
d4df876a6f docall fix
Noticed while testing something:  hero drank a potion of see invisible
and nearby invisible monster could now be seen--in theory--but I was
asked what to call the potion while the updated map was buffered.  So
I didn't see the invisible monster until after naming the potion.

pline() flushes buffered map updates, but getlin() doesn't.  I didn't
change that, but I've made docall() do so since the updated map may
make a difference in what the player can tell about whatever is being
'called'.
2019-11-22 02:46:28 -08:00
nhmall
39bc7e9bb9 Merge branch 'NetHack-3.6' 2019-11-21 23:50:01 -05:00
nhmall
3545374e9c internal self-recover fix and bones name buffers 2019-11-21 23:41:11 -05:00
PatR
a62d6145bd fix part of #H9397 - hallucinatory mon names
Fix the issue where a hallucinatory monster name which begins with
a slash is having that stripped off as if it was a gendor and/or
personal-name flag.

The main issue was pronouns ignoring hallucination and this doesn't
attempt to address that.

Also, add new hallucinatory name "leathery-winged avian" which has
been lurking for a while.
2019-11-21 17:43:55 -08:00
Pasi Kallinen
cb4d350424 Fix unnecessary string copy 2019-11-20 21:20:35 +02:00
Pasi Kallinen
a338f8bd88 Fix wizmakemap calling mklev twice 2019-11-20 21:08:35 +02:00
Pasi Kallinen
791657f4e6 Fix memory leaks in lua integration 2019-11-20 20:09:16 +02:00
Pasi Kallinen
786a90415e Fix some memory leaks 2019-11-19 17:31:50 +02:00
nhmall
f7cb969e2d Merge branch 'NetHack-3.6' 2019-11-18 19:19:12 -05:00
PatR
fc2886efb4 yet more --showpaths (dumplog)
Provide a little more information when dumplog is unavailable.
While testing various permutations, I encountered a couple of
problems with conditionally declared variables.
2019-11-18 14:28:25 -08:00
nhmall
d132093595 Merge branch 'NetHack-3.6' 2019-11-18 15:15:37 -05:00
nhmall
41299d44ae Merge branch 'k-sound' into NetHack-3.6 2019-11-18 15:14:55 -05:00
nhmall
fbd10e4b0e some further refinements to --showpaths
The Windows data file path has to be constructed because
Windows defines VERSION_IN_DLB_FILENAME.

Keep the personal configuration file details as the last
information displayed.
2019-11-18 15:12:38 -05:00
nhmall
450957bfe9 further refine k-sound pluralization 2019-11-18 13:23:13 -05:00
nhmall
bb2185203f Merge branch 'NetHack-3.6' 2019-11-17 20:31:56 -05:00
nhmall
f4cbd4e538 Merge branch 'NetHack-3.6' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6 2019-11-17 19:57:18 -05:00
nhmall
f75939e27e re-enable ifdef'd out code during code sleuthing a while back 2019-11-17 19:55:50 -05:00
PatR
1301e3bd76 '--showpaths' dlb vs non-dlbb
Have the --showpaths feedback mention whether dlb is in use or not,
and show the container file name(s) when it is.  Users of prebuilt
binaries or who build with a hints file instead of picking and
choosing things in config.h might not know, and vms (if it ever
catches up with --showpaths) uses a different container name from
everybody else ("nh-data.dlb" instead of "nhdat").
2019-11-17 16:45:10 -08:00
nhmall
856b4db789 Merge branch 'NetHack-3.6' 2019-11-17 14:39:58 -05:00
PatR
9ea7b074fe pager warning fix and formatting
The mapglyph() change made a variable obsolete but it got left in
(idx = SYM_PET_OVERRIDE...).  Take it out and fix up the formatting
for the block of code that had it.
2019-11-17 09:25:26 -08:00
nhmall
5f3398347c Merge branch 'NetHack-3.6' 2019-11-16 23:14:34 -05:00
nhmall
88127e2b8c Merge branch 'NetHack-3.6' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6 2019-11-16 22:53:53 -05:00
nhmall
a364348098 add an mgflags parameter to mapglyph() to alter how it behaves internally
avoid a recent save-value,call,restore-value kludge by adding
an mgflags parameter to mapglyph() to control its behavior

 Changes to be committed:
	modified:   doc/window.doc
	modified:   include/extern.h
	modified:   include/hack.h
	modified:   src/detect.c
	modified:   src/mapglyph.c
	modified:   src/pager.c
	modified:   sys/amiga/winfuncs.c
	modified:   sys/wince/mhmap.c
	modified:   win/Qt/qt_win.cpp
	modified:   win/Qt4/qt4map.cpp
	modified:   win/X11/winmap.c
	modified:   win/curses/cursdial.c
	modified:   win/curses/cursinvt.c
	modified:   win/curses/cursmain.c
	modified:   win/gem/wingem.c
	modified:   win/tty/wintty.c
	modified:   win/win32/mhmap.c
	modified:   win/win32/mswproc.c
2019-11-16 22:49:36 -05:00
PatR
22980d8171 gas cloud fix
remove_region() calls newsym() when removing gas clouds, but when
newsym() checked whether it was updating a gas cloud location it
always got a false 'yes' because the region hadn't been removed yet.
Fixing this didn't seem to make any observable difference so it must
be followed fairly rapidly by a full vision recalc.
2019-11-16 18:31:30 -08:00