summaryrefslogtreecommitdiff
path: root/src/map/skill.hpp
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2014-03-30 23:14:12 -0700
committerBen Longbons <b.r.longbons@gmail.com>2014-03-31 10:18:49 -0700
commit1a651243bb2c8e18baa9aac30ac52a62185074e7 (patch)
treedd2c0bfc448faef129fb64edec9f64d2ab12bfe5 /src/map/skill.hpp
parent769e8ac9c17779a15492d7fcfc1931c014670c2d (diff)
downloadtmwa-1a651243bb2c8e18baa9aac30ac52a62185074e7.tar.gz
tmwa-1a651243bb2c8e18baa9aac30ac52a62185074e7.tar.bz2
tmwa-1a651243bb2c8e18baa9aac30ac52a62185074e7.tar.xz
tmwa-1a651243bb2c8e18baa9aac30ac52a62185074e7.zip
Be stricter about most arrays
Diffstat (limited to 'src/map/skill.hpp')
-rw-r--r--src/map/skill.hpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/map/skill.hpp b/src/map/skill.hpp
index b612268..ece2ab5 100644
--- a/src/map/skill.hpp
+++ b/src/map/skill.hpp
@@ -22,17 +22,16 @@ struct skill_db_
SkillFlags poolflags;
int max_raise; // `max' is the global max, `max_raise' is the maximum attainable via skill-ups
int num_k;
- int cast[MAX_SKILL_LEVEL], delay[MAX_SKILL_LEVEL];
- int upkeep_time[MAX_SKILL_LEVEL], upkeep_time2[MAX_SKILL_LEVEL];
+ Array<int, MAX_SKILL_LEVEL> cast, delay;
+ Array<int, MAX_SKILL_LEVEL> upkeep_time, upkeep_time2;
bool castcancel;
int cast_def_rate;
int inf2, maxcount;
- int hp[MAX_SKILL_LEVEL], sp[MAX_SKILL_LEVEL], mhp[MAX_SKILL_LEVEL],
- hp_rate[MAX_SKILL_LEVEL], sp_rate[MAX_SKILL_LEVEL],
- zeny[MAX_SKILL_LEVEL];
+ Array<int, MAX_SKILL_LEVEL> hp, sp, mhp,
+ hprate, sp_rate,
+ zeny;
int weapon;
- int itemid[10], amount[10];
- int castnodex[MAX_SKILL_LEVEL];
+ Array<int, MAX_SKILL_LEVEL> castnodex;
};
extern
earray<skill_db_, SkillID, SkillID::MAX_SKILL_DB> skill_db;
@@ -115,7 +114,7 @@ constexpr int MAX_SKILL_POOL = 3;
// Max. # of skills that may be classified as pool skills in db/skill_db.txt
constexpr int MAX_POOL_SKILLS = 128;
-extern SkillID skill_pool_skills[MAX_POOL_SKILLS]; // All pool skills
+extern Array<SkillID, MAX_POOL_SKILLS> skill_pool_skills; // All pool skills
extern int skill_pool_skills_size; // Number of entries in skill_pool_skills
// Yields all active skills in the skill pool; no more than MAX_SKILL_POOL. Return is number of skills.