Commit Graph

10094 Commits

Author SHA1 Message Date
nhmall
183f9bca41 quiet a couple of warnings
..\src\nhlua.c(893): warning C4113: 'int (__cdecl *)()' differs in parameter lists from 'lua_CFunction'
..\src\nhlua.c(894): warning C4113: 'int (__cdecl *)()' differs in parameter lists from 'lua_CFunction'
2020-01-27 10:54:39 -05:00
nhmall
61d0d21f47 avoid link error with gcc 10 which enables -fno-common by default 2020-01-27 08:23:56 -05:00
Pasi Kallinen
4add2cdc54 Doc copypaste error 2020-01-27 10:20:31 +02:00
Pasi Kallinen
1783b9de3e Doc and sample config for MSDOS video resolution 2020-01-27 10:13:48 +02:00
Ray Chason
b52392a5bc Make background appear as a proper black 2020-01-27 09:54:59 +02:00
Ray Chason
b296196a4a Scale the font for large resolutions 2020-01-27 09:54:58 +02:00
Ray Chason
82a219c227 Lift restrictions on tilesets
Support full color tilesets with tiles of arbitrary size.
2020-01-27 09:54:58 +02:00
Ray Chason
34da5ea372 MSDOS/VESA: Make clipy and clipymax available to MS-DOS
VESA mode may need to scroll up and down as well as left and right.
2020-01-27 09:54:58 +02:00
Ray Chason
b2c8d916f6 Add set_tile_type, stretch_tile and free_tile
set_tile_type frees tileset memory not in use for the current tile
type (paletted or full color).
stretch_tile and free_tile support resizing tiles at run time.
2020-01-27 09:54:58 +02:00
Ray Chason
1870e5a41b Fix bugs affecting full-color BMP files 2020-01-27 09:54:58 +02:00
Ray Chason
9460796a2b MSDOS/VESA: Add video_width and video_height
To be used to set the video mode
2020-01-27 09:54:58 +02:00
Ray Chason
aa3303cafc More bits for linear frame buffer 2020-01-27 09:54:58 +02:00
Ray Chason
8d9f31e91f Support the linear frame buffer if available
If the linear frame buffer is in use, the entire frame buffer is
visible all at once, and no calls to the window function are needed.
2020-01-27 09:54:58 +02:00
Ray Chason
ab6424b31c Call the window function directly if supported
Some BIOSes allow calling the window function directly, bypassing the
logic that distinguishes this call from other BIOS calls. Should be
faster on some systems.
2020-01-27 09:54:58 +02:00
Ray Chason
c0d1c4efb7 Use 8 bit mode if available
This was not previously done because the palette was not correctly set
up, and QEMU gave incorrect colors. The palette setup function now
falls back to the standard BIOS function if the VESA BIOS function
fails, which resolves the issue with QEMU. The mode selection logic now
favors 8 bit color if the tile set is compatible.

Using 8 bit mode means fewer writes to memory and fewer uses of the
BIOS window function.
2020-01-27 09:54:58 +02:00
PatR
c911446188 more wizard mode wishing for terrain
Try a lot harder to keep terrain/level flags in a sane state.  They're
overloaded so it's not simple.

Creating a fountain or sink incremented the corresponding counter (for
controlling ambient sounds) but removing one by wishing for something
else in its place didn't decrement.

Allow wish for "disturbed grave" to create a grave with the 'disturbed'
flag set, similar to existing "magic fountain" and 'blessedftn' flag.
(I didn't add "looted throne", "looted tree", and several other things
that use the 'looted' overload of 'rm.flags'.)

Automate block_point (tree, cloud, secret corridor, or secret door in
open doorway) and add unblock_point (use Pass_wall to move into wall
or tree or stone, or just walk onto a cloud, then make iron bars or
almost any other wishable terrain to replace the blocking feature).
2020-01-26 12:23:50 -08:00
PatR
4505a8dc4c left out of "limit rate of long worm growth" 2020-01-26 05:12:55 -08:00
PatR
9b2c9e79d8 limit rate of long worm growth
Make long worms grow more slowly (although that didn't seem to make
as much a difference as expected) and limit the amount of HP they
acculate if they shrink and then re-expand.  Shrinking doesn't take
away max HP but growing used to always add to max.  Now it won't add
to max HP unless the number of segments is at that worm's peak, so
shrinking will inhibit the exhorbitant HP expansion that idle worms
have had.
2020-01-26 04:57:13 -08:00
Pasi Kallinen
aa7f098af1 Cloud wish should block vision 2020-01-26 14:33:11 +02:00
Pasi Kallinen
ae843bc10a Allow wizmode wishing for cloud terrain 2020-01-26 14:05:11 +02:00
PatR
206e9668f1 achievement tracking oversight
obj->record_achieve_special (overlay of obj->corpsenm) is no longer
used.
2020-01-26 02:58:18 -08:00
PatR
b0b25db4f0 worm.c cleanup
Mostly removing 'register', but also clear stale wgrowtime[] values
at the time they become obsolete instead of waiting for initworm()
to replace them when eventually re-used.
2020-01-25 14:12:10 -08:00
PatR
a453215a06 disclose achievements
When disclosing conduct at end of game (but not during except in
wizard mode), display achievements too.  They're also included in
dumplog if it's enabled.  Previously they were only output as an
extra field in xlogfile.
2020-01-24 17:00:49 -08:00
PatR
0166239a22 simplify achievement tracking for special objects
This turned out to be a lot more work than I anticipated, but it is
definitely simpler (other than having #wizmakemap take achievements
away if you replace the level that contains the 'prize', which wasn't
handled before).

I cheated and made Mine's End into a no-bones level because the new
flagging scheme for luckstone, bag, and amulet can't carry over from
one game to another.  It probably should have been no-bones all along.
Sokoban didn't have this issue because it's already no-bones.

Existing save files are invalidated.
2020-01-24 13:54:23 -08:00
PatR
dba6c20e2d loading Lua scripts
When loading a Lua script, modify it with a comment containing the
file name (or DLB module name) so that error reporting doesn't just
show the first 60 bytes of the script.  Also, don't assume that it's
possible to load an entire script in one fread().  Unfortunately
that got way out of hand and the result isn't pretty.  But something
of the sort is necessary.  (Reading the script into one string first
and then applying modifications while copying it into a second one
would probably be a lot cleaner than mixing the two operations.)

If a script starts with a comment or a blank line, the insertion of
the file name comment won't disturb the line number reported in an
error message.  But if the script starts out with code on its first
line, error reports will be off by one for the line number.  Showing
the file name is more useful than keeping that number accurate.
2020-01-24 13:26:01 -08:00
PatR
b2fa6292db Lua error reporting buffer overflow
nhl_error() was clobbering the stack.  I assume that the 'source'
field in the Lua debugging structure is normally a file name, but
nethack loads an entire Lua script into one long string because it
usually comes out of the DLB container, and 'source' contained the
full string.  That would overflow the local buffer in nhl_error()
if nethack encountered a Lua problem and tried to report it. (In
my case, the problem was in a level description file modification.)

[Not something under user control unless user can modify dat/*.lua
and put the result into $HACKDIR/nhdat.]
2020-01-24 12:52:35 -08:00
PatR
424750867a wizard mode un-polymorph
When already polymorphed, polymorphing into 'human' (or character's
species) to revert to normal when at low level has the infuriating
tendency to yield "your new form isn't healthy enough to survive".
Allow specifying your own role as a way to rehumanize() instead of
going through newman() and level/sex/characteristics randomization
which that performs.
2020-01-21 18:29:23 -08:00
PatR
3e18804371 half poison gas damage from wearing a wet towel
Make wearing a wet towel confer new attribute Half_gas_damage in
addition to the usual blindness.  It reduces damage from being inside
a gas cloud region and from being hit by poison gas breath attack.
It also fully blocks breathing of potion vapors.

Might make the Plane of Fire easier although overcoming its blindness
with telepathy won't reveal elementals.  Definitely has the potential
to make blind-from-birth conduct easier which wasn't the intent and
probably isn't significant.
2020-01-21 17:03:54 -08:00
PatR
a13d6c03c9 no more headless eyewear
Noticed while working on something else:  hero kept wearing a towel
after polymorphing into a form without any head.  And when not already
wearing one, could put on a blindfold/towel/lenses while in a headless
form.
2020-01-21 15:36:33 -08:00
PatR
fa890fc7a2 wielded tin opener
For simplified weapon description (used by ^X and a few other places),
show "tin opener" instead of generic "tool" for that item since there
are cases where it is expected to be wielded.

Also, don't describe a wielded "glob of <foo>" as "food".
2020-01-21 15:11:59 -08:00
PatR
08775c2c78 add some long worm comments
and keep the remove_monster()+place_monster() followed by worm_move()
operations together.  No change in behavior.
2020-01-21 06:20:45 -08:00
nhmall
57e0e30d10 travis-ci bits: try to avoid failure-flagging on transient connectivity issues
Attempt to test whether Lua fetch succeeded (and pdcurses for windows
and msdos as well)

If those prerequisite fetches and untars didn't work, just exit without
marking the travis-ci build as a failure so that the development team
isn't notified about something transient that they don't need to fix
in the code.
2020-01-20 11:10:16 -05:00
nhw_cron
b444698005 This is cron-daily v1-Jan-19-2020. manpages updated: nethack.txt 2020-01-20 08:52:59 -05:00
nhmall
8061291c36 Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7 2020-01-19 23:11:31 -05:00
nhmall
5175c6ab07 doc bit; closes #287
closes #287
2020-01-19 23:09:53 -05:00
Pasi Kallinen
2ba3fa9240 Fix warning on nonexistent quest.lua text
Cavemen don't have goal_alt message - before lua, that one
fell through into goal_next message, but now it tried to
load the "common" message. Add ability to define message fallbacks,
and make goal_next the fallback for goal_alt.

Also prevent issuing quest.lua errors twice.
2020-01-19 14:09:16 +02:00
PatR
3f0b9f26c5 losing via #offer to Moloch
Recently added "you hear an invisible choir chant in Latin ..."  is
jarring.  Unfortunately, something like "in an archaic language" would
make the message too long so just take out "in Latin".

Also a few reformatting bits for pray.c.
2020-01-18 18:47:01 -08:00
PatR
d19cab4d98 implicit_uncursed, mention_walls
Move 'implicit_uncursed' and 'mention_walls' from iflags to flags to
make their current setting persist across save/restore.  Invalidates
existing save files.
2020-01-17 04:03:14 -08:00
PatR
1a89e44e19 fix #K188 - trying to move past edge of level
Trying to move into a wall or solid rock fails and doesn't do anything
(unless the 'mention_walls' option is On) and doesn't use a turn, and
trying to move off the edge of the map window also doesn't do anything
(except for 'mention_walls') but that did use a turn.  Don't.
2020-01-17 02:43:32 -08:00
nhmall
fe4bdae740 closes #282
closes #282
2020-01-14 23:50:06 -05:00
nhw_cron
2f52fd3db3 This is cron-daily v1-Jan-14-2020. files updated: Files 2020-01-14 12:03:09 -05:00
nhw_cron
2e570e03e9 This is cron-daily v1-Jan-14-2020. manpages updated: recover.txt 2020-01-14 12:02:57 -05:00
nhw_cron
0415a5a235 This is cron-daily v1-Jan-14-2020. manpages updated: nethack.txt 2020-01-14 12:02:39 -05:00
nhw_cron
6a768b0cbe This is cron-daily v1-Jan-14-2020. manpages updated: mnh.txt 2020-01-14 12:02:26 -05:00
nhw_cron
32c7279e63 This is cron-daily v1-Jan-14-2020. manpages updated: mn.txt 2020-01-14 12:02:10 -05:00
nhw_cron
f431c72873 This is cron-daily v1-Jan-14-2020. manpages updated: makedefs.txt 2020-01-14 12:01:52 -05:00
nhw_cron
bd254e0853 This is cron-daily v1-Jan-14-2020. manpages updated: dlb.txt 2020-01-14 12:01:30 -05:00
PatR
2b1f8a1b43 fix #K166 - role selection filtering
pick_role() had a 5 year old copy+paste error where a pair of lines
were cloned multiple times but one of the resulting lines didn't get
the intended revision, preventing OPTIONS=align:!chaotic or !neutral
or !lawful from working as intended when letting the game choose role
randomly.  The bad line should have been calling ok_align() but that
routine turned out to have a bug too.

Fixing those lead to other less obvious problems with role selection,
particularly the tty menu version for picking manually.  Roles and/or
races which should have been excluded by partial specification weren't
always kept out.  Also, if any filtering was specified, trying to
disable all filters (via choosing 'reset filtering' and de-selecting
everything in the menu) was a no-op.  Once any filtering was in place
you had to leave at least one role or race or gender or alignment
flagged as not acceptable in order to change any of the filtering.
When that was fixed and it was possible to turn off all filtering,
there was no way to turn it back on because the menu choice to reset
the filters wasn't offered unless there was some filtering in place
(that was intentional but turned out not to be a good idea).

I checked curses and X11; they both offer less versatile selection
capability that don't seem to need the tty-specific fixes.
2020-01-13 12:34:01 -08:00
PatR
c2060f9e8c more giant walking onto boulder feedback
autopick_testobj() needs to bypassed during move-without-pickup as
well as when autopicked is disabled.  I hope this is finally right.
2020-01-13 03:46:51 -08:00
PatR
4b7e9d67d3 rnd_class()
Guard against potential bad arguments:  first index greaer than last.
Return STRANGE_OBJECT instead of hardcoded 0 if it ever fails (which
should be impossible with good arguments).
2020-01-12 22:16:49 -08:00