1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

NKAI: object graph improved and optimized

This commit is contained in:
Andrii Danylchenko
2024-03-17 09:34:54 +02:00
parent 3e959f3ad9
commit e66ceff154
9 changed files with 362 additions and 47 deletions

View File

@ -71,6 +71,8 @@ public:
virtual void drawLine(int3 start, int3 end) override
{
const Point offset = Point(30, 30);
auto level = model->getLevel();
if(start.z != level || end.z != level)
@ -83,6 +85,9 @@ public:
pStart.x += 3;
pEnd.x -= 3;
pStart += offset;
pEnd += offset;
if(viewPort.isInside(pStart) && viewPort.isInside(pEnd))
{
target.drawLine(pStart, pEnd, ColorRGBA(255, 255, 0), ColorRGBA(255, 0, 0));