Commit Graph

2262 Commits

Author SHA1 Message Date
nhmall
ad23b4e8e1 grammar: "foo based" to "foo-based"
There seems to be a need to locate these in the distribution every decade or so.
2022-10-30 16:08:14 -04:00
nhmall
99a93fe50b some C99 changes
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() */
2022-10-29 10:54:25 -04:00
nhmall
88f6df2d8b some tabs to spaces
cd src
    grep -P -n '\t' *.c | grep -v "1:"
    cd ../include
    grep -P -n '\t' *.h | grep -v "1:"
    cd ..

side note: win/Qt/*.cpp are full of tabs
2022-10-26 14:21:23 -04:00
nhmall
b40ef88e1e nmake warning
NMAKE : warning U4004: too many rules for target 'o\x86\cppregex.o'
2022-10-23 12:38:22 -04:00
Ray Chason
426ef4d8d2 Add Unicode support to the map 2022-10-16 21:42:18 -04:00
nhmall
f70ad6598d pull request #901
Also, makes some Makefile lines a little bit shorter
2022-10-15 12:53:01 -04:00
nhmall
433d991335 MinGW build update 2022-10-15 12:28:53 -04:00
nhmall
d4bb4758aa transcribe dependencies from sys/unix/Makefile.src
Transcribe the dependencies from sys/unix/Makefile.src
to sys/msdos/Makefile.GCC and sys/windows/Makefile.nmake
to bring them up to date.
2022-10-15 12:28:53 -04:00
Ray Chason
333fc71b86 Provide characters missing from Terminus fonts 2022-10-15 09:05:58 -04:00
nhmall
4ab2860718 warning fix in msdos build
../sys/msdos/font.c:24:12: warning: declaration of 'flags' shadows a global declaration [-Wshadow]
   24 |     uint32 flags;
      |            ^~~~~
In file included from ../include/hack.h:285,
                 from ../sys/msdos/font.c:3:
../include/flag.h:422:29: note: shadowed declaration is here
  422 | extern NEARDATA struct flag flags;
      |                             ^~~~~
make[2]: Entering directory '/home/nhmall/git/NHsource/util'
2022-10-09 09:35:24 -04:00
nhmall
78ac9c767f Merge branch 'dos-tty-unicode' of https://github.com/chasonr/NetHack into pr899 2022-10-09 09:26:08 -04:00
Ray Chason
ea3d322a11 Fix compile when no ENHANCED_SYMBOLS 2022-10-09 09:04:23 -04:00
Ray Chason
613828f5dd Support 24 bit color for Unicode symbols 2022-10-09 08:59:20 -04:00
Ray Chason
98a145db95 Always compile the Terminus fonts 2022-10-09 02:53:52 -04:00
Ray Chason
e4f921f508 Update the native compile 2022-10-09 02:53:13 -04:00
Ray Chason
6400ce073a Support Unicode symbols in 16 color mode 2022-10-08 19:41:22 -04:00
Ray Chason
fb88488583 Support Unicode symbols in VESA modes 2022-10-08 18:50:38 -04:00
Ray Chason
5b5e217991 Avoid null dereference in VESA initialization
If the VESA mode chooses a mode with 8 bit pixels, but the tile set
has too many colors for that, a null dereference can result when
trying to set up the nonexistent palette. Catch this condition and
refuse to set VESA mode instead.
2022-10-08 15:42:07 -04:00
nhmall
cea9b75cb2 fetch-cross-compiler.sh directory check follow-up 2022-10-06 12:45:14 -04:00
Ray Chason
5683f88d36 A note on makefonts.lua 2022-10-05 20:25:34 -04:00
Ray Chason
31859f562e Make the Terminus fonts an external package
Credit to Michael Allison for the patch and for the previous one
to build the fonts in the cross-compile.
2022-10-05 20:03:11 -04:00
Ray Chason
03a82720ef Build fonts in the native build 2022-10-03 20:53:07 -04:00
Ray Chason
cb010b9859 Ignore the PSFs 2022-10-03 20:24:20 -04:00
Ray Chason
daf18eac91 Build the PSF fonts in the cross-compile 2022-10-03 20:22:11 -04:00
Ray Chason
d3cb84a313 Update the README for the fonts 2022-10-02 20:41:02 -04:00
Ray Chason
37f43c3b79 Rewrite the makefont program in Lua 2022-10-02 20:41:02 -04:00
Ray Chason
b4832b40fc Support the DOSVGA build 2022-10-02 20:41:02 -04:00
Ray Chason
db74f82101 More native compile fixes
* subst doesn't seem to work in variable assignments
* LUADLL isn't meaningful for MS-DOS
2022-10-02 20:41:02 -04:00
Ray Chason
76a88ef2b0 Updates to the native compile 2022-10-02 20:41:02 -04:00
Ray Chason
8b6fe9d205 Support wide Curses on MS-DOS
Also, fix IBMGraphics on Curses
2022-10-02 20:41:02 -04:00
nhmall
c92e232a99 update tested versions of Visual Studio 2022-09-21 2022-09-21 14:55:34 -04:00
PatR
4de71302a3 unix Makefile.src and hints
Change the handling for windowing system specific files so that
when building for more than one set, each gets compiled as a set
instead of some being interspersed among rival window systems.
Put differently, handle tile.o specially so that there's no need
for the hints to sort the WINOBJ list in order to avoid tile.o
duplication.

So the order of compilation is
  common source files
  unix-specific files
  tty files
  curses files
  X11 files
  Qt files
  tile.c (if applicable), version.c, date.c

Previously, some of the X11 files were scattered around among the
others because of the spelling of their file names.

Only matters if you're watching the progress of a build.
2022-09-18 14:25:33 -07:00
nhmall
8df41a6ba2 Revert "NEED_VARARGS followup"
This reverts commit 4d34e153e0.
2022-09-17 15:57:52 -04:00
nhmall
1bd4c3c022 Revert "paste fix"
This reverts commit d1750e4abe.
2022-09-17 15:57:31 -04:00
nhmall
d1750e4abe paste fix 2022-09-17 14:48:02 -04:00
nhmall
4d34e153e0 NEED_VARARGS followup 2022-09-17 14:22:20 -04:00
nhmall
a5d462b194 more inconsistencies 2022-09-16 10:44:39 -04:00
nhmall
1c177dcb39 a couple of inconsistencies
make pmatchregex regex_error_desc return type match cppregex.cpp and
posixregex.c

make the extern declaration for loadsyms[] in options.c match the
one in symbols.c.
2022-09-14 20:23:48 -04:00
Ray Chason
686153f6cb Sundry fixes for DOS 16-color VGA mode
To test 16-color mode, specify OPTIONS=video:vga explicitly;
autodetect will choose a VESA mode if it can.

* Draw tiles correctly when redrawing from panning or from changing
  the map mode among text, tiles and overview. Previously, this would
  draw everything with the tile at the hero's position.

* Draw corridor walls with the stone tile.

* Map the statue colors to the nearest neutral tone among the main
  16 colors. This mainly affects altars and female cats.

* Fix the code that shows statues as the generic statue tile. This
  code could be deleted, but the statues don't draw with the full
  range of gray tones.

* Document the option OPTIONS=video:vesa.
2022-09-13 19:49:56 -04:00
nhmall
356e3176bc MacOS msdos compiler fetch script bit 2022-09-11 19:33:56 -04:00
nhmall
c548fff9e4 some spelling corrections
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
2022-09-08 10:54:11 -04:00
nhmall
26e61f30c8 follow-up
Revert the sys/unix/hints/include/compiler.370 for now
while a couple of warnings still exist in role.c
2022-08-29 14:35:39 -04:00
nhmall
443dc429e7 warning-free build without -Wno-missing-field-initializers
Also removes a GCC_WARN usage and the need for
#pragma GCC diagnostic ignored "-Wmissing-braces"
for src/decl.c when using gcc.
2022-08-29 14:06:12 -04:00
PatR
11c8d5cd5e Unix: command line --windowtype:foo fix
initoptions(), including initoptions_finish(), was running to
completion with the default window system before windowtype from the
command was parsed and activated.  When the default window system
is tty without MS-DOS the map type gets set to ascii; command line
--windowtype:X11 doesn't switch it back to the X11 default of tiled.

So,
| NETHACKOPTIONS=windowtype:X11 nethack
ran nethack in tiles mode but
| nethack --windowtype:X11
ran it in text mode (assuming .nethackrc left tiles vs text with the
default setting).

I think this fix is quite iffy but it seems to work as intended....
It reclassifies '--windowtype' as an "early option" in unixmain.c,
and the options.c code ultimately processes it twice.
2022-08-28 00:09:50 -07:00
nhmall
25fc7ea2f5 update tested versions of Visual Studio 2022-08-21 11:51:15 -04:00
Pasi Kallinen
24e94b70d4 Windows: Default boulder symbol to 0
Set the boulder symbol to 0 in the Windows config template file.
2022-08-02 13:09:25 +03:00
nhmall
cf352377a9 Windows stubs.c follow-up 2022-08-01 02:03:38 -04:00
nhmall
174a7e5e78 Windows stubs.c fix 2022-08-01 01:52:55 -04:00
nhmall
0649783a6d some windows startup
noticed that "do you want to destroy the savefile" was not being
handled correctly in Windows startup.
2022-07-16 20:43:24 -04:00
nhmall
cb036d11e2 update tested versions of visual studio 2022-07-16 09:19:03 -04:00