Add interpolation to tile tools

This uses DDA (https://w.wiki/6RSQ) to draw a line between the previous
frame's mouse position, and the current frame's mouse position. This
means that there will no longer be gaps in lines of tiles if you move
your mouse fast enough (which is actually rather slow, so it gets
annoying quickly).

The editor's timestep is no longer hardcoded to 24, as I assume that
was only done so there would be less gaps in lines of tiles drawn.
With interpolation, that is no longer an issue, so I've removed the
editor's special case for the timestep.
This commit is contained in:
AllyTally
2023-03-09 14:21:03 -04:00
committed by Misa Elizabeth Kai
parent 6cae666c76
commit d152730510
3 changed files with 37 additions and 8 deletions

View File

@@ -195,6 +195,7 @@ public:
std::string filename;
std::string loaded_filepath;
int old_tilex, old_tiley;
int tilex, tiley;
int keydelay, lclickdelay;
bool savekey, loadkey;