OSDN Git Service

[Refactor] #37353 BORG関係のプリプロを削除 / Removed ALLOW_BORG and related preprocessors
authorHourier <hourier@users.sourceforge.jp>
Sat, 25 Jan 2020 16:32:28 +0000 (01:32 +0900)
committerHourier <hourier@users.sourceforge.jp>
Sat, 25 Jan 2020 16:32:28 +0000 (01:32 +0900)
src/cmd/cmd-gameoption.c
src/core.c
src/h-config.h
src/init.c
src/player-status.h
src/scores.c
src/term.c
src/util.c

index 73344bc..4d30869 100644 (file)
@@ -1344,8 +1344,7 @@ void do_cmd_options(void)
                        p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_SPELL |
                                PW_PLAYER | PW_MESSAGE | PW_OVERHEAD |
                                PW_MONSTER | PW_OBJECT | PW_SNAPSHOT |
-                               PW_BORG_1 | PW_BORG_2 | PW_DUNGEON |
-                               PW_MONSTER_LIST);
+                               PW_DUNGEON | PW_MONSTER_LIST);
                        break;
                }
 
index fce354e..472656d 100644 (file)
@@ -3452,47 +3452,6 @@ static bool enter_debug_mode(player_type *player_ptr)
  */
 extern void do_cmd_debug(player_type *creature_ptr);
 
-#ifdef ALLOW_BORG
-
-/*!
- * @brief ボーグコマンドへの導入処理
- * / Verify use of "borg" commands
- * @return 実際にボーグコマンドへ移行したらTRUEを返す。
- */
-static bool enter_borg_mode(void)
-{
-       /* Ask first time */
-       if (!(current_world_ptr->noscore & 0x0010))
-       {
-               /* Mention effects */
-               msg_print(_("ボーグ・コマンドはデバッグと実験のためのコマンドです。 ", "The borg commands are for debugging and experimenting."));
-               msg_print(_("ボーグ・コマンドを使うとスコアは記録されません。", "The game will not be scored if you use borg commands."));
-
-               msg_print(NULL);
-
-               /* Verify request */
-               if (!get_check(_("本当にボーグ・コマンドを使いますか? ", "Are you sure you want to use borg commands? ")))
-               {
-                       return FALSE;
-               }
-
-               exe_write_diary(p_ptr, NIKKI_BUNSHOU, 0, _("ボーグ・コマンドを使用してスコアを残せなくなった。", "give up recording score to use borg commands."));
-               /* Mark savefile */
-               current_world_ptr->noscore |= 0x0010;
-       }
-
-       /* Success */
-       return TRUE;
-}
-
-/*
- * Hack -- Declare the Ben Borg
- */
-extern void do_cmd_borg(void);
-
-#endif /* ALLOW_BORG */
-
-
 /*!
  * @brief プレイヤーから受けた入力コマンドの分岐処理。
  * / Parse and execute the current command Give "Warning" on illegal commands.
@@ -3559,24 +3518,7 @@ static void process_command(player_type *creature_ptr)
                break;
        }
 
-#ifdef ALLOW_BORG
-
-       /* Special "borg" commands */
-       case KTRL('Z'):
-       {
-               if (enter_borg_mode())
-               {
-                       if (!creature_ptr->wild_mode) do_cmd_borg();
-               }
-               break;
-       }
-
-#endif /* ALLOW_BORG */
-
-
-
        /*** Inventory Commands ***/
-
        /* Wear/wield equipment */
        case 'w':
        {
index 50d9d68..c767f9a 100644 (file)
 /* #define SCORE_WIZARDS */
 
 /*
- * Allow "Borgs" to yield "high scores"
- */
-/*#define SCORE_BORGS*/
-
-/*
  * Allow "Cheaters" to yield "high scores"
  */
 /* #define SCORE_CHEATERS */
index 248ce2d..65fec8e 100644 (file)
 #include "rooms-vault.h"
 #include "world.h"
 
+#ifdef CHECK_MODIFICATION_TIME
+#include <sys/types.h>
+#include <sys/stat.h>
+#endif /* CHECK_MODIFICATION_TIME */
+
 static void put_title(void);
 
 /*!
index 8dfc9a6..6d8f74c 100644 (file)
@@ -594,8 +594,6 @@ struct player_type
 #define PW_OBJECT       0x00000200L     /*!<サブウィンドウ描画フラグ: アイテムの知識 / Display object recall */
 #define PW_DUNGEON      0x00000400L     /*!<サブウィンドウ描画フラグ: ダンジョンの地形 / Display dungeon view */
 #define PW_SNAPSHOT     0x00000800L     /*!<サブウィンドウ描画フラグ: 記念写真 / Display snap-shot */
-#define PW_BORG_1       0x00004000L     /*!<サブウィンドウ描画フラグ: ボーグメッセージ / Display borg messages */
-#define PW_BORG_2       0x00008000L     /*!<サブウィンドウ描画フラグ: ボーグステータス / Display borg status */
 
        s16b stat_use[A_MAX];   /* Current modified stats */
        s16b stat_top[A_MAX];   /* Maximal modified stats */
index e44e4b8..971b71b 100644 (file)
@@ -915,16 +915,6 @@ bool check_score(player_type *current_player_ptr)
        }
 #endif
 
-#ifndef SCORE_BORGS
-       /* Borg-mode pre-empts scoring */
-       if (current_world_ptr->noscore & 0x00F0)
-       {
-               msg_print(_("ボーグ・モードではスコアが記録されません。", "Score not registered for borgs."));
-               msg_print(NULL);
-               return FALSE;
-       }
-#endif
-
 #ifndef SCORE_CHEATERS
        /* Cheaters are not scored */
        if (current_world_ptr->noscore & 0xFF00)
index 3cba10a..1bd651b 100644 (file)
@@ -122,8 +122,8 @@ const concptr window_flag_desc[32] =
        _("記念撮影", "Display snap-shot"),
        NULL,
        NULL,
-       _("ボーグ・メッセージ", "Display borg messages"),
-       _("ボーグ・ステータス", "Display borg status"),
+       NULL,
+       NULL,
        NULL,
        NULL,
        NULL,
index 9677350..97ff8db 100644 (file)
@@ -1997,7 +1997,6 @@ static void forget_macro_action(void)
        parse_macro = FALSE;
 }
 
-
 /*
  * Mega-Hack -- special "inkey_next" pointer.
  *
@@ -2008,21 +2007,6 @@ static void forget_macro_action(void)
  */
 static concptr inkey_next = NULL;
 
-
-#ifdef ALLOW_BORG
-
-/*
- * Mega-Hack -- special "inkey_hack" hook.
- *
- * This special function hook allows the "Borg" (see elsewhere) to take
- * control of the "inkey()" function, and substitute in fake keypresses.
- */
-char(*inkey_hack)(int flush_first) = NULL;
-
-#endif /* ALLOW_BORG */
-
-
-
 /*
  * Get a keypress from the user.
  *
@@ -2109,22 +2093,6 @@ char inkey(void)
        /* Forget pointer */
        inkey_next = NULL;
 
-
-#ifdef ALLOW_BORG
-
-       /* Mega-Hack -- Use the special hook */
-       if (inkey_hack && ((ch = (*inkey_hack)(inkey_xtra)) != 0))
-       {
-               /* Cancel the various "global parameters" */
-               inkey_base = inkey_xtra = inkey_flag = inkey_scan = FALSE;
-
-               /* Accept result */
-               return (ch);
-       }
-
-#endif /* ALLOW_BORG */
-
-
        /* Hack -- handle delayed "flush()" */
        if (inkey_xtra)
        {