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.240 by root, Wed Dec 26 18:09:30 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
975void 993void
976error (char *message) 994error (char *message)
977 CODE: 995 CODE:
978 fprintf (stderr, "ERROR: %s\n", message); 996 fprintf (stderr, "ERROR: %s\n", message);
979#ifdef _WIN32 997#ifdef _WIN32
980 MessageBox (0, message, "Crossfire+ Error", MB_OK | MB_ICONERROR); 998 MessageBox (0, message, "Deliantra Client Error", MB_OK | MB_ICONERROR);
981#endif 999#endif
982 1000
983void 1001void
984fatal (char *message) 1002fatal (char *message)
985 CODE: 1003 CODE:
986 fprintf (stderr, "FATAL: %s\n", message); 1004 fprintf (stderr, "FATAL: %s\n", message);
987#ifdef _WIN32 1005#ifdef _WIN32
988 MessageBox (0, message, "Crossfire+ Fatal Error", MB_OK | MB_ICONERROR); 1006 MessageBox (0, message, "Deliantra Client Fatal Error", MB_OK | MB_ICONERROR);
989#endif 1007#endif
990 _exit (1); 1008 _exit (1);
991 1009
992void 1010void
993_exit (int retval = 0) 1011_exit (int retval = 0)
1037MODULE = CFPlus PACKAGE = CFPlus::Layout 1055MODULE = CFPlus PACKAGE = CFPlus::Layout
1038 1056
1039PROTOTYPES: DISABLE 1057PROTOTYPES: DISABLE
1040 1058
1041void 1059void
1042reset_glyph_cache () 1060glyph_cache_backup ()
1043 PROTOTYPE: 1061 PROTOTYPE:
1044 CODE: 1062 CODE:
1063 tc_backup ();
1064
1065void
1066glyph_cache_restore ()
1067 PROTOTYPE:
1068 CODE:
1045 tc_clear (); 1069 tc_restore ();
1046 1070
1047CFPlus::Layout 1071CFPlus::Layout
1048new (SV *class) 1072new (SV *class)
1049 CODE: 1073 CODE:
1050 New (0, RETVAL, 1, struct cf_layout); 1074 New (0, RETVAL, 1, struct cf_layout);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines