Commit Graph

265 Commits

Author SHA1 Message Date
nethack.allison
e996f36748 from <Someone>
In item-selection menus, as you know one can press "=" to select all
rings, say.  This doesn't work if the letters run out before you get to
the rings, however (because there are so many items).

Menu code did not check group accelerators on items without assigned letters
(if the letters run out). Fixed.
2002-06-01 23:55:07 +00:00
cohrs
d79e5a8917 R812 - tty color/inverse video interaction
With some TERMs, disabling inverse video also disables color.
Work around: explicitly turn off color when turning off inverse video.
2002-04-21 19:01:57 +00:00
cohrs
b1055ae7c1 Gnome updates (from <Someone> <Someone> Simon)
- fix destruction of primary game windows
- One, it makes the color of the cursor box dynamic (these are the gnmap.c
changes), based on hp/hpmax (continuous colors white -> yellow -> red ->
magenta rather than discrete like in Qt).
- Two, it adds a new window, NHW_WORN (all the other changes and new files
gnworn.[ch]), placed at the end of the first row, to the right of the status,
with tiles of all the items currently equiped.  I had to change the spacing of
the first row (no longer homogeneous) to accomodate this, but I think it still
looks okay.  It's mostly like the Qt version but the equiped items are in
slightly different places, and a bit more compactly (added quiver, ball/chain,
monster skin armor; see the definition in gnworn.c for the layout).
2002-04-21 17:09:34 +00:00
nethack.allison
31e40def94 (from <Someone>)
Allow someone to resume their game by clicking on a saved game, if they
have an association set up.
2002-04-21 13:22:57 +00:00
nethack.allison
5d3448fc16 Message recall window extensions
by <Someone>

(the following text accompanies the patch at <Someone>'s web page)

add more configurability to the new msg_window option of [..]3.4.0.
It allows the configuration option to take an optional parameter to
specify the style of message history display to use.

allows the following configuration options:

msg_window:s - single message (as was the default in 3.3.0)
msg_window:c - combination; two messages in 'single', then as 'full'
msg_window:f - full window; oldest message first
msg_window:r - full window reversed; newest message first

In the event of no parameter being provided,
the patch is compatible with the current 3.4.0 behaviour:
msg_window = 'full'
!msg_window = 'single'
msg_window can be configured for these options in the
Options menu (Shift-O)
msg_window stores the current window type in the non-persistent
iflags structure, which means that savefile/bones files should be
100% compatible with Vanilla, but at the disadvantage that your
customisations to msg_window will be replaced with your
defaults.nh (or ~/.nethackrc) value every time you restart a saved game.
Credits:

The patch draws inspiration (and code snippets) extensively
from <Someone>'s original msg_window patch, [...] as well as <Someone>'s code for reverse ordering implemented until recently in
Slash'em.
2002-04-20 14:16:23 +00:00
nethack.allison
20472e645c (from <Someone>)
W340-6 fix
fixed: mswin_menu_size incremented width of the actual menu window
each time being called. This only happens if "show window content
while dragging" option is set in Windows desktop settings.
2002-04-18 22:21:05 +00:00
nethack.allison
d493eb8d90 (from <Someone>)
The pet image was garbled because it was reduced to the size of the pet mark
bitmap
in the function that draws pet mark transparently over the pet tile (32x32
image was reduced to 16x16 and then stretched again)

Also added: use Windows-provided TransparentBlt where available.
2002-04-18 22:11:34 +00:00
nethack.allison
841db8164d Get rid of some win32 warnings from recent patches
mhmenu.c(798) : warning C4101: 'dtp' : unreferenced local variable
mhmenu.c(1273) : warning C4101: 'wbuf' : unreferenced local variable
mhmenu.c(1290) : warning C4101: 'drawRect' : unreferenced local variable
mhmenu.c(1289) : warning C4101: 'dtp' : unreferenced local variable
2002-04-16 21:40:55 +00:00
cohrs
1ca03c750d tty message loss
- typing ESC would lose messages if msg_window was not displayed
- incorporate <Someone>'s fix, which causes them to be tracked, just not
displayed, and thus still available for ^P viewing later on
2002-04-14 21:45:33 +00:00
nethack.allison
a41aec240e W340-3 menu columns
In some menus the options columns didn't line up perfectly
when very long items were present.
2002-04-11 14:08:46 +00:00
nethack.allison
817bdf58e7 B/U/C Priest suggestion by Pat
- also a win32 dsp file modification
2002-04-07 12:51:28 +00:00
nethack.allison
69ee06a9bc Two new options
Add "travel" boolean option to enable/disable travel command.
Add "mouse_support" wincap option to enable/disable mouse.

- When running the win32 tty version full-screen, some people
complained about the square mouse cursor.

Newsgroups: rec.games.roguelike.nethack
Subject: Re: Getting rid of the cursor?
<email deleted> <email deleted>
Followup-To:

On Thu, 04 Apr 2002 00:20:06 <email deleted> wrote:
> Ok, let me be more specific: when playing the windows non-GUI version, is
> there a way to get rid of the large rectangular white cursor?
>
> <email deleted> wrote in message
> <email deleted>
>> Can you get rid of the cursor in the windows version?  I really hate that
>> thing.
>>

<email deleted>
>Newsgroups: rec.games.roguelike.nethack
>Subject: Disabling Mouse Input
>
>I purchased an older P120 laptop to be able to play Nethack at the hotel.
>I find that I rest my thumbs on the mouse touch pad all too often and my
>@ moves unexpectedly at times. I took a peruse through defaults.nh, but
>came up empty.
>
>Anyone know if mouse input can be disabled?
>
>MRSisson
2002-04-04 03:45:03 +00:00
warwick
7ca75f5806 Screens are getting bigger... make 64x64 the maximum scaled tile size. 2002-04-03 08:09:47 +00:00
nethack.allison
28e7cd5c0e #741 (from <Someone>)
Another fatal bug in win32 graphical interface
"Too many "dead" NHW_TEXT windows around. Repeating #? 15 times will produce
the same result."

>Wizard, wearing gray dragon scale mail and wielding Magicbane. The
>Dark One teleports next to me and I get the message "The Dark One
>casts a spell at you! A field of force surrounds you!". Then I get
>3 windows popping up: "Oops." "The dungeon collapses." "ERROR: No
>windows available..." and the game exits.

> I wish I could reproduce this reliably.  Here's the method I've been using
> to do it:
>
> - Equip character (+4 gdsm, Magicbane, unicorn horn, see invisible,
> telepathy, key, "gain ability" potions to max out, enhance dagger skill
> to max, level change to 14)
> - Teleport down to the portal entrance.  Go through the portal, get
> permission to go down to see the Dark One.
> - Go down to the Dark One's level, teleport over, open up his door, and
> basically just try to head back to the entrance and kill him.
>
> Two different things have happened while doing this so far.  (I've been
> able to get errors something like 5 times out of many tries, and I haven't
> been about to do it at all in the TTY version - only the windows
> one.)  Either I get the above message I mentioned to you, which seems to
> happen at a random time, or I get a slightly different result - "Oops,
> program initialization failed, ERROR: No windows available".  This second
> result happened once _after_ I had killed the Dark One and was trying to
> #quit.
>
2002-04-02 01:26:25 +00:00
nethack.allison
d3cef1b49b (from Yitzhak)
fixes a little problem noticed in mhsplash.c while trying to
figure out my debugger problems.
2002-04-01 21:27:23 +00:00
nethack.allison
df39d363b2 #R733 (from <Someone>)
- fix a buffer overflow in the win32 graphical interface
2002-04-01 21:23:38 +00:00
nethack.allison
add3dcf7ee (from Yitzhak) 2002-04-01 19:55:37 +00:00
cohrs
320c5e720d X11 pop-up dialog width
- the response field of the pop-up dialog was getting smaller by a few
pixels each time it was used.  This was because the width calculation
was effectively stripping off the margins (4 pixels total) each time.
Don't do that.
2002-03-31 17:11:23 +00:00
nethack.allison
b64b2a8b05 more win32 de-MICRO 2002-03-31 05:29:03 +00:00
nethack.allison
51f9892b3b Allow MICRO and WIN32 code paths to diverge
There's still a lot of overlap for 3.4.1, but not
100% any longer and it facilitates some improvements
- Allow error save files on WIN32
2002-03-30 19:09:56 +00:00
nethack.allison
14ec6fe03b some 3.4.1 preparation
Update patchlevel.h
Update some strings from 3.4.0 to 3.4.1.
2002-03-29 06:30:33 +00:00
nethack.allison
e52620da26 (from Yitzhak)
- mostly from Yitzhak, with a modification based on subsequent discussion.

After installing everything (mail, cvs, etc) I found the compile was
broken.

Yitzhak: This fixes the compile.  I used LONG for the types because using DWORD
conflicted in Borland with signed/unsigned compare mismatches.

[Also works around some perm_invent code destined for a later patch that got
rolled in prematurely]
2002-03-28 14:24:29 +00:00
nethack.allison
63e0b1ec2d (from <Someone>)
Two things:
1. This patch causes the window placement of the main window to be
written to the registry, and to be restored upon the next start
of the program. I had to move the creation of the main window to init_nhwindows,
as the registry is not read until then.

2.  Implement support for wc_popup_dialog (or rather, support for not having
popup windows.) It asks getlin questions and get_ext_cmd on the
message window, much like the TTY port does it.

The get_ext_cmd procedure is almost but not quite the same as the
one for TTY, and I think it is better: It autocompletes the extended
command you type, but if you keep on typing it doesn't add those letters
after the completed command, but just keeps track of how many (correct)
characters you typed. If you type a different character than the
autocompleted command has, it shows you what you typed again. If you
press backspace, it deletes the characters you typed, and if autocompletion
is no longer possible, it removes the autocompleted part. The effect
of this is that you can type as many letters as you want when typing
an extended command, as long as it is enough to identify one command;
and you only have to delete the characters you actually typed if you made
a mistake. I think autocompletion is a lot less obtrusive this way.

Some notes about the patch:
- Both mswin_getlin and mswin_get_ext_cmd now have two versions, with
  and without a popup.
- yn_question was changed so that it displays a caret, which is a lot
  nicer IMHO.
- I had to implement a new NetHack Windows Message parameter,
  "MSNH_MSG_CARET", to make it possible to show and hide the caret in
  the message window. Normally the caret is created and destroyed by the
  window that owns it, but in NetHack the input focus is always on the
  main window, while the caret is in the message window, which happens
  to be the only one that knows how large the caret should be.
- mswin_putstr_ex's last parameter changed from boolean to int; the
  semantics are enhanced so that a negative last parameter means "delete
  that many characters from the input line". The string to be deleted is
  passed in as well, although it is currently not used.
- A rather large chunk of code finds out where the last string that was
  displayed on the message window ended. This is necessary to place the
  caret at the right spot. The caret is always positioned there, even if
  it is hidden or non-existing.
- mswin_get_nh_event was changed to actually process and empty the
  message queue, and called from mswin_putstr_ex to make sure the
  message window is updated before the next step is done. Without this,
  the caret is positioned before the last message is painted, which
  makes its x-position after the last character of the previous line.
2002-03-27 12:17:26 +00:00
cohrs
bbb9ded22f R691 - bad cursor positioning debug message
- remove the "#define DEBUG" from wintty.c that caused this message to
be displayed when not in a debugging mode
2002-03-26 21:56:03 +00:00
nethack.allison
1b705ec5e2 (from <Someone>)
- use windowcolors settings for text backgroud/foreground color
2002-03-25 00:01:31 +00:00
nethack.allison
c624f53776 W340-4 (from <Someone>)
Date: Sun, 24 Mar 2002 15:40:30 -0800
<email deleted>
Subject: patch: nethack-graphical - menu window colors

- W340-4  (menu checkboxes have a hard-coded white inner part)
- use windowcolors settings for menu backgroud/foreground color

<Someone>
2002-03-24 23:57:19 +00:00
nethack.allison
20779fba75 #R675: bug in win32 GUI (division by zero)
(from <Someone>)

>The tile size is actually set just once in mhmap.c so validation can be done
>in one place. The patch is attached.
>
><email deleted>
on Sunday, March 24, 2002 at 16:15:50
---------------------------------------------------------------------------

mailversion: 1.10

nhversion: 3.4.0

nhfrom: 3.4.0 Official binary release for Windows 95/98/NT/2000/Me/XP
(nh340win.zip)

hardware: 1 Ghz AMD Athlon, 512 MB RAM etc. etc.
I don't think that the hardware is related to the problem because I found it.

software: I used Win 98 (1st edition) and MS VC++ 6.0 to find/fix the bug in
Nethack 3.4.0.

comments: steps to crash: start nethackw.exe - start a game - select "fit to
sreen" in the map menue - rezize the map until it is very very small -> crash
2002-03-24 23:53:28 +00:00
cohrs
88f0680567 restore support for non-square XPM-based tiles (X11 & Gnome)
- change the way the tile sizes are calculated, based on the image size,
so non-square tiles can once again be supported.
- fix Gnome port so it can actually display non-square tiles, several
height/width uses were backwards
- update Install.X11 to note the number of tiles per row in the XPM image
2002-03-24 00:04:41 +00:00
nethack.allison
4ac38da4d9 (from Yitzhak)
-Yitzhak provided this prior to release
 but it never made it in.
2002-03-23 20:17:18 +00:00
nethack.allison
f72ed65d1a (final patch from <Someone>)
This patch implements two things:
- space now dismisses a menu, text or menutext window when you are
  at the bottom of that window
- Page scrolling in menus now works as follows:
  pressing PgDn (or Space in NH mode) moves the focus down one page,
  and moves the scroll position down one page. The effect of this
  is that you always get a full new page of items (which is what
  NetHack players expect), and that the focus moved down one page
  (what Windows users expect.)
  The same (revers) goes for scrolling up a page.

A Windows user will still be a bit surprised when the focus is on
the top item, and he presses '>': he gets a new page of things instead
of the focus moving to the bottom of the page.
However, the PgUp/PgDn keys (which he probably uses) still have the
old Windows behaviour.
2002-03-20 13:05:58 +00:00
nethack.allison
bff7b7e431 (from Yitzhak)
This band adds handling for the "5" key in the numeric keypad.  This is
called VK_CLEAR in the VK_ constants.  Using this band, and with
NumLock off, doing 5 will send NetHack the letter 'g'.  Doing SHIFT-5 will
send 'G'.  Without this band and with NumLock off, 5 does nothing.  With
NumLock on, 5 sends 5.
2002-03-20 10:44:13 +00:00
jwalz
d98c30d989 <Someone>'s new files. 2002-03-20 03:50:49 +00:00
jwalz
931e38a6d7 <Someone>'s gem changes. 2002-03-20 03:45:07 +00:00
nethack.allison
184ce30dad (from <Someone>)
This implements some items on the ToDo list:
- H0005: Space does the same as PgDn in text, menu and 'menutext'
        windows if NetHack mode is on.
- M0004: The cursor (caret) is hidden in text windows and menu
         windows.
         PgUp/PgDn/Up/Dn don't move the cursor, but scroll the
         window.
2002-03-19 22:37:22 +00:00
cohrs
bdfcd6915e Gnome player selection
- provide full 3.4-style player selection, based on tty_player_selection
- generalize selection dialog so it can be used for all 4 prompts
2002-03-19 08:27:55 +00:00
nethack.allison
e55d3509a1 (from Yitzhak)
accelerators
2002-03-18 21:44:09 +00:00
nethack.allison
ac5851dbf6 (from Yitzhak) mhmain, ntty 2002-03-18 00:43:15 +00:00
cohrs
2031835cb0 One leftover height use in Qt tile support 2002-03-18 00:02:51 +00:00
cohrs
61b6bf1ce9 Gnome basic functionality
- let the "#" key work as per Guidebook
- role selection didn't work if you had gender specified in your .nethackrc
  similar problems would occur for other .nethackrc selections
- fix an obvious memory leak
- fix one crash bug from accessing a freed pointer (M-? dismiss M-?)
- note some invalid behavior in comments for a real Gnome developer to fix
- reformatted some code so I could follow it
2002-03-17 20:16:57 +00:00
cohrs
0ffb78e6a4 X11 wide tilemap support - Gnome patch
- update Gnome code to support a 40 tile wide XPM file
2002-03-17 20:04:56 +00:00
cohrs
b6189efe2a X11 wide tilemap support
- support X11 tile files (with or without XPM) that are 40 tiles wide
- rearrange some X11 code to share more code between XPM & non-XPM options
- clean out some deprecated X11/winmap.c #ifdefs
- update Qt code minimally to handle such an XPM file
2002-03-17 20:02:47 +00:00
nethack.allison
dce21606ab (from Yitzhak) ALT-?
This patch allows ALT-? to do #? in NetHack mode by not doing
TranslateAccelerator in NetHack mode.  This relies on the short circuit
logic of || (much of NetHack code relies on it, it's just an explanatory note).
2002-03-17 17:07:22 +00:00
nethack.allison
855e6eef88 (from Yitzhak) ALT-H
This patch disables ALT-H in NetHack mode.  Before patch: ALT-H in NetHack
mode brings down the Help menu in the menu bar.  After patch: ALT-H does
nothing in NetHack mode.  In both cases, in Windows mode, ALT-H brings
down the Help menu in the menu bar.   I can easily write a patch to have
ALT-H in NetHack mode act the same as '?'.

Explanation:
return 0: this window proc has processed this event.
return DefWindowProc(): process using default window proc.

ALT-H is the only key for which DefWindowProc() does something special AND
reaches the else.
2002-03-17 17:03:45 +00:00
nethack.allison
723e17b6ee (from Yitzhak)
This is the part of Yitzhak's patch not currently under discussion.
2002-03-16 18:54:16 +00:00
nethack.allison
53a7785c48 djgpp parts to general gcc parts 2002-03-14 13:10:17 +00:00
nethack.allison
6c749785e8 Move tile2bmp.c to win/share
This is so it can be shared with Qt.
If, for some reason, we have to cut another source tarball for
3.4.0, then this will be included.  Otherwise, this will
turn out to be a post-3.4.0 patch.
2002-03-14 12:54:06 +00:00
warwick
be7145d1a5 Workaround bug in SHARP SL5500 ROM.
(not essential for 3.4.0, since the SL5500 port still needs more work anyway)
2002-03-13 06:04:53 +00:00
nethack.allison
e8845e452f (from <Someone>)
- fixed bug as From a bug report.
  validxxxx functions cannot handle ROLE_RANDOM and ROLE_NONE
  parameters like ok_xxxx functions do
2002-03-12 23:07:59 +00:00
nethack.allison
4c1c02aa95 missing porthelp band
This band was accidentally left out of the patch for porthelp the other day.
2002-03-12 15:50:46 +00:00
nethack.allison
42e2a21aee win32 menus must accept all of the accelerators 2002-03-12 11:51:03 +00:00