亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? fromswf.c

?? Ming is a library for generating Macromedia Flash files (.swf), written in C, and includes useful ut
?? C
?? 第 1 頁 / 共 3 頁
字號:
/*    Ming, an SWF output library    Copyright (C) 2002  Opaque Industries - http://www.opaque.net/    This library is free software; you can redistribute it and/or    modify it under the terms of the GNU Lesser General Public    License as published by the Free Software Foundation; either    version 2.1 of the License, or (at your option) any later version.    This library 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    Lesser General Public License for more details.    You should have received a copy of the GNU Lesser General Public    License along with this library; if not, write to the Free Software    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA*//* $Id: fromswf.c,v 1.26 2008/02/24 17:38:52 krechert Exp $ */#include "ming_config.h"#include "libming.h"#include "fromswf.h"#include "method.h"#include "input.h"#include "output.h"#include "error.h"#include <stdlib.h>#include <string.h>#ifdef USE_ZLIB#include <zlib.h>#endifstatic voidwriteSWFPrebuiltClipToMethod(SWFBlock block, SWFByteOutputMethod method, void *data){	SWFPrebuiltClip clip = (SWFPrebuiltClip) block;	methodWriteUInt16(CHARACTERID(clip), method, data);	methodWriteUInt16(clip->frames, method, data);		SWFOutput_writeToMethod(clip->display, method, data);}static intcompleteSWFPrebuiltClip(SWFBlock block){	return 4 + SWFPrebuiltClipLength(block);}intSWFPrebuiltClipLength(SWFBlock block){	SWFPrebuiltClip clip = (SWFPrebuiltClip)block;	return SWFOutput_getLength(clip->display);}/* * destroys a SWFPrebuiltClip instance */voiddestroySWFPrebuiltClip(SWFPrebuiltClip clip){	destroySWFOutput(clip->display);	destroySWFCharacter((SWFCharacter) clip);}SWFPrebuiltClipnewSWFPrebuiltClip(){	SWFPrebuiltClip clip = (SWFPrebuiltClip)malloc(sizeof(struct SWFPrebuiltClip_s));	SWFCharacterInit((SWFCharacter)clip);	BLOCK(clip)->type = SWF_PREBUILTCLIP;	BLOCK(clip)->writeBlock = writeSWFPrebuiltClipToMethod;	BLOCK(clip)->complete = completeSWFPrebuiltClip;	BLOCK(clip)->dtor = (destroySWFBlockMethod) destroySWFPrebuiltClip;		clip->frames = 0;	clip->display = newSWFOutput();	return clip;}static voidwriteSWFPrebuiltToMethod(SWFBlock block, SWFByteOutputMethod method, void *data){	SWFPrebuilt defines = (SWFPrebuilt) block;		SWFOutput_writeToMethod(defines->defines, method, data);}static intcompleteSWFPrebuilt(SWFBlock block){	SWFPrebuilt defines = (SWFPrebuilt) block;	return SWFOutput_getLength(defines->defines);}voiddestroySWFPrebuilt(SWFPrebuilt defines){	destroySWFOutput(defines->defines);	free((SWFBlock) defines);}SWFPrebuiltnewSWFPrebuilt(){	SWFPrebuilt data = (SWFPrebuilt)malloc(sizeof(struct SWFPrebuilt_s));		SWFBlockInit((SWFBlock)data);	BLOCK(data)->type = SWF_PREBUILT;	BLOCK(data)->writeBlock = writeSWFPrebuiltToMethod;	BLOCK(data)->complete = completeSWFPrebuilt;	BLOCK(data)->dtor = (destroySWFBlockMethod) destroySWFPrebuilt;	data->defines = newSWFOutput();	return data;}// functions to read swfstatic int verbose = {0};struct bitstream{	char lastch;	char bitoff;	unsigned char (*readc)(void *);};typedef struct bitstream *BITS;#define alignbits(x) ((BITS)x)->bitoff = 0static intgetbits(BITS bp, int nbits){	int res = 0, nb, db;	for(nb = 0 ; nb < nbits ; nb += db)	{	if(bp->bitoff == 0)		{	bp->lastch = bp->readc(bp);			bp->bitoff = 8;		}		db = nbits - nb;		if(db > bp->bitoff)			db = bp->bitoff;		/* db bits von vorn wegnehmen */		res <<= db;		res |= (bp->lastch >> (bp->bitoff -= db)) & ((1 << db) - 1);	}	return res;}static intgetsbits(BITS bp, int nbits){	int res = getbits(bp, nbits);	if(res & (1 << (nbits-1)))		res |= (-1) << nbits;	return(res);}/* rectangle */static void rect(BITS bp){	int nbits, xmin, xmax, ymin, ymax;	nbits = getbits(bp, 5);	xmin = getbits(bp, nbits);	xmax = getbits(bp, nbits);	ymin = getbits(bp, nbits);	ymax = getbits(bp, nbits);	if(verbose)		printf("rect %.2f,%.2f %.2f,%.2f\n", xmin/Ming_scale, ymin/Ming_scale, xmax/Ming_scale, ymax/Ming_scale);}/* matrix */static void matrix(BITS bp){	int hasscale, nscalebits, scalex, scaley;	int hasrotate, nrotatebits, rotateskew0, rotateskew1;	int ntranslatebits, translatex, translatey;	if((hasscale = getbits(bp, 1)))	{	nscalebits = getbits(bp, 5);		scalex = getbits(bp, nscalebits);		scaley = getbits(bp, nscalebits);		if(verbose)			printf("scale %d %d\n", scalex, scaley);	}	if((hasrotate = getbits(bp, 1)))	{	nrotatebits = getbits(bp, 5);		rotateskew0 = getsbits(bp, nrotatebits);		rotateskew1 = getsbits(bp, nrotatebits);		if(verbose)			printf("skew %d %d\n", rotateskew0, rotateskew1);	}	ntranslatebits = getbits(bp, 5);	translatex = getsbits(bp, ntranslatebits);	translatey = getsbits(bp, ntranslatebits);	if(verbose)		printf("translate %d %d\n", translatex, translatey);}/* rgb */static void rgb(BITS bp){	int r, g, b;	alignbits(bp);	r = bp->readc(bp); g = bp->readc(bp); b = bp->readc(bp);	if(verbose)		printf("rgb %x %x %x\n", r, g, b);}static void rgba(BITS bp){	int r, g, b, a;	alignbits(bp);	r = bp->readc(bp); g = bp->readc(bp); b = bp->readc(bp);	a = bp->readc(bp);	if(verbose)		printf("rgba %x %x %x %x\n", r, g, b, a);}static intreadint2(BITS bp){	int res;	res = bp->readc(bp);	res |= bp->readc(bp) << 8;	return res;}static intreadint4(BITS bp){	int res;	res = bp->readc(bp);	res |= bp->readc(bp) << 8;	res |= bp->readc(bp) << 16;	res |= bp->readc(bp) << 24;	return res;}static void putint2(unsigned char *p, int val){	*p++ = val;	*p++ = val >> 8;}static void putint4(unsigned char *p, int val){	*p++ = val;	*p++ = val >> 8;	*p++ = val >> 16;	*p++ = val >> 24;}/* open a swf file as a stream */struct swfile{	char lastch;	char bitoff;	unsigned char (*readc)(struct swfile *);	char *name;		unsigned char vers[4];	int fsize;		char rect[9];	unsigned short rectlen;	SWFInput input;	short frames, rate;	short compressed;	unsigned char *zbuf, *zptr, *zend;};static unsigned char freadc(struct swfile *sp){	return SWFInput_getChar(sp->input);}static unsigned char r_readc(struct swfile *sp){	return sp->rect[sp->rectlen++] = freadc(sp);}static void swfseek(struct swfile *sp, int delta){	SWFInput_seek(sp->input, delta, 1);}static struct swfile *openswf(SWFInput input){	struct swfile *res = (struct swfile *)malloc(sizeof(struct swfile));	SWFInput_read(input, res->vers, 4);	if(memcmp(res->vers, "FWS", 3) && memcmp(res->vers, "CWS", 3))		SWF_error("input not a SWF stream\n");	res->fsize = SWFInput_getUInt32(input);	res->compressed = res->vers[0] == 'C';	if(res->compressed)	{#if USE_ZLIB		static z_stream z = {0};		int len = SWFInput_length(input);		unsigned char *zbuf;		z.next_in = (unsigned char *)malloc(z.avail_in = len - 8);		SWFInput_read(input, z.next_in, z.avail_in);		// caller will do, leave it here for double memory consumption		//destroySWFInput(input);		zbuf = z.next_out = (unsigned char *)malloc(z.avail_out = res->fsize - 8);		inflateInit(&z);		inflate(&z, Z_FINISH);		inflateEnd(&z);		input = newSWFInput_allocedBuffer(zbuf, z.next_out-zbuf);#else		SWF_error("The SWF to be opened is compressed, but we can't uncompress it (no zlib compiled into this version of Ming).\n");		return NULL;#endif	}	res->input = input;	// setup to read that rect...	alignbits(res);	res->rectlen = 0;	res->readc = r_readc;	rect((BITS) res);	res->readc = freadc;	readint2((BITS) res);	// movie rate	res->frames = readint2((BITS) res);	return res;}/* tag */struct swftag{	char lastch;	char bitoff;	unsigned char (*readc)(struct swftag *sp);	short type; int size;	unsigned char hdr[6]; short hdrlen;	unsigned char *datbuf, *datptr, *datend;	short alloced;};typedef struct swftag *TAG;static unsigned char treadc(TAG tp){	return *tp->datptr++;}static TAG readtag_common(BITS bp){	TAG res = (TAG) malloc(sizeof(struct swftag));	res->type = readint2(bp);	res->size = res->type & 63;	putint2(res->hdr, res->type);	res->type >>= 6;	res->hdrlen = 2;	if(res->size == 63)	{	res->size = readint4(bp);		putint4(res->hdr+2, res->size);		res->hdrlen = 6;	}	res->bitoff = 0;	res->readc = treadc;	res->alloced = 0;	return res;}static TAG readtag_file(struct swfile *sp){	TAG res = (TAG) readtag_common((BITS) sp);	if(res->size)	{	res->datbuf = res->datptr = (unsigned char *)malloc(res->size);		res->datend = res->datbuf + res->size;		SWFInput_read(sp->input, res->datbuf, res->size);		res->alloced = 1;	}	return res;}static TAG readtag_sprite(TAG tp){	TAG res = readtag_common((BITS) tp);	if(res->size)	{	res->datbuf = res->datptr = tp->datptr;		res->datend = res->datbuf + res->size;		tp->datptr += res->size;	}	return res;}static int idoffset = {0}, maxid = {0};static int change_id(TAG tp){	int val = readint2((BITS) tp);	if(val != 0 && val != 65535)	{	val += idoffset;		if(val > maxid)			maxid = val;		putint2(tp->datptr-2, val);	}	return val;}// processing functions for handle()static void defineshape(TAG tp, int lev);static void definetext(TAG tp, int lev);static void placeobject(TAG tp, int lv);static void definebutton(TAG tp);static void definebutton2(TAG tp);static void definetextfield(TAG tp);static void definesprite(TAG tp);static void definemorphshape(TAG tp,int lev);static void exportassets(TAG tp);static void definebuttonsound(TAG tp);static void fillandlinestyles(TAG tp, int lev);static void linestyle(TAG tp, int lev);static void shape(TAG tp, int lev);static void morphlinestyle2(TAG tp);static int drop_tag(TAG tp){	switch(tp->type)	{		case SWF_FILEATTRIBUTES:		case SWF_METADATA:		case SWF_DEFINESCENEANDFRAMEDATA: // only allowed in main timeline -> merge ?			return 1;		default:			return 0;	}}static int handle_tag(TAG tp){	int id;	int displaylist = 0;	if(verbose)	{	char *tagnam = "inknown";		switch(tp->type)		{			case SWF_END:				tagnam = "stagEnd"; break;			case SWF_SHOWFRAME:				tagnam = "stagShowFrame"; break;			case SWF_DEFINESHAPE:				tagnam = "stagDefineShape"; break;			case SWF_FREECHARACTER:				tagnam = "stagFreeCharacter"; break;			case SWF_PLACEOBJECT:				tagnam = "stagPlaceObject"; break;			case SWF_REMOVEOBJECT:				tagnam = "stagRemoveObject"; break;			case SWF_DEFINEBITS:				tagnam = "stagDefineBits"; break;			case SWF_DEFINEBUTTON:				tagnam = "stagDefineButton"; break;			case SWF_JPEGTABLES:				tagnam = "stagJPEGTables"; break;			case SWF_SETBACKGROUNDCOLOR:				tagnam = "stagSetBackgroundColor"; break;			case SWF_DEFINEFONT:				tagnam = "stagDefineFont"; break;			case SWF_DEFINETEXT:				tagnam = "stagDefineText"; break;			case SWF_DOACTION:				tagnam = "stagDoAction"; break;			case SWF_DEFINEFONTINFO:				tagnam = "stagDefineFontInfo"; break;			case SWF_DEFINESOUND:				tagnam = "stagDefineSound"; break;			case SWF_STARTSOUND:				tagnam = "stagStartSound"; break;			case SWF_DEFINEBUTTONSOUND:				tagnam = "stagDefineButtonSound"; break;			case SWF_SOUNDSTREAMHEAD:				tagnam = "stagSoundStreamHead"; break;			case SWF_SOUNDSTREAMBLOCK:				tagnam = "stagSoundStreamBlock"; break;			case SWF_DEFINELOSSLESS:

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美狂野另类xxxxoooo| 日韩三级精品电影久久久| 国产精品一区二区在线播放| 亚洲乱码国产乱码精品精小说| 精品福利av导航| 在线播放中文一区| 在线不卡的av| 欧美一区二区三区思思人| 欧美色窝79yyyycom| 色婷婷亚洲综合| 在线视频你懂得一区二区三区| 成人黄色网址在线观看| 懂色av中文一区二区三区| 国产美女精品一区二区三区| 精品一区二区在线视频| 久久国产精品无码网站| 国产精品一区二区久久不卡| 国产成人久久精品77777最新版本 国产成人鲁色资源国产91色综 | 欧美福利视频导航| 日韩欧美久久久| 日本一区二区不卡视频| 麻豆91小视频| 不卡的av电影| 欧美日韩国产系列| 久久精品免费在线观看| 中文字幕日本不卡| 亚洲午夜精品网| 国产麻豆一精品一av一免费| 91免费看`日韩一区二区| 在线播放一区二区三区| 久久天天做天天爱综合色| 亚洲婷婷综合久久一本伊一区| 成人美女视频在线观看18| 精品视频在线免费观看| 精品国产乱码久久| 一区二区视频在线看| 美女在线视频一区| 91色在线porny| 26uuu欧美日本| 日欧美一区二区| 蜜桃一区二区三区在线| 久久综合久久鬼色| 国产欧美一区视频| 亚洲男人的天堂一区二区| 亚洲精品成人少妇| 久久99精品国产麻豆不卡| 国产精品99久久久久久似苏梦涵| 成人黄页在线观看| 欧美一区二区在线免费观看| 一区二区三区成人| 美女在线视频一区| 99热精品一区二区| 亚洲丝袜自拍清纯另类| 99re这里只有精品视频首页| 国精产品一区一区三区mba桃花| 99久久精品情趣| 国产日韩欧美a| 久久国产精品无码网站| 日韩欧美一二三| 免费国产亚洲视频| 欧美日韩日日夜夜| 亚洲成av人片在线观看| 欧美色涩在线第一页| 曰韩精品一区二区| 欧美在线你懂的| 日韩精品国产欧美| 这里只有精品99re| 精品一区二区三区免费| 久久网站热最新地址| 日韩精品一区二| 国产精品久久久久aaaa樱花| 欧美不卡一区二区三区四区| 91黄色免费网站| www.性欧美| 国产一区中文字幕| 中文字幕一区二区5566日韩| 精品视频全国免费看| 日韩电影在线免费| 国产三级精品视频| 欧美视频在线一区二区三区| 亚洲h在线观看| 国产亚洲精品免费| 欧美在线|欧美| 国产一二精品视频| 艳妇臀荡乳欲伦亚洲一区| 日韩一二三区视频| 99久久99久久久精品齐齐| 五月婷婷综合激情| 亚洲色大成网站www久久九九| 欧美精三区欧美精三区| 另类小说欧美激情| 有码一区二区三区| 国产农村妇女毛片精品久久麻豆| 欧美日韩国产综合久久| 91免费精品国自产拍在线不卡| 激情综合网最新| 亚洲电影在线免费观看| 国产日产亚洲精品系列| 精品毛片乱码1区2区3区| 在线亚洲一区观看| 9i在线看片成人免费| 成人性生交大片免费 | 日本一区二区综合亚洲| 秋霞电影一区二区| 亚洲美女屁股眼交| 综合久久给合久久狠狠狠97色| 久久噜噜亚洲综合| 一区二区三区在线视频观看58| 中文字幕欧美日本乱码一线二线| 国产亚洲精品中文字幕| 国产精品免费观看视频| 中文字幕的久久| 亚洲免费视频成人| 日韩精品免费专区| 国产一区二区在线观看免费| 亚洲第一av色| 日韩精品乱码av一区二区| 丝袜亚洲另类欧美| 男男视频亚洲欧美| 日韩成人一区二区| 日本不卡不码高清免费观看| 婷婷六月综合亚洲| 久草热8精品视频在线观看| 国产中文一区二区三区| 国产精品影视在线观看| 99久久精品免费看国产 | 中文字幕二三区不卡| 亚洲日本一区二区| 日韩综合在线视频| 狠狠色丁香婷婷综合久久片| 精品亚洲成a人| 成人激情电影免费在线观看| 欧美亚洲动漫精品| 日韩免费观看高清完整版在线观看| 精品久久久久久久人人人人传媒| 久久久精品免费免费| 成人欧美一区二区三区黑人麻豆| 亚洲午夜视频在线| 国产精品自产自拍| 欧美日韩一级黄| 欧美激情综合五月色丁香| 亚洲一区二区在线免费看| 狠狠色综合播放一区二区| 99r国产精品| 欧美国产国产综合| 久久精品99国产精品日本| 精品第一国产综合精品aⅴ| 亚洲一二三四区不卡| 成人深夜视频在线观看| 日韩午夜三级在线| 亚洲色图视频网站| 国产mv日韩mv欧美| 日韩限制级电影在线观看| 一卡二卡欧美日韩| 国产成人亚洲综合a∨婷婷图片| 欧美日韩国产在线观看| 亚洲黄色av一区| 一本一道久久a久久精品| 亚洲国产精品成人综合 | 另类的小说在线视频另类成人小视频在线 | 日韩国产欧美三级| 欧美日韩精品一区二区三区| 亚洲激情在线激情| 91偷拍与自偷拍精品| 亚洲视频精选在线| va亚洲va日韩不卡在线观看| 精品国产免费人成在线观看| 日韩精品亚洲专区| 日韩一区二区在线播放| 毛片av一区二区| 精品欧美黑人一区二区三区| 国产毛片一区二区| 国产精品视频免费| 91小视频免费看| 午夜日韩在线电影| 欧美精品一区二区久久婷婷| 国产毛片精品一区| 综合久久综合久久| 欧美男人的天堂一二区| 久久精品国产在热久久| 国产区在线观看成人精品| 波多野结衣中文字幕一区二区三区| 亚洲色图第一区| 日韩视频国产视频| 97精品久久久久中文字幕 | www.色精品| 另类小说图片综合网| 国产精品久久网站| 宅男在线国产精品| 高清av一区二区| 亚洲成在线观看| 中文字幕巨乱亚洲| 欧美一级片在线| 91免费看`日韩一区二区| 激情文学综合丁香| 日韩精品欧美成人高清一区二区| 中文字幕第一区二区| 欧美一区二区三区成人| 99精品视频一区二区三区| 国产一区二区三区在线观看免费 |