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