kolibrios-gitea/programs/games/2048/defines.c
raandoom 3fdad8ab94 2048:
- fix flickering (canvas drawing added)
TODO:
 - optimize tile drawing: maybe separate canvas for every tile
 - game over screen
 - last game save / load
 - record save / load

git-svn-id: svn://kolibrios.org@5231 a494cfbc-eb01-0410-851d-a64ba20cac60
2014-12-14 17:05:58 +00:00

19 lines
403 B
C

#include "defines.h"
// Enable scancodes for event loop
inline void enable_scancode() {
__asm__ __volatile__("int $0x40"::"a"(66),"b"(1),"c"(1));
}
// Clear key buffer
inline void clear_key_buffer() {
int i = 0;
for (i = 0; i < 120; i++)
__menuet__getkey();
}
// Wait for screen draw (vertical sync)
inline void vsync() {
__asm__ __volatile__("int $0x40"::"a"(18),"b"(14));
}