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.23 by root, Wed Apr 12 20:42:52 2006 UTC vs.
Revision 1.27 by root, Wed Apr 12 23:32:27 2006 UTC

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>
149 PUSHs (sv_2mortal (newSViv (surface2->w))); 146 PUSHs (sv_2mortal (newSViv (surface2->w)));
150 PUSHs (sv_2mortal (newSViv (surface2->h))); 147 PUSHs (sv_2mortal (newSViv (surface2->h)));
151 SDL_LockSurface (surface2); 148 SDL_LockSurface (surface2);
152 PUSHs (sv_2mortal (newSVpvn (surface2->pixels, surface2->h * surface2->pitch))); 149 PUSHs (sv_2mortal (newSVpvn (surface2->pixels, surface2->h * surface2->pitch)));
153 SDL_UnlockSurface (surface2); 150 SDL_UnlockSurface (surface2);
154 PUSHs (sv_2mortal (newSViv (surface->format->Amask ? GL_RGBA : GL_RGB))); 151 PUSHs (sv_2mortal (newSViv (surface->flags & (SDL_SRCCOLORKEY | SDL_SRCALPHA) ? GL_RGBA : GL_RGB)));
155 PUSHs (sv_2mortal (newSViv (GL_RGBA))); 152 PUSHs (sv_2mortal (newSViv (GL_RGBA)));
156 PUSHs (sv_2mortal (newSViv (GL_UNSIGNED_INT_8_8_8_8_REV))); 153 PUSHs (sv_2mortal (newSViv (GL_UNSIGNED_INT_8_8_8_8_REV)));
157 154
158 SDL_FreeSurface (surface); 155 SDL_FreeSurface (surface);
159 SDL_FreeSurface (surface2); 156 SDL_FreeSurface (surface2);
160} 157}
158
159void
160fatal (char *message)
161 CODE:
162#ifdef WIN32
163 MessageBox (0, message, "Crossfire+ Fatal Error", MB_OK | MB_ICONERROR | MB_SETFOREGROUND);
164#else
165 fprintf (stderr, "%s\n", message);
166#endif
167 exit (1);
161 168
162MODULE = CFClient PACKAGE = CFClient::Layout 169MODULE = CFClient PACKAGE = CFClient::Layout
163 170
164CFClient::Layout 171CFClient::Layout
165new (SV *class, int base_height = 10) 172new (SV *class, int base_height = 10)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines