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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? img_pcx.c

?? It is extension program for SDL to display images other than bmp, but all the other formats.
?? C
字號(hào):
/*    SDL_image:  An example image loading library for use with SDL    Copyright (C) 1997-2006 Sam Lantinga    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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA    Sam Lantinga    slouken@libsdl.org*//* * PCX file reader: * Supports: *  1..4 bits/pixel in multiplanar format (1 bit/plane/pixel) *  8 bits/pixel in single-planar format (8 bits/plane/pixel) *  24 bits/pixel in 3-plane format (8 bits/plane/pixel) * * (The <8bpp formats are expanded to 8bpp surfaces) * * Doesn't support: *  single-planar packed-pixel formats other than 8bpp *  4-plane 32bpp format with a fourth "intensity" plane */#include <stdio.h>#include <stdlib.h>#include "SDL_endian.h"#include "SDL_image.h"#ifdef LOAD_PCXstruct PCXheader {	Uint8 Manufacturer;	Uint8 Version;	Uint8 Encoding;	Uint8 BitsPerPixel;	Sint16 Xmin, Ymin, Xmax, Ymax;	Sint16 HDpi, VDpi;	Uint8 Colormap[48];	Uint8 Reserved;	Uint8 NPlanes;	Sint16 BytesPerLine;	Sint16 PaletteInfo;	Sint16 HscreenSize;	Sint16 VscreenSize;	Uint8 Filler[54];};/* See if an image is contained in a data source */int IMG_isPCX(SDL_RWops *src){	int start;	int is_PCX;	const int ZSoft_Manufacturer = 10;	const int PC_Paintbrush_Version = 5;	const int PCX_RunLength_Encoding = 1;	struct PCXheader pcxh;	if ( !src )		return 0;	start = SDL_RWtell(src);	is_PCX = 0;	if ( SDL_RWread(src, &pcxh, sizeof(pcxh), 1) == 1 ) {		if ( (pcxh.Manufacturer == ZSoft_Manufacturer) &&		     (pcxh.Version == PC_Paintbrush_Version) &&		     (pcxh.Encoding == PCX_RunLength_Encoding) ) {			is_PCX = 1;		}	}	SDL_RWseek(src, start, SEEK_SET);	return(is_PCX);}/* Load a PCX type image from an SDL datasource */SDL_Surface *IMG_LoadPCX_RW(SDL_RWops *src){	int start;	struct PCXheader pcxh;	Uint32 Rmask;	Uint32 Gmask;	Uint32 Bmask;	Uint32 Amask;	SDL_Surface *surface = NULL;	int width, height;	int y, bpl;	Uint8 *row, *buf = NULL;	char *error = NULL;	int bits, src_bits;	if ( !src ) {		/* The error message has been set in SDL_RWFromFile */		return NULL;	}	start = SDL_RWtell(src);	if ( ! SDL_RWread(src, &pcxh, sizeof(pcxh), 1) ) {		error = "file truncated";		goto done;	}	pcxh.Xmin = SDL_SwapLE16(pcxh.Xmin);	pcxh.Ymin = SDL_SwapLE16(pcxh.Ymin);	pcxh.Xmax = SDL_SwapLE16(pcxh.Xmax);	pcxh.Ymax = SDL_SwapLE16(pcxh.Ymax);	pcxh.BytesPerLine = SDL_SwapLE16(pcxh.BytesPerLine);	/* Create the surface of the appropriate type */	width = (pcxh.Xmax - pcxh.Xmin) + 1;	height = (pcxh.Ymax - pcxh.Ymin) + 1;	Rmask = Gmask = Bmask = Amask = 0;	src_bits = pcxh.BitsPerPixel * pcxh.NPlanes;	if((pcxh.BitsPerPixel == 1 && pcxh.NPlanes >= 1 && pcxh.NPlanes <= 4)	   || (pcxh.BitsPerPixel == 8 && pcxh.NPlanes == 1)) {		bits = 8;	} else if(pcxh.BitsPerPixel == 8 && pcxh.NPlanes == 3) {		bits = 24;		if ( SDL_BYTEORDER == SDL_LIL_ENDIAN ) {			Rmask = 0x000000FF;			Gmask = 0x0000FF00;			Bmask = 0x00FF0000;		} else {			Rmask = 0xFF0000;			Gmask = 0x00FF00;			Bmask = 0x0000FF;		}	} else {		error = "unsupported PCX format";		goto done;	}	surface = SDL_AllocSurface(SDL_SWSURFACE, width, height,				   bits, Rmask, Gmask, Bmask, Amask);	if ( surface == NULL )		goto done;	bpl = pcxh.NPlanes * pcxh.BytesPerLine;	buf = malloc(bpl);	row = surface->pixels;	for ( y=0; y<surface->h; ++y ) {		/* decode a scan line to a temporary buffer first */		int i, count = 0;		Uint8 ch;		Uint8 *dst = (src_bits == 8) ? row : buf;		for(i = 0; i < bpl; i++) {			if(!count) {				if(!SDL_RWread(src, &ch, 1, 1)) {					error = "file truncated";					goto done;				}				if( (ch & 0xc0) == 0xc0) {					count = ch & 0x3f;					if(!SDL_RWread(src, &ch, 1, 1)) {						error = "file truncated";						goto done;					}				} else					count = 1;			}			dst[i] = ch;			count--;		}		if(src_bits <= 4) {			/* expand planes to 1 byte/pixel */			Uint8 *src = buf;			int plane;			for(plane = 0; plane < pcxh.NPlanes; plane++) {				int i, j, x = 0;				for(i = 0; i < pcxh.BytesPerLine; i++) {					Uint8 byte = *src++;					for(j = 7; j >= 0; j--) {						unsigned bit = (byte >> j) & 1;						/* skip padding bits */						if (i * 8 + j >= width)							continue;						row[x++] |= bit << plane;					}				}			} 		} else if(src_bits == 24) {			/* de-interlace planes */			Uint8 *src = buf;			int plane;			for(plane = 0; plane < pcxh.NPlanes; plane++) {				int x;				dst = row + plane;				for(x = 0; x < width; x++) {					*dst = *src++;					dst += pcxh.NPlanes;				}			}		}		row += surface->pitch;	}	if(bits == 8) {		SDL_Color *colors = surface->format->palette->colors;		int nc = 1 << src_bits;		int i;		surface->format->palette->ncolors = nc;		if(src_bits == 8) {			Uint8 ch;			/* look for a 256-colour palette */			do {				if ( !SDL_RWread(src, &ch, 1, 1)) {					error = "file truncated";					goto done;				}			} while ( ch != 12 );			for(i = 0; i < 256; i++) {				SDL_RWread(src, &colors[i].r, 1, 1);				SDL_RWread(src, &colors[i].g, 1, 1);				SDL_RWread(src, &colors[i].b, 1, 1);			}		} else {			for(i = 0; i < nc; i++) {				colors[i].r = pcxh.Colormap[i * 3];				colors[i].g = pcxh.Colormap[i * 3 + 1];				colors[i].b = pcxh.Colormap[i * 3 + 2];			}		}	}done:	free(buf);	if ( error ) {		SDL_RWseek(src, start, SEEK_SET);		if ( surface ) {			SDL_FreeSurface(surface);			surface = NULL;		}		IMG_SetError(error);	}	return(surface);}#else/* See if an image is contained in a data source */int IMG_isPCX(SDL_RWops *src){	return(0);}/* Load a PCX type image from an SDL datasource */SDL_Surface *IMG_LoadPCX_RW(SDL_RWops *src){	return(NULL);}#endif /* LOAD_PCX */

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品成人免费| 樱花草国产18久久久久| 中文字幕一区二区三区乱码在线| 亚洲精品日日夜夜| 日本色综合中文字幕| 激情六月婷婷久久| 色呦呦网站一区| 久久亚洲二区三区| 亚洲在线视频网站| 国产成人在线观看| 欧美无乱码久久久免费午夜一区 | 国产日本一区二区| 日韩电影免费一区| 99久久伊人精品| 久久一夜天堂av一区二区三区 | 欧美日韩视频在线第一区| 国产日韩v精品一区二区| 亚洲精品视频在线观看免费| 另类小说综合欧美亚洲| 欧美日韩精品福利| 亚洲欧美色综合| 国产一区二区按摩在线观看| 欧美系列亚洲系列| 亚洲色图一区二区三区| 久国产精品韩国三级视频| 在线视频一区二区免费| 专区另类欧美日韩| www.综合网.com| 欧美激情一区在线| 成人精品视频.| 国产精品美女久久久久高潮| 久久成人免费电影| xvideos.蜜桃一区二区| 极品少妇xxxx偷拍精品少妇| 91精品国产一区二区人妖| 亚洲成av人**亚洲成av**| 欧美日韩国产综合草草| 亚洲视频在线一区| 成人黄色免费短视频| 国产日韩三级在线| 成人的网站免费观看| 最新热久久免费视频| 91首页免费视频| 亚洲国产色一区| 欧美一区二区视频免费观看| 日本欧美大码aⅴ在线播放| 日韩欧美美女一区二区三区| 国产一区二区三区黄视频| 久久久久久久久久久99999| 国产成人午夜片在线观看高清观看| 久久久久88色偷偷免费| 成人性生交大片免费看中文网站| 亚洲日本一区二区| 在线观看日韩一区| 毛片av一区二区三区| 国产视频一区在线观看| 99视频一区二区三区| 亚洲国产一区在线观看| 4438x亚洲最大成人网| 激情欧美一区二区三区在线观看| 国产三级一区二区三区| 色婷婷综合久久久中文字幕| 亚洲一区在线免费观看| 日韩女优视频免费观看| 成人国产精品免费观看视频| 亚洲一区二区三区视频在线| 欧美一区二区网站| 成人av资源在线| 日韩av一区二区在线影视| 欧美精品一区二区高清在线观看| 99久久精品国产导航| 天堂蜜桃91精品| 国产精品毛片无遮挡高清| 欧美精品久久99久久在免费线| 久久精品国产99| 尤物在线观看一区| 国产亚洲欧美日韩日本| 欧美午夜精品久久久久久孕妇| 久久国产精品72免费观看| 中文字幕视频一区| 精品国产一区a| 欧美熟乱第一页| 成人综合婷婷国产精品久久免费| 亚洲va在线va天堂| 亚洲欧洲色图综合| 精品国产乱码久久久久久闺蜜 | 日韩一卡二卡三卡国产欧美| 成人性生交大合| 国产在线视频一区二区三区| 一区二区三区日本| 国产精品理论在线观看| 337p粉嫩大胆噜噜噜噜噜91av| 欧美日韩视频不卡| 色综合色狠狠综合色| 国产不卡视频一区二区三区| 青娱乐精品视频| 亚洲最大成人综合| 日韩理论在线观看| 中文字幕va一区二区三区| 精品久久久久99| 91精品国产91久久久久久一区二区| 色综合久久久久| 99久久99久久久精品齐齐| 国产成人午夜视频| 国产精品夜夜嗨| 国产精品主播直播| 国精产品一区一区三区mba桃花| 日韩**一区毛片| 天天综合网天天综合色| 午夜久久久久久久久| 一区二区国产盗摄色噜噜| 综合久久一区二区三区| 中文字幕亚洲成人| 最新高清无码专区| 亚洲精品国产高清久久伦理二区| 中文字幕一区在线观看视频| 国产精品无人区| 中文字幕免费一区| 国产精品美女视频| 成人免费一区二区三区在线观看 | 久久久久国产免费免费| 欧美精品一区二区蜜臀亚洲| 欧美大肚乱孕交hd孕妇| 日韩女优视频免费观看| 精品嫩草影院久久| 国产肉丝袜一区二区| 国产精品你懂的| 亚洲三级理论片| 亚洲激情在线播放| 午夜日韩在线观看| 经典一区二区三区| 99在线精品观看| 欧美日韩国产一级| 日韩免费观看2025年上映的电影| 26uuu另类欧美亚洲曰本| 国产精品久久久久久久久久免费看 | 欧美性生活影院| 欧美精品精品一区| 久久九九影视网| 亚洲欧洲www| 日韩高清不卡一区| 国产尤物一区二区在线| www.欧美日韩| 欧美日韩国产在线观看| 久久亚洲二区三区| 一级精品视频在线观看宜春院 | 亚洲午夜精品网| 美女www一区二区| gogogo免费视频观看亚洲一| 欧美日韩电影在线| 国产日韩欧美精品综合| 亚洲一区免费在线观看| 黄一区二区三区| 91国偷自产一区二区开放时间| 日韩精品在线看片z| 最新国产成人在线观看| 奇米在线7777在线精品| 成人av网站在线观看免费| 欧美欧美欧美欧美首页| 国产精品人成在线观看免费| 日韩中文字幕1| 成人黄色a**站在线观看| 91精品在线观看入口| 欧美激情自拍偷拍| 免费一级片91| 在线免费观看成人短视频| 精品不卡在线视频| 亚洲v中文字幕| 91在线视频观看| 国产三级欧美三级| 麻豆精品国产传媒mv男同| 91美女在线观看| 亚洲国产精品精华液ab| 久久成人18免费观看| 在线观看欧美黄色| 亚洲欧洲性图库| 国产成人av电影在线观看| 日韩一区二区在线观看视频| 亚洲综合色成人| 97精品国产露脸对白| 国产婷婷色一区二区三区| 久久精品噜噜噜成人88aⅴ| 欧美四级电影网| 一区二区三区.www| 91香蕉视频在线| 国产精品乱码一区二区三区软件 | 久久精品综合网| 久久99久久久欧美国产| 91麻豆精品国产91久久久| 亚洲成人你懂的| 欧美日韩一二区| 性做久久久久久久久| 在线这里只有精品| 亚洲另类色综合网站| 91丨porny丨在线| 亚洲三级电影网站| 色综合天天性综合| 亚洲美女区一区| 欧美性生活影院| 婷婷综合五月天|