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.235 by root, Tue Aug 28 01:23:47 2007 UTC vs.
Revision 1.238 by root, Sat Nov 3 12:08:43 2007 UTC

619 const_iv (KMOD_LMETA), 619 const_iv (KMOD_LMETA),
620 const_iv (KMOD_RMETA), 620 const_iv (KMOD_RMETA),
621 const_iv (KMOD_NUM), 621 const_iv (KMOD_NUM),
622 const_iv (KMOD_CAPS), 622 const_iv (KMOD_CAPS),
623 const_iv (KMOD_MODE), 623 const_iv (KMOD_MODE),
624
625 const_iv (MIX_DEFAULT_FORMAT),
624# undef const_iv 626# undef const_iv
625 }; 627 };
626 628
627 for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); civ-- > const_iv; ) 629 for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); civ-- > const_iv; )
628 newCONSTSUB (stash, (char *)civ->name, newSViv (civ->iv)); 630 newCONSTSUB (stash, (char *)civ->name, newSViv (civ->iv));
698 m = SDL_ListModes (0, SDL_FULLSCREEN | SDL_OPENGL); 700 m = SDL_ListModes (0, SDL_FULLSCREEN | SDL_OPENGL);
699 701
700 if (m && m != (SDL_Rect **)-1) 702 if (m && m != (SDL_Rect **)-1)
701 while (*m) 703 while (*m)
702 { 704 {
703 if ((*m)->w >= 640 && (*m)->h >= 480) 705 if ((*m)->w >= 800 && (*m)->h >= 600)
704 { 706 {
705 AV *av = newAV (); 707 AV *av = newAV ();
706 av_push (av, newSViv ((*m)->w)); 708 av_push (av, newSViv ((*m)->w));
707 av_push (av, newSViv ((*m)->h)); 709 av_push (av, newSViv ((*m)->h));
708 av_push (av, newSViv (rgb)); 710 av_push (av, newSViv (rgb));
732 734
733 if (RETVAL) 735 if (RETVAL)
734 { 736 {
735 av_clear (texture_av); 737 av_clear (texture_av);
736 738
737 SDL_WM_SetCaption ("Crossfire TRT Client " VERSION, "Crossfire TRT"); 739 SDL_WM_SetCaption ("Deliantra MORPG Client " VERSION, "Deliantra");
738#define GL_FUNC(ptr,name) gl.name = (ptr)SDL_GL_GetProcAddress ("gl" # name); 740#define GL_FUNC(ptr,name) gl.name = (ptr)SDL_GL_GetProcAddress ("gl" # name);
739#include "glfunc.h" 741#include "glfunc.h"
740#undef GL_FUNC 742#undef GL_FUNC
741 } 743 }
742} 744}
828 XPUSHs (sv_2mortal (sv_bless (newRV_noinc ((SV *)hv), gv_stashpv ("CFPlus::UI::Event", 1)))); 830 XPUSHs (sv_2mortal (sv_bless (newRV_noinc ((SV *)hv), gv_stashpv ("CFPlus::UI::Event", 1))));
829 } 831 }
830} 832}
831 833
832int 834int
833Mix_OpenAudio (int frequency = 44100, int format = MIX_DEFAULT_FORMAT, int channels = 2, int chunksize = 1024) 835Mix_OpenAudio (int frequency = 44100, int format = MIX_DEFAULT_FORMAT, int channels = 2, int chunksize = 4096)
834 POSTCALL: 836 POSTCALL:
835 Mix_HookMusicFinished (music_finished); 837 Mix_HookMusicFinished (music_finished);
836 Mix_ChannelFinished (channel_finished); 838 Mix_ChannelFinished (channel_finished);
839
840void
841Mix_QuerySpec ()
842 PPCODE:
843{
844 int freq, channels;
845 Uint16 format;
846
847 if (Mix_QuerySpec (&freq, &format, &channels))
848 {
849 EXTEND (SP, 3);
850 PUSHs (sv_2mortal (newSViv (freq)));
851 PUSHs (sv_2mortal (newSViv (format)));
852 PUSHs (sv_2mortal (newSViv (channels)));
853 }
854}
837 855
838void 856void
839Mix_CloseAudio () 857Mix_CloseAudio ()
840 858
841int 859int

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines