mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-02-03 12:49:17 +00:00
fixed -rugon, added -ruggo for automatic movement in rug
This commit is contained in:
parent
850631107c
commit
4b0cbeebcd
16
rug.cpp
16
rug.cpp
@ -37,6 +37,7 @@ bool renderonce = false;
|
|||||||
bool rendernogl = false;
|
bool rendernogl = false;
|
||||||
int texturesize = 1024;
|
int texturesize = 1024;
|
||||||
ld scale = 1;
|
ld scale = 1;
|
||||||
|
ld ruggo = 0;
|
||||||
|
|
||||||
ld err_zero = 1e-3, err_zero_current, current_total_error;
|
ld err_zero = 1e-3, err_zero_current, current_total_error;
|
||||||
|
|
||||||
@ -1350,12 +1351,15 @@ void actDraw() {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if CAP_HOLDKEYS
|
|
||||||
Uint8 *keystate = SDL_GetKeyState(NULL);
|
|
||||||
int qm = 0;
|
int qm = 0;
|
||||||
double alpha = (ticks - lastticks) / 1000.0;
|
double alpha = (ticks - lastticks) / 1000.0;
|
||||||
lastticks = ticks;
|
lastticks = ticks;
|
||||||
|
|
||||||
|
if(ruggo) move_forward(ruggo * alpha);
|
||||||
|
|
||||||
|
#if CAP_HOLDKEYS
|
||||||
|
Uint8 *keystate = SDL_GetKeyState(NULL);
|
||||||
|
|
||||||
transmatrix t = Id;
|
transmatrix t = Id;
|
||||||
|
|
||||||
auto perform_finger = [=] () {
|
auto perform_finger = [=] () {
|
||||||
@ -1669,6 +1673,10 @@ int rugArgs() {
|
|||||||
rug_perspective = true;
|
rug_perspective = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
else if(argis("-rugauto")) {
|
||||||
|
shift(); ruggo = argf();
|
||||||
|
}
|
||||||
|
|
||||||
else if(argis("-rugorth")) {
|
else if(argis("-rugorth")) {
|
||||||
rug_perspective = false;
|
rug_perspective = false;
|
||||||
}
|
}
|
||||||
@ -1686,7 +1694,9 @@ int rugArgs() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
else if(argis("-rugon")) {
|
else if(argis("-rugon")) {
|
||||||
PHASE(3); rug::init();
|
PHASE(3);
|
||||||
|
calcparam();
|
||||||
|
rug::init();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if CAP_ODS
|
#if CAP_ODS
|
||||||
|
Loading…
Reference in New Issue
Block a user