summaryrefslogtreecommitdiff
path: root/src/q_wight.cc
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2017-05-02 19:20:57 +0200
committerBardur Arantsson <bardur@scientician.net>2017-05-02 19:20:57 +0200
commitfdb532aec5234db77a9111d219f8a870d660c4fc (patch)
treea997c53b956dfdadc09b22967c0afe9d348fd2c2 /src/q_wight.cc
parent6a35e3de332df186eab39c3b67506882409a3ca2 (diff)
Change away from bool_ for hooks
Diffstat (limited to 'src/q_wight.cc')
-rw-r--r--src/q_wight.cc34
1 files changed, 22 insertions, 12 deletions
diff --git a/src/q_wight.cc b/src/q_wight.cc
index f635ed29..ced87277 100644
--- a/src/q_wight.cc
+++ b/src/q_wight.cc
@@ -22,13 +22,16 @@
GENERATE_MONSTER_LOOKUP_FN(get_wight_king, "The Wight-King of the Barrow-downs")
-static bool_ quest_wight_gen_hook(void *, void *, void *)
+static bool quest_wight_gen_hook(void *, void *, void *)
{
int x, y;
int xstart = 2;
int ystart = 2;
- if (p_ptr->inside_quest != QUEST_WIGHT) return FALSE;
+ if (p_ptr->inside_quest != QUEST_WIGHT)
+ {
+ return false;
+ }
/* Start with perm walls */
for (y = 0; y < cur_hgt; y++)
@@ -50,6 +53,7 @@ static bool_ quest_wight_gen_hook(void *, void *, void *)
process_dungeon_file("wights.map", &ystart, &xstart, cur_hgt, cur_wid, TRUE, TRUE);
for (x = 3; x < xstart; x++)
+ {
for (y = 3; y < ystart; y++)
{
if (cave[y][x].feat == FEAT_MARKER)
@@ -123,17 +127,21 @@ static bool_ quest_wight_gen_hook(void *, void *, void *)
}
}
}
+ }
- return TRUE;
+ return true;
}
-static bool_ quest_wight_death_hook(void *, void *in_, void *)
+static bool quest_wight_death_hook(void *, void *in_, void *)
{
struct hook_monster_death_in *in = static_cast<struct hook_monster_death_in *>(in_);
s32b m_idx = in->m_idx;
s32b r_idx = m_list[m_idx].r_idx;
- if (p_ptr->inside_quest != QUEST_WIGHT) return FALSE;
+ if (p_ptr->inside_quest != QUEST_WIGHT)
+ {
+ return false;
+ }
if (r_idx == get_wight_king())
{
@@ -147,18 +155,21 @@ static bool_ quest_wight_death_hook(void *, void *in_, void *)
del_hook_new(HOOK_MONSTER_DEATH, quest_wight_death_hook);
process_hooks_restart = TRUE;
- return (FALSE);
+ return false;
}
- return (FALSE);
+ return false;
}
-static bool_ quest_wight_finish_hook(void *, void *in_, void *)
+static bool quest_wight_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_WIGHT) return FALSE;
+ if (q_idx != QUEST_WIGHT)
+ {
+ return false;
+ }
c_put_str(TERM_YELLOW, "I heard about your noble deeds.", 8, 0);
c_put_str(TERM_YELLOW, "Keep what you found .. may it serve you well.", 9, 0);
@@ -170,10 +181,10 @@ static bool_ quest_wight_finish_hook(void *, void *in_, void *)
del_hook_new(HOOK_QUEST_FINISH, quest_wight_finish_hook);
process_hooks_restart = TRUE;
- return TRUE;
+ return true;
}
-bool_ quest_wight_init_hook()
+void quest_wight_init_hook()
{
if ((cquest.status >= QUEST_STATUS_TAKEN) && (cquest.status < QUEST_STATUS_FINISHED))
{
@@ -181,5 +192,4 @@ bool_ quest_wight_init_hook()
add_hook_new(HOOK_GEN_QUEST, quest_wight_gen_hook, "wight_gen", NULL);
add_hook_new(HOOK_QUEST_FINISH, quest_wight_finish_hook, "wight_finish", NULL);
}
- return (FALSE);
}