summaryrefslogtreecommitdiff
path: root/src/interface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/interface.cpp')
-rw-r--r--src/interface.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/interface.cpp b/src/interface.cpp
index aacc4b0..16fc77d 100644
--- a/src/interface.cpp
+++ b/src/interface.cpp
@@ -2,10 +2,10 @@
namespace interface {
-state_t::state_t(sf::RenderWindow *window_, world::world_t *world_)
+state_t::state_t(sf::RenderWindow *window_, game::state_t *game_)
{
window = window_;
- world = world_;
+ game = game_;
}
static sf::Vector2f compute_drag(sf::RenderWindow *window, sf::Vector2f drag_ref)
@@ -48,12 +48,6 @@ void state_t::tick(void)
return;
case sf::Event::MouseButtonPressed:
- if (event.mouseButton.button == 0) {
- sf::Vector2f vmouse = window->mapPixelToCoords(
- sf::Vector2i(event.mouseButton.x,
- event.mouseButton.y));
- world->get_tile(vmouse.x, vmouse.y)->type = 0;
- }
if (event.mouseButton.button == 1) {
camera.dragging = true;
camera.drag_ref = window->mapPixelToCoords(