From 753f71536339b78c49468ba6452c96d6b3c345b2 Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Tue, 10 Oct 2017 19:33:33 +0200 Subject: Finish work on world entities, start experimenting with world generation. --- src/interface.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/interface.cpp') diff --git a/src/interface.cpp b/src/interface.cpp index 16fc77d..17c1727 100644 --- a/src/interface.cpp +++ b/src/interface.cpp @@ -68,8 +68,16 @@ void state_t::tick(void) camera.target_zoom -= event.mouseWheelScroll.delta; if (camera.target_zoom < 0) camera.target_zoom = 0; - if (camera.target_zoom > 10) - camera.target_zoom = 10; + if (camera.target_zoom > 11) + camera.target_zoom = 11; + break; + + case sf::Event::KeyPressed: + if (event.key.code == sf::Keyboard::Key::I) { + sf::Vector2i mouse = sf::Mouse::getPosition(*window); + sf::Vector2f vmouse = window->mapPixelToCoords(mouse); + game->world.debug_point(vmouse); + } break; default:; -- cgit