diff pytouhou/lib/_sdl.pxd @ 456:cae1ae9de430

Add native text support, MSG instructions 3 and 8, and text at the beginning of a stage.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Tue, 16 Jul 2013 21:11:40 +0200
parents 6864a38b2413
children 36bc577b2392
line wrap: on
line diff
--- a/pytouhou/lib/_sdl.pxd
+++ b/pytouhou/lib/_sdl.pxd
@@ -164,3 +164,19 @@ cdef extern from "SDL_mixer.h" nogil:
     int Mix_VolumeMusic(int volume)
 
     int Mix_PlayChannel(int channel, Mix_Chunk *chunk, int loops)
+
+
+cdef extern from "SDL_pixels.h" nogil:
+    ctypedef struct SDL_Color:
+        Uint8 r, g, b, a
+
+
+cdef extern from "SDL_ttf.h" nogil:
+    ctypedef struct TTF_Font:
+        pass
+
+    int TTF_Init()
+    void TTF_Quit()
+    TTF_Font *TTF_OpenFont(const char *filename, int ptsize)
+    void TTF_CloseFont(TTF_Font *font)
+    SDL_Surface *TTF_RenderUTF8_Blended(TTF_Font *font, const char *text, SDL_Color fg)