mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2026-10-02 07:21:43 +00:00
migrated to SDL3
This commit is contained in:
@@ -153,7 +153,7 @@ void pass_time() {
|
||||
ld delta = t - last_t;
|
||||
dynamicval<eGeometry> g(geometry, geometry == gTwistedProduct ? geometry : gCubeTiling);
|
||||
|
||||
const Uint8 *keystate = SDL12_GetKeyState(NULL);
|
||||
const sdl_keystate_type *keystate = SDL12_GetKeyState(NULL);
|
||||
if(keystate['a'] || forcekey == 'a') current = apply_lorentz(current, lorentz(0, 2, delta*accel)), ang = 180, acc = true;
|
||||
if(keystate['d'] || forcekey == 'd') current = apply_lorentz(current, lorentz(0, 2, -delta*accel)), ang = 0, acc = true;
|
||||
if(keystate['w'] || forcekey == 'w') current = apply_lorentz(current, lorentz(1, 2, delta*accel)), ang = 90, acc = true;
|
||||
|
||||
@@ -432,7 +432,7 @@ void bantar_anim() {
|
||||
|
||||
SDL_Event ev;
|
||||
while(SDL_PollEvent(&ev))
|
||||
if(ev.type == SDL_KEYDOWN || ev.type == SDL_MOUSEBUTTONDOWN)
|
||||
if(ev.type == SDL_EVENT_KEY_DOWN || ev.type == SDL_EVENT_MOUSE_BUTTON_DOWN)
|
||||
breakanim = true;
|
||||
}
|
||||
mapeditor::drawplayer = true;
|
||||
|
||||
@@ -384,7 +384,7 @@ bool last_mkey = false;
|
||||
extern int mousepx, mousepy;
|
||||
|
||||
void game_frame() {
|
||||
const Uint8 *keystate = SDL12_GetKeyState(NULL);
|
||||
const sdl_keystate_type *keystate = SDL12_GetKeyState(NULL);
|
||||
if(keystate['3'])
|
||||
current_room->place_block_full(mousepx / block_x, mousepy / block_y, 0);
|
||||
if(keystate['1'])
|
||||
|
||||
Reference in New Issue
Block a user