mirror of
https://github.com/thepigeongenerator/tetris_clone.git
synced 2025-12-17 14:05:45 +01:00
(micro)optimise downwards movement
This commit is contained in:
@@ -65,7 +65,7 @@ struct gamedata* game_init(void) {
|
||||
// called every time the game's state is updated
|
||||
void game_update(int movdat, size_t time) {
|
||||
static time_t drop_timeout = 0;
|
||||
movdat |= !!time_poll(time, 200, &drop_timeout) * MOVD;
|
||||
movdat |= MOVD & -!!time_poll(time, 200, &drop_timeout);
|
||||
place_update(&dat, movdat);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user