Commit Graph

362 Commits

Author SHA1 Message Date
nethack.allison
1bdf37ec00 SAFERHANGUP win32gui (from <Someone>) 2003-09-30 03:42:01 +00:00
cohrs
559be58c21 conflicting delayed killers
Introduce a new set of functions to manage delayed killers in the trunk, used
in addressing the various reports of delayed killer confusion.  Since existing
delayed killers are related to player properties, the delayed killers are
keyed by uprop indexes.  I did this to avoid adding yet another set of
similar identifiers.
- the new delayed_killer() is used for stoning, sliming, sickness, and
delayed self-genocide while polymorphed.  Some other timed events don't
use it (and didn't use the old delayed_killer variable) because they
use a fixed message when the timeout occurs.
- A new data structure, struct kinfo, is used to track both delayed and
immediate killers.  This encapsulates all the info involved with
identifying a killer.  The structure contains a buffer, which subsumes the
old killer_buf and several other buffers that didn't/couldn't use killer_buf.
- the killer list is saved and restored as part of the game state.
- the special case of usick_cause was removed and a delayed killer list
entry is now used in its place
- common code dealing with (un)sliming is moved to a new make_slimed function
- attempted to update all make dependencies for new end.c -> lev.h
dependency, sorry if I messed any up
2003-09-29 19:24:20 +00:00
nethack.allison
64e75e05e4 win32gui (from <Someone>)
trunk and branch:
Do not limit role selection list by race/gender/alignment. The default.nh
selection will still be honored but the list itself will include every
possible role.

Some interface tweaks for main trunk:
- improved calculation of the size of the menu window
- made auto-arrange windows on/off option (it was reset automatically
  which was unintuitive and in some cases annoying, IMO)
2003-09-27 12:30:28 +00:00
nethack.allison
c12d797531 trunk only: preserving context (remaining files)
Pat Rankin wrote:
> collect them all into some new struct and
> save that separately rather than jamming more non-option stuff
> into struct flags.

This patch:
- collects all context/tracking related fields from flags
  into a new structure called "context."
It also adds the following to the new structure:
- stethoscope turn support
- victual support
- tin support
2003-09-21 11:57:26 +00:00
jwalz
c3960b1d49 SAFERHANGUP followup
We've previously been supporting R4+ for X11, but signals weren't added
until R6.  This at least lets it compile under R5.
2003-09-19 16:32:41 +00:00
cohrs
22fe9838f3 SAFERHANGUP support for win/Qt.
Now all the current Unix window-ports support it.
2003-09-19 04:08:37 +00:00
cohrs
40b5b12673 SAFERHANGUP
This is an initial round of SAFERHANGUP hangup changes.  It introduces
SAFERHANGUP, provides the core framework, and enables it for UNIX.

Window-port changes are provided for win/tty, win/X11 and win/gnome.  Qt
changes should be forthcoming after having Warwick look at them.
window.doc is updated so windowport maintainers have an clue what needs to
be done to support SAFERHANGUP.
2003-09-19 03:15:49 +00:00
warwick
b6ff9d7d73 Use __BIG_ENDIAN__ rather than __ppc__ (more portable, more meaningful). 2003-09-16 00:20:18 +00:00
warwick
9d83d474f4 Solve a number of MacOSX problems. 2003-09-11 04:25:52 +00:00
warwick
4c2486026e Work on BigEndian systems too. Only __ppc__ detected for now (Mac OS X). 2003-09-11 04:00:21 +00:00
nethack.allison
416412f92b Remove vestiges of old overlay source split
[trunk only]
2003-09-05 02:45:18 +00:00
nethack.allison
e382e3b055 U613 specifying alignment in win32 and CE (from Yitzhak)
> The bug involved using the initalign (and related) indexes into
> the array of alignments as indexes into the respective combo box,
> and these are (apparently) not equivalent. To fix, the combo box
> is queried one by one for the item with the index that produces
> that proper alignment value, and then uses that index found. I
> did not find an API that does this in one step, but this only
> happens once, at dialog initialization.
2003-09-03 03:57:32 +00:00
kmhugo
1c17e4087a Qt/MacOS X tidbit
The Info.plist file contains vital information about a given
application package.  Rename the file from .pli to .plist (note
that other files in this directory use long extensions).
Also correct and add to some of the information in this file.
2003-09-03 00:16:51 +00:00
nethack.allison
cea7c0399d (from <Someone>) 2003-08-28 05:52:02 +00:00
nethack.allison
ee8ae0ed8b version info (from Yitzhak)
Changes are: Complete copyright notice, Versions using dot format instead of comma format, and nulls at the end of strings (required, at least for Windows 2000).
2003-08-28 05:46:50 +00:00
cohrs
648b1489a4 X11 install
Build and install the NetHack.ad file, and change the nethack.sh to append
the HACKDIR to the XUSERFILESEARCHPATH.  This means users do not have to
do anything special to use the NetHack X11 resources, nor does it require
teaching nethack where the X11 app-defaults directory is.  The change also
updates the X11 and linux doc files in a corresponding way.
2003-08-26 15:11:58 +00:00
nethack.allison
1fd577124b win32 bits for main trunk (from <Someone>)
- set correct checkmark on "Lock Windows" menu item on startup
- redraw message window on resizing (it does not update properly otherwise)
- fixed copy/paste error in read registry settings function
2003-08-20 11:39:57 +00:00
nethack.allison
31a2c8cefa #U567: lootiing counts (from <Someone>) 2003-07-31 11:11:17 +00:00
nethack.allison
a4a5e8d8dd win32gui buffer overrun (from <Someone>)
splash screen off by one error overwrote one byte outside the
mallocked block
2003-07-31 11:04:17 +00:00
nethack.allison
ee430c5b3e win32gui: # to specifiy numeric count during loot
<email deleted> wrote:
> Windows NetHack graphical Version 3.4.1
> comments: I have been unable to remove or put in partial groups
> of items into a bag of holding or scak. With hethack 3.3.X I
> could put 2 of 3 potions or 3000 of 8000 pieces of gold into the
> bag. The menu persents you with the following options (yn#aq)(n).
> Using # exits the menu and typing in the number you wish to use
> does nothing. The work around is to drop the number you wish to
> not store and put all the remaining into the bag then pick up the
> remaining.
2003-07-30 01:17:12 +00:00
nethack.allison
b750eee32a fix display problem with tabs on win32tty 2003-07-27 03:22:15 +00:00
nethack.allison
99bcdf6a4e expand wincap options to second field
<Someone> wishes to add a couple of new options to the wince port ("run fullscreen" and "do not use CE software keyboard").

The wincap field was full, so this adds a second field for
additional options.
2003-07-17 01:35:31 +00:00
nethack.allison
a67ed775cb number_pad (modified from <Someone>'s patch)
The number_pad option can now optionally hold a value
{0,1, 2 } for {off, on, DOS-mode} but plain number_pad and
!number_pad in config files still work as before.

When number_pad:2 is set, iflags.num_pad_mode is set to 1
which triggers the following behaviour:
> '5', M('5') and M('0') are mapped in rhack()
>in cmd.c, only when they are entered as a command. When used as a
>number, like in the 'n' command, no mapping takes place. '0' is
>already mapped to 'i' by the core. The
>only difference [<Someone>] left in (deliberately) is when you press Ctrl-0;
>this used to map to C('i'), which is an invalid command; now
>keep it '0' (which is interpreted as 'i' by the core.)
2003-06-06 03:49:56 +00:00
nethack.allison
3a31710a6c win32gui (from <Someone>)
[main trunk only]
Fixes incorrect registry entries for inventory window position.
2003-06-06 01:56:34 +00:00
nethack.allison
a091428423 win32 (from Yitzhak)
>The attached is a patch for the makefiles and .rc that makes
>Borland compile. Files modified: sys/winnt/Makefile.bcc - changes
>Makefile so dependencies on dlls are removed for console, adds
>gamedir.tag sys/winnt/Makefile.msc - changes the Makefile a bit to
>make it dependent on gamedir.tag in both gui and console, and make
>the dlls a dependency only in console but without the !IF for
>$(GAMEFILE). The .rc format is made workable for both Borland and
>MSC. win/win32/winhack.rc - makes FONT format Borland compatible
2003-06-03 10:09:07 +00:00
nethack.allison
253a9d388b win32gui: prevent male valkyrie (from <Someone>)
>Steps to reproduce problem:
>1) make sure you don't have race, role, gender specified in your
>   defaults.h, then add
>   OPTIONS=role:Valkyrie,race:Human,gender:male,align:lawful
>2) start a new nethackw.exe game
>3) Uncheck "Random" from gender box, now you can select from male
>   or female, not only female.
>4) Select male and click OK.
>5) When game begins press shift+O (Options) and look to gender.
>   Your valkyrie is male.

defaults.nh values were not used the dialog initialization. That's
why both male/female options were available for Valkyries. This is
now fixed.

Also added: checking for consistency of the initial settings and
resetting all incompatible values to ROLE_NONE.
2003-05-26 09:58:15 +00:00
cohrs
07a3dabab1 more U429 - tile bits
> While looking at the tiles.bmp file, I've found some more mistakes like
> this : the Wizard of Yendor's shadow is touching Croesus' tile, and one
> of Orcus' wing is touching Yeenoghu's tile.
2003-05-17 21:46:45 +00:00
cohrs
18ee5accfb X11 install doc update
In some X11R6 configurations, .Xresources is the name for the .Xdefaults
file.  My older Linux system uses _both_, depending on which window
manager you run.
2003-04-24 15:42:53 +00:00
cohrs
8cb8d6cf54 U429 - high priest tile
Fix a couple bad pixels in the high priest tile that are actually shadows
from the previous tile that spilled over.
2003-04-22 23:51:30 +00:00
warwick
cb71f71b53 The POSIX function yn() is sometimes a macro (eg. GCC 3.2, Linux),
so undefine it (we don't need either here).
2003-04-22 06:57:27 +00:00
warwick
ccb0973a23 Another key fix for MacOSX. 2003-04-02 07:04:16 +00:00
warwick
d5f40ec222 Show true key sequences (essential on MacOSX). 2003-03-28 01:41:38 +00:00
nethack.allison
debd89444c (from <Someone>)
What's in it:
some MessageBox tidbits:
- Let all MessageBoxes display an icon
- Introduced NHMessageBox to have messageboxes display a consistent title
- Change icon in mswin_display_file from MB_ICONERROR to MB_ICONEXCLAMATION
  for non-fatal error
And to solve #U355: NetHackW won't run on Win2K OS:
- Avoid a crash when closing the main window while the splash screen is
  displayed.
- Make sure NetHack starts normal when closed minimized
- Center the splash screen on the screen, not on the parent window
  (which may be off-screen)

What's new in it:
- Show copyright banner in textbox in splash screen instead of over the picture
- Show news in splash screen only if iflags.news (solves W341-6)
- show complete version information in splash screen when it is used as about box)

[Also reverse the numkey patch in main trunk]
2003-03-27 00:23:24 +00:00
nethack.allison
39befe07fd To summarise:
- My "various Windows refinements" patch from yesterday went into 3.4.x correctly
- My "NumberPad" patch went into 3.4.x, but should be backed out
- My "various Windows refinements" patch from last week was for 3.5.0, but is incomplete; you can safely ignore that.
- I'll make a new "various Windows refinements" patch for 3.5.0 tonight.
2003-03-26 00:02:09 +00:00
cohrs
1783623cb4 more gnome compilation problems
a typo kept gnstatus.c from compiling w/GOLDOBJ defined
2003-03-24 22:12:32 +00:00
nethack.allison
adfaae0677 numkey (from <Someone>)
mapping the 5 and 0 to '5' and '0' respectively
when NumLock is off, to make entering numbers easier. The core will map '5' and
'0' to 'g' and 'i' respectively. This solves W341-5.

Note: I changed nhdefkey.c and mhmain.c, so both the tty and the windows
interface will show new behaviour. I deliberately did not change nh340key.dll.

Note: Maybe the same change should be made to the MSDOS port.

Note: The behaviour of getobj is a little bit strange: It doesn't use
yn_question's  facility for returning a number, but handles that itself. The
net effect of this is that if you type d55$ (to drop 55 zorkmids,) only the
first '5' is shown
2003-03-23 19:20:22 +00:00
nethack.allison
34272b3249 More (from <Someone>) 2003-03-23 19:16:54 +00:00
nethack.allison
5311cce717 From Yitzhak
(2 troublesome bands removed
and will follow later)
Here's the new patch with the Windows improvements; this should apply to the
3.4.2 tree. Note the changed filename in the diff lines.
What's in it:
> some MessageBox tidbits:
> - Let all MessageBoxes display an icon
> - Introduced NHMessageBox to have messageboxes display a consistent title
> - Change icon in mswin_display_file from MB_ICONERROR to MB_ICONEXCLAMATION
> for non-fatal error
>
> And to solve #U355: NetHackW won't run on Win2K OS:
> - Avoid a crash when closing the main window while the splash screen is
> displayed.
> - Make sure NetHack starts normal when closed minimized
> - Center the splash screen on the screen, not on the parent window (which may
> be off-screen)
What's new in it:
- Show copyright banner in textbox in splash screen instead of over the picture
- Show news in splash screen only if iflags.news (solves W341-6)
- show complete version information in splash screen when it is used as about
box
2003-03-23 19:03:08 +00:00
warwick
8bc452fe31 Fix random character selection, as From a bug report. 2003-03-10 06:48:53 +00:00
nethack.allison
27977b7c15 win32 stuff held until after bugfix release (from <Someone>)
-better handling of "more" prompt for messages that would have      scrolled off the window
-support perm_invent
-menu option to add/remove windows captions
2003-03-03 23:31:36 +00:00
warwick
04554e7729 Work on more UNIX systems. 2003-02-26 07:25:54 +00:00
cohrs
ee99c8e848 even more missing newlines 2003-02-23 16:49:18 +00:00
nethack.allison
7d0a10f3fd more win32 more (from <Someone>)
<Someone> and <Someone> both agreed that this was:
- useful
- unlikely to break anything.
2003-02-21 01:55:26 +00:00
nethack.allison
2875a46833 Roll back the last-minute patch after <Someone> found problems with it 2003-02-20 10:51:40 +00:00
nethack.allison
ed1fddc0b1 win32 "more" handling (from <Someone>)
> There is a slight problem with "--more--" prompt being handled in
> WM_PAINT. WM_PAINT can be sent while you're inside
> mswin_nhgetch(). This causes some weirdness if window is resized
> while waiting for --more-- prompt.
2003-02-20 03:42:46 +00:00
nethack.allison
fc2acbb130 win32 and msdos recover
Since the ports have SELF_RECOVER defined,
remove the build of recover.exe from the default steps.
You must explicitly use 'make recover' now.
2003-02-18 00:21:19 +00:00
nethack.allison
a1a296aa8d win32 bits 2003-02-15 22:46:10 +00:00
cohrs
6e954a9c51 B14005 followup - X11 rip font
Steve VanDevender noticed that fixing the default text window font
caused the rip window to use this font as well, due to intricacies
of X11 resource relationships.
2003-01-04 02:54:45 +00:00
cohrs
06f928aa78 B14005 - fixed width font for X11 text windows
Change the default font for X11 text windows to be fixed by uncommenting
the existing spec in the app defaults file.
2003-01-02 21:23:40 +00:00
nethack.allison
676df2da62 more beta
BETA_INFO was being used in win32 code but
it is only defined in version.c
2002-12-26 17:14:34 +00:00