Commit Graph

9611 Commits

Author SHA1 Message Date
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
c70fa3dfba Merge branch 'master' into NetHack-3.7 2019-11-24 18:57:11 -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
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
cc7f1185d8 Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7 2019-11-23 18:58:34 -05:00
nhmall
8bc171ec50 more sys/msdos/Makefile?.cross updates 2019-11-23 18:57:17 -05:00
nhw_cron
c2f6c587d1 Files and doc/Guidebook.txt from cron-daily v1-Nov-21-2019 2019-11-23 17:42:24 -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
Pasi Kallinen
3afbcb76f5 Minor msdos cross compile improvements 2019-11-23 23:40:25 +02: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
nhmall
db05de37fa Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7 2019-11-23 12:20:45 -05:00
nhmall
69136fbb98 more cross-compile djgpp build tweaks 2019-11-23 12:19:33 -05: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
95c1ccd716 another cross-compile script bit 2019-11-23 10:20:18 -05:00
nhmall
ad6ef85177 Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7 2019-11-23 10:15:05 -05:00
nhmall
308ebea68e add some msdos files to .gitignore, produce zip 2019-11-23 10:13:10 -05:00
nhmall
89b315be47 Makefile?.cross bits 2019-11-23 08:49:55 -05:00
nhmall
856c0a23c3 Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7 2019-11-23 01:32:43 -05:00
nhmall
11678e72f2 fix an error with msdos cross-compiler NetHack packaging 2019-11-23 01:30:54 -05:00
nhmall
7de2a0d515 Merge branch 'NetHack-3.7' part 2 2019-11-22 23:41:21 -05: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
c9e7182f43 Merge branch 'NetHack-3.6' 2019-11-22 07:46:42 -05:00
nhmall
c8af8e23c1 slash vs backslash Makefile bit 2019-11-22 07:45:43 -05:00
nhmall
fa4552e09e Merge branch 'NetHack-3.6' 2019-11-22 07:41:53 -05:00
nhmall
7af4797671 when decl.h changes, ensure windmain is rebuilt 2019-11-22 07:40:17 -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
Pasi Kallinen
5cad6a15dc More hallu monsters 2019-11-22 09:24:19 +02: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
4a8b9ee26c merge fix 2019-11-18 19:21:50 -05:00
nhmall
47fb8e5c0e Merge branch 'NetHack-3.6' 2019-11-18 19:20:55 -05:00
nhmall
893fa4efa8 update nhusage output on Windows 2019-11-18 19:20:03 -05: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
22180fc523 typo in fixes36.3 2019-11-18 16:58:43 -05:00
nhmall
a763b99afd catch up on some post-beta1 corrections 2019-11-18 16:56:52 -05:00
nhmall
ea17a00310 add some additional pluralization tests, order alphabetically to ease adds 2019-11-18 15:37:27 -05:00
nhmall
d132093595 Merge branch 'NetHack-3.6' 2019-11-18 15:15:37 -05:00