--- deliantra/Deliantra-Client/Client.xs 2006/04/09 01:19:15 1.8 +++ deliantra/Deliantra-Client/Client.xs 2006/04/10 19:34:03 1.11 @@ -8,19 +8,32 @@ #include #include +#include #include +#include +#include +#include +#include + static PangoContext *context; static PangoFontMap *fontmap; MODULE = Crossfire::Client PACKAGE = Crossfire::Client +PROTOTYPES: ENABLE + BOOT: { fontmap = pango_ft2_font_map_new (); context = pango_ft2_font_map_create_context ((PangoFT2FontMap *)fontmap); } +void +lowdelay (int fd, int val = 1) + CODE: + setsockopt (fd, IPPROTO_TCP, TCP_NODELAY, &val, sizeof (val)); + char * gl_version () CODE: @@ -36,15 +49,14 @@ RETVAL void -add_font (char *file) +set_font (char *file) CODE: - FcConfigAppFontAddFile (0, (const FcChar8 *)file); - -void -set_font (char *pango_font) - CODE: { - PangoFontDescription *font = pango_font_description_from_string (pango_font); + int count; + FcPattern *pattern = FcFreeTypeQuery ((const FcChar8 *)file, 0, 0, &count); + FcConfigAppFontAddFile (0, (const FcChar8 *)file); /* no idea wether this is required */ + PangoFontDescription *font = pango_fc_font_description_from_pattern (pattern, 0); + FcPatternDestroy (pattern); pango_context_set_font_description (context, font); } @@ -90,3 +102,12 @@ PUSHs (sv_2mortal (newSViv (h))); PUSHs (sv_2mortal (retval)); } + +MODULE = Crossfire::Client PACKAGE = Crossfire::Client::Texture + +void +texture_quad (SV *self, double x0, double y0, double w, double h) + CODE: +{ + //glBegin +}