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

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

?? images.hpp

?? DOS游戲編程中處理Int 13的工具包
?? HPP
字號:
//*************************************************************************
// IMAGES.HPP -Header file for basic graphics operations and PCX          *
//               image decoding in graphics mode 13h                      *
// 								                                     	  *
// Copyright 1991 by the Gamers Programming Workshop, a function of the   *
// GAMERS forum, Compuserve. For more info e-mail 76605,2346.             *
//                                                                        *
// License is granted for use or modification of this code as long as     *
// this notice remains intact, and all improvements are listed in the     *
// version history below, and uploaded to the GAMERS forum. This code     *
// may not be used for any commercial purpose.                            *
//*************************************************************************

//*************************************************************************
// Version history:                                                       *
//                                                                        *
// Version 1.0                                                            *
// Developed: May 2, 1991                                                 *
// Author:    Mark Betz, 76605,2346                                       *
// Last update: July 5, 1991                                              *
//*************************************************************************

// ************************************************************************
// The functions and class structures declared in this header provide some
// basic tools for 256 color mode 13h. Tools are provided for initializing
// a pcx graphic file, unpacking PCX encoded data, setting text and graphics
// modes, loading the dac palette, reading the dac palette, writing a pixel
// reading a pixel, bar fills, and fast line drawing. In addition, the class
// font provides methods for displaying and reading strings in a bitmapped
// font. See images.doc for info on images tools, and font.doc for info on
// using the font class.
// ************************************************************************

// ************************************************************************
// this is the 128 byte header at the front of all PCX files. In 256 color
// mode 0x13 the palette structure is ignored, and the palette can be found
// in the last 768 bytes of the file.
// ************************************************************************

struct pcx_hdr {
	char Mfg;				// manufacturer, always 0xa0
	char Ver;				// encoder version number
	char Enc;				// encoding code, always 1
	char Bpp;				// bits per pixel, 8 in mode 0x13
	int	 Xmin,Ymin;			// image origin, usually 0,0
	int	 Xmax,Ymax;			// image dimensions
	int	 Hres;				// horizontal resolution value
	int	 Vres;				// vertical resolution value
	char Pal[48];			// palette (not in mode 0x13)
	char Reserved;       	// who knows?
	char ClrPlanes;	    	// number of planes, 1 in mode 0x13
	int	 Bpl;				// bytes per line, 80 in mode 0x13
	int	 PalType;			// Grey or Color palette flag
	char Filler[58];		// Zsoft wanted a 128 byte header
};

// **************************************************************************
// p_rec is the primary rgb dac palette structure type
// **************************************************************************

typedef char p_rec[256][3];  	   // basic rgb palette structure type

// **************************************************************************
// this enum is used to specify in several places how the background will be
// treated.
// **************************************************************************

enum opacity {trans,opaque};

// **************************************************************************
// declaration of font class (see font.doc). All methods define in images.cpp
// **************************************************************************

class font {                              // generic font class
	public:
	opacity see_thru;                     // background treatment

	font(char *f_spec);                   // constructor, pass file name
	void setstyle(int f_grnd, int b_grnd,
				  short char_tab, opacity o,
				  char space_wid);
	int getforecolor();                   // get current text color
	int getbackcolor();                   // get current background color
	void show(int x, int y,char *str);    // show a string at x,y
	void readstr(int x, int y,char *str,
				 char length, char mask); // read a string from keyboard
	int installed();	    			  // returns 1 if font installed
	~font();                              // destructor frees font memory

	private:
	struct font_hdr {              // font description structure
		char  font_name[8];        // font name, no file extension
		char  fram_wid;            // width of character frame in pixels
		char  fram_hit;            // height of character frame in pixels
		char  base_ofs;            // baseline y offset from top
		char  ascii_first;         // number of first character defined
		char  ascii_last;          // number of last character defined
		char f_color;              // original font foreground color
	} f_hdr;
	char width[128];               // character width table
	char spacing;                  // pixels between characters
	char far *font_ptr;            // pointer to font in memory
	char far *cursor_mask;         // pointer to cursor mask in memory
	int fore_color;                // holds current text color
	int back_color;                // holds current background color
	int status;                    // non 0 if installation successful

	void put_char(int x, int y,    // display a single character
				  char c);
	char get_width(char c);
};

// *************************************************************************
// The i_stack class was originally envisioned as a pointer stack for the
// use of a window management class that would create cascaded windows by
// allocating pointers to win class objects and pushing them onto the
// pointer stack. A close() method would close the last opened window. For
// now this is on the back burner. If you see a use for the pointer stack
// be aware that I haven't tested it at all. Should work <g>.
// *************************************************************************


class i_stack {
	public:
	i_stack();                     // constructor
	char push_ptr(void far *ptr);  // push a pointer on to stack
	void *pop_ptr();               // pop a pointer from the stack

	private:
	void far *ptr_array[20];       // pointer container
	char ptr_index;                // index to next open element
};

// *************************************************************************
// Class win is a pop up window class. A win object allocates memory for,
// and saves it's own background. So consecutive windows can be opened, and
// each will restore the background as it goes out of scope, or as it is
// deleted(), depending on how it was opened. See WIN.DOC for a brief des-
// cription.
// *************************************************************************

class win {
	public:
	char status;             // 1 if window opened successfully

	win(int tlx, int tly, int xwid, int ywid, char *bmap,
		   char brdrwid, char shdwwid, char bgrnd, char border);

	char installed(){return(status);}   // returns the status value
	~win();

	private:
	char far *backgrnd;      // pointer to background bitmap
	int origX;               // top left x coord of the window
	int origY;               // top left y coord of the window
	int xsize;               // window x dimension in pixels
	int ysize;               // window y dimension in pixels
	char bdrwid;             // border width, 0 if no border
	char shdwid;             // shadow width, 0 if no shadow
	char shdwon;             // 1 if shadow is on, 0 if not
	char b_grnd;             // window background color
	char brdr;               // border color, ignored if bdrwid=0;
};


class image {
	public:
	p_rec palette;                        // holds the default image palette
	char fpath[80];                       // stores the disk path to image
	char getstatus() {return(status);}    // returns status of last op
										  // 1 if successful, 0 if not
	protected:
	char in_ram;                          // 1 if image in ram, 0 if not
	char packed;                          // 1 if packed in ram, 0 if not
	char status;                          // returned by getstatus()
	char far *buffer;                     // pointer for ram buffer if any
};

class pcx : public image {
	public:
	pcx(char *fspec);                     // constructor
	char load(char method);               // load into ram packed or unpacked
	void unload();                        // unload from ram
	char display(char fadetype);          // display image using fadetype
	void remove(char fadetype);           // remove image using fadetype
	~pcx();								  // destructor
	private:
	char unpacktoram(char far *dest,      // internal, unpack to memory
					 unsigned numbytes);

};

// image fade constants ***************************************************

const char SnapWipe = 0;             // simple block copy to vram
const char SplitVerticalWipe = 1;    // fades from top and bottom
const char SplitHorizWipe = 2;       // fades from right and left
const char SlideVerticalWipe = 3;    // slides image in from right and left
const char SlideHorizWipe = 4;       // slides image in from top and bottom
const char VerticalDissolve = 5;     // fades multiple vertical slices
const char HorizDissolve = 6;        // fades multiple horizontal slices
const char SparkleDissolve = 7;      // fades with random pixel placement
const char SoftFade=8;	             // does a palette shifted fade

// error reporting constants **********************************************

const char NoErr = 0;            // no error occured
const char MemErr = 1;           // error occured allocating memory
const char FileReadErr = 2;      // error occured reading a file
const char FileWriteErr = 3;     // error occured writing a file
const char FileMakeErr = 4;      // error occured creating a file
const char FileOpenErr = 5;      // error occured opening file
const char FileFormatErr = 6;    // bad file format error
const char SecondaryErr = 7;     // error occured in subroutine during call
const char UnknownErr = 8;       // an unknown error occured

// For use with type PRec *************************************************

const short Red = 0;               // constants used with type PRec
const short Green = 1;             // example: PRec Palette;
const short Blue = 2;			   //          Palette[0][Green]=63;

// for use with call to pcx::load() ***************************************

const char Packed = 0;             // load image in compressed form
const char Unpacked = 1;           // load image in uncompressed form
const char Bestfit = 2;            // load compressed or uncompressed

// Function prototypes ****************************************************

extern void unpackpcx(FILE *pcx, const char far *source,
					  char far *dest, unsigned int num_bytes);

// **** System level graphics functions ***********************************

extern void setgraphmode();
extern void settextmode();
extern void wait_vbi();
extern void reporterr(char type, char where[30]);

// **** DAC palette functions *********************************************

extern void loadpalette(int start, int number, const p_rec palette);
extern void readpalette(int start, int number, p_rec palette);
extern void clrpalette(int start, int number);
extern void fadepalettein(int start, int count, const p_rec palette);
extern void fadepaletteout(int start, int count);

// **** Graphics segment redirection **************************************

extern void setgraphseg(unsigned newseg);

// **** Drawing primitives ************************************************

extern void clearscr(int color);
extern void barfill(int tlx, int tly, int brx, int bry, int color);
extern void writepixel(int x, int y, int color);
extern char readpixel(int x, int y);
extern void far *xy_to_ptr(int x, int y);
extern void line(int x0, int y0, int x1, int y1, int color);

// **** Image block copying functions *************************************

extern void getimage(int x0, int y0, int x1, int y1, char far *buff);
extern void putimage(int x0, int y0, int x1, int y1, char far *buff);
extern void copyimage(int x0, int y0, int x1, int y1, int putx, int puty,
					  void far *src_buf);

// **** Image fades and dissolve functions ********************************

extern void doSplitVerticalWipe(void far *pic_buf);
extern void doSplitHorizWipe(void far *pic_buf);
extern void doSlideVerticalWipe(void far *pic_buf);
extern void doSlideHorizWipe(void far *pic_buf);
extern void doVerticalDissolve(void far *pic_buf);
extern void doHorizDissolve(void far *pic_buf);
extern void doSparkleDissolve(void far *pic_buf);

// ***********************************************************************



?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人自拍高清视频在线免费播放| 毛片av一区二区| 91在线看国产| 亚洲欧美综合色| 一本色道a无线码一区v| 亚洲综合无码一区二区| 欧美日韩国产综合一区二区三区 | 色哟哟欧美精品| 亚洲综合自拍偷拍| 欧美一区二区私人影院日本| 亚洲免费观看高清在线观看| 久久蜜桃av一区二区天堂 | 欧美激情一区三区| 99精品国产热久久91蜜凸| 亚洲午夜日本在线观看| 欧美精品一级二级| 免费在线欧美视频| 国产清纯美女被跳蛋高潮一区二区久久w| 成人综合在线观看| 夜夜夜精品看看| 日韩精品中文字幕一区二区三区| 国产中文字幕一区| 亚洲欧美日韩综合aⅴ视频| 欧美片网站yy| 国产高清在线观看免费不卡| 日韩毛片高清在线播放| 91精品婷婷国产综合久久性色| 国产精品538一区二区在线| 一卡二卡欧美日韩| 精品国产乱码久久久久久闺蜜| 国产精品毛片大码女人 | 欧美二区在线观看| 国产成人综合自拍| 午夜精品久久久久久久久久| 久久久久久久性| 欧美三区免费完整视频在线观看| 精品一区二区日韩| 亚洲网友自拍偷拍| 国产偷国产偷精品高清尤物 | 午夜精品久久久久久久久久久| 国产三级三级三级精品8ⅰ区| 91高清在线观看| 国模大尺度一区二区三区| 亚洲精品日产精品乱码不卡| 欧美刺激午夜性久久久久久久| 91视频观看免费| 国产片一区二区| 日韩一级片在线播放| 97精品视频在线观看自产线路二| 久久精品国产一区二区| 亚洲综合色区另类av| 欧美韩国日本不卡| 国产高清成人在线| 蜜桃精品视频在线| 亚洲国产日韩精品| 亚洲日本在线观看| 国产欧美久久久精品影院| 91精品国产免费| 欧美日韩黄色一区二区| 色婷婷av一区二区三区软件 | 夜夜精品浪潮av一区二区三区| 久久精品亚洲乱码伦伦中文| 欧美一级免费观看| 欧美日韩亚洲综合一区二区三区| 国产不卡一区视频| 国产一区在线精品| 日韩成人精品在线| 亚洲高清免费一级二级三级| 亚洲精品视频自拍| 国产精品理论片在线观看| 久久久久亚洲蜜桃| 久久久精品2019中文字幕之3| 在线不卡中文字幕播放| 欧美午夜精品理论片a级按摩| 亚洲制服丝袜av| 一区二区高清免费观看影视大全| 日韩理论电影院| 中文字幕一区二区三区蜜月 | 91久久精品一区二区三| 91在线免费播放| 91蜜桃网址入口| 91免费视频观看| 91在线视频18| 欧美日韩国产中文| 91精品国产色综合久久久蜜香臀| 制服丝袜在线91| 国产精品一区二区在线播放| 国产高清亚洲一区| 成人免费高清视频| 一本久久a久久精品亚洲| 日本精品视频一区二区三区| 成人一区二区三区中文字幕| av午夜精品一区二区三区| 色综合久久中文字幕综合网 | 欧美日韩黄色一区二区| 91蜜桃网址入口| 欧亚一区二区三区| 欧美疯狂做受xxxx富婆| 亚洲精品一区二区三区精华液| 久久老女人爱爱| 国产精品国产三级国产a| 亚洲乱码中文字幕综合| 亚洲成av人片一区二区梦乃| 美国欧美日韩国产在线播放| 精品一区二区三区香蕉蜜桃 | 日韩一区二区视频在线观看| 日韩精品在线一区二区| 欧美韩国日本综合| 午夜精品久久久久久不卡8050| 日本中文在线一区| 国产精品影音先锋| 欧美在线你懂得| 精品精品国产高清a毛片牛牛| 中文字幕不卡在线观看| 亚洲一区二区三区四区中文字幕| 91麻豆精品国产无毒不卡在线观看 | 国产一二精品视频| 色婷婷亚洲一区二区三区| 337p亚洲精品色噜噜噜| 中文字幕+乱码+中文字幕一区| 亚洲午夜精品在线| 国产精品一区二区91| 在线观看不卡一区| 久久久久久久久久久久久女国产乱 | 最新欧美精品一区二区三区| 亚洲影院久久精品| 国产麻豆午夜三级精品| 欧美日韩视频第一区| 久久人人爽人人爽| 午夜精品久久久久久久| 成人污污视频在线观看| 911国产精品| 亚洲精品国产视频| 国产乱人伦精品一区二区在线观看| 色哟哟欧美精品| 国产欧美日韩另类一区| 极品少妇xxxx精品少妇偷拍| 日韩电影网1区2区| 色婷婷av一区二区三区gif | 欧美精品一区二区三区高清aⅴ| 亚洲精品视频在线| 麻豆传媒一区二区三区| 欧美视频一区在线| 中文字幕在线不卡| 国产精品一区二区久久精品爱涩| 在线播放国产精品二区一二区四区 | 中文字幕一区二区三区乱码在线 | 久久久国产精品麻豆| 日韩精品免费视频人成| 色婷婷亚洲一区二区三区| 国产精品毛片大码女人| 国产在线不卡一区| 欧美日韩国产一区| 亚洲精品免费在线| 成人av免费观看| 国产精品色呦呦| 国产乱人伦偷精品视频不卡 | 久久免费美女视频| 久久精品久久综合| 欧美一级黄色片| 日本欧美在线观看| 91精品国产综合久久蜜臀| 亚洲福利视频三区| 欧美日产在线观看| 日韩精品免费视频人成| 欧美一区二区三区公司| 日本不卡在线视频| 欧美一级午夜免费电影| 天天操天天色综合| 欧美猛男超大videosgay| 日韩欧美国产一区二区在线播放| 亚洲福利一区二区| 欧美一级生活片| 视频在线观看一区| 欧美高清激情brazzers| 青草av.久久免费一区| 欧美不卡一区二区| 亚洲在线免费播放| 激情综合亚洲精品| 欧美亚洲免费在线一区| 91美女片黄在线观看91美女| 中文欧美字幕免费| 99久久精品国产网站| 亚洲视频你懂的| 91老师片黄在线观看| 67194成人在线观看| 裸体歌舞表演一区二区| 久久精品夜夜夜夜久久| www.欧美精品一二区| 伊人夜夜躁av伊人久久| 欧美精品v日韩精品v韩国精品v| 美女久久久精品| 精品国产99国产精品| 福利一区二区在线观看| 一区二区三区四区国产精品| 欧美一区二区三区四区视频| 国产精品小仙女| 亚洲综合一区二区三区| 精品成人免费观看| 99久久国产综合精品女不卡|