1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2026-05-09 08:32:07 +00:00

more intuitive auto-drag

This commit is contained in:
Zeno Rogue
2026-04-29 11:54:41 +02:00
parent 5b1c2e7acd
commit e7e95e8d67
2 changed files with 17 additions and 8 deletions
-4
View File
@@ -2501,16 +2501,12 @@ EX void resetview() {
// SDL_UnlockSurface(s);
}
EX void panning(shiftpoint hf0, shiftpoint ht0) {
hyperpoint hf = hf0.h;
hyperpoint ht = unshift(ht0, hf0.shift);
ld d = hdist(hf, ht);
if(drag_sensitivity && d < 1/drag_sensitivity && drag_distance == 0) return;
View =
rgpushxto0(hf) * rgpushxto0(gpushxto0(hf) * ht) * gpushxto0(hf) * View;
playermoved = false; currently_scrolling = true;
drag_distance += d;
}
EX int cells_drawn, cells_generated;