Commit Graph

8548 Commits

Author SHA1 Message Date
Bart House
e83fcd0353 Revert "Improved readability of topline state management."
This reverts commit 08a1910867.
2019-07-14 21:28:40 -07:00
Bart House
05d77d91b8 Revert "Moved declaration of topline state to wintty.h."
This reverts commit 7bb41c797f.
2019-07-14 21:28:03 -07:00
Bart House
733e760638 Revert "Remove the remapping of snprintf to _snprintf when compiling with MSC."
This reverts commit 9801635f56.
2019-07-14 21:18:03 -07:00
Bart House
44d84c3163 Revert "Modified nhassert_failed to call impossoible."
This reverts commit 3e4a0759a3.
2019-07-14 21:17:39 -07:00
Bart House
a598428fc9 Revert "Fixed bug with inmore and toplin state management."
This reverts commit 0f57f0e48c.
2019-07-14 21:17:19 -07:00
Bart House
988d474d42 Revert "Added assertions to check toplin state."
This reverts commit 1db45c8016.
2019-07-14 21:16:59 -07:00
Bart House
04f4ac94ca Revert "Comment out nhassert() calls."
This reverts commit 45a9c5eb14.
2019-07-14 21:16:27 -07:00
Bart House
fe9fc4cac1 Revert "Added nhassert to core."
This reverts commit 0ca299acb3.
2019-07-14 21:15:54 -07:00
Bart House
a90f9d4365 Revert "Fixed sign/unsigned comparisions."
This reverts commit 0e8e5aac93.
2019-07-14 21:15:31 -07:00
Bart House
177bd39646 Revert "Tweaks to nhassert implementation. Change to warnings on MSC build."
This reverts commit 2f3da35c68.
2019-07-14 21:15:01 -07:00
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