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.154 by root, Tue Sep 19 22:23:30 2006 UTC vs.
Revision 1.161 by root, Mon Oct 9 23:30:44 2006 UTC

1#ifdef _WIN32 1#ifdef _WIN32
2# define WIN32_LEAN_AND_MEAN 2# define WIN32_LEAN_AND_MEAN
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# pragma warning(disable:4244) 7# pragma warning(disable:4244)
7#endif 8#endif
8 9
9#include "EXTERN.h" 10#include "EXTERN.h"
10#include "perl.h" 11#include "perl.h"
651#ifndef _WIN32 652#ifndef _WIN32
652 setsockopt (fd, IPPROTO_TCP, TCP_NODELAY, &val, sizeof (val)); 653 setsockopt (fd, IPPROTO_TCP, TCP_NODELAY, &val, sizeof (val));
653#endif 654#endif
654 655
655void 656void
657win32_proxy_info ()
658 PPCODE:
659{
660#ifdef _WIN32
661 char buffer[2048];
662 DWORD buflen;
663
664 EXTEND (SP, 3);
665
666 buflen = sizeof (buffer);
667 if (InternetQueryOption (0, INTERNET_OPTION_PROXY, (void *)buffer, &buflen))
668 if (((INTERNET_PROXY_INFO *)buffer)->dwAccessType == INTERNET_OPEN_TYPE_PROXY)
669 {
670 PUSHs (newSVpv (((INTERNET_PROXY_INFO *)buffer)->lpszProxy, 0));
671
672 buflen = sizeof (buffer);
673 if (InternetQueryOption (0, INTERNET_OPTION_PROXY_USERNAME, (void *)buffer, &buflen))
674 {
675 PUSHs (newSVpv (buffer, 0));
676
677 buflen = sizeof (buffer);
678 if (InternetQueryOption (0, INTERNET_OPTION_PROXY_PASSWORD, (void *)buffer, &buflen))
679 PUSHs (newSVpv (buffer, 0));
680 }
681 }
682#endif
683}
684
685void
656add_font (char *file) 686add_font (char *file)
657 CODE: 687 CODE:
658 FcConfigAppFontAddFile (0, (const FcChar8 *)file); 688 FcConfigAppFontAddFile (0, (const FcChar8 *)file);
659 689
660void 690void
762 MessageBox (0, message, "Crossfire+ Fatal Error", MB_OK | MB_ICONERROR); 792 MessageBox (0, message, "Crossfire+ Fatal Error", MB_OK | MB_ICONERROR);
763#endif 793#endif
764 _exit (1); 794 _exit (1);
765 795
766void 796void
767_exit (int retval) 797_exit (int retval = 0)
768 CODE: 798 CODE:
799#ifdef WIN32
800 ExitThread (retval); // unclean, please beam me up
801#else
769 _exit (retval); 802 _exit (retval);
803#endif
770 804
771MODULE = CFPlus PACKAGE = CFPlus::Font 805MODULE = CFPlus PACKAGE = CFPlus::Font
772 806
773CFPlus::Font 807CFPlus::Font
774new_from_file (SV *class, char *path, int id = 0) 808new_from_file (SV *class, char *path, int id = 0)
1333 } 1367 }
1334 while (ext & 0x80); 1368 while (ext & 0x80);
1335 } 1369 }
1336 else 1370 else
1337 cell->darkness = *data++ + 1; 1371 cell->darkness = *data++ + 1;
1338
1339 } 1372 }
1340 1373
1341 if (flags & 4) 1374 if (flags & 4)
1342 { 1375 {
1343 cell->face [0] = self->face [(data [0] << 8) + data [1]]; data += 2; 1376 cell->face [0] = self->face [(data [0] << 8) + data [1]]; data += 2;
1352 { 1385 {
1353 cell->face [2] = self->face [(data [0] << 8) + data [1]]; data += 2; 1386 cell->face [2] = self->face [(data [0] << 8) + data [1]]; data += 2;
1354 } 1387 }
1355 } 1388 }
1356 else 1389 else
1357 {
1358 cell->darkness = 0; 1390 cell->darkness = 0;
1359 cell->stat_hp = 0;
1360 cell->flags = 0;
1361 cell->player = 0;
1362 }
1363 } 1391 }
1364} 1392}
1365 1393
1366SV * 1394SV *
1367mapmap (CFPlus::Map self, int x0, int y0, int w, int h) 1395mapmap (CFPlus::Map self, int x0, int y0, int w, int h)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines