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.158 by root, Sun Oct 1 18:17:37 2006 UTC vs.
Revision 1.163 by root, Wed Oct 18 12:53:45 2006 UTC

3# define _WIN32_WINNT 0x0500 // needed to get win2000 api calls 3# define _WIN32_WINNT 0x0500 // needed to get win2000 api calls
4# include <malloc.h> 4# include <malloc.h>
5# include <windows.h> 5# include <windows.h>
6# include <wininet.h> 6# include <wininet.h>
7# pragma warning(disable:4244) 7# pragma warning(disable:4244)
8# pragma warning(disable:4761)
8#endif 9#endif
9 10
10#include "EXTERN.h" 11#include "EXTERN.h"
11#include "perl.h" 12#include "perl.h"
12#include "XSUB.h" 13#include "XSUB.h"
37# include <sys/types.h> 38# include <sys/types.h>
38# include <sys/socket.h> 39# include <sys/socket.h>
39# include <netinet/in.h> 40# include <netinet/in.h>
40# include <netinet/tcp.h> 41# include <netinet/tcp.h>
41# include <inttypes.h> 42# include <inttypes.h>
42#else
43 typedef unsigned char uint8_t;
44 typedef unsigned short uint16_t;
45 typedef unsigned int uint32_t;
46 typedef signed char int8_t;
47 typedef signed short int16_t;
48 typedef signed int int32_t;
49#endif 43#endif
50 44
51#define OBJ_STR "\xef\xbf\xbc" /* U+FFFC, objetc replacement character */ 45#define OBJ_STR "\xef\xbf\xbc" /* U+FFFC, object replacement character */
52 46
53#define FOW_DARKNESS 32 47#define FOW_DARKNESS 32
54 48
55#define MAP_EXTEND_X 32 49#define MAP_EXTEND_X 32
56#define MAP_EXTEND_Y 512 50#define MAP_EXTEND_Y 512
656void 650void
657win32_proxy_info () 651win32_proxy_info ()
658 PPCODE: 652 PPCODE:
659{ 653{
660#ifdef _WIN32 654#ifdef _WIN32
661 INTERNET_PROXY_INFO proxyinfo;
662 char buffer[2048]; 655 char buffer[2048];
663 DWORD buflen; 656 DWORD buflen;
664 657
665 EXTEND (SP, 3); 658 EXTEND (SP, 3);
666 659
795 _exit (1); 788 _exit (1);
796 789
797void 790void
798_exit (int retval = 0) 791_exit (int retval = 0)
799 CODE: 792 CODE:
793#ifdef WIN32
794 ExitThread (retval); // unclean, please beam me up
795#else
800 _exit (retval); 796 _exit (retval);
797#endif
801 798
802MODULE = CFPlus PACKAGE = CFPlus::Font 799MODULE = CFPlus PACKAGE = CFPlus::Font
803 800
804CFPlus::Font 801CFPlus::Font
805new_from_file (SV *class, char *path, int id = 0) 802new_from_file (SV *class, char *path, int id = 0)
1455 int vx, vy; 1452 int vx, vy;
1456 int x, y, z; 1453 int x, y, z;
1457 int last_name; 1454 int last_name;
1458 mapface face; 1455 mapface face;
1459 1456
1460 vx = self->x + self->w / 2 - sw / 2 - shift_x; 1457 vx = self->x + ((self->w - sw) >> 1) - shift_x;
1461 vy = self->y + self->h / 2 - sh / 2 - shift_y; 1458 vy = self->y + ((self->h - sh) >> 1) - shift_y;
1462 1459
1463 /* 1460 /*
1464 int vx = self->vx = self->w >= sw 1461 int vx = self->vx = self->w >= sw
1465 ? self->x + (self->w - sw) / 2 1462 ? self->x + (self->w - sw) / 2
1466 : 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