diff pytouhou/lib/sdl.pyx @ 419:1c92721f8e49

Re-implement frame control
author Thibaut Girka <thib@sitedethib.com>
date Wed, 06 Feb 2013 18:45:12 +0100
parents 63f59be04a54
children 3a7b36324611
line wrap: on
line diff
--- a/pytouhou/lib/sdl.pyx
+++ b/pytouhou/lib/sdl.pyx
@@ -94,3 +94,11 @@ def get_keyboard_state():
     cdef const Uint8 *state
     state = SDL_GetKeyboardState(&numkeys)
     return tuple([k is not False for k in state[:numkeys]])
+
+
+def get_ticks():
+    return SDL_GetTicks()
+
+
+def delay(Uint32 ms):
+    SDL_Delay(ms)