/[VRac]/Galaksija.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 /Galaksija.pm

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

revision 181 by dpavlin, Sun Sep 30 18:19:57 2007 UTC revision 185 by dpavlin, Sun Sep 30 19:47:32 2007 UTC
# Line 214  Render characters as graphic Line 214  Render characters as graphic
214  my $char_rom = 'rom/Galaksija/CHRGEN.BIN';  my $char_rom = 'rom/Galaksija/CHRGEN.BIN';
215    
216  my @chars = map { ord($_) } split(//, read_file( $char_rom ));  my @chars = map { ord($_) } split(//, read_file( $char_rom ));
217  warn "loaded ", $#chars, " characters\n";  warn "loaded ", $#chars, " bytes from $char_rom\n";
218    
219  my @char2pos;  my @char2pos;
220    
# Line 231  foreach my $char ( 0 .. 255 ) { Line 231  foreach my $char ( 0 .. 255 ) {
231    
232  #warn "## chars2pos = ",dump( @char2pos );  #warn "## chars2pos = ",dump( @char2pos );
233    
234    sub screen_width { 256 }
235    sub screen_height { 16 * 13 }
236    
237  sub render_vram {  sub render_vram {
238          my $self = shift;          my $self = shift;
239    
# Line 255  sub render_vram { Line 258  sub render_vram {
258          }          }
259    
260          my $vram = SDL::Surface->new(          my $vram = SDL::Surface->new(
261                  -width => 256,                  -width => $self->screen_width,
262                  -height => 256,                  -height => $self->screen_height,
263                  -depth => 1,    # 1 bit per pixel                  -depth => 1,    # 1 bit per pixel
264                  -pitch => 32,   # bytes per line                  -pitch => 32,   # bytes per line
265                  -from => pack("C*", @pixels),                  -from => pack("C*", @pixels),

Legend:
Removed from v.181  
changed lines
  Added in v.185

  ViewVC Help
Powered by ViewVC 1.1.26