OSDN Git Service

[feature] ソースファイルをC++に対応
[hengbandforosx/hengbandosx.git] / src / cmd-building / cmd-building.c
index d7fb7d5..f6f1cce 100644 (file)
 
 #include "cmd-building/cmd-building.h"
 #include "cmd-action/cmd-spell.h"
-#include "cmd-io/cmd-dump.h"
 #include "cmd-building/cmd-inn.h"
+#include "cmd-io/cmd-dump.h"
 #include "core/asking-player.h"
+#include "core/player-redraw-types.h"
+#include "core/player-update-types.h"
 #include "core/scores.h"
 #include "core/show-file.h"
 #include "core/special-internal-keys.h"
 #include "core/stuff-handler.h"
+#include "core/window-redrawer.h"
+#include "floor/cave.h"
+#include "floor/floor-mode-changer.h"
 #include "floor/floor-events.h"
-#include "floor/floor-save.h"
-#include "floor/floor.h"
 #include "floor/wild.h"
 #include "grid/feature.h"
 #include "grid/grid.h"
 #include "market/play-gamble.h"
 #include "market/poker.h"
 #include "monster-race/monster-race.h"
-#include "mutation/mutation.h"
-#include "object/object-flavor.h"
-#include "object/object-hook.h"
-#include "player/avatar.h"
+#include "mutation/mutation-flag-types.h"
+#include "mutation/mutation-investor-remover.h"
+#include "object-hook/hook-armor.h"
+#include "object-hook/hook-bow.h"
+#include "object-hook/hook-weapon.h"
+#include "object/item-tester-hooker.h"
+#include "player-info/avatar.h"
 #include "player/player-personalities-types.h"
 #include "player/player-status.h"
+#include "spell-kind/spells-perception.h"
+#include "spell-kind/spells-world.h"
 #include "spell/spells-status.h"
-#include "spell-kind/spells-teleport.h"
-#include "spell/spells3.h"
 #include "system/building-type-definition.h"
+#include "system/floor-type-definition.h"
 #include "term/screen-processor.h"
 #include "util/bit-flags-calculator.h"
 #include "util/int-char-converter.h"
 #include "view/display-messages.h"
 #include "world/world.h"
 
-MONRACE_IDX battle_mon[4];
 u32b mon_odds[4];
 int battle_odds;
 PRICE kakekin;
@@ -124,7 +130,7 @@ static void bldg_process_command(player_type *player_ptr, building_type *bldg, i
                /* Do nothing */
                break;
        case BACT_RESEARCH_ITEM:
-               paid = identify_fully(player_ptr, FALSE, 0);
+               paid = identify_fully(player_ptr, FALSE, TV_NONE);
                break;
        case BACT_TOWN_HISTORY:
                town_history(player_ptr);
@@ -167,11 +173,11 @@ static void bldg_process_command(player_type *player_ptr, building_type *bldg, i
                break;
        case BACT_ENCHANT_WEAPON:
                item_tester_hook = object_allow_enchant_melee_weapon;
-               enchant_item(player_ptr, bcost, 1, 1, 0, 0);
+               enchant_item(player_ptr, bcost, 1, 1, 0, TV_NONE);
                break;
        case BACT_ENCHANT_ARMOR:
                item_tester_hook = object_is_armour;
-               enchant_item(player_ptr, bcost, 0, 0, 1, 0);
+               enchant_item(player_ptr, bcost, 0, 0, 1, TV_NONE);
                break;
        case BACT_RECHARGE:
                building_recharge(player_ptr);
@@ -180,13 +186,13 @@ static void bldg_process_command(player_type *player_ptr, building_type *bldg, i
                building_recharge_all(player_ptr);
                break;
        case BACT_IDENTS:
-               if (!get_check(_("持ち物を全て鑑定してよろしいですか?", "Do you pay for identify all your possession? "))) break;
+               if (!get_check(_("持ち物を全て鑑定してよろしいですか?", "Do you pay to identify all your possession? "))) break;
                identify_pack(player_ptr);
                msg_print(_(" 持ち物全てが鑑定されました。", "Your possessions have been identified."));
                paid = TRUE;
                break;
        case BACT_IDENT_ONE:
-               paid = ident_spell(player_ptr, FALSE, 0);
+               paid = ident_spell(player_ptr, FALSE, TV_NONE);
                break;
        case BACT_LEARN:
                do_cmd_study(player_ptr);
@@ -199,7 +205,7 @@ static void bldg_process_command(player_type *player_ptr, building_type *bldg, i
                break;
        case BACT_ENCHANT_ARROWS:
                item_tester_hook = item_tester_hook_ammo;
-               enchant_item(player_ptr, bcost, 1, 1, 0, 0);
+               enchant_item(player_ptr, bcost, 1, 1, 0, TV_NONE);
                break;
        case BACT_ENCHANT_BOW:
                enchant_item(player_ptr, bcost, 1, 1, 0, TV_BOW);
@@ -300,7 +306,7 @@ void do_cmd_building(player_type *player_ptr)
 
        take_turn(player_ptr, 100);
 
-       if (!cave_have_flag_bold(player_ptr->current_floor_ptr, player_ptr->y, player_ptr->x, FF_BLDG))
+       if (!cave_has_flag_bold(player_ptr->current_floor_ptr, player_ptr->y, player_ptr->x, FF_BLDG))
        {
                msg_print(_("ここには建物はない。", "You see no building here."));
                return;
@@ -352,7 +358,7 @@ void do_cmd_building(player_type *player_ptr)
 
        forget_lite(player_ptr->current_floor_ptr);
        forget_view(player_ptr->current_floor_ptr);
-       current_world_ptr->character_icky++;
+       current_world_ptr->character_icky_depth++;
 
        command_arg = 0;
        command_rep = 0;
@@ -402,10 +408,10 @@ void do_cmd_building(player_type *player_ptr)
 
        if (reinit_wilderness) player_ptr->leaving = TRUE;
 
-       current_world_ptr->character_icky--;
-       Term_clear();
+       current_world_ptr->character_icky_depth--;
+       term_clear();
 
        player_ptr->update |= (PU_VIEW | PU_MONSTERS | PU_BONUS | PU_LITE | PU_MON_LITE);
        player_ptr->redraw |= (PR_BASIC | PR_EXTRA | PR_EQUIPPY | PR_MAP);
-       player_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
+       player_ptr->window_flags |= (PW_OVERHEAD | PW_DUNGEON);
 }