]> granicus.if.org Git - nethack/log
nethack
18 years agowin32
nethack.allison [Mon, 2 Oct 2006 03:43:31 +0000 (03:43 +0000)]
win32

The new runtime has parameter checking, and this one
would cause NetHack pop up a dialog and die.

18 years agostatue patch (trunk only)
nethack.allison [Sun, 1 Oct 2006 21:34:54 +0000 (21:34 +0000)]
statue patch (trunk only)

Pat wrote:
> <Someone> has a patch (we've added a couple of
> his earlier ones) which changes the statue display from a single
> one size fits all "`" to a gray monster symbol instead.
> But I think the idea is a good one, and along with the
> bouldersym option could make the fairly hard to
> distinguish back-tick character go away.

Sources tagged before applying NETHACK_PRE_STATUE,
and afterwards with NETHACK_POST_STATUE for easy
rollback.

18 years agostatue patch (trunk only)
nethack.allison [Sun, 1 Oct 2006 21:17:38 +0000 (21:17 +0000)]
statue patch (trunk only)

Pat wrote:
> <Someone> has a patch (we've added a couple of
> his earlier ones) which changes the statue display from a single
> one size fits all "`" to a gray monster symbol instead.
> But I think the idea is a good one, and along with the
> bouldersym option could make the fairly hard to
> distinguish back-tick character go away.

Sources tagged before applying NETHACK_PRE_STATUE,
and afterwards with NETHACK_POST_STATUE for easy
rollback.

18 years agomore symbol stuff (trunk only)
nethack.allison [Sun, 1 Oct 2006 19:30:08 +0000 (19:30 +0000)]
more symbol stuff (trunk only)

- reduce the number of symbol tables for each graphics
set {PRIMARY, ROGUESET} from three {map, oc, mon}
tables for each of the display symbols, the loadable symbols,
and the rogue symbols, to one continguous table for
each:
showsyms: the current display symbols
l_syms: the loaded, alterable symbols
r_syms: the rogue symbols

- Modify mapglyph so that the index into the symbolt table is
available as a return value (it was a void function), rather than
just the char converted from the glyph.
- That makes it possible for a window port to use the same
index value to extract from another table (perhaps a unicode
table) for a different set of display symbols. The  index
is much more useful than trying to convert the character
into another type of symbol, as some contributed patches
have done.
- It is much easier to load a single alternative flat table to
make substitutions, since the corresponding value just
has to get placed into the same index offset in the
alternative table.

This also fixes a bug I found in botl.c, where you could
go to the rogue level, and the bottom line gold symbol
was not being updated with the new character as it should.
The reason was because the gold value had not changed,
only the field symbol used had changed.

This updates multiple ports to place a (void) cast on
the mapglyph call, now that it returns a value, so this
is going to generate a lot of diff e-mails.

18 years agolocking/unlocking vs traps (trunk only)
nethack.rankin [Sun, 1 Oct 2006 05:24:28 +0000 (05:24 +0000)]
locking/unlocking vs traps (trunk only)

     About six weeks back, <email deleted> suggested that
bear traps should deal out damage and be escapable via opening magic.
This doesn't do anything about the first part, but it does allow opening
magic (wand of opening, spell of knock, blessed Bell of Opening) to get
the hero out of bear traps and webs if zapped either at self or downwards.
Zaps across the floor which hit monsters will free them from such traps,
with a chance that releasing a hostile monster will pacify it (using
existing #untrap code).  Conversely, if you are at a web or bear trap
location but not currently trapped, closing magic (wand of locking, spell
of wizard lock) will cause the trap to activate; you may or may not become
trapped.  Likewise for zaps at monsters who are at such locations, which
is treated as an attack.

     Opening magic which hits the hero or a monster located at a trap door
or falling rock trap spot will cause the trap to activate; as above, it's
an attack for the monster case.  At the moment, zapping opening magic
downwards at the hero's location (but not zapping at self or at monsters)
will also cause holes, pits, and spiked pits to activate.  (Zapping down
triggers falling rock traps and zapping up doesn't; that'll need to be
changed.)  Zapping opening down while mounted will untrap, if stuck in a
web or bear trap, and will trap, for the falling cases, in precedence over
releasing the saddle and forcibly dismounting.  The latter still occurs
when there is no applicable trap present though.

     Zapping locking magic downwards at a hole location will convert the
hole into a trap door.  Zapping breaking magic (wand of striking, spell of
force bolt) down at a trap door location will convert the trap door into a
hole.  (Neither conversion currently alters the made-by-you flag for the
trap.  However, the rationalization that distinctive style is what makes
made-by-you recognizable suggests that conversion should clear the flag.)
Lastly, the old behavior (which pre-dated bare holes) of destroying trap
doors when zapping down at them with locking magic has been removed--it
didn't seem to fit very well with the new cases.  I'm starting to have
second thoughts about that but am going to commit this before discovery of
some more niggling details drags it out for another six weeks.

18 years agofix burned by burning/drowned in a drowning
nethack.rankin [Fri, 29 Sep 2006 02:54:17 +0000 (02:54 +0000)]
fix burned by burning/drowned in a drowning

     From a bug report:  you could end up with
gravestone/logfile result of "burned by burning" or "drowned in a drowning".
If you get life-saved when drowning in water or burning in lava, the game
tries to teleport you to safety.  If the teleport fails for some reason--
such as lack of unoccupied non-water or non-lava locations--you drown or
burn again.  But life-saving was resetting the killer reason and the repeat
drowning/burning wasn't setting it up again, so the default got used and
produced a silly result.

18 years agofix burned by burning/drowned in a drowning
nethack.rankin [Fri, 29 Sep 2006 02:43:27 +0000 (02:43 +0000)]
fix burned by burning/drowned in a drowning

     From a bug report:  you could end up with
gravestone/logfile result of "burned by burning" or "drowned in a drowning".
If you get life-saved when drowning in water or burning in lava, the game
tries to teleport you to safety.  If the teleport fails for some reason--
such as lack of unoccupied non-water or non-lava locations--you drown or
burn again.  But life-saving was resetting the killer reason and the repeat
drowning/burning wasn't setting it up again, so the default got used and
produced a silly result.

18 years agotrouble after applying a wielded cream pie
nethack.allison [Fri, 29 Sep 2006 00:40:18 +0000 (00:40 +0000)]
trouble after applying a wielded cream pie

<Someone> wrote:
> I can' t find this bug in the known bug list. If I missed I do apologize.
> It occurs on the standard windows nethack.exe. Just wield a cream pie
> and then apply it. Press x to switch weapons. Program in disorder.
> s - 1752440940 glorkum 32 26485 101's named ? (alternate weapon; not wielded).
> Greetings, <Someone>

It crashed with an access violation for me.

18 years agoroll back 3.4.x branch
nethack.allison [Thu, 28 Sep 2006 22:32:31 +0000 (22:32 +0000)]
roll back 3.4.x branch

18 years agowizard ^G tweaks
nethack.rankin [Thu, 28 Sep 2006 03:56:02 +0000 (03:56 +0000)]
wizard ^G tweaks

     Wizard mode's ^G lets you specify "tame <foo>", "peaceful <foo>", or
"hostile <foo>" to override the created monster's default disposition.
Since it also lets you override the restriction against creating unique
monsters and various other special ones like shopkeepers (a post-3.4.3
change), it became possible to produce tame versions of monsters that
ordinarily are impossible to tame.  That's pretty iffy even when it only
applies to debugging, so switch from internal tameness conversion to use
of tamedog() to get the non-tameable cases handled.  (Minor side-effect:
full moon might prevent a request for "tame dog" from starting out tame.)

     Also, for <N>^G, give up before the specified count is reached if
creation fails when creating multiple copies of a specific type of monster,
on the assumption that the level has become filled up.  (When the type is
random, keep trying in case you subsequently get something different which
could survive on water or inside solid rock.)

18 years agofix #h192 - missile which kills engulfer is in limbo when hero gets expelled (trunk...
nethack.rankin [Thu, 28 Sep 2006 03:16:59 +0000 (03:16 +0000)]
fix #h192 - missile which kills engulfer is in limbo when hero gets expelled (trunk only)

     More explicit control over the behavior of spoteffects() is probably
the way to go in the long run, but this much simpler fix handles the case
at hand.  I'm not sure what `thrownobj' was intended to be used for in the
first place, but it came in handy here.  (It was being left as a dangling
pointer when thitmonst() reports that the missile has been used up; that's
fixed now.)

    Fix the reported problem of lookhere/autopickup not seeing the missile
which just killed the engulfing monster whose death caused the hero to be
put back onto the map and so look/pickup upon arrival.  Normally the missile
gets placed after damage has been dealt and the throw has finished.  This
overrides that so that the missile is put into the engulfer's inventory as
it is being killed (which will then put that inventory onto the floor prior
to expelling the hero on top of same).  If the monster happens to get
life-saved it just ends up collecting the thrown-from-inside object a little
sooner than usual.

    This wouldn't correctly handle the same case for a kicked object, if
that were possible.  But it isn't possible to kick objects while engulfed,
so that's moot.  Other calls to thitmonst() and hmon() don't appear to have
any objects in transit so shouldn't need any comparable fix (I hope...).

18 years agoApply the symbol changes to 3.4.4 tree
nethack.allison [Wed, 27 Sep 2006 22:13:48 +0000 (22:13 +0000)]
Apply the symbol changes to 3.4.4 tree

18 years agofireproof containers catching fire in lava
cohrs [Sun, 24 Sep 2006 23:58:39 +0000 (23:58 +0000)]
fireproof containers catching fire in lava
Recently reported to the list, a fireproof container dropped in lava would
catch fire and burn.  Add the missing check; this looks an oversight when
the idea of fireproof was added, since other fireproof objects get handled
later in the cascading if().

18 years agoH216 - ball and chain movement
cohrs [Sun, 24 Sep 2006 22:31:22 +0000 (22:31 +0000)]
H216 - ball and chain movement
<Someone> reported the longstanding behavior that when dragging, the chain
does not always remain directly between the player and the ball.  This occurs
when the player zigzags.  Added a check to the simple drag code to try to
keep the chain directly between the player and the ball.  But, don't do this
if the player is walking thru rock or if it would move the chain into rock.

18 years agotypo fix
nethack.allison [Sun, 24 Sep 2006 17:42:40 +0000 (17:42 +0000)]
typo fix

18 years agosymset properties (trunk only)
nethack.allison [Sun, 24 Sep 2006 02:45:34 +0000 (02:45 +0000)]
symset properties (trunk only)

Pat Rankin wrote:
> Symbol set definitions need a description attribute, above and
> beyond allowing comments in the file, for inclusion in the 'O'
> command's menu entries for selecting them.
[...]
> mapglyph.c isn't the proper place to decide whether to define
> ROGUE_COLOR.  That may need to become a symbol attribute,
> which we'd then specify on the Epyx rogue set(s).

Implement both of the suggestions above.

18 years agoElbereth on unoccupied locations
cohrs [Sun, 24 Sep 2006 01:36:40 +0000 (01:36 +0000)]
Elbereth on unoccupied locations
Pat recently forwarded a discussion that Elbereth was ignored unless there
was an object on its location.  Mostly.  It was also respected if the hero
was Displaced, no matter where the hero was.  No one commented on his
message, which I took for assent to address this.  Removed the qualifiers, so
now Elbereth is always respected, just like a scroll of scare monster.

18 years agoGuidebook sync for symset
cohrs [Sat, 23 Sep 2006 23:23:48 +0000 (23:23 +0000)]
Guidebook sync for symset
Fix a few things in Guidebook.mn especially syntax errors in the new prose
about nethack symbols, and sync it with Guidebook.txt.

18 years agosymbols file feedback (trunk only)
nethack.allison [Sat, 23 Sep 2006 18:32:21 +0000 (18:32 +0000)]
symbols file feedback (trunk only)

Pat Rankin wrote:
> When 'symbols' is missing from the playground, or is an empty
> file, picking either the symset or roguesymset option via the
> 'O' command just goes right back to the game display (or next
> pending compound option) without giving any feedback.
>

18 years agobuildfix !defined(REINCARNATION) [trunk only]
nethack.allison [Sat, 23 Sep 2006 17:31:19 +0000 (17:31 +0000)]
buildfix !defined(REINCARNATION) [trunk only]

18 years agoconstrain monster migration in wizard tower
cohrs [Sat, 23 Sep 2006 06:32:01 +0000 (06:32 +0000)]
constrain monster migration in wizard tower
<Someone> noticed that when a monster escaped upladder in the wizard
tower, it ended up outside the tower.  This is due to the "wander" code in
monster migration.  Rather than add code to try to keep the monster from
crossing the undiggable wall, just add REGIONs on the tower levels within the
area, which then utilizes the existing in-a-room constraint behavior of
monster migration. Of course, one can still fill a tower level with fodder,
and then when another monster climbs the ladder, it will still end up
outside the tower.

18 years agosymbol parsing (trunk only)
nethack.allison [Sat, 23 Sep 2006 06:17:47 +0000 (06:17 +0000)]
symbol parsing (trunk only)

Make sure that less than three digits on a symbol
evaluates correctly.

18 years agosymbols documentation (trunk only)
nethack.rankin [Sat, 23 Sep 2006 05:34:38 +0000 (05:34 +0000)]
symbols documentation (trunk only)

     A first cut at adding some user-level documentation to dat/symbols.
It should probably include a brief example (not verbose description) of
how to specify values in the various supported formats (decimal, octal,
hexadecimal, simple string, string including escape sequeces?).  Perhaps
a pointer to the Guidebook too. :-}

18 years agovms update (trunk only)
nethack.rankin [Sat, 23 Sep 2006 04:45:56 +0000 (04:45 +0000)]
vms update (trunk only)

18 years agoblind player updates (trunk only)
nethack.allison [Sat, 23 Sep 2006 04:40:15 +0000 (04:40 +0000)]
blind player updates (trunk only)

This takes the PC config file commented symbol value
recommendations from <Someone> for blind players
and puts them into a symset.

[note to devteam: They look odd. I thought perhaps that
something was code wrong, but I went back to 3.4.3
and uncommented the config file stuff. They look the
same there, still odd, especially corridors.
Does anyone have any of the e-mail from <Someone> that might give an indication of what is supposed
to be seen on the display?  I wonder if those config
file options fell out of synch with the code long ago]

18 years agobuild fix (trunk only)
nethack.rankin [Sat, 23 Sep 2006 04:30:45 +0000 (04:30 +0000)]
build fix (trunk only)

     This may become moot if ASCIIGRAPH and/or ROGUE_COLOR setup changes.
But right now, the initialization was failing except when all three of
TEXTCOLOR, ASCIIGRAPH, and REINCARNATION were defined.

18 years agoReadme update
nethack.rankin [Sat, 23 Sep 2006 03:40:57 +0000 (03:40 +0000)]
Readme update

     Noticed while synchronizing my code:  Readme's list of directories
still had sys/amiga/ship, which is long gone, and lacked sys/wince/ceinc
and sys/wince/ceinc/sys, which have been around for quite a while now.

18 years agocomment bits
nethack.allison [Fri, 22 Sep 2006 12:29:42 +0000 (12:29 +0000)]
comment bits

18 years agomore symbol set stuff (trunk only)
nethack.allison [Fri, 22 Sep 2006 02:00:30 +0000 (02:00 +0000)]
more symbol set stuff (trunk only)

- Instead of checking for the Rogue level, check which
  graphics are engaged (PRIMARY or ROGUESET) in the
  SYMHANDLING() macro.

- track which graphics are active through 'currentgraphics'.

- Instead of symset and roguesymset and symhandling and roguehandling
  variables, have symset and symhandling be arrays of two, with the
  following indexes:
PRIMARY
ROGUESET
  That reduced the amount of repeated code.
  (Not to be confused with the 'symset' and 'roguesymset' config file options
   both of which still exist)

- the symbol routines were adjusted to pass
the index , rather than 'rogueflag' and coding to roguesymset etc.

Other than fixing bugs that are encountered, this is probably
the last of the symbol stuff, with the exception of
making the symset and roguesymset config file options
accept the keyword value "default".

18 years agoEyes plus stinking cloud
cohrs [Thu, 21 Sep 2006 15:03:48 +0000 (15:03 +0000)]
Eyes plus stinking cloud
stinking clouds extend their timers, causing the "ttl == 0" check in
visible_region_at to be inappropriate; technically it was never quite
right, since the ttl is set to 0 one turn before removal is considered. But
with the Eyes on, this caused a visible change in the region although the
region still existed.  Introduced a new -2L value to designate that the
region is being removed (-1L means it's permanent), which is what
visible_region_at was really trying to test.

18 years agomore symhandling followup
cohrs [Thu, 21 Sep 2006 06:24:44 +0000 (06:24 +0000)]
more symhandling followup
- yet another unused symbol, this one on files.c.

18 years agomore symhandling followup
cohrs [Thu, 21 Sep 2006 06:24:19 +0000 (06:24 +0000)]
more symhandling followup
- the cause of of the odd "~" with DECgraphics appears to have been caused
by the Is_rogue_level(&u.uz) tests occurring before rogue_level was
initialized.  Perhaps there's a better way to deal with this than what I did?

18 years agomore followup (trunk only)
nethack.allison [Thu, 21 Sep 2006 05:53:08 +0000 (05:53 +0000)]
more followup (trunk only)

make the handling recognition use an int instead of string.

18 years agosymhandling followup for Linux
cohrs [Thu, 21 Sep 2006 05:09:38 +0000 (05:09 +0000)]
symhandling followup for Linux
- tile2x11 would not build because drawing.c now depended on strcmpi which
was (via STRNCMPI not being defined) defined to strncmpi which is
implemented in hacklib.c which needs panic which is defined in... I gave up
on tracking down all the loose ends and changed the strcmpi to strcmp,
which means the handling is case sensitive, but it avoids a bunch of
changes to the way the util/Makefile.
- the symhandling changes introduced a chicken and the egg problem for
ASCIIGRAPH on Unix platforms, which was getting the defn from tcap.h but
that does not get included earlier enough nor often enough.  I added a defn
to unixconf.h to mimic ntconf.h, since ASCIIGRAPH is normally defined on Unix.
- options.c included an unused decl for a function named graphics_opts
- Unix Makefile was not installing "symbols".  I'm assuming this isn't
supposed to get the DLB treatment.

18 years agomore follow-up (trunk only)
nethack.allison [Thu, 21 Sep 2006 03:47:00 +0000 (03:47 +0000)]
more follow-up (trunk only)

Based on feedback, make the load_symset() call easier
to follow.

18 years agosymhandling follow-up (trunk only)
nethack.allison [Thu, 21 Sep 2006 03:11:06 +0000 (03:11 +0000)]
symhandling follow-up (trunk only)

18 years agofixes update (trunk only)
nethack.allison [Thu, 21 Sep 2006 02:35:56 +0000 (02:35 +0000)]
fixes update (trunk only)

18 years agoyet more followup (trunk only)
nethack.allison [Thu, 21 Sep 2006 02:13:26 +0000 (02:13 +0000)]
yet more followup (trunk only)

- a reference to roguesymset should be 'symbols'
- another symset name update

18 years agomore followup (trunk only)
nethack.allison [Thu, 21 Sep 2006 02:01:56 +0000 (02:01 +0000)]
more followup (trunk only)

More symset name correction

18 years agopcmain followup (trunk only)
nethack.allison [Thu, 21 Sep 2006 01:57:25 +0000 (01:57 +0000)]
pcmain followup (trunk only)

Specify a valid symset.

18 years agoFiles followup (trunk only)
nethack.allison [Thu, 21 Sep 2006 01:48:22 +0000 (01:48 +0000)]
Files followup (trunk only)

18 years agodrawing overhaul (trunk only)
nethack.allison [Thu, 21 Sep 2006 01:46:15 +0000 (01:46 +0000)]
drawing overhaul (trunk only)

This is an overhaul to the NetHack drawing mechanism.

- eliminates the need to have separate lists in drawing.c
for the things and their associated explanations by grouping
those thing together on the same inializer in a struct.

- replaces all of these options: IBMgraphics, DECgraphics, MACgraphics,
graphics, monsters, objects, boulder, traps, effects

- drawing.c contains only the set of NetHack standard symbols for
the main game and a set of NetHack standard symbols for the
roguelevel.

- introduces a symbols file that contains named sets of
symbols that can be loaded at run time making it extensible
for situations like multinational code pages like those reported
by <Someone>, without hardcoding additional sets into the game code.

- symbols file uses names for the symbols, so offsets will not break
when new things are introduced into the game, the way the older
config file uchar load routines did.

- symbols file only contains exceptions to the standard NetHack
set, not entire sets so they are much less verbose than all of
the g_FILLER() entries that were previously in drawing.c

- 'symset' and 'roguesymset' config file options for
preselecting a symbol set from the file called 'symbols'
at startup time. The name of the symbols file is not under the
users control, only the symbol set name desired from within the
symbols file is.

- 'symset' config file option loads a desired symbol set for
everything but the rogue level.

- 'roguesymset' config file option loads a desired symbol set
for the rogue level.

- 'SYMBOLS' config file option allows the user to specify replacement
symbols on a per symbol basis. You can specify as many or as few symbols
as you wish. The symbols are identified by a name:value pair, and line
continuation is supported. Multiple symbol assignments can be made on
the same line if each name:value pair is separated by a comma.
For example:
SYMBOLS = S_bars:\xf0, S_tree: \xf1, S_room:\xfa \
  S_fountain:\xf4 \
  S_boulder:0

- 'symbols' file has the following structure:
start: DECgraphics
Handling: DEC
S_vwall: \xf8 # meta-x, vertical rule
S_hwall: \xf1 # meta-q, horizontal rule
finish
start: IBMgraphics
Handling: IBM
S_vwall: \xb3 # meta-3, vertical rule
S_hwall: \xc4 # meta-D, horizontal rule
finish

- 'symbols' file added to the source tree in the dat directory

- Port Makefiles/scripts will need to be adjusted to move them into
HACKDIR destination

18 years agoNew file: dat/symbols
nethack.allison [Thu, 21 Sep 2006 01:33:24 +0000 (01:33 +0000)]
New file: dat/symbols

18 years agodos port chdir fix
nethack.allison [Mon, 18 Sep 2006 23:18:54 +0000 (23:18 +0000)]
dos port chdir fix

I don't know if this was introduced post 3.4.3 or not, but the
DOS port was doing a chdir at the start, but not doing one
at the finish of the game, so you ended up in the same
directory as the NetHack.exe executable post-game.

It was doing the chdir even if NOCWD_ASSUMPTIONS was
defined.

18 years agovery minor optimization in mapglyph
nethack.allison [Sun, 17 Sep 2006 14:23:17 +0000 (14:23 +0000)]
very minor optimization in mapglyph

Perform the multiple tests in macro once and use the
result throughout the function.

18 years agobuild fix w/o REINCARNATION defined
nethack.allison [Sun, 17 Sep 2006 04:40:06 +0000 (04:40 +0000)]
build fix w/o REINCARNATION defined

18 years ago<foo> suddenly appears next to you (trunk only)
nethack.rankin [Sat, 16 Sep 2006 04:46:12 +0000 (04:46 +0000)]
<foo> suddenly appears next to you (trunk only)

> Give demon lords and other monsters who teleport to your location a
> oneshot arrival message.  [...]
> The fixes entry is deliberately a bit vague (and I put it in the new
> feature section rather than the fix section).

And apparently I neglected to commit it with the rest of that patch last
week.

18 years agofix for #H229
nethack.allison [Mon, 11 Sep 2006 04:03:59 +0000 (04:03 +0000)]
fix for #H229

<Someone> wrote:
>>comments:
>>When you commit suicide with a potion of oil (lit), sometimes nethack
>>reports an `obj_is_local' error just after disclosing all the game
>>variables. This has been found in-game (don't ask) and reproduced in
>>wizard mode and in-game (start-scumming).
>
> 0) a neutral human wizard (the scrolls/spellbooks burning, potions boiling ;))
> 1) wish up 3 potions of oil (so that the 2 remaining will definitely kill you)
> 2) a'pply one of them
> 3) stand 1 square away from a wall, like "| @"
> 4) throw the lit potion into the wall (`h' in this case)
> 5) answer `yes' on all prompts.

The thrown potion of oil, which was extracted from any chain
during the throw, still had its timers attached when the call to
splatter_burning_oil() was made. If that killed the hero, a
panic would result during bones file creation (saving timers)
because (obj->where == OBJ_FREE) on the potion.

Remove the timer prior to splattering the oil inside.

18 years ago#H226: Poor grammar when engraving under water
nethack.allison [Sun, 10 Sep 2006 14:20:31 +0000 (14:20 +0000)]
#H226: Poor grammar when engraving under water

18 years agobug W343-3 fix (trunk only)
nethack.allison [Sat, 9 Sep 2006 20:36:12 +0000 (20:36 +0000)]
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.

18 years agoconsole colour follow up 2
nethack.allison [Sat, 9 Sep 2006 19:38:25 +0000 (19:38 +0000)]
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.

18 years ago"<foo> appears" followup (trunk only)
nethack.rankin [Thu, 7 Sep 2006 05:08:41 +0000 (05:08 +0000)]
"<foo> appears" followup (trunk only)

     If you get "you have summoned <demon>" after making a same-race
sacrifice, treat that as having been the "<demon> appears" message so that
the latter won't be given if it subsequently teleports to you after you've
moved out of sight of it.  There are probably some more cases like this
still lurking in the code.

18 years ago<foo> suddenly appears next to you (trunk only)
nethack.rankin [Thu, 7 Sep 2006 04:42:13 +0000 (04:42 +0000)]
<foo> suddenly appears next to you (trunk only)

     Give demon lords and other monsters who teleport to your location a
oneshot arrival message.  Brought about by the report of the late "<demon>
appears" message delivered during its bribery demand, after the character
had already been able to see it for long enough to extract gold from a bag.
Now, if you can't see or sense a monster before it teleports to you, and
you can see or sense it after, you'll get "<monster> suddenly appears!".
The message will be given at most once for any given monster, and it won't
be shown at all if you already see/sense the monster before it teleports or
still don't see/sense it afterwards.  The fixes entry is deliberately a bit
vague (and I put it in the new feature section rather than the fix section).

     The change from long to unsigned long for monst.mstrategy may bring
some lint complaints along with it.  The various constants (STRAT_xxx) used
to populate it are still signed.  I didn't increment EDITLEVEL for this;
existing data should still work ok.

18 years agoconsole colour follow up
nethack.allison [Tue, 5 Sep 2006 12:46:47 +0000 (12:46 +0000)]
console colour follow up

Make sure it works on earlier versions of windows
where GetConsoleWindow() is not present.

18 years agoadjustment of win32 console colours (trunk only)
nethack.allison [Sun, 3 Sep 2006 04:17:09 +0000 (04:17 +0000)]
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."

18 years agoeye message formatting (trunk only)
nethack.rankin [Sat, 2 Sep 2006 04:09:50 +0000 (04:09 +0000)]
eye message formatting (trunk only)

     Noticed while making the Unaware changes; redo several eye/eyes
messages to use vtense() instead of doing their own verb handling.

18 years agoUnaware; fix #H202 and extend the fix for #H179 (trunk only)
nethack.rankin [Sat, 2 Sep 2006 03:32:18 +0000 (03:32 +0000)]
Unaware; fix #H202 and extend the fix for #H179 (trunk only)

     Turn being unconscious (via several reasons, including fainted from
hunger) into a pseudo-property named `Unaware' and use it in several
places where only being asleep was checked.  #H202 was about a stunned
character who got the recovery message when it timed out while fainted.
This suppresses messages for several difficulties when they begin or end
while hero is Unaware.  Messages about fatal illness, sliming, or
petrification aren't suppressed; they're too important to hide from the
player.  "You feel ..." messages come out as "You dream that you feel ..."
when Unaware; fairly lame but hopefully adequate.

18 years agofix #H179 - blinding attack while fainted
nethack.rankin [Sun, 27 Aug 2006 02:09:39 +0000 (02:09 +0000)]
fix #H179 - blinding attack while fainted

     From a bug report, being hit with a
yellow light explosion while fainted from lack of food caused blindness
but being hit while sleeping did not.  Make being in fainted state become
a protection against light-induced blindness.

18 years agodata.base entry: playing style
nethack.rankin [Sun, 27 Aug 2006 01:48:04 +0000 (01:48 +0000)]
data.base entry: playing style

     A couple of short quotes which needed a good home.  The first is a
bit of verse from a short story, the second is part of the opening theme
song of the TV series "Monk".  (That's the main character's surname, not
his profession/vocation :-).

     Also make the change to the actual monk entry suggested by <Someone>.

18 years agocmdassist for wishing
nethack.allison [Sat, 26 Aug 2006 04:03:27 +0000 (04:03 +0000)]
cmdassist for wishing

18 years agofix #H184 - rndmonnum plan B
nethack.rankin [Thu, 24 Aug 2006 04:50:45 +0000 (04:50 +0000)]
fix #H184 - rndmonnum plan B

     From a bug report, the fallback selection criteria
(used when everything is extinct?) in rndmonnum() was excluding hell-only
monsters when outside of Gehennom, but failed to exclude never-in-hell ones
when inside.  [Some of the never-in-hell monsters are Angels, but the rest
are all cold based creatures.  That must date to when fire resistance was
required for the hero, which is no longer the case.  Should those cold
monsters retain their never-in-hell setting?]

     This also fixes a latent copy/paste bug in the unused mons[] definition
of Cerberus (it was the only unique monster which failed to specify G_NOGEN).

18 years agodiscovering divine gifts
nethack.rankin [Tue, 22 Aug 2006 03:31:32 +0000 (03:31 +0000)]
discovering divine gifts

     <Someone> says he reported this five years ago, but I don't think I ever
saw it.  Receiving an artifact as the result of #offer would add it into
the discoveries even if the hero was blind and never saw it.  It either
needed to have the dknown bit set, as if it had been seen, or else should
not be added to the list.  I've opted for the latter.

18 years agoinappropriate unblock_point() calls
nethack.rankin [Tue, 22 Aug 2006 03:03:03 +0000 (03:03 +0000)]
inappropriate unblock_point() calls

     Mentioned by <Someone>, who suspected that the fix for C343-114 dealt with
this.  When a giant picks up a boulder from a location where more than one
is present, line-of-sight would be inappropriately cleared, as if the
remaining boulders were transparent.  (He said that he got no pickup
message when the giant picked up the boulder.  I do, and have not tried to
figure out whether this is a post-3.4.3 difference.)  Pushing a boulder
onto a landmine had the same bug, although you wouldn't notice unless there
were at least three boulders to be pushed (mysterious ability to push more
than one boulder in a turn strikes again:  first one triggers the trap and
is destroyed, allowing hero to see through any others; second fills in the
resulting pit; third gets moved to the former trap spot and [probably--I
haven't checked] re-blocks vision; fourth, if any, stays put; if only one
or two are present, the change in vision is expected and the fact that it
happens too soon in the two boulder case would probably go unnoticed.
Polymorph of a boulder also opened up vision without checking whether any
others are present.

    An existing, evidently overly optimistic, fixes34.4 entry covers this.

18 years agocomment spelling (trunk only)
nethack.rankin [Sat, 19 Aug 2006 05:34:39 +0000 (05:34 +0000)]
comment spelling (trunk only)

18 years agofix #H177 - mimicking gold while hallucinating (trunk only)
nethack.rankin [Sat, 19 Aug 2006 05:29:16 +0000 (05:29 +0000)]
fix #H177 - mimicking gold while hallucinating (trunk only)

     From a bug report, having hallucination time out while
mimicking an orange (instead of gold, after eating a mimic corpse), you'd
still get the hallucinatory end-of-mimicking message about not wanting to
be peeled.  If hallucination state is toggled, update the pending message
and change the hero's appearance.  In practice, only the orange-to-gold
case can occur.  Anything which might trigger gold-to-orange will have
terminated the hero's mimickery befort that happens.

18 years agofix grab/engulf by tame/peaceful monster (trunk only)
nethack.rankin [Thu, 17 Aug 2006 04:35:08 +0000 (04:35 +0000)]
fix grab/engulf by tame/peaceful monster (trunk only)

     <Someone> reported being swallowed by his pet purple worm during
Conflict, then being stuck inside once Conflict ended.  I'm not entirely
sure what dog_move() intended by the "swallowed case handled above" comment.
It returns without letting the pet move when the distance between pet and
hero is 0; that wasn't much in the way of "handling" being swallowed.
Grabbing pets did let go, but peaceful monsters didn't until you actually
attempted to move away from them.  Now all four combinations (grabbed or
swallowed by tame or peaceful monster) are handled the same:  the monster
will let the hero go next time it gets a chance to try to move, using up
its move in the process.

18 years agofix #H167 - entering monster filled level
nethack.rankin [Sun, 13 Aug 2006 06:03:23 +0000 (06:03 +0000)]
fix #H167 - entering monster filled level

     When the hero arrives on a level and a monster at his destination can't
be relocated to make room for him, goto_level() would place the hero on top
of the monster.  From a bug report, who said that the
game panicked (without providing specifics, at least so far).  I wasn't able
to reproduce a panic but get a pair of impossible warnings and can confirm
that there is a monster on the same spot as the hero, which could easily
lead to strangeness depending upon what actions the monster attempts to
perform.  This fix causes a non-relocateable monster in that situation to
be moved to the migrating monsters list for later arrival back on that same
level.  That's inconsistant with the migrating monster arrival routine,
which kills off any monster it can't place; I'm not sure which action is
more reasonable, deferred arrival or outright removal.

     There are three or four dozen ``(void) rloc(mon)'' calls which don't
do anything special when rloc fails to move the monster.  Those need to be
reviewed and the ones where it's making a space for some other monster have
to do something about failure.  (Failed teleport attempts can simply leave
the monster in place, so most of those calls won't need any extra handling.)

18 years agoshopkeeper/temple priest teleporting (trunk only)
nethack.rankin [Thu, 10 Aug 2006 00:45:32 +0000 (00:45 +0000)]
shopkeeper/temple priest teleporting (trunk only)

     Forwarded from the newsgroup by <Someone>:  temple priest might
abandon his post via teleport if conditions are obscure enough.  Change
rloc_pos_ok() to only accept spots inside the same shop or temple when a
shopkeeper or temple priest is teleported to a random destination.  rloc()
tries rloc_pos_ok() 500 times before reverting to goodpos(), so this will
usually succeed for a large room; it may fail for a small one (reverting
to the current behavior, more or less).  Shopkeepers or priests who get
polymorphed into a critter which teleports to the stairs when in need of
healing will still leave their shop or temple if wounded (no change).

     Priests resist if the player tries to teleport them, but shopkeepers
don't.  So for direct attack by the player, this only affects shopkeeper
destination.  But it affects both types as far as being hit by quantum
mechanics (probably caused by player's use of conflict) or if polymorphed
into monsters which steal and then flee (again, probably caused by the
player since those strong monsters won't voluntarily polymorph).

18 years agocomment typo
nethack.rankin [Wed, 9 Aug 2006 23:40:28 +0000 (23:40 +0000)]
comment typo

18 years agofix #H164 - boulder pushing bug (trunk only)
nethack.rankin [Wed, 9 Aug 2006 23:27:29 +0000 (23:27 +0000)]
fix #H164 - boulder pushing bug (trunk only)

     From a bug report...):  pushing a boulder onto a level teleporter trap
could repeat the
  You push the boulder and suddenly it disappears!
message.  That would happen whenever the teleport destination was the same
as the current level (20% chance).  The boulder wasn't being moved onto the
trap location so was still present when the pushing code tried to handle
the next one in the pile.  I've changed so that pushing stops whenever a
pushed boulder is affected by a trap, and also so that the boulder gets
moved as usual when a level teleporter fails to send it somewhere.

     I've always thought it's pretty strange that pushing ever operates
on more than one boulder in the same turn in any situation, but I haven't
changed that for the non-trap cases.  (Usually the first boulder pushed
ends up blocking the second one, so you get a "you try to move it, but
in vain" message which seems odd since you just moved one.  But if there's
a pool of water or lava in the path, you can actually push multiple
boulders successfully.)

18 years agomon vs mon attack message phrasing
nethack.rankin [Tue, 8 Aug 2006 05:08:23 +0000 (05:08 +0000)]
mon vs mon attack message phrasing

     From <Someone>:
  Pet picks up 8 spears.
  Pet wields 8 spears.
  Pet thrusts its spear at Foe.
The routine to handle a monster attacking the hero are already uses "mon
thrusts one of its spears" in this case, so make monster against monster
messages do the same.  Also, it's no longer necessary to save one monster
name before formatting another when using two monster names in the same
message, so switch to the more straightforward usage here.  (The Blind
check is needed in the mhitu case but not in the mhitm one, where it's
redundant because the caller has already verified that both monsters'
locations are visible, but I left it in.)

18 years agomore #H166 - quest locate level message
nethack.rankin [Sun, 6 Aug 2006 05:16:23 +0000 (05:16 +0000)]
more #H166 - quest locate level message

     More tweaking brought about by the report of falling through a
trapdoor above the quest locate level and landing below it (which won't
happen randomly any more, but can still be achieved via controlled level
teleport).  You don't get any message for the locate level when arriving
from below, and giving the full initial message if you manage to make a
return visit from above produces silly results.  This adjusts the logic
for delivering those messages; once you've been on the level, you won't
get the full initial message later even if it wasn't given the first time.
You will still get the shorter secondary message, up until the nemesis has
been killed.  (In some cases it might not make much sense since its wording
is based on the assumption that you've already seen the full message.)

     The handling for these messages will never be completely correct
unless the messages themselves are rewritten (and the result would
probably end up with really wishy-washy phrasing so there's not much point).
They assume that you'll be arriving via the stairs, even for the case where
you do come from above rather than unexpectedly from below, and they can
be misleading or confusing if you arrive someplace else.  We could improve
things by having alternate FIRSTLOCATE and NEXTLOCATE messages for use when
not on--or next to, for the case where a pet displaces your arrival--the
stairs.  But I'm not going to attempt to compose those.

18 years agofix #H166 - trapdoors on quest levels
nethack.rankin [Sun, 6 Aug 2006 05:13:22 +0000 (05:13 +0000)]
fix #H166 - trapdoors on quest levels

     From a bug report, it was possible
to fall from above the quest locate level to below it even though it has
nondiggable floors (hence no trapdoors or holes to pass through).  Since
the game can't verify that it is nondiggable (which could vary on a role
by role basis depending upon their quest descriptions) when it is not the
current level, restrict falling past it only when it hasn't been visited
yet.  Impose the same restriction for random level teleport.  This enforces
proper sequencing of the quest feedback, which was the more significant
thing that went wrong in the reported case (player finally got the full
locate level message on a return visit, when descending from above, after
having already cleared out that level on his way back up from falling).

     Once the locate level has been reached or passed, it is no longer a
barrier to falling or random teleport.  (When it is eventually visited,
there's no attempt to remember whether it allows holes, since that
information and the corresponding fall check would need to be extended to
every level in the dungeon.  Also, controlled teleport is still allowed to
bypass it even when it hasn't yet been visited, so the "enforces proper
sequencing" claim above is an exaggeration.)

18 years agorecover (trunk only)
nethack.allison [Fri, 4 Aug 2006 03:58:46 +0000 (03:58 +0000)]
recover (trunk only)

Bring recover process up to date with current save file contents
(self_recover and external recover)

18 years agofix #H158 - typo in monk data.base entry
nethack.rankin [Thu, 3 Aug 2006 04:00:07 +0000 (04:00 +0000)]
fix #H158 - typo in monk data.base entry

     From a bug report, the whatis description
for monks (a passage about a monk being invited to a meal) was using "month"
where "mouth" is clearly intended.  I think this came up a few years ago
when monk was first added and am not sure why it wasn't changed them, even
if it happens to be an accurate transcription from the quote's source.

18 years agomore set_corpsenm (trunk only)
nethack.allison [Sun, 30 Jul 2006 20:08:57 +0000 (20:08 +0000)]
more set_corpsenm (trunk only)

Use set_corpsenm() in a few more places.

18 years agowin32 makefile gui build with <email deleted> wrote:
nethack.allison [Tue, 18 Jul 2006 13:24:20 +0000 (13:24 +0000)]
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>

18 years agoinstall.nt clarification
nethack.allison [Sun, 16 Jul 2006 18:48:34 +0000 (18:48 +0000)]
install.nt clarification

18 years agofix #H148 - applying a pickaxe doesn't respect pushweapon
nethack.rankin [Sat, 15 Jul 2006 03:25:08 +0000 (03:25 +0000)]
fix #H148 - applying a pickaxe doesn't respect pushweapon

     From a bug report, applying a pick-axe will
wield it in place of the primary weapon but wouldn't update the alternate
weapon.  Make objects which become wielded when applied (pick, lamp, whip,
grappling hook, pole-arm) honor the pushweapon option (where the previously
wielded weapon becomes the alternate weapon without use of 'x' command) the
same as when explicitly wielded.  Old behavior matched the documentation,
but that seemed overly restrictive.

18 years agocast int64 to smaller types (trunk only)
nethack.allison [Tue, 11 Jul 2006 12:38:16 +0000 (12:38 +0000)]
cast int64 to smaller types (trunk only)

The devteam feedback was to place casts in the code
in question.

This puts explicit casts on some code that was being
compiled into 'int64' then stuffed into smaller types with
VC2005.

18 years agontconf vc2005 warnings bit
nethack.allison [Tue, 11 Jul 2006 12:29:51 +0000 (12:29 +0000)]
ntconf vc2005 warnings bit

18 years agorecent dead code(trunk only)
nethack.allison [Tue, 11 Jul 2006 12:28:19 +0000 (12:28 +0000)]
recent dead code(trunk only)

remove function zero_anything() completely, as it isn't needed any longer

18 years agounion bit (trunk only)
nethack.rankin [Tue, 11 Jul 2006 04:08:24 +0000 (04:08 +0000)]
union bit (trunk only)

     I'm pretty sure that some pre-standard compilers don't know how to
apply an initializer to a variable of type union.  Unfortunately, I don't
have access to one to check.  Fortunately, there's no need to explicitly
initialize `zeroany' since the default value is what we want--the first
field will be set to zero or null as appropriate (null in this case).

     Strictly speaking, this isn't adequate; what if long is wider than a
pointer rather than narrower?  Using `= {DUMMY}' didn't handle that case
either; the ordering of the union's fields controls which bits get stored.
As a practical matter, it should make no difference.  As long as the code
reading a union accesses the same field as the code writing that union set
up in it, anything in extraneous bits should be irrelevant--except perhaps
when a debugger tries to format things.  The whole issue has always been
implicitly based on the assumption that null pointers have all bits zero
in the first place; that's typical but not guaranteed.

18 years agomore dos bits
nethack.allison [Mon, 10 Jul 2006 02:10:22 +0000 (02:10 +0000)]
more dos bits

18 years agobits
nethack.allison [Sun, 9 Jul 2006 22:17:57 +0000 (22:17 +0000)]
bits

- catch up on a couple of DOS bits
- fix a copy-and-paste error on hack.c function

18 years agomore zeroany (trunk only)
nethack.allison [Sun, 9 Jul 2006 17:39:43 +0000 (17:39 +0000)]
more zeroany (trunk only)

18 years agoanother pointer to long conversion (trunk only)
nethack.allison [Sun, 9 Jul 2006 16:42:21 +0000 (16:42 +0000)]
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

18 years agozeroany [trunk only]
nethack.allison [Sun, 9 Jul 2006 16:25:39 +0000 (16:25 +0000)]
zeroany [trunk only]

Avoid function call when clearing 'anything' union.

18 years agoremove pointer to long conversions - part 3 of 3 (trunk only)
nethack.allison [Sun, 9 Jul 2006 01:23:26 +0000 (01:23 +0000)]
remove pointer to long conversions - part 3 of 3 (trunk only)

Remove some more code that forced pointers into a long int, and
vice versa where information could be lost (P64 platforms such as
WIN64 have a 64 bit pointer size, but a 32 bit long size.)

This 3rd part deals with region functions switching
some arguments from type genericptr_t to 'anything'.

Like the previous 2 parts, this needs to increment
 EDITLEVEL in patchlevel.h.

18 years agoremove pointer to long conversions - part 2 of 3 (trunk only)
nethack.allison [Sun, 9 Jul 2006 01:02:51 +0000 (01:02 +0000)]
remove pointer to long conversions - part 2 of 3 (trunk only)

Remove some more code that forced pointers into a long int, and
vice versa where information could be lost (P64 platforms such as
WIN64 have a 64 bit pointer size, but a 32 bit long size.)

This 2nd part deals with timeout functions switching
some arguments from type genericptr_t to 'anything'.

Like part 1, this needs to increment EDITLEVEL in patchlevel.h.

18 years agoremove pointer to long conversions - part 1 of 3 rev 2 (trunk only)
nethack.allison [Sat, 8 Jul 2006 23:31:39 +0000 (23:31 +0000)]
remove pointer to long conversions - part 1 of 3 rev 2 (trunk only)

[the problem in the earlier rev was tracked to cleanup_burn(),
where arg was holding a (genericptr_t) timer id, and
passed directly to del_light_source() as is.]

P64 (Win64) has a 64 bit pointer size, but a 32 bit long size.
Remove some code that forced pointers into a long int, and
vice versa where information could be lost.

This part deals with light source functions and their
arguments mostly, and switches some arguments
from type genericptr_t to 'anything'.

18 years agoback out part1 patch (trunk only)
nethack.allison [Sat, 8 Jul 2006 20:16:13 +0000 (20:16 +0000)]
back out part1 patch (trunk only)

I got an unexpected access violation since
checking in that patch, so I'm backing out the
change while investigating.

18 years agoremove pointer to long conversions - part 1 of 3 (trunk only)
nethack.allison [Sat, 8 Jul 2006 18:24:01 +0000 (18:24 +0000)]
remove pointer to long conversions - part 1 of 3 (trunk only)

P64 (Win64) has a 64 bit pointer size, but a 32 bit long size.
Remove some code that forced pointers into a long int, and
vice versa where information could be lost.

This part deals with light source functions and their
arguments mostly, and switches some arguments
from type genericptr_t to 'anything'.

18 years agopointer formatting (trunk only)
nethack.rankin [Sat, 8 Jul 2006 03:22:40 +0000 (03:22 +0000)]
pointer formatting (trunk only)

     Hide pointer formatting in alloc.c by eliminating the need for callers
to know how big a buffer is required.  I generally prefer the caller to
pass in its own buffer for this sort of thing, but in this case the usage
is almost entirely for debugging so using static buffers results in less
clutter in the rest of the code.

18 years agocompilation w/o WIZARD
cohrs [Mon, 3 Jul 2006 15:11:25 +0000 (15:11 +0000)]
compilation w/o WIZARD
> Michael Allison wrote:
> There are unresolved functions in the trunk if you build without WIZARD
> defined and attempt to link:
Also to a lesser extent, in the 3.4.4 branch.

18 years agoregion memory
nethack.allison [Mon, 3 Jul 2006 14:30:01 +0000 (14:30 +0000)]
region memory

<Someone> wrote on Tuesday, July 27, 2004 at 06:46:15
> In the region.c function rest_regions allocates storage for the possible
> enter_msg and leave_msg strings. But the function free_region does not relese
> this storage.

Also ensures that some code that is currently ifdef'd out
makes copies of the strings into memory from alloc()
to ensure that no problems with free() result if the function
gets passed a literal string.

18 years agoregion memory
nethack.allison [Mon, 3 Jul 2006 14:21:21 +0000 (14:21 +0000)]
region memory

<Someone> wrote on Tuesday, July 27, 2004 at 06:46:15
> In the region.c function rest_regions allocates storage for the possible
> enter_msg and leave_msg strings. But the function free_region does not relese
> this storage.

Also ensures that some code that is currently ifdef'd out
makes copies of the strings into memory from alloc()
to ensure that no problems with free() result if the function
gets passed a literal string.

18 years agomore fmt_ptr (trunk only)
nethack.allison [Sun, 2 Jul 2006 19:16:58 +0000 (19:16 +0000)]
more fmt_ptr (trunk only)

18 years agomore fmt_ptr (trunk only)
nethack.allison [Sun, 2 Jul 2006 19:09:42 +0000 (19:09 +0000)]
more fmt_ptr (trunk only)

18 years agofmt_ptr (trunk only)
nethack.allison [Sun, 2 Jul 2006 18:43:35 +0000 (18:43 +0000)]
fmt_ptr (trunk only)

fmt_ptr() is no longer dependant on WIZARD or MONITOR_HEAP,
so that it can be used in panic messages.