ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/bin/deliantra
(Generate patch)

Comparing deliantra/Deliantra-Client/bin/deliantra (file contents):
Revision 1.100 by root, Tue Dec 22 01:37:42 2009 UTC vs.
Revision 1.102 by elmex, Sat Mar 20 00:50:06 2010 UTC

541 sub audio_tab_update; 541 sub audio_tab_update;
542 audio_tab_update; 542 audio_tab_update;
543} 543}
544 544
545sub audio_shutdown { 545sub audio_shutdown {
546 if ($SDL_MIXER) {
547 DC::MixMusic::halt;
548 DC::Mix_AllocateChannels 0;
549 }
550
546 undef $MUSIC_PLAYER; 551 undef $MUSIC_PLAYER;
547 undef $MUSIC_PLAYING_META; 552 undef $MUSIC_PLAYING_META;
548 undef $MUSIC_PLAYING_DATA; 553 undef $MUSIC_PLAYING_DATA;
549 554
550 $MUSIC_WANT = []; 555 $MUSIC_WANT = [];
551 @MUSIC_JINGLE = (); 556 @MUSIC_JINGLE = ();
552 %AUDIO_PLAY = (); 557 %AUDIO_PLAY = ();
553 %AUDIO_CHUNK = (); 558 %AUDIO_CHUNK = ();
554 559
555 DC::MixMusic::halt;
556 DC::Mix_AllocateChannels 0;
557 DC::Mix_CloseAudio if $SDL_MIXER; 560 DC::Mix_CloseAudio if $SDL_MIXER;
558 undef $SDL_MIXER; 561 undef $SDL_MIXER;
559} 562}
560 563
561############################################################################# 564#############################################################################
1138 1141
1139 my $text = !$freq 1142 my $text = !$freq
1140 ? "audio is off" 1143 ? "audio is off"
1141 : "audio is enabled\n" 1144 : "audio is enabled\n"
1142 . "frequency (Hz): $freq\n" 1145 . "frequency (Hz): $freq\n"
1143 . "channels: $chans"; 1146 . "channels: $chans\n"
1147 . "chunk decoders available: " . (join ", ", DC::MixChunk::decoders) . "\n"
1148 . "music decoders available: " . (join ", ", DC::MixMusic::decoders);
1144 1149
1145 $AUDIO_INFO->set_text ($text); 1150 $AUDIO_INFO->set_text ($text);
1146} 1151}
1147 1152
1148sub audio_setup { 1153sub audio_setup {
2771 shift_fire_stop => 0, 2776 shift_fire_stop => 0,
2772 uitheme => "wood", 2777 uitheme => "wood",
2773 map_shift_x => -24, # arbitrary 2778 map_shift_x => -24, # arbitrary
2774 map_shift_y => +24, # arbitrary 2779 map_shift_y => +24, # arbitrary
2775 ); 2780 );
2776 2781
2777 while (my ($k, $v) = each %DEF_CFG) { 2782 while (my ($k, $v) = each %DEF_CFG) {
2778 $CFG->{$k} = $v unless exists $CFG->{$k}; 2783 $CFG->{$k} = $v unless exists $CFG->{$k};
2779 } 2784 }
2780 2785
2781 $CFG->{profile}{default}{host} ||= "gameserver.deliantra.net"; 2786 $CFG->{profile}{default}{host} ||= "gameserver.deliantra.net";
2782 $PROFILE = $CFG->{profile}{default}; 2787 $PROFILE = $CFG->{profile}{default};
2788
2789 $PROFILE->{host} = $ARGV[0] if @ARGV > 0;
2790 $PROFILE->{user} = $ARGV[1] if @ARGV > 1;
2791 $PROFILE->{password} = $ARGV[2] if @ARGV > 2;
2783 2792
2784 # convert old bindings (only default profile matters) 2793 # convert old bindings (only default profile matters)
2785 if (my $bindings = delete $PROFILE->{bindings}) { 2794 if (my $bindings = delete $PROFILE->{bindings}) {
2786 while (my ($mod, $syms) = each %$bindings) { 2795 while (my ($mod, $syms) = each %$bindings) {
2787 while (my ($sym, $cmds) = each %$syms) { 2796 while (my ($sym, $cmds) = each %$syms) {
2810 DejaVuSansMono-BoldOblique.ttf 2819 DejaVuSansMono-BoldOblique.ttf
2811 mona.ttf 2820 mona.ttf
2812 ); 2821 );
2813 2822
2814 DC::add_font $_ for @fonts; 2823 DC::add_font $_ for @fonts;
2815 2824
2816 $FONT_PROP = new_from_file DC::Font $fonts[0]; 2825 $FONT_PROP = new_from_file DC::Font $fonts[0];
2817 $FONT_FIXED = new_from_file DC::Font $fonts[1]; 2826 $FONT_FIXED = new_from_file DC::Font $fonts[1];
2818 2827
2819 $FONT_PROP->make_default; 2828 $FONT_PROP->make_default;
2820 2829

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines