変愚蛮怒のメインリポジトリです
Revision | d656fa339feaecb2f21efaaee88e68901e2a00c4 (tree) |
---|---|
Time | 2014-07-27 23:54:12 |
Author | Deskull <desull@user...> |
Commiter | Deskull |
Add and fix Doxygen comment to teleport functions for player and monster in spells3.c.
@@ -25,6 +25,7 @@ | ||
25 | 25 | * @param y 移動先Y座標 |
26 | 26 | * @param x 移動先X座標 |
27 | 27 | * @param mode オプション |
28 | + * @return テレポート先として妥当ならばtrue | |
28 | 29 | */ |
29 | 30 | static bool cave_monster_teleportable_bold(int m_idx, int y, int x, u32b mode) |
30 | 31 | { |
@@ -57,6 +58,7 @@ static bool cave_monster_teleportable_bold(int m_idx, int y, int x, u32b mode) | ||
57 | 58 | * @param m_idx モンスターID |
58 | 59 | * @param dis テレポート距離 |
59 | 60 | * @param mode オプション |
61 | + * @return テレポートが実際に行われたらtrue | |
60 | 62 | * @details |
61 | 63 | * Attempt to move the monster at least "dis/2" grids away. |
62 | 64 | * But allow variation to prevent infinite loops. |
@@ -174,6 +176,7 @@ bool teleport_away(int m_idx, int dis, u32b mode) | ||
174 | 176 | * @param tx 目安X座標 |
175 | 177 | * @param power テレポート成功確率 |
176 | 178 | * @param mode オプション |
179 | + * @return なし | |
177 | 180 | */ |
178 | 181 | void teleport_monster_to(int m_idx, int ty, int tx, int power, u32b mode) |
179 | 182 | { |
@@ -268,7 +271,13 @@ void teleport_monster_to(int m_idx, int ty, int tx, int power, u32b mode) | ||
268 | 271 | p_ptr->update |= (PU_MON_LITE); |
269 | 272 | } |
270 | 273 | |
271 | - | |
274 | +/*! | |
275 | + * @brief 指定されたマスにプレイヤーがテレポート可能かどうかを判定する。 | |
276 | + * @param y 移動先Y座標 | |
277 | + * @param x 移動先X座標 | |
278 | + * @param mode オプション | |
279 | + * @return テレポート先として妥当ならばtrue | |
280 | + */ | |
272 | 281 | bool cave_player_teleportable_bold(int y, int x, u32b mode) |
273 | 282 | { |
274 | 283 | cave_type *c_ptr = &cave[y][x]; |
@@ -309,9 +318,17 @@ bool cave_player_teleportable_bold(int y, int x, u32b mode) | ||
309 | 318 | } |
310 | 319 | |
311 | 320 | |
312 | -/* | |
321 | +/*! テレポート最大距離 */ | |
322 | +#define MAX_TELEPORT_DISTANCE 200 | |
323 | + | |
324 | +/*! | |
325 | + * @brief プレイヤーのテレポート先選定と移動処理 / | |
313 | 326 | * 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> | |
315 | 332 | * If no such spaces are readily available, the distance may increase. |
316 | 333 | * Try very hard to move the player at least a quarter that distance. |
317 | 334 | * |
@@ -324,10 +341,9 @@ bool cave_player_teleportable_bold(int y, int x, u32b mode) | ||
324 | 341 | * candidates is selected first, which includes at least 50% of all |
325 | 342 | * floor grids within the distance, and any single grid in this list |
326 | 343 | * of candidates has equal possibility to be choosen as a destination. |
344 | + * </pre> | |
327 | 345 | */ |
328 | 346 | |
329 | -#define MAX_TELEPORT_DISTANCE 200 | |
330 | - | |
331 | 347 | bool teleport_player_aux(int dis, u32b mode) |
332 | 348 | { |
333 | 349 | int candidates_at[MAX_TELEPORT_DISTANCE + 1]; |
@@ -438,6 +454,12 @@ bool teleport_player_aux(int dis, u32b mode) | ||
438 | 454 | return TRUE; |
439 | 455 | } |
440 | 456 | |
457 | +/*! | |
458 | + * @brief プレイヤーのテレポート処理メインルーチン | |
459 | + * @param dis 基本移動距離 | |
460 | + * @param mode オプション | |
461 | + * @return なし | |
462 | + */ | |
441 | 463 | void teleport_player(int dis, u32b mode) |
442 | 464 | { |
443 | 465 | int yy, xx; |