aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/cpp/WorldScene.cpp
blob: ab1c4d0957d72acc86168d8b082637dfa67e17c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include "WorldScene.hpp"

WorldScene::WorldScene()
{
    _tileSize = DEFAULT_TILE_SIZE_PX;
}

void WorldScene::render(sf::RenderWindow &window)
{
    sf::RectangleShape rect;

    rect.setSize(sf::Vector2f(_tileSize, _tileSize));
    rect.setFillColor(sf::Color::Green);

    rect.setOutlineThickness(-.5);
    rect.setOutlineColor(sf::Color::Black);

    for (const Tile &tile : map.tiles()) {
        rect.setPosition(tile.x * _tileSize, tile.y * _tileSize);
        window.draw(rect);
    }
}

void WorldScene::zoom(int value)
{}

void WorldScene::pan(int dx, int dy)
{}