Commit Graph

568 Commits

Author SHA1 Message Date
nethack.allison
ea80f61b6f bug W343-3 fix (trunk only)
Incorporate part of <Someone>'s changes to address
the main part of bug W343-3.

One other patch yet to come needs to provide a way
to limit the IBMGraphics symbols to various subsets that are
available on some international versions of Windows. Pat
suggested that we not incorporate that patch as is, so I'll be
working on an overhaul of the {DEC|IBM|MACgraphics mechanism.

    * Checks for the presence of the Unicode
      APIs.  If GetVersion() returns the 31st bit set, NetHack is running on
      a 95-based version of Windows.  The Unicode APIs are not available
     and NetHack will revert to the pre-patch behavior. This fix isn't needed
      on 95-based Windows anyway.
    * Fixes console output for text strings.
      The character is converted according to the user's configured IEM code
      page and passed to the Unicode version of WriteConsoleOutputCharacter.
    * Fixes console output for map symbols.
      The character is converted according to a fixed mapping containing
      code page 437 plus the symbols in the space from 00 to 1F.  A fixed
      table is used so that a player using Lucida Console can get full
      IBMgraphics (original set, i.e. level 3) regardless of the code page.
      A table is used instead of MultiByteToWideChar so that the space from
      00 to 1F will be converted correctly; this is necessary for correct
      display of the Rogue level.
2006-09-09 20:36:12 +00:00
nethack.allison
94bc5885b1 console colour follow up 2
If you specified one or more palete options in the config file,
but not all 16, you ended up with black for any you didn't
specify - oops.

This patch ensures that the table has a full complement
of 16 colours by initializing it to the windows default colours
just ahead of the first palette option encountered.

As before, if the config file has no palette option in it,
no calls to change the palette are made at all. If the
undocumented method breaks in a future release of
Windows, then avoiding palette options will work
around the problem.
2006-09-09 19:38:25 +00:00
nethack.allison
4c4304cc62 console colour follow up
Make sure it works on earlier versions of windows
where GetConsoleWindow() is not present.
2006-09-05 12:46:47 +00:00
nethack.allison
817cae4518 adjustment of win32 console colours (trunk only)
Allow config file entries to adjust win32 console colours.

The following entries in a config file are examples:
OPTIONS=palette:black-0-0-0
OPTIONS=palette:red-210-0-0
OPTIONS=palette:green-80-200-0
OPTIONS=palette:brown-180-100-0
OPTIONS=palette:blue-0-0-200
OPTIONS=palette:magenta-128-0-128
OPTIONS=palette:cyan-50-180-180
OPTIONS=palette:gray-192-192-192
OPTIONS=palette:dark gray-100-100-100
OPTIONS=palette:orange-255-128-0
OPTIONS=palette:bright green-0-255-0
OPTIONS=palette:yellow-255-255-0
OPTIONS=palette:bright blue-100-100-240
OPTIONS=palette:bright magenta-255-0-255
OPTIONS=palette:bright cyan-0-255-255
OPTIONS=palette:white-255-255-255

This uses an undocumented way to adjust the console
colours in a win32 console application. The method and
code snippet used comes from www.catch22.net by James Brown.

This page:
      http://www.catch22.net/about.asp
states the following:
"you do not have to pay anything to use the software, and there are no
 licencing terms for any sourcecode that you may download from this site.
This means you can freely use any sourcecode or portions of code in
your applications, whether they be free software or professional, retail
products."
2006-09-03 04:17:09 +00:00
nethack.allison
557f94c83a win32 makefile gui build with <email deleted> wrote:
> Command line compile of tiled Nethack breaks, at the end, with an error:
>
> Linking....
>        link /DEBUG  /INCREMENTAL:NO /NOLOGO kernel32.lib
> ws2_32.lib mswsock.lib advapi32.lib bufferoverflowu.lib user32.lib
> gdi32.lib comdlg32.lib winspool.lib /STACK:2048 user32.lib
> winmm.lib  -out:..\binary\NetHackW.exe
> @NetHackW.lnk winhack.o : error LNK2019: unresolved external symbol
> __imp__InitCommonControlsEx@4 referenced
> in function <email deleted>
2006-07-18 13:24:20 +00:00
nethack.allison
e822fc1c60 install.nt clarification 2006-07-16 18:48:34 +00:00
nethack.allison
0abece54c1 more dos bits 2006-07-10 02:10:22 +00:00
nethack.allison
00768fce8b bits
- catch up on a couple of DOS bits
- fix a copy-and-paste error on hack.c function
2006-07-09 22:17:57 +00:00
nethack.allison
dafb1c089e another pointer to long conversion (trunk only)
botl.c conversions. All the ports seem to be using genl_status_update(),
rather than a window port specific version, so botl.c was the only place
this had to be adjusted.

Also a uudecode cast for the result of strlen, since it isn't using
config.h
2006-07-09 16:42:21 +00:00
nethack.allison
54a27aa9e8 fixes34.4 catch up 2006-06-26 20:19:40 +00:00
nethack.allison
6adc731634 Install.nt updates
- Additional information for using MS VC++ 2005 Express Edition in
  combination with the Platform SDK.
2006-06-26 11:02:36 +00:00
nethack.allison
174b985267 Allow makefile build with VC2005 (trunk only) 2006-06-25 22:40:58 +00:00
nethack.allison
1a01343c63 dungeon open failure
We've been getting numerous complaints from people
about "dungeon failure", often related to attempts
to start NetHack from within various zip utilities
that present a folder-like view.

The dungeon failure was actually misleading. The
real problem was a dlb file open failure, but the
return value of dlb_init() was not being checked
in pcmain.

This moves the dlb_init earlier in the startup,
checks for failure, and provides some feedback
around the common zip utility problem for win32.
2006-05-07 14:32:04 +00:00
nethack.allison
13944ab03b win32 Makefile updates
- DLB wasn't defined during util builds, including makedefs.
- spotless wasn't spotless
2006-05-06 19:13:35 +00:00
nethack.allison
3e2f7f946d fix W343-1 open win32 bug from known bugs page
W343-1 Redirecting score output through a pipe doesn't work.
2006-04-25 01:16:54 +00:00
nethack.rankin
5501922aa8 omailcmd (trunk only)
The revised newmail() wouldn't compile (Strncpy doesn't exist, `buf'
was an array of pointers rather than of char).  Simplify it substantially,
and adjust the one caller (vms) that relied on the old convoluted bit.
2006-04-15 02:14:36 +00:00
nethack.rankin
2c0a072ef1 main() reorganization (trunk only)
Move some internals-related code out of port-specific main so that
it isn't duplicated a bunch of times.  One minor side-effect of this
change is that if you auto-pickup something at the very start of a game,
it will happen after any full moon/new moon/Friday 13th message rather
than before.  There's a second change for some:  the shared main() used
by several of the micro ports had a small difference in game play--if you
saved a game while on an engraving, it would automatically be read when
you resume--that will now occur for everybody [Elbereth weenies rejoice!].
pcmain() was also calling update_inventory() at start of play.  That's
unnecessary for new games, where inventory initialization triggers a call
to it for each item added to your pack; but I wasn't sure about restored
games, so everybody gets it there now.

     The Mac and BeOS ports evidently haven't been touched it some time;
they still referenced flags.move which got replaced by context.move quite
a while back.  The Windows GUI code has a declaration for mswin_moveloop()
which appears to be non-existant, but I left it alone.  I assume that the
Qt interface uses the existing main() routines; at least I couldn't find
any start of game code specific to it.  vmsmain's revised main() is the
only one which has been tested.
2006-04-02 07:35:30 +00:00
nethack.rankin
a0156b9278 vms Makefile bit
Old copy/paste typo.  This alternate target obviously doesn't get much use.
2006-03-25 05:22:56 +00:00
nethack.allison
143790540b mextra follow up bit 3
More Makefile tweaks
2006-01-07 13:38:29 +00:00
nethack.allison
51ad1c848f mextra-related port Makefile mods
This attempts to modify the various Makefiiles for the mextra changes.
Port teams should verify that the modifications are valid.
2006-01-06 06:00:34 +00:00
nethack.allison
faa5458843 mextra-related port Makefile mods
This attempts to modify the various Makefiiles for the mextra changes.
Port teams should verify that the modifications are valid.
2006-01-06 05:52:48 +00:00
nethack.allison
ec1b3d3e6b MSC Makefile typo
Fix a typo spotted in the last patch
2006-01-04 11:43:58 +00:00
nethack.allison
d47f1ef79a MSC Makefile
Create MSC PDB and MAP files in obj directory instead of source
2006-01-04 11:34:27 +00:00
nethack.rankin
0303517e2d depend.awk (trunk only)
I don't have any way to test this, but zlib.h needs special handling
to prevent compilation problems for anyone who doesn't have it.
2005-12-15 03:42:52 +00:00
nethack.rankin
07f7384460 vms Makefile (trunk only)
I couldn't find the original depend.awk (which started out on vms) and
didn't feel like attempting to recreate it, so did this the old fashioned
way (grep,&c of src/*.c).  I think that all of the various Makefiles need
one or more of these changes.  Adding context.h to the hack.h dependencies
and emin.h to monst.{o|obj} are the most significant ones.
2005-12-15 03:39:20 +00:00
nethack.rankin
ea61a13add number_pad:3,4,-1 (trunk only)
[See the cvs log from flag.h for comments pertaining to iflags.num_pad
and Cmd.num_pad, Cmd.commands[], Cmd.serialno.]
2005-11-26 02:34:23 +00:00
nethack.allison
7391587006 nethack.rankin wrote:
>      Makefiles need a dependency update to add edog.h for eat.c.
2005-10-02 21:08:28 +00:00
nethack.allison
e45611b909 smartphone keypad input tweaks (from <Someone>)
<Someone> wrote:
> Some keypad input tweaks for Smartphone port:
> - added "Type Cmd" command that allows to type arbitrary commands using
> phone keypad
> - added Q(quiver) command to "Attack" layout
> - fixed F command to prompt for direction
>
>
>>2) I can't find a way to do the equivalent of d<number><item> and the
>>same for picking up (for example when multiple rations are on top of each
>>other and you can only afford 1)
>>
>>3) I can't find a way to change the quiver (the Q command)
2005-03-29 03:58:23 +00:00
nethack.allison
4078094246 tile synch and a warning fix 2005-02-20 19:49:56 +00:00
nethack.allison
6177f4b871 win32 and wince
Remove the email address which is no longer valid from
several NetHack source files.
2005-01-23 19:39:01 +00:00
nethack.allison
d040170713 djgpp zlib support
Tested the djgpp MSDOS build with zlib support.
2005-01-23 16:29:16 +00:00
nethack.allison
ab1872b928 zlib support; also internal compression changes
o Add support for zlib compression via ZLIB_COMP in config.h (ZLIB_COMP
  and COMPRESS are mutually exclusive).
o rlecomp and zerocomp are run time options available if RLECOMP and
  ZEROCOMP are defined, but not turned on by default if either COMPRESS
  or ZLIB_COMP are defined.
o Add information to the save file about internal compression options
  used when writing the save file, particularly rlecomp and zerocomp
  support.
o Automatically adjust rlecomp and zerocomp (if support compiled in)
  when reading in an existing savefile that was saved with those options
  turned on.  Still allows writing out of savefile in preferred format.
o In order to support zlib and not conflict with compress and uncompress
  routines there, the NetHack internal functions were changed to
  nh_uncompress and nh_compress as done in the zlib contribution received
  in 1999 from <Someone>.

I tagged the sources NETHACK_3_5_0_PREZLIB prior to applying these
changes.
2005-01-22 15:28:15 +00:00
nethack.allison
7b83a76bff win32tty: prevent early messages from flashing by unseen 2005-01-15 14:04:03 +00:00
nethack.allison
e7b25a1900 more trunk 3.5 2005-01-02 20:55:41 +00:00
nethack.allison
e9b022d579 housekeeping: mark trunk sources 3.5 (misc) 2005-01-02 17:21:18 +00:00
kmhugo
e0c659435f Mac Carbon addition 2004-08-10 05:54:25 +00:00
kmhugo
f4322a56fb Mac Carbon updates 2004-08-10 05:37:41 +00:00
nethack.allison
f92ac0c25c CE patch (from <Someone>)
Disable processing of double-click messages if the first click
causes map to scroll. The problem is that if the first click scrolls
the map the second click is going to scroll it even further
(before it is redrawn) which is very confusing for the user.
2004-05-24 14:21:15 +00:00
nethack.allison
42f202f4c0 new context_info struct in compat checks (trunk only)
Add the context_info struct to the version compatibility checks.
This increments EDITLEVEL rendering prior save/bones files useless.
2004-02-02 01:30:31 +00:00
kmhugo
a744b6b5bf Mac Carbon updates 2003-12-10 19:36:49 +00:00
nethack.rankin
887d2defd1 vms version bit (trunk only)
Corresponding change for the development code:  make the Makefile
comment match the recently revised code.
2003-12-09 02:54:08 +00:00
cohrs
691f81102e last minute Linux README bits 2003-12-06 20:55:15 +00:00
nethack.allison
10480f4397 core support for status field highlighting (trunk only)
This provides the core support needed for status field highlighting.
This patch doesn't actually perform status field highlighting for any port,
but provides the core hooks for doing so.

The syntax is:
OPTIONS=hilite_status:{fieldname}/{threshold}/{below}/{above}
where {fieldname} is the name of a status field.
           {threshold} is the value used as the threshold to trigger a display
                             change.  It can also be set to "updown" to trigger
                             a display change whenever it rises or whenever it falls.
                             If you end the threshold value with %, then it signifies
                             that you want to trigger the display change based on the
                             percentage of maximum.
         {below}, {above}
                        are the color or display attribute that you want to use when
                        the field value is underneath the threshold. Supported display
                        fields are:  normal, inverse, bold, black, red, green,
                                         brown, blue, magenta, cyan, gray, orange,
                                         bright-green, yellow, bright-blue, bright-magenta,
                                         bright-cyan, or white.
Valid field names are:
        alignment, armor-class, carrying-capacity,
        charisma, condition, constitution, dexterity,
        dungeon-level, experience-level, experience,
        gold, HD, hitpoints-max, hitpoints, hunger,
        intelligence, power-max, power, score,
        strength, time, title, wisdom

Refer to window.doc for details. Guidebook updates to come later.
2003-11-30 05:51:53 +00:00
cohrs
57a1c343dd Unix CLI option to set windowtype
Add the ability to select the windowtype on the command line on Unix using
a new -wwindowtype option.  I had thought the proposed patch could core
dump, but the default windowtype selection occurs earlier and ensures
that raw_print will always work.  So, the only problem with the proposed
patch was it didn't move the linux and sco special-case code until after
the selection was made.  That special-case code really should be moved to
to wintty.c, IMO since it doesn't affect other windowtypes.
2003-11-23 21:36:36 +00:00
nethack.allison
586a805c8f status display - port modules (trunk only)
Introduction of a new set of window port status display
routines.  The new routines are conditional on
	STATUS_VIA_WINDOWPORT
being defined in config.h. See the experimental section,
where the #define resides for the time being.
2003-11-23 06:47:13 +00:00
nethack.allison
a2a20c8c47 no rest_on_space in sample config 2003-11-18 12:35:49 +00:00
nethack.allison
42e2f54b22 no rest_on_space in sample config 2003-11-18 12:30:48 +00:00
nethack.allison
b77e25e9b5 win32: opthelp unavailable
Address a recent complaint from <Someone>.
2003-11-16 04:54:58 +00:00
nethack.allison
507e1293e6 win32tty: Fix an early error message crash 2003-11-15 00:38:59 +00:00
nethack.allison
f96fca8005 no message 2003-11-15 00:23:15 +00:00