aboutsummaryrefslogtreecommitdiff
path: root/engines/avalanche/pictemp2.cpp
diff options
context:
space:
mode:
authoruruk2013-06-17 10:38:38 +0200
committeruruk2013-06-17 10:38:38 +0200
commita2adda516bdf790651283201a666f253a8bfcc49 (patch)
treebdc6479a6889d15d1b25e47e28f0c86f093a9610 /engines/avalanche/pictemp2.cpp
parent2f0e43bb2e402bbcf65175934d21ade6febaad60 (diff)
downloadscummvm-rg350-a2adda516bdf790651283201a666f253a8bfcc49.tar.gz
scummvm-rg350-a2adda516bdf790651283201a666f253a8bfcc49.tar.bz2
scummvm-rg350-a2adda516bdf790651283201a666f253a8bfcc49.zip
AVALANCHE: Initial PtoC output.
Diffstat (limited to 'engines/avalanche/pictemp2.cpp')
-rw-r--r--engines/avalanche/pictemp2.cpp64
1 files changed, 64 insertions, 0 deletions
diff --git a/engines/avalanche/pictemp2.cpp b/engines/avalanche/pictemp2.cpp
new file mode 100644
index 0000000000..54e9e0dafa
--- /dev/null
+++ b/engines/avalanche/pictemp2.cpp
@@ -0,0 +1,64 @@
+#include "ptoc.h"
+
+ /* Get 'em back! */
+#include "graph.h"
+
+
+const integer picsize = 966;
+const integer number_of_objects = 17;
+
+const array<1,65,char> thinks_header =
+ string("This is an Avalot file, which is subject to copyright. Have fun.")+'\32';
+
+integer gd,gm;
+untyped_file f;
+pointer p;
+byte noo;
+
+void load()
+{
+ byte a0 /*absolute $A000:1200*/;
+ byte bit;
+ untyped_file f;
+;
+ assign(f,"d:thingtmp.avd"); reset(f,1);
+ seek(f,177);
+ for( bit=0; bit <= 3; bit ++)
+ {;
+ port[0x3c4]=2; port[0x3ce]=4; port[0x3c5]=1 << bit; port[0x3cf]=bit;
+ blockread(f,a0,12080);
+ }
+ close(f); bit=getpixel(0,0);
+}
+
+int main(int argc, const char* argv[])
+{pio_initialize(argc, argv);
+;
+ gd=3; gm=0; initgraph(gd,gm,"c:\\bp\\bgi");
+
+ load(); noo=0;
+
+ assign(f,"thinks.avd");
+ getmem(p,picsize);
+ rewrite(f,1);
+ blockwrite(f,thinks_header,65);
+ gd=10; gm=20;
+
+ while (noo<=number_of_objects)
+ {;
+ getimage(gd,gm,gd+59,gm+29,p);
+ putimage(gd,gm,p,notput);
+ blockwrite(f,p,picsize);
+ gd += 70;
+
+ if (gd==640)
+ {;
+ gd=10; gm += 40;
+ }
+
+ noo += 1;
+ }
+
+ close(f); freemem(p,picsize);
+return EXIT_SUCCESS;
+}