Commit Graph

545 Commits

Author SHA1 Message Date
nhmall
fe3eb92411 win32: avoid game exit dialog lacking any explanation 2020-12-23 20:31:54 -05:00
nhmall
8c42d306f7 purge trampoli.h 2020-12-13 10:27:49 -05:00
nhmall
d008d6c995 use .Substring to limit maintenance to major Lua version releases only 2020-12-11 22:35:37 -05:00
Bart House
fe874db0b3 Fix Windows build break caused by bump to lua 5.4.2.
Modified Windows build to use submodules/lua for lua source.
2020-12-11 18:45:44 -08:00
nhmall
cb84c555d7 more Lua 5.4.2 bits 2020-12-11 09:25:01 -05:00
nhmall
affb60dd97 support for build with current Lua version 5.4.2
This may require
    	make spotless
    	make fetch-lua
for some platforms.
2020-12-11 09:20:26 -05:00
Bart House
1360e63644 Fix build issue when building project for the first time. 2020-12-01 21:32:52 -08:00
nhmall
0d6481ad8c spelling correction tidbit
Closes #415
2020-11-28 08:59:03 -05:00
nhmall
f965d187b8 support for build with current Lua version 5.4.1
This may require
	make spotless
	make fetch-lua
for some platforms.
2020-11-15 11:08:10 -05:00
Bart House
5880da9269 Add cpp.hint file to NetHack project. 2020-10-19 16:26:01 -07:00
Bart House
c33a9ed94a Add inlcude files to NetHackW project. Add cpp.hint file. 2020-10-19 16:25:42 -07:00
Bart House
cc50aa036d Update files heading to reflect that we support VS 2017 and 2019. 2020-10-10 16:28:41 -07:00
Bart House
bb04a9b041 Support both VS 2017 and VS 2019 without making changes to project files.
Renamed 'vs2017' folder to 'vs'.
2020-10-10 15:15:59 -07:00
nhmall
7a1952eadd more file header "NetHack 3.6" to "NetHack 3.7" 2020-08-03 22:41:35 -04:00
nhmall
ac9ba38449 file header bump from "NetHack 3.6" to "NetHack 3.7" 2020-08-03 22:07:36 -04:00
nhmall
c95fe8c32b Merge branch 'NetHack-3.7' into header-order3.7 2020-07-07 20:10:25 -04:00
nhmall
b967f73b96 build with the current Lua version 5.4.0 by default if not overridden 2020-07-07 17:36:23 -04:00
nhmall
1443ceecc5 more patchlevel consolidation 2020-07-07 08:55:11 -04:00
nhmall
f365bdd254 some mingw bits to move its gui variation closer to building and running 2020-06-11 12:26:44 -04:00
nhmall
bb1a0dd60b build warning for noreturn function that does return
The warning showed up with gcc on msdos (__DJGPP__)

end.c: In function 'nh_terminate':
end.c:1729:1: warning: 'noreturn' function does return
 }
 ^
2020-06-08 14:44:29 -04:00
nhmall
cdf280628c split symbols bits from drawing.c; new file src/symbols.c 2020-05-06 10:55:54 -04:00
nhmall
68fdc3bbcb February 2020 options.c overhaul
combine boolean and compound options into a single allopt[] array for
processing in options.c.

move the definitions of the options into new include/optlist.h file which
uses a set of macros to define them appropriately.

during compile of options.c each option described in include/optlist.h:
   1. automatically results in a function prototype for an optfn called
      optfn_xxxx (xxxx is the option name).
   2. automatically results in an opt_xxxx enum value for referencing
      its index throughout options.c (xxxx is the option name).
   3. is used to initialize an element of the allopt[] array at index
      opt_xxxx (xxxx is the option name) based on the settings in the
      NHOPTB, NHOPTC, NHOPTP macros. Those macros only live during the
      compilation of include/optlist.h.

each optfn_xxxx() function can be called with a req id of: do_init, do_set,
get_val or do_handler.

req do_init is called from options_init, and if initialization or memory
allocation or other initialization for that particular option is needed,
it can be done in response to the init req.

req do_set is called from parseoptions() for each option it encounters
and the optfn_xxxx() function is expected to react and set the option
based on the string values that parseoptions() passes to it.

req get_val expects each optfn_xxxx() function to write the current
option value into the buffer it is passed.

req do_handler is called during doset() operations in response to player
selections most likely from the 'O' option-setting menu, but only if the
option is identified as having do_handler support in the allopts[]
'has_handler' boolean flag. Not every optfn_xxxx() does.

function special_handling() is eliminated. It's code has been redistributed
to individual handler functions for the option or purpose that they serve.

moved reglyph_darkroom() function from options.c to display.c
2020-02-26 00:24:37 -05:00
nhmall
d81c096ce6 window port interface change - add mbehavior flags to start_menu()
Provide a way to communicate additional behaviors and/or appearances
desired from NetHack window port menus.

This is foundation work for changes to follow at a future date.
2020-02-20 20:12:51 -05:00
nhmall
d50c3577e9 some more status condition follow-up
- Don't display 'Held' when swallowed.
- Don't display 'Held' when the hero is doing the holding; add a condition display
  entry "UHold" for that (the opt_in option is "holding")
- Allow resorting of the 'O' menu for status condition fields. Default is alphabetical, but you
  can sort by condition field ranking now.
2020-02-20 01:22:27 -05:00
nhmall
2da95e4dc0 eliminate the uses of the manually maintained BL_MASK_BITS
Use CONDITION_SIZE which does not require manual updating.

Also attempts to adjust win32 graphics window port for
the new fields.

That port has its own field names and should be adjusted
to using the following which are declared extern in
include/botl.h.

   struct conditions[CONDITION_COUNT];
   int cond_idx[CONDITION_COUNT];

The former contains the fields that were port-specifically
added to the win32 graphical port and more, plus it is
centrally maintained and currently utilized by tty and curses.

The cond_idx[] array contains the ranked ordering of the
condition fields from highest ranking to lowest. Instead
of indexing like this:
	int i;
	for (i = 0; i < CONDITION_COUNT; ++i) {
	    ...conditons[i].enabled;
 	    ...condtions[i].text[0];
	}

you can use the ranked ordering like this:
	int i, ci;
	for (i = 0; i < CONDITION_COUNT; ++i) {
	    ci = cond_idx[i];
	    ...conditons[ci].enabled;
 	    ...condtions[ci].text[0];
	}
2020-02-08 20:40:38 -05:00
nhmall
80a602d344 add recent file addition to windows visual studio project and Makefile 2020-02-02 20:59:41 -05:00
nhmall
82bfec24f9 update some version bits 2020-01-28 19:09:40 -05:00
nhmall
42c4600ba7 Merge build tools updates from 'NetHack-3.6' into NetHack-3.7-Jan2020 2020-01-25 12:29:31 -05:00
nhmall
f72df6c21f exec commands in MSBUILD *.proj files didn't handle spaces in directory names 2020-01-25 12:23:54 -05:00
nhmall
97b74e6f7b Merge branch 'NetHack-3.7' into NetHack-3.7-Jan2020 2020-01-24 17:27:48 -05:00
nhmall
57e0e30d10 travis-ci bits: try to avoid failure-flagging on transient connectivity issues
Attempt to test whether Lua fetch succeeded (and pdcurses for windows
and msdos as well)

If those prerequisite fetches and untars didn't work, just exit without
marking the travis-ci build as a failure so that the development team
isn't notified about something transient that they don't need to fix
in the code.
2020-01-20 11:10:16 -05:00
nhmall
d5174323eb Merge 'NetHack-3.6' updates into NetHack-3.7-Jan2020 2020-01-14 22:09:29 -05:00
nhmall
a6c46bbd85 housekeeping items for 3.6.5 - first pass 2020-01-14 11:35:06 -05:00
nhmall
cad10295b1 Merge some bug1 fixes from NetHack-3.6 2020-01-13 15:55:01 -05:00
nhmall
a034e8200c centralize the invert decision logic to avoid updates to 7 ports
This will make it easier to tinker for best results.
2019-12-23 21:44:34 -05:00
nhmall
7012e7046f add support for MENU_ITEMFLAGS_SKIPINVERT
Able to test:
win/tty
win/win32
win/curses

Unable to test:
win/X11
win/Qt
win/Qt3
win/gem
win/gnome
2019-12-23 08:36:44 -05:00
nhmall
308943aea4 groundwork for window port interface change to add_menu
groundwork only - window port interface change

This changes the last parameter for add_menu() from a boolean
to an unsigned int, to allow additional itemflags in future
beyond just the "preselected" that the original boolean offered.

There shouldn't be any functionality changes with this groundwork-only
change, and if there are it is unintentional and should be reported.
2019-12-22 18:28:24 -05:00
Bart House
7074b1c55f Prevent crash caused by division by zero in NetHackW. 2019-12-21 15:34:57 -08:00
Bart House
496a81d5b0 Get Visual Studio builds working once again. 2019-12-21 15:34:31 -08:00
Bart House
37a7d624be Ensure front tile size is non-zero to avoid divide by zero exceptions. 2019-12-21 13:14:14 -08:00
Bart House
fb044c1a9f Bump in manifest to reflect latest store release. 2019-12-21 13:13:43 -08:00
nhmall
17feb01d8f Merge branch 'NetHack-3.6' 2019-12-17 14:39:15 -05:00
nhmall
74a5339a5e housekeeping updates for 3.6.4
typos

README update
2019-12-17 14:11:52 -05:00
nhmall
480c3eb6e0 include/lev.h is an empty header file so just get rid of it 2019-12-14 17:18:48 -05:00
nhmall
f4720edfbf include/qtext.h is an empty header so just get rid of it 2019-12-14 12:31:29 -05:00
nhmall
bc8c1f8f56 remove field-level savefile code 2019-12-08 07:27:01 -05:00
nhmall
66e90ab19b re-add Windows visual studio build back into the travis-ci tests
New procedures added to win/win32/vs2017/travisci.sh for travis-ci testing.

- use curl to obtain Lua from http://www.lua.org/ftp/lua-5.3.5.tar.gz
- use tar to unzip lua into lib/lua-5.3.5/...

Note: curl and tar were both added as part of Windows 10 in late Dec 2017
   https://techcommunity.microsoft.com/t5/Containers/Tar-and-Curl-Come-to-Windows/ba-p/382409

- use git to clone pdcurses into lib/pdcurses
- use git to clone universal-ctags into lib/ctags
- build universal-ctags ahead of building NetHack + lua + pdcurses
- adjust sys/winnt/Makefile.msc to look for those things in their lib locations when
  building under travis
2019-12-06 21:28:19 -05:00
nhmall
a9c946a05f Merge branch 'NetHack-3.6' 2019-12-01 19:30:09 -05:00
nhmall
d2d40289e6 update and/or clarify some version references 2019-12-01 19:07:28 -05:00
nhmall
3a84bff7f3 Merge branch 'NetHack-3.6' 2019-11-30 15:41:52 -05:00