blob: 6e2f501d0fa39c624beab7cbeacc5cd0beb048d4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#!/usr/bin/perl -w
# turn version string into raw screen data, so we can easily display
# it on the title screen.
use bytes;
my $ver = shift;
if(length($ver) > 32) {
warn "$0: version string > 32 chars, will be cut off!\n";
substr($ver, 32) = "";
}
$blanks = 32;
for(map { ord } split "", $ver) {
my $byte = $_;
if($_ < 32) {
$byte += 64;
} elsif($_ >= 32 && $_ <= 96) {
$byte -= 32;
}
print chr($byte);
$blanks--;
}
print chr(0) x $blanks;
|