mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-10-21 08:57:39 +00:00
fixed smooth movement in modes other than sm::NORMAL
This commit is contained in:
@@ -735,7 +735,7 @@ EX void mainloopiter() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
mousepan = cmode & sm::NORMAL;
|
mousepan = cmode & sm::NORMAL;
|
||||||
if((cmode & (sm::DRAW | sm::MAP)) && !hiliteclick) mousepan = true;
|
if((cmode & sm::PANNING) && !hiliteclick) mousepan = true;
|
||||||
if(cmode & sm::SHOWCURSOR) mousepan = false;
|
if(cmode & sm::SHOWCURSOR) mousepan = false;
|
||||||
mousepan = mousepan && mouseaiming(false) && mouseaim_sensitivity;
|
mousepan = mousepan && mouseaiming(false) && mouseaim_sensitivity;
|
||||||
if(mousepan != oldmousepan) {
|
if(mousepan != oldmousepan) {
|
||||||
@@ -900,7 +900,7 @@ EX void mainloopiter() {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if(smooth_scrolling && !shmup::on && (cmode & sm::NORMAL)) {
|
if(smooth_scrolling && !shmup::on && (cmode & (sm::NORMAL | sm::PANNING))) {
|
||||||
rug::using_rugview urv;
|
rug::using_rugview urv;
|
||||||
auto& lastticks = sc_ticks;
|
auto& lastticks = sc_ticks;
|
||||||
ld t = (ticks - lastticks) * shiftmul / 1000.;
|
ld t = (ticks - lastticks) * shiftmul / 1000.;
|
||||||
|
@@ -5490,6 +5490,7 @@ namespace sm {
|
|||||||
static const int HEXEDIT = (1<<17);
|
static const int HEXEDIT = (1<<17);
|
||||||
static const int VR_MENU = (1<<18); // always show the menu in VR
|
static const int VR_MENU = (1<<18); // always show the menu in VR
|
||||||
static const int SHOWCURSOR = (1<<19); // despite MAP/DRAW always show the cursor, no panning
|
static const int SHOWCURSOR = (1<<19); // despite MAP/DRAW always show the cursor, no panning
|
||||||
|
static const int PANNING = (1<<20); // smooth scrolling works
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -1321,7 +1321,7 @@ EX namespace mapeditor {
|
|||||||
EX set<int> affected_id;
|
EX set<int> affected_id;
|
||||||
|
|
||||||
EX void showMapEditor() {
|
EX void showMapEditor() {
|
||||||
cmode = sm::MAP;
|
cmode = sm::MAP | sm::PANNING;
|
||||||
gamescreen(0);
|
gamescreen(0);
|
||||||
|
|
||||||
int fs = editor_fsize();
|
int fs = editor_fsize();
|
||||||
@@ -2001,7 +2001,7 @@ EX namespace mapeditor {
|
|||||||
|
|
||||||
EX void showDrawEditor() {
|
EX void showDrawEditor() {
|
||||||
#if CAP_POLY
|
#if CAP_POLY
|
||||||
cmode = sm::DRAW;
|
cmode = sm::DRAW | sm::PANNING;
|
||||||
gamescreen(0);
|
gamescreen(0);
|
||||||
drawGrid();
|
drawGrid();
|
||||||
if(callhandlers(false, hooks_prestats)) return;
|
if(callhandlers(false, hooks_prestats)) return;
|
||||||
|
2
rug.cpp
2
rug.cpp
@@ -1539,7 +1539,7 @@ EX void rug_geometry_choice() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
EX void show() {
|
EX void show() {
|
||||||
cmode = sm::SIDE | sm::MAYDARK;
|
cmode = sm::SIDE | sm::MAYDARK | sm::PANNING;
|
||||||
gamescreen(0);
|
gamescreen(0);
|
||||||
dialog::init(XLAT("hypersian rug mode"), iinf[itPalace].color, 150, 100);
|
dialog::init(XLAT("hypersian rug mode"), iinf[itPalace].color, 150, 100);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user