First commit.
First improvements to road placing (road direction, crossroad creation).
Finished roads placing with correct crossroads and turns creation.
Now roads draws, but not placed while mouse button is not released. Allows to adjust roads placement.
Optimized road placing.
Optimized image loading (using atlas instead of loading image from disk everytime.
Optimized finding of cell.
Moved the calculations of triangles square in C library.
Minor changes. Undo deleted commented code.
Removed bad string in triangle.c
Optimized cell finding by dynamically recursive builded tree, which made by subdividing the map on small rhombuses.
Drastically improved speed(about 30x faster) of calculating_path function for building pathes for roads:
- Using sets instead of lists for opened_list and closed_list.
- Got rid of unnecessary G and F coefficients (they don't need when not using diagonal cell for path building).
- Cell now stores it's neighbours.
Organized code into multiple modules.
Converted Scroller to singleton.
Added ObjectLayer. For rocks, trees, buildings etc.
Added interface layer and modes (road drawing, tree placing, in future building placing etc.)
Added trees drawing.
Also fixed calculate path function. In one of previous commits I had remove G and F coefficients from cells.
Thinking they are unnecessary when there are no diagonal routes. But I was wrong - they are necessary for optimal obstacles bypassing.
Added function to clean cells.
Added ability to scroll map diagonally and some other minor changes.
Compiled triangle library for windows.
Fixed z-ordering, when adding objects to object_layer.batch.
Added houses(without functionality).
Added Central Pillar and checking road connectivity between all building and pillar
Tweaked pillar creating/deleting
Moved road adding/changing/removing functions from IsoMap to Cell.