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

Comparing deliantra/Deliantra-Client/bin/pclient (file contents):
Revision 1.125 by elmex, Mon Apr 17 20:29:37 2006 UTC vs.
Revision 1.133 by root, Tue Apr 18 02:38:51 2006 UTC

61our $STATUS_LINE; 61our $STATUS_LINE;
62our $DEBUG_STATUS; 62our $DEBUG_STATUS;
63 63
64sub status { 64sub status {
65 $STATUS_LINE->set_text ($_[0]); 65 $STATUS_LINE->set_text ($_[0]);
66 my ($w, $h) = $STATUS_LINE->size_request;
67 $STATUS_LINE->size_allocate (0, $HEIGHT - $ALT_ENTER_MESSAGE->{h} - $h, $w, $h); 66 $STATUS_LINE->move (0, $HEIGHT - $ALT_ENTER_MESSAGE->{h} - $STATUS_LINE->{h});
68} 67}
69 68
70sub debug { 69sub debug {
71 $DEBUG_STATUS->set_text ($_[0]); 70 $DEBUG_STATUS->set_text ($_[0]);
72 my ($w, $h) = $DEBUG_STATUS->size_request; 71 $DEBUG_STATUS->move ($WIDTH - $DEBUG_STATUS->{w}, 0, $DEBUG_STATUS->{w}, $DEBUG_STATUS->{h});
73 $DEBUG_STATUS->size_allocate ($WIDTH - $w, 0, $w, $h);
74} 72}
75 73
76sub start_game { 74sub start_game {
77 status "logging in..."; 75 status "logging in...";
78 76
148 146
149 $table->add (0, 5, new CFClient::UI::Label align => 1, text => "FoW Smooth"); 147 $table->add (0, 5, new CFClient::UI::Label align => 1, text => "FoW Smooth");
150 $table->add (1, 5, new CFClient::UI::CheckBox state => $CFG->{fow_smooth}, connect_changed => sub { 148 $table->add (1, 5, new CFClient::UI::CheckBox state => $CFG->{fow_smooth}, connect_changed => sub {
151 my ($self, $value) = @_; 149 my ($self, $value) = @_;
152 $CFG->{fow_smooth} = $value; 150 $CFG->{fow_smooth} = $value;
151 status "Fog of War smoothing requires OpenGL 1.2 or higher" if $CFClient::GL_VERSION < 1.2;
153 }); 152 });
154 153
155 $table->add (0, 6, new CFClient::UI::Label align => 1, text => "Log Fontsize"); 154 $table->add (0, 6, new CFClient::UI::Label align => 1, text => "Log Fontsize");
156 $table->add (1, 6, new CFClient::UI::Slider range => [$CFG->{log_fontsize}, 8, 30, 1], connect_changed => sub { 155 $table->add (1, 6, new CFClient::UI::Slider range => [$CFG->{log_fontsize}, 8, 30, 1], connect_changed => sub {
157 my ($self, $value) = @_; 156 my ($self, $value) = @_;
440 status "Configuration Saved"; 439 status "Configuration Saved";
441 }); 440 });
442 441
443 $BUTTONBAR->{children}[1]->emit ("activate"); # pop up server setup 442 $BUTTONBAR->{children}[1]->emit ("activate"); # pop up server setup
444 443
445 my $tgw = new CFClient::UI::FancyFrame (x => $WIDTH - 150, y => 0); 444 my $tgw = new CFClient::UI::FancyFrame (x => $WIDTH - 300, y => 0);
446 $tgw->add (my $hb = new CFClient::UI::HBox (req_w => 60, req_h => 150)); 445 $tgw->add (my $hbox = new CFClient::UI::HBox ());
447 $hb->add (my $fg = new CFClient::UI::VGauge (w => 30, h => 150, gauge => 'food', expand => 1)); 446
447 $hbox->add (my $hg = new CFClient::UI::VGauge (gauge => 'hp'));
448 $hb->add (my $mg = new CFClient::UI::VGauge (w => 30, h => 150, gauge => 'mana', expand => 1)); 448 $hbox->add (my $mg = new CFClient::UI::VGauge (gauge => 'mana'));
449 $hb->add (my $hg = new CFClient::UI::VGauge (w => 30, h => 150, gauge => 'hp', expand => 1));
450 $hb->add (my $gg = new CFClient::UI::VGauge (w => 30, h => 150, gauge => 'grace', expand => 1)); 449 $hbox->add (my $gg = new CFClient::UI::VGauge (gauge => 'grace'));
450 $hbox->add (my $fg = new CFClient::UI::VGauge (gauge => 'food'));
451 451
452 $GAUGES = { food => $fg, mana => $mg, hp => $hg, grace => $gg }; 452 $GAUGES = { food => $fg, mana => $mg, hp => $hg, grace => $gg };
453 $CFClient::UI::ROOT->add ($tgw); 453 $CFClient::UI::ROOT->add ($tgw);
454} 454}
455 455
635 my ($self, $mode, $flags, $x, $y, $w, $h, $hash) = @_; 635 my ($self, $mode, $flags, $x, $y, $w, $h, $hash) = @_;
636 636
637 $self->flush_map; 637 $self->flush_map;
638 638
639 my ($ox, $oy) = ($::MAP->ox, $::MAP->oy); 639 my ($ox, $oy) = ($::MAP->ox, $::MAP->oy);
640
641 warn "$ox $oy map_info<$flags, $x, $y, $w, $h, $hash>\n";#d#
642 640
643 my $mapmapw = 250; 641 my $mapmapw = 250;
644 my $mapmaph = 250; 642 my $mapmaph = 250;
645 643
646 $self->flood_fill ("", $hash, $flags, 644 $self->flood_fill ("", $hash, $flags,
777 }, 775 },
778); 776);
779 777
780############################################################################# 778#############################################################################
781 779
780$SIG{INT} = $SIG{TERM} = sub { exit };
781
782$TILECACHE = CFClient::db_table "tilecache"; 782$TILECACHE = CFClient::db_table "tilecache";
783$FACEMAP = CFClient::db_table "facemap"; 783$FACEMAP = CFClient::db_table "facemap";
784 784
785CFClient::read_cfg "$Crossfire::VARDIR/pclientrc"; 785CFClient::read_cfg "$Crossfire::VARDIR/pclientrc";
786 786
823 823
824init_screen; 824init_screen;
825 825
826Event::loop; 826Event::loop;
827 827
828END { SDL::Quit }
828 829
830

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines