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
commit35949210fde3b7800c6c0e087a7d780467879c95 (patch)
tree00008f44eab4d5703e0cb053a15f3ac8624f02f0 /src
parent05f1835fd9ec10fa3dd3c9962605e889ec0fc698 (diff)
Move wizard2.cc declarations to separate header file
Move the tvals[] array to variable.cc together with most of the other globals. Mark a few local functions "static" while we're at it.
Diffstat (limited to 'src')
-rw-r--r--src/dungeon.cc1
-rw-r--r--src/externs.h7
-rw-r--r--src/spells1.cc1
-rw-r--r--src/variable.cc54
-rw-r--r--src/wizard2.cc62
-rw-r--r--src/wizard2.hpp5
6 files changed, 66 insertions, 64 deletions
diff --git a/src/dungeon.cc b/src/dungeon.cc
index a446e2da..d3fef917 100644
--- a/src/dungeon.cc
+++ b/src/dungeon.cc
@@ -51,6 +51,7 @@
#include "util.hpp"
#include "util.h"
#include "wild.hpp"
+#include "wizard2.hpp"
#include "xtra1.hpp"
#include "xtra2.hpp"
diff --git a/src/externs.h b/src/externs.h
index b2380840..1b2ff5b6 100644
--- a/src/externs.h
+++ b/src/externs.h
@@ -458,6 +458,7 @@ extern s32b DUNGEON_ASTRAL_WILD_Y;
extern deity_type deity_info[MAX_GODS];
extern timer_type *gl_timers;
extern const char *get_version_string();
+extern tval_desc2 tvals[];
/* birth.c */
extern bool_ no_begin_screen;
@@ -481,12 +482,6 @@ extern bool_ private_check_user_directory(cptr dirpath);
/* wizard1.c */
extern void do_cmd_spoilers();
-/* wizard2.c */
-extern void do_cmd_wiz_cure_all(void);
-extern void do_cmd_wiz_named_friendly(int r_idx, bool_ slp);
-extern void do_cmd_debug();
-extern tval_desc2 tvals[];
-
/*
* Hack -- conditional (or "bizarre") externs
*/
diff --git a/src/spells1.cc b/src/spells1.cc
index 012bda3b..cbfe58f9 100644
--- a/src/spells1.cc
+++ b/src/spells1.cc
@@ -27,6 +27,7 @@
#include "traps.hpp"
#include "util.hpp"
#include "util.h"
+#include "wizard2.hpp"
#include "xtra1.hpp"
#include "xtra2.hpp"
diff --git a/src/variable.cc b/src/variable.cc
index f7832e98..b6e58cbd 100644
--- a/src/variable.cc
+++ b/src/variable.cc
@@ -1215,3 +1215,57 @@ const char *get_version_string()
}
return version_str;
}
+
+/*
+ * A list of tvals and their textual names
+ */
+tval_desc2 tvals[] =
+{
+ { TV_SWORD, "Sword" },
+ { TV_POLEARM, "Polearm" },
+ { TV_HAFTED, "Hafted Weapon" },
+ { TV_AXE, "Axe" },
+ { TV_BOW, "Bow" },
+ { TV_BOOMERANG, "Boomerang" },
+ { TV_ARROW, "Arrows" },
+ { TV_BOLT, "Bolts" },
+ { TV_SHOT, "Shots" },
+ { TV_SHIELD, "Shield" },
+ { TV_CROWN, "Crown" },
+ { TV_HELM, "Helm" },
+ { TV_GLOVES, "Gloves" },
+ { TV_BOOTS, "Boots" },
+ { TV_CLOAK, "Cloak" },
+ { TV_DRAG_ARMOR, "Dragon Scale Mail" },
+ { TV_HARD_ARMOR, "Hard Armor" },
+ { TV_SOFT_ARMOR, "Soft Armor" },
+ { TV_RING, "Ring" },
+ { TV_AMULET, "Amulet" },
+ { TV_LITE, "Lite" },
+ { TV_POTION, "Potion" },
+ { TV_POTION2, "Potion" },
+ { TV_SCROLL, "Scroll" },
+ { TV_WAND, "Wand" },
+ { TV_STAFF, "Staff" },
+ { TV_ROD_MAIN, "Rod" },
+ { TV_ROD, "Rod Tip" },
+ { TV_BOOK, "Schools Spellbook", },
+ { TV_SYMBIOTIC_BOOK, "Symbiotic Spellbook", },
+ { TV_DRUID_BOOK, "Elemental Stone" },
+ { TV_MUSIC_BOOK, "Music Book" },
+ { TV_DAEMON_BOOK, "Daemon Book" },
+ { TV_SPIKE, "Spikes" },
+ { TV_DIGGING, "Digger" },
+ { TV_CHEST, "Chest" },
+ { TV_FOOD, "Food" },
+ { TV_FLASK, "Flask" },
+ { TV_MSTAFF, "Mage Staff" },
+ { TV_BATERIE, "Essence" },
+ { TV_PARCHMENT, "Parchment" },
+ { TV_INSTRUMENT, "Musical Instrument" },
+ { TV_RUNE1, "Rune 1" },
+ { TV_RUNE2, "Rune 2" },
+ { TV_JUNK, "Junk" },
+ { TV_TRAPKIT, "Trapping Kit" },
+ { 0, NULL }
+};
diff --git a/src/wizard2.cc b/src/wizard2.cc
index 634881ca..a1e1e462 100644
--- a/src/wizard2.cc
+++ b/src/wizard2.cc
@@ -30,7 +30,7 @@
/*
* Adds a lvl to a monster
*/
-void wiz_inc_monster_level(int level)
+static void wiz_inc_monster_level(int level)
{
monster_type *m_ptr;
int ii, jj;
@@ -46,7 +46,7 @@ void wiz_inc_monster_level(int level)
}
}
-void wiz_align_monster(int status)
+static void wiz_align_monster(int status)
{
monster_type *m_ptr;
int ii, jj;
@@ -64,7 +64,7 @@ void wiz_align_monster(int status)
/*
* Teleport directly to a town
*/
-void teleport_player_town(int town)
+static void teleport_player_town(int town)
{
int x = 0, y = 0;
@@ -490,60 +490,6 @@ static void wiz_display_item(object_type *o_ptr)
}
-/*
- * A list of tvals and their textual names
- */
-tval_desc2 tvals[] =
-{
- { TV_SWORD, "Sword" },
- { TV_POLEARM, "Polearm" },
- { TV_HAFTED, "Hafted Weapon" },
- { TV_AXE, "Axe" },
- { TV_BOW, "Bow" },
- { TV_BOOMERANG, "Boomerang" },
- { TV_ARROW, "Arrows" },
- { TV_BOLT, "Bolts" },
- { TV_SHOT, "Shots" },
- { TV_SHIELD, "Shield" },
- { TV_CROWN, "Crown" },
- { TV_HELM, "Helm" },
- { TV_GLOVES, "Gloves" },
- { TV_BOOTS, "Boots" },
- { TV_CLOAK, "Cloak" },
- { TV_DRAG_ARMOR, "Dragon Scale Mail" },
- { TV_HARD_ARMOR, "Hard Armor" },
- { TV_SOFT_ARMOR, "Soft Armor" },
- { TV_RING, "Ring" },
- { TV_AMULET, "Amulet" },
- { TV_LITE, "Lite" },
- { TV_POTION, "Potion" },
- { TV_POTION2, "Potion" },
- { TV_SCROLL, "Scroll" },
- { TV_WAND, "Wand" },
- { TV_STAFF, "Staff" },
- { TV_ROD_MAIN, "Rod" },
- { TV_ROD, "Rod Tip" },
- { TV_BOOK, "Schools Spellbook", },
- { TV_SYMBIOTIC_BOOK, "Symbiotic Spellbook", },
- { TV_DRUID_BOOK, "Elemental Stone" },
- { TV_MUSIC_BOOK, "Music Book" },
- { TV_DAEMON_BOOK, "Daemon Book" },
- { TV_SPIKE, "Spikes" },
- { TV_DIGGING, "Digger" },
- { TV_CHEST, "Chest" },
- { TV_FOOD, "Food" },
- { TV_FLASK, "Flask" },
- { TV_MSTAFF, "Mage Staff" },
- { TV_BATERIE, "Essence" },
- { TV_PARCHMENT, "Parchment" },
- { TV_INSTRUMENT, "Musical Instrument" },
- { TV_RUNE1, "Rune 1" },
- { TV_RUNE2, "Rune 2" },
- { TV_JUNK, "Junk" },
- { TV_TRAPKIT, "Trapping Kit" },
- { 0, NULL }
-};
-
/*
* Strip an "object name" into a buffer
@@ -1585,7 +1531,7 @@ static void do_cmd_wiz_zap(void)
}
-extern void do_cmd_wiz_body(s16b bidx)
+static void do_cmd_wiz_body(s16b bidx)
/* Might create problems with equipment slots. For safety,
be nude when calling this function */
{
diff --git a/src/wizard2.hpp b/src/wizard2.hpp
index a096bec5..cec515c8 100644
--- a/src/wizard2.hpp
+++ b/src/wizard2.hpp
@@ -1,3 +1,8 @@
#pragma once
+#include "h-basic.h"
+
extern void do_cmd_rerate(void);
+extern void do_cmd_wiz_cure_all(void);
+extern void do_cmd_wiz_named_friendly(int r_idx, bool_ slp);
+extern void do_cmd_debug();