--- deliantra/Deliantra-Client/Client.xs 2006/04/20 08:11:56 1.55 +++ deliantra/Deliantra-Client/Client.xs 2006/04/23 00:57:38 1.58 @@ -35,11 +35,15 @@ typedef signed int int32_t; #endif +#include "glext.h" + #define FOW_DARKNESS 32 #define MAP_EXTEND_X 32 #define MAP_EXTEND_Y 512 +#define MIN_FONT_HEIGHT 8 * PANGO_SCALE + typedef Mix_Chunk *CFClient__MixChunk; typedef Mix_Music *CFClient__MixMusic; @@ -68,6 +72,9 @@ int height = self->base_height * (PANGO_SCALE * 8 / 10); + if (height < MIN_FONT_HEIGHT) + height = MIN_FONT_HEIGHT; + if (pango_font_description_get_size (font) != height) { pango_font_description_set_absolute_size (font, height); @@ -241,6 +248,19 @@ } } +static void +music_finished () +{ + SDL_UserEvent ev; + + ev.type = SDL_USEREVENT; + ev.code = 0; + ev.data1 = 0; + ev.data2 = 0; + + SDL_PushEvent ((SDL_Event *)&ev); +} + MODULE = CFClient PACKAGE = CFClient PROTOTYPES: ENABLE @@ -465,6 +485,8 @@ int Mix_OpenAudio (int frequency = 22050, int format = MIX_DEFAULT_FORMAT, int channels = 1, int chunksize = 512) + POSTCALL: + Mix_HookMusicFinished (music_finished); void Mix_CloseAudio () @@ -1310,6 +1332,12 @@ const_iv (GL_REPEAT), const_iv (GL_NEAREST), const_iv (GL_LINEAR), + const_iv (GL_NEAREST_MIPMAP_NEAREST), + const_iv (GL_LINEAR_MIPMAP_NEAREST), + const_iv (GL_NEAREST_MIPMAP_LINEAR), + const_iv (GL_LINEAR_MIPMAP_LINEAR), + const_iv (GL_GENERATE_MIPMAP), + const_iv (GL_LINEAR), const_iv (GL_MODULATE), const_iv (GL_REPLACE), const_iv (GL_COLOR_BUFFER_BIT),