mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-12-01 04:57:03 +03:00
7b22babed6
- fix load / save highscore - added message about game over - beautify text draw TODO: - optimize tile drawing: maybe separate canvas for every tile git-svn-id: svn://kolibrios.org@5238 a494cfbc-eb01-0410-851d-a64ba20cac60
25 lines
511 B
C
25 lines
511 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));
|
|
}
|
|
|
|
// Get text length in pixels
|
|
inline __u32 text_length_px(__u32 len)
|
|
{
|
|
return len * FONT_WIDTH + len;
|
|
}
|