4 /* Loglan82 Compiler&Interpreter
\r
5 Copyright (C) 1981-1993 Institute of Informatics, University of Warsaw
\r
6 Copyright (C) 1993, 1994 LITA, Pau
\r
8 This program is free software; you can redistribute it and/or modify
\r
9 it under the terms of the GNU General Public License as published by
\r
10 the Free Software Foundation; either version 2 of the License, or
\r
11 (at your option) any later version.
\r
13 This program is distributed in the hope that it will be useful,
\r
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
16 GNU General Public License for more details.
\r
18 =======================================================================
\r
21 void pascal getmap( x, y, buf )
25 /* buffer : 2 bytes X size, 2 bytes Y size, and rows * columns of pixels */
27 int x00 = inxpos(NULL);
28 int y00 = inypos(NULL);
50 ((short int *)buf)[0] = (short int)(x1-x0+1);
51 ((short int *)buf)[1] = (short int)(y1-y0+1);
53 for( j=y0; j<=y1; j++ )
54 for( i=x0; i<=x1; i++ )
55 *(buf++) = (char)inpix( &i, &j );
60 void pascal putmap( buf )
63 int x00 = inxpos(NULL);
64 int y00 = inypos(NULL);
65 int xw = ((short int *)buf)[0];
66 int yw = ((short int *)buf)[1];
70 for( j=y00; j<y00+yw; j++ )
71 for( i=x00; i<x00+xw; i++ )
82 void pascal ormap( buf )
85 int x00 = inxpos(NULL);
86 int y00 = inypos(NULL);
87 int xw = ((short int *)buf)[0];
88 int yw = ((short int *)buf)[1];
92 for( j=y00; j<y00+yw; j++ )
93 for( i=x00; i<x00+xw; i++ )
95 int c = inpix( &i, &j );
105 void pascal xormap( buf )
108 int x00 = inxpos(NULL);
109 int y00 = inypos(NULL);
110 int xw = ((short int *)buf)[0];
111 int yw = ((short int *)buf)[1];
115 for( j=y00; j<y00+yw; j++ )
116 for( i=x00; i<x00+xw; i++ )
118 int c = inpix( &i, &j );