summaryrefslogtreecommitdiff
path: root/src/cave.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/cave.cc')
-rw-r--r--src/cave.cc108
1 files changed, 7 insertions, 101 deletions
diff --git a/src/cave.cc b/src/cave.cc
index 14046eb2..66e274f1 100644
--- a/src/cave.cc
+++ b/src/cave.cc
@@ -20,7 +20,6 @@
#include "spells1.hpp"
#include "store_info_type.hpp"
#include "tables.hpp"
-#include "trap_type.hpp"
#include "util.hpp"
#include "util.h"
#include "variable.h"
@@ -854,7 +853,6 @@ static void map_info(int y, int x, byte *ap, char *cp)
auto const &r_info = game->edit_data.r_info;
auto const &f_info = game->edit_data.f_info;
auto const &k_info = game->edit_data.k_info;
- auto const &t_info = game->edit_data.t_info;
byte a;
@@ -911,41 +909,6 @@ static void map_info(int y, int x, byte *ap, char *cp)
a = TERM_VIOLET;
}
- /* Mega-Hack 3 -- Traps don't have f_info entries either */
- if ((info & (CAVE_TRDT)) && (feat != FEAT_ILLUS_WALL))
- {
- /* Trap index */
- auto t_idx = c_ptr->t_idx;
-
- /*
- * If trap is set on a floor grid that is not
- * one of "interesting" features, use a special
- * symbol to display it. Check for doors is no longer
- * necessary because they have REMEMBER flag now.
- *
- * Cave macros cannot be used safely here, because of
- * c_ptr->mimic XXX XXX
- */
- if ((f_ptr->flags & (FF_FLOOR | FF_REMEMBER)) == FF_FLOOR)
- {
- c = f_info[FEAT_TRAP].x_char;
- }
-
- /* Add attr XXX XXX XXX */
- a = t_info[t_idx].color;
-
- /* Get a new color with a strange formula :) XXX XXX XXX */
- if (t_info[t_idx].flags & FTRAP_CHANGE)
- {
- s32b tmp;
-
- tmp = dun_level + dungeon_type + feat;
-
- a = tmp % 16;
- }
- }
-
-
/**** Step 2 -- Apply special random effects ****/
if (!options->avoid_other && !options->avoid_shimmer)
{
@@ -969,7 +932,6 @@ static void map_info(int y, int x, byte *ap, char *cp)
* Special lighting effects, if specified and applicable
* This will never happen for
* - any grids in the overhead map
- * - traps
* - (graphics modes) terrain features without corresponding
* "darker" tiles.
*
@@ -981,7 +943,7 @@ static void map_info(int y, int x, byte *ap, char *cp)
if (options->view_special_lite &&
((f_ptr->flags & (FF_FLOOR | FF_REMEMBER)) == FF_FLOOR))
{
- if (!p_ptr->wild_mode && !(info & (CAVE_TRDT)))
+ if (!p_ptr->wild_mode)
{
/* Handle "seen" grids */
if (info & (CAVE_SEEN))
@@ -1021,7 +983,7 @@ static void map_info(int y, int x, byte *ap, char *cp)
else if (options->view_granite_lite &&
(f_ptr->flags & (FF_NO_VISION | FF_DOOR)))
{
- if (!p_ptr->wild_mode && !(info & (CAVE_TRDT)))
+ if (!p_ptr->wild_mode)
{
/* Handle "seen" grids */
if (info & (CAVE_SEEN))
@@ -1082,7 +1044,6 @@ static void map_info(int y, int x, byte *ap, char *cp)
/**** Layer 2 -- Objects ****/
- if (feat != FEAT_MON_TRAP)
{
for (auto const o_idx: c_ptr->o_idxs)
{
@@ -1286,7 +1247,6 @@ void map_info_default(int y, int x, byte *ap, char *cp)
auto const &r_info = game->edit_data.r_info;
auto const &f_info = game->edit_data.f_info;
auto const &k_info = game->edit_data.k_info;
- auto const &t_info = game->edit_data.t_info;
byte a;
@@ -1346,41 +1306,6 @@ void map_info_default(int y, int x, byte *ap, char *cp)
a = TERM_VIOLET;
}
- /* Mega-Hack 3 -- Traps don't have f_info entries either */
- if ((info & (CAVE_TRDT)) && (feat != FEAT_ILLUS_WALL))
- {
- /* Trap index */
- auto t_idx = c_ptr->t_idx;
-
- /*
- * If trap is set on a floor grid that is not
- * one of "interesting" features, use a special
- * symbol to display it. Check for doors is no longer
- * necessary because they have REMEMBER flag now.
- *
- * Cave macros cannot be used safely here, because of
- * c_ptr->mimic XXX XXX
- */
- if ((f_ptr->flags & (FF_FLOOR | FF_REMEMBER)) == FF_FLOOR)
- {
- c = f_info[FEAT_TRAP].d_char;
- }
-
- /* Add attr */
- a = t_info[t_idx].color;
-
- /* Get a new color with a strange formula :) */
- if (t_info[t_idx].flags & FTRAP_CHANGE)
- {
- s32b tmp;
-
- tmp = dun_level + dungeon_type + feat;
-
- a = tmp % 16;
- }
- }
-
-
/**** Step 2 -- Apply special random effects ****/
if (!avoid_other)
{
@@ -1404,7 +1329,6 @@ void map_info_default(int y, int x, byte *ap, char *cp)
* Special lighting effects, if specified and applicable
* This will never happen for
* - any grids in the overhead map
- * - traps
* - (graphics modes) terrain features without corresponding
* "darker" tiles.
*
@@ -1416,7 +1340,7 @@ void map_info_default(int y, int x, byte *ap, char *cp)
if (options->view_special_lite &&
((f_ptr->flags & (FF_FLOOR | FF_REMEMBER)) == FF_FLOOR))
{
- if (!p_ptr->wild_mode && !(info & (CAVE_TRDT)))
+ if (!p_ptr->wild_mode)
{
/* Handle "seen" grids */
if (info & (CAVE_SEEN))
@@ -1456,7 +1380,7 @@ void map_info_default(int y, int x, byte *ap, char *cp)
else if (options->view_granite_lite &&
(f_ptr->flags & (FF_NO_VISION | FF_DOOR)))
{
- if (!p_ptr->wild_mode && !(info & (CAVE_TRDT)))
+ if (!p_ptr->wild_mode)
{
/* Handle "seen" grids */
if (info & (CAVE_SEEN))
@@ -1512,7 +1436,6 @@ void map_info_default(int y, int x, byte *ap, char *cp)
/**** Layer 2 -- Objects ****/
- if (feat != FEAT_MON_TRAP)
{
for (auto const this_o_idx: c_ptr->o_idxs)
{
@@ -1813,8 +1736,7 @@ void note_spot(int y, int x)
if (cave_plain_floor_grid(c_ptr))
{
/* Option -- memorise certain floors */
- if ((info & CAVE_TRDT) ||
- ((info & CAVE_GLOW) && options->view_perma_grids) ||
+ if (((info & CAVE_GLOW) && options->view_perma_grids) ||
options->view_torch_grids)
{
/* Memorize */
@@ -4412,7 +4334,7 @@ void object_track(object_type *o_ptr)
*
* All disturbance cancels repeated commands, resting, and running.
*/
-void disturb(int stop_search)
+void disturb(int)
{
/* Cancel auto-commands */
/* command_new = 0; */
@@ -4447,19 +4369,6 @@ void disturb(int stop_search)
p_ptr->update |= (PU_TORCH);
}
- /* Cancel searching if requested */
- if (stop_search && p_ptr->searching)
- {
- /* Cancel */
- p_ptr->searching = FALSE;
-
- /* Recalculate bonuses */
- p_ptr->update |= (PU_BONUS);
-
- /* Redraw the state */
- p_ptr->redraw |= (PR_FRAME);
- }
-
/* Flush the input if requested */
if (options->flush_disturb)
{
@@ -4587,7 +4496,7 @@ bool cave_floor_grid(cave_type const *c)
{
auto const &f_info = game->edit_data.f_info;
- return (f_info[c->feat].flags & FF_FLOOR) && (c->feat != FEAT_MON_TRAP);
+ return bool(f_info[c->feat].flags & FF_FLOOR);
}
@@ -4654,7 +4563,6 @@ bool cave_clean_bold(int y, int x)
return
(f_info[cave[y][x].feat].flags & FF_FLOOR) &&
- (cave[y][x].feat != FEAT_MON_TRAP) &&
(cave[y][x].o_idxs.empty()) &&
!(f_info[cave[y][x].feat].flags & FF_PERMANENT);
}
@@ -4688,7 +4596,6 @@ bool cave_naked_bold(int y, int x)
return
(f_info[cave[y][x].feat].flags & FF_FLOOR) &&
- (cave[y][x].feat != FEAT_MON_TRAP) &&
!(f_info[cave[y][x].feat].flags & FF_PERMANENT) &&
(cave[y][x].o_idxs.empty()) &&
(cave[y][x].m_idx == 0);
@@ -4700,7 +4607,6 @@ bool cave_naked_bold2(int y, int x)
return
(f_info[cave[y][x].feat].flags & FF_FLOOR) &&
- (cave[y][x].feat != FEAT_MON_TRAP) &&
(cave[y][x].o_idxs.empty()) &&
(cave[y][x].m_idx == 0);
}