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.24 by root, Fri Apr 7 20:34:44 2006 UTC vs.
Revision 1.25 by root, Fri Apr 7 20:55:32 2006 UTC

1#!/opt/bin/perl 1#!/opt/bin/perl
2
2use strict; 3use strict;
4use utf8;
3 5
4use Glib; 6use Glib;
5use Gtk2 -init; 7use Gtk2 -init;
6 8
7use SDL; 9use SDL;
23our $VERSION = '0.1'; 25our $VERSION = '0.1';
24 26
25our $CFG; 27our $CFG;
26our $CONN; 28our $CONN;
27 29
28our $GUIFONT; 30our $UIFONT;
29 31
30our $SDL_TIMER; 32our $SDL_TIMER;
31our $SDL_APP; 33our $SDL_APP;
32our $SDL_EV = new SDL::Event; 34our $SDL_EV = new SDL::Event;
33our %SDL_CB; 35our %SDL_CB;
49 -resizeable => 0; 51 -resizeable => 0;
50 52
51 glClearColor 0, 0, 0, 0; 53 glClearColor 0, 0, 0, 0;
52 54
53 glEnable GL_TEXTURE_2D; 55 glEnable GL_TEXTURE_2D;
54 glTexEnv GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE;
55 glShadeModel GL_FLAT; 56 glShadeModel GL_FLAT;
56 glDisable GL_DEPTH_TEST; 57 glDisable GL_DEPTH_TEST;
57 glBlendFunc GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA; 58 glBlendFunc GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA;
58 glEnable GL_BLEND;
59 59
60 glMatrixMode GL_PROJECTION; 60 glMatrixMode GL_PROJECTION;
61 glLoadIdentity; 61 glLoadIdentity;
62 glOrtho 0, $CFG->{width}, $CFG->{height}, 0, -100 , 100; 62 glOrtho 0, $CFG->{width}, $CFG->{height}, 0, -100 , 100;
63 63
77 1 77 1
78 }; 78 };
79 79
80 init_screen; 80 init_screen;
81 81
82# $label = new Crossfire::Client::Widget::Label "Testü[]"; 82 $label = new Crossfire::Client::Widget::Label 500, 10, 1, $UIFONT, "Testü[]";
83# $label->activate; 83 $label->activate;
84 84
85 $CONN = new conn 85 $CONN = new conn
86 host => $CFG->{host}, 86 host => $CFG->{host},
87 port => $CFG->{port}; 87 port => $CFG->{port};
88} 88}
284 284
285$FACECACHE = eval { Crossfire::load_ref "$Crossfire::VARDIR/pclient.faces" } || {}; 285$FACECACHE = eval { Crossfire::load_ref "$Crossfire::VARDIR/pclient.faces" } || {};
286 286
287SDL::TTFInit; 287SDL::TTFInit;
288 288
289$GUIFONT = SDL::TTFOpenFont Crossfire::Client::find_rcfile "uifont.ttf", 12 289$UIFONT = SDL::TTFOpenFont Crossfire::Client::find_rcfile "uifont.ttf", 24
290 or die "TTFOpenFont: $!"; 290 or die "TTFOpenFont: $!";
291 291
292run_config_dialog 292run_config_dialog
293 login => sub { start_game }, 293 login => sub { start_game },
294 logout => sub { stop_game }; 294 logout => sub { stop_game };

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines