ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/Client.xs
(Generate patch)

Comparing deliantra/Deliantra-Client/Client.xs (file contents):
Revision 1.9 by root, Sun Apr 9 01:35:40 2006 UTC vs.
Revision 1.11 by root, Mon Apr 10 19:34:03 2006 UTC

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
13static PangoContext *context; 19static PangoContext *context;
14static PangoFontMap *fontmap; 20static PangoFontMap *fontmap;
15 21
16MODULE = Crossfire::Client PACKAGE = Crossfire::Client 22MODULE = Crossfire::Client PACKAGE = Crossfire::Client
17 23
24PROTOTYPES: ENABLE
25
18BOOT: 26BOOT:
19{ 27{
20 fontmap = pango_ft2_font_map_new (); 28 fontmap = pango_ft2_font_map_new ();
21 context = pango_ft2_font_map_create_context ((PangoFT2FontMap *)fontmap); 29 context = pango_ft2_font_map_create_context ((PangoFT2FontMap *)fontmap);
22} 30}
31
32void
33lowdelay (int fd, int val = 1)
34 CODE:
35 setsockopt (fd, IPPROTO_TCP, TCP_NODELAY, &val, sizeof (val));
23 36
24char * 37char *
25gl_version () 38gl_version ()
26 CODE: 39 CODE:
27 RETVAL = (char *)glGetString (GL_VERSION); 40 RETVAL = (char *)glGetString (GL_VERSION);
40 CODE: 53 CODE:
41{ 54{
42 int count; 55 int count;
43 FcPattern *pattern = FcFreeTypeQuery ((const FcChar8 *)file, 0, 0, &count); 56 FcPattern *pattern = FcFreeTypeQuery ((const FcChar8 *)file, 0, 0, &count);
44 FcConfigAppFontAddFile (0, (const FcChar8 *)file); /* no idea wether this is required */ 57 FcConfigAppFontAddFile (0, (const FcChar8 *)file); /* no idea wether this is required */
45 PangoFontDescription *font = pango_fc_font_description_from_pattern (pattern); 58 PangoFontDescription *font = pango_fc_font_description_from_pattern (pattern, 0);
46 FcPatternDestroy (pattern); 59 FcPatternDestroy (pattern);
47 pango_context_set_font_description (context, font); 60 pango_context_set_font_description (context, font);
48} 61}
49 62
50void 63void
87 EXTEND (SP, 3); 100 EXTEND (SP, 3);
88 PUSHs (sv_2mortal (newSViv (w))); 101 PUSHs (sv_2mortal (newSViv (w)));
89 PUSHs (sv_2mortal (newSViv (h))); 102 PUSHs (sv_2mortal (newSViv (h)));
90 PUSHs (sv_2mortal (retval)); 103 PUSHs (sv_2mortal (retval));
91} 104}
105
106MODULE = Crossfire::Client PACKAGE = Crossfire::Client::Texture
107
108void
109texture_quad (SV *self, double x0, double y0, double w, double h)
110 CODE:
111{
112 //glBegin
113}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines