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.25 by root, Fri Apr 7 20:55:32 2006 UTC vs.
Revision 1.28 by root, Fri Apr 7 22:11:10 2006 UTC

48 -blue_size => 8, 48 -blue_size => 8,
49 -double_buffer => 1, 49 -double_buffer => 1,
50 -fullscreen => $CFG->{fullscreen}, 50 -fullscreen => $CFG->{fullscreen},
51 -resizeable => 0; 51 -resizeable => 0;
52 52
53 $UIFONT = SDL::TTFOpenFont Crossfire::Client::find_rcfile "uifont.ttf", $CFG->{height} / 40
54 or die "TTFOpenFont: $!";
55
53 glClearColor 0, 0, 0, 0; 56 glClearColor 0, 0, 0, 0;
54 57
55 glEnable GL_TEXTURE_2D; 58 glEnable GL_TEXTURE_2D;
56 glShadeModel GL_FLAT; 59 glShadeModel GL_FLAT;
57 glDisable GL_DEPTH_TEST; 60 glDisable GL_DEPTH_TEST;
82 $label = new Crossfire::Client::Widget::Label 500, 10, 1, $UIFONT, "Testü[]"; 85 $label = new Crossfire::Client::Widget::Label 500, 10, 1, $UIFONT, "Testü[]";
83 $label->activate; 86 $label->activate;
84 87
85 $CONN = new conn 88 $CONN = new conn
86 host => $CFG->{host}, 89 host => $CFG->{host},
87 port => $CFG->{port}; 90 port => $CFG->{port},
91 user => $CFG->{user},
92 pass => $CFG->{password};
88} 93}
89 94
90sub stop_game { 95sub stop_game {
91 remove Glib::Source $SDL_TIMER; 96 remove Glib::Source $SDL_TIMER;
92 97
95} 100}
96 101
97sub refresh { 102sub refresh {
98 glClear GL_COLOR_BUFFER_BIT; 103 glClear GL_COLOR_BUFFER_BIT;
99 104
100 $_->draw for values %Crossfire::Client::Widget::ACTIVE_WIDGETS; 105 $_->draw for @Crossfire::Client::Widget::ACTIVE_WIDGETS;
101 106
102 SDL::GLSwapBuffers; 107 SDL::GLSwapBuffers;
103} 108}
104 109
105%SDL_CB = ( 110%SDL_CB = (
264 269
265 270
266############################################################################# 271#############################################################################
267 272
268SDL::Init SDL_INIT_EVERYTHING; 273SDL::Init SDL_INIT_EVERYTHING;
274SDL::TTFInit;
269 275
270my $mapwidget = Crossfire::Client::Widget::MapWidget->new; 276my $mapwidget = Crossfire::Client::Widget::MapWidget->new;
271 277
272$mapwidget->activate; 278$mapwidget->activate;
273$mapwidget->focus_in; 279$mapwidget->focus_in;
282 port => 13327, 288 port => 13327,
283}; 289};
284 290
285$FACECACHE = eval { Crossfire::load_ref "$Crossfire::VARDIR/pclient.faces" } || {}; 291$FACECACHE = eval { Crossfire::load_ref "$Crossfire::VARDIR/pclient.faces" } || {};
286 292
287SDL::TTFInit;
288
289$UIFONT = SDL::TTFOpenFont Crossfire::Client::find_rcfile "uifont.ttf", 24
290 or die "TTFOpenFont: $!";
291
292run_config_dialog 293run_config_dialog
293 login => sub { start_game }, 294 login => sub { start_game },
294 logout => sub { stop_game }; 295 logout => sub { stop_game };
295 296
296main Gtk2; 297main Gtk2;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines