diff options
Diffstat (limited to 'src/q_eol.cc')
-rw-r--r-- | src/q_eol.cc | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/src/q_eol.cc b/src/q_eol.cc index 815b3107..fd60ff37 100644 --- a/src/q_eol.cc +++ b/src/q_eol.cc @@ -18,6 +18,7 @@ #include "util.hpp" #include "variable.hpp" #include "z-rand.hpp" +#include "z-term.hpp" #include <cassert> @@ -28,7 +29,6 @@ GENERATE_MONSTER_LOOKUP_FN(get_eol, "Eol, the Dark Elf") static bool quest_eol_gen_hook(void *, void *, void *) { int x, y; - bool_ done = FALSE; int xsize = 50, ysize = 30, y0, x0; int m_idx = 0; @@ -59,6 +59,7 @@ static bool quest_eol_gen_hook(void *, void *, void *) } dun_level = quest[p_ptr->inside_quest].level; + bool done = false; while (!done) { int grd, roug, cutoff; @@ -76,7 +77,7 @@ static bool quest_eol_gen_hook(void *, void *, void *) generate_hmap(y0, x0, xsize, ysize, grd, roug, cutoff); /* Convert to normal format+ clean up*/ - done = generate_fracave(y0, x0, xsize, ysize, cutoff, FALSE, TRUE); + done = generate_fracave(y0, x0, xsize, ysize, cutoff, false, true); } /* Place a few traps */ @@ -91,9 +92,9 @@ static bool quest_eol_gen_hook(void *, void *, void *) // Find Eol's r_info entry int r_idx = get_eol(); // "Summon" Eol - m_allow_special[r_idx] = TRUE; - m_idx = place_monster_one(y, x, r_idx, 0, FALSE, MSTATUS_ENEMY); - m_allow_special[r_idx] = FALSE; + m_allow_special[r_idx] = true; + m_idx = place_monster_one(y, x, r_idx, 0, false, MSTATUS_ENEMY); + m_allow_special[r_idx] = false; // Mark with the QUEST flag if (m_idx) m_list[m_idx].mflag |= MFLAG_QUEST; } @@ -126,19 +127,16 @@ static bool quest_eol_finish_hook(void *, void *in_, void *) object_prep(q_ptr, lookup_kind(TV_LITE, SV_LITE_DWARVEN)); q_ptr->found = OBJ_FOUND_REWARD; q_ptr->name2 = EGO_LITE_MAGI; - apply_magic(q_ptr, 1, FALSE, FALSE, FALSE); + apply_magic(q_ptr, 1, false, false, false); q_ptr->number = 1; - object_aware(q_ptr); - object_known(q_ptr); - q_ptr->ident |= IDENT_STOREB; - inven_carry(q_ptr, FALSE); + inven_carry(q_ptr, false); /* Continue the plot */ *(quest[q_idx].plot) = QUEST_NIRNAETH; quest[*(quest[q_idx].plot)].init(); del_hook_new(HOOK_QUEST_FINISH, quest_eol_finish_hook); - process_hooks_restart = TRUE; + process_hooks_restart = true; return true; } @@ -159,7 +157,7 @@ static bool quest_eol_fail_hook(void *, void *in_, void *) *(quest[q_idx].plot) = QUEST_NULL; del_hook_new(HOOK_QUEST_FAIL, quest_eol_fail_hook); - process_hooks_restart = TRUE; + process_hooks_restart = true; return true; } @@ -181,7 +179,7 @@ static bool quest_eol_death_hook(void *, void *in_, void *) cquest.status = QUEST_STATUS_COMPLETED; del_hook_new(HOOK_MONSTER_DEATH, quest_eol_death_hook); - process_hooks_restart = TRUE; + process_hooks_restart = true; return false; } @@ -222,7 +220,7 @@ static bool quest_eol_stair_hook(void *, void *in_, void *) cquest.status = QUEST_STATUS_FAILED; del_hook_new(HOOK_STAIR, quest_eol_stair_hook); - process_hooks_restart = TRUE; + process_hooks_restart = true; return false; } } |