1 | #include "EXTERN.h" |
1 | #include "EXTERN.h" |
2 | #include "perl.h" |
2 | #include "perl.h" |
3 | #include "XSUB.h" |
3 | #include "XSUB.h" |
4 | |
4 | |
5 | #include <string.h> |
5 | #include <string.h> |
|
|
6 | #include <stdio.h> |
6 | |
7 | |
7 | #include <SDL.h> |
8 | #include <SDL.h> |
8 | #include <SDL_image.h> |
9 | #include <SDL_image.h> |
9 | #include <SDL_opengl.h> |
10 | #include <SDL_opengl.h> |
10 | |
11 | |
11 | #include <pango/pango.h> |
12 | #include <pango/pango.h> |
12 | #include <pango/pangofc-fontmap.h> |
13 | #include <pango/pangofc-fontmap.h> |
13 | #include <pango/pangoft2.h> |
14 | #include <pango/pangoft2.h> |
14 | |
|
|
15 | #include <sys/time.h> |
|
|
16 | #include <sys/types.h> |
|
|
17 | #include <unistd.h> |
|
|
18 | |
15 | |
19 | #include <sys/types.h> |
16 | #include <sys/types.h> |
20 | #include <sys/socket.h> |
17 | #include <sys/socket.h> |
21 | #include <netinet/in.h> |
18 | #include <netinet/in.h> |
22 | #include <netinet/tcp.h> |
19 | #include <netinet/tcp.h> |
… | |
… | |
85 | gl_extensions () |
82 | gl_extensions () |
86 | CODE: |
83 | CODE: |
87 | RETVAL = (char *)glGetString (GL_EXTENSIONS); |
84 | RETVAL = (char *)glGetString (GL_EXTENSIONS); |
88 | OUTPUT: |
85 | OUTPUT: |
89 | RETVAL |
86 | RETVAL |
|
|
87 | |
|
|
88 | void |
|
|
89 | glConvolutionParameteri (U32 target, U32 name, I32 value) |
|
|
90 | |
|
|
91 | void |
|
|
92 | glConvolutionFilter2D (U32 target, U32 internalformat, I32 width, I32 height, U32 format, U32 type, char *image) |
90 | |
93 | |
91 | void |
94 | void |
92 | add_font (char *file) |
95 | add_font (char *file) |
93 | CODE: |
96 | CODE: |
94 | FcConfigAppFontAddFile (0, (const FcChar8 *)file); /* no idea wether this is required */ |
97 | FcConfigAppFontAddFile (0, (const FcChar8 *)file); /* no idea wether this is required */ |
… | |
… | |
149 | PUSHs (sv_2mortal (newSViv (surface2->w))); |
152 | PUSHs (sv_2mortal (newSViv (surface2->w))); |
150 | PUSHs (sv_2mortal (newSViv (surface2->h))); |
153 | PUSHs (sv_2mortal (newSViv (surface2->h))); |
151 | SDL_LockSurface (surface2); |
154 | SDL_LockSurface (surface2); |
152 | PUSHs (sv_2mortal (newSVpvn (surface2->pixels, surface2->h * surface2->pitch))); |
155 | PUSHs (sv_2mortal (newSVpvn (surface2->pixels, surface2->h * surface2->pitch))); |
153 | SDL_UnlockSurface (surface2); |
156 | SDL_UnlockSurface (surface2); |
154 | PUSHs (sv_2mortal (newSViv (surface->format->Amask ? GL_RGBA : GL_RGB))); |
157 | PUSHs (sv_2mortal (newSViv (surface->flags & (SDL_SRCCOLORKEY | SDL_SRCALPHA) ? GL_RGBA : GL_RGB))); |
155 | PUSHs (sv_2mortal (newSViv (GL_RGBA))); |
158 | PUSHs (sv_2mortal (newSViv (GL_RGBA))); |
156 | PUSHs (sv_2mortal (newSViv (GL_UNSIGNED_INT_8_8_8_8_REV))); |
159 | PUSHs (sv_2mortal (newSViv (GL_UNSIGNED_INT_8_8_8_8_REV))); |
157 | |
160 | |
158 | SDL_FreeSurface (surface); |
161 | SDL_FreeSurface (surface); |
159 | SDL_FreeSurface (surface2); |
162 | SDL_FreeSurface (surface2); |
160 | } |
163 | } |
|
|
164 | |
|
|
165 | void |
|
|
166 | fatal (char *message) |
|
|
167 | CODE: |
|
|
168 | #ifdef WIN32 |
|
|
169 | MessageBox (0, message, "Crossfire+ Fatal Error", MB_OK | MB_ICONERROR | MB_SETFOREGROUND); |
|
|
170 | #else |
|
|
171 | fprintf (stderr, "%s\n", message); |
|
|
172 | #endif |
|
|
173 | exit (1); |
161 | |
174 | |
162 | MODULE = CFClient PACKAGE = CFClient::Layout |
175 | MODULE = CFClient PACKAGE = CFClient::Layout |
163 | |
176 | |
164 | CFClient::Layout |
177 | CFClient::Layout |
165 | new (SV *class, int base_height = 10) |
178 | new (SV *class, int base_height = 10) |