1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-24 02:17:40 +00:00

faster graphics with MINIMIZE_GL_CALLS

This commit is contained in:
Zeno Rogue
2018-09-04 23:27:27 +02:00
parent 5680ef3788
commit 35353fe70e
7 changed files with 133 additions and 29 deletions

View File

@@ -508,12 +508,6 @@ void mainloopiter() {
if(cwt.mirrored) playerV = playerV * Mirror;
}
#if ISWEB
if(playermoved && vid.sspeed > -4.99 && !outoffocus) {
centerpc((ticks - lastt) / 1000.0 * exp(vid.sspeed));
}
if(!outoffocus) drawscreen();
#else
if(timetowait > 0)
SDL_Delay(timetowait);
else {
@@ -521,8 +515,10 @@ void mainloopiter() {
if(cmode & sm::CENTER) {
if(playermoved && vid.sspeed > -4.99 && !outoffocus)
centerpc((ticks - lastt) / 1000.0 * exp(vid.sspeed));
#if CAP_SDLJOY
if(panjoyx || panjoyy)
checkpanjoy((ticks - lastt) / 1000.0);
#endif
}
tortoise::updateVals(ticks - lastt);
frames++;
@@ -531,7 +527,6 @@ void mainloopiter() {
}
lastt = ticks;
}
#endif
Uint8 *keystate = SDL_GetKeyState(NULL);
rightclick = keystate[SDLK_RCTRL];