瀏覽代碼

Renamed showBlockable to showBlocked

krs 2 年之前
父節點
當前提交
7e97885e73

+ 1 - 1
client/mapView/IMapRendererContext.h

@@ -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;
 };

+ 7 - 7
client/mapView/MapRenderer.cpp

@@ -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())

+ 1 - 1
client/mapView/MapRenderer.h

@@ -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();
 

+ 3 - 3
client/mapView/MapRendererContext.cpp

@@ -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)

+ 3 - 3
client/mapView/MapRendererContext.h

@@ -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

+ 1 - 1
client/mapView/MapViewController.cpp

@@ -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();
 	}
 }