OSDN Git Service
(root)
/
hengband
/
hengband.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b96d4a8
)
[Refactor] #37353 player_place() を player-status.c/h へ移動。 / Move player_place() to...
author
Deskull
<deskull@users.sourceforge.jp>
Tue, 12 Feb 2019 14:44:56 +0000
(23:44 +0900)
committer
Deskull
<deskull@users.sourceforge.jp>
Tue, 12 Feb 2019 14:44:56 +0000
(23:44 +0900)
src/externs.h
patch
|
blob
|
history
src/floor-generate.c
patch
|
blob
|
history
src/monster2.c
patch
|
blob
|
history
src/player-status.c
patch
|
blob
|
history
src/player-status.h
patch
|
blob
|
history
diff --git
a/src/externs.h
b/src/externs.h
index
8a24794
..
6d2dd69
100644
(file)
--- a/
src/externs.h
+++ b/
src/externs.h
@@
-758,7
+758,6
@@
extern bool multiply_monster(MONSTER_IDX m_idx, bool clone, BIT_FLAGS mode);
extern void update_smart_learn(MONSTER_IDX m_idx, int what);
extern void choose_new_monster(MONSTER_IDX m_idx, bool born, MONRACE_IDX r_idx);
extern byte get_mspeed(monster_race *r_ptr);
extern void update_smart_learn(MONSTER_IDX m_idx, int what);
extern void choose_new_monster(MONSTER_IDX m_idx, bool born, MONRACE_IDX r_idx);
extern byte get_mspeed(monster_race *r_ptr);
-extern bool player_place(POSITION y, POSITION x);
extern void monster_drop_carried_objects(monster_type *m_ptr);
/* object1.c */
extern void monster_drop_carried_objects(monster_type *m_ptr);
/* object1.c */
diff --git
a/src/floor-generate.c
b/src/floor-generate.c
index
82341e8
..
e2a7933
100644
(file)
--- a/
src/floor-generate.c
+++ b/
src/floor-generate.c
@@
-104,6
+104,7
@@
#include "trap.h"
#include "monster.h"
#include "quest.h"
#include "trap.h"
#include "monster.h"
#include "quest.h"
+#include "player-status.h"
int dun_tun_rnd;
int dun_tun_chg;
int dun_tun_rnd;
int dun_tun_chg;
diff --git
a/src/monster2.c
b/src/monster2.c
index
c071547
..
7630bc4
100644
(file)
--- a/
src/monster2.c
+++ b/
src/monster2.c
@@
-3994,8
+3994,7
@@
bool summon_named_creature(MONSTER_IDX who, POSITION oy, POSITION ox, MONRACE_ID
*/
bool multiply_monster(MONSTER_IDX m_idx, bool clone, BIT_FLAGS mode)
{
*/
bool multiply_monster(MONSTER_IDX m_idx, bool clone, BIT_FLAGS mode)
{
- monster_type *m_ptr = &m_list[m_idx];
-
+ monster_type *m_ptr = &m_list[m_idx];
POSITION y, x;
if (!mon_scatter(m_ptr->r_idx, &y, &x, m_ptr->fy, m_ptr->fx, 1))
POSITION y, x;
if (!mon_scatter(m_ptr->r_idx, &y, &x, m_ptr->fy, m_ptr->fx, 1))
@@
-4462,26
+4461,6
@@
void update_smart_learn(MONSTER_IDX m_idx, int what)
/*!
/*!
- * @brief プレイヤーを指定座標に配置する / Place the player in the dungeon XXX XXX
- * @param x 配置先X座標
- * @param y 配置先Y座標
- * @return 配置に成功したらTRUE
- */
-bool player_place(POSITION y, POSITION x)
-{
- /* Paranoia XXX XXX */
- if (grid_array[y][x].m_idx != 0) return FALSE;
-
- /* Save player location */
- p_ptr->y = y;
- p_ptr->x = x;
-
- /* Success */
- return TRUE;
-}
-
-
-/*!
* @brief モンスターが盗みや拾いで確保していたアイテムを全てドロップさせる / Drop all items carried by a monster
* @param m_ptr モンスター参照ポインタ
* @return なし
* @brief モンスターが盗みや拾いで確保していたアイテムを全てドロップさせる / Drop all items carried by a monster
* @param m_ptr モンスター参照ポインタ
* @return なし
diff --git
a/src/player-status.c
b/src/player-status.c
index
33530c4
..
46b430f
100644
(file)
--- a/
src/player-status.c
+++ b/
src/player-status.c
@@
-3822,3
+3822,22
@@
void free_turn(player_type *creature_ptr)
{
creature_ptr->energy_use = 0;
}
{
creature_ptr->energy_use = 0;
}
+
+/*!
+ * @brief プレイヤーを指定座標に配置する / Place the player in the dungeon XXX XXX
+ * @param x 配置先X座標
+ * @param y 配置先Y座標
+ * @return 配置に成功したらTRUE
+ */
+bool player_place(POSITION y, POSITION x)
+{
+ /* Paranoia XXX XXX */
+ if (grid_array[y][x].m_idx != 0) return FALSE;
+
+ /* Save player location */
+ p_ptr->y = y;
+ p_ptr->x = x;
+
+ /* Success */
+ return TRUE;
+}
diff --git
a/src/player-status.h
b/src/player-status.h
index
10991db
..
5719638
100644
(file)
--- a/
src/player-status.h
+++ b/
src/player-status.h
@@
-14,4
+14,6
@@
extern BIT_FLAGS16 empty_hands(bool riding_control);
extern bool player_has_no_spellbooks(void);
extern void take_turn(player_type *creature_ptr, PERCENTAGE need_cost);
extern bool player_has_no_spellbooks(void);
extern void take_turn(player_type *creature_ptr, PERCENTAGE need_cost);
-extern void free_turn(player_type *creature_ptr);
\ No newline at end of file
+extern void free_turn(player_type *creature_ptr);
+
+extern bool player_place(POSITION y, POSITION x);