mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Renamed showBlockable to showBlocked
This commit is contained in:
parent
c28f7dd292
commit
7e97885e73
@ -82,5 +82,5 @@ public:
|
||||
/// if true, map grid should be visible on map
|
||||
virtual bool showGrid() const = 0;
|
||||
virtual bool showVisitable() const = 0;
|
||||
virtual bool showBlockable() const = 0;
|
||||
virtual bool showBlocked() const = 0;
|
||||
};
|
||||
|
@ -581,7 +581,7 @@ uint8_t MapRendererObjects::checksum(IMapRendererContext & context, const int3 &
|
||||
|
||||
MapRendererDebug::MapRendererDebug()
|
||||
: imageGrid(IImage::createFromFile("debug/grid", EImageBlitMode::ALPHA))
|
||||
, imageBlockable(IImage::createFromFile("debug/blocked", EImageBlitMode::ALPHA))
|
||||
, imageBlocked(IImage::createFromFile("debug/blocked", EImageBlitMode::ALPHA))
|
||||
, imageVisitable(IImage::createFromFile("debug/visitable", EImageBlitMode::ALPHA))
|
||||
{
|
||||
|
||||
@ -592,9 +592,9 @@ void MapRendererDebug::renderTile(IMapRendererContext & context, Canvas & target
|
||||
if(context.showGrid())
|
||||
target.draw(imageGrid, Point(0,0));
|
||||
|
||||
if(context.showVisitable() || context.showBlockable())
|
||||
if(context.showVisitable() || context.showBlocked())
|
||||
{
|
||||
bool blockable = false;
|
||||
bool blocking = false;
|
||||
bool visitable = false;
|
||||
|
||||
for(const auto & objectID : context.getObjects(coordinates))
|
||||
@ -604,12 +604,12 @@ void MapRendererDebug::renderTile(IMapRendererContext & context, Canvas & target
|
||||
if (context.objectTransparency(objectID, coordinates) > 0)
|
||||
{
|
||||
visitable |= object->visitableAt(coordinates.x, coordinates.y);
|
||||
blockable |= object->blockingAt(coordinates.x, coordinates.y);
|
||||
blocking |= object->blockingAt(coordinates.x, coordinates.y);
|
||||
}
|
||||
}
|
||||
|
||||
if (context.showBlockable() && blockable)
|
||||
target.draw(imageBlockable, Point(0,0));
|
||||
if (context.showBlocked() && blocking)
|
||||
target.draw(imageBlocked, Point(0,0));
|
||||
if (context.showVisitable() && visitable)
|
||||
target.draw(imageVisitable, Point(0,0));
|
||||
}
|
||||
@ -622,7 +622,7 @@ uint8_t MapRendererDebug::checksum(IMapRendererContext & context, const int3 & c
|
||||
if (context.showVisitable())
|
||||
result += 1;
|
||||
|
||||
if (context.showBlockable())
|
||||
if (context.showBlocked())
|
||||
result += 2;
|
||||
|
||||
if (context.showGrid())
|
||||
|
@ -133,7 +133,7 @@ class MapRendererDebug
|
||||
{
|
||||
std::shared_ptr<IImage> imageGrid;
|
||||
std::shared_ptr<IImage> imageVisitable;
|
||||
std::shared_ptr<IImage> imageBlockable;
|
||||
std::shared_ptr<IImage> imageBlocked;
|
||||
public:
|
||||
MapRendererDebug();
|
||||
|
||||
|
@ -179,7 +179,7 @@ bool MapRendererBaseContext::showVisitable() const
|
||||
return false;
|
||||
}
|
||||
|
||||
bool MapRendererBaseContext::showBlockable() const
|
||||
bool MapRendererBaseContext::showBlocked() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -246,9 +246,9 @@ bool MapRendererAdventureContext::showVisitable() const
|
||||
return settingShowVisitable;
|
||||
}
|
||||
|
||||
bool MapRendererAdventureContext::showBlockable() const
|
||||
bool MapRendererAdventureContext::showBlocked() const
|
||||
{
|
||||
return settingShowBlockable;
|
||||
return settingShowBlocked;
|
||||
}
|
||||
|
||||
MapRendererAdventureTransitionContext::MapRendererAdventureTransitionContext(const MapRendererContextState & viewState)
|
||||
|
@ -55,7 +55,7 @@ public:
|
||||
bool showOverlay() const override;
|
||||
bool showGrid() const override;
|
||||
bool showVisitable() const override;
|
||||
bool showBlockable() const override;
|
||||
bool showBlocked() const override;
|
||||
};
|
||||
|
||||
class MapRendererAdventureContext : public MapRendererBaseContext
|
||||
@ -64,7 +64,7 @@ public:
|
||||
uint32_t animationTime = 0;
|
||||
bool settingShowGrid = false;
|
||||
bool settingShowVisitable = false;
|
||||
bool settingShowBlockable = false;
|
||||
bool settingShowBlocked = false;
|
||||
bool settingsAdventureObjectAnimation = true;
|
||||
bool settingsAdventureTerrainAnimation = true;
|
||||
|
||||
@ -77,7 +77,7 @@ public:
|
||||
bool showBorder() const override;
|
||||
bool showGrid() const override;
|
||||
bool showVisitable() const override;
|
||||
bool showBlockable() const override;
|
||||
bool showBlocked() const override;
|
||||
};
|
||||
|
||||
class MapRendererAdventureTransitionContext : public MapRendererAdventureContext
|
||||
|
@ -177,7 +177,7 @@ void MapViewController::update(uint32_t timeDelta)
|
||||
adventureContext->settingsAdventureTerrainAnimation = settings["adventure"]["terrainAnimation"].Bool();
|
||||
adventureContext->settingShowGrid = settings["gameTweaks"]["showGrid"].Bool();
|
||||
adventureContext->settingShowVisitable = settings["session"]["showVisitable"].Bool();
|
||||
adventureContext->settingShowBlockable = settings["session"]["showBlockable"].Bool();
|
||||
adventureContext->settingShowBlocked = settings["session"]["showBlocked"].Bool();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user