Commit Graph

1347 Commits

Author SHA1 Message Date
nhmall
21e4595127 sysconf template for windows 2019-11-17 00:16:02 -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
2a07924063 rename S_player_override to S_hero_override 2019-11-16 14:31:57 -08:00
PatR
304673dcab hints/macosx10.14 comment
A comment in macosx10.14 describing how to create a signed package
had the last sample command wrong.  Fix it now in case that part
carries over to hypothetical--but likely--new macosx10.15 hints.

Also, shorten a couple of wide comment lines in the same area.
2019-11-15 10:12:45 -08:00
nhmall
e0fbd52359 header issues so just remove them for now on msdos *.cross Makefiles 2019-11-14 19:18:49 -05:00
nhmall
61a8ad35f5 more minor msdos Makefile bits 2019-11-14 19:17:44 -05:00
nhmall
6ea483242e some msdos cross-compile additional notes and a clarification 2019-11-14 19:12:14 -05:00
nhmall
8e7888d631 introduce msdos build support for cross-compiling on other platforms 2019-11-14 14:10:56 -05:00
nhmall
2359a9820e prototype fix after Windows gcc complaint 2019-11-11 18:12:39 -05:00
nhmall
6dfbff9d4b --showpaths wasn't returning the paths if there was an error in a config file
Also,
Windows only: Introduces some environment variable substitution for paths
specified in a config file
2019-11-11 12:49:54 -05:00
nhmall
bc69fc65d2 Merge branch 'NetHack-3.6' into bart-test 2019-11-11 11:27:50 -05:00
nhmall
fddffc2fa0 updates to reveal_paths 2019-11-09 21:20:46 -05:00
nhmall
c566c01f8d add command line option --showpaths
Add
	--showpaths
early option to show where NetHack is expecting to find certain files
without starting up a game. It exits afterwards.

Windows sample (for illustration only, locations may differ for you):
    Variable playground locations:
        [hackdir   ]="C:\Users\JohnDoe\NetHack\3.6\"
        [leveldir  ]="C:\Users\JohnDoe\AppData\Local\NetHack\3.6\"
        [savedir   ]="C:\Users\JohnDoe\AppData\Local\NetHack\3.6\"
        [bonesdir  ]="C:\ProgramData\NetHack\3.6\"
        [datadir   ]="C:\personal\nhdev\363\test\binary\"
        [scoredir  ]="C:\ProgramData\NetHack\3.6\"
        [lockdir   ]="C:\ProgramData\NetHack\3.6\"
        [sysconfdir]="C:\ProgramData\NetHack\3.6\"
        [configdir ]="C:\Users\JohnDoe\NetHack\3.6\"
        [troubledir]="C:\Users\JohnDoe\NetHack\3.6\"
    Your system configuration file (in sysconfdir):
        "C:\Users\JohnDoe\NetHack\3.6\sysconf"
    Your system symbols file (in sysconfdir):
        "C:\Users\JohnDoe\NetHack\3.6\symbols"
    Your personal configuration file (in configdir):
        "C:\Users\JohnDoe\NetHack\3.6\.nethackrc"

Linux (for illustration only, locations may differ for you):
    Your system configuration file:
        "/home/johndoe/nh/install/games/lib/nethackdir/sysconf"
    Your system symbols file:
        "/home/johndoe/nh/install/games/lib/nethackdir/symbols"
    Your personal configuration file:
        "/home/johndoe/.nethackrc"
2019-11-09 10:57:25 -05:00
PatR
2058ad10f9 missing data file on vms
vms's install.com was processing bigrm-%.lev (which corresponds to
bigrm-?.lev on unix) so missed two-digit bigrm-10.lev.
2019-11-07 16:21:52 -08:00
nhmall
e3b69ccc43 buffer size 2019-11-06 16:51:47 -05:00
nhmall
88f1d2f365 don't hardcode the version id in windmain 2019-11-06 16:44:25 -05:00
Bart House
d4ff00cd40 Updated windows directory paths to latest iteration of design. 2019-11-04 19:34:03 -08:00
Ray Chason
59c6425f4c Deal with FreeDOS bugs when building pdcurses.a 2019-11-04 22:26:47 -05:00
Bart House
6b88a19365 Added new map_mode tiles_fit_to_screen for Windows NetHackW.exe 2019-11-03 17:59:39 -08:00
Bart House
7c5a2adfa5 Lock TROUBLEPREFIX after parsing sysconf. 2019-11-03 14:07:11 -08:00
Bart House
da85259782 Fixes to template files . 2019-11-03 14:06:49 -08:00
Bart House
f0707fee6e More tweaks to how windows deals with directory paths. 2019-11-03 13:31:17 -08:00
nhmall
9319e3577b use new Windows file names 2019-11-02 22:43:25 -04:00
nhmall
a259d03460 Windows Makefile catch-up bits 2019-11-02 22:33:34 -04:00
Bart House
11018da6b8 Renamed configuration file for windows to .nethackrc.
Also adjusted name of template files populated during windows builds.
2019-11-02 19:11:26 -07:00
Bart House
3a315a7c76 Make type Win10 and gWin10 local to win10.c module. 2019-11-02 12:10:13 -07:00
Bart House
0bbedb2933 Fix cut and paste error in output string. 2019-11-02 11:51:20 -07:00
Bart House
33149eed0e Move is_desktop_bridge() api to win10 wrapper. 2019-11-02 11:39:11 -07:00
nhmall
35fc46e3eb missing constants on mingw build fix
Errors seen during build:
o/windmain.o:windmain.c:(.rdata$.refptr.FOLDERID_ProgramData[.refptr.FOLDERID_ProgramData]+0x0): undefined reference to `FOLDERID_ProgramData'
o/windmain.o:windmain.c:(.rdata$.refptr.FOLDERID_LocalAppData[.refptr.FOLDERID_LocalAppData]+0x0): undefined reference to `FOLDERID_LocalAppData'
o/windmain.o:windmain.c:(.rdata$.refptr.FOLDERID_Profile[.refptr.FOLDERID_Profile]+0x0): undefined reference to `FOLDERID_Profile'
collect2.exe: error: ld returned 1 exit status
mingw32-make: *** [Makefile:849: ../binary/NetHack.exe] Error 1

DEFINE_KNOWN_FOLDER is using this particular definition in the mingw
header files:

rather than this one:

So, the known folder values that recent code is using such as
FOLDERID_ProgramData, FOLDERID_LocalAppData, and FOLDERID_Profile are
being declared as external constants.

That is why the error is a link error. We need to include -luuid on
the link command line because those external constants are defined
in uuid.lib.
2019-11-02 09:23:34 -04:00
nhmall
3587d8aee9 bump Windows supported version in mingw-w64 sys/winnt/Makefile.gcc
mingw-w64 sys/winnt/Makefile.gcc required a Windows version bump from
0x0501 to 0x0601 (XP level to Windows 7 level) during compile in
order for the mingw system header files to include some of the
needed support for recent Windows port changes.
2019-11-02 01:03:02 -04:00
nhmall
4b163e3d55 Revert "quiet a mingw warning"
This reverts commit e33dfed456.
2019-11-01 16:33:04 -04:00
nhmall
e33dfed456 quiet a mingw warning 2019-10-31 19:43:59 -04:00
nhmall
919765f67f Windows: link with ole32.lib and shell32.lib 2019-10-31 12:16:03 -04:00
Bart House
86473526b8 Save a copy of the symbols file to symbols.save when updating. 2019-10-30 19:17:03 -07:00
nhmall
33d00cf0e4 attempt to get mingw building correctly after recent changes
make typedef of boolean match mingw header files
link with shell32 and ole32 as Makefile.msc now had to do
kludge some stuff missing from mingw headers in sys/winnt/windmain.c
2019-10-30 18:48:28 -04:00
Bart House
43ef5ef7fa Windows Store support for NetHack 3.6. 2019-10-29 21:28:39 -07:00
nhmall
a399151d01 some symbol tweaks
A few symbol-related modifications:

- fulfill a request from a blind player to allow them to
  specify a unique/recognizable character for all pets and/or
  the player in the config file for use when using a screen
  reader (S_player_override, S_pet_override). Requires sysconf
  setting ACCESSIBILITY to be set to have an effect, although
  they can still be specified in the config file.

- Config file SYMBOLS entries were not working properly on
  the rogue level. Allow ROGUESYMBOLS as well as SYMBOLS to be
  specified in the config file independently.

- When values are moved into showsyms[], the overriding SYMBOLS
  or ROGUESYMBOLS entry from the config file is used if there is
  one; if there is no overriding value for a particular symbol,
  the loaded symset value is used; if there is no symset entry
  loaded for the symbol then a default symbol is used.
2019-10-27 23:12:11 -04:00
PatR
e4f3559acc curses on unix - terminal reset needed after abort
Noticed while investigating the message loop.  If I had level files
from an interrupted game and was asked "Destroy old game?" when
starting a new one, answering 'n' left the terminal in an unusable
state.  Executing 'stty sane' (invisibly since input echo was off)
repaired things but the user shouldn't have to do that.

Change unixtty.c's error() to shut down windowing if that has been
initialized.  This might need some tweaking for tty, which will now
clear the screen before showing the startup error message.  Other
systems besides unix use unixtty.c so are affected, but I think the
change doesn't introduce anything that should cause trouble (aside
from the potential screen erasure).
2019-10-09 13:18:34 -07:00
PatR
659b3ce9a7 more unix username (#26 - validating #explore)
I had this in place at one point but must have accidentally undone it
before deciding that yesterday's patch was finished.  Defer fetching
'pw' until it's needed.
2019-10-07 14:44:32 -07:00
PatR
80d3abcf00 fix github pull request #26 - validating #explore
Fixes #26

Report stated that the attempt to look up the player's username
(on Unix) failed (reason unknown) and nethack refused to allow the
player to execute the #explore command even though sysconf was set
to use character names (CHECK_PLNAME=1) instead of user names.
Setting EXPLORERS to "*" overcomes this glitch, but the fix moves
a bit of code around to honor CHECK_PLNAME before fetching username
so that that isn't necessary.

I ended up doing some formattng clean up (replace tabs with spaces,
whitespace cleanup in 'port_insert_pastebuf()').  The actual change
to fix #26 is only a few lines.
2019-10-06 17:30:18 -07:00
PatR
0d76f68f2c tty xputc()
Another part of github issue 227.  Casting a function pointer when
passing it to another function is iffy when lying about the return
type.  tputs() expects a routine which returns int, so give it one.
Other xputc() usage is equivalent to putchar(), so define xputc()
with the same function signature as that has.

The tputs() declarations in system.h should probably be changed
(third argument is a function which takes an int rather than
unspecified parameters) but I've left them alone.  I made that change
to tputs() in sys/share/tclib.c though.

NT and MSDOS changes are untested.  tclib.c compiles ok with clang-
as-gcc on OSX but hasn't been tested with the port that uses it (VMS).
2019-10-05 16:49:34 -07:00
nhmall
455c3fbf62 update README.linux
closes #118
2019-10-02 15:22:14 -04:00
Ray Chason
d5104c622f Use faster method to write to VGA 2019-09-12 23:04:15 -04:00
PatR
b7b8c7a446 sys/unix/hints/*: mkfontdir and cp -n
Change all the POSTINSTALL 'mkfontdir' to 'mkfontdir -x .lev' although
the mkfontdir version on my system didn't think $(HACKDIR)/*.lev were
font files when I built without dlb.

Also change the PREINSTALL 'cp -n win/X11/nethack.rc ~/.nethackrc' to
keep going if it fails.  The linux hints use 'cp -n' for sysconf but
since it is doing so for the playground directory and 'make install'
starts out by clearing away everything in that directory, it shouldn't
fail.  But some extra bullet proofing there may be warranted.  Only
the initial cp is protected against clobbering an existing file; the
ownership+permission fixups that are applied to the copy of original
file still get applied to an existing one.
2019-08-20 17:16:57 -07:00
nhmall
8a328ff7eb quite some Xcode warnings 2019-08-17 12:55:48 -04:00
nhmall
0091920f00 travis build update and mkfontdir argument for linux
travis recently changed linux default dist from trusty to xenial, and bionic is next

include an additional travis linux build under bionic to eliminate surprises there

add a parameter to mkfontdir under linux to prevent it form going after .lev files
2019-08-16 13:50:41 -04:00
Bart House
5870cb6a92 Revert "Added experimental feature NEW_KEYBOARD_HIT."
This reverts commit bc65112ce0.
2019-07-14 21:28:55 -07:00
Bart House
44d84c3163 Revert "Modified nhassert_failed to call impossoible."
This reverts commit 3e4a0759a3.
2019-07-14 21:17:39 -07:00
Bart House
fe9fc4cac1 Revert "Added nhassert to core."
This reverts commit 0ca299acb3.
2019-07-14 21:15:54 -07:00
Bart House
177bd39646 Revert "Tweaks to nhassert implementation. Change to warnings on MSC build."
This reverts commit 2f3da35c68.
2019-07-14 21:15:01 -07:00