… | |
… | |
20 | my $class = shift; |
20 | my $class = shift; |
21 | |
21 | |
22 | my $self = $class->SUPER::new ( |
22 | my $self = $class->SUPER::new ( |
23 | z => -1, |
23 | z => -1, |
24 | can_focus => 1, |
24 | can_focus => 1, |
25 | list => glGenList, |
|
|
26 | tilesize => 32, |
25 | tilesize => 32, |
27 | @_ |
26 | @_ |
28 | ); |
27 | ); |
29 | |
28 | |
30 | $self->{completer} = new CFPlus::MapWidget::Command:: |
|
|
31 | command => $self->{command}, |
|
|
32 | tooltip => "#completer_help", |
|
|
33 | ; |
|
|
34 | |
|
|
35 | $self |
29 | $self |
36 | } |
30 | } |
37 | |
31 | |
38 | sub set_tilesize { |
32 | sub set_tilesize { |
39 | my ($self, $tilesize) = @_; |
33 | my ($self, $tilesize) = @_; |
… | |
… | |
48 | |
42 | |
49 | $tooltip =~ s/^\s+//; |
43 | $tooltip =~ s/^\s+//; |
50 | $tooltip = "<big>$data</big>\n\n$tooltip"; |
44 | $tooltip = "<big>$data</big>\n\n$tooltip"; |
51 | $tooltip =~ s/\s+$//; |
45 | $tooltip =~ s/\s+$//; |
52 | |
46 | |
53 | $self->{completer}{command}{$command} = [$data, $tooltip, $widget, $cb, ++$self->{command_id}]; |
47 | $::COMPLETER->{command}{$command} = [$data, $tooltip, $widget, $cb, ++$self->{command_id}]; |
54 | } |
48 | } |
55 | |
49 | |
56 | sub clr_commands { |
50 | sub clr_commands { |
57 | my ($self) = @_; |
51 | my ($self) = @_; |
58 | |
52 | |
59 | %{$self->{completer}{command}} = (); |
53 | %{$::COMPLETER->{command}} = (); |
60 | |
54 | |
61 | $self->{completer}->hide |
55 | $::COMPLETER->hide |
62 | if $self->{completer}; |
56 | if $::COMPLETER; |
63 | } |
57 | } |
64 | |
58 | |
65 | sub server_login { |
59 | sub server_login { |
66 | my ($server) = @_; |
60 | my ($server) = @_; |
67 | |
61 | |
… | |
… | |
78 | print "preparing editor startup...\n"; |
72 | print "preparing editor startup...\n"; |
79 | |
73 | |
80 | my $server = $editsup->{gameserver} || "default"; |
74 | my $server = $editsup->{gameserver} || "default"; |
81 | $server =~ s/([^a-zA-Z0-9_\-])/sprintf "=%x=", ord $1/ge; |
75 | $server =~ s/([^a-zA-Z0-9_\-])/sprintf "=%x=", ord $1/ge; |
82 | |
76 | |
83 | local $ENV{CROSSFIRE_MAPDIR} = my $mapdir = "$Crossfire::VARDIR/map.$server"; mkdir $mapdir; |
77 | local $ENV{CROSSFIRE_MAPDIR} = my $mapdir = "$Deliantra::VARDIR/map.$server"; mkdir $mapdir; |
84 | local $ENV{CROSSFIRE_LIBDIR} = my $libdir = "$Crossfire::VARDIR/lib.$server"; mkdir $libdir; |
78 | local $ENV{CROSSFIRE_LIBDIR} = my $libdir = "$Deliantra::VARDIR/lib.$server"; mkdir $libdir; |
85 | |
79 | |
86 | print "map directory is $mapdir\n"; |
80 | print "map directory is $mapdir\n"; |
87 | print "lib directory is $libdir\n"; |
81 | print "lib directory is $libdir\n"; |
88 | |
82 | |
89 | my $ua = CFPlus::lwp_useragent; |
83 | my $ua = CFPlus::lwp_useragent; |
… | |
… | |
126 | require File::Path; |
120 | require File::Path; |
127 | |
121 | |
128 | File::Path::mkpath (File::Basename::dirname ($mappath)); |
122 | File::Path::mkpath (File::Basename::dirname ($mappath)); |
129 | open my $fh, ">:raw:perlio", "$mappath.meta" |
123 | open my $fh, ">:raw:perlio", "$mappath.meta" |
130 | or die "$mappath.meta: $!\n"; |
124 | or die "$mappath.meta: $!\n"; |
131 | print $fh CFPlus::to_json $meta; |
125 | print $fh CFPlus::encode_json $meta; |
132 | close $fh; |
126 | close $fh; |
133 | open my $fh, ">:raw:perlio:utf8", $mappath |
127 | open my $fh, ">:raw:perlio:utf8", $mappath |
134 | or die "$mappath: $!\n"; |
128 | or die "$mappath: $!\n"; |
135 | print $fh $map; |
129 | print $fh $map; |
136 | close $fh; |
130 | close $fh; |
… | |
… | |
184 | |
178 | |
185 | $x -= CFPlus::floor $::MAP->w * 0.5; |
179 | $x -= CFPlus::floor $::MAP->w * 0.5; |
186 | $y -= CFPlus::floor $::MAP->h * 0.5; |
180 | $y -= CFPlus::floor $::MAP->h * 0.5; |
187 | |
181 | |
188 | if ($::CONN) { |
182 | if ($::CONN) { |
189 | if ($::IN_BUILD_MODE) { |
|
|
190 | $::CONN->buildat ($::IN_BUILD_MODE, $x, $y); |
|
|
191 | } else { |
|
|
192 | $::CONN->lookat ($x, $y) |
183 | $::CONN->lookat ($x, $y) |
193 | } |
|
|
194 | } |
184 | } |
195 | |
185 | |
196 | } elsif ($ev->{button} == 2) { |
186 | } elsif ($ev->{button} == 2) { |
197 | $self->grab_focus; |
187 | $self->grab_focus; |
198 | return unless $::CONN; |
188 | return unless $::CONN; |
… | |
… | |
301 | $self->{need_update} = 1; |
291 | $self->{need_update} = 1; |
302 | $self->SUPER::update; |
292 | $self->SUPER::update; |
303 | } |
293 | } |
304 | |
294 | |
305 | my %DIR = ( |
295 | my %DIR = ( |
306 | CFPlus::SDLK_KP5, [0, "stay fire"], |
296 | ( "," . CFPlus::SDLK_KP5 ), [0, "stay fire"], |
307 | CFPlus::SDLK_KP8, [1, "north"], |
297 | ( "," . CFPlus::SDLK_KP8 ), [1, "north"], |
308 | CFPlus::SDLK_KP9, [2, "northeast"], |
298 | ( "," . CFPlus::SDLK_KP9 ), [2, "northeast"], |
309 | CFPlus::SDLK_KP6, [3, "east"], |
299 | ( "," . CFPlus::SDLK_KP6 ), [3, "east"], |
310 | CFPlus::SDLK_KP3, [4, "southeast"], |
300 | ( "," . CFPlus::SDLK_KP3 ), [4, "southeast"], |
311 | CFPlus::SDLK_KP2, [5, "south"], |
301 | ( "," . CFPlus::SDLK_KP2 ), [5, "south"], |
312 | CFPlus::SDLK_KP1, [6, "southwest"], |
302 | ( "," . CFPlus::SDLK_KP1 ), [6, "southwest"], |
313 | CFPlus::SDLK_KP4, [7, "west"], |
303 | ( "," . CFPlus::SDLK_KP4 ), [7, "west"], |
314 | CFPlus::SDLK_KP7, [8, "northwest"], |
304 | ( "," . CFPlus::SDLK_KP7 ), [8, "northwest"], |
315 | |
305 | |
316 | CFPlus::SDLK_UP, [1, "north"], |
306 | ( "," . CFPlus::SDLK_UP ), [1, "north"], |
|
|
307 | ("1," . CFPlus::SDLK_UP ), [2, "northeast"], |
317 | CFPlus::SDLK_RIGHT, [3, "east"], |
308 | ( "," . CFPlus::SDLK_RIGHT), [3, "east"], |
|
|
309 | ("1," . CFPlus::SDLK_RIGHT), [4, "southeast"], |
318 | CFPlus::SDLK_DOWN, [5, "south"], |
310 | ( "," . CFPlus::SDLK_DOWN ), [5, "south"], |
|
|
311 | ("1," . CFPlus::SDLK_DOWN ), [6, "southwest"], |
319 | CFPlus::SDLK_LEFT, [7, "west"], |
312 | ( "," . CFPlus::SDLK_LEFT ), [7, "west"], |
|
|
313 | ("1," . CFPlus::SDLK_LEFT ), [8, "northwest"], |
320 | ); |
314 | ); |
321 | |
315 | |
322 | sub invoke_key_down { |
316 | sub invoke_key_down { |
323 | my ($self, $ev) = @_; |
317 | my ($self, $ev) = @_; |
324 | |
318 | |
… | |
… | |
326 | my $sym = $ev->{sym}; |
320 | my $sym = $ev->{sym}; |
327 | my $uni = $ev->{unicode}; |
321 | my $uni = $ev->{unicode}; |
328 | |
322 | |
329 | $mod &= CFPlus::KMOD_CTRL | CFPlus::KMOD_ALT | CFPlus::KMOD_SHIFT; |
323 | $mod &= CFPlus::KMOD_CTRL | CFPlus::KMOD_ALT | CFPlus::KMOD_SHIFT; |
330 | |
324 | |
331 | if ($sym == 9) { |
325 | if ($::CONN && (my $dir = $DIR{(!!($mod & CFPlus::KMOD_ALT)) . ",$sym"})) { |
332 | ($mod & CFPlus::KMOD_SHIFT ? $::CONSOLE->{window} : $::PL_WINDOW)->toggle_visibility; |
|
|
333 | } elsif ($sym == CFPlus::SDLK_F1 && !$mod) { |
|
|
334 | $::HELP_WINDOW->toggle_visibility; |
|
|
335 | } elsif ($sym == CFPlus::SDLK_F2 && !$mod) { |
|
|
336 | ::toggle_player_page ($::STATS_PAGE); |
|
|
337 | } elsif ($sym == CFPlus::SDLK_F3 && !$mod) { |
|
|
338 | ::toggle_player_page ($::SKILL_PAGE); |
|
|
339 | } elsif ($sym == CFPlus::SDLK_F4 && !$mod) { |
|
|
340 | ::toggle_player_page ($::SPELL_PAGE); |
|
|
341 | } elsif ($sym == CFPlus::SDLK_F5 && !$mod) { |
|
|
342 | ::toggle_player_page ($::INVENTORY_PAGE); |
|
|
343 | } elsif ($sym == CFPlus::SDLK_F9 && !$mod) { |
|
|
344 | $::SETUP_DIALOG->toggle_visibility; |
|
|
345 | } elsif (!$::CONN) { |
|
|
346 | return 0; # bindings further down need a valid connection |
|
|
347 | |
|
|
348 | } elsif ($uni == ord ",") { |
|
|
349 | $::CONN->user_send ("take"); |
|
|
350 | } elsif ($uni == ord " ") { |
|
|
351 | $::CONN->user_send ("apply"); |
|
|
352 | } elsif ($uni == 13) { |
|
|
353 | $::CONN->user_send ("examine"); |
|
|
354 | } elsif ($uni == ord ".") { |
|
|
355 | $::CONN->user_send ($self->{completer}{last_command}) |
|
|
356 | if exists $self->{completer}{last_command}; |
|
|
357 | } elsif (my @macros = CFPlus::Macro::match_event $ev) { |
|
|
358 | $::CONN->macro_send ($_) for @macros; |
|
|
359 | } elsif (($sym == CFPlus::SDLK_KP_PLUS && !$mod) || $uni == ord "+") { |
|
|
360 | $::CONN->user_send ("rotateshoottype +"); |
|
|
361 | } elsif (($sym == CFPlus::SDLK_KP_MINUS && !$mod) || $uni == ord "-") { |
|
|
362 | $::CONN->user_send ("rotateshoottype -"); |
|
|
363 | } elsif ($uni == ord '!') { |
|
|
364 | $self->{completer}->set_prefix ("shout "); |
|
|
365 | $self->{completer}->show; |
|
|
366 | } elsif ($uni == ord '"') { |
|
|
367 | $self->{completer}->set_prefix ("$::CFG->{say_command} "); |
|
|
368 | $self->{completer}->show; |
|
|
369 | } elsif ($uni == ord "'") { |
|
|
370 | $self->{completer}->set_prefix (""); |
|
|
371 | $self->{completer}->show; |
|
|
372 | } elsif (exists $DIR{$sym}) { |
|
|
373 | if ($mod & CFPlus::KMOD_SHIFT) { |
326 | if ($mod & CFPlus::KMOD_SHIFT) { |
374 | $self->{shft}++; |
327 | $self->{shft}++; |
375 | if ($DIR{$sym}[0] != $self->{fire_dir}) { |
328 | if ($dir->[0] != $self->{fire_dir}) { |
376 | $::CONN->user_send ("fire $DIR{$sym}[0]"); |
329 | $::CONN->user_send ("fire $dir->[0]"); |
377 | } |
330 | } |
378 | $self->{fire_dir} = $DIR{$sym}[0]; |
331 | $self->{fire_dir} = $dir->[0]; |
379 | } elsif ($mod & CFPlus::KMOD_CTRL) { |
332 | } elsif ($mod & CFPlus::KMOD_CTRL) { |
380 | $self->{ctrl}++; |
333 | $self->{ctrl}++; |
381 | $::CONN->user_send ("run $DIR{$sym}[0]"); |
334 | $::CONN->user_send ("run $dir->[0]"); |
382 | } else { |
335 | } else { |
383 | $::CONN->user_send ("$DIR{$sym}[1]"); |
336 | $::CONN->user_send ("$dir->[1]"); |
384 | } |
337 | } |
385 | } elsif ((ord 'a') <= $uni && $uni <= (ord 'z')) { |
338 | |
386 | $self->{completer}->inject_key_down ($ev); |
|
|
387 | $self->{completer}->show; |
|
|
388 | } else { |
|
|
389 | return 0; |
339 | return 1; |
390 | } |
|
|
391 | |
|
|
392 | 1 |
340 | } |
|
|
341 | |
|
|
342 | 0 |
393 | } |
343 | } |
394 | |
344 | |
395 | sub invoke_key_up { |
345 | sub invoke_key_up { |
396 | my ($self, $ev) = @_; |
346 | my ($self, $ev) = @_; |
397 | |
347 | |
… | |
… | |
404 | $::CONN->user_send ("fire_stop"); |
354 | $::CONN->user_send ("fire_stop"); |
405 | delete $self->{fire_dir}; |
355 | delete $self->{fire_dir}; |
406 | $res = 1; |
356 | $res = 1; |
407 | } |
357 | } |
408 | } else { |
358 | } else { |
409 | if (exists $DIR{$sym} && delete $self->{shft}) { |
359 | if (exists $DIR{(!!($mod & CFPlus::KMOD_ALT)) . ",$sym"} && delete $self->{shft}) { |
410 | $::CONN->user_send ("fire_stop"); |
360 | $::CONN->user_send ("fire_stop"); |
411 | delete $self->{fire_dir}; |
361 | delete $self->{fire_dir}; |
412 | $res = 1; |
362 | $res = 1; |
413 | } elsif (($sym == CFPlus::SDLK_LSHIFT || $sym == CFPlus::SDLK_RSHIFT) && delete $self->{shft}) { # XXX: is RSHIFT ok? |
363 | } elsif (($sym == CFPlus::SDLK_LSHIFT || $sym == CFPlus::SDLK_RSHIFT) |
|
|
364 | && delete $self->{shft}) { # XXX: is RSHIFT ok? |
414 | $::CONN->user_send ("fire_stop"); |
365 | $::CONN->user_send ("fire_stop"); |
415 | delete $self->{fire_dir}; |
366 | delete $self->{fire_dir}; |
416 | $res = 1; |
367 | $res = 1; |
417 | } |
368 | } |
418 | } |
369 | } |
… | |
… | |
445 | } |
396 | } |
446 | |
397 | |
447 | sub refresh_hook { |
398 | sub refresh_hook { |
448 | my ($self) = @_; |
399 | my ($self) = @_; |
449 | |
400 | |
450 | return unless $::MAP; |
401 | if ($::MAP && $::CONN) { |
451 | |
|
|
452 | if (delete $self->{need_update}) { |
402 | if (delete $self->{need_update}) { |
453 | my $tilesize = $self->{ctilesize} = (int $self->{tilesize} * $::CFG->{map_scale}) || 1; |
403 | my $tilesize = $self->{ctilesize} = (int $self->{tilesize} * $::CFG->{map_scale}) || 1; |
454 | |
404 | |
455 | my $sw = $self->{sw} = 1 + CFPlus::ceil $self->{w} / $tilesize; |
405 | my $sw = $self->{sw} = 1 + CFPlus::ceil $self->{w} / $tilesize; |
456 | my $sh = $self->{sh} = 1 + CFPlus::ceil $self->{h} / $tilesize; |
406 | my $sh = $self->{sh} = 1 + CFPlus::ceil $self->{h} / $tilesize; |
457 | |
407 | |
458 | my $sx = CFPlus::ceil $::CFG->{map_shift_x} / $tilesize; |
408 | my $sx = CFPlus::ceil $::CFG->{map_shift_x} / $tilesize; |
459 | my $sy = CFPlus::ceil $::CFG->{map_shift_y} / $tilesize; |
409 | my $sy = CFPlus::ceil $::CFG->{map_shift_y} / $tilesize; |
460 | |
410 | |
461 | my $sx0 = $self->{sx0} = $::CFG->{map_shift_x} - $sx * $tilesize; |
411 | my $sx0 = $self->{sx0} = $::CFG->{map_shift_x} - $sx * $tilesize; |
462 | my $sy0 = $self->{sy0} = $::CFG->{map_shift_y} - $sy * $tilesize; |
412 | my $sy0 = $self->{sy0} = $::CFG->{map_shift_y} - $sy * $tilesize; |
463 | |
413 | |
464 | my $dx = $self->{dx} = CFPlus::ceil 0.5 * ($::MAP->w - $sw) - $sx; |
414 | my $dx = $self->{dx} = CFPlus::ceil 0.5 * ($::MAP->w - $sw) - $sx; |
465 | my $dy = $self->{dy} = CFPlus::ceil 0.5 * ($::MAP->h - $sh) - $sy; |
415 | my $dy = $self->{dy} = CFPlus::ceil 0.5 * ($::MAP->h - $sh) - $sy; |
466 | |
416 | |
467 | if ($::CFG->{fow_enable}) { |
417 | if ($::CFG->{fow_enable}) { |
468 | my ($w, $h, $data) = $::MAP->fow_texture ($dx, $dy, $sw, $sh); |
418 | my ($w, $h, $data) = $::MAP->fow_texture ($dx, $dy, $sw, $sh); |
469 | |
419 | |
470 | $self->{fow_texture} = new CFPlus::Texture |
420 | $self->{fow_texture} = new CFPlus::Texture |
471 | w => $w, |
421 | w => $w, |
472 | h => $h, |
422 | h => $h, |
473 | data => $data, |
423 | data => $data, |
474 | internalformat => GL_ALPHA, |
424 | internalformat => GL_ALPHA, |
475 | format => GL_ALPHA; |
425 | format => GL_ALPHA; |
476 | } else { |
426 | } else { |
477 | delete $self->{fow_texture}; |
427 | delete $self->{fow_texture}; |
478 | } |
428 | } |
479 | |
429 | |
480 | glNewList $self->{list}; |
430 | glNewList ($self->{list} ||= glGenList); |
481 | |
431 | |
482 | glPushMatrix; |
|
|
483 | glTranslate $sx0, $sy0; |
|
|
484 | glScale $::CFG->{map_scale}, $::CFG->{map_scale}; |
|
|
485 | |
|
|
486 | $::MAP->draw ($dx, $dy, $sw, $sh, $self->{tilesize}); |
|
|
487 | |
|
|
488 | glScale $self->{tilesize}, $self->{tilesize}; |
|
|
489 | |
|
|
490 | if (my $tex = $self->{fow_texture}) { |
|
|
491 | glPushMatrix; |
432 | glPushMatrix; |
|
|
433 | glTranslate $sx0, $sy0; |
|
|
434 | glScale $::CFG->{map_scale}, $::CFG->{map_scale}; |
|
|
435 | |
|
|
436 | $::MAP->draw ($dx, $dy, $sw, $sh, $self->{tilesize}); |
|
|
437 | |
|
|
438 | glScale $self->{tilesize}, $self->{tilesize}; |
|
|
439 | |
|
|
440 | if (my $tex = $self->{fow_texture}) { |
|
|
441 | glPushMatrix; |
492 | glScale 1/3, 1/3; |
442 | glScale 1/3, 1/3; |
493 | glEnable GL_TEXTURE_2D; |
443 | glEnable GL_TEXTURE_2D; |
494 | glTexEnv GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE; |
444 | glTexEnv GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE; |
495 | |
445 | |
496 | glColor +($::CFG->{fow_intensity}) x 3, 0.9; |
446 | glColor +($::CFG->{fow_intensity}) x 3, 0.9; |
497 | $self->{fow_texture}->draw_quad_alpha (0, 0); |
447 | $self->{fow_texture}->draw_quad_alpha (0, 0); |
498 | |
448 | |
499 | glDisable GL_TEXTURE_2D; |
449 | glDisable GL_TEXTURE_2D; |
|
|
450 | glPopMatrix; |
|
|
451 | } |
|
|
452 | |
|
|
453 | if ($self->{magicmap}) { |
|
|
454 | my ($x, $y, $w, $h, $data) = @{ $self->{magicmap} }; |
|
|
455 | |
|
|
456 | $x += $::MAP->ox + $self->{dx}; |
|
|
457 | $y += $::MAP->oy + $self->{dy}; |
|
|
458 | |
|
|
459 | glTranslate - $x - 1, - $y - 1; |
|
|
460 | glBindTexture GL_TEXTURE_2D, $magicmap_tex->{name}; |
|
|
461 | $::MAP->draw_magicmap ($x, $y, $w, $h, $data); |
|
|
462 | } |
|
|
463 | |
500 | glPopMatrix; |
464 | glPopMatrix; |
501 | } |
|
|
502 | |
|
|
503 | if ($self->{magicmap}) { |
|
|
504 | my ($x, $y, $w, $h, $data) = @{ $self->{magicmap} }; |
|
|
505 | |
|
|
506 | $x += $::MAP->ox + $self->{dx}; |
|
|
507 | $y += $::MAP->oy + $self->{dy}; |
|
|
508 | |
|
|
509 | glTranslate - $x - 1, - $y - 1; |
|
|
510 | glBindTexture GL_TEXTURE_2D, $magicmap_tex->{name}; |
|
|
511 | $::MAP->draw_magicmap ($x, $y, $w, $h, $data); |
|
|
512 | } |
|
|
513 | |
|
|
514 | glPopMatrix; |
|
|
515 | glEndList; |
465 | glEndList; |
|
|
466 | } |
|
|
467 | } else { |
|
|
468 | glDeleteList delete $self->{list} |
|
|
469 | if $self->{list}; |
516 | } |
470 | } |
517 | |
|
|
518 | } |
471 | } |
519 | |
472 | |
520 | sub draw { |
473 | sub draw { |
521 | my ($self) = @_; |
474 | my ($self) = @_; |
522 | |
475 | |
523 | $self->{root}->on_post_alloc (prepare => sub { $self->refresh_hook }); |
476 | $self->{root}->on_post_alloc (prepare => sub { $self->refresh_hook }); |
524 | |
477 | |
525 | return unless $self->{list}; |
478 | return unless $self->{list}; |
526 | |
479 | |
527 | my $focused = $CFPlus::UI::FOCUS == $self |
480 | my $focused = $CFPlus::UI::FOCUS == $self |
528 | || $CFPlus::UI::FOCUS == $self->{completer}{entry}; |
481 | || $CFPlus::UI::FOCUS == $::COMPLETER->{entry}; |
529 | |
482 | |
530 | return |
483 | return |
531 | unless $focused || !$::FAST; |
484 | unless $focused || !$::FAST; |
532 | |
485 | |
533 | glCallList $self->{list}; |
486 | glCallList $self->{list}; |
534 | |
487 | |
535 | # TNT2 emulates logops in software (or worse :) |
488 | # TNT2 emulates logops in software (or worse :) |
536 | unless ($focused) { |
489 | unless ($focused) { |
537 | glColor 0.4, 0.2, 0.2, 0.6; |
490 | glColor_premultiply 0, 0, 1, 0.25; |
538 | glEnable GL_BLEND; |
491 | glEnable GL_BLEND; |
539 | glBlendFunc GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA; |
492 | glBlendFunc GL_ONE, GL_ONE_MINUS_SRC_ALPHA; |
540 | glBegin GL_QUADS; |
493 | glBegin GL_QUADS; |
541 | glVertex 0, 0; |
494 | glVertex 0, 0; |
542 | glVertex 0, $::HEIGHT; |
495 | glVertex 0, $::HEIGHT; |
543 | glVertex $::WIDTH, $::HEIGHT; |
496 | glVertex $::WIDTH, $::HEIGHT; |
544 | glVertex $::WIDTH, 0; |
497 | glVertex $::WIDTH, 0; |