git repos / saland

commit 53ea082c

sago007 · 2018-09-09 11:47
53ea082c8c12ae632cda67722e81f724f5079bb6 patch · browse files
parent 2862af0ed2a23626abec5274623f1d243fb792bb

Can now clear from the blocking layer using "e"

Changed files

M src/saland/Game.cpp before
diff --git a/src/saland/Game.cpp b/src/saland/Game.cpp index 9b3c1ab..4a29f4d 100644 --- a/src/saland/Game.cpp +++ b/src/saland/Game.cpp
@@ -347,6 +347,12 @@ void Game::ProcessInput(const SDL_Event& event, bool& processed) {
sago::tiled::setTileOnLayerNumber(data->world.tm, layer_number, data->world_mouse_x/32, data->world_mouse_y/32, tile);
data->world.init_physics(data->physicsBox);
}
+ if (event.key.keysym.sym == SDLK_e) {
+ int layer_number = 2; // Do not hardcode
+ uint32_t tile = 0;
+ sago::tiled::setTileOnLayerNumber(data->world.tm, layer_number, data->world_mouse_x/32, data->world_mouse_y/32, tile);
+ data->world.init_physics(data->physicsBox);
+ }
}
}