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.160 by root, Mon Oct 9 01:06:36 2006 UTC vs.
Revision 1.163 by root, Wed Oct 18 12:53:45 2006 UTC

1#ifdef _WIN32 1#ifdef _WIN32
2long _ftol (double); /* defined by VC6 C libs */
3long _ftol2 (double dblSource) { return _ftol (dblSource); }
4# define WIN32_LEAN_AND_MEAN 2# define WIN32_LEAN_AND_MEAN
5# define _WIN32_WINNT 0x0500 // needed to get win2000 api calls 3# define _WIN32_WINNT 0x0500 // needed to get win2000 api calls
6# include <malloc.h> 4# include <malloc.h>
7# include <windows.h> 5# include <windows.h>
8# include <wininet.h> 6# include <wininet.h>
9# pragma warning(disable:4244) 7# pragma warning(disable:4244)
8# pragma warning(disable:4761)
10#endif 9#endif
11 10
12#include "EXTERN.h" 11#include "EXTERN.h"
13#include "perl.h" 12#include "perl.h"
14#include "XSUB.h" 13#include "XSUB.h"
39# include <sys/types.h> 38# include <sys/types.h>
40# include <sys/socket.h> 39# include <sys/socket.h>
41# include <netinet/in.h> 40# include <netinet/in.h>
42# include <netinet/tcp.h> 41# include <netinet/tcp.h>
43# include <inttypes.h> 42# include <inttypes.h>
44#else
45 typedef unsigned char uint8_t;
46 typedef unsigned short uint16_t;
47 typedef unsigned int uint32_t;
48 typedef signed char int8_t;
49 typedef signed short int16_t;
50 typedef signed int int32_t;
51#endif 43#endif
52 44
53#define OBJ_STR "\xef\xbf\xbc" /* U+FFFC, objetc replacement character */ 45#define OBJ_STR "\xef\xbf\xbc" /* U+FFFC, object replacement character */
54 46
55#define FOW_DARKNESS 32 47#define FOW_DARKNESS 32
56 48
57#define MAP_EXTEND_X 32 49#define MAP_EXTEND_X 32
58#define MAP_EXTEND_Y 512 50#define MAP_EXTEND_Y 512
796 _exit (1); 788 _exit (1);
797 789
798void 790void
799_exit (int retval = 0) 791_exit (int retval = 0)
800 CODE: 792 CODE:
793#ifdef WIN32
794 ExitThread (retval); // unclean, please beam me up
795#else
801 _exit (retval); 796 _exit (retval);
797#endif
802 798
803MODULE = CFPlus PACKAGE = CFPlus::Font 799MODULE = CFPlus PACKAGE = CFPlus::Font
804 800
805CFPlus::Font 801CFPlus::Font
806new_from_file (SV *class, char *path, int id = 0) 802new_from_file (SV *class, char *path, int id = 0)
1456 int vx, vy; 1452 int vx, vy;
1457 int x, y, z; 1453 int x, y, z;
1458 int last_name; 1454 int last_name;
1459 mapface face; 1455 mapface face;
1460 1456
1461 vx = self->x + self->w / 2 - sw / 2 - shift_x; 1457 vx = self->x + ((self->w - sw) >> 1) - shift_x;
1462 vy = self->y + self->h / 2 - sh / 2 - shift_y; 1458 vy = self->y + ((self->h - sh) >> 1) - shift_y;
1463 1459
1464 /* 1460 /*
1465 int vx = self->vx = self->w >= sw 1461 int vx = self->vx = self->w >= sw
1466 ? self->x + (self->w - sw) / 2 1462 ? self->x + (self->w - sw) / 2
1467 : MIN (self->x, MAX (self->x + self->w - sw + 1, self->vx)); 1463 : MIN (self->x, MAX (self->x + self->w - sw + 1, self->vx));

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines