… | |
… | |
6 | |
6 | |
7 | #include <SDL.h> |
7 | #include <SDL.h> |
8 | #include <SDL_opengl.h> |
8 | #include <SDL_opengl.h> |
9 | |
9 | |
10 | #include <pango/pango.h> |
10 | #include <pango/pango.h> |
|
|
11 | #include <pango/pangofc-fontmap.h> |
11 | #include <pango/pangoft2.h> |
12 | #include <pango/pangoft2.h> |
|
|
13 | |
|
|
14 | #include <sys/types.h> |
|
|
15 | #include <sys/socket.h> |
|
|
16 | #include <netinet/in.h> |
|
|
17 | #include <netinet/tcp.h> |
12 | |
18 | |
13 | static PangoContext *context; |
19 | static PangoContext *context; |
14 | static PangoFontMap *fontmap; |
20 | static PangoFontMap *fontmap; |
15 | |
21 | |
16 | MODULE = Crossfire::Client PACKAGE = Crossfire::Client |
22 | MODULE = Crossfire::Client PACKAGE = Crossfire::Client |
… | |
… | |
18 | BOOT: |
24 | BOOT: |
19 | { |
25 | { |
20 | fontmap = pango_ft2_font_map_new (); |
26 | fontmap = pango_ft2_font_map_new (); |
21 | context = pango_ft2_font_map_create_context ((PangoFT2FontMap *)fontmap); |
27 | context = pango_ft2_font_map_create_context ((PangoFT2FontMap *)fontmap); |
22 | } |
28 | } |
|
|
29 | |
|
|
30 | void |
|
|
31 | lowdelay (int fd, int val = 1) |
|
|
32 | CODE: |
|
|
33 | setsockopt (fd, IPPROTO_TCP, TCP_NODELAY, &val, sizeof (val)); |
23 | |
34 | |
24 | char * |
35 | char * |
25 | gl_version () |
36 | gl_version () |
26 | CODE: |
37 | CODE: |
27 | RETVAL = (char *)glGetString (GL_VERSION); |
38 | RETVAL = (char *)glGetString (GL_VERSION); |
… | |
… | |
40 | CODE: |
51 | CODE: |
41 | { |
52 | { |
42 | int count; |
53 | int count; |
43 | FcPattern *pattern = FcFreeTypeQuery ((const FcChar8 *)file, 0, 0, &count); |
54 | FcPattern *pattern = FcFreeTypeQuery ((const FcChar8 *)file, 0, 0, &count); |
44 | FcConfigAppFontAddFile (0, (const FcChar8 *)file); /* no idea wether this is required */ |
55 | FcConfigAppFontAddFile (0, (const FcChar8 *)file); /* no idea wether this is required */ |
45 | PangoFontDescription *font = pango_fc_font_description_from_pattern (pattern); |
56 | PangoFontDescription *font = pango_fc_font_description_from_pattern (pattern, 0); |
46 | FcPatternDestroy (pattern); |
57 | FcPatternDestroy (pattern); |
47 | pango_context_set_font_description (context, font); |
58 | pango_context_set_font_description (context, font); |
48 | } |
59 | } |
49 | |
60 | |
50 | void |
61 | void |