summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/skills.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2012-06-23 02:28:46 +0200
committerAdam Borowski <kilobyte@angband.pl>2012-06-23 20:57:56 +0200
commitceaff5dee3286c9a53c3fa39f3e10e4c00a0f03b (patch)
tree0e6d91a26156375d029ab87d0d7f097ea5be23b8 /crawl-ref/source/skills.cc
parentafb1d1f468006a809ebf73cdedbe5f6dc82ee1ab (diff)
downloadcrawl-ref-ceaff5dee3286c9a53c3fa39f3e10e4c00a0f03b.tar.gz
crawl-ref-ceaff5dee3286c9a53c3fa39f3e10e4c00a0f03b.zip
Make a bunch of functions static or gone.
Diffstat (limited to 'crawl-ref/source/skills.cc')
-rw-r--r--crawl-ref/source/skills.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/crawl-ref/source/skills.cc b/crawl-ref/source/skills.cc
index fce499a9c2..fb2cb0fd45 100644
--- a/crawl-ref/source/skills.cc
+++ b/crawl-ref/source/skills.cc
@@ -45,6 +45,7 @@
#define MAX_SPENDING_LIMIT 250
static int _train(skill_type exsk, int &max_exp, bool simu = false);
+static void _train_skills(int exp, const int cost, const bool simu);
// The progress of skill_cost_level depends only on total experience points,
// it's independent of species. We try to keep close to the old system
@@ -737,14 +738,14 @@ void train_skills(bool simu)
cost = calc_skill_cost(you.skill_cost_level);
exp = you.exp_available;
if (you.skill_cost_level == 27)
- train_skills(exp, cost, simu);
+ _train_skills(exp, cost, simu);
else
{
// Amount of experience points needed to reach the next skill cost level
const int next_level = skill_cost_needed(you.skill_cost_level + 1)
- you.total_experience;
ASSERT(next_level > 0);
- train_skills(std::min(exp, next_level + cost - 1), cost, simu);
+ _train_skills(std::min(exp, next_level + cost - 1), cost, simu);
}
}
while (you.exp_available >= cost && exp != you.exp_available);
@@ -757,7 +758,7 @@ void train_skills(bool simu)
}
//#define DEBUG_TRAINING_COST
-void train_skills(int exp, const int cost, const bool simu)
+static void _train_skills(int exp, const int cost, const bool simu)
{
bool skip_first_phase = false;
int magic_gain = 0;