path: root/src/monster2.hpp
diff options
authorBardur Arantsson <>2015-12-11 08:09:30 +0100
committerBardur Arantsson <>2015-12-11 08:09:30 +0100
commit00be445e9127922933dae91a3d68660a57f53c5b (patch)
treea9ce274cb7cdba65e81994e719a8a40a8057d38e /src/monster2.hpp
parentf88c896138589fd2328002a7a4f097c582f79f9b (diff)
Refactor race_info_idx() to avoid "invisible" static pointers
Diffstat (limited to 'src/monster2.hpp')
1 files changed, 3 insertions, 3 deletions
diff --git a/src/monster2.hpp b/src/monster2.hpp
index ffe7b3cd..84f79e36 100644
--- a/src/monster2.hpp
+++ b/src/monster2.hpp
@@ -4,6 +4,7 @@
#include "monster_race_fwd.hpp"
#include "monster_type_fwd.hpp"
#include "object_type_fwd.hpp"
+#include <memory>
extern s32b monster_exp(s16b level);
extern void monster_set_level(int m_idx, int level);
@@ -12,8 +13,7 @@ extern void monster_msg_simple(cptr s);
extern bool_ mego_ok(monster_race const *r_ptr, int ego);
extern void monster_check_experience(int m_idx, bool_ silent);
extern void monster_gain_exp(int m_idx, u32b exp, bool_ silent);
-extern monster_race* race_info_idx(int r_idx, int ego);
-extern monster_race* race_inf(monster_type *m_ptr);
+extern std::shared_ptr<monster_race> race_info_idx(int r_idx, int ego);
extern void delete_monster_idx(int i);
extern void delete_monster(int y, int x);
extern void compact_monsters(int size);
@@ -49,4 +49,4 @@ extern bool_ monster_dungeon(int r_idx);
extern bool_ monster_quest(int r_idx);
extern void set_mon_num_hook(void);
extern void set_mon_num2_hook(int y, int x);
-extern bool_ monster_can_cross_terrain(byte feat, monster_race *r_ptr);
+extern bool_ monster_can_cross_terrain(byte feat, std::shared_ptr<monster_race> r_ptr);