| Commit message (Collapse) | Author | Age | Lines |
| |
|
|
|
|
|
| |
When adding the polygon room tool, a problem with drawing polygons
arised. Drawing a simple, but nonregular polygon is not something that
is supported by raylib, so further additions to the math library are
needed.
|
| | |
|
| |
|
|
|
|
|
| |
Since the tool sidebar was always setting the currently active tool and
that meant even when no change occured, the tool was being deactivated
and reactivated, nothing happened except for the icon tool. Now, it's
checked if any change is necessary in the editor
|
| | |
|
| | |
|
| |\ |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| | |
The algorithm before was really not working for a lot of edge cases and
very difficult to adapt. This version is definitely not the be-all and
end-all, but it should work for most (well, hopefully all) cases. After
refactoring and hopefully simplifying and straightening out the logic a
little more, it should be verifiable.
|
| | |
| |
| |
| |
| | |
..except for one super super edgy edge case, but I wanted to get this
algorithm out into a commit before I ruin it completely (probably)
|
| |\ \ |
|
| | |/
| |
| |
| |
| | |
The dimension indicators were drawn very for the blink of an eye when
starting a rect that comes after the first. This commit should fix that.
|
| |/ |
|
| |
|
|
|
| |
0.5 was used as a magical number throughout the code for that until now,
which I now changed.
|
| |
|
|
|
| |
Fixed the last warnings and ran clippy on the project. Fixed where
appropriate and taught clippy otherwise. Now runs through clean.
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
The icon that would be placed next, but is not on the map was always
drawn once the icon-tool was activated once. This is no longer the case.
Also, the tool now saves the last icon that was selected and keeps the
rotation of it between placements, which I deemed more intuitive.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
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.
|
| |
|
|
|
| |
At least under windows a very high CPU and GPU load was noticed, which
is why this change was made.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| |
|
|
|
| |
Walls were really hard to see, especially on High-DPI Monitors, so I
made them stand out more
|
| |
|
|
|
|
| |
The wall tool is currently just one pixels lines, which must be changed
in the future, of course, but this is also to test changing between
tools.
|
| | |
|
| | |
|
| |
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
| |
The map can be dragged around, but since the grid is not yet infinitely
big, it feels quite weird to zoom and drag
|
| | |
|