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.69 by root, Sun Apr 30 08:09:44 2006 UTC vs.
Revision 1.70 by root, Sun Apr 30 09:21:47 2006 UTC

457 457
458 while (SDL_PollEvent (&ev)) 458 while (SDL_PollEvent (&ev))
459 { 459 {
460 HV *hv = newHV (); 460 HV *hv = newHV ();
461 hv_store (hv, "type", 4, newSViv (ev.type), 0); 461 hv_store (hv, "type", 4, newSViv (ev.type), 0);
462
462 switch (ev.type) 463 switch (ev.type)
463 { 464 {
464 case SDL_KEYDOWN: 465 case SDL_KEYDOWN:
465 case SDL_KEYUP: 466 case SDL_KEYUP:
466 hv_store (hv, "state", 5, newSViv (ev.key.state), 0); 467 hv_store (hv, "state", 5, newSViv (ev.key.state), 0);
486 case SDL_MOUSEBUTTONUP: 487 case SDL_MOUSEBUTTONUP:
487 hv_store (hv, "button", 6, newSViv (ev.button.button), 0); 488 hv_store (hv, "button", 6, newSViv (ev.button.button), 0);
488 hv_store (hv, "state", 5, newSViv (ev.button.state), 0); 489 hv_store (hv, "state", 5, newSViv (ev.button.state), 0);
489 hv_store (hv, "x", 1, newSViv (ev.button.x), 0); 490 hv_store (hv, "x", 1, newSViv (ev.button.x), 0);
490 hv_store (hv, "y", 1, newSViv (ev.button.y), 0); 491 hv_store (hv, "y", 1, newSViv (ev.button.y), 0);
492 break;
491 } 493 }
492 494
493 XPUSHs (sv_2mortal (newRV_noinc ((SV *)hv))); 495 XPUSHs (sv_2mortal (newRV_noinc ((SV *)hv)));
494 } 496 }
495} 497}
640 exit (1); 642 exit (1);
641 643
642MODULE = CFClient PACKAGE = CFClient::Font 644MODULE = CFClient PACKAGE = CFClient::Font
643 645
644CFClient::Font 646CFClient::Font
645new_from_file (SV *class, char *path) 647new_from_file (SV *class, char *path, int id = 0)
646 CODE: 648 CODE:
647{ 649{
648 int count; 650 int count;
649 FcPattern *pattern = FcFreeTypeQuery ((const FcChar8 *)path, 0, 0, &count); 651 FcPattern *pattern = FcFreeTypeQuery ((const FcChar8 *)path, id, 0, &count);
650 RETVAL = pango_fc_font_description_from_pattern (pattern, 0); 652 RETVAL = pango_fc_font_description_from_pattern (pattern, 0);
651 FcPatternDestroy (pattern); 653 FcPatternDestroy (pattern);
652} 654}
653 OUTPUT: 655 OUTPUT:
654 RETVAL 656 RETVAL
1460void glEnd () 1462void glEnd ()
1461 1463
1462void glColor (float r, float g, float b, float a = 1.0) 1464void glColor (float r, float g, float b, float a = 1.0)
1463 PROTOTYPE: @ 1465 PROTOTYPE: @
1464 CODE: 1466 CODE:
1465 glColor4f (r, g, b, a); 1467 glColor4ub (r * 255., g * 255., b * 255., a * 255.);
1466 1468
1467void glVertex (float x, float y, float z = 0.) 1469void glVertex (float x, float y, float z = 0.)
1468 CODE: 1470 CODE:
1469 glVertex3f (x, y, z); 1471 glVertex3f (x, y, z);
1470 1472

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines