変愚蛮怒のメインリポジトリです
Revision | e5a1c3f8b53d2f9d37c4dd9ac94948afaa146c23 (tree) |
---|---|
Time | 2014-01-25 21:53:06 |
Author | deskull <deskull@0568...> |
Commiter | deskull |
Add Doxygen comment to cmd5.c.
@@ -47,7 +47,7 @@ cptr spell_category_name(int tval) | ||
47 | 47 | |
48 | 48 | bool select_the_force = FALSE; |
49 | 49 | |
50 | -/* | |
50 | +/*! | |
51 | 51 | * @brief 領域魔法の閲覧、学習、使用選択するインターフェイス処理 |
52 | 52 | * Allow user to choose a spell/prayer from the given book. |
53 | 53 | * @param sn 選択した魔法IDを返す参照ポインタ |
@@ -347,7 +347,7 @@ static int get_spell(int *sn, cptr prompt, int sval, bool learned, int use_realm | ||
347 | 347 | return TRUE; |
348 | 348 | } |
349 | 349 | |
350 | -/* | |
350 | +/*! | |
351 | 351 | * @brief オブジェクトがプレイヤーが使用可能な魔道書かどうかを判定する |
352 | 352 | * @param 判定したいオブ会ジェクトの構造体参照ポインタ |
353 | 353 | * @return 学習できる魔道書ならばTRUEを返す |
@@ -376,7 +376,7 @@ static bool item_tester_learn_spell(object_type *o_ptr) | ||
376 | 376 | return (FALSE); |
377 | 377 | } |
378 | 378 | |
379 | -/* | |
379 | +/*! | |
380 | 380 | * @brief プレイヤーが魔道書を一冊も持っていないかを判定する |
381 | 381 | * @return 魔道書を一冊も持っていないならTRUEを返す |
382 | 382 | */ |
@@ -400,7 +400,11 @@ static bool player_has_no_spellbooks(void) | ||
400 | 400 | return TRUE; |
401 | 401 | } |
402 | 402 | |
403 | - | |
403 | +/*! | |
404 | + * @brief プレイヤーの職業が練気術師の時、領域魔法と練気術を切り換える処理のインターフェイス | |
405 | + * @param browse_only 魔法と技能の閲覧を行うならばTRUE | |
406 | + * @return 魔道書を一冊も持っていないならTRUEを返す | |
407 | + */ | |
404 | 408 | static void confirm_use_force(bool browse_only) |
405 | 409 | { |
406 | 410 | int item; |
@@ -453,13 +457,17 @@ static void confirm_use_force(bool browse_only) | ||
453 | 457 | } |
454 | 458 | |
455 | 459 | |
456 | -/* | |
460 | +/*! | |
461 | + * @brief プレイヤーの魔法と技能を閲覧するコマンドのメインルーチン / | |
457 | 462 | * Peruse the spells/prayers in a book |
458 | - * | |
463 | + * @return なし | |
464 | + * @details | |
465 | + * <pre> | |
459 | 466 | * Note that *all* spells in the book are listed |
460 | 467 | * |
461 | 468 | * Note that browsing is allowed while confused or blind, |
462 | 469 | * and in the dark, primarily to allow browsing in stores. |
470 | + * </pre> | |
463 | 471 | */ |
464 | 472 | void do_cmd_browse(void) |
465 | 473 | { |
@@ -630,7 +638,11 @@ void do_cmd_browse(void) | ||
630 | 638 | screen_load(); |
631 | 639 | } |
632 | 640 | |
633 | - | |
641 | +/*! | |
642 | + * @brief プレイヤーの第二魔法領域を変更する / | |
643 | + * @param 変更先の魔法領域ID | |
644 | + * @return なし | |
645 | + */ | |
634 | 646 | static void change_realm2(int next_realm) |
635 | 647 | { |
636 | 648 | int i, j = 0; |
@@ -670,8 +682,10 @@ static void change_realm2(int next_realm) | ||
670 | 682 | } |
671 | 683 | |
672 | 684 | |
673 | -/* | |
685 | +/*! | |
686 | + * @brief 魔法を学習するコマンドのメインルーチン / | |
674 | 687 | * Study a book to gain a new spell/prayer |
688 | + * @return なし | |
675 | 689 | */ |
676 | 690 | void do_cmd_study(void) |
677 | 691 | { |
@@ -1107,8 +1121,10 @@ static void wild_magic(int spell) | ||
1107 | 1121 | } |
1108 | 1122 | |
1109 | 1123 | |
1110 | -/* | |
1124 | +/*! | |
1125 | + * @brief 魔法を詠唱するコマンドのメインルーチン / | |
1111 | 1126 | * Cast a spell |
1127 | + * @return なし | |
1112 | 1128 | */ |
1113 | 1129 | void do_cmd_cast(void) |
1114 | 1130 | { |
@@ -1644,7 +1660,14 @@ msg_print(" | ||
1644 | 1660 | p_ptr->window |= (PW_SPELL); |
1645 | 1661 | } |
1646 | 1662 | |
1647 | - | |
1663 | +/*! | |
1664 | + * @brief ペットになっているモンスターをソートするための比較処理 | |
1665 | + * @param u モンスターの構造体配列 | |
1666 | + * @param v 未使用 | |
1667 | + * @param a 比較対象のモンスターID1 | |
1668 | + * @param b 比較対象のモンスターID2 | |
1669 | + * @return 2番目が大ならばTRUEを返す | |
1670 | + */ | |
1648 | 1671 | static bool ang_sort_comp_pet_dismiss(vptr u, vptr v, int a, int b) |
1649 | 1672 | { |
1650 | 1673 | u16b *who = (u16b*)(u); |
@@ -1681,6 +1704,12 @@ static bool ang_sort_comp_pet_dismiss(vptr u, vptr v, int a, int b) | ||
1681 | 1704 | return w1 <= w2; |
1682 | 1705 | } |
1683 | 1706 | |
1707 | +/*! | |
1708 | + * @brief ペットの善悪属性に応じた維持コストの途中計算処理 | |
1709 | + * @param m_ptr 計算基準となるモンスターの構造体参照ポインタ | |
1710 | + * @param inc m_ptrで指定したモンスターを維持コスト計算に加えるならTRUE、外すならFALSEを指定 | |
1711 | + * @return なし | |
1712 | + */ | |
1684 | 1713 | void check_pets_num_and_align(monster_type *m_ptr, bool inc) |
1685 | 1714 | { |
1686 | 1715 | s32b old_friend_align = friend_align; |
@@ -1702,6 +1731,10 @@ void check_pets_num_and_align(monster_type *m_ptr, bool inc) | ||
1702 | 1731 | if (old_friend_align != friend_align) p_ptr->update |= (PU_BONUS); |
1703 | 1732 | } |
1704 | 1733 | |
1734 | +/*! | |
1735 | + * @brief ペットの維持コスト計算 | |
1736 | + * @return 維持コスト(%) | |
1737 | + */ | |
1705 | 1738 | int calculate_upkeep(void) |
1706 | 1739 | { |
1707 | 1740 | s32b old_friend_align = friend_align; |