OSDN Git Service

[Refactor] #39970 Moved dungeon*.c/h to dungeon/
[hengband/hengband.git] / src / main-win.c
index 1fd2615..43774ec 100644 (file)
 */
 
 #include "angband.h"
-#include "signal-handlers.h"
+#include "io/signal-handlers.h"
+#include "main/sound-definitions-table.h"
+#include "main/music-definitions-table.h"
 #include "util.h"
 #include "inet.h"
 #include "chuukei.h"
 
 #include "io/write-diary.h"
-#include "cmd/cmd-dump.h"
+#include "autopick/autopick-pref-processor.h"
+#include "cmd/cmd-process-screen.h"
 #include "cmd/cmd-save.h"
-#include "view-mainwindow.h"
+#include "view/display-main-window.h"
 #include "floor.h"
 #include "floor-events.h"
 #include "init.h"
 #include "quest.h"
 #include "files.h"
 #include "core.h"
-#include "world.h"
-#include "term.h"
+#include "core/angband-version.h"
+#include "core/stuff-handler.h"
+#include "core/special-internal-keys.h"
+#include "core/player-processor.h"
+#include "world/world.h"
+#include "gameterm.h"
 
 #ifdef WINDOWS
 #include <windows.h>
 #include <locale.h>
 #include "z-term.h"
 #include "save.h"
-#include "dungeon.h"
+#include "dungeon/dungeon.h"
 
 /*
  * Available graphic modes
 #define IDM_HELP_CONTENTS       901
 
 /*
- * Exclude parts of WINDOWS.H that are not needed
- */
-#define NOCOMM            /* Comm driver APIs and definitions */
-#define NOLOGERROR        /* LogError() and related definitions */
-#define NOPROFILER        /* Profiler APIs */
-#define NOLFILEIO         /* _l* file I/O routines */
-#define NOOPENFILE        /* OpenFile and related definitions */
-#define NORESOURCE        /* Resource management */
-#define NOATOM            /* Atom management */
-#define NOLANGUAGE        /* Character test routines */
-#define NOLSTRING         /* lstr* string management routines */
-#define NODBCS            /* Double-byte character set routines */
-#define NOKEYBOARDINFO    /* Keyboard driver routines */
-#define NOCOLOR           /* COLOR_* color values */
-#define NODRAWTEXT        /* DrawText() and related definitions */
-#define NOSCALABLEFONT    /* Truetype scalable font support */
-#define NOMETAFILE        /* Metafile support */
-#define NOSYSTEMPARAMSINFO /* SystemParametersInfo() and SPI_* definitions */
-#define NODEFERWINDOWPOS  /* DeferWindowPos and related definitions */
-#define NOKEYSTATES       /* MK_* message key state flags */
-#define NOWH              /* SetWindowsHook and related WH_* definitions */
-#define NOCLIPBOARD       /* Clipboard APIs and definitions */
-#define NOICONS           /* IDI_* icon IDs */
-#define NOMDI             /* MDI support */
-#define NOHELP            /* Help support */
-
-/* Not defined since it breaks Borland C++ 5.5 */
-/* #define NOCTLMGR */    /* Control management and controls */
-
-/*
  * Exclude parts of WINDOWS.H that are not needed (Win32)
  */
 #define WIN32_LEAN_AND_MEAN
 #define NONLS             /* All NLS defines and routines */
 #define NOSERVICE         /* All Service Controller routines, SERVICE_ equates, etc. */
-#define NOKANJI           /* Kanji support stuff. */
 #define NOMCX             /* Modem Configuration Extensions */
 
 /*
 #define MMNOJOY          /* Joystick support */
 #define MMNOMCI          /* MCI support */
 #define MMNOMMIO         /* Multimedia file I/O support */
-#define MMNOMMSYSTEM     /* General MMSYSTEM functions */
 
 #define INVALID_FILE_NAME (DWORD)0xFFFFFFFF
 #define MOUSE_SENS 40
 
 /*
- * Standard sound names
- */
-const concptr angband_sound_name[SOUND_MAX] =
-{
-       "dummy",
-       "hit",
-       "miss",
-       "flee",
-       "drop",
-       "kill",
-       "level",
-       "death",
-       "study",
-       "teleport",
-       "shoot",
-       "quaff",
-       "zap",
-       "walk",
-       "tpother",
-       "hitwall",
-       "eat",
-       "store1",
-       "store2",
-       "store3",
-       "store4",
-       "dig",
-       "opendoor",
-       "shutdoor",
-       "tplevel",
-       "scroll",
-       "buy",
-       "sell",
-       "warn",
-       "rocket",
-       "n_kill",
-       "u_kill",
-       "quest",
-       "heal",
-       "x_heal",
-       "bite",
-       "claw",
-       "m_spell",
-       "summon",
-       "breath",
-       "ball",
-       "m_heal",
-       "atkspell",
-       "evil",
-       "touch",
-       "sting",
-       "crush",
-       "slime",
-       "wail",
-       "winner",
-       "fire",
-       "acid",
-       "elec",
-       "cold",
-       "illegal",
-       "fail",
-       "wakeup",
-       "invuln",
-       "fall",
-       "pain",
-       "destitem",
-       "moan",
-       "show",
-       "unused",
-       "explode",
-       "glass",
-       "reflect",
-};
-
-/*
- * Standard music names
- */
-const concptr angband_music_basic_name[MUSIC_BASIC_MAX] =
-{
-       "default",
-       "gameover",
-       "exit",
-       "town",
-       "field1",
-       "field2",
-       "field3",
-       "dun_low",
-       "dun_med",
-       "dun_high",
-       "feel1",
-       "feel2",
-       "winner",
-       "build",
-       "wild",
-       "quest",
-       "arena",
-       "battle",
-       "quest_clear",
-       "final_quest_clear",
-       "ambush",
-};
-
-/*
  * Include some more files. Note: the Cygnus Cygwin compiler
  * doesn't use mmsystem.h instead it includes the winmm library
  * which performs a similar function.
@@ -1572,7 +1445,7 @@ static errr term_xtra_win_react(player_type *player_ptr)
                }
 
                use_graphics = arg_graphics;
-               reset_visuals(player_ptr);
+               reset_visuals(player_ptr, process_autopick_file_command);
        }
 
        for (int i = 0; i < MAX_TERM_DATA; i++)
@@ -3379,19 +3252,8 @@ LRESULT PASCAL AngbandWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam
        {
                if (!game_in_progress || !current_world_ptr->character_generated)
                {
-<<<<<<< HEAD
                        quit(NULL);
                        return 0;
-=======
-                       msg_flag = FALSE;
-                       if (p_ptr->chp < 0) p_ptr->is_dead = FALSE;
-                       exe_write_diary(p_ptr, DIARY_GAMESTART, 0, _("----ゲーム中断----", "--- Saved and Exited Game ---"));
-
-                       p_ptr->panic_save = 1;
-                       signals_ignore_tstp();
-                       (void)strcpy(p_ptr->died_from, _("(緊急セーブ)", "(panic save)"));
-                       (void)save_player(p_ptr);
->>>>>>> aed56f4e1a8c71b3fc97b2fa5265f3c13efc2da1
                }
 
                msg_flag = FALSE;
@@ -3996,7 +3858,7 @@ int PASCAL WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nC
 
        signals_init();
        Term_activate(term_screen);
-       init_angband(p_ptr);
+       init_angband(p_ptr, process_autopick_file_command);
        initialized = TRUE;
 #ifdef CHUUKEI
        if (lpCmdLine[0] == '-') {