Commit Graph

14 Commits

Author SHA1 Message Date
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
Bart House
b1ab64db43 program_state moved to g. 2018-12-25 10:09:04 -08:00
Bart House
e5e906dc3b Changes needed in various ports due to globals changes. 2018-12-24 14:47:51 -08:00
Pasi Kallinen
bd23a56f29 Update commented out perm_invent stuff 2018-09-15 11:29:13 +03:00
Ray Chason
3479c471dd Qt on Win32: changes needed for Win32
* Fix an include directory
* Use strchr instead of index
* play_usersound conflicts with another function
2018-09-10 21:13:24 +03:00
Pasi Kallinen
2ef07ad178 Qt4: Fix compile warning 2018-09-10 21:09:58 +03:00
Pasi Kallinen
46217bbda2 Qt4: Put yn queries in message history
When using OPTIONS=popup_dialog, or compiling with USE_POPUPS,
the yes/no -questions weren't put into the message history.
2017-10-11 09:50:22 +03:00
Pasi Kallinen
76a47b5e34 Qt4: Save message history to dumplog 2017-10-11 01:06:07 +03:00
Pasi Kallinen
c6f0058e3d Qt4: Handle saving/loading message history 2017-10-11 00:32:39 +03:00
Pasi Kallinen
2fcf1ad139 Qt4: put and get message history 2017-10-10 22:55:30 +03:00
Pasi Kallinen
2fa61f9038 Qt4: Use generic putmixed routine 2017-10-10 19:56:51 +03:00
Pasi Kallinen
6b51f6ce09 Qt4: Use TIMED_DELAY and same delay as tty 2017-10-08 11:28:28 +03:00
Pasi Kallinen
ed335dd0a7 Add Qt4 windowport
Originally by Ray Chason for 3.4.3, based on the Qt windowport by
Warwick Allison. The look and feel is mostly the same.

Some improvements over the Qt 3 interface are:

* Panes are resizable
* Full support for IBMgraphics, and walls and corridors are drawn with
  graphical primitives for a continuous appearance no matter what the font
  says
* Lots of irritating glitches fixed
* Menus support proportional fonts correctly

Adding this because the old Qt windowport cannot be compiled on Qt4,
even with Qt3 compatibility stuff.

TODO:
 - background map glyphs
 - status hilites
 - menucolors
2017-10-08 01:15:02 +03:00