diff options
author | Bardur Arantsson <bardur@scientician.net> | 2014-12-19 08:57:39 +0100 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2014-12-23 12:07:55 +0100 |
commit | 5cab4125d9447928f04d1e4f42c3b58efc485dbf (patch) | |
tree | 9886c310db34505dd1e4b8ba3469bfc5be38fc13 | |
parent | 980c3c12a9d3128f7eefc74f996b45d5d5803674 (diff) |
Update HOOK_END_TURN to new-style hook
-rw-r--r-- | src/dungeon.cc | 2 | ||||
-rw-r--r-- | src/q_invas.cc | 7 | ||||
-rw-r--r-- | src/q_thief.cc | 7 |
3 files changed, 9 insertions, 7 deletions
diff --git a/src/dungeon.cc b/src/dungeon.cc index 7d683c9b..49d56288 100644 --- a/src/dungeon.cc +++ b/src/dungeon.cc @@ -5242,7 +5242,7 @@ static void dungeon(void) process_world(); /* Process the appropriate hooks */ - process_hooks(HOOK_END_TURN, "(d)", is_quest(dun_level)); + process_hooks_new(HOOK_END_TURN, NULL, NULL); /* Make it pulsate and live !!!! */ if ((dungeon_flags1 & DF1_EVOLVE) && dun_level) diff --git a/src/q_invas.cc b/src/q_invas.cc index 9ea5c5c8..03281ba6 100644 --- a/src/q_invas.cc +++ b/src/q_invas.cc @@ -86,7 +86,7 @@ static bool_ quest_invasion_ai_hook(const char *fmt) return (FALSE); } -static bool_ quest_invasion_turn_hook(const char *fmt) +static bool_ quest_invasion_turn_hook(void *, void *, void *) { if (cquest.status != QUEST_STATUS_UNTAKEN) return (FALSE); if (p_ptr->lev < 45) return (FALSE); @@ -106,8 +106,9 @@ static bool_ quest_invasion_turn_hook(const char *fmt) cquest.status = QUEST_STATUS_TAKEN; quest_invasion_init_hook(QUEST_INVASION); - del_hook(HOOK_END_TURN, quest_invasion_turn_hook); + del_hook_new(HOOK_END_TURN, quest_invasion_turn_hook); process_hooks_restart = TRUE; + return (FALSE); } @@ -193,7 +194,7 @@ static bool_ quest_invasion_stair_hook(void *, void *in_, void *) bool_ quest_invasion_init_hook(int q_idx) { - add_hook (HOOK_END_TURN, quest_invasion_turn_hook, "invasion_turn"); + add_hook_new(HOOK_END_TURN, quest_invasion_turn_hook, "invasion_turn", NULL); add_hook_new(HOOK_CHAR_DUMP, quest_invasion_dump_hook, "invasion_dump", NULL); if ((cquest.status >= QUEST_STATUS_TAKEN) && (cquest.status < QUEST_STATUS_FINISHED)) { diff --git a/src/q_thief.cc b/src/q_thief.cc index 83f875ea..c3ffdf2b 100644 --- a/src/q_thief.cc +++ b/src/q_thief.cc @@ -64,7 +64,7 @@ static bool_ quest_thieves_gen_hook(void *, void *, void *) return TRUE; } -static bool_ quest_thieves_hook(const char *fmt) +static bool_ quest_thieves_hook(void *, void *, void *) { int i, mcnt = 0; @@ -108,7 +108,8 @@ static bool_ quest_thieves_hook(const char *fmt) cave[23][4].special = 0; quest[p_ptr->inside_quest].status = QUEST_STATUS_COMPLETED; - del_hook(HOOK_END_TURN, quest_thieves_hook); + + del_hook_new(HOOK_END_TURN, quest_thieves_hook); process_hooks_restart = TRUE; cmsg_print(TERM_YELLOW, "You stopped the thieves and saved Bree!"); @@ -167,7 +168,7 @@ bool_ quest_thieves_init_hook(int q_idx) { if ((cquest.status >= QUEST_STATUS_UNTAKEN) && (cquest.status < QUEST_STATUS_FINISHED)) { - add_hook (HOOK_END_TURN, quest_thieves_hook, "thieves_end_turn"); + add_hook_new(HOOK_END_TURN, quest_thieves_hook, "thieves_end_turn", NULL); add_hook (HOOK_QUEST_FINISH, quest_thieves_finish_hook, "thieves_finish"); add_hook_new(HOOK_GEN_QUEST, quest_thieves_gen_hook, "thieves_geb", NULL); add_hook_new(HOOK_FEELING, quest_thieves_feeling_hook, "thieves_feel", NULL); |