Commit Graph

8538 Commits

Author SHA1 Message Date
Bart House
ec05e1ec70 Revert "Fix compiler warnings."
This reverts commit 90f5aa91b7.
2019-07-14 21:13:43 -07:00
Bart House
2df1b179ca Revert "Removing assertion that does not hold under all scenarios."
This reverts commit c44ad5645d.
2019-07-14 21:13:18 -07:00
Bart House
f7c956c35a Revert "Adding ptr_array data structure."
This reverts commit e665d3b850.
2019-07-14 21:12:59 -07:00
Bart House
1c5b28e7f9 Revert "Re-worked tty_putmsgistory and tty_getmsghistory."
This reverts commit 1d0b8b4680.
2019-07-14 21:12:21 -07:00
Bart House
9bc190d2fc Revert "Add stopping in the debugger when nhassert() is hit in the windows port."
This reverts commit 5d2872dd4f.
2019-07-14 21:11:41 -07:00
Bart House
454419e6c1 Revert "Removed the older version of tty_putmsghistory and tty_getmsghistory."
This reverts commit aa95e20ca7.
2019-07-14 21:10:51 -07:00
Bart House
4c1c247028 Revert "Fuzzer improvements."
This reverts commit 435f1c4626.
2019-07-14 21:10:39 -07:00
Bart House
5d2181ced3 Revert "Fix build issue on linux."
This reverts commit d33160d069.
2019-07-14 21:10:27 -07:00
Bart House
0f0b6c5aab Revert "Tweaks to fuzzer scripts."
This reverts commit cd375064dd.
2019-07-14 21:10:07 -07:00
Bart House
3adaa79858 Revert "Revert type change of lit which would break code."
This reverts commit cc1219b5a8.
2019-07-14 21:09:38 -07:00
Bart House
a66fed3d5a Revert "Move fuzzer_start, fuzzer_stop and fuzzer_log to pline.c"
This reverts commit d9da488c35.
2019-07-14 21:09:29 -07:00
Bart House
340ec01caf Revert "Remove dead code."
This reverts commit 5428d73287.
2019-07-14 21:09:16 -07:00
Bart House
a4317b738a Revert "Fix typo in formatting string."
This reverts commit fa5c499268.
2019-07-14 21:09:07 -07:00
Bart House
fa5c499268 Fix typo in formatting string. 2019-07-14 14:31:30 -07:00
Bart House
5428d73287 Remove dead code. 2019-07-14 14:31:00 -07:00
Bart House
d9da488c35 Move fuzzer_start, fuzzer_stop and fuzzer_log to pline.c 2019-07-14 14:30:38 -07:00
Bart House
cc1219b5a8 Revert type change of lit which would break code.
Cast lit (which will be 1) to unsigned int to remove warning.
2019-07-14 14:02:05 -07:00
Bart House
cd375064dd Tweaks to fuzzer scripts. 2019-07-14 12:13:19 -07:00
Bart House
d33160d069 Fix build issue on linux. 2019-07-14 02:00:21 -07:00
Bart House
435f1c4626 Fuzzer improvements.
phase_of_moon and friday_13th determined using rn2() instead of local
time if fuzzing.  Don't reseed using init_random() if fuzzing.  Allow
set_random to be called outside of hacklib.  rn2_on_display_rng uses
rn2 if fuzzing so that we have a single source of random that we can
ensure is reproducible.  Implement rul() that returns a random unsigned
long.  Fix bug in fuzzer handling of ntposkey which would cause us to use
unitialized values for x and y.  Added command line arguments to allow
auto starting and stopping of fuzzer.  Add a logging facility for the
fuzzer to use to record activity.  Added some scripts used to automate
fuzzer testing on windows.
2019-07-14 00:20:09 -07:00
Bart House
aa95e20ca7 Removed the older version of tty_putmsghistory and tty_getmsghistory. 2019-07-13 16:23:37 -07:00
Bart House
5d2872dd4f Add stopping in the debugger when nhassert() is hit in the windows port.
When stopping in the debugger after having called impossible, the windowing
state will have been modified since the assertion was hit.  This made
examining state that caused the nhassert to fire no longer possible.
To avoid this issue, we now detect the debugger and stop in the debugger
prior to impossible.
2019-07-13 16:08:47 -07:00
Bart House
1d0b8b4680 Re-worked tty_putmsgistory and tty_getmsghistory.
When we were saving message history as part of a game save for insurance,
we were calling remember_topl() and thus inappropriately changing topline
state.  This would cause us to mis-manage the topline in subsequent calls
to update the topline.

The code has been re-worked to fix the issue, reduce complexity and make
the code clearer.
2019-07-13 16:08:27 -07:00
Bart House
e665d3b850 Adding ptr_array data structure. 2019-07-13 16:08:08 -07:00
Bart House
c44ad5645d Removing assertion that does not hold under all scenarios.
When we save gamestate as part of making an insurance snapshot, we will
save message history which will clear toplines but leaving window state
in tack including the need for more.
2019-07-13 10:53:53 -07:00
Bart House
90f5aa91b7 Fix compiler warnings. 2019-07-13 09:53:42 -07:00
nhmall
64cc11d9b4 makedefs doesn't use STATIC_OVL macro 2019-07-13 00:28:51 -04:00
nhmall
638d9f9363 if prototype is declared static make function static to match
Today, a compiler was encountered that considered it an error
to have the prototype declared static and the function body
not
2019-07-13 00:17:23 -04:00
Bart House
2f3da35c68 Tweaks to nhassert implementation. Change to warnings on MSC build. 2019-07-12 18:40:34 -07:00
Bart House
0e8e5aac93 Fixed sign/unsigned comparisions. 2019-07-12 18:37:33 -07:00
Bart House
0ca299acb3 Added nhassert to core. 2019-07-11 22:01:39 -07:00
Bart House
45a9c5eb14 Comment out nhassert() calls. 2019-07-11 21:23:12 -07:00
Bart House
1db45c8016 Added assertions to check toplin state. 2019-07-11 21:18:57 -07:00
Bart House
0f57f0e48c Fixed bug with inmore and toplin state management.
When fuzzing, we would increment ttyDisplay->inmore but then prematurely
exit more() leaving ttyDisplay->inmore set.

Under various conditions, we can request to remember the topline when
the topline had not yet been acknowledged leaving toplin state in an
inappropriate state.
2019-07-11 21:17:46 -07:00
Bart House
3e4a0759a3 Modified nhassert_failed to call impossoible. 2019-07-11 21:13:02 -07:00
Bart House
9801635f56 Remove the remapping of snprintf to _snprintf when compiling with MSC.
_snprintf and snprintf have one very important semantic difference.
_snprintf does NOT add terminating null character when the buffer limit
is reached while snprintf guarantees a terminating null character.  It
was a mistake to make this naming change hiding the fact that the
semantics don't match what the developer might expect.
2019-07-11 21:11:43 -07:00
Bart House
7bb41c797f Moved declaration of topline state to wintty.h. 2019-07-11 16:34:25 -07:00
PatR
524f5642d5 poly'd hero theft fix
I moved some stuff around after testing the changes in
58583cacf8 before committing it.  It
accidentally ended up with 'gold' always being Null at the first
place it gets used (to vary the feedback when stealing everything
except gold).
2019-07-11 13:29:33 -07:00
PatR
bfbe4e71ce make #panic honor paranoid_confirmatin:quit
If 'paranoid_confirmation:quit' is set, require "yes" instead of 'y'
to execute the wizard mode #panic command.
2019-07-11 02:54:02 -07:00
PatR
188eedc654 curses: #extended command vs erase/kill chars
Support erase char and kill char when getting an extended command.

Also, show the cursor so that it's obvious where input focus is.
2019-07-11 01:02:34 -07:00
Bart House
08a1910867 Improved readability of topline state management. 2019-07-10 22:16:08 -07:00
PatR
58583cacf8 hero-as-nymph: steal items vs steal gold
Nymphs won't steal gold from the hero (so that their steal-item damage
isn't a superset of lerprechaun's steal-gold damage; straightforward
back when gold wasn't kept in inventory), but hero poly'd into a nymph
would steal gold from monsters.
2019-07-10 17:56:33 -07:00
PatR
094a9d8161 fix github issue #204 - theft while in nymph form
Fixes #204

3.6.2's attempts to fix turning off SEDUCE in 'sysconf' introduced
an unintentional change in behavior for hero poly'd into nymph form:
theft attack always angered the target.  The actual change was
intentional but its ramifications were unexpected.
2019-07-10 16:15:11 -07:00
Bart House
bc65112ce0 Added experimental feature NEW_KEYBOARD_HIT. 2019-07-09 22:30:34 -07:00
PatR
0e8163e341 curses: ncurses vs Ctrl+Click
Asking curses to report whether the Ctrl key was being pressed during
a mouse click was sending mouse position reports--even those aren't
being requested--and actual Ctrl+Left_click was reporting a pair of
duplicate Ctrl+Mouse_position_report events when a click was actually
performed.  So turn off Ctrl key reporting.

Mac with one-button mouse can be configured to send "secondary click"
for Ctrl+Click.  A laptop trackpad handles that differently (press the
button while two fingers are on the touchpad to send secondary click)
and doesn't support Ctrl+Click as an alternate way to do that.  If this
would work within curses then they could operate the same regardless
of how the user set the mouse or trackpad configuraiton.  But I wasn't
able to make it work right.
2019-07-09 18:55:10 -07:00
PatR
9eefeef5d2 fix github issue #200 - docs for 'strange object'
Fixes #200

The Guidebook claims that there's no symbol for 'S_strange_object'
which is literally true, but there is one for S_strange_obj.  It has
been in place longer than the paragraph claiming that there's no way
to customize that symbol.  I'm not sure why variant spelling was used.

Also, files.c doesn't use loadsyms[], it calls a routine which returns
a pointer to a specific element in that array.
2019-07-09 17:42:32 -07:00
PatR
77aa61a59b looking at a trapped monster
would describe it as trapped if you could see its location, but if
the trap was unseen that trap would remain unseen, at least in some
circumstances.  Mark the trap as seen.
2019-07-08 17:38:00 -07:00
PatR
cfca15d02c finding hidden monsters
Wizard mode ^E and any mode spell of detect unseen or wand of secret
door detection failed to find mon->mundetected monsters if they were
hiding under objects, and failed to find those or other hiders or
mimics when the hidden monster was at a trap location.  The fix for
the latter initially only worked if the trap was known, so took two
tries when a monster hid at the location of an unseen trap.  So this
makes the additional change to find both things at the same time; it
isn't manual searching that stops as soon as something is found.
2019-07-08 16:57:52 -07:00
PatR
ceb2d51426 ^X/disclosure of night, moon, Friday 13th
For ^X and final disclosure, report external issues that affect game
play:  midnight, other night, new or full moon, and Friday the 13th.

The 'new feature' entry in the fixes file rambles a bit but if it
heads off even one spurious bug report, it'll have been worth it.
2019-07-07 13:52:24 -07:00
PatR
bac3a75174 fix #H8164 - kicking altar: injury vs wrath
When kicking an altar, trigger divine wrath (minor: luck or alignment
loss) before deciding whether hero has hurt himself in the process.

Add some variation to the wrath penalty so that it can't be used to
precisely control Luck.
2019-07-06 18:14:30 -07:00