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.262 by root, Wed Jul 16 20:12:27 2008 UTC vs.
Revision 1.263 by root, Fri Jul 18 21:18:42 2008 UTC

85 85
86#define MIN_FONT_HEIGHT 10 86#define MIN_FONT_HEIGHT 10
87 87
88/* mask out modifiers we are not interested in */ 88/* mask out modifiers we are not interested in */
89#define MOD_MASK (KMOD_CTRL | KMOD_SHIFT | KMOD_ALT | KMOD_META) 89#define MOD_MASK (KMOD_CTRL | KMOD_SHIFT | KMOD_ALT | KMOD_META)
90
91#if 1
92# define PARACHUTE SDL_INIT_NOPARACHUTE
93#else
94# define PARACHUTE 0
95#endif
96 90
97static AV *texture_av; 91static AV *texture_av;
98 92
99static struct 93static struct
100{ 94{
644 const_iv (KMOD_NUM), 638 const_iv (KMOD_NUM),
645 const_iv (KMOD_CAPS), 639 const_iv (KMOD_CAPS),
646 const_iv (KMOD_MODE), 640 const_iv (KMOD_MODE),
647 641
648 const_iv (MIX_DEFAULT_FORMAT), 642 const_iv (MIX_DEFAULT_FORMAT),
643
644 const_iv (SDL_INIT_TIMER),
645 const_iv (SDL_INIT_AUDIO),
646 const_iv (SDL_INIT_VIDEO),
647 const_iv (SDL_INIT_CDROM),
648 const_iv (SDL_INIT_JOYSTICK),
649 const_iv (SDL_INIT_EVERYTHING),
650 const_iv (SDL_INIT_NOPARACHUTE),
651 const_iv (SDL_INIT_EVENTTHREAD),
649# undef const_iv 652# undef const_iv
650 }; 653 };
651 654
652 for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); civ-- > const_iv; ) 655 for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); civ-- > const_iv; )
653 newCONSTSUB (stash, (char *)civ->name, newSViv (civ->iv)); 656 newCONSTSUB (stash, (char *)civ->name, newSViv (civ->iv));
689 pango_context_set_language (opengl_context, pango_language_from_string ("en")); 692 pango_context_set_language (opengl_context, pango_language_from_string ("en"));
690 /*pango_context_set_base_dir (opengl_context, PANGO_DIRECTION_WEAK_LTR);*/ 693 /*pango_context_set_base_dir (opengl_context, PANGO_DIRECTION_WEAK_LTR);*/
691#endif 694#endif
692} 695}
693 696
694char *
695SDL_GetError () 697char *SDL_GetError ()
696 698
697int 699int SDL_Init (U32 flags)
698SDL_Init (U32 flags = SDL_INIT_VIDEO | SDL_INIT_AUDIO | PARACHUTE)
699 700
700void 701int SDL_InitSubSystem (U32 flags)
702
703void SDL_QuitSubSystem (U32 flags)
704
701SDL_Quit () 705void SDL_Quit ()
702 706
703void 707void
704SDL_ListModes (int rgb, int alpha) 708SDL_ListModes (int rgb, int alpha)
705 PPCODE: 709 PPCODE:
706{ 710{
728 m = SDL_ListModes (0, SDL_FULLSCREEN | SDL_OPENGL); 732 m = SDL_ListModes (0, SDL_FULLSCREEN | SDL_OPENGL);
729 733
730 if (m && m != (SDL_Rect **)-1) 734 if (m && m != (SDL_Rect **)-1)
731 while (*m) 735 while (*m)
732 { 736 {
733 if ((*m)->w >= 800 && (*m)->h >= 480)
734 {
735 AV *av = newAV (); 737 AV *av = newAV ();
736 av_push (av, newSViv ((*m)->w)); 738 av_push (av, newSViv ((*m)->w));
737 av_push (av, newSViv ((*m)->h)); 739 av_push (av, newSViv ((*m)->h));
738 av_push (av, newSViv (rgb)); 740 av_push (av, newSViv (rgb));
739 av_push (av, newSViv (alpha)); 741 av_push (av, newSViv (alpha));
740 XPUSHs (sv_2mortal (newRV_noinc ((SV *)av))); 742 XPUSHs (sv_2mortal (newRV_noinc ((SV *)av)));
741 }
742 743
743 ++m; 744 ++m;
744 } 745 }
745} 746}
746 747

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines