diff options
author | uruk | 2013-06-18 10:23:29 +0200 |
---|---|---|
committer | uruk | 2013-06-18 10:23:29 +0200 |
commit | 38bc20a0763f0f83ea3c0a94a68a1edea0d08514 (patch) | |
tree | 8d71d5d2dec96e83e2fcce7c5378e9f2da94130e /engines/avalanche/make!.cpp | |
parent | a3025b8dad7abfe845c57aee3703451c223fc2e6 (diff) | |
download | scummvm-rg350-38bc20a0763f0f83ea3c0a94a68a1edea0d08514.tar.gz scummvm-rg350-38bc20a0763f0f83ea3c0a94a68a1edea0d08514.tar.bz2 scummvm-rg350-38bc20a0763f0f83ea3c0a94a68a1edea0d08514.zip |
AVALANCHE: Use Artistic Style.
Diffstat (limited to 'engines/avalanche/make!.cpp')
-rw-r--r-- | engines/avalanche/make!.cpp | 107 |
1 files changed, 59 insertions, 48 deletions
diff --git a/engines/avalanche/make!.cpp b/engines/avalanche/make!.cpp index 353b461387..a4cf27801f 100644 --- a/engines/avalanche/make!.cpp +++ b/engines/avalanche/make!.cpp @@ -11,7 +11,7 @@ * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License @@ -31,61 +31,72 @@ namespace Avalanche { /*$S-*/ -integer gd,gm; +integer gd, gm; untyped_file f; text t; string x; -boolean subpix(integer x,integer y) -{boolean subpix_result; -; - subpix_result=getpixel(x,y)==15; -return subpix_result; +boolean subpix(integer x, integer y) { + boolean subpix_result; + ; + subpix_result = getpixel(x, y) == 15; + return subpix_result; } -byte pixel(integer x,integer y) -{byte pixel_result; -; - pixel_result=(byte)( - subpix(x*4,y*2) || - subpix(x*4+1,y*2) || - subpix(x*4+2,y*2) || - subpix(x*4+3,y*2) || - subpix(x*4,y*2+1) || - subpix(x*4+1,y*2+1) || - subpix(x*4+2,y*2+1) || - subpix(x*4+3,y*2+1) - )*15; -return pixel_result; +byte pixel(integer x, integer y) { + byte pixel_result; + ; + pixel_result = (byte)( + subpix(x * 4, y * 2) || + subpix(x * 4 + 1, y * 2) || + subpix(x * 4 + 2, y * 2) || + subpix(x * 4 + 3, y * 2) || + subpix(x * 4, y * 2 + 1) || + subpix(x * 4 + 1, y * 2 + 1) || + subpix(x * 4 + 2, y * 2 + 1) || + subpix(x * 4 + 3, y * 2 + 1) + ) * 15; + return pixel_result; } -int main(int argc, const char* argv[]) -{pio_initialize(argc, argv); -; - gd=3; gm=1; initgraph(gd,gm,"o:"); - assign(f,"v:logo.avd"); reset(f,1); - for( gd=0; gd <= 180; gd ++) - blockread(f,mem[0xa000*(gd*80)],53); - close(f); - for( gd=1; gd <= 106; gd ++) - for( gm=0; gm <= 145; gm ++) - putpixel(gd,gm+181,pixel(gd,gm)); - assign(t,"d:avalot.txt"); - rewrite(t); - for( gm=1; gm <= 36; gm ++) - {; - x=""; - for( gd=1; gd <= 106; gd ++) - switch (getpixel(gd,gm*2+181)*2+getpixel(gd,gm*2+182)) { - case 0: x=x+' '; break; - case 15: x=x+'Ü'; break; - case 30: x=x+'ß'; break; - case 45: x=x+'Û'; break; - } - t << x << NL; - } - close(t); -return EXIT_SUCCESS; +int main(int argc, const char *argv[]) { + pio_initialize(argc, argv); + ; + gd = 3; + gm = 1; + initgraph(gd, gm, "o:"); + assign(f, "v:logo.avd"); + reset(f, 1); + for (gd = 0; gd <= 180; gd ++) + blockread(f, mem[0xa000 * (gd * 80)], 53); + close(f); + for (gd = 1; gd <= 106; gd ++) + for (gm = 0; gm <= 145; gm ++) + putpixel(gd, gm + 181, pixel(gd, gm)); + assign(t, "d:avalot.txt"); + rewrite(t); + for (gm = 1; gm <= 36; gm ++) { + ; + x = ""; + for (gd = 1; gd <= 106; gd ++) + switch (getpixel(gd, gm * 2 + 181) * 2 + getpixel(gd, gm * 2 + 182)) { + case 0: + x = x + ' '; + break; + case 15: + x = x + 'Ü'; + break; + case 30: + x = x + 'ß'; + break; + case 45: + x = x + 'Û'; + break; + } + t << x << NL; + } + close(t); + return EXIT_SUCCESS; } } // End of namespace Avalanche.
\ No newline at end of file |