From 9a44855a30a336d0a1900a21ddf15fbbbe05407d Mon Sep 17 00:00:00 2001 From: Deskull Date: Wed, 28 Nov 2018 21:52:50 +0900 Subject: [PATCH] =?utf8?q?[Refactor]=20#37353=20=E3=82=B3=E3=83=A1?= =?utf8?q?=E3=83=B3=E3=83=88=E6=95=B4=E7=90=86=20/=20Refactor=20comments.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/externs.h | 8 ++-- src/monster2.c | 5 --- src/variable.c | 139 +++++++++------------------------------------------------ 3 files changed, 26 insertions(+), 126 deletions(-) diff --git a/src/externs.h b/src/externs.h index 69b8c5238..da08f8f27 100644 --- a/src/externs.h +++ b/src/externs.h @@ -258,10 +258,10 @@ extern u32b message__head; extern u32b message__tail; extern u32b *message__ptr; extern char *message__buf; -extern u32b option_flag[8]; -extern u32b option_mask[8]; -extern u32b window_flag[8]; -extern u32b window_mask[8]; +extern BIT_FLAGS option_flag[8]; +extern BIT_FLAGS option_mask[8]; +extern BIT_FLAGS window_flag[8]; +extern BIT_FLAGS window_mask[8]; extern term *angband_term[8]; extern const char angband_term_name[8][16]; extern byte angband_color_table[256][4]; diff --git a/src/monster2.c b/src/monster2.c index b4b3c739f..bd9126f19 100644 --- a/src/monster2.c +++ b/src/monster2.c @@ -470,12 +470,10 @@ void compact_monsters(int size) if (record_named_pet && is_pet(m_ptr) && m_ptr->nickname) { char m_name[80]; - monster_desc(m_name, m_ptr, MD_INDEF_VISIBLE); do_cmd_write_nikki(NIKKI_NAMED_PET, RECORD_NAMED_PET_COMPACT, m_name); } - delete_monster_idx(i); /* Count the monster */ @@ -589,7 +587,6 @@ MONSTER_IDX m_pop(void) { MONSTER_IDX i; - /* Normal allocation */ if (m_max < max_m_idx) { @@ -606,7 +603,6 @@ MONSTER_IDX m_pop(void) return (i); } - /* Recycle dead monsters */ for (i = 1; i < m_max; i++) { @@ -625,7 +621,6 @@ MONSTER_IDX m_pop(void) return (i); } - /* Warn the player (except during dungeon creation) */ if (character_dungeon) msg_print(_("モンスターが多すぎる!", "Too many monsters!")); diff --git a/src/variable.c b/src/variable.c index c217af093..5bd2d3241 100644 --- a/src/variable.c +++ b/src/variable.c @@ -97,9 +97,7 @@ u32b seed_town; /* Hack -- consistent town layout */ s16b command_cmd; /* Current "Angband Command" */ COMMAND_ARG command_arg; /*!< 各種コマンドの汎用的な引数として扱う / Gives argument of current command */ - COMMAND_NUM command_rep; /*!< 各種コマンドの汎用的なリピート数として扱う / Gives repetition of current command */ - DIRECTION command_dir; /*!< 各種コマンドの汎用的な方向値処理として扱う/ Gives direction of current command */ s16b command_see; /* See "object1.c" */ @@ -325,27 +323,16 @@ u32b *message__ptr; */ char *message__buf; - -/* - * The array of normal options - */ -u32b option_flag[8]; -u32b option_mask[8]; - - -/* - * The array of window options - */ -u32b window_flag[8]; -u32b window_mask[8]; - +BIT_FLAGS option_flag[8]; //!< The array of normal options +BIT_FLAGS option_mask[8]; //!< The array of normal options +BIT_FLAGS window_flag[8]; //!< The array of window options +BIT_FLAGS window_mask[8]; //!< The array of window options /* * The array of window pointers */ term *angband_term[8]; - /* * Standard window names */ @@ -687,112 +674,30 @@ char *d_name; char *d_text; -/* - * Hack -- The special Angband "System Suffix" - * This variable is used to choose an appropriate "pref-xxx" file - */ -cptr ANGBAND_SYS = "xxx"; +cptr ANGBAND_SYS = "xxx"; //!< Hack -- The special Angband "System Suffix" This variable is used to choose an appropriate "pref-xxx" file + -/* - * Hack -- The special Angband "Keyboard Suffix" - * This variable is used to choose an appropriate macro-trigger definition - */ #ifdef JP -cptr ANGBAND_KEYBOARD = "JAPAN"; +cptr ANGBAND_KEYBOARD = "JAPAN"; //!< Hack -- The special Angband "Keyboard Suffix" This variable is used to choose an appropriate macro-trigger definition #else cptr ANGBAND_KEYBOARD = "0"; #endif -/* - * Hack -- The special Angband "Graphics Suffix" - * This variable is used to choose an appropriate "graf-xxx" file - */ -cptr ANGBAND_GRAF = "ascii"; - -/* - * Path name: The main "lib" directory - * This variable is not actually used anywhere in the code - */ -cptr ANGBAND_DIR; - -/* - * High score files (binary) - * These files may be portable between platforms - */ -cptr ANGBAND_DIR_APEX; - -/* - * Bone files for player ghosts (ascii) - * These files are portable between platforms - */ -cptr ANGBAND_DIR_BONE; - -/* - * Binary image files for the "*_info" arrays (binary) - * These files are not portable between platforms - */ -cptr ANGBAND_DIR_DATA; - -/* - * Textual template files for the "*_info" arrays (ascii) - * These files are portable between platforms - */ -cptr ANGBAND_DIR_EDIT; - -/* - * Script files - * These files are portable between platforms. - */ -cptr ANGBAND_DIR_SCRIPT; - -/* - * Various extra files (ascii) - * These files may be portable between platforms - */ -cptr ANGBAND_DIR_FILE; - -/* - * Help files (normal) for the online help (ascii) - * These files are portable between platforms - */ -cptr ANGBAND_DIR_HELP; - -/* - * Help files (spoilers) for the online help (ascii) - * These files are portable between platforms - */ -cptr ANGBAND_DIR_INFO; - -/* - * Default user "preference" files (ascii) - * These files are rarely portable between platforms - */ -cptr ANGBAND_DIR_PREF; - -/* - * Savefiles for current characters (binary) - * These files are portable between platforms - */ -cptr ANGBAND_DIR_SAVE; - -/* - * User "preference" files (ascii) - * These files are rarely portable between platforms - */ -cptr ANGBAND_DIR_USER; - -/* - * Various extra files (binary) - * These files are rarely portable between platforms - */ -cptr ANGBAND_DIR_XTRA; - - -/* - * Total Hack -- allow all items to be listed (even empty ones) - * This is only used by "do_cmd_inven_e()" and is cleared there. - */ -bool item_tester_full; +cptr ANGBAND_GRAF = "ascii"; //!< Hack -- The special Angband "Graphics Suffix" This variable is used to choose an appropriate "graf-xxx" file +cptr ANGBAND_DIR; //!< Path name: The main "lib" directory This variable is not actually used anywhere in the code +cptr ANGBAND_DIR_APEX; //!< High score files (binary) These files may be portable between platforms +cptr ANGBAND_DIR_BONE; //!< Bone files for player ghosts (ascii) These files are portable between platforms +cptr ANGBAND_DIR_DATA; //!< Binary image files for the "*_info" arrays (binary) These files are not portable between platforms +cptr ANGBAND_DIR_EDIT; //!< Textual template files for the "*_info" arrays (ascii) These files are portable between platforms +cptr ANGBAND_DIR_SCRIPT; //!< Script files These files are portable between platforms. +cptr ANGBAND_DIR_FILE; //!< Various extra files (ascii) These files may be portable between platforms +cptr ANGBAND_DIR_HELP; //!< Help files (normal) for the online help (ascii) These files are portable between platforms +cptr ANGBAND_DIR_INFO; //!< Help files (spoilers) for the online help (ascii) These files are portable between platforms +cptr ANGBAND_DIR_PREF; //!< Default user "preference" files (ascii) These files are rarely portable between platforms +cptr ANGBAND_DIR_SAVE; //!< Savefiles for current characters (binary) +cptr ANGBAND_DIR_USER; //!< User "preference" files (ascii) These files are rarely portable between platforms +cptr ANGBAND_DIR_XTRA; //!< Various extra files (binary) These files are rarely portable between platforms +bool item_tester_full; //!< Total Hack -- allow all items to be listed (even empty ones) This is only used by "do_cmd_inven_e()" and is cleared there. bool item_tester_no_ryoute = FALSE; -- 2.11.0