#include "util/string-processor.h"
#include "view/display-map.h"
#include "view/display-messages.h"
+#include "wizard/spoiler-util.h"
+#include "wizard/wizard-spoiler.h"
#include "world/world.h"
#ifdef WINDOWS
+#include "direct.h"
#include "dungeon/dungeon.h"
+#include "locale.h"
#include "save/save.h"
-#include <direct.h>
-#include <locale.h>
-#include <windows.h>
+#include "windows.h"
/*
* Available graphic modes
if (!*s)
return;
- strcat(savefile, s);
+ strcpy(savefile, s);
validate_file(savefile);
game_in_progress = TRUE;
play_game(player_ptr, FALSE, FALSE);
p_ptr->panic_save = 1;
signals_ignore_tstp();
(void)strcpy(p_ptr->died_from, _("(緊急セーブ)", "(panic save)"));
- (void)save_player(p_ptr, SAVE_TYPE_NORMAL);
+ (void)save_player(p_ptr, SAVE_TYPE_CLOSE_GAME);
quit(NULL);
return 0;
}
term_resize(td->cols, td->rows);
term_activate(old_term);
InvalidateRect(td->w, NULL, TRUE);
- p_ptr->window = 0xFFFFFFFF;
+ p_ptr->window_flags = 0xFFFFFFFF;
handle_stuff(p_ptr);
}
}
/*!
+ * @brief コマンドラインから全スポイラー出力を行う
+ * Create Spoiler files from Command Line
+ * @return spoiler_output_status
+ */
+static spoiler_output_status create_debug_spoiler(LPSTR cmd_line)
+{
+ char *s, *option;
+ s = cmd_line;
+ if (!*s)
+ return SPOILER_OUTPUT_CANCEL;
+ option = "--output-spoilers";
+
+ if (strncmp(s, option, strlen(option)) != 0)
+ return SPOILER_OUTPUT_CANCEL;
+
+ init_stuff();
+ init_angband(p_ptr, process_autopick_file_command, TRUE);
+
+ return output_all_spoilers();
+}
+
+/*!
* todo よく見るとhMutexはちゃんと使われていない……?
* @brief (Windows固有)変愚蛮怒が起動済かどうかのチェック
*/
return FALSE;
}
+ switch (create_debug_spoiler(lpCmdLine)) {
+ case SPOILER_OUTPUT_SUCCESS:
+ fprintf(stdout, "Successfully created a spoiler file.");
+ quit(NULL);
+ return 0;
+ case SPOILER_OUTPUT_FAIL_FOPEN:
+ fprintf(stderr, "Cannot create spoiler file.");
+ quit(NULL);
+ return 0;
+ case SPOILER_OUTPUT_FAIL_FCLOSE:
+ fprintf(stderr, "Cannot close spoiler file.");
+ quit(NULL);
+ return 0;
+ default:
+ break;
+ }
+
if (hPrevInst == NULL) {
wc.style = CS_CLASSDC;
wc.lpfnWndProc = AngbandWndProc;
signals_init();
term_activate(term_screen);
- init_angband(p_ptr, process_autopick_file_command);
+ init_angband(p_ptr, process_autopick_file_command, FALSE);
initialized = TRUE;
check_for_save_file(p_ptr, lpCmdLine);
prt(_("[ファイル] メニューの [新規] または [開く] を選択してください。", "[Choose 'New' or 'Open' from the 'File' menu]"), 23, _(8, 17));