… | |
… | |
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 | |
832 | int |
834 | int |
833 | Mix_OpenAudio (int frequency = 44100, int format = MIX_DEFAULT_FORMAT, int channels = 2, int chunksize = 1024) |
835 | Mix_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 | |
|
|
840 | void |
|
|
841 | Mix_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 | |
838 | void |
856 | void |
839 | Mix_CloseAudio () |
857 | Mix_CloseAudio () |
840 | |
858 | |
841 | int |
859 | int |
… | |
… | |
1037 | MODULE = CFPlus PACKAGE = CFPlus::Layout |
1055 | MODULE = CFPlus PACKAGE = CFPlus::Layout |
1038 | |
1056 | |
1039 | PROTOTYPES: DISABLE |
1057 | PROTOTYPES: DISABLE |
1040 | |
1058 | |
1041 | void |
1059 | void |
1042 | reset_glyph_cache () |
1060 | glyph_cache_backup () |
1043 | PROTOTYPE: |
1061 | PROTOTYPE: |
1044 | CODE: |
1062 | CODE: |
|
|
1063 | tc_backup (); |
|
|
1064 | |
|
|
1065 | void |
|
|
1066 | glyph_cache_restore () |
|
|
1067 | PROTOTYPE: |
|
|
1068 | CODE: |
1045 | tc_clear (); |
1069 | tc_restore (); |
1046 | |
1070 | |
1047 | CFPlus::Layout |
1071 | CFPlus::Layout |
1048 | new (SV *class) |
1072 | new (SV *class) |
1049 | CODE: |
1073 | CODE: |
1050 | New (0, RETVAL, 1, struct cf_layout); |
1074 | New (0, RETVAL, 1, struct cf_layout); |