Commit Graph

9652 Commits

Author SHA1 Message Date
nhmall
5a1e523887 Merge branch 'NetHack-3.7' 2019-11-27 01:27:39 -05:00
nhmall
5d5d8069d4 Merge branch 'NetHack-3.6' 2019-11-27 01:27:11 -05:00
nhmall
503b97960b windows Makefile updates 2019-11-27 01:25:17 -05:00
PatR
865607a392 3.7 Unix Makefiles
Copy lib/lua-$(VERSION)/src/liblua.h to lib/lua/ rather than lib/.

Instead of copying any of the header files or telling the compiler
where to find the lua ones, generate include/nhlua.h on the fly and
restrict the knowledge of where they are to it (paths are relative
to include/).

|/* nhlua.h - generated by top Makefile */
|#include "../lib/lua-5.3.5/src/lua.h"
|LUA_API int   (lua_error) (lua_State *L) NORETURN;
|#include "../lib/lua-5.3.5/src/lualib.h"
|#include "../lib/lua-5.3.5/src/lauxlib.h"
|/*nhlua.h*/

This might need to be redone (or augmented by having CFLAGS add back
'-I path-to-lua') if some compiler can't find '#include "luaconf.h"'
issued by lua.h.
2019-11-26 19:27:00 -08:00
nhmall
2a78011030 instructional doc bit 2019-11-26 19:35:46 -05:00
nhmall
4529094138 prepare branch for travis-ci 2019-11-26 19:26:49 -05:00
nhmall
1e22743b56 msdos cross-compile bits 2019-11-26 19:06:45 -05:00
nhmall
5f75048386 another msdos cross-compile bit 2019-11-26 00:34:57 -05:00
nhmall
36983e6889 more msdos cross-compile fixes
undefined reference to g.variables if certain parts of
drawing.c are included in host-side utilities, so
surround the offending code in
->  #if !defined(CROSSCOMPILE) || defined(CROSSCOMPILE_TARGET)
2019-11-26 00:02:38 -05:00
nhmall
7fcccdf5c6 linux-hosted msdos cross-compiler updates 2019-11-25 22:47:54 -05:00
PatR
3130676077 alignment of mimicked or polymorphed altars
A reddit thread about an unaligned altar in an aligned temple was
a tipoff that mimics posing as altars didn't have any particular
alignment.  The look-at code was misusing an operloaded field of the
underlying terrain.  Pick an alignment at random when taking on the
appearance of an altar, store it in the mimic's mon->mextra->mcorpsenm
field, and have look-at use that.

Also, dropping a ring of polymorph into a sink can transform it, and
one possible outcome is an altar.  In this case, the alignment is
part of the location's topology, but code setting that up was using
Align2amask(rn2(foo)).  That's a macro which evaluates its argument
more than once.  The first evaluation was effectively a no-op.  If
the second evaluation picked lawful then the result was lawful as
intended.  But if the second picked non-lawful and the third picked
lawful, the result would end up as none-of-the-above (a value of 3
when it needs to be a single-bit mask of 1, 2, or 4).
2019-11-25 15:01:40 -08:00
PatR
1b2b330e9f lua reorganization
Reduce the implied reliance of a specific version of lua.

Instead of copying liblua.a to src/, copy it to lib/.  Instead of
telling the compiler to look for headers in lib/lua-5.3.5/src/ as
well as in include/, copy the relevant ones to lib/ and tell the
compiler to look for them there.  'make spotless' in src/ will
remove both the object library and the header files from lib/ but
there really should be a new Makefile.lib to take care of that
directory.

Update Makefile.src to be able to build lua in case someone starts
with 'make all' there instead of in the top Makefile.  It doesn't
duplicate the option to fetch the lua source package though.

NHinternal/../genFiles.c has been updated to mention lib/liblua.a
and lib/lua*.h as 'generated at compile time' in Files and to skip
lib/lua-* entirely if it comes across that (so not operating on a
completely clean tree).  But it won't be accurate unless/until
other ports stage their lua files there instead of in src/ and
lib/lua-$(VERSION)/src/.

I haven't tried 'make depend' to see what it makes of the numerous
changes....
2019-11-25 12:20:42 -08:00
PatR
05e64d2429 more questpgr removal from makedefs 2019-11-25 10:07:11 -08:00
nhmall
4ece8ef31d spelling bit 2019-11-25 11:42:24 -05:00
nhmall
94f251cf2a fixes catch-up bit 2019-11-25 11:30:21 -05:00
nhmall
05fdccd8a6 add placeholder Cross-compiling file to Top 2019-11-25 11:16:58 -05:00
nhmall
a1276d3c8c README update 2019-11-25 11:12:27 -05:00
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
88324a38d1 Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7 2019-11-25 00:51:44 -05:00
nhmall
cab3eabfc4 lua quest texts 2019-11-25 00:50:16 -05:00
Pasi Kallinen
8b7aea7dee Merge branch 'paxed-quest-lua' into NetHack-3.7 2019-11-25 07:30:51 +02:00
nhmall
f10e4218c6 msdos now has its own sysconf as the sys/winnt/sysconf.template had incompatible entries 2019-11-25 00:17:16 -05:00
nhmall
a9425159eb fix a transcription error 2019-11-24 23:42:27 -05:00
nhw_cron
abf7a7832d This is cron-daily v1-Nov-24-2019. files updated: Files 2019-11-24 23:18:57 -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
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
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
95b6e27a09 add notice 2019-11-24 14:26:46 -05:00
nhmall
2bf7731e12 remove a debugging line from msdos-cross-compile.sh 2019-11-24 13:44:53 -05:00
nhmall
541f177408 Merge branch 'paxed-quest-lua' of https://rodney.nethack.org:20040/git/NHsource into paxed-quest-lua 2019-11-24 13:38:32 -05:00
nhmall
c1dd898df6 use curl which is always available on osx rather than wget 2019-11-24 13:37:22 -05:00
nhmall
697084a72e Merge branch 'paxed-quest-lua' of https://rodney.nethack.org:20040/git/NHsource into paxed-quest-lua 2019-11-24 12:40:36 -05:00
Pasi Kallinen
350371e030 Don't remove dungeon.lua with make spotless 2019-11-24 19:39:31 +02:00
nhmall
e6f5899200 added protection in Makefile for cross-compile (although should not happen): 2019-11-24 12:39:00 -05:00
nhmall
a9f33df64a more support in cross-compile for the changes in this branch 2019-11-24 12:23:00 -05:00
nhmall
0e7d62bcf5 remove warning for unused variable 2019-11-24 12:03:11 -05:00
nhmall
c6fab3aad8 windows and msdos Makefile support of the changes in this branch 2019-11-24 12:01:33 -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
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