return TRUE;
}
+
+/*!
+ * @brief フロアにマスに落ちているオブジェクトを全て削除する / Deletes all objects at given location
+ * Delete a dungeon object
+ * @param player_ptr プレーヤーへの参照ポインタ
+ * @param y 削除したフロアマスのY座標
+ * @param x 削除したフロアマスのX座標
+ * @return なし
+ */
+void delete_object(player_type *player_ptr, POSITION y, POSITION x)
+{
+ grid_type *g_ptr;
+ OBJECT_IDX this_o_idx, next_o_idx = 0;
+ floor_type *floor_ptr = player_ptr->current_floor_ptr;
+ if (!in_bounds(floor_ptr, y, x))
+ return;
+
+ g_ptr = &floor_ptr->grid_array[y][x];
+ for (this_o_idx = g_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx) {
+ object_type *o_ptr;
+ o_ptr = &floor_ptr->o_list[this_o_idx];
+ next_o_idx = o_ptr->next_o_idx;
+ object_wipe(o_ptr);
+ floor_ptr->o_cnt--;
+ }
+
+ g_ptr->o_idx = 0;
+ lite_spot(player_ptr, y, x);
+}
bool make_object(player_type *owner_ptr, object_type *j_ptr, BIT_FLAGS mode);
bool make_gold(floor_type *floor_ptr, object_type *j_ptr);
+void delete_object(player_type *owner_ptr, POSITION y, POSITION x);
* @brief ダンジョン生成に利用する関数群 / Used by dungeon generation.
* @date 2014/07/15
* @author
- * <pre>
* Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke
* This software may be copied and distributed for educational, research,
* and not for profit purposes provided that this copyright and statement
* are included in all such copies. Other copyrights may also apply.
- * </pre>
* @details
* Purpose: This file holds all the
* functions that are applied to a level after the rest has been
* generated, ie streams and level destruction.
*/
-#include "system/angband.h"
-#include "util/util.h"
-
-#include "object/artifact.h"
-#include "floor/floor-generate.h"
+#include "floor/floor-streams.h"
#include "dungeon/dungeon.h"
+#include "floor/floor-generate.h"
+#include "floor/floor-object.h"
#include "floor/floor.h"
-#include "floor/floor-streams.h"
+#include "grid/feature.h"
#include "grid/grid.h"
#include "monster/monster.h"
-#include "grid/feature.h"
-#include "object/object2.h"
+#include "object/artifact.h"
#include "object/object-flavor.h"
#include "object/object-hook.h"
-#include "spell/spells1.h"
-#include "spell/spells-floor.h"
#include "room/rooms.h"
+#include "spell/spells-floor.h"
+#include "spell/spells1.h"
+#include "util/util.h"
/*!
* @brief 再帰フラクタルアルゴリズムによりダンジョン内に川を配置する /
-/*
- * File: streams.h
- * Purpose: header file for streams.c. This is only used in generate.c.
- */
+#include "system/angband.h"
-/*
- * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke
- *
- * This software may be copied and distributed for educational, research,
- * and not for profit purposes provided that this copyright and statement
- * are included in all such copies. Other copyrights may also apply.
- */
-
-
-/* Externs */
-
-extern void add_river(floor_type *floor_ptr);
-extern void build_streamer(player_type *player_ptr, FEAT_IDX feat, int chance);
-extern void place_trees(player_type *player_ptr, POSITION x, POSITION y);
-extern void destroy_level(player_type *player_ptr);
+void add_river(floor_type *floor_ptr);
+void build_streamer(player_type *player_ptr, FEAT_IDX feat, int chance);
+void place_trees(player_type *player_ptr, POSITION x, POSITION y);
+void destroy_level(player_type *player_ptr);
/*!
- * @brief フロアにマスに落ちているオブジェクトを全て削除する / Deletes all objects at given location
- * Delete a dungeon object
- * @param player_ptr プレーヤーへの参照ポインタ
- * @param y 削除したフロアマスのY座標
- * @param x 削除したフロアマスのX座標
- * @return なし
- */
-void delete_object(player_type *player_ptr, POSITION y, POSITION x)
-{
- grid_type *g_ptr;
- OBJECT_IDX this_o_idx, next_o_idx = 0;
- floor_type *floor_ptr = player_ptr->current_floor_ptr;
- if (!in_bounds(floor_ptr, y, x)) return;
-
- g_ptr = &floor_ptr->grid_array[y][x];
- for (this_o_idx = g_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
- {
- object_type *o_ptr;
- o_ptr = &floor_ptr->o_list[this_o_idx];
- next_o_idx = o_ptr->next_o_idx;
- object_wipe(o_ptr);
- floor_ptr->o_cnt--;
- }
-
- g_ptr->o_idx = 0;
- lite_spot(player_ptr, y, x);
-}
-
-
-/*!
* @brief グローバルオブジェクト配列から空きを取得する /
* Acquires and returns the index of a "free" object.
* @param floo_ptr 現在フロアへの参照ポインタ
s32b flag_cost(object_type *o_ptr, int plusses);
void excise_object_idx(floor_type *floor_ptr, OBJECT_IDX o_idx);
void delete_object_idx(player_type *owner_ptr, OBJECT_IDX o_idx);
-void delete_object(player_type *owner_ptr, POSITION y, POSITION x);
OBJECT_IDX o_pop(floor_type *floor_ptr);
OBJECT_IDX get_obj_num(player_type *o_ptr, DEPTH level, BIT_FLAGS mode);
#include "dungeon/dungeon.h"
#include "dungeon/quest.h"
#include "floor/floor-events.h"
+#include "floor/floor-object.h"
#include "floor/floor-save.h"
#include "floor/floor.h"
#include "grid/feature.h"
#include "object/object-flavor.h"
#include "object/object-hook.h"
#include "object/object-mark-types.h"
-#include "object/object2.h"
#include "object/special-object-flags.h"
#include "player/player-damage.h"
#include "player/player-effects.h"
#include "effect/effect-characteristics.h"
#include "effect/spells-effect-util.h"
#include "floor/floor-events.h"
+#include "floor/floor-object.h"
#include "grid/feature.h"
#include "grid/grid.h"
#include "inventory/player-inventory.h"