/[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 161 by dpavlin, Sun Aug 5 19:44:20 2007 UTC revision 165 by dpavlin, Mon Aug 6 07:04:40 2007 UTC
# Line 14  use Carp qw/confess/; Line 14  use Carp qw/confess/;
14  use Data::Dump qw/dump/;  use Data::Dump qw/dump/;
15    
16  use Exporter 'import';  use Exporter 'import';
17  our @EXPORT = qw'$white $black';  our @EXPORT = qw'$white $black @flip';
18    
19  use base qw(Class::Accessor Prefs);  use base qw(Class::Accessor Prefs);
20  __PACKAGE__->mk_accessors(qw(app event));  __PACKAGE__->mk_accessors(qw(app event));
# Line 326  sub loop { Line 326  sub loop {
326          }          }
327  }  }
328    
329    # helper array to flip bytes for display
330    our @flip;
331    
332    foreach my $i ( 0 .. 255 ) {
333            my $t = 0;
334            $i & 0b00000001 and $t = $t | 0b10000000;
335            $i & 0b00000010 and $t = $t | 0b01000000;
336            $i & 0b00000100 and $t = $t | 0b00100000;
337            $i & 0b00001000 and $t = $t | 0b00010000;
338            $i & 0b00010000 and $t = $t | 0b00001000;
339            $i & 0b00100000 and $t = $t | 0b00000100;
340            $i & 0b01000000 and $t = $t | 0b00000010;
341            $i & 0b10000000 and $t = $t | 0b00000001;
342            #warn "$i = $t\n";
343            $flip[$i] = $t;
344    }
345    
346  =head1 SEE ALSO  =head1 SEE ALSO
347    
348  L<Orao> is sample implementation using this module  L<Orao> is sample implementation using this module

Legend:
Removed from v.161  
changed lines
  Added in v.165

  ViewVC Help
Powered by ViewVC 1.1.26