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.103 by elmex, Sat Mar 20 01:01:16 2010 UTC vs.
Revision 1.108 by root, Thu Apr 8 04:49:32 2010 UTC

32 Win32::GUI::SplashScreen::Done (1); 32 Win32::GUI::SplashScreen::Done (1);
33 }; 33 };
34 } 34 }
35} 35}
36 36
37use strict; 37use common::sense;
38use utf8;
39 38
40use Carp 'verbose'; 39use Carp 'verbose';
41 40
42# do things only needed for single-binary version (par) 41# do things only needed for single-binary version (par)
43BEGIN { 42BEGIN {
807 user => $PROFILE->{user}, 806 user => $PROFILE->{user},
808 pass => $PROFILE->{password}, 807 pass => $PROFILE->{password},
809 mapw => $mapw, 808 mapw => $mapw,
810 maph => $maph, 809 maph => $maph,
811 810
811 version => {
812 client => "deliantra",
812 client => "$DC::VERSION $] $^O", 813 clientver => $DC::VERSION,
814 gl_vendor => DC::OpenGL::gl_vendor,
815 gl_version => DC::OpenGL::gl_version,
816 },
813 817
814 map_widget => $MAPWIDGET, 818 map_widget => $MAPWIDGET,
815 statusbox => $STATUSBOX, 819 statusbox => $STATUSBOX,
816 map => $MAP, 820 map => $MAP,
817 mapmap => $MAPMAP, 821 mapmap => $MAPMAP,
1942 $r 1946 $r
1943} 1947}
1944 1948
1945my %SORT_ORDER = ( 1949my %SORT_ORDER = (
1946 type => sub { 1950 type => sub {
1951 use sort 'stable';
1947 sort { $a->{type} <=> $b->{type} or $a->{name} cmp $b->{name} } @_ 1952 sort { $a->{type} <=> $b->{type} or $a->{name} cmp $b->{name} } @_
1948 }, 1953 },
1949 mtime => sub { 1954 mtime => sub {
1955 use sort 'stable';
1950 my $NOW = time; 1956 my $NOW = time;
1951 sort { 1957 sort {
1952 my $atime = $a->{mtime} - $NOW; $atime = $atime < 5 * 60 ? int $atime / 60 : 6; 1958 my $atime = $a->{mtime} - $NOW; $atime = $atime < 5 * 60 ? int $atime / 60 : 6;
1953 my $btime = $b->{mtime} - $NOW; $btime = $btime < 5 * 60 ? int $btime / 60 : 6; 1959 my $btime = $b->{mtime} - $NOW; $btime = $btime < 5 * 60 ? int $btime / 60 : 6;
1954 1960
1955 ($a->{flags} & F_LOCKED) <=> ($b->{flags} & F_LOCKED) 1961 ($a->{flags} & F_LOCKED) <=> ($b->{flags} & F_LOCKED)
1956 or $btime <=> $atime 1962 or $btime <=> $atime
1957 or $a->{type} <=> $b->{type} 1963 or $a->{type} <=> $b->{type}
1958 } @_ 1964 } @_
1959 }, 1965 },
1960 weight => sub { sort { 1966 weight => sub {
1967 use sort 'stable';
1968 sort {
1961 $a->{weight} * ($a->{nrof} || 1) <=> $b->{weight} * ($b->{nrof} || 1) 1969 $a->{weight} * ($a->{nrof} || 1) <=> $b->{weight} * ($b->{nrof} || 1)
1962 or $a->{type} <=> $b->{type} 1970 or $a->{type} <=> $b->{type}
1963 } @_ }, 1971 } @_
1972 },
1964); 1973);
1965 1974
1966sub inventory_widget { 1975sub inventory_widget {
1967 my $hb = new DC::UI::HBox homogeneous => 1; 1976 my $hb = new DC::UI::HBox homogeneous => 1;
1968 1977
2786 my @args = @ARGV; 2795 my @args = @ARGV;
2787 2796
2788 my $profile = 'default'; 2797 my $profile = 'default';
2789 2798
2790 for (my $i = 0; $i < @args; $i++) { 2799 for (my $i = 0; $i < @args; $i++) {
2791 if ($args[$i] eq '-profile') { 2800 if ($args[$i] =~ /^--?profile$/) {
2792 $profile = $args[$i + 1]; 2801 $profile = $args[$i + 1];
2793 splice @args, $i, 2, (); 2802 splice @args, $i, 2, ();
2794 $i = 0; 2803 $i = 0;
2804 } elsif ($args[$i] =~ /^--?h/) {
2805 print STDERR "Usage: $0 [--profile name] [host [user [password]]]\n";
2806 exit 0;
2795 } 2807 }
2796 } 2808 }
2797 2809
2798 $CFG->{profile}{$profile} ||= {}; 2810 $CFG->{profile}{$profile} ||= {};
2799 $PROFILE = $CFG->{profile}{$profile}; 2811 $PROFILE = $CFG->{profile}{$profile};
2886 2898
2887deliantra - A Deliantra MORPG game client 2899deliantra - A Deliantra MORPG game client
2888 2900
2889=head1 SYNOPSIS 2901=head1 SYNOPSIS
2890 2902
2891Just run it - no commandline arguments are supported. 2903 deliantra [--profile name] [host [user [password]]]
2904 deliantra --help
2892 2905
2893=head1 USAGE 2906=head1 USAGE
2894 2907
2895deliantra utilises OpenGL for all UI elements and the game. It is supposed to 2908The deliantra client utilises OpenGL for all UI elements and the game. It
2896be used in fullscreen mode and interactively. 2909is supposed to be used in fullscreen mode and interactively.
2897 2910
2898=head1 DEBUGGING 2911=head1 DEBUGGING
2899
2900 2912
2901CFPLUS_DEBUG - environment variable 2913CFPLUS_DEBUG - environment variable
2902 2914
2903 1 draw borders around widgets 2915 1 draw borders around widgets
2904 2 add low-level widget info to tooltips 2916 2 add low-level widget info to tooltips

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines