X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fexample%2Fzlibtest.c;h=816f17d924a73e2a21e6d503bacf028eeaa4b17a;hb=3d73649bf0e39778e715a07da902d0a858065a43;hp=05126f215d2c160089b5101063894ade7f1cd33d;hpb=dcd54b8f52f1003b9723ea1aaeb6b1226e04e675;p=swftools.git diff --git a/lib/example/zlibtest.c b/lib/example/zlibtest.c index 05126f2..816f17d 100644 --- a/lib/example/zlibtest.c +++ b/lib/example/zlibtest.c @@ -8,14 +8,23 @@ 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 #include -#include #include "../rfxswf.h" #define WIDTH 256 @@ -27,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 @@ -66,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