diff options
Diffstat (limited to 'src/q_wolves.cc')
-rw-r--r-- | src/q_wolves.cc | 34 |
1 files changed, 22 insertions, 12 deletions
diff --git a/src/q_wolves.cc b/src/q_wolves.cc index 637003dc..0e811ce6 100644 --- a/src/q_wolves.cc +++ b/src/q_wolves.cc @@ -20,7 +20,7 @@ #define cquest (quest[QUEST_WOLVES]) -static bool_ quest_wolves_gen_hook(void *, void *, void *) +static bool quest_wolves_gen_hook(void *, void *, void *) { auto const &f_info = game->edit_data.f_info; @@ -28,11 +28,16 @@ static bool_ quest_wolves_gen_hook(void *, void *, void *) int xstart = 2; int ystart = 2; - if (p_ptr->inside_quest != QUEST_WOLVES) return FALSE; + if (p_ptr->inside_quest != QUEST_WOLVES) + { + return false; + } /* Just in case we didnt talk the the mayor */ if (cquest.status == QUEST_STATUS_UNTAKEN) + { cquest.status = QUEST_STATUS_TAKEN; + } /* Start with perm walls */ for (y = 0; y < cur_hgt; y++) @@ -85,14 +90,17 @@ static bool_ quest_wolves_gen_hook(void *, void *, void *) process_hooks_restart = TRUE; - return TRUE; + return true; } -static bool_ quest_wolves_death_hook(void *, void *, void *) +static bool quest_wolves_death_hook(void *, void *, void *) { int i, mcnt = 0; - if (p_ptr->inside_quest != QUEST_WOLVES) return FALSE; + if (p_ptr->inside_quest != QUEST_WOLVES) + { + return false; + } /* Process the monsters (backwards) */ for (i = m_max - 1; i >= 1; i--) @@ -116,17 +124,20 @@ static bool_ quest_wolves_death_hook(void *, void *, void *) process_hooks_restart = TRUE; cmsg_print(TERM_YELLOW, "Lothlorien is safer now."); - return (FALSE); + return false; } - return FALSE; + return false; } -static bool_ quest_wolves_finish_hook(void *, void *in_, void *) +static bool quest_wolves_finish_hook(void *, void *in_, void *) { struct hook_quest_finish_in *in = static_cast<struct hook_quest_finish_in *>(in_); s32b q_idx = in->q_idx; - if (q_idx != QUEST_WOLVES) return FALSE; + if (q_idx != QUEST_WOLVES) + { + return false; + } c_put_str(TERM_YELLOW, "Thank you for killing the pack of wolves!", 8, 0); c_put_str(TERM_YELLOW, "You can use the hut as your house as a reward.", 9, 0); @@ -134,10 +145,10 @@ static bool_ quest_wolves_finish_hook(void *, void *in_, void *) /* Continue the plot */ *(quest[q_idx].plot) = QUEST_SPIDER; - return TRUE; + return true; } -bool_ quest_wolves_init_hook() +void quest_wolves_init_hook() { if ((cquest.status >= QUEST_STATUS_UNTAKEN) && (cquest.status < QUEST_STATUS_FINISHED)) { @@ -145,5 +156,4 @@ bool_ quest_wolves_init_hook() add_hook_new(HOOK_QUEST_FINISH, quest_wolves_finish_hook, "wolves_finish", NULL); add_hook_new(HOOK_GEN_QUEST, quest_wolves_gen_hook, "wolves_geb", NULL); } - return (FALSE); } |