diff options
author | Bardur Arantsson <bardur@scientician.net> | 2017-05-02 19:20:57 +0200 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2017-05-02 19:20:57 +0200 |
commit | fdb532aec5234db77a9111d219f8a870d660c4fc (patch) | |
tree | a997c53b956dfdadc09b22967c0afe9d348fd2c2 /src/q_fireprof.cc | |
parent | 6a35e3de332df186eab39c3b67506882409a3ca2 (diff) |
Change away from bool_ for hooks
Diffstat (limited to 'src/q_fireprof.cc')
-rw-r--r-- | src/q_fireprof.cc | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/src/q_fireprof.cc b/src/q_fireprof.cc index 9e36ce5c..26bf75af 100644 --- a/src/q_fireprof.cc +++ b/src/q_fireprof.cc @@ -359,7 +359,7 @@ void quest_fireproof_building(bool_ *paid, bool_ *recreate) } } -static bool_ fireproof_get_hook(void *, void *in_, void *) +static bool fireproof_get_hook(void *, void *in_, void *) { struct hook_get_in *in = static_cast<struct hook_get_in *>(in_); object_type *o_ptr = in->o_ptr; @@ -376,17 +376,17 @@ static bool_ fireproof_get_hook(void *, void *in_, void *) cmsg_print(TERM_YELLOW, "Fine! Looks like you've found it."); } - return FALSE; + return false; } -static bool_ fireproof_stair_hook(void *, void *, void *) +static bool fireproof_stair_hook(void *, void *, void *) { /* only ask this if player about to go up stairs of quest and * hasn't retrieved item */ if ((p_ptr->inside_quest != QUEST_FIREPROOF) || (cquest.status == QUEST_STATUS_COMPLETED)) { - return FALSE; + return false; } else { @@ -394,7 +394,7 @@ static bool_ fireproof_stair_hook(void *, void *, void *) if (cave[p_ptr->py][p_ptr->px].feat != FEAT_LESS) { - return FALSE; + return false; } /* flush all pending input */ @@ -408,12 +408,12 @@ static bool_ fireproof_stair_hook(void *, void *, void *) { /* fail the quest */ cquest.status = QUEST_STATUS_FAILED; - return FALSE; + return false; } else { /* if no, they stay in the quest */ - return TRUE; + return true; } } } @@ -458,14 +458,14 @@ std::string quest_fireproof_describe() return w.str(); } -static bool_ fireproof_gen_hook(void *, void *, void *) +static bool fireproof_gen_hook(void *, void *, void *) { fireproof_settings const *settings = fireproof_get_settings(); /* Only if player doing this quest */ if (p_ptr->inside_quest != QUEST_FIREPROOF) { - return FALSE; + return false; } /* Go ahead */ @@ -497,11 +497,11 @@ static bool_ fireproof_gen_hook(void *, void *, void *) drop_near(&forge, -1, y, x); } - return TRUE; + return true; } } -bool_ quest_fireproof_init_hook() +void quest_fireproof_init_hook() { /* Only need hooks if the quest is unfinished. */ if ((cquest.status >= QUEST_STATUS_UNTAKEN) && @@ -511,8 +511,4 @@ bool_ quest_fireproof_init_hook() add_hook_new(HOOK_GET , fireproof_get_hook , "fireproof_get_hook", NULL); add_hook_new(HOOK_STAIR , fireproof_stair_hook, "fireproof_stair_hook", NULL); } - - return FALSE; } - -#undef print_hook |