First CVS upload.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@80
This commit is contained in:
parent
7d1ca9bdd4
commit
42e5d0b779
158 changed files with 42940 additions and 0 deletions
32
scripts/ega-switch.pl
Normal file
32
scripts/ega-switch.pl
Normal file
|
@ -0,0 +1,32 @@
|
|||
#!/usr/bin/perl
|
||||
use integer;
|
||||
open (THEFILE,'>','../src/hardware/ega-switch.h')
|
||||
or die "Can't open my file $!";
|
||||
|
||||
print THEFILE "switch (bit_mask) {\n";
|
||||
for ($i = 0; $i < 256; $i++) {
|
||||
print THEFILE "\tcase $i:\n";
|
||||
$b=128;
|
||||
$add=0;
|
||||
do {
|
||||
if ($i & $b) {
|
||||
print THEFILE "\t{\n";
|
||||
print THEFILE "\t\tBit8u color=0;\n";
|
||||
print THEFILE "\t\tif (pixels.b[0] & $b) color|=1;\n";
|
||||
print THEFILE "\t\tif (pixels.b[1] & $b) color|=2;\n";
|
||||
print THEFILE "\t\tif (pixels.b[2] & $b) color|=4;\n";
|
||||
print THEFILE "\t\tif (pixels.b[3] & $b) color|=8;\n";
|
||||
print THEFILE "\t\t*(write_pixels+$add)=color;\n";
|
||||
print THEFILE "\t\t*(write_pixels+$add+512*1024)=color;\n";
|
||||
print THEFILE "\t}\n";
|
||||
}
|
||||
|
||||
$b=$b >> 1;
|
||||
$add=$add+1;
|
||||
} until ($b == 0);
|
||||
print THEFILE "\tbreak;\n";
|
||||
}
|
||||
print THEFILE "}\n";
|
||||
|
||||
|
||||
close (THEFILE);
|
25
scripts/font-switch.pl
Normal file
25
scripts/font-switch.pl
Normal file
|
@ -0,0 +1,25 @@
|
|||
#!/usr/bin/perl
|
||||
use integer;
|
||||
open (THEFILE,'>','../src/hardware/font-switch.h')
|
||||
or die "Can't open my file $!";
|
||||
|
||||
print THEFILE "switch (bit_mask) {\n";
|
||||
for ($i = 0; $i < 256; $i++) {
|
||||
print THEFILE "\tcase $i:\n";
|
||||
$b=128;
|
||||
$add=0;
|
||||
do {
|
||||
if ($i & $b) {
|
||||
print THEFILE "\t\t*(draw+$add)=fg;\n";
|
||||
} else {
|
||||
print THEFILE "\t\t*(draw+$add)=bg;\n";
|
||||
}
|
||||
$b=$b >> 1;
|
||||
$add=$add+1;
|
||||
} until ($b == 0);
|
||||
print THEFILE "\tbreak;\n";
|
||||
}
|
||||
print THEFILE "}\n";
|
||||
|
||||
|
||||
close (THEFILE);
|
Loading…
Add table
Add a link
Reference in a new issue