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.17 by root, Fri Apr 7 18:20:13 2006 UTC vs.
Revision 1.18 by root, Fri Apr 7 18:49:53 2006 UTC

25 25
26our $SDL_TIMER; 26our $SDL_TIMER;
27our $SDL_APP; 27our $SDL_APP;
28our $SDL_EV = new SDL::Event; 28our $SDL_EV = new SDL::Event;
29our %SDL_CB; 29our %SDL_CB;
30our @GL_INIT; 30
31our @GL_INIT; # hooks called on every gl init
31 32
32sub init_screen { 33sub init_screen {
33 $SDL_APP = new SDL::App 34 $SDL_APP = new SDL::App
34 -flags => SDL_ANYFORMAT | SDL_HWSURFACE, 35 -flags => SDL_ANYFORMAT | SDL_HWSURFACE,
35 -title => "Crossfire+ Client", 36 -title => "Crossfire+ Client",
100 }, 101 },
101 SDL_VIDEOEXPOSE() => sub { 102 SDL_VIDEOEXPOSE() => sub {
102 refresh; 103 refresh;
103 }, 104 },
104 SDL_KEYDOWN() => sub { 105 SDL_KEYDOWN() => sub {
106 if ($SDL_EV->key_mod & KMOD_ALT && $SDL_EV->key_sym == SDLK_RETURN) {
107 # alt-enter
108 $CFG->{fullscreen} = !$CFG->{fullscreen};
109 init_screen;
110 } else {
105 Client::Widget::feed_sdl_key_down_event ($SDL_EV); 111 Client::Widget::feed_sdl_key_down_event ($SDL_EV);
112 }
106 }, 113 },
107 SDL_KEYUP() => sub { 114 SDL_KEYUP() => sub {
108 Client::Widget::feed_sdl_key_up_event ($SDL_EV); 115 Client::Widget::feed_sdl_key_up_event ($SDL_EV);
109 }, 116 },
110 SDL_MOUSEMOTION() => sub { 117 SDL_MOUSEMOTION() => sub {
142} 149}
143 150
144sub conn::face_update { 151sub conn::face_update {
145 my ($self, $num, $face) = @_; 152 my ($self, $num, $face) = @_;
146 153
154 $face->{texture} = new_from_image Crossfire::Client::Texture delete $face->{image};
147} 155}
148 156
149############################################################################# 157#############################################################################
150 158
151my $mapwidget = Client::MapWidget->new; 159my $mapwidget = Client::MapWidget->new;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines