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

Comparing deliantra/Deliantra-Client/bin/cfplus (file contents):
Revision 1.68 by elmex, Mon Jun 12 12:28:06 2006 UTC vs.
Revision 1.73 by root, Sat Jun 17 15:07:54 2006 UTC

816 $STATWIDS->{st_spd} ->set_text (sprintf "%.1f", $stats->{+CS_STAT_SPEED}); 816 $STATWIDS->{st_spd} ->set_text (sprintf "%.1f", $stats->{+CS_STAT_SPEED});
817 $STATWIDS->{st_wspd}->set_text (sprintf "%.1f", $stats->{+CS_STAT_WEAP_SP}); 817 $STATWIDS->{st_wspd}->set_text (sprintf "%.1f", $stats->{+CS_STAT_WEAP_SP});
818 818
819 $STATWIDS->{m_weight}->set_text (sprintf "Max weight: %.1fkg", $stats->{+CS_STAT_WEIGHT_LIM} / 1000); 819 $STATWIDS->{m_weight}->set_text (sprintf "Max weight: %.1fkg", $stats->{+CS_STAT_WEIGHT_LIM} / 1000);
820 820
821 # TODO: replace by CS_STAT_RES_xxx constants
822 my %tbl = ( 821 my %tbl = (
823 phys => 100, 822 phys => CS_STAT_RES_PHYS,
824 magic => 101, 823 magic => CS_STAT_RES_MAG,
825 fire => 102, 824 fire => CS_STAT_RES_FIRE,
826 elec => 103, 825 elec => CS_STAT_RES_ELEC,
827 cold => 104, 826 cold => CS_STAT_RES_COLD,
828 conf => 105, 827 conf => CS_STAT_RES_CONF,
829 acid => 106, 828 acid => CS_STAT_RES_ACID,
830 drain => 107, 829 drain => CS_STAT_RES_DRAIN,
831 ghit => 108, 830 ghit => CS_STAT_RES_GHOSTHIT,
832 pois => 109, 831 pois => CS_STAT_RES_POISON,
833 slow => 110, 832 slow => CS_STAT_RES_SLOW,
834 para => 111, 833 para => CS_STAT_RES_PARA,
835 tund => 112, 834 tund => CS_STAT_TURN_UNDEAD,
836 fear => 113, 835 fear => CS_STAT_RES_FEAR,
837 depl => 113, 836 depl => CS_STAT_RES_DEPLETE,
838 deat => 115, 837 deat => CS_STAT_RES_DEATH,
839 holyw => 116, 838 holyw => CS_STAT_RES_HOLYWORD,
840 blind => 117, 839 blind => CS_STAT_RES_BLIND,
841 ); 840 );
842 841
843 $STATWIDS->{"res_$_"}->set_text (sprintf "%d%", $stats->{$tbl{$_}}) 842 $STATWIDS->{"res_$_"}->set_text (sprintf "%d%", $stats->{$tbl{$_}})
844 for keys %tbl; 843 for keys %tbl;
845} 844}
1353 } 1352 }
1354 } 1353 }
1355 }; 1354 };
1356 1355
1357 my $vb = new CFClient::UI::VBox; 1356 my $vb = new CFClient::UI::VBox;
1357 $vb->add (my $hb = new CFClient::UI::HBox);
1358 $hb->add (new CFClient::UI::Label text => "only shift-up stops fire");
1359 $hb->add (new CFClient::UI::CheckBox
1360 expand => 1,
1361 state => $CFG->{shift_fire_stop},
1362 tooltip => "If this checkbox is enabled you will stop fire only if you stop pressing shift",
1363 on_changed => sub {
1364 my ($cbox, $value) = @_;
1365 $CFG->{shift_fire_stop} = $value;
1366 });
1367
1358 $vb->add ($binding_list); 1368 $vb->add ($binding_list);
1359 $vb->add (my $hb = new CFClient::UI::HBox); 1369 $vb->add (my $hb = new CFClient::UI::HBox);
1360 1370
1361 $hb->add (new CFClient::UI::Button 1371 $hb->add (new CFClient::UI::Button
1362 text => "record new", 1372 text => "record new",
1505 name => "mapmap", 1515 name => "mapmap",
1506 x => 0, 1516 x => 0,
1507 y => $FONTSIZE + 8, 1517 y => $FONTSIZE + 8,
1508 border_bg => [1, 1, 1, 192/255], 1518 border_bg => [1, 1, 1, 192/255],
1509 bg => [1, 1, 1, 0], 1519 bg => [1, 1, 1, 0],
1520 no_close_button => 1,
1510 child => ($MAPMAP = new CFClient::MapWidget::MapMap 1521 child => ($MAPMAP = new CFClient::MapWidget::MapMap
1511 tooltip => "<b>Map</b>. On servers that support this feature, this will display an overview of the surrounding areas.", 1522 tooltip => "<b>Map</b>. On servers that support this feature, this will display an overview of the surrounding areas.",
1512 ), 1523 ),
1513 )->show; 1524 )->show;
1514 1525
1618 1629
1619 $STATUSBOX->add ("Set video mode $WIDTH×$HEIGHT", timeout => 10, fg => [1, 1, 1, 0.5]); 1630 $STATUSBOX->add ("Set video mode $WIDTH×$HEIGHT", timeout => 10, fg => [1, 1, 1, 0.5]);
1620} 1631}
1621 1632
1622sub video_shutdown { 1633sub video_shutdown {
1634 CFClient::OpenGL::shutdown;
1635
1623 undef $SDL_ACTIVE; 1636 undef $SDL_ACTIVE;
1624} 1637}
1625 1638
1626my @bgmusic = qw(game1.ogg game2.ogg game3.ogg game5.ogg game6.ogg ross1.ogg ross2.ogg ross3.ogg ross4.ogg ross5.ogg); #d# 1639my @bgmusic = qw(game1.ogg game2.ogg game3.ogg game5.ogg game6.ogg ross1.ogg ross2.ogg ross3.ogg ross4.ogg ross5.ogg); #d#
1627my $bgmusic;#TODO#hack#d# 1640my $bgmusic;#TODO#hack#d#
1923 video_init; 1936 video_init;
1924 audio_init; 1937 audio_init;
1925} 1938}
1926 1939
1927Event::loop; 1940Event::loop;
1941#CFClient::SDL_Quit;
1942#CFClient::_exit 0;
1928 1943
1929END { CFClient::SDL_Quit } 1944END { CFClient::SDL_Quit }
1930 1945
1931=head1 NAME 1946=head1 NAME
1932 1947

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines