Commit Graph

237 Commits

Author SHA1 Message Date
Ray Chason
1870e5a41b Fix bugs affecting full-color BMP files 2020-01-27 09:54:58 +02:00
copperwater
f044576309 Remove "iron hook" unidentified description
It's confusing and served no purpose; a spoiled player knew what it is,
an unspoiled player might think it was a hook-hand or something. Now
they all show up as grappling hook.
2020-01-04 22:54:14 +01: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
nhmall
3073a588eb Rename Qt4 directory to Qt 2019-12-07 17:07:50 +01:00
nhmall
c53beb820f Merge branch 'NetHack-3.6' 2019-12-04 17:13:01 -05:00
nhmall
4868f83db1 more self-recover prompting cleanup (tty) 2019-12-04 13:10:12 -05:00
nhmall
16316f8363 Merge branch 'NetHack-3.6' 2019-12-03 23:41:13 -05:00
nhmall
5c57804a97 fix self-recover prompting on windows
the prompting on Windows wasn't working correctly if a prior game had crashed
and the self-recover feature was trying to kick in. This impacts tty, curses,
and mswin (GUI).
2019-12-03 23:32:12 -05:00
nhmall
3a84bff7f3 Merge branch 'NetHack-3.6' 2019-11-30 15:41:52 -05:00
nhmall
42a13a1198 has_color() performance fixes
Performance profiling showed that multiple strcmpi() calls were
occurring each and every time a character was going to the map.

This update:
- honors the WC_COLOR capability
- It allows a window-port to control individual color availability should the window-port wish to do so.
- Makes checking on the individual colors for the active window-port is a straightforward table lookup at the CLR_ offset.

iflags.use_color remains a master on/off switch for use of color, regardless of the capability
compiled into the game (default TRUE).

The has_color() routine, which is now a shared routine in src/windows.c, could likely be made
into a simple macro to eliminate the function call, but this update does not go that far.

This hits a lot of port files due to the window-port interface change, mostly cookie-cutter.
2019-11-30 11:44:07 -05:00
nhmall
75d22a2dbf separate MAIL functionality from MAIL-related structure inclusion
With 3.7+ aspirations of improving savefile interoperability between 32-bit
and 64-bit builds, as well as between platforms, it is better to not have
the underlying struct/array content be conditional.

This splits off some of the MAIL code into MAIL_STRUCTURES code. In theory,
since MAIL_STRUCTURES is unconditionally included, the macro could
just go away and leave that code unconditional, but this commit doesn't
go that far.
2019-11-09 16:19:05 -05:00
Bart House
cd1b650fb7 Merge branch 'NetHack-3.6'
# Conflicts:
#	DEVEL/Developer.txt
#	include/config.h
#	include/decl.h
#	include/display.h
#	include/extern.h
#	include/global.h
#	include/hack.h
#	include/patchlevel.h
#	src/display.c
#	src/dothrow.c
#	src/makemon.c
#	src/monst.c
#	src/objnam.c
#	src/sp_lev.c
#	src/wield.c
#	src/zap.c
#	sys/share/pmatchregex.c
#	sys/winnt/Makefile.msc
2019-07-14 23:36:56 -07:00
Bart House
5870cb6a92 Revert "Added experimental feature NEW_KEYBOARD_HIT."
This reverts commit bc65112ce0.
2019-07-14 21:28:55 -07:00
nhmall
1e47fe61b9 stale code 2019-07-14 12:17:47 -04:00
nhmall
7dfffbb712 Merge branch 'NetHack-3.6' 2019-07-10 21:58:58 -04:00
Bart House
bc65112ce0 Added experimental feature NEW_KEYBOARD_HIT. 2019-07-09 22:30:34 -07:00
nhmall
fc9dde7ae1 Merge branch 'NetHack-3.6.2' 2019-03-13 20:21:56 -04:00
nhmall
9604e50e3d more mingw 2019-03-12 21:30:22 -04:00
Bart House
74caa8d8e4 Moved pray.c globals to instance_globals. 2018-12-19 20:00:35 -08:00
Bart House
912886a73f First set of changes to move globals to instance_globals. 2018-12-19 20:00:35 -08:00
nhmall
ca84486133 clean master after moving of newer content to feature branch 2018-12-10 22:16:08 -05:00
nhmall
e0a3bc928b Merge branch 'NetHack-3.6.2' 2018-12-10 09:18:20 -05:00
nhmall
46d2724f58 some early startup adjustments 2018-12-09 13:09:30 -05:00
nhmall
afc34d3016 a late bot() call was observed on GUI Windows so prevent such a crash 2018-12-08 22:08:55 -05:00
nhmall
a9342107c8 relocate safeproc.c from sys/share to win/share 2018-12-08 20:09:58 -05:00
nhmall
079782ac55 Merge branch 'NetHack-3.6.2' 2018-11-18 14:21:33 -05:00
PatR
8f4c2d2a82 formatting: tile.c
A while back I changed tilemap.c to clean up the formatting of
generated tile.c.  This is a smaller change to revise the layout
of its big array.
2018-11-17 16:31:22 -08:00
nhmall
93b664874c Merge branch 'NetHack-3.6.2' 2018-11-12 23:24:23 -05:00
Bart House
8944235282 Enforced the inclusion of windows headers before nethack headers.
Moved the code page 437 mapping table to winnt.c so that it could be
used in window and console clients.
Added check that fonts support unicode values we use from code page 437.
Use unicode to draw text if font supports it otherwise use ASCII.
2018-11-12 01:58:56 -08:00
nhmall
a0b53ee391 merge 2018-11-11 10:29:52 -05:00
nhmall
41a10e28ae Merge branch 'NetHack-3.6.2' 2018-10-06 12:54:27 -04:00
nhmall
232f016257 Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2 2018-10-06 12:53:41 -04:00
PatR
317f0b56fa tile.c formatting
Modify win/share/tilemap.c so that generated source file src/tile.c
uses similar formatting to the other sources.  Mainly, avoid tabs and
use 4 columns indentation instead of 8 columns in the short routine
near the end.

tilemap.c still treats STATUES_LOOK_LIKE_MONSTERS as conditional.
The main sources made that unconditional prior to release of 3.6.0.
2018-09-30 02:11:32 -07:00
nhmall
6585b58c57 Merge branch 'NetHack-3.6.2' 2018-06-11 16:36:27 -04:00
keni
0e51afc7cd update Files attributes with priorities and %s substitution 2018-05-31 21:42:06 -04:00
keni
9858f69fa8 update .gitattributes files for auto-generation of Files 2018-05-29 19:28:26 -04:00
nhmall
cf73c4bf26 windows build fix
preprocess bigroom.des
	$(U)makedefs --input bigroom.des --output - --grep | $(U)levcomp

insert a missing tile (placeholder only - it needs future fixing!)
2018-04-28 16:04:45 -04:00
keni
0f58af6f37 add missing copyright info 2018-04-25 16:54:50 -04:00
keni
09502df9f1 force expand unexpanded substitution variables 2018-04-25 15:36:11 -04:00
keni
11f1983253 update .gitattributes files for substitution and copyright headers 2018-04-25 14:52:43 -04:00
PatR
b4240e1772 fix #H5780 - file pointer freed twice
win/share/tileset.c seems only to be used by the MSDOS port, but it
compiles cleanly on OSX after these changes.

A file pointer was passed to fclose() twice, second time potentially
causing problems.  There were cases of potentially null pointers
being passed to free() too.  That should be safe these days, but it's
something we've tried to hard to avoid and would probably trigger
complaints from our own MONITOR_HEAP code if that ever got applied
here.
2017-07-30 18:17:00 -07:00
PatR
62fd796271 fix #H4472 & #H4473 - incorrect total_tiles_used
The value calculated for total_tiles_used never got adjusted for
displaying statues-as-monsters.  The most common configuration(s)
using tiles don't care, but the combination of X11 plus USE_XPM
needs an accurate value there.
2016-08-06 19:30:44 -07:00
PatR
d69f0787be add '(uchar)' casts to ctype calls
This is from the pull request for the assertion failure fix.  It
did not mention how to reproduce the assertion failure, just added
casts to a bunch of isspace/isprint/tolower calls that didn't already
have such.

I removed an obsolete change for win/tty/topl.c and changed the
win/win32/mswproc.c code to avoid using an expression with side-effects
(*colorstring++) in calls to tolower() in case someone overrides that
with a macro which evaluates its argument more than once as some pre-
ANSI ones used to do.  Not tested, might have typos....

sys/wince/*.c still needs similar casts.
2016-07-19 05:40:09 -07:00
PatR
9f89c0792c fix #H3907 - wrinkled spellbook tile
Reported 11 months ago for 3.4.3, the tile for wrinkled spellbook
has a spurious brown spot on the far right.  Several other books
have spots drawn outside the book proper for tile decoration, but
that doesn't seem to apply here.  The report suggested changing
'K' to 'M', but that just changes it into a spurious white spot.
Change the stray 'K' to '.' to make the odd spot go away.
2016-06-30 06:03:51 -07:00
PatR
1f787c077b tiles lint
FDECL(foo, (boolean)) ought to have been using (BOOLEAN_P), but
the tiles code isn't including the header which defines that, so
change the argument to int.
2016-06-23 06:19:45 -07:00
Pasi Kallinen
030e3c0dfd Use the graymapping stuff in the tile lib 2016-06-23 10:15:55 +03:00
Pasi Kallinen
5f35d49105 X11: Make statue tiles look like grayscale monsters 2016-06-23 09:44:07 +03:00
PatR
30638db579 tiles fixup: zap beams
Just noticed that a change of mine to src/drawing.c 2.5 weeks ago
("zap beam symbol descriptions -- they aren't walls") triggered a
set of four complaints when processing tiles.
2016-06-05 14:50:30 -07:00
nhmall
730adeebef cut and paste error 2016-03-07 08:46:57 -05:00
nhmall
40f2994ba7 giftiles.c 2016-03-07 08:40:03 -05:00