Skip to content

Commit

Permalink
Revise
Browse files Browse the repository at this point in the history
  • Loading branch information
kphoenix137 committed Nov 16, 2024
1 parent 21dd2f6 commit 1f56d9f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 15 deletions.
5 changes: 4 additions & 1 deletion Source/diablo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1440,7 +1440,10 @@ void GameLogic()
}
if (leveltype != DTYPE_TOWN) {
gGameLogicStep = GameLogicStep::ProcessMonsters;
ProcessMonsters();
#ifdef _DEBUG
if (!DebugInvisible)
#endif
ProcessMonsters();
gGameLogicStep = GameLogicStep::ProcessObjects;
ProcessObjects();
gGameLogicStep = GameLogicStep::ProcessMissiles;
Expand Down
13 changes: 0 additions & 13 deletions Source/levels/gendung.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@
#include "utils/log.hpp"
#include "utils/status_macros.hpp"

#ifdef _DEBUG
#include "debug.h"
#endif

namespace devilution {

Bitset2d<DMAXX, DMAXY> DungeonMask;
Expand Down Expand Up @@ -377,15 +373,6 @@ void InitGlobals()

} // namespace

bool IsTileVisible(Point position)
{
return InDungeonBounds(position) && HasAnyOf(dFlags[position.x][position.y], DungeonFlag::Visible)
#ifdef _DEBUG
&& !DebugInvisible
#endif
;
}

#ifdef BUILD_TESTING
std::optional<WorldTileSize> GetSizeForThemeRoom()
{
Expand Down
5 changes: 4 additions & 1 deletion Source/levels/gendung.h
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,10 @@ constexpr bool TileContainsSetPiece(Point position)
* @param position Coordinates of the dungeon tile to check
* @return true if the tile is within at least one players vision
*/
bool IsTileVisible(Point position);
constexpr bool IsTileVisible(Point position)
{
return InDungeonBounds(position) && HasAnyOf(dFlags[position.x][position.y], DungeonFlag::Visible);
}

/**
* @brief Checks if a light source is illuminating this tile
Expand Down

0 comments on commit 1f56d9f

Please sign in to comment.