X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fexample%2Fzlibtest.c;h=816f17d924a73e2a21e6d503bacf028eeaa4b17a;hb=879d0eec420fe0fd5ddcd56c8fe62b82a6744edd;hp=8253bca4b0f7da1a72dbc61efe512c6b40529a48;hpb=3876a9103216c4774c284db2a151c94362f7fa15;p=swftools.git diff --git a/lib/example/zlibtest.c b/lib/example/zlibtest.c index 8253bca..816f17d 100644 --- a/lib/example/zlibtest.c +++ b/lib/example/zlibtest.c @@ -8,9 +8,19 @@ Copyright (c) 2001 Rainer Böhme - This file is distributed under the GPL, see file COPYING for details + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. -*/ + 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 + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include @@ -26,12 +36,12 @@ int main ( int argc, char ** argv) { SWF swf; - LPTAG t; + TAG* t; RGBA rgb; - LPSHAPE s; + SHAPE* s; MATRIX m; SRECT r; - LPJPEGBITS jpeg; + JPEGBITS* jpeg; int i,f; int ls; // line style @@ -65,15 +75,26 @@ int main ( int argc, char ** argv) bitmap8[y*bps8+x] = (y/16)*16+(x/16); for (x=0;x<256;x++) - { pal[x].r = (x&0xf)*16; - pal[x].g = (x*2)&0xff; - pal[x].b = x&0xf0; - pal[x].a = (x==0xff)?0:0xff; + { + pal[x].r = (x/16)*16; + pal[x].g = (x&15)*16; + pal[x].b = 0; + pal[x].a = x; + pal[x].r = (pal[x].r*pal[x].a)/255; + pal[x].g = (pal[x].g*pal[x].a)/255; + pal[x].b = (pal[x].b*pal[x].a)/255; } for (y=0;y>1)+x] = ((x&0xf0)==(y&0xf0))?0xffff:(x&0x0f)<(y&0xf)?BM16_RED|BM16_GREEN:BM16_BLUE; + for (x=0;x>1)+x] = ((green/0x40)&0x03)| + ((red/4)&0x3f)<<2| + ((blue/8)&0x1f)<<8| + ((green/0x08)&0x07)<<13; + } for (y=0;y