Commit Graph

845 Commits

Author SHA1 Message Date
nhmall
07f6dec128 try to add pilemark support
Changes to be committed:
	modified:   Files
	modified:   sys/winnt/Makefile.msc
	modified:   win/win32/mhmap.c
	new file:   win/win32/pilemark.uu
	modified:   win/win32/resource.h
	modified:   win/win32/winMS.h
	modified:   win/win32/winhack.rc
2015-06-14 18:33:32 -04:00
nhmall
37f0eafa93 support for link-time option in #version
Changes to be committed:
	modified:   src/version.c
	modified:   sys/share/cppregex.cpp
	modified:   sys/share/pmatchregex.c
	modified:   sys/share/posixregex.c
	modified:   util/makedefs.c

Some options in 3.6.0 are determined by what you link with.
The choice of regex support is one.
Let #version show that linked option along with the compile-time options.
2015-06-12 19:23:18 -04:00
nhmall
5e913f90f8 Makefile typos in sys/winnt/Makfile.msc 2015-06-12 15:42:41 -04:00
nhmall
cff16290af Merge branch 'macosx-build' 2015-06-10 18:57:23 -04:00
Pasi Kallinen
b4cc349a46 X11: Hilight piles of objects 2015-06-09 19:59:38 +03:00
nhmall
c3a77914a9 Modify the window interface for print_glyph
Changes to be committed:
	modified:   doc/window.doc
	modified:   include/qt_win.h
	modified:   include/trampoli.h
	modified:   include/winX.h
	modified:   include/wingem.h
	modified:   include/winprocs.h
	modified:   include/wintty.h
	modified:   src/display.c
	modified:   src/windows.c
	modified:   sys/amiga/winami.p
	modified:   sys/amiga/winfuncs.c
	modified:   sys/amiga/winproto.h
	modified:   sys/wince/mswproc.c
	modified:   sys/wince/winMS.h
	modified:   win/Qt/qt_win.cpp
	modified:   win/X11/winmap.c
	modified:   win/chain/wc_chainin.c
	modified:   win/chain/wc_chainout.c
	modified:   win/chain/wc_trace.c
	modified:   win/gem/wingem.c
	modified:   win/gem/wingem1.c
	modified:   win/gnome/gnbind.c
	modified:   win/tty/wintty.c
	modified:   win/win32/mswproc.c
	modified:   win/win32/winMS.h

print_glyph now takes a second parameter.

Tiles on tiled ports always looked odd on places like the plane of air
where the background color of the tile didn't match the general background
of the surrounding area.

3.6 made that even worse and more glaringly noticeable with the introduction
of darkened room tiles.

The code to actually send something useful through the new parameter
for window ports to take advantage if they want will follow.
2015-06-08 19:37:26 -04:00
Pasi Kallinen
9070d129de Use MAKE variable instead of hardcoding make 2015-06-06 20:25:32 +03:00
Haoyang Wang
d72e0d0fde hint file for macosx10.10 2015-06-05 15:57:56 -07:00
Haoyang Wang
ca27c0b543 add /usr/X11R6/include to the include paths 2015-06-05 15:43:18 -07:00
Pasi Kallinen
04783f1c8a Remove extraneous line from linux-X11 hints file 2015-06-05 20:42:00 +03:00
Alex Kompel
4083abe286 offer perm_invent as "personal preference" option 2015-06-02 19:20:41 -07:00
nhmall
04c9fa151f defaults.nh update 2015-06-02 17:41:13 -04:00
Derek S. Ray
f606b367ab no, really, use the right header 2015-05-27 21:00:00 -04:00
Derek S. Ray
a65c568e49 New precompiled versions of these 2015-05-26 22:54:55 -04:00
nhmall
53363e05b9 add missing tile and correct clobbered header file 2015-05-24 21:10:22 -04:00
Sean Hunt
1c081b1647 Remove stale version control lines. 2015-05-25 09:21:31 +09:00
Sean Hunt
8b57d96fd2 Reformat .h files.
I did my best to exempt some of the bigger aligned blocks from the reformatting
using the /* clang-format off */ and /* clang-format on */ tags. Probably some
that shouldn't have been formatted were anyway; if you encounter them, please
fix.

The clang-format tags were left in on the basis that it's much easier to prune
those out later than to put them back in, and it means that, modulo my custom
version of clang-format, I should be able to run clang-format on the source tree
again without changing anything, now that Pat has fixed the VA_DECL issues.
2015-05-25 09:21:15 +09:00
Sean Hunt
84d63e169b Use the common regex engine in more places.
In particular, in autopickup_exceptions and user sounds.
2015-05-24 10:17:58 -04:00
Sean Hunt
44f4bc240c Add pmatch-based regex engine.
As mentioned, this is not tested. It should be simple though.
2015-05-24 09:42:56 -04:00
PatR
fabf9cd901 VA_DECL/VA_END usage
Make the variadic functions look more like ordinary code rather than
have the function opening brace be hidden inside the VA_DECL() macro.
That brace is still there, but VA_DECL() now needs to be followed by
a visible brace (which introduces a nested block rather than the
start of the funciton).  VA_END() now provides a hidden closing brace
to end the nested block, and the existing closing brace still matches
the one in VA_DECL().

Sample usage:
void foo VA_DECL(int, arg)  --macro expansion has a hidden opening brace
{  --new, explicit opening brace (actually introduces a nested block)
  VA_START(bar);
  ...code for foo...
  VA_END();  --expansion now provides a closing brace for the nested block
}  --existing closing brace, still pairs with the hidden one in VA_DECL()

This should help if/when another round of reformatting ever takes place,
and also with editors or other tools that do brace/bracket/parenthesis
matching.

I had forgotten that there were variadic functions in sys/* and ended
up modifying a lot more files than intended.  The majority of changes
to those just inserted a new '{' line so that revised VA_END()'s '}'
won't introduce a syntax error.  A couple of them needed VA_END() moved
so that local variables wouldn't go out of scope too soon.  Only the
Unix ones have been tested.
2015-05-15 17:45:21 -07:00
Derek S. Ray
b55f6f30ba ...don't forget to include the prebuilt headers
derp.
2015-05-09 20:50:07 -04:00
Derek S. Ray
6d232df8ab update pre-built versions of these 2015-05-09 14:47:46 -04:00
Sean Hunt
97d6fade74 Reformat all C files.
I'll push a formatting guide at some point. There may still be
outstanding changes, but please feel free to resolve those as you arrive
a them.

To the best of my knowledge, there is no changes to the actual code
content, but the formatter does have the occasional bug. If you run into
an issue, please fix it!
2015-05-09 13:43:16 -04:00
nhmall
2eed004d5a more header update
Changes to be committed:
	modified:   sys/winnt/nttty.c
	modified:   sys/winnt/winnt.c
2015-05-07 04:55:05 -04:00
nhmall
20069798d4 Merge branch 'master' into win32-x64-working 2015-05-07 04:52:30 -04:00
Sean Hunt
8c0c587fd7 Restore lost executable bits. 2015-05-06 23:23:48 -04:00
karnov
2a907f894e Version number increment 2015-05-06 22:04:27 -04:00
PatR
39fcd6459c couple bits omitted from lint.h patch
* list lint.h in Files
* add dependency to win/X11/dialogs.o since dialogs.c includes lint.h
  directly rather than via hack.h
2015-05-06 17:33:48 -07:00
nhmall
8a620c3dec makefile updates 2015-05-06 20:22:03 -04:00
nhmall
fc102a860b updates forced from master
Changes to be committed:
	modified:   sys/winnt/Makefile.bcc
	modified:   sys/winnt/Makefile.gcc
	modified:   sys/winnt/Makefile.msc
2015-05-06 20:07:18 -04:00
nhmall
1ef94c890f Merge branch 'master' into win32-x64-working
Conflicts:
	include/hack.h
	win/X11/winmenu.c
	win/X11/winstat.c
2015-05-06 19:53:26 -04:00
PatR
e72246f1d1 new file: include/lint.h
modified files: include/hack.h, src/decl.c, sys/unix/Makefile.src

Groundwork for cleaning up the X11 sources, where gcc with the option
settings specified in the OSX hints file currently generates close to
400 warnings for win/X11/*.c.

lint.h is included by hack.h, and I've moved the debugpline stuff from
the latter to the former to hide it better.  (By rights it belongs in
debug.h or something of the sort, but I didn't want to go that far.)
Makefile and project dependencies need to catch up.

nhStr() hides a cast to char *, and is intended to by used on string
literals where it isn't feasible to maintain the 'const' attribute.
(A pernicious problem with X11 code, where the include situation can
become very convoluted, and many, MANY string literals are hidden
behind macros to look like keyword-type tokens.)

nhUse() can be used to force a fake usage on something which triggers
an unused parameter warning.  There are a 6 or 8 or 10 places in the
core code where that applies, but so far I have't touched any of them.
There's a tradeoff since it will result in some worthless code being
generated and executed, but is much simpler than tacking on compiler-
specific workarounds like '#pragma unused' or gcc's __attribute__ hack.
2015-05-06 00:38:16 -07:00
nhmall
f692db8581 Merge branch 'master' into win32-x64-working 2015-05-04 17:56:35 -04:00
karnov
47ea9f7ec0 Merge branch 'master' of https://rodney.nethack.org:20040/git/NHsource
Pull to resync.
2015-05-03 22:08:07 -04:00
nhmall
8ebf5b1759 Merge branch 'master' into win32-x64-working 2015-05-03 09:01:46 -04:00
PatR
23a671147f tiles-related build stuff
* Add missing entry for include/tile.h to (top)/Files; also
  add new entry for generated file util/tiletxt.c (Unix only);
* Add several missing entries for tile utility programs that
  can be built by sys/unix/Makefile.utl to util/.gitignore;
* Update sys/unix/Makefile.utl to build 'tilemap' differently so
  that it won't leave behind an unwanted subdirectory tree under OSX:
    util/tilemap.dSYM/
    util/tilemap.dSYM/Contents/
    util/tilemap.dSYM/Contents/Info.plist
    util/tilemap.dSYM/Contents/Resources/
    util/tilemap.dSYM/Contents/Resources/DWARF/
    util/tilemap.dSYM/Contents/Resources/DWARF/tilemap
  It now generates util/tiletxt.c on the fly, to be compiled into
  tiletxt.o, so that tilemap.c can be compiled in the ordinary
  manner and tilemap.o can be kept around for dependency checking.
  (Creating real source file win/share/tiletxt.c would be a little
  bit cleaner, but it's effectively two lines long so seems silly
  to be in the source distribution.)  I looked to see whether I
  could find a linker or compiler option to suppress that stuff but
  failed.  I'm sure something of the sort must exist but didn't
  pursue it.  Someday I might actually learn about how OSX works....
2015-05-03 00:47:10 -07:00
nhmall
77dd76ed17 Merge branch 'master' into win32-x64-working
Resolved Conflicts:
	src/cmd.c
	src/mkobj.c

 All conflicts fixed but you are still merging.

 Changes to be committed:
	modified:   dat/Priest.des
	modified:   dat/Rogue.des
	modified:   dat/Valkyrie.des
	modified:   dat/Wizard.des
	modified:   dat/gehennom.des
	modified:   src/cmd.c
	modified:   src/mkobj.c
	modified:   src/steal.c
	modified:   sys/share/lev_yacc.c
	modified:   util/lev_comp.y
2015-05-02 13:53:08 -04:00
Pasi Kallinen
537acc98dc Update pregenerated levcomp lex and yacc files 2015-05-02 18:33:14 +03:00
Dion Nicolaas
3f859dd826 Some work on the BCC make file.
This is still not complete; the linker is complaining for both builds (NetHack and NetHackW.)
Also, the change to make it build both versions wasn't done yet.
2015-05-02 14:02:10 +02:00
karnov
7fa44992f9 sysconf fixes 2015-05-01 22:36:17 -04:00
Dion Nicolaas
701fa5afea Make nhsetup switch to the right directory always, and improve detection of double-click 2015-04-26 19:17:04 +02:00
nhmall
89c862b15a fix typo in typo fix 2015-04-22 21:44:04 -04:00
Alex Kompel
cd72c7ec68 win32: fix broken dependency for ttystub.o 2015-04-22 18:12:14 -07:00
nhmall
3238303dc8 replace a couple of Makefile bits that shouldn't have been removed
Changes to be committed:
	modified:   sys/winnt/Makefile.gcc
	modified:   sys/winnt/Makefile.msc
2015-04-22 00:30:03 -04:00
nhmall
aaca36a6d5 build both tty NetHack.exe and gui NetHackW.exe
Changes to be committed:
	modified:   include/config.h
	modified:   include/extern.h
	modified:   include/flag.h
	modified:   include/global.h
	modified:   include/ntconf.h
	modified:   include/wintty.h
	modified:   src/cmd.c
	modified:   src/files.c
	modified:   src/options.c
	modified:   sys/share/pcmain.c
	modified:   sys/share/pcsys.c
	modified:   sys/share/pcunix.c
	modified:   sys/winnt/Makefile.gcc
	modified:   sys/winnt/Makefile.msc
	modified:   sys/winnt/nttty.c
	new file:   sys/winnt/stubs.c
	modified:   sys/winnt/winnt.c
	modified:   util/makedefs.c
	modified:   win/tty/wintty.c

Adjust the code and the command line Makefile so that
you no longer have to choose whether to build the tty
version NetHack.exe, or the gui version NetHackW.exe.

Both will now be built in a single 'nmake install' pass.
2015-04-22 00:07:46 -04:00
nhmall
0147b40ec7 Makefile bit
NMAKE : fatal error U1073: don't know how to make 'tile.c'
2015-04-19 13:51:47 -04:00
Dion Nicolaas
6457e8bf13 Change Makefile.gcc to bring it more in line with Makefile.msc 2015-04-18 13:31:30 +02:00
Dion Nicolaas
0c4573d82a fix tile2bmp build under mingw. Provide alternatives for Microsoft-specific macros. Be consistent about slashes in gcc Makefile. Don't include shlwapi.h for any compiler. 2015-04-16 22:36:06 +02:00
Derek S. Ray
7c644c1507 Merge branch 'win32-x64-working' of https://rodney.nethack.org:20040/git/NHsource into win32-x64-working
* 'win32-x64-working' of https://rodney.nethack.org:20040/git/NHsource: (27 commits)
  Makefile bit
  gcc Makefile updates for recent file additions
  ...

Conflicts:
	src/files.c
2015-04-15 18:30:13 -04:00
Derek S. Ray
df52ba17ec add debugger window support via _RPT*; add regex
currently it's locked behind _MSC_VER, but anything that runs on Win32
should be able to use those functions as long as it has something that
can pass as a debug window.

also, add a non-wildcard-accepting version of showdebug for the dumpit()
functions in dungeon.c and questpgr.c; this makes DEBUGFILES=* workable
without being excruciatingly painful
2015-04-15 18:19:16 -04:00