Commit Graph

163 Commits

Author SHA1 Message Date
nethack.allison
2baa20217f beta feedback - add more wc options
- splash_screen (boolean for whether to display splash screen at startup)
- player_selection:dialog|prompts

Also moves the font and window manipulation stuff in defaults.nh
further down the file, so that a tty users doesn't have to wade
through it all to find the character adjustment samples.
2002-03-12 05:15:40 +00:00
nethack.allison
2148c5f574 Add "experimental section" to config.h
- Move GOLDOBJ into the experimental section.
2002-03-11 16:45:16 +00:00
nethack.rankin
6c91a6bc04 leash groundwork
Add another parameter to m_unleash.  This should not introduce
any change in behavior.
2002-03-11 08:00:21 +00:00
nethack.allison
6f210425b1 Add win32 port help support. 2002-03-10 22:30:47 +00:00
nethack.allison
d40c1b8202 (from Yitzhak) part1
part 1 touches core files
ntconf.h changes differ slightly from Yitzhak's original.

Makes Borland happy with current sources.
Hides "rawio" on Graphical Port which doesn't do anything with rawio
2002-03-10 17:35:16 +00:00
jwalz
3e6e2ff7c6 Lint part 2, mostly parameters. 2002-03-10 04:05:59 +00:00
jwalz
bab78d03c8 Lint part 1, unused variables, routines, and return codes. 2002-03-10 00:30:53 +00:00
jwalz
c7325ee019 Run 'make depend', after fixing up output. 2002-03-09 03:13:18 +00:00
nethack.allison
bc99fd14a6 weapon shattering follow-up 2002-03-06 02:05:14 +00:00
nethack.allison
233385401a more weapon shattering
The Kop Kaptain's rubber hose shatters from the force of your blow!
Rubber hoses are an individual exception that would need to be dealt
with explicitly, since the PLASTIC they're made of is floppy rather
than rigid as for other PLASTIC items.
2002-03-06 01:58:07 +00:00
nethack.allison
3c0e37d9c9 add windowcolors option
Add option windowcolors to control foreground/background
color of menu, message, status, and text windows.
(foreground color is the text color).

The value of the colors is window port specific, the
core code handles the storing of the strings only.
2002-03-05 05:03:48 +00:00
nethack.allison
3dd82542fb OPTIONS_FILE port changes
- set OPTIONS_FILE in ntconf.h so makedefs will use it
- it gets set to either "ttyoptions" or "guioptions" depending on window port
 being built
- dlb nhdat creation stuffs both into the dlb file
2002-03-04 03:26:55 +00:00
nethack.allison
b8b2b8bd51 OPTIONS_FILE core changes
-Allow overriding of OPTIONS_FILE in makdefs.c
-Change obsolete WIN32_GRAPHICS to the correct MSWIN_GRAPHICS
-Remove the 8514 and VESA screen control stuff since it never existed.
2002-03-04 03:22:23 +00:00
arromdee
a5b8144dd1 wizkit messages for gold
This prevents wizkit items that aren't objects from having their names
printed on the screen if they are gold pieces, traps, or similar.

(Note that the only one of those that actually works is gold.  For some reason
if you put "a hole" (for instance) in the wizkit, the hole will not get
created, even though it will, even on the stairs, if the wizard wishes for it
in-game.)
2002-03-03 05:01:09 +00:00
nethack.allison
9fdde2b3aa update patchlevel change list and potential date stamp 2002-03-03 04:24:48 +00:00
cohrs
d1d6455534 Linux build updates
- A few Makefile changes to reflect current(?) paths on Linux
- Linux mail reader is /bin/mail
2002-03-02 22:43:39 +00:00
cohrs
8fb7664869 fix more your corpse cases
- new cxname() to simplify doing the right thing in increasingly common cases
- use for bullwhip snagging
- in shopkeeper offer code
- in a couple other existing places rather than duplicating CORPSE checks
- use singular(...) in "swings" cases, since only one can hit.  Singular uses
  corpse_xname automatically when appropriate
2002-02-27 05:15:48 +00:00
nethack.allison
24956e3b53 The unpaid cost displayed in your inventory now
includes container contents, not just the cost of the
container itself (a prices in inventory phenomenon).

Along the way I discovered a peculiarity -
contained_cost() was adding up the cost of everything in
a container, even if you had stashed items in it that were your
own and not marked unpaid it seems.

I added a flag to force the code to only add objects
that were marked "unpaid" so I could use it in this new
instance, but I didn't change any of
the existing usages (I left the flag at FALSE which leaves
the consideration of the unpaid status alone just as
before).

Some of this is correction of some messages that were
wrong prior to this when dealing with selling of objects
inside a container when only part of the contents was unpaid.
2002-02-25 19:14:42 +00:00
cohrs
0a9beba75e a flag to track if vision is ready
- new iflags.vision_inited to determine if vision is ready to go.
- the flag is set the first time vision_reset() completes, actually every time
- vision_recalc() checks the flag before doing anything.
2002-02-24 18:04:02 +00:00
nethack.allison
490ceaee6c change is_greystone() to is_graystone()
-Rename is_greystone() to is_graystone() since I've
had one complaint about my choice of spelling for
the macro already.

-Change the recent "#rub touchstone" code to use
the macro which pre-existed under the other spelling
and was already used in the very same "if" statement
with that spelling in invent.c. :-)
2002-02-24 17:23:02 +00:00
nethack.allison
eea83e29ea - added ALT-keys support (except ALT-f and ALT-m which are menu
accelerators).
[...]

- added F4/F5 functionality - same as in MSDOS port
F4 toggles between fitting the tiled display to the screen
and full size (compresses the tiles to fit / uncompresses).
F5 alternates between ascii and tiles.

- added support for wc_vary_msgcount
2002-02-21 12:57:56 +00:00
cohrs
ae9f38222e add_sound_mapping cleanup
- avoid several buffer overflows
- move use of access() to files.c in new can_read_file() function
- remove extra newlines in raw_print() calls
- get ready for lint, eg sprintf -> Sprintf
- generally make the code look like core code, not Qt code
2002-02-21 03:33:42 +00:00
nethack.rankin
81684b1672 high-end monster tuning
Strengthen Death by making his "drains your life force"
result take away some max HPs to augment the ordinary damage
it does.  The chance for that effect is reduced from 80% to
75% though.  Weaken Famine, Pestilence, and Demogorgon by
preventing them from hitting with both of their disease or
hunger attacks on the same turn.  When their first attack
hits, the second now gets treated as a stun attack, but if
the first one misses then the second is unchanged and yields
another chance to deliver the disease or hunger effect.
2002-02-19 03:38:31 +00:00
kmhugo
d861ed482c Artifact tuning
Adjustments to artifact prices, per B5006.
2002-02-19 01:35:04 +00:00
cohrs
cad85663de purple worm digestion
Generally modify the AD_DGST damage type so that:
- players and pets get no AD_DGST nutrition from G_NOCORPSE monsters
- undead no longer convey any nutrition, to either monsters or you-as-monster
  I decided on this based on the age typically assigned to undead corpses.
- digestion conveys 50% or normal nutrition, and takes 25% the time to eat.
- all AD_DGST attacks are now subject to gas spore explosions, including player
2002-02-18 23:36:46 +00:00
nethack.allison
5ba1968c14 swap touchstone and flint
in the objects[] array to allow inclusion of touchstone
when wishing for gray stone.

The patch increments editlevel and invalidates bones
and save files.
2002-02-14 02:33:52 +00:00
kmhugo
38e91a320d Twoweapon update
Make two-weapon combat dependant on the hero's current form.
Adds the macro could_twoweap() and performs some housekeeping
in monst.c.
2002-02-13 17:31:07 +00:00
cohrs
c1a3682952 "The" Invocation items in farewell message followup
use and export the_unique_obj() for the test, to ensure consistency
2002-02-12 05:42:08 +00:00
nethack.allison
9748b45905 Allow BUC menu options when dealing with containers
not just when dropping. Alters the way the BUC patch
works, so that it uses getobj() callbacks.
2002-02-11 05:43:38 +00:00
arromdee
98dafd0839 comment tid 2002-02-09 07:42:06 +00:00
cohrs
cf37a7bac0 verb agreement
add and use new APIs, Tobjnam, otense and vtense, is_plural
to determine tense/form of verbs and a few pronouns as well
2002-02-09 00:16:35 +00:00
nethack.rankin
f750e2df4e fix B3032 -- wand of speed monster id
Make wands of speed or slow monster known if their effect
on monsters is observed; likewise for speed boots.  Also, avoid
giving odd "the bat is moving faster" when seeing a bat created
in gehennom and inaccurate "the monster is moving slower" when
a monster puts on speed boots.
2002-02-08 04:14:03 +00:00
nethack.allison
4b364d6927 modifying 'O' command behavour
I was asked how a window-port controls which options are
set to SET_IN_FILE, DISP_IN_GAME, or SET_IN_GAME.

This provides a run-time way to change an option's SET_IN_FILE,
DISP_IN_GAME, or SET_IN_GAME status through code, rather
than clog up options.c with a lot of compile-time #ifdefs
for different ports to offer different default option settings.
Update the documentation to reflect this.
2002-02-07 03:23:55 +00:00
nethack.allison
9d03c83d57 Use tabs for option menu separation if iflags.menu_tab_sep is set.
Simplifies some ports option menu displays.
2002-02-05 14:14:13 +00:00
nethack.allison
7d1e6f7d57 from Yitzhak
Add absent prototypes to some core routines.
Also add some port function() to function(void) in some win32 routines.
Also updates the Borland C Makefile for win32.
2002-02-05 13:21:43 +00:00
nethack.allison
06528d1002 3.3.2 to 3.4.0 2002-02-04 16:06:00 +00:00
nethack.allison
bd44ec4f65 wincap field updates
As Warwick suggested, instead of having fixed tile
sizes as options, allow specification of the size
explicitly.

Also, at Yitzhak's suggestion, provide a hook for
overriding the port's tile file name.  That name,
and the contents of the file it points to, will
be window-port specific of course.
2002-02-04 12:50:46 +00:00
nethack.allison
cb6a93641b Adjust window-port related option processing
to allow common parsing in the core, and direct access to the
results by the window port.

Notes:

o Adds a new field, wincap, to the window_procs
structure for setting bits related to the preference
features that the window port supports.  This allows
run-time determination of whether a particular option
setting is applicable to the running window port.  A
window-port is free to support as many, or as few,
of the available options as it wants.  Ensure that
only the ones supported have their corresponding bit
set in window_proc.wincap. [see chart in
doc/window.doc for help with that.]

o The settings I stuck into wincap for each window
port are almost certainly not accurate, so each port
team should review them.  You should only include
the ones that you will actually react to and make
adjustments for if the user changes that option.
Without the setting in wincap, the option won't even
show up in the 'O'ptions menu.

o preference_update() added to the window-port
interface, so that the window-port can be notified
if an option of interest (an option with its
corresponding bit set in wincap field) is
changed.

o provided a genl_preference_update() routine in
windows.c and used it for all the existing
window ports since they don't have a functional
one of their own yet.

o this messes around heavily with iflags and the options
arrays in options.c

o I hope I didn't break any port's existing code. I
tried not to.  The Mac however, in particular, should
be looked at because it suffered a namespace collision
with what I was working on around fontname.  It had
Mac specific font stuff in options.c. Please test
the Mac.
2002-02-03 05:31:47 +00:00
nethack.allison
51e3079709 <Someone>'s OS2 updates. 2002-02-02 19:46:18 +00:00
kmhugo
532242f07f Artifact prices
Each artifact has its own individual price, rather than being solely
based on the cost of its base item.
2002-02-02 19:21:33 +00:00
cohrs
bd56046f44 vortexes are not really alive
add vortexes to the set of nonliving() monsters
2002-02-02 03:50:53 +00:00
nethack.allison
39f24cda78 Fix "gems in apply menu" From a bug report. 2002-01-28 11:38:25 +00:00
cohrs
00cfa4a9f8 autodig chattiness
The autodig code still requires lots of interaction, because of all the
digging messages.  Make these messages behave more like boulder pushing
messages, where they only display if the previous move wasn't a push.
2002-01-27 23:45:47 +00:00
nethack.allison
ad2e81c296 Fixes:
- B1026  [confirmed] win32: setting multiple options
- bugfix: menu: set focus to the item and make it visible when it is
selected  with accelerator key.
- increased menu font size by 1 point
- layout the main window on WM_MOVE message so the menu windows stays with
the main window  (it was not changing the location before)
- got rid of WinCE specific define (ARM)
- handle all keyboard input via WM_KEYDOWN instead WM_CHAR

Files affected: config1.h mhmsg.h mhmain.c mhmenu.c mswproc.c resource.h
winhack.rc

Notes:
 That overrides Yitzhak's mhmenu patch - I don't like the menu prompt on the
title bar since it can be null and in most cases it is. It looks much better
as a header column in the list and is displayed only if present.

I moved ARM-related (processor) defines to wceconf.h  You cannot undef ARM
before windows.h is processed - ARM version won't compile.

.rc files are generated by IDE - you cannot edit them directly or your
changes will be gone next time the file is saved. If anything needs to be
added to winhack.rc file manually it has to be marked by the following
defines or via menu option View->Resource Includes:
#define APSTUDIO_READONLY_SYMBOLS
...
#undef APSTUDIO_READONLY_SYMBOLS
2002-01-27 23:28:02 +00:00
nethack.allison
8389fb1f29 >B1014 <Someone> [reported] change request - disclosure default
>
>	I'd like the default for "Would you like to see your <whatever>"
>	at the end of a game to be "y" instead of "n". I haven't asked
>	for full disclosure in order to have it skipped if I press the
>	space bar once too often by mistake.

This changes the way the flags.end_disclose array is used to
allow what this request is asking for.  It should be backward
compatible with previous "disclose" options.

The order that the end_disclore options are stored:
inventory, attribs, vanquished, genocided, conduct
There is an array in flags:
	end_disclose[NUM_DISCLOSURE_OPT];
with option settings for the each of the following:
iagvc [see disclosure_options in decl.c]:
Legal setting values in that array are:
	DISCLOSE_PROMPT_DEFAULT_YES  ask with default answer yes
	DISCLOSE_PROMPT_DEFAULT_NO   ask with default answer no
	DISCLOSE_YES_WITHOUT_PROMPT  always disclose and don't ask
	DISCLOSE_NO_WITHOUT_PROMPT   never disclose and don't ask

Those setting values can be used in the option
string as a prefix to each disclosure option
to get the desired behaviour for that option.

For backward compatibility, no prefix is actually required,
and the presence of a i,a,g,v, or c without a prefix sets
the corresponding value to DISCLOSE_YES_WITHOUT_PROMPT;

The actual prefixes used are controlled by the following in flag.h:
#define DISCLOSE_PROMPT_DEFAULT_YES	'y'
#define DISCLOSE_PROMPT_DEFAULT_NO	'n'
#define DISCLOSE_YES_WITHOUT_PROMPT	'+'
#define DISCLOSE_NO_WITHOUT_PROMPT	'-'

As far as the docs go, I don't know if I've got the *roff
stuff right.   The TeX stuff looks okay when I converted it to .pdf.

This increments EDITLEVEL.  If that is a problem, I can
add a routine to restore.c to perform a conversion of the old
values in flags. Let me know.
2002-01-27 01:26:59 +00:00
nethack.allison
69ce21fe0b Add a macro to provide universal consistency around the check
for what sort of creatures tend to revive.
2002-01-26 15:05:00 +00:00
cohrs
f73a1879c9 landmines and boulders
Make pushing a boulder onto a landmine share code with the trap case,
resulting in pits, waking sleepers, et al.
Don't leave a boulder suspended over the new pit, fill it.
Make sure any remaining boulder is placed on top of the pile.
If player sets off landmine, monsters killed are credited to/blamed on player.
2002-01-25 06:38:42 +00:00
warwick
654a297052 MacOSX/Qt system tweaks
These changes clean up build warnings and allow the resulting "NetHack"
Application icons to be dragged around freely in the Finder, as is expected
for Mac apps.
2002-01-24 05:49:04 +00:00
warwick
a89b941f5b MacOSX: no lrand48()
No lrand48() on MacOSX, since MacOSX is really BSD.
2002-01-23 02:26:02 +00:00
nethack.allison
2d5361e389 From <Someone>,
Fixes:
- menu shortcuts implemented
- most windows close on space (except for menus with
  PICK_ANY style)
- "hilite_pet" option is implemented
- map scrolling is improved somewhat (it now scrolls if
  the char is within 5 spaces from the edge of the map -
  configurable by #define CLIPAROUND_MARGIN)
- added 3  winhack-specific options:

 win32_map_mode:[tiles|ascii4x6|ascii6x8|ascii8x8
                 |ascii16x8|ascii7x12|ascii8x12|ascii15x12
                 |ascii12x16|ascii10x18|fit_to_screen]=20
 win32_align_status:[left|top|right|bottom]
 win32_align_message:[left|top|right|bottom]

Note: aligning status window to left or right edge of the screen does
not look good.
2002-01-22 00:30:58 +00:00