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.234 by root, Mon Aug 27 02:52:54 2007 UTC vs.
Revision 1.235 by root, Tue Aug 28 01:23:47 2007 UTC

438 n |= n >> 4; 438 n |= n >> 4;
439 n |= n >> 8; 439 n |= n >> 8;
440 n |= n >> 16; 440 n |= n >> 16;
441 441
442 return n + 1; 442 return n + 1;
443}
444
445static unsigned int
446popcount (unsigned int n)
447{
448 n -= (n >> 1) & 0x55555555U;
449 n = ((n >> 2) & 0x33333333U) + (n & 0x33333333U);
450 n = ((n >> 4) + n) & 0x0f0f0f0fU;
451 n *= 0x01010101U;
452
453 return n >> 24;
443} 454}
444 455
445/* SDL should provide this, really. */ 456/* SDL should provide this, really. */
446#define SDLK_MODIFIER_MIN 300 457#define SDLK_MODIFIER_MIN 300
447#define SDLK_MODIFIER_MAX 314 458#define SDLK_MODIFIER_MAX 314
525 536
526 const_iv (SDL_APPINPUTFOCUS), 537 const_iv (SDL_APPINPUTFOCUS),
527 const_iv (SDL_APPMOUSEFOCUS), 538 const_iv (SDL_APPMOUSEFOCUS),
528 const_iv (SDL_APPACTIVE), 539 const_iv (SDL_APPACTIVE),
529 540
541 const_iv (SDLK_FIRST),
542 const_iv (SDLK_LAST),
530 const_iv (SDLK_KP0), 543 const_iv (SDLK_KP0),
531 const_iv (SDLK_KP1), 544 const_iv (SDLK_KP1),
532 const_iv (SDLK_KP2), 545 const_iv (SDLK_KP2),
533 const_iv (SDLK_KP3), 546 const_iv (SDLK_KP3),
534 const_iv (SDLK_KP4), 547 const_iv (SDLK_KP4),
633 646
634NV floor (NV x) 647NV floor (NV x)
635 648
636NV ceil (NV x) 649NV ceil (NV x)
637 650
651IV minpot (UV n)
652
653IV popcount (UV n)
654
638void 655void
639pango_init () 656pango_init ()
640 CODE: 657 CODE:
641{ 658{
642 opengl_fontmap = pango_opengl_font_map_new (); 659 opengl_fontmap = pango_opengl_font_map_new ();
1345} 1362}
1346 1363
1347MODULE = CFPlus PACKAGE = CFPlus::Texture 1364MODULE = CFPlus PACKAGE = CFPlus::Texture
1348 1365
1349PROTOTYPES: ENABLE 1366PROTOTYPES: ENABLE
1350
1351int minpot (int n)
1352 1367
1353void 1368void
1354pad (SV *data_, int ow, int oh, int nw, int nh) 1369pad (SV *data_, int ow, int oh, int nw, int nh)
1355 CODE: 1370 CODE:
1356{ 1371{

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines