亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
精品国精品自拍自在线| 日本电影欧美片| 一区二区在线观看视频| 欧美v国产在线一区二区三区| 91影视在线播放| 久久精品72免费观看| 玉米视频成人免费看| 久久女同性恋中文字幕| 91精品国产综合久久久久久久久久 | 精品日韩在线观看| 99热精品一区二区| 激情综合亚洲精品| 视频一区二区三区中文字幕| 亚洲欧洲在线观看av| 精品国产一区二区在线观看| 3d动漫精品啪啪| 欧美视频中文字幕| 91视频国产观看| 国v精品久久久网| 狠狠久久亚洲欧美| 免费成人性网站| 午夜日韩在线电影| 一区二区三区日韩欧美精品 | 亚洲国产aⅴ天堂久久| 18欧美亚洲精品| 国产精品二三区| 国产肉丝袜一区二区| 欧美精品一区二区蜜臀亚洲| 日韩欧美激情一区| 9191精品国产综合久久久久久| 在线影视一区二区三区| 99久久久久免费精品国产| 国产一区激情在线| 国产一区二区三区香蕉| 免费看日韩a级影片| 奇米888四色在线精品| 日韩精品一级二级 | 欧美狂野另类xxxxoooo| 精品1区2区3区| 欧美三片在线视频观看| 欧美无乱码久久久免费午夜一区 | 久久久久国产精品人| 精品国产91洋老外米糕| 精品av综合导航| 久久一留热品黄| 久久精品亚洲乱码伦伦中文| 久久久久国产精品麻豆| 国产精品网站在线播放| 亚洲天堂免费在线观看视频| 亚洲免费av观看| 一区二区三区欧美视频| 亚洲国产视频直播| 日韩精品一级二级| 国产一区二区精品久久| av动漫一区二区| 欧美视频在线观看一区| 欧美一区2区视频在线观看| 精品日韩成人av| 国产免费成人在线视频| 亚洲女女做受ⅹxx高潮| 亚洲国产成人av| 久久国产日韩欧美精品| 粉嫩一区二区三区性色av| a在线播放不卡| 欧美日韩中文精品| 亚洲精品在线观看网站| 国产精品欧美精品| 亚欧色一区w666天堂| 久久国产婷婷国产香蕉| 99re视频精品| 日韩一区二区影院| 中文av一区特黄| 亚洲h在线观看| 国产一区二区三区日韩| 一本色道久久综合精品竹菊| 欧美一区二区三区视频在线观看| 久久精品人人爽人人爽| 一区二区三区四区亚洲| 麻豆91在线播放免费| 国产91精品一区二区麻豆网站| 欧美亚洲一区二区在线观看| 精品国内片67194| 亚洲乱码精品一二三四区日韩在线| 午夜av一区二区三区| 国产精品亚洲午夜一区二区三区| 99re成人精品视频| 欧美一区二区视频在线观看| 一色桃子久久精品亚洲| 免费观看30秒视频久久| 色94色欧美sute亚洲13| 26uuu色噜噜精品一区二区| 亚洲综合色丁香婷婷六月图片| 激情文学综合插| 欧美色精品在线视频| 国产精品人成在线观看免费| 热久久国产精品| 91国在线观看| 国产精品欧美极品| 久久国产精品99精品国产| 在线亚洲免费视频| 亚洲国产精品精华液2区45| 日韩1区2区3区| 色乱码一区二区三区88| 欧美激情中文不卡| 美国毛片一区二区| 在线视频你懂得一区| 国产日韩欧美精品综合| 麻豆专区一区二区三区四区五区| 91国偷自产一区二区开放时间 | 国产福利一区二区三区在线视频| 欧美日韩三级一区| 亚洲精品日韩一| eeuss鲁一区二区三区| 久久久久久久网| 精品一区二区三区欧美| 欧美麻豆精品久久久久久| 一区二区三区鲁丝不卡| 91丨porny丨国产入口| 国产偷国产偷精品高清尤物| 久久精品国产亚洲高清剧情介绍| 欧美日韩国产一二三| 一区二区三区在线视频观看| 成人黄色软件下载| 国产日本一区二区| 国产电影一区二区三区| 久久婷婷国产综合精品青草| 六月婷婷色综合| 日韩一区二区精品| 日韩成人免费在线| 欧美一区二区日韩| 蜜臀久久99精品久久久久久9| 欧美老女人在线| 男女激情视频一区| 日韩一级高清毛片| 美腿丝袜在线亚洲一区| 欧美成人vr18sexvr| 国产一区二区三区最好精华液| 欧美成人官网二区| 国产精品资源站在线| 国产视频视频一区| 成人福利视频在线| 国产精品久久国产精麻豆99网站 | 日韩欧美中文字幕一区| 蜜臀av一区二区在线观看| 欧美sm美女调教| 国产成人在线视频播放| 国产精品久久看| 91福利在线导航| 午夜精品久久一牛影视| 欧美电影免费观看完整版| 国产米奇在线777精品观看| 久久欧美一区二区| 99精品欧美一区二区蜜桃免费 | 悠悠色在线精品| 欧美日本一区二区| 卡一卡二国产精品| 亚洲国产激情av| 色综合色狠狠综合色| 亚洲成人福利片| 日韩一区二区在线观看| 国产成人综合在线| 亚洲精品久久久久久国产精华液| 欧美高清视频不卡网| 国产乱码精品一区二区三区五月婷| 国产精品理伦片| 欧美日韩在线不卡| 国产一区二区成人久久免费影院 | 久久久久久影视| 色婷婷久久综合| 久草在线在线精品观看| 中文字幕欧美区| 欧美日韩一区不卡| 国产电影一区在线| 香港成人在线视频| 亚洲国产成人自拍| 欧美高清视频一二三区 | 日本高清不卡视频| 精品亚洲aⅴ乱码一区二区三区| 国产精品色噜噜| 欧美一级高清大全免费观看| 国产iv一区二区三区| 亚洲1区2区3区4区| 国产精品毛片无遮挡高清| 欧美夫妻性生活| 成人精品免费看| 日本 国产 欧美色综合| 国产精品久久久爽爽爽麻豆色哟哟| 欧美精选一区二区| eeuss鲁一区二区三区| 裸体在线国模精品偷拍| 一区二区三区四区乱视频| 精品第一国产综合精品aⅴ| 在线观看网站黄不卡| 国产成人99久久亚洲综合精品| 亚洲国产成人porn| 国产精品成人免费精品自在线观看| 欧美一级艳片视频免费观看| 91亚洲精品乱码久久久久久蜜桃| 久久99九九99精品| 视频一区视频二区中文|