summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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 04b88410..f8c5d5f7 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 d139cd9b..0f6ccbf1 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 8f74cc8e..8dff71b4 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 2bfbcb60..e9ab62e6 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 8bf20c14..c5ef2cb0 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 f38b3eda..0b8a52b6 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 15f80218..ab103ff2 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 a3d8c6a8..089b6bf5 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 80e00515..01e94cb3 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 66f535ad..771d47c1 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 b7ca83ff..1446de5d 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 fce8a11c..e70ff16c 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 3dc67667..fcc81b0c 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 fe48acce..e20808bf 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 42b0fb4d..23431fe4 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 1cb83062..d8016b3d 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 28d21af1..131711e7 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 9ac7ff4c..dd349f39 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 aa5d5377..a105a6b7 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 b6df5302..bb263026 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 7012c6b5..d860eb3c 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 36081a57..f1ec9136 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 00000000..187a4d57
--- /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 0944125d..6863db6e 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 00000000..07986cd3
--- /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 fce95a6d..25742412 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 0e579d46..c43edc6b 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 28791237..dbd57df7 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 08475a0c..fb74dfc5 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 fa901f8e..0738a460 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 e10a597d..a1b05607 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 82e1f0cf..06079f92 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 7f89d807..d0ec2cc8 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 367e674d..33fb6006 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 b493f126..e2ef3e44 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 f34060cb..bdee1c6e 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 cf8747c9..26b6ef54 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 874c7e7a..6a874bbc 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 aa158247..56a3cf2f 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 c4689062..8bd11faa 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 d9fb8324..405b98e7 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 d6ad13ed..e8379aa1 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 3f40b18e..7301606c 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 53ba4633..e5b50095 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 0f1e88b9..e5b75edd 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 d1306c43..8f65961d 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 ec48d8f7..b7a94e17 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 012abf00..012bda3b 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 f38e9f5a..10cce3ba 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 c7128754..ff61521f 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 c97a1b42..ff4ae90e 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 8f839129..44d3e750 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 53d2055a..09882a9e 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 c538e310..e8850247 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 8d07d0d5..dbd78317 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 2484896c..5cd4241c 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 acf23d0b..a7707179 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 f6368663..73d4cc5a 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 40254a54..f7832e98 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 ff90ad24..ab715c8f 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 74f4ae91..634881ca 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 9038e223..8add6798 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 c76485b0..79f01617 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"