/[VRac]/Screen.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /Screen.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 142 by dpavlin, Sun Aug 5 01:31:41 2007 UTC revision 143 by dpavlin, Sun Aug 5 01:34:40 2007 UTC
# Line 65  my $red                = SDL::Color->new( -r => 0xff, Line 65  my $red                = SDL::Color->new( -r => 0xff,
65  my $green       = SDL::Color->new( -r => 0x00, -g => 0xff, -b => 0x00 );  my $green       = SDL::Color->new( -r => 0x00, -g => 0xff, -b => 0x00 );
66  my $blue        = SDL::Color->new( -r => 0x00, -g => 0x00, -b => 0xff );  my $blue        = SDL::Color->new( -r => 0x00, -g => 0x00, -b => 0xff );
67    
 my $rect_mem = SDL::Rect->new( -x => 256, -y => 0, -width => 256, -height => 256 );  
   
68  =head2 mem_xy  =head2 mem_xy
69    
70  Helper to return x and y coordinates in memory map  Helper to return x and y coordinates in memory map
# Line 155  sub render_frame { Line 153  sub render_frame {
153    
154          my $scale = $self->scale || confess "no scale?";          my $scale = $self->scale || confess "no scale?";
155    
156          my $rect                = SDL::Rect->new( -x => 0, -y => 0, -width => 256 * $scale, -height => 256 * $scale );          my $rect        = SDL::Rect->new( -x => 0, -y => 0, -width => 256 * $scale, -height => 256 * $scale );
157          my $rect_screen = SDL::Rect->new( -x => 0, -y => 0, -width => 256 * $scale, -height => 256 * $scale );          my $rect_screen = SDL::Rect->new( -x => 0, -y => 0, -width => 256 * $scale, -height => 256 * $scale );
158    
159          if ( $scale > 1 ) {          if ( $scale > 1 ) {
# Line 197  sub render_mem { Line 195  sub render_mem {
195    
196          $vram->display_format;          $vram->display_format;
197    
198          my $rect = SDL::Rect->new( -x => 0, -y => 0, -width => 256, -height => 256 );          my $rect     = SDL::Rect->new( -x => 0, -y => 0, -width => 256, -height => 256 );
199            my $rect_mem = SDL::Rect->new( -x => 256 * $self->scale, -y => 0, -width => 256, -height => 256 );
200    
201          $vram->blit( $rect, $app, $rect_mem );          $vram->blit( $rect, $app, $rect_mem );
202    
203          $app->sync;          $app->sync;

Legend:
Removed from v.142  
changed lines
  Added in v.143

  ViewVC Help
Powered by ViewVC 1.1.26