• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

変愚蛮怒のメインリポジトリです


Commit MetaInfo

Revisiond656fa339feaecb2f21efaaee88e68901e2a00c4 (tree)
Time2014-07-27 23:54:12
AuthorDeskull <desull@user...>
CommiterDeskull

Log Message

Add and fix Doxygen comment to teleport functions for player and monster in spells3.c.

Change Summary

Incremental Difference

--- a/src/spells3.c
+++ b/src/spells3.c
@@ -25,6 +25,7 @@
2525 * @param y 移動先Y座標
2626 * @param x 移動先X座標
2727 * @param mode オプション
28+ * @return テレポート先として妥当ならばtrue
2829 */
2930 static bool cave_monster_teleportable_bold(int m_idx, int y, int x, u32b mode)
3031 {
@@ -57,6 +58,7 @@ static bool cave_monster_teleportable_bold(int m_idx, int y, int x, u32b mode)
5758 * @param m_idx モンスターID
5859 * @param dis テレポート距離
5960 * @param mode オプション
61+ * @return テレポートが実際に行われたらtrue
6062 * @details
6163 * Attempt to move the monster at least "dis/2" grids away.
6264 * But allow variation to prevent infinite loops.
@@ -174,6 +176,7 @@ bool teleport_away(int m_idx, int dis, u32b mode)
174176 * @param tx 目安X座標
175177 * @param power テレポート成功確率
176178 * @param mode オプション
179+ * @return なし
177180 */
178181 void teleport_monster_to(int m_idx, int ty, int tx, int power, u32b mode)
179182 {
@@ -268,7 +271,13 @@ void teleport_monster_to(int m_idx, int ty, int tx, int power, u32b mode)
268271 p_ptr->update |= (PU_MON_LITE);
269272 }
270273
271-
274+/*!
275+ * @brief 指定されたマスにプレイヤーがテレポート可能かどうかを判定する。
276+ * @param y 移動先Y座標
277+ * @param x 移動先X座標
278+ * @param mode オプション
279+ * @return テレポート先として妥当ならばtrue
280+ */
272281 bool cave_player_teleportable_bold(int y, int x, u32b mode)
273282 {
274283 cave_type *c_ptr = &cave[y][x];
@@ -309,9 +318,17 @@ bool cave_player_teleportable_bold(int y, int x, u32b mode)
309318 }
310319
311320
312-/*
321+/*! テレポート最大距離 */
322+#define MAX_TELEPORT_DISTANCE 200
323+
324+/*!
325+ * @brief プレイヤーのテレポート先選定と移動処理 /
313326 * Teleport the player to a location up to "dis" grids away.
314- *
327+ * @param dis 基本移動距離
328+ * @param mode オプション
329+ * @return 実際にテレポート処理が行われたらtrue
330+ * @details
331+ * <pre>
315332 * If no such spaces are readily available, the distance may increase.
316333 * Try very hard to move the player at least a quarter that distance.
317334 *
@@ -324,10 +341,9 @@ bool cave_player_teleportable_bold(int y, int x, u32b mode)
324341 * candidates is selected first, which includes at least 50% of all
325342 * floor grids within the distance, and any single grid in this list
326343 * of candidates has equal possibility to be choosen as a destination.
344+ * </pre>
327345 */
328346
329-#define MAX_TELEPORT_DISTANCE 200
330-
331347 bool teleport_player_aux(int dis, u32b mode)
332348 {
333349 int candidates_at[MAX_TELEPORT_DISTANCE + 1];
@@ -438,6 +454,12 @@ bool teleport_player_aux(int dis, u32b mode)
438454 return TRUE;
439455 }
440456
457+/*!
458+ * @brief プレイヤーのテレポート処理メインルーチン
459+ * @param dis 基本移動距離
460+ * @param mode オプション
461+ * @return なし
462+ */
441463 void teleport_player(int dis, u32b mode)
442464 {
443465 int yy, xx;
Show on old repository browser