1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

dead area for zoom

This commit is contained in:
Michael
2023-08-27 14:00:40 +02:00
committed by GitHub
parent 3b06abd0d7
commit f16b93c391
2 changed files with 15 additions and 4 deletions

View File

@@ -10,9 +10,9 @@
#pragma once
#include "IMapRendererObserver.h"
#include "../../lib/Point.h"
VCMI_LIB_NAMESPACE_BEGIN
class Point;
struct ObjectPosInfo;
VCMI_LIB_NAMESPACE_END
@@ -50,6 +50,10 @@ class MapViewController : public IMapObjectObserver
std::shared_ptr<MapRendererPuzzleMapContext> puzzleMapContext;
private:
const int defaultTileSize = 32;
const int zoomTileDeadArea = 4;
Point targetTileSize = Point(32, 32);
bool isEventInstant(const CGObjectInstance * obj);
bool isEventVisible(const CGObjectInstance * obj);
bool isEventVisible(const CGHeroInstance * obj, const int3 & from, const int3 & dest);