summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2015-03-07 16:55:41 +0100
committerBardur Arantsson <bardur@scientician.net>2015-03-07 16:55:41 +0100
commitcfc0a04155eda35a4fe80ef72fd2b0f9eb10856b (patch)
tree9e10a2668c7ef387317396e113d484a0de081457 /src
parent752d3ce030b855544346f5f0424995cc11087bdb (diff)
Split object*.cc declarations into separate header files
Diffstat (limited to 'src')
-rw-r--r--src/birth.cc2
-rw-r--r--src/bldg.cc2
-rw-r--r--src/cmd1.cc2
-rw-r--r--src/cmd2.cc2
-rw-r--r--src/cmd3.cc2
-rw-r--r--src/cmd4.cc2
-rw-r--r--src/cmd5.cc2
-rw-r--r--src/cmd6.cc2
-rw-r--r--src/cmd7.cc2
-rw-r--r--src/dungeon.cc2
-rw-r--r--src/externs.h95
-rw-r--r--src/files.cc2
-rw-r--r--src/generate.cc1
-rw-r--r--src/help.cc1
-rw-r--r--src/init1.cc2
-rw-r--r--src/loadsave.cc2
-rw-r--r--src/melee1.cc2
-rw-r--r--src/melee2.cc2
-rw-r--r--src/modules.cc1
-rw-r--r--src/monster2.cc1
-rw-r--r--src/monster3.cc1
-rw-r--r--src/object1.cc12
-rw-r--r--src/object1.hpp34
-rw-r--r--src/object2.cc3
-rw-r--r--src/object2.hpp60
-rw-r--r--src/powers.cc3
-rw-r--r--src/q_betwen.cc1
-rw-r--r--src/q_bounty.cc2
-rw-r--r--src/q_eol.cc1
-rw-r--r--src/q_fireprof.cc2
-rw-r--r--src/q_god.cc1
-rw-r--r--src/q_hobbit.cc1
-rw-r--r--src/q_library.cc1
-rw-r--r--src/q_narsil.cc1
-rw-r--r--src/q_nazgul.cc1
-rw-r--r--src/q_one.cc2
-rw-r--r--src/q_poison.cc1
-rw-r--r--src/q_rand.cc2
-rw-r--r--src/q_shroom.cc1
-rw-r--r--src/q_spider.cc1
-rw-r--r--src/q_thief.cc1
-rw-r--r--src/q_thrain.cc1
-rw-r--r--src/q_troll.cc1
-rw-r--r--src/q_ultrag.cc2
-rw-r--r--src/q_wight.cc1
-rw-r--r--src/randart.cc2
-rw-r--r--src/skills.cc2
-rw-r--r--src/spells1.cc2
-rw-r--r--src/spells2.cc2
-rw-r--r--src/spells3.cc2
-rw-r--r--src/spells6.cc1
-rw-r--r--src/squelch/condition.cc1
-rw-r--r--src/squelch/object_status.cc1
-rw-r--r--src/squelch/rule.cc2
-rw-r--r--src/squeltch.cc2
-rw-r--r--src/status.cc1
-rw-r--r--src/store.cc2
-rw-r--r--src/traps.cc2
-rw-r--r--src/variable.cc6
-rw-r--r--src/wizard1.cc2
-rw-r--r--src/wizard2.cc2
-rw-r--r--src/xtra1.cc2
-rw-r--r--src/xtra2.cc2
63 files changed, 198 insertions, 104 deletions
diff --git a/src/birth.cc b/src/birth.cc
index 04b8841..f8c5d5f 100644
--- a/src/birth.cc
+++ b/src/birth.cc
@@ -21,6 +21,8 @@
#include "modules.hpp"
#include "monster2.hpp"
#include "notes.hpp"
+#include "object1.hpp"
+#include "object2.hpp"
#include "q_rand.h"
#include "skills.hpp"
#include "spells2.hpp"
diff --git a/src/bldg.cc b/src/bldg.cc
index d139cd9..0f6ccbf 100644
--- a/src/bldg.cc
+++ b/src/bldg.cc
@@ -18,6 +18,8 @@
#include "files.hpp"
#include "hooks.h"
#include "mimic.hpp"
+#include "object1.hpp"
+#include "object2.hpp"
#include "q_library.h"
#include "q_fireprof.h"
#include "q_bounty.h"
diff --git a/src/cmd1.cc b/src/cmd1.cc
index 8f74cc8..8dff71b 100644
--- a/src/cmd1.cc
+++ b/src/cmd1.cc
@@ -18,6 +18,8 @@
#include "mimic.hpp"
#include "monster2.hpp"
#include "monster3.hpp"
+#include "object1.hpp"
+#include "object2.hpp"
#include "quark.h"
#include "skills.hpp"
#include "spells1.hpp"
diff --git a/src/cmd2.cc b/src/cmd2.cc
index 2bfbcb6..e9ab62e 100644
--- a/src/cmd2.cc
+++ b/src/cmd2.cc
@@ -18,6 +18,8 @@
#include "levels.hpp"
#include "monster2.hpp"
#include "monster3.hpp"
+#include "object1.hpp"
+#include "object2.hpp"
#include "skills.hpp"
#include "spells1.hpp"
#include "spells2.hpp"
diff --git a/src/cmd3.cc b/src/cmd3.cc
index 8bf20c1..c5ef2cb 100644
--- a/src/cmd3.cc
+++ b/src/cmd3.cc
@@ -13,6 +13,8 @@
#include "gods.hpp"
#include "hooks.h"
#include "monster1.hpp"
+#include "object1.hpp"
+#include "object2.hpp"
#include "quark.h"
#include "squeltch.hpp"
#include "store.hpp"
diff --git a/src/cmd4.cc b/src/cmd4.cc
index f38b3ed..0b8a52b 100644
--- a/src/cmd4.cc
+++ b/src/cmd4.cc
@@ -15,6 +15,8 @@
#include "messages.h"
#include "monster2.hpp"
#include "notes.hpp"
+#include "object1.hpp"
+#include "object2.hpp"
#include "skills.hpp"
#include "squeltch.hpp"
#include "util.hpp"
diff --git a/src/cmd5.cc b/src/cmd5.cc
index 15f8021..ab103ff 100644
--- a/src/cmd5.cc
+++ b/src/cmd5.cc
@@ -13,6 +13,8 @@
#include "cave.hpp"
#include "corrupt.hpp"
#include "monster2.hpp"
+#include "object1.hpp"
+#include "object2.hpp"
#include "skills.hpp"
#include "spell_type.hpp"
#include "spells1.hpp"
diff --git a/src/cmd6.cc b/src/cmd6.cc
index a3d8c6a..089b6bf 100644
--- a/src/cmd6.cc
+++ b/src/cmd6.cc
@@ -18,6 +18,8 @@
#include "lua_bind.hpp"
#include "mimic.hpp"
#include "monster2.hpp"
+#include "object1.hpp"
+#include "object2.hpp"
#include "randart.hpp"
#include "skills.hpp"
#include "spell_type.hpp"
diff --git a/src/cmd7.cc b/src/cmd7.cc
index 80e0051..01e94cb 100644
--- a/src/cmd7.cc
+++ b/src/cmd7.cc
@@ -17,6 +17,8 @@
#include "hooks.h"
#include "mimic.hpp"
#include "monster2.hpp"
+#include "object1.hpp"
+#include "object2.hpp"
#include "quark.h"
#include "skills.hpp"
#include "spells1.hpp"
diff --git a/src/dungeon.cc b/src/dungeon.cc
index 66f535a..771d47c 100644
--- a/src/dungeon.cc
+++ b/src/dungeon.cc
@@ -34,6 +34,8 @@
#include "monster3.hpp"
#include "modules.hpp"
#include "notes.hpp"
+#include "object1.hpp"
+#include "object2.hpp"
#include "powers.hpp"
#include "quest.h"
#include "quark.h"
diff --git a/src/externs.h b/src/externs.h
index b7ca83f..1446de5 100644
--- a/src/externs.h
+++ b/src/externs.h
@@ -514,101 +514,6 @@ extern void process_monsters(void);
extern void curse_equipment(int chance, int heavy_chance);
extern void curse_equipment_dg(int chance, int heavy_chance);
-/* object1.c */
-/* object2.c */
-extern byte get_item_letter_color(object_type *o_ptr);
-extern void describe_device(object_type *o_ptr);
-extern void inc_stack_size(int item, int delta);
-extern void inc_stack_size_ex(int item, int delta, optimize_flag opt, describe_flag desc);
-extern void object_pickup(int this_o_idx);
-extern int get_slot(int slot);
-extern bool_ apply_flags_set(s16b a_idx, s16b set_idx, u32b *f1, u32b *f2, u32b *f3, u32b *f4, u32b *f5, u32b *esp);
-extern bool_ apply_set(s16b a_idx, s16b set_idx);
-extern bool_ takeoff_set(s16b a_idx, s16b set_idx);
-extern bool_ wield_set(s16b a_idx, s16b set_idx, bool_ silent);
-extern object_type *get_object(int item);
-extern s32b calc_total_weight(void);
-extern void add_random_ego_flag(object_type *o_ptr, int fego, bool_ *limit_blows);
-extern bool_ info_spell;
-extern char spell_txt[50];
-extern void init_match_theme(obj_theme theme);
-extern bool_ kind_is_artifactable(int k_idx);
-extern bool_ kind_is_legal(int k_idx);
-extern bool_ verify(cptr prompt, int item);
-extern void flavor_init(void);
-extern void reset_visuals(void);
-extern int object_power(object_type *o_ptr);
-extern bool_ object_flags_no_set;
-extern void object_flags(object_type *o_ptr, u32b *f1, u32b *f2, u32b *f3, u32b *f4, u32b *f5, u32b *esp);
-extern void object_flags_known(object_type *o_ptr, u32b *f1, u32b *f2, u32b *f3, u32b *f4, u32b *f5, u32b *esp);
-extern void object_desc(char *buf, object_type *o_ptr, int pref, int mode);
-extern void object_desc_store(char *buf, object_type *o_ptr, int pref, int mode);
-extern bool_ object_out_desc(object_type *o_ptr, FILE *fff, bool_ trim_down, bool_ wait_for_it);
-extern char index_to_label(int i);
-extern s16b wield_slot_ideal(object_type *o_ptr, bool_ ideal);
-extern s16b wield_slot(object_type *o_ptr);
-extern cptr describe_use(int i);
-extern void inven_item_charges(int item);
-extern void inven_item_describe(int item);
-extern void inven_item_increase(int item, int num);
-extern bool_ inven_item_optimize(int item);
-extern void floor_item_charges(int item);
-extern void floor_item_describe(int item);
-extern void floor_item_increase(int item, int num);
-extern void floor_item_optimize(int item);
-extern bool_ inven_carry_okay(object_type *o_ptr);
-extern s16b inven_carry(object_type *o_ptr, bool_ final);
-extern s16b inven_takeoff(int item, int amt, bool_ force_drop);
-extern void inven_drop(int item, int amt, int dy, int dx, bool_ silent);
-extern bool_ item_tester_okay(object_type *o_ptr);
-extern void display_inven(void);
-extern void display_equip(void);
-extern void show_inven();
-extern void show_equip();
-extern void toggle_inven_equip(void);
-extern bool_ (*get_item_extra_hook)(int *cp);
-extern bool_ get_item(int *cp, cptr pmt, cptr str, int mode);
-extern void excise_object_idx(int o_idx);
-extern void delete_object_idx(int o_idx);
-extern void delete_object(int y, int x);
-extern void compact_objects(int size);
-extern void wipe_o_list(void);
-extern s16b o_pop(void);
-extern errr get_obj_num_prep(void);
-extern s16b get_obj_num(int level);
-extern void object_known(object_type *o_ptr);
-extern void object_aware(object_type *o_ptr);
-extern void object_tried(object_type *o_ptr);
-extern s32b object_value(object_type *o_ptr);
-extern s32b object_value_real(object_type *o_ptr);
-extern bool_ object_similar(object_type *o_ptr, object_type *j_ptr);
-extern void object_absorb(object_type *o_ptr, object_type *j_ptr);
-extern s16b lookup_kind(int tval, int sval);
-extern void object_wipe(object_type *o_ptr);
-extern void object_prep(object_type *o_ptr, int k_idx);
-extern void object_copy(object_type *o_ptr, object_type *j_ptr);
-extern int hack_apply_magic_power;
-extern void apply_magic(object_type *o_ptr, int lev, bool_ okay, bool_ good, bool_ great);
-extern bool_ make_object(object_type *j_ptr, bool_ good, bool_ great, obj_theme theme);
-extern void place_object(int y, int x, bool_ good, bool_ great, int where);
-extern bool_ make_gold(object_type *j_ptr);
-extern void place_gold(int y, int x);
-extern void process_objects(void);
-extern s16b drop_near(object_type *o_ptr, int chance, int y, int x);
-extern void acquirement(int y1, int x1, int num, bool_ great, bool_ known);
-extern void pick_trap(int y, int x);
-extern cptr item_activation(object_type *o_ptr,byte num);
-extern void combine_pack(void);
-extern void reorder_pack(void);
-extern void random_artifact_resistance (object_type * o_ptr);
-extern s16b floor_carry(int y, int x, object_type *j_ptr);
-extern void pack_decay(int item);
-extern void floor_decay(int item);
-extern void py_pickup_floor(int pickup);
-extern s16b m_bonus(int max, int level);
-extern void object_gain_level(object_type *o_ptr);
-extern s32b flag_cost(object_type * o_ptr, int plusses);
-
/* main.c */
extern bool_ private_check_user_directory(cptr dirpath);
diff --git a/src/files.cc b/src/files.cc
index fce8a11..e70ff16 100644
--- a/src/files.cc
+++ b/src/files.cc
@@ -22,6 +22,8 @@
#include "monster2.hpp"
#include "monster3.hpp"
#include "notes.hpp"
+#include "object1.hpp"
+#include "object2.hpp"
#include "skills.hpp"
#include "spells2.hpp"
#include "util.hpp"
diff --git a/src/generate.cc b/src/generate.cc
index 3dc6766..fcc81b0 100644
--- a/src/generate.cc
+++ b/src/generate.cc
@@ -12,6 +12,7 @@
#include "levels.hpp"
#include "loadsave.hpp"
#include "monster2.hpp"
+#include "object2.hpp"
#include "randart.hpp"
#include "spells1.hpp"
#include "traps.hpp"
diff --git a/src/help.cc b/src/help.cc
index fe48acc..e20808b 100644
--- a/src/help.cc
+++ b/src/help.cc
@@ -12,6 +12,7 @@
#include "angband.h"
#include "files.hpp"
#include "hooks.h"
+#include "object1.hpp"
#include "skills.hpp"
#include "util.hpp"
diff --git a/src/init1.cc b/src/init1.cc
index 42b0fb4..23431fe 100644
--- a/src/init1.cc
+++ b/src/init1.cc
@@ -3,6 +3,8 @@
#include "files.hpp"
#include "gods.hpp"
#include "monster2.hpp"
+#include "object1.hpp"
+#include "object2.hpp"
#include "skills.hpp"
#include "spells5.hpp"
#include "traps.hpp"
diff --git a/src/loadsave.cc b/src/loadsave.cc
index 1cb8306..d8016b3 100644
--- a/src/loadsave.cc
+++ b/src/loadsave.cc
@@ -7,6 +7,8 @@
#include "messages.h"
#include "modules.hpp"
#include "monster2.hpp"
+#include "object1.hpp"
+#include "object2.hpp"
#include "quark.h"
#include "hooks.h"
#include "util.hpp"
diff --git a/src/melee1.cc b/src/melee1.cc
index 28d21af..131711e 100644
--- a/src/melee1.cc
+++ b/src/melee1.cc
@@ -12,6 +12,8 @@
#include "mimic.hpp"
#include "monster2.hpp"
#include "monster3.hpp"
+#include "object1.hpp"
+#include "object2.hpp"
#include "skills.hpp"
#include "spells1.hpp"
#include "spells2.hpp"
diff --git a/src/melee2.cc b/src/melee2.cc
index 9ac7ff4..dd349f3 100644
--- a/src/melee2.cc
+++ b/src/melee2.cc
@@ -20,6 +20,8 @@
#include "messages.h"
#include "monster2.hpp"
#include "monster3.hpp"
+#include "object1.hpp"
+#include "object2.hpp"
#include "quark.h"
#include "skills.hpp"
#include "spells1.hpp"
diff --git a/src/modules.cc b/src/modules.cc
index aa5d537..a105a6b 100644
--- a/src/modules.cc
+++ b/src/modules.cc
@@ -12,6 +12,7 @@
#include "files.hpp"
#include "hooks.h"
#include "monster2.hpp"
+#include "object2.hpp"
#include "spells2.hpp"
#include "util.hpp"
#include "util.h"
diff --git a/src/monster2.cc b/src/monster2.cc
index b6df530..bb26302 100644
--- a/src/monster2.cc
+++ b/src/monster2.cc
@@ -14,6 +14,7 @@
#include "levels.hpp"
#include "mimic.hpp"
#include "monster3.hpp"
+#include "object2.hpp"
#include "randart.hpp"
#include "spells1.hpp"
#include "spells2.hpp"
diff --git a/src/monster3.cc b/src/monster3.cc
index 7012c6b..d860eb3 100644
--- a/src/monster3.cc
+++ b/src/monster3.cc
@@ -12,6 +12,7 @@
#include "cmd2.hpp"
#include "gods.hpp"
#include "monster2.hpp"
+#include "object2.hpp"
#include "skills.hpp"
#include "util.hpp"
#include "util.h"
diff --git a/src/object1.cc b/src/object1.cc
index 36081a5..f1ec913 100644
--- a/src/object1.cc
+++ b/src/object1.cc
@@ -6,6 +6,8 @@
* included in all such copies.
*/
+#include "object1.hpp"
+
#include "angband.h"
#include "cave.hpp"
#include "cmd2.hpp"
@@ -17,6 +19,7 @@
#include "mimic.hpp"
#include "monster1.hpp"
#include "monster2.hpp"
+#include "object2.hpp"
#include "quark.h"
#include "skills.hpp"
#include "spell_type.hpp"
@@ -28,6 +31,9 @@
#include <cassert>
+static bool_ apply_flags_set(s16b a_idx, s16b set_idx,
+ u32b *f1, u32b *f2, u32b *f3, u32b *f4, u32b *f5, u32b *esp);
+
/*
* Hack -- note that "TERM_MULTI" is now just "TERM_VIOLET".
* We will have to find a cleaner method for "MULTI_HUED" later.
@@ -2725,7 +2731,7 @@ void display_ammo_damage(object_type *o_ptr)
/*
* Describe a magic stick powers
*/
-void describe_device(object_type *o_ptr)
+static void describe_device(object_type *o_ptr)
{
char buf[128];
@@ -3890,7 +3896,7 @@ static s16b label_to_equip(int c)
* Returns the next free slot of the given "type", return the first
* if all are used
*/
-int get_slot(int slot)
+static int get_slot(int slot)
{
int i = 0;
@@ -6574,7 +6580,7 @@ bool_ apply_set(s16b a_idx, s16b set_idx)
return (FALSE);
}
-bool_ apply_flags_set(s16b a_idx, s16b set_idx,
+static bool_ apply_flags_set(s16b a_idx, s16b set_idx,
u32b *f1, u32b *f2, u32b *f3, u32b *f4, u32b *f5, u32b *esp)
{
set_type *s_ptr = &set_info[set_idx];
diff --git a/src/object1.hpp b/src/object1.hpp
new file mode 100644
index 0000000..187a4d5
--- /dev/null
+++ b/src/object1.hpp
@@ -0,0 +1,34 @@
+#pragma once
+
+#include "angband.h"
+
+extern byte get_item_letter_color(object_type *o_ptr);
+extern void object_pickup(int this_o_idx);
+extern bool_ apply_set(s16b a_idx, s16b set_idx);
+extern bool_ takeoff_set(s16b a_idx, s16b set_idx);
+extern bool_ wield_set(s16b a_idx, s16b set_idx, bool_ silent);
+extern bool_ verify(cptr prompt, int item);
+extern void flavor_init(void);
+extern void reset_visuals(void);
+extern int object_power(object_type *o_ptr);
+extern bool_ object_flags_no_set;
+extern void object_flags(object_type *o_ptr, u32b *f1, u32b *f2, u32b *f3, u32b *f4, u32b *f5, u32b *esp);
+extern void object_flags_known(object_type *o_ptr, u32b *f1, u32b *f2, u32b *f3, u32b *f4, u32b *f5, u32b *esp);
+extern void object_desc(char *buf, object_type *o_ptr, int pref, int mode);
+extern void object_desc_store(char *buf, object_type *o_ptr, int pref, int mode);
+extern bool_ object_out_desc(object_type *o_ptr, FILE *fff, bool_ trim_down, bool_ wait_for_it);
+extern char index_to_label(int i);
+extern s16b wield_slot_ideal(object_type *o_ptr, bool_ ideal);
+extern s16b wield_slot(object_type *o_ptr);
+extern cptr describe_use(int i);
+extern bool_ item_tester_okay(object_type *o_ptr);
+extern void display_inven(void);
+extern void display_equip(void);
+extern void show_inven();
+extern void show_equip();
+extern void toggle_inven_equip(void);
+extern bool_ (*get_item_extra_hook)(int *cp);
+extern bool_ get_item(int *cp, cptr pmt, cptr str, int mode);
+extern cptr item_activation(object_type *o_ptr,byte num);
+extern void py_pickup_floor(int pickup);
+extern void object_gain_level(object_type *o_ptr);
diff --git a/src/object2.cc b/src/object2.cc
index 0944125..6863db6 100644
--- a/src/object2.cc
+++ b/src/object2.cc
@@ -6,6 +6,8 @@
* included in all such copies.
*/
+#include "object2.hpp"
+
#include "angband.h"
#include "cave.hpp"
#include "spell_type.hpp"
@@ -13,6 +15,7 @@
#include "hooks.h"
#include "mimic.hpp"
#include "monster2.hpp"
+#include "object1.hpp"
#include "randart.hpp"
#include "skills.hpp"
#include "spells2.hpp"
diff --git a/src/object2.hpp b/src/object2.hpp
new file mode 100644
index 0000000..07986cd
--- /dev/null
+++ b/src/object2.hpp
@@ -0,0 +1,60 @@
+#pragma once
+
+#include "angband.h"
+
+extern void inc_stack_size(int item, int delta);
+extern void inc_stack_size_ex(int item, int delta, optimize_flag opt, describe_flag desc);
+extern object_type *get_object(int item);
+extern s32b calc_total_weight(void);
+extern void add_random_ego_flag(object_type *o_ptr, int fego, bool_ *limit_blows);
+extern void init_match_theme(obj_theme theme);
+extern bool_ kind_is_artifactable(int k_idx);
+extern bool_ kind_is_legal(int k_idx);
+extern void inven_item_charges(int item);
+extern void inven_item_describe(int item);
+extern void inven_item_increase(int item, int num);
+extern bool_ inven_item_optimize(int item);
+extern void floor_item_charges(int item);
+extern void floor_item_describe(int item);
+extern void floor_item_increase(int item, int num);
+extern void floor_item_optimize(int item);
+extern bool_ inven_carry_okay(object_type *o_ptr);
+extern s16b inven_carry(object_type *o_ptr, bool_ final);
+extern s16b inven_takeoff(int item, int amt, bool_ force_drop);
+extern void inven_drop(int item, int amt, int dy, int dx, bool_ silent);
+extern void excise_object_idx(int o_idx);
+extern void delete_object_idx(int o_idx);
+extern void delete_object(int y, int x);
+extern void compact_objects(int size);
+extern void wipe_o_list(void);
+extern s16b o_pop(void);
+extern errr get_obj_num_prep(void);
+extern s16b get_obj_num(int level);
+extern void object_known(object_type *o_ptr);
+extern void object_aware(object_type *o_ptr);
+extern void object_tried(object_type *o_ptr);
+extern s32b object_value(object_type *o_ptr);
+extern s32b object_value_real(object_type *o_ptr);
+extern bool_ object_similar(object_type *o_ptr, object_type *j_ptr);
+extern void object_absorb(object_type *o_ptr, object_type *j_ptr);
+extern s16b lookup_kind(int tval, int sval);
+extern void object_wipe(object_type *o_ptr);
+extern void object_prep(object_type *o_ptr, int k_idx);
+extern void object_copy(object_type *o_ptr, object_type *j_ptr);
+extern int hack_apply_magic_power;
+extern void apply_magic(object_type *o_ptr, int lev, bool_ okay, bool_ good, bool_ great);
+extern bool_ make_object(object_type *j_ptr, bool_ good, bool_ great, obj_theme theme);
+extern void place_object(int y, int x, bool_ good, bool_ great, int where);
+extern bool_ make_gold(object_type *j_ptr);
+extern void place_gold(int y, int x);
+extern s16b drop_near(object_type *o_ptr, int chance, int y, int x);
+extern void acquirement(int y1, int x1, int num, bool_ great, bool_ known);
+extern void pick_trap(int y, int x);
+extern void combine_pack(void);
+extern void reorder_pack(void);
+extern void random_artifact_resistance (object_type * o_ptr);
+extern s16b floor_carry(int y, int x, object_type *j_ptr);
+extern void pack_decay(int item);
+extern void floor_decay(int item);
+extern s16b m_bonus(int max, int level);
+extern s32b flag_cost(object_type * o_ptr, int plusses);
diff --git a/src/powers.cc b/src/powers.cc
index fce95a6..2574241 100644
--- a/src/powers.cc
+++ b/src/powers.cc
@@ -7,6 +7,7 @@
*/
#include "powers.hpp"
+
#include "angband.h"
#include "cave.hpp"
#include "cmd1.hpp"
@@ -17,6 +18,8 @@
#include "mimic.hpp"
#include "monster2.hpp"
#include "monster3.hpp"
+#include "object1.hpp"
+#include "object2.hpp"
#include "quark.h"
#include "spells1.hpp"
#include "spells2.hpp"
diff --git a/src/q_betwen.cc b/src/q_betwen.cc
index 0e579d4..c43edc6 100644
--- a/src/q_betwen.cc
+++ b/src/q_betwen.cc
@@ -3,6 +3,7 @@
#include "cave.hpp"
#include "hooks.h"
#include "monster2.hpp"
+#include "object2.hpp"
#include "util.hpp"
#define cquest (quest[QUEST_BETWEEN])
diff --git a/src/q_bounty.cc b/src/q_bounty.cc
index 2879123..dbd57df 100644
--- a/src/q_bounty.cc
+++ b/src/q_bounty.cc
@@ -1,6 +1,8 @@
#include "q_bounty.h"
#include "monster2.hpp"
+#include "object1.hpp"
+#include "object2.hpp"
#include "util.hpp"
#define cquest (quest[QUEST_BOUNTY])
diff --git a/src/q_eol.cc b/src/q_eol.cc
index 08475a0..fb74dfc 100644
--- a/src/q_eol.cc
+++ b/src/q_eol.cc
@@ -4,6 +4,7 @@
#include "generate.hpp"
#include "hooks.h"
#include "monster2.hpp"
+#include "object2.hpp"
#include "traps.hpp"
#include "util.hpp"
diff --git a/src/q_fireprof.cc b/src/q_fireprof.cc
index fa901f8..0738a46 100644
--- a/src/q_fireprof.cc
+++ b/src/q_fireprof.cc
@@ -1,6 +1,8 @@
#include "q_fireprof.h"
#include "quark.h"
#include "hooks.h"
+#include "object1.hpp"
+#include "object2.hpp"
#include "traps.hpp"
#include "util.hpp"
diff --git a/src/q_god.cc b/src/q_god.cc
index e10a597..a1b0560 100644
--- a/src/q_god.cc
+++ b/src/q_god.cc
@@ -1,6 +1,7 @@
#include "q_god.h"
#include "quark.h"
#include "hooks.h"
+#include "object2.hpp"
#include "util.hpp"
#include <assert.h>
diff --git a/src/q_hobbit.cc b/src/q_hobbit.cc
index 82e1f0c..06079f9 100644
--- a/src/q_hobbit.cc
+++ b/src/q_hobbit.cc
@@ -4,6 +4,7 @@
#include "hooks.h"
#include "messages.h"
#include "monster2.hpp"
+#include "object2.hpp"
#include "util.hpp"
#include <cassert>
diff --git a/src/q_library.cc b/src/q_library.cc
index 7f89d80..d0ec2cc 100644
--- a/src/q_library.cc
+++ b/src/q_library.cc
@@ -2,6 +2,7 @@
#include "quark.h"
#include "hooks.h"
#include "monster2.hpp"
+#include "object2.hpp"
#include "spells3.hpp"
#include "spells4.hpp"
#include "util.hpp"
diff --git a/src/q_narsil.cc b/src/q_narsil.cc
index 367e674..33fb600 100644
--- a/src/q_narsil.cc
+++ b/src/q_narsil.cc
@@ -1,6 +1,7 @@
#include "q_narsil.h"
#include "hooks.h"
+#include "object2.hpp"
#include "util.hpp"
#define cquest (quest[QUEST_NARSIL])
diff --git a/src/q_nazgul.cc b/src/q_nazgul.cc
index b493f12..e2ef3e4 100644
--- a/src/q_nazgul.cc
+++ b/src/q_nazgul.cc
@@ -3,6 +3,7 @@
#include "cave.hpp"
#include "hooks.h"
#include "monster2.hpp"
+#include "object2.hpp"
#include "util.hpp"
#include <cassert>
diff --git a/src/q_one.cc b/src/q_one.cc
index f34060c..bdee1c6 100644
--- a/src/q_one.cc
+++ b/src/q_one.cc
@@ -3,6 +3,8 @@
#include "gods.hpp"
#include "hooks.h"
#include "monster2.hpp"
+#include "object1.hpp"
+#include "object2.hpp"
#include "util.hpp"
#define cquest (quest[QUEST_ONE])
diff --git a/src/q_poison.cc b/src/q_poison.cc
index cf8747c..26b6ef5 100644
--- a/src/q_poison.cc
+++ b/src/q_poison.cc
@@ -4,6 +4,7 @@
#include "quark.h"
#include "messages.h"
#include "monster2.hpp"
+#include "object2.hpp"
#include "hooks.h"
#include "util.hpp"
diff --git a/src/q_rand.cc b/src/q_rand.cc
index 874c7e7..6a874bb 100644
--- a/src/q_rand.cc
+++ b/src/q_rand.cc
@@ -6,6 +6,8 @@
#include "messages.h"
#include "monster2.hpp"
#include "monster3.hpp"
+#include "object1.hpp"
+#include "object2.hpp"
#include "skills.hpp"
#include "util.hpp"
diff --git a/src/q_shroom.cc b/src/q_shroom.cc
index aa15824..56a3cf2 100644
--- a/src/q_shroom.cc
+++ b/src/q_shroom.cc
@@ -4,6 +4,7 @@
#include "hooks.h"
#include "messages.h"
#include "monster2.hpp"
+#include "object2.hpp"
#include "util.hpp"
#include <cassert>
diff --git a/src/q_spider.cc b/src/q_spider.cc
index c468906..8bd11fa 100644
--- a/src/q_spider.cc
+++ b/src/q_spider.cc
@@ -4,6 +4,7 @@
#include "gods.hpp"
#include "hooks.h"
#include "monster2.hpp"
+#include "object2.hpp"
#include "util.hpp"
#define cquest (quest[QUEST_SPIDER])
diff --git a/src/q_thief.cc b/src/q_thief.cc
index d9fb832..405b98e 100644
--- a/src/q_thief.cc
+++ b/src/q_thief.cc
@@ -3,6 +3,7 @@
#include "cave.hpp"
#include "hooks.h"
#include "monster2.hpp"
+#include "object2.hpp"
#include "spells2.hpp"
#include "util.hpp"
diff --git a/src/q_thrain.cc b/src/q_thrain.cc
index d6ad13e..e8379aa 100644
--- a/src/q_thrain.cc
+++ b/src/q_thrain.cc
@@ -7,6 +7,7 @@
#include "randart.hpp"
#include "messages.h"
#include "monster2.hpp"
+#include "object2.hpp"
#include "util.hpp"
#include <cassert>
diff --git a/src/q_troll.cc b/src/q_troll.cc
index 3f40b18..7301606 100644
--- a/src/q_troll.cc
+++ b/src/q_troll.cc
@@ -3,6 +3,7 @@
#include "cave.hpp"
#include "hooks.h"
#include "monster2.hpp"
+#include "object2.hpp"
#include "util.hpp"
#include <cassert>
diff --git a/src/q_ultrag.cc b/src/q_ultrag.cc
index 53ba463..e5b5009 100644
--- a/src/q_ultrag.cc
+++ b/src/q_ultrag.cc
@@ -2,6 +2,8 @@
#include "cave.hpp"
#include "hooks.h"
+#include "object1.hpp"
+#include "object2.hpp"
#include "util.hpp"
#define cquest (quest[QUEST_ULTRA_GOOD])
diff --git a/src/q_wight.cc b/src/q_wight.cc
index 0f1e88b..e5b75ed 100644
--- a/src/q_wight.cc
+++ b/src/q_wight.cc
@@ -3,6 +3,7 @@
#include "cave.hpp"
#include "hooks.h"
#include "monster2.hpp"
+#include "object2.hpp"
#include "quark.h"
#include "util.hpp"
diff --git a/src/randart.cc b/src/randart.cc
index d1306c4..8f65961 100644
--- a/src/randart.cc
+++ b/src/randart.cc
@@ -8,6 +8,8 @@
#include "randart.hpp"
#include "mimic.hpp"
+#include "object1.hpp"
+#include "object2.hpp"
#include "quark.h"
#include "spells2.hpp"
#include "util.hpp"
diff --git a/src/skills.cc b/src/skills.cc
index ec48d8f..b7a94e1 100644
--- a/src/skills.cc
+++ b/src/skills.cc
@@ -17,6 +17,8 @@
#include "hooks.h"
#include "monster2.hpp"
#include "monster3.hpp"
+#include "object1.hpp"
+#include "object2.hpp"
#include "spells1.hpp"
#include "spells4.hpp"
#include "traps.hpp"
diff --git a/src/spells1.cc b/src/spells1.cc
index 012abf0..012bda3 100644
--- a/src/spells1.cc
+++ b/src/spells1.cc
@@ -16,6 +16,8 @@
#include "gods.hpp"
#include "monster2.hpp"
#include "monster3.hpp"
+#include "object1.hpp"
+#include "object2.hpp"
#include "skills.hpp"
#include "spell_type.hpp"
#include "spells2.hpp"
diff --git a/src/spells2.cc b/src/spells2.cc
index f38e9f5..10cce3b 100644
--- a/src/spells2.cc
+++ b/src/spells2.cc
@@ -17,6 +17,8 @@
#include "monster2.hpp"
#include "monster3.hpp"
#include "notes.hpp"
+#include "object1.hpp"
+#include "object2.hpp"
#include "skills.hpp"
#include "spells1.hpp"
#include "spells3.hpp"
diff --git a/src/spells3.cc b/src/spells3.cc
index c712875..ff61521 100644
--- a/src/spells3.cc
+++ b/src/spells3.cc
@@ -6,6 +6,8 @@
#include "mimic.hpp"
#include "monster2.hpp"
#include "monster3.hpp"
+#include "object1.hpp"
+#include "object2.hpp"
#include "skills.hpp"
#include "spell_type.hpp"
#include "spell_idx_list.hpp"
diff --git a/src/spells6.cc b/src/spells6.cc
index c97a1b4..ff4ae90 100644
--- a/src/spells6.cc
+++ b/src/spells6.cc
@@ -2,6 +2,7 @@
#include "angband.h"
#include "gods.hpp"
+#include "object2.hpp"
#include "skills.hpp"
#include "spell_type.hpp"
#include "spells4.hpp"
diff --git a/src/squelch/condition.cc b/src/squelch/condition.cc
index 8f83912..44d3e75 100644
--- a/src/squelch/condition.cc
+++ b/src/squelch/condition.cc
@@ -6,6 +6,7 @@
#include "tome/squelch/cursor.hpp"
#include "tome/squelch/tree_printer.hpp"
#include "angband.h"
+#include "object1.hpp"
#include "skills.hpp"
#include "quark.h"
#include "util.hpp"
diff --git a/src/squelch/object_status.cc b/src/squelch/object_status.cc
index 53d2055..09882a9 100644
--- a/src/squelch/object_status.cc
+++ b/src/squelch/object_status.cc
@@ -2,6 +2,7 @@
#include "tome/squelch/object_status.hpp"
#include "angband.h"
+#include "object1.hpp"
namespace squelch {
diff --git a/src/squelch/rule.cc b/src/squelch/rule.cc
index c538e31..e885024 100644
--- a/src/squelch/rule.cc
+++ b/src/squelch/rule.cc
@@ -6,6 +6,8 @@
#include "tome/squelch/tree_printer.hpp"
#include "../angband.h"
#include "../modules.hpp"
+#include "../object1.hpp"
+#include "../object2.hpp"
#include "../quark.h"
#include "../util.hpp"
diff --git a/src/squeltch.cc b/src/squeltch.cc
index 8d07d0d..dbd7831 100644
--- a/src/squeltch.cc
+++ b/src/squeltch.cc
@@ -11,6 +11,8 @@
#include "files.hpp"
#include "loadsave.hpp"
+#include "object1.hpp"
+#include "object2.hpp"
#include "tome/squelch/tree_printer.hpp"
#include "tome/squelch/condition.hpp"
#include "tome/squelch/condition_metadata.hpp"
diff --git a/src/status.cc b/src/status.cc
index 2484896..5cd4241 100644
--- a/src/status.cc
+++ b/src/status.cc
@@ -18,6 +18,7 @@
#include "angband.h"
#include "files.hpp"
#include "monster2.hpp"
+#include "object1.hpp"
#include "util.hpp"
#include "util.h"
#include "xtra1.hpp"
diff --git a/src/store.cc b/src/store.cc
index acf23d0..a770717 100644
--- a/src/store.cc
+++ b/src/store.cc
@@ -15,6 +15,8 @@
#include "cmd5.hpp"
#include "files.hpp"
#include "hooks.h"
+#include "object1.hpp"
+#include "object2.hpp"
#include "quark.h"
#include "spell_type.hpp"
#include "skills.hpp"
diff --git a/src/traps.cc b/src/traps.cc
index f636866..73d4cc5 100644
--- a/src/traps.cc
+++ b/src/traps.cc
@@ -14,6 +14,8 @@
#include "files.hpp"
#include "gods.hpp"
#include "monster2.hpp"
+#include "object1.hpp"
+#include "object2.hpp"
#include "spells1.hpp"
#include "spells2.hpp"
#include "util.hpp"
diff --git a/src/variable.cc b/src/variable.cc
index 40254a5..f7832e9 100644
--- a/src/variable.cc
+++ b/src/variable.cc
@@ -993,12 +993,6 @@ s32b RANDART_ARMOR;
s32b RANDART_JEWEL;
/*
- * Spell description
- */
-bool_ info_spell = FALSE;
-char spell_txt[50];
-
-/*
* Random spells.
*/
random_spell random_spells[MAX_SPELLS];
diff --git a/src/wizard1.cc b/src/wizard1.cc
index ff90ad2..ab715c8 100644
--- a/src/wizard1.cc
+++ b/src/wizard1.cc
@@ -4,6 +4,8 @@
#include "angband.h"
#include "cmd7.hpp"
+#include "object1.hpp"
+#include "object2.hpp"
#include "util.hpp"
#include "util.h"
diff --git a/src/wizard2.cc b/src/wizard2.cc
index 74f4ae9..634881c 100644
--- a/src/wizard2.cc
+++ b/src/wizard2.cc
@@ -15,6 +15,8 @@
#include "files.hpp"
#include "hooks.h"
#include "monster2.hpp"
+#include "object1.hpp"
+#include "object2.hpp"
#include "randart.hpp"
#include "status.hpp"
#include "spells1.hpp"
diff --git a/src/xtra1.cc b/src/xtra1.cc
index 9038e22..8add679 100644
--- a/src/xtra1.cc
+++ b/src/xtra1.cc
@@ -20,6 +20,8 @@
#include "mimic.hpp"
#include "monster1.hpp"
#include "monster2.hpp"
+#include "object1.hpp"
+#include "object2.hpp"
#include "skills.hpp"
#include "spells3.hpp"
#include "spells6.hpp"
diff --git a/src/xtra2.cc b/src/xtra2.cc
index c76485b..79f0161 100644
--- a/src/xtra2.cc
+++ b/src/xtra2.cc
@@ -19,6 +19,8 @@
#include "monster2.hpp"
#include "monster3.hpp"
#include "notes.hpp"
+#include "object1.hpp"
+#include "object2.hpp"
#include "quark.h"
#include "randart.hpp"
#include "skills.hpp"