• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revisiond680ae77a35d6190e2c92c581d3ddac4d8395a8a (tree)
Time2019-01-08 22:36:18
AuthorDeskull <deskull@user...>
CommiterDeskull

Log Message

[Refactor] #38852 p_ptr->notice を p_ptr->update へ統合。 / Integrate p_ptr->notice to p_ptr->update.

Change Summary

Incremental Difference

--- a/src/autopick.c
+++ b/src/autopick.c
@@ -1597,7 +1597,7 @@ static void auto_destroy_item(object_type *o_ptr, int autopick_idx)
15971597
15981598 /* Destroy Later */
15991599 o_ptr->marked |= OM_AUTODESTROY;
1600- p_ptr->notice |= PN_AUTODESTROY;
1600+ p_ptr->update |= PU_AUTODESTROY;
16011601
16021602 return;
16031603 }
--- a/src/bldg.c
+++ b/src/bldg.c
@@ -3549,7 +3549,7 @@ if (get_check(format("そのロッドを$%d で再充填しますか?",
35493549 #endif
35503550
35513551 /* Combine / Reorder the pack (later) */
3552- p_ptr->notice |= (PN_COMBINE | PN_REORDER);
3552+ p_ptr->update |= (PU_COMBINE | PU_REORDER);
35533553
35543554 p_ptr->window |= (PW_INVEN);
35553555
@@ -3693,7 +3693,7 @@ static void building_recharge_all(void)
36933693 msg_print(NULL);
36943694
36953695 /* Combine / Reorder the pack (later) */
3696- p_ptr->notice |= (PN_COMBINE | PN_REORDER);
3696+ p_ptr->update |= (PU_COMBINE | PU_REORDER);
36973697
36983698 p_ptr->window |= (PW_INVEN);
36993699
--- a/src/cmd-eat.c
+++ b/src/cmd-eat.c
@@ -298,7 +298,7 @@ void do_cmd_eat_food_aux(INVENTORY_IDX item)
298298 }
299299
300300 /* Combine / Reorder the pack (later) */
301- p_ptr->notice |= (PN_COMBINE | PN_REORDER);
301+ p_ptr->update |= (PU_COMBINE | PU_REORDER);
302302
303303 if (!(object_is_aware(o_ptr)))
304304 {
@@ -355,7 +355,7 @@ void do_cmd_eat_food_aux(INVENTORY_IDX item)
355355 o_ptr->ident |= (IDENT_EMPTY);
356356
357357 /* Combine / Reorder the pack (later) */
358- p_ptr->notice |= (PN_COMBINE | PN_REORDER);
358+ p_ptr->update |= (PU_COMBINE | PU_REORDER);
359359 p_ptr->window |= (PW_INVEN);
360360
361361 return;
--- a/src/cmd-item.c
+++ b/src/cmd-item.c
@@ -981,7 +981,7 @@ void do_cmd_uninscribe(void)
981981 o_ptr->inscription = 0;
982982
983983 /* Combine the pack */
984- p_ptr->notice |= (PN_COMBINE);
984+ p_ptr->update |= (PU_COMBINE);
985985
986986 p_ptr->window |= (PW_INVEN | PW_EQUIP);
987987
@@ -1044,7 +1044,7 @@ void do_cmd_inscribe(void)
10441044 o_ptr->inscription = quark_add(out_val);
10451045
10461046 /* Combine the pack */
1047- p_ptr->notice |= (PN_COMBINE);
1047+ p_ptr->update |= (PU_COMBINE);
10481048
10491049 p_ptr->window |= (PW_INVEN | PW_EQUIP);
10501050
--- a/src/cmd-quaff.c
+++ b/src/cmd-quaff.c
@@ -534,7 +534,7 @@ void do_cmd_quaff_potion_aux(INVENTORY_IDX item)
534534 }
535535
536536 /* Combine / Reorder the pack (later) */
537- p_ptr->notice |= (PN_COMBINE | PN_REORDER);
537+ p_ptr->update |= (PU_COMBINE | PU_REORDER);
538538
539539 if (!(object_is_aware(q_ptr)))
540540 {
--- a/src/cmd-read.c
+++ b/src/cmd-read.c
@@ -554,7 +554,7 @@ void do_cmd_read_scroll_aux(INVENTORY_IDX item, bool known)
554554
555555
556556 /* Combine / Reorder the pack (later) */
557- p_ptr->notice |= (PN_COMBINE | PN_REORDER);
557+ p_ptr->update |= (PU_COMBINE | PU_REORDER);
558558
559559 if (!(object_is_aware(o_ptr)))
560560 {
--- a/src/cmd-usestaff.c
+++ b/src/cmd-usestaff.c
@@ -386,7 +386,7 @@ void do_cmd_use_staff_aux(INVENTORY_IDX item)
386386 o_ptr->ident |= (IDENT_EMPTY);
387387
388388 /* Combine / Reorder the pack (later) */
389- p_ptr->notice |= (PN_COMBINE | PN_REORDER);
389+ p_ptr->update |= (PU_COMBINE | PU_REORDER);
390390 p_ptr->window |= (PW_INVEN);
391391
392392 return;
@@ -405,7 +405,7 @@ void do_cmd_use_staff_aux(INVENTORY_IDX item)
405405 }
406406
407407 /* Combine / Reorder the pack (later) */
408- p_ptr->notice |= (PN_COMBINE | PN_REORDER);
408+ p_ptr->update |= (PU_COMBINE | PU_REORDER);
409409
410410 /* Tried the item */
411411 object_tried(o_ptr);
--- a/src/cmd-zaprod.c
+++ b/src/cmd-zaprod.c
@@ -366,7 +366,7 @@ void do_cmd_zap_rod_aux(INVENTORY_IDX item)
366366 if (use_charge) o_ptr->timeout += k_ptr->pval;
367367
368368 /* Combine / Reorder the pack (later) */
369- p_ptr->notice |= (PN_COMBINE | PN_REORDER);
369+ p_ptr->update |= (PU_COMBINE | PU_REORDER);
370370
371371 if (!(object_is_aware(o_ptr)))
372372 {
--- a/src/cmd-zapwand.c
+++ b/src/cmd-zapwand.c
@@ -396,7 +396,7 @@ void do_cmd_aim_wand_aux(INVENTORY_IDX item)
396396 o_ptr->ident |= (IDENT_EMPTY);
397397
398398 /* Combine / Reorder the pack (later) */
399- p_ptr->notice |= (PN_COMBINE | PN_REORDER);
399+ p_ptr->update |= (PU_COMBINE | PU_REORDER);
400400 p_ptr->window |= (PW_INVEN);
401401
402402 return;
@@ -407,7 +407,7 @@ void do_cmd_aim_wand_aux(INVENTORY_IDX item)
407407 ident = wand_effect(o_ptr->sval, dir, FALSE, FALSE);
408408
409409 /* Combine / Reorder the pack (later) */
410- p_ptr->notice |= (PN_COMBINE | PN_REORDER);
410+ p_ptr->update |= (PU_COMBINE | PU_REORDER);
411411
412412 if (!(object_is_aware(o_ptr)))
413413 {
--- a/src/cmd2.c
+++ b/src/cmd2.c
@@ -2172,8 +2172,10 @@ void do_cmd_rest(void)
21722172 resting = command_arg;
21732173 p_ptr->action = ACTION_REST;
21742174 p_ptr->update |= (PU_BONUS);
2175+ update_creature();
2176+
21752177 p_ptr->redraw |= (PR_STATE);
2176- handle_stuff();
2178+ update_output();
21772179
21782180 Term_fresh();
21792181 }
--- a/src/cmd4.c
+++ b/src/cmd4.c
@@ -973,7 +973,7 @@ void do_cmd_redraw(void)
973973
974974
975975 /* Combine and Reorder the pack (later) */
976- p_ptr->notice |= (PN_COMBINE | PN_REORDER);
976+ p_ptr->update |= (PU_COMBINE | PU_REORDER);
977977
978978
979979 p_ptr->update |= (PU_TORCH);
--- a/src/cmd5.c
+++ b/src/cmd5.c
@@ -570,7 +570,7 @@ static void change_realm2(CHARACTER_IDX next_realm)
570570 p_ptr->old_realm |= 1 << (p_ptr->realm2-1);
571571 p_ptr->realm2 = next_realm;
572572
573- p_ptr->notice |= (PN_REORDER);
573+ p_ptr->update |= (PU_REORDER);
574574 p_ptr->update |= (PU_SPELLS);
575575 handle_stuff();
576576
--- a/src/defines.h
+++ b/src/defines.h
@@ -2645,13 +2645,6 @@
26452645 #define USE_FULL 0x20 /*!< アイテム表示/選択範囲: 空欄まですべて表示する*/
26462646
26472647
2648-/*
2649- * p_ptr->noticeに充てるアイテム更新処理要求 / Bit flags for the "p_ptr->notice" variable
2650- */
2651-#define PN_COMBINE 0x00000001L /*!< アイテム処理フラグ: アイテムの結合を要する / Combine the pack */
2652-#define PN_REORDER 0x00000002L /*!< アイテム処理フラグ: アイテムの並び替えを要する / Reorder the pack */
2653-#define PN_AUTODESTROY 0x00000004L /*!< アイテム処理フラグ: アイテムの自動破壊を要する / Auto-destroy marked item */
2654-/* xxx (many) */
26552648
26562649
26572650 /*
@@ -2664,6 +2657,9 @@
26642657 #define PU_MANA 0x00000020L /*!< ステータス更新フラグ: MP / Calculate csp and msp */
26652658 #define PU_SPELLS 0x00000040L /*!< ステータス更新フラグ: 魔法学習数 / Calculate spells */
26662659 /* xxx (many) */
2660+#define PU_COMBINE 0x00000100L /*!< アイテム処理フラグ: アイテムの結合を要する / Combine the pack */
2661+#define PU_REORDER 0x00000200L /*!< アイテム処理フラグ: アイテムの並び替えを要する / Reorder the pack */
2662+#define PU_AUTODESTROY 0x00000400L /*!< アイテム処理フラグ: アイテムの自動破壊を要する / Auto-destroy marked item */
26672663 /* xxx (many) */
26682664 #define PU_UN_VIEW 0x00010000L /*!< ステータス更新フラグ: 地形の視界外化 / Forget view */
26692665 #define PU_UN_LITE 0x00020000L /*!< ステータス更新フラグ: 明暗範囲の視界外化 / Forget lite */
--- a/src/dungeon.c
+++ b/src/dungeon.c
@@ -149,7 +149,7 @@ static void sense_inventory_aux(INVENTORY_IDX slot, bool heavy)
149149 autopick_alter_item(slot, destroy_feeling);
150150
151151 /* Combine / Reorder the pack (later) */
152- p_ptr->notice |= (PN_COMBINE | PN_REORDER);
152+ p_ptr->update |= (PU_COMBINE | PU_REORDER);
153153
154154 p_ptr->window |= (PW_INVEN | PW_EQUIP);
155155 }
@@ -972,7 +972,7 @@ static void regen_captured_monsters(void)
972972 if (heal)
973973 {
974974 /* Combine pack */
975- p_ptr->notice |= (PN_COMBINE);
975+ p_ptr->update |= (PU_COMBINE);
976976 p_ptr->window |= (PW_INVEN);
977977 p_ptr->window |= (PW_EQUIP);
978978 wild_regen = 20;
@@ -5431,7 +5431,7 @@ static void dungeon(bool load_game)
54315431 character_xtra = FALSE;
54325432
54335433 p_ptr->update |= (PU_BONUS | PU_HP | PU_MANA | PU_SPELLS);
5434- p_ptr->notice |= (PN_COMBINE | PN_REORDER);
5434+ p_ptr->update |= (PU_COMBINE | PU_REORDER);
54355435 handle_stuff();
54365436 Term_fresh();
54375437
--- a/src/effects.c
+++ b/src/effects.c
@@ -3793,7 +3793,7 @@ bool lose_all_info(void)
37933793 p_ptr->update |= (PU_BONUS);
37943794
37953795 /* Combine / Reorder the pack (later) */
3796- p_ptr->notice |= (PN_COMBINE | PN_REORDER);
3796+ p_ptr->update |= (PU_COMBINE | PU_REORDER);
37973797
37983798 p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER);
37993799
--- a/src/melee1.c
+++ b/src/melee1.c
@@ -2056,7 +2056,7 @@ bool make_attack_normal(MONSTER_IDX m_idx)
20562056 o_ptr->pval = 0;
20572057
20582058 /* Combine / Reorder the pack */
2059- p_ptr->notice |= (PN_COMBINE | PN_REORDER);
2059+ p_ptr->update |= (PU_COMBINE | PU_REORDER);
20602060 p_ptr->window |= (PW_INVEN);
20612061
20622062 break;
--- a/src/object2.c
+++ b/src/object2.c
@@ -1507,7 +1507,7 @@ bool can_player_destroy_object(object_type *o_ptr)
15071507 o_ptr->ident |= (IDENT_SENSE);
15081508
15091509 /* Combine the pack */
1510- p_ptr->notice |= (PN_COMBINE);
1510+ p_ptr->update |= (PU_COMBINE);
15111511
15121512 p_ptr->window |= (PW_INVEN | PW_EQUIP);
15131513
@@ -5659,7 +5659,7 @@ void inven_item_increase(INVENTORY_IDX item, ITEM_NUMBER num)
56595659 p_ptr->update |= (PU_MANA);
56605660
56615661 /* Combine the pack */
5662- p_ptr->notice |= (PN_COMBINE);
5662+ p_ptr->update |= (PU_COMBINE);
56635663
56645664 p_ptr->window |= (PW_INVEN | PW_EQUIP);
56655665
@@ -6097,7 +6097,7 @@ s16b inven_carry(object_type *o_ptr)
60976097 p_ptr->update |= (PU_BONUS);
60986098
60996099 /* Combine and Reorder pack */
6100- p_ptr->notice |= (PN_COMBINE | PN_REORDER);
6100+ p_ptr->update |= (PU_COMBINE | PU_REORDER);
61016101
61026102 p_ptr->window |= (PW_INVEN);
61036103
@@ -7728,7 +7728,7 @@ static void drain_essence(void)
77287728 autopick_alter_item(item, TRUE);
77297729
77307730 /* Combine the pack */
7731- p_ptr->notice |= (PN_COMBINE | PN_REORDER);
7731+ p_ptr->update |= (PU_COMBINE | PU_REORDER);
77327732
77337733 p_ptr->window |= (PW_INVEN);
77347734 }
@@ -8337,7 +8337,7 @@ static void add_essence(ESSENCE_IDX mode)
83378337 #endif
83388338
83398339 /* Combine the pack */
8340- p_ptr->notice |= (PN_COMBINE | PN_REORDER);
8340+ p_ptr->update |= (PU_COMBINE | PU_REORDER);
83418341
83428342 p_ptr->window |= (PW_INVEN);
83438343 }
@@ -8392,7 +8392,7 @@ static void erase_essence(void)
83928392 msg_print(_("エッセンスを取り去った。", "You removed all essence you have added."));
83938393
83948394 /* Combine the pack */
8395- p_ptr->notice |= (PN_COMBINE | PN_REORDER);
8395+ p_ptr->update |= (PU_COMBINE | PU_REORDER);
83968396
83978397 p_ptr->window |= (PW_INVEN);
83988398 }
--- a/src/spells2.c
+++ b/src/spells2.c
@@ -5055,7 +5055,7 @@ bool psychometry(void)
50555055 o_ptr->marked |= OM_TOUCHED;
50565056
50575057 /* Combine / Reorder the pack (later) */
5058- p_ptr->notice |= (PN_COMBINE | PN_REORDER);
5058+ p_ptr->update |= (PU_COMBINE | PU_REORDER);
50595059
50605060 p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER);
50615061
--- a/src/spells3.c
+++ b/src/spells3.c
@@ -2128,7 +2128,7 @@ bool enchant(object_type *o_ptr, int n, int eflag)
21282128 p_ptr->update |= (PU_BONUS);
21292129
21302130 /* Combine / Reorder the pack (later) */
2131- p_ptr->notice |= (PN_COMBINE | PN_REORDER);
2131+ p_ptr->update |= (PU_COMBINE | PU_REORDER);
21322132
21332133 p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER);
21342134
@@ -2360,7 +2360,7 @@ bool identify_item(object_type *o_ptr)
23602360 p_ptr->update |= (PU_BONUS);
23612361
23622362 /* Combine / Reorder the pack (later) */
2363- p_ptr->notice |= (PN_COMBINE | PN_REORDER);
2363+ p_ptr->update |= (PU_COMBINE | PU_REORDER);
23642364
23652365 p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER);
23662366
@@ -2896,7 +2896,7 @@ bool recharge(int power)
28962896 }
28972897
28982898 /* Combine / Reorder the pack (later) */
2899- p_ptr->notice |= (PN_COMBINE | PN_REORDER);
2899+ p_ptr->update |= (PU_COMBINE | PU_REORDER);
29002900
29012901 p_ptr->window |= (PW_INVEN);
29022902
@@ -4704,7 +4704,7 @@ bool eat_magic(int power)
47044704 /* Redraw mana and hp */
47054705 p_ptr->redraw |= (PR_MANA);
47064706
4707- p_ptr->notice |= (PN_COMBINE | PN_REORDER);
4707+ p_ptr->update |= (PU_COMBINE | PU_REORDER);
47084708 p_ptr->window |= (PW_INVEN);
47094709
47104710 return TRUE;
--- a/src/types.h
+++ b/src/types.h
@@ -1195,7 +1195,6 @@ struct player_type
11951195
11961196 s16b cur_lite; /* Radius of lite (if any) */
11971197
1198- BIT_FLAGS notice; /* Special Updates */
11991198 BIT_FLAGS update; /* Pending Updates */
12001199 BIT_FLAGS redraw; /* Normal Redraws */
12011200 BIT_FLAGS window; /* Window Redraws */
--- a/src/wizard2.c
+++ b/src/wizard2.c
@@ -988,7 +988,7 @@ static void wiz_reroll_item(object_type *o_ptr)
988988 p_ptr->update |= (PU_BONUS);
989989
990990 /* Combine / Reorder the pack (later) */
991- p_ptr->notice |= (PN_COMBINE | PN_REORDER);
991+ p_ptr->update |= (PU_COMBINE | PU_REORDER);
992992
993993 p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_SPELL | PW_PLAYER);
994994 }
@@ -1342,7 +1342,7 @@ static void do_cmd_wiz_play(void)
13421342 p_ptr->update |= (PU_BONUS);
13431343
13441344 /* Combine / Reorder the pack (later) */
1345- p_ptr->notice |= (PN_COMBINE | PN_REORDER);
1345+ p_ptr->update |= (PU_COMBINE | PU_REORDER);
13461346
13471347 p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_SPELL | PW_PLAYER);
13481348 }
--- a/src/xtra1.c
+++ b/src/xtra1.c
@@ -5672,32 +5672,32 @@ void calc_bonuses(void)
56725672
56735673
56745674 /*!
5675- * @brief p_ptr->notice のフラグに応じた更新をまとめて行う / Handle "p_ptr->notice"
5675+ * @brief p_ptr->update のフラグに応じた更新をまとめて行う / Handle "p_ptr->update"
56765676 * @return なし
56775677 * @details 更新処理の対象はアイテムの自動破壊/アイテムの結合/アイテムの並び替え。
56785678 */
56795679 static void notice_stuff(void)
56805680 {
5681- if(!p_ptr->notice) return;
5681+ if(!p_ptr->update) return;
56825682
56835683 /* Actually do auto-destroy */
5684- if(p_ptr->notice & (PN_AUTODESTROY))
5684+ if(p_ptr->update & (PU_AUTODESTROY))
56855685 {
5686- p_ptr->notice &= ~(PN_AUTODESTROY);
5686+ p_ptr->update &= ~(PU_AUTODESTROY);
56875687 autopick_delayed_alter();
56885688 }
56895689
56905690 /* Combine the pack */
5691- if (p_ptr->notice & (PN_COMBINE))
5691+ if (p_ptr->update & (PU_COMBINE))
56925692 {
5693- p_ptr->notice &= ~(PN_COMBINE);
5693+ p_ptr->update &= ~(PU_COMBINE);
56945694 combine_pack();
56955695 }
56965696
56975697 /* Reorder the pack */
5698- if (p_ptr->notice & (PN_REORDER))
5698+ if (p_ptr->update & (PU_REORDER))
56995699 {
5700- p_ptr->notice &= ~(PN_REORDER);
5700+ p_ptr->update &= ~(PU_REORDER);
57015701 reorder_pack();
57025702 }
57035703 }
@@ -6103,7 +6103,7 @@ static void window_stuff(void)
61036103 */
61046104 void handle_stuff(void)
61056105 {
6106- if (p_ptr->notice) notice_stuff();
6106+ if (p_ptr->update) notice_stuff();
61076107 if (p_ptr->update) update_stuff();
61086108 if (p_ptr->redraw) redraw_stuff();
61096109 if (p_ptr->window) window_stuff();
@@ -6117,7 +6117,7 @@ void update_output(void)
61176117
61186118 void update_creature(void)
61196119 {
6120- if (p_ptr->notice) notice_stuff();
6120+ if (p_ptr->update) notice_stuff();
61216121 if (p_ptr->update) update_stuff();
61226122 }
61236123
Show on old repository browser