1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2026-03-20 11:59:43 +00:00

HyperRogue ported to SDL2 (in mymake do -sdl2)

This commit is contained in:
Zeno Rogue
2021-03-06 14:53:25 +01:00
parent 87cbfaeac3
commit f00696711a
12 changed files with 396 additions and 87 deletions

View File

@@ -876,8 +876,12 @@ void movePlayer(monster *m, int delta) {
}
#if CAP_SDL
Uint8 *keystate = SDL_GetKeyState(NULL);
const Uint8 *keystate = SDL12_GetKeyState(NULL);
#if CAP_SDL2
bool forcetarget = (keystate[SDL_SCANCODE_RSHIFT] | keystate[SDL_SCANCODE_LSHIFT]);
#else
bool forcetarget = (keystate[SDLK_RSHIFT] | keystate[SDLK_LSHIFT]);
#endif
if(((mousepressed && !forcetarget) || facemouse) && delta > 0 && !mouseout() && !stdracing && GDIM == 2) {
// playermoved = true;
hyperpoint h = inverse_shift(m->pat, mouseh);