• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revision94695021e95eb3373d39b01fe00955ab2e40c7d3 (tree)
Time2019-02-14 18:57:28
AuthorDeskull <deskull@user...>
CommiterDeskull

Log Message

[Refactor] #37353 型の置換。 / Type replacement.

Change Summary

Incremental Difference

--- a/src/object2.c
+++ b/src/object2.c
@@ -45,7 +45,7 @@ static concptr const kaji_tips[5] =
4545 */
4646 static void one_sustain(object_type *o_ptr)
4747 {
48- switch (randint0(6))
48+ switch (randint0(A_MAX))
4949 {
5050 case 0: add_flag(o_ptr->art_flags, TR_SUST_STR); break;
5151 case 1: add_flag(o_ptr->art_flags, TR_SUST_INT); break;
@@ -892,7 +892,7 @@ byte value_check_aux2(object_type *o_ptr)
892892 * @param o_ptr 未鑑定価格を確認したいオブジェクトの構造体参照ポインタ
893893 * @return オブジェクトの未鑑定価格
894894 */
895-static s32b object_value_base(object_type *o_ptr)
895+static PRICE object_value_base(object_type *o_ptr)
896896 {
897897 /* Aware item -- use template cost */
898898 if (object_is_aware(o_ptr)) return (k_info[o_ptr->k_idx].cost);
@@ -953,11 +953,11 @@ static s32b object_value_base(object_type *o_ptr)
953953 * @param plusses フラグに与える価格の基本重み
954954 * @return オブジェクトのフラグ価格
955955 */
956-s32b flag_cost(object_type *o_ptr, int plusses)
956+PRICE flag_cost(object_type *o_ptr, int plusses)
957957 {
958- s32b total = 0;
958+ PRICE total = 0;
959959 BIT_FLAGS flgs[TR_FLAG_SIZE];
960- s32b tmp_cost;
960+ PRICE tmp_cost;
961961 int count;
962962 int i;
963963 object_kind *k_ptr = &k_info[o_ptr->k_idx];
@@ -1470,11 +1470,9 @@ PRICE object_value(object_type *o_ptr)
14701470 value = object_value_base(o_ptr);
14711471 }
14721472
1473-
14741473 /* Apply discount (if any) */
14751474 if (o_ptr->discount) value -= (value * o_ptr->discount / 100L);
14761475
1477-
14781476 /* Return the final value */
14791477 return (value);
14801478 }
Show on old repository browser