ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/kgsueme/kgsueme/game.pl
(Generate patch)

Comparing kgsueme/kgsueme/game.pl (file contents):
Revision 1.14 by pcg, Sun Jun 1 01:35:42 2003 UTC vs.
Revision 1.15 by pcg, Sun Jun 1 02:30:00 2003 UTC

5 5
6use base KGS::Listener::Game; 6use base KGS::Listener::Game;
7use base KGS::Game; 7use base KGS::Game;
8 8
9use base gtk::widget; 9use base gtk::widget;
10
11use POSIX qw(ceil);
10 12
11sub new { 13sub new {
12 my $self = shift; 14 my $self = shift;
13 $self = $self->SUPER::new(@_); 15 $self = $self->SUPER::new(@_);
14 16
204 for ([MARK_SMALL_B, $::black_img[$rand % @::black_img]], 206 for ([MARK_SMALL_B, $::black_img[$rand % @::black_img]],
205 [MARK_SMALL_W, $::white_img[$rand % @::white_img]]) { 207 [MARK_SMALL_W, $::white_img[$rand % @::white_img]]) {
206 my ($mask, $img) = @$_; 208 my ($mask, $img) = @$_;
207 if ($mark & $mask) { 209 if ($mark & $mask) {
208 $img->composite ( 210 $img->composite (
209 $base, ($size / 4) x2, (int ($size / 2 + 0.5)) x2, ($size / 4) x2, 211 $base, (ceil ($size / 4)) x2, (ceil ($size / 2)) x2, (ceil ($size / 4)) x2,
210 $size / $img->get_width / 2, $size / $img->get_height / 2, 212 $size / $img->get_width / 2, $size / $img->get_height / 2,
211 $::config->{speed} ? INTERP_NEAREST : INTERP_BILINEAR, 192 213 $::config->{speed} ? INTERP_NEAREST : INTERP_BILINEAR, 224
212 ); 214 );
213 } 215 }
214 } 216 }
215 217
216 # and lastly any markers 218 # and lastly any markers

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines