aboutsummaryrefslogtreecommitdiff
path: root/src/transform.rs
Commit message (Collapse)AuthorAgeLines
* Change to f64 as the preferred floating point numberArne Dußin2020-11-27-26/+26
|
* Fix some style errorsArne Dußin2020-11-10-0/+6
| | | | | Fixed the last warnings and ran clippy on the project. Fixed where appropriate and taught clippy otherwise. Now runs through clean.
* Combine zooming in and zooming out into one functionArne Dußin2020-11-02-46/+28
| | | | | There was a lot of duplicate and hacky code in the zooming functions, so I made them cleaner while hopefully staying true to the idea.
* Remove TODO that is doneArne Dußin2020-11-02-1/+0
|
* Tether on zoomArne Dußin2020-11-02-3/+16
|
* Make zoom-levels whole numbers to combat round-errArne Dußin2020-11-01-1/+6
| | | | | | | | The grid was offset at certain zoom-levels and lower positions, so for now I just made only whole zoom-levels possible, which removes the offset. However, I consider this a band-aid-solution. Maybe change from f32 to f64 and try out if that fixes it? Otherwise, a different algorithm might work.
* Refactor a major part of the projectArne Dußin2020-11-01-17/+17
| | | | | | | | | | In order to be able to save and load the map, a major rework of the code seemed necessary, since Vector2 and Rectangle of raylib do not implement serialize, and it seems cleanest to use the serialize/deserialize traits of serde, to save for instance to RON. ToolShed was renamed to Editor, since it should better show, that it does quite a bit more than harbour tools. The map data is now centrally saved in the editor, instead of decentralised in the tool structs.
* Rewrite project to use raylib instead of pistonArne Dußin2020-10-30-41/+35
| | | | | Sorry piston.. I really tried liking you, but I just couldn't :/ It's not you, it's me. What am I saying? It's you, sorry not sorry.
* Make map draggableArne Dußin2020-10-29-0/+5
| | | | | The map can be dragged around, but since the grid is not yet infinitely big, it feels quite weird to zoom and drag
* Make rectangles zoom together with the gridArne Dußin2020-10-29-0/+130