aboutsummaryrefslogtreecommitdiff
path: root/engines/avalanche/xfbutton.cpp
diff options
context:
space:
mode:
authoruruk2013-06-18 10:23:29 +0200
committeruruk2013-06-18 10:23:29 +0200
commit38bc20a0763f0f83ea3c0a94a68a1edea0d08514 (patch)
tree8d71d5d2dec96e83e2fcce7c5378e9f2da94130e /engines/avalanche/xfbutton.cpp
parenta3025b8dad7abfe845c57aee3703451c223fc2e6 (diff)
downloadscummvm-rg350-38bc20a0763f0f83ea3c0a94a68a1edea0d08514.tar.gz
scummvm-rg350-38bc20a0763f0f83ea3c0a94a68a1edea0d08514.tar.bz2
scummvm-rg350-38bc20a0763f0f83ea3c0a94a68a1edea0d08514.zip
AVALANCHE: Use Artistic Style.
Diffstat (limited to 'engines/avalanche/xfbutton.cpp')
-rw-r--r--engines/avalanche/xfbutton.cpp101
1 files changed, 52 insertions, 49 deletions
diff --git a/engines/avalanche/xfbutton.cpp b/engines/avalanche/xfbutton.cpp
index 013a121666..d2c552dae9 100644
--- a/engines/avalanche/xfbutton.cpp
+++ b/engines/avalanche/xfbutton.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
@@ -29,62 +29,65 @@
namespace Avalanche {
-integer x,y;
-untyped_file f,out;
+integer x, y;
+untyped_file f, out;
-void load() /* Load2, actually */
-{
- byte a0; /*absolute $A000:800;*/
- byte bit;
- untyped_file f;
- integer gd,gm;
+void load() { /* Load2, actually */
+ byte a0; /*absolute $A000:800;*/
+ byte bit;
+ untyped_file f;
+ integer gd, gm;
- gd=3; gm=0; initgraph(gd,gm,"c:\\bp\\bgi");
+ gd = 3;
+ gm = 0;
+ initgraph(gd, gm, "c:\\bp\\bgi");
- assign(f,"d:butnraw.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);
+ assign(f, "d:butnraw.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);
}
-void grab(integer x1,integer y1,integer x2,integer y2) /* s=930 */
-{
- word s; pointer p;
+void grab(integer x1, integer y1, integer x2, integer y2) { /* s=930 */
+ word s;
+ pointer p;
- s=imagesize(x1,y1,x2,y2);
- getmem(p,s);
- getimage(x1,y1,x2,y2,p);
- putimage(0,0,p,0);
- blockwrite(out,p,s);
- freemem(p,s);
- rectangle(x1,y1,x2,y2);
+ s = imagesize(x1, y1, x2, y2);
+ getmem(p, s);
+ getimage(x1, y1, x2, y2, p);
+ putimage(0, 0, p, 0);
+ blockwrite(out, p, s);
+ freemem(p, s);
+ rectangle(x1, y1, x2, y2);
}
-int main(int argc, const char* argv[])
-{
- pio_initialize(argc, argv);
- assign(f,"d:butnraw.avd");
- assign(out,"v:buttons.avd"); rewrite(out,1);
- load();
- for( x=0; x <= 5; x ++)
- for( y=0; y <= 3; y ++)
- {
- if (!
- (((x==1) && (y==0))
- || ((x==4) && (y==2))
- || ((y==3) && (x>2) && (x<5))))
- {
- input >> NL;
- grab(100+x*83,51+y*22,180+x*83,71+y*22);
- }
- }
- close(out);
- return EXIT_SUCCESS;
+int main(int argc, const char *argv[]) {
+ pio_initialize(argc, argv);
+ assign(f, "d:butnraw.avd");
+ assign(out, "v:buttons.avd");
+ rewrite(out, 1);
+ load();
+ for (x = 0; x <= 5; x ++)
+ for (y = 0; y <= 3; y ++) {
+ if (!
+ (((x == 1) && (y == 0))
+ || ((x == 4) && (y == 2))
+ || ((y == 3) && (x > 2) && (x < 5)))) {
+ input >> NL;
+ grab(100 + x * 83, 51 + y * 22, 180 + x * 83, 71 + y * 22);
+ }
+ }
+ close(out);
+ return EXIT_SUCCESS;
}
} // End of namespace Avalanche. \ No newline at end of file