Also includes support by paxed for polearm targeting using the
frame color.
Also renames USE_TILES to TILES_IN_GLYPHMAP which is a more
accurate description.
Not all window interfaces have full support for the color framing
of the background square yet.
MS-DOS needs further work (to bring it to both VESA and VGA, with
and without tiles.
Windows GUI is missing support.
X11 and Qt have been started, but may require further refinement.
The consolidation of global variables from scattered source
files into decl.c and declared in decl.h was begun in 3.7.0.
Their placement in common files was done for centralized
initialization and potential re-initialization during a
"play again" scenario.
It wasn't really necessary for all of them to be housed in a
single huge structure to meet the "play again" requirement,
and the single huge structure has been a little unwieldy when
it comes to maintenance.
Following this commit, instead of one single extremely large structure
named 'g' to house all of the relocated global variables, they
are distributed into several ga through gz.
To make things easy for the developer, each variable is placed
into the struct corresponding to the starting letter of the variable.
That way, no lookup is required in order to know which struct houses
a particular variable, it is a simple match to the starting letter
for all the centralized global variables.
A global variable named 'amulets', would be found in ga.
ga.amulets
^ ^
A global varable named 'move', would be found in gm.
gm.moves
^ ^
A global variable named 'val_for_n_or_more' would be found in gv.
gv.val_for_n_or_more
^ ^
A global variable named 'youmonst' would be found in gy.
gy.youmonst
^ ^
Instead of using index() macro defined to strchr, use C99 strchr.
Instead of using rindex() macro defined to strrchr, use C99 strrchr.
If you want to try building on a platform that doesn't offer those
two functions, these are available:
define NOT_C99 /* to make some non-C99 code available */
define NEED_INDEX /* to define a macro for index() */
define NEED_RINDX /* to define a macro for rindex() */
The pull request included some changes that were neither accidental nor
unintentional, so only a subset of the changes from pull request #869
submitted by klorpa were manually applied.
behaviour -> behavior
speach -> speech
knowlege -> knowledge
incrments -> increments
stethscope -> stethoscope
staiway -> stairway
arifact -> artifact
extracing -> extracting
The uses of "iff" were left alone.
Close#869
Place the last known Amiga cross-compile effort into the outdated folder
tree.
This shell script was meant to be run from the top of the NetHack tree:
outdated/sys/unix/cross-amiga.sh
It attempts two things:
1. obtain the source-code for the Amiga cross compiler and build it
from scratch. Warning: it pulls a number of the required packages
from the internet and installs them. (Linux was tested, but the macOS
usage never was).
2. move the outdated hints file and hints include files for Amiga
into the live tree for someone attempting to resurrect an Amiga port.
It doesn't tinker with any of the files needed for the NetHack-3.7
work-in-progess for other platforms.
Once the shell script completes those things, the cross-compile build
steps would be:
i) cd sys/unix ; sh setup.sh hints/cross-amiga ; cd ../..
ii) make CROSS_TO_AMIGA=1 all
iii) make CROSS_TO_AMIGA=1 package
There are no longer distinct gendered versions of monsters, so femalenum
is unused (i.e. set to NON_PM) for all roles and races. Take a pass at
removing all uses of/references to femalenum, and rename 'malenum' to
'mnum' since it no longer has any particular association with
gender or sex.
move out-of-date hints files to the outdated folder.
rename the hints files, and hints/include files that are currently
named *.2020 to *.370 (next release number).
rename sys/winnt to sys/windows
move vs (visual studio) folder out of win/win32 and into sys/windows
rename include/ntconf.h to include/windconf.h
rename winnt.c to windsys.c
place visual studio projects into individual subfolders.
This will hopefully resolve GitHub issue #484 as well.
On some platforms this may require:
make spotless
make fetch-lua
I did attempt to force a reminder message about the latter to
Makefile.top this time, and hope that works correctly for everyone.
Disclaimer: This is a minimal recipe, just to get someone else
started if they have a desire to get a full cross-compile of
NetHack-3.7 going for the Amiga. Some NetHack code bitrot was
corrected, and it does seem able to compile the game itself
to a point. See caveats below.
- If you want to obtain the cross-compiler and tools/libs for Amiga
https://github.com/bebbo/amiga-gcc
To our knowledge, a pre-built copy isn't available, so you have to
obtain the source via git and build it on your system.
The build prerequisite packages for Ubuntu are easily obtained:
sudo apt install make wget git gcc g++ lhasa libgmp-dev \
libmpfr-dev libmpc-dev flex bison gettext texinfo ncurses-dev \
autoconf rsync
The build prerequisite packages for macOS are apparently easily
obtained via homebrew, but that was not tested:
brew install bash wget make lhasa gmp mpfr libmpc flex gettext \
texinfo gcc make autoconf
After installing the prerequite packages and the cross-compiler
it was a straightforward build:
git clone https://github.com/bebbo/amiga-gcc.git
cd amiga-gcc
make update
[Note that you may have to take ownership of the files in the
bebbo repo via chown before succesfully carrying out the next
steps]
make clean
make clean-prefix
date; make all -j3 >&b.log; date
The compiler pieces are installed in /opt/amiga by default which
was satisfactory for our initial attempt, but if you want you can
alter the prefix before you build if you want. That is all
spelled out on the page at: https://github.com/bebbo/amiga-gcc
The Amiga cross-compile can then be carried out by specifying
CROSS_TO_AMIGA=1 on the make command line.
For example:
make CROSS_TO_AMIGA=1 all
make CROSS_TO_AMIGA=1 package
You can explicitly include tty and curses support if desired, otherwise
you'll end up with a tty-only cross-compile build. The SDL1 pdcurses
support has not been tested.
make WANT_WIN_TTY=1 WANT_WIN_CURSES=1 CROSS_TO_AMIGA=1 all
Also note that building the amiga targets using the make command
above, does not preclude you from building local linux or macOS
targets as well. Just drop the CROSS_TO_AMIGA=1 from the make
command line.
The cross-compiler hints additions are enclosed inside ifdef sections
and won't interfere with the non-cross-compile build in that case.
CAVEATS: The original NetHack Amiga build steps included the source for
some utilities that were built and executed on the amiga: txt2iff and
xpm2iff as part of the NetHack build procedure on amiga. Those did not
compile out-of-the-box on the linux host. They will either have to be:
- ported to build and run on the linux or macOS cross-compile host
or
- their functionality will have to be rolled into amiga NetHack
itself and executed on the target Amiga the first time the game
is run, perhaps.
Good luck amiga aficionados, perhaps you'll be able to take this
initial effort forward and get NetHack-3.7 available on the amiga or
amiga-emulator. Let us know if you do, and we can roll changes in
if you provide them.
Make the same change to outdated/win/Qt3/qt3_win.cpp for the
"about nethack" popup that was just made to win/Qt/qt_main.cpp so
that the out of date URLs won't be overlooked if the Qt 3 interface
ever gets resurrected.
Not tested and most likely will never matter.
A check into github issue 364 confirmed that
ba6edbe5dc
had incorrectly updated the bwrite sizeof entry for sysflags.
The SYSFLAGS and MFLOPPY code is all in the outdated part of the tree, so just
remove it rather than re-correct it.
Closes#364Closes#207
If an old port is resurrected to work with current version code, its files
can be relocated to the appropriate sys or win folder as required.
In the meantime, the burden of upkeep can be avoided for the stuff in the
outdated folder for now.