Merge branch 'master' into NetHack-3.7
This commit is contained in:
@@ -475,8 +475,15 @@ int *x, *y, *mod;
|
||||
coord cc;
|
||||
DWORD count;
|
||||
really_move_cursor();
|
||||
if (iflags.debug_fuzzer)
|
||||
return randomkey();
|
||||
if (iflags.debug_fuzzer) {
|
||||
int poskey = randomkey();
|
||||
|
||||
if (poskey == 0) {
|
||||
*x = rn2(console.width);
|
||||
*y = rn2(console.height);
|
||||
}
|
||||
return poskey;
|
||||
}
|
||||
ch = (g.program_state.done_hup)
|
||||
? '\033'
|
||||
: keyboard_handler.pCheckInput(
|
||||
|
||||
@@ -337,7 +337,7 @@ attempt_restore:
|
||||
resuming = TRUE; /* not starting new game */
|
||||
if (discover)
|
||||
You("are in non-scoring discovery mode.");
|
||||
if (discover || wizard) {
|
||||
if ((discover || wizard) && !iflags.fuzzer_auto_start) {
|
||||
if (yn("Do you want to keep the save file?") == 'n')
|
||||
(void) delete_savefile();
|
||||
else {
|
||||
@@ -462,6 +462,23 @@ char *argv[];
|
||||
case 'X':
|
||||
discover = TRUE, wizard = FALSE;
|
||||
break;
|
||||
case 'F':
|
||||
{
|
||||
iflags.fuzzer_auto_start = 1;
|
||||
|
||||
if (argc > 1 && argv[1][0] != '-') {
|
||||
argc--;
|
||||
argv++;
|
||||
iflags.fuzzer_stop_and_save = atoi(*argv);
|
||||
|
||||
if (argc > 1 && argv[1][0] != '-') {
|
||||
argc--;
|
||||
argv++;
|
||||
iflags.verbose_logging_start = atoi(*argv);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
#ifdef NEWS
|
||||
case 'n':
|
||||
iflags.news = FALSE;
|
||||
|
||||
@@ -720,9 +720,19 @@ nt_assert_failed(expression, filepath, line)
|
||||
{
|
||||
const char * filename;
|
||||
|
||||
/* get file name from path */
|
||||
filename = strrchr(filepath, '\\');
|
||||
filename = (filename == NULL ? filepath : filename + 1);
|
||||
|
||||
if (IsDebuggerPresent()) {
|
||||
char message[BUFSIZ];
|
||||
snprintf(message, sizeof(message),
|
||||
"nhassert(%s) failed in file '%s' at line %d",
|
||||
expression, filename, line);
|
||||
OutputDebugStringA(message);
|
||||
DebugBreak();
|
||||
}
|
||||
|
||||
/* get file name from path */
|
||||
impossible("nhassert(%s) failed in file '%s' at line %d",
|
||||
expression, filename, line);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user