summaryrefslogtreecommitdiff
path: root/src/q_thrain.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/q_thrain.cc')
-rw-r--r--src/q_thrain.cc20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/q_thrain.cc b/src/q_thrain.cc
index 7b895695..344d9ffd 100644
--- a/src/q_thrain.cc
+++ b/src/q_thrain.cc
@@ -21,8 +21,10 @@
#include "util.hpp"
#include "variable.hpp"
#include "z-rand.hpp"
+#include "z-term.hpp"
#include <cassert>
+#include <fmt/format.h>
#define cquest (quest[QUEST_THRAIN])
@@ -123,7 +125,7 @@ static bool quest_thrain_death_hook(void *, void *in_, void *)
object_prep(q_ptr, lookup_kind(TV_HELM, SV_DRAGON_HELM));
q_ptr->number = 1;
q_ptr->found = OBJ_FOUND_REWARD;
- create_artifact(q_ptr, FALSE, TRUE);
+ create_artifact(q_ptr, false, true);
q_ptr->artifact_name = "of Thrain";
/* Drop it in the dungeon */
@@ -134,7 +136,7 @@ static bool quest_thrain_death_hook(void *, void *in_, void *)
del_hook_new(HOOK_MONSTER_DEATH, quest_thrain_death_hook);
- process_hooks_restart = TRUE;
+ process_hooks_restart = true;
return false;
}
@@ -159,7 +161,7 @@ static bool quest_thrain_gen_hook(void *, void *in_, void *)
get_map_size("thrain.map", &ysize, &xsize);
/* Try to allocate space for room. If fails, exit */
- if (!room_alloc(xsize + 2, ysize + 2, FALSE, by0, bx0, &xval, &yval)) return false;
+ if (!room_alloc(xsize + 2, ysize + 2, false, by0, bx0, &xval, &yval)) return false;
/* Get corner values */
y1 = yval - ysize / 2;
@@ -180,7 +182,7 @@ static bool quest_thrain_gen_hook(void *, void *in_, void *)
build_rectangle(y1 - 1, x1 - 1, y2 + 1, x2 + 1, feat_wall_outer, CAVE_ROOM | CAVE_GLOW);
/* Set the correct monster hook */
- set_mon_num_hook();
+ reset_get_monster_hook();
/* Prepare allocation table */
get_mon_num_prep();
@@ -188,7 +190,7 @@ static bool quest_thrain_gen_hook(void *, void *in_, void *)
xstart = x1;
ystart = y1;
init_flags = INIT_CREATE_DUNGEON;
- process_dungeon_file("thrain.map", &ystart, &xstart, cur_hgt, cur_wid, TRUE, TRUE);
+ process_dungeon_file("thrain.map", &ystart, &xstart, cur_hgt, cur_wid, true, true);
for (x = x1; x < xstart; x++)
for (y = y1; y < ystart; y++)
@@ -196,9 +198,9 @@ static bool quest_thrain_gen_hook(void *, void *in_, void *)
cave[y][x].info |= CAVE_ICKY | CAVE_ROOM | CAVE_FREE;
if (cave[y][x].feat == FEAT_MARKER)
{
- m_allow_special[get_thrain()] = TRUE;
- int i = place_monster_one(y, x, get_thrain(), 0, FALSE, MSTATUS_NEUTRAL);
- m_allow_special[get_thrain()] = FALSE;
+ m_allow_special[get_thrain()] = true;
+ int i = place_monster_one(y, x, get_thrain(), 0, false, MSTATUS_NEUTRAL);
+ m_allow_special[get_thrain()] = false;
if (i) m_list[i].mflag |= MFLAG_QUEST;
}
@@ -271,7 +273,7 @@ void quest_thrain_init_hook()
cquest.data[0] = rand_range(d_info[DUNGEON_DOL_GULDUR].mindepth + 1, d_info[DUNGEON_DOL_GULDUR].maxdepth - 1);
if (wizard)
{
- messages.add(format("Thrain lvl %d", cquest.data[0]), TERM_BLUE);
+ messages.add(fmt::format("Thrain lvl {}", cquest.data[0]), TERM_BLUE);
}
}
if ((cquest.status >= QUEST_STATUS_TAKEN) && (cquest.status < QUEST_STATUS_FINISHED))