diff options
author | Bardur Arantsson <bardur@scientician.net> | 2016-10-05 18:45:08 +0200 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2016-10-05 18:49:37 +0200 |
commit | 0c2f30b56c221a826ba64f0ec864c29d0f717644 (patch) | |
tree | a7b38e7b9cf9a06aacd56ec8a7177d44d001c1df /src/spells1.cc | |
parent | 5ddcbbf1cdce68e565376819efedd519892512ad (diff) |
Move r_info into GameEditData
Diffstat (limited to 'src/spells1.cc')
-rw-r--r-- | src/spells1.cc | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/spells1.cc b/src/spells1.cc index 8be8b06a..ed10c525 100644 --- a/src/spells1.cc +++ b/src/spells1.cc @@ -92,7 +92,9 @@ using std::chrono::milliseconds; */ s16b poly_r_idx(int r_idx) { - monster_race *r_ptr = &r_info[r_idx]; + auto const &r_info = game->edit_data.r_info; + + auto r_ptr = &r_info[r_idx]; int i, r; @@ -3812,6 +3814,8 @@ static int raise_ego[MAX_RAISE] = */ static bool_ project_o(int who, int r, int y, int x, int dam, int typ) { + auto const &r_info = game->edit_data.r_info; + cave_type *c_ptr = &cave[y][x]; bool_ obvious = FALSE; @@ -3864,8 +3868,9 @@ static bool_ project_o(int who, int r, int y, int x, int dam, int typ) { if (o_ptr->tval == TV_CORPSE) { - monster_race *r_ptr = &r_info[o_ptr->pval2]; - s32b dama, radius = 7; + auto r_ptr = &r_info[o_ptr->pval2]; + s32b radius = 7; + s32b dama; if (r_ptr->flags & RF_FORCE_MAXHP) dama = maxroll(r_ptr->hdice, r_ptr->hside); @@ -4094,7 +4099,7 @@ static bool_ project_o(int who, int r, int y, int x, int dam, int typ) } case GF_RAISE_DEMON: { - monster_race *r_ptr = &r_info[o_ptr->pval2]; + auto r_ptr = &r_info[o_ptr->pval2]; cptr name; if (o_ptr->tval != TV_CORPSE) break; @@ -6907,6 +6912,7 @@ bool_ unsafe = FALSE; static bool_ project_p(int who, int r, int y, int x, int dam, int typ, int a_rad) { auto const &d_info = game->edit_data.d_info; + auto const &r_info = game->edit_data.r_info; int k = 0, do_move = 0, a = 0, b = 0, x1 = 0, y1 = 0; |