X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fexample%2Fzlibtest.c;h=6f0a19d7b3c76b6c0256dc4dfee0db60e2e9b5d6;hb=eb1e7b1301db64f3564576cbfdea6a976010dc5d;hp=05126f215d2c160089b5101063894ade7f1cd33d;hpb=dcd54b8f52f1003b9723ea1aaeb6b1226e04e675;p=swftools.git diff --git a/lib/example/zlibtest.c b/lib/example/zlibtest.c index 05126f2..6f0a19d 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 @@ -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