Hiding debug render elements
This commit is contained in:
parent
aa288edd69
commit
66cc4fcb5f
4 changed files with 24 additions and 13 deletions
|
@ -53,5 +53,7 @@
|
|||
|
||||
// DEBUG
|
||||
#define DB_CIRCLE_RADIUS 1
|
||||
#define DB_WORLD_GRID_RENDER false
|
||||
#define DB_TRACKING_VIEW_CENTER false
|
||||
|
||||
#endif //HOLESOME_CONFIG_H
|
||||
|
|
|
@ -96,7 +96,7 @@ sf::Vector2f TrackingView::getCenter() const
|
|||
void TrackingView::followTrackables()
|
||||
{
|
||||
auto trackingPoint = getTrackingArea().getCenter();
|
||||
if (DEVELOPER_MODE)
|
||||
if (DB_TRACKING_VIEW_CENTER)
|
||||
{
|
||||
marker->coordinates->setIsometric(IsometricCoordinates(trackingPoint));
|
||||
}
|
||||
|
@ -137,7 +137,7 @@ void TrackingView::moveCenter(sf::Vector2<float> delta)
|
|||
|
||||
void TrackingView::draw(sf::RenderWindow *window)
|
||||
{
|
||||
if (!DEVELOPER_MODE)
|
||||
if (!DB_TRACKING_VIEW_CENTER)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ void LevelLoader::loadLevel(const LevelConfig &levelConfig)
|
|||
// Add basic game objects
|
||||
game->addGameObject(SpriteFactory::createTileMap(levelConfig.tileMapConfig));
|
||||
|
||||
if (DEVELOPER_MODE)
|
||||
if (DB_WORLD_GRID_RENDER)
|
||||
{
|
||||
game->addGameObject(std::make_shared<GridDebugLayer>(0, 50, 0, 50));
|
||||
}
|
||||
|
|
|
@ -10,16 +10,25 @@
|
|||
std::map<std::string, LevelConfig> const all_levels = {
|
||||
{"default", LevelConfig("Default", {{0, 0}}, {
|
||||
CollectableInLevel("box", {5, 5})},
|
||||
TileMapConfig("iso-tiles", {{4, 4, 4, 4, 4, 4, 4, 4, 4, 4},
|
||||
{4, 4, 4, 4, 4, 4, 4, 4, 4, 4},
|
||||
{4, 4, 4, 4, 4, 4, 4, 4, 4, 4},
|
||||
{4, 4, 4, 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