⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 blit_5.c

📁 nucleus 文件系统,内核和彩色图形系统,在小系统上非常好用
💻 C
字号:
/*************************************************************************/
/*                                                                       */
/*         Copyright (c) 1997 - 1999 Accelerated Technology, Inc.        */
/*                                                                       */
/* PROPRIETARY RIGHTS of Accelerated Technology are involved in the      */
/* subject matter of this material.  All manufacturing, reproduction,    */
/* use, and sales rights pertaining to this subject matter are governed  */
/* by the license agreement.  The recipient of this software implicitly  */
/* accepts the terms of the license.                                     */
/*                                                                       */
/*************************************************************************/

/*************************************************************************/
/*                                                                       */
/* FILE NAME                                            VERSION          */
/*                                                                       */
/*      blit_5.c                                         1.9             */
/*                                                                       */
/* COMPONENT                                                             */
/*                                                                       */
/*      All                                                              */
/*                                                                       */
/* DESCRIPTION                                                           */
/*                                                                       */
/*      This file contains blit specific data structures.                */
/*                                                                       */
/* AUTHOR                                                                */
/*                                                                       */
/*      Robert G. Burrill, Accelerated Technology, Inc.                  */
/*                                                                       */
/* DATA STRUCTURES                                                       */
/*                                                                       */
/*      None                                                             */
/*                                                                       */
/* FUNCTIONS                                                             */
/*                                                                       */
/*      None                                                             */
/*                                                                       */
/* DEPENDENCIES                                                          */
/*                                                                       */
/*		None                                                             */
/*                                                                       */
/* HISTORY                                                               */
/*                                                                       */
/*		   NAME            DATE                    REMARKS               */
/*                                                                       */
/*                                                                       */
/*************************************************************************/

#include "meta_wnd.h"
#include "metconst.h"    /* MetaWINDOW Constant & Stucture Definitions */
#include "metports.h"    /* MetaWINDOW Port & Bitmap Definitions */
#include "metaproc.h"
#include "grafdata.h"
#include "blit_5.h"

rect clpRect;			/* Clip rect */
rect srcRect;			/* source rectangle */
rect dstRect;			/* destination rectangle */
int imagRowWords;		/* (rowBytes+1)/2 */
int srcY;
int srcNextRow;			/* inc from end of row to start of next */
int srcPixBytes;		/* # bytes across source bitmap */
image *srcImag;			/* pointer to source image */
void (*jmpOff)(void);	/* offset to internal optimization procedure */
int srcOff;				/* source increment offset 0(even)/1(odd) */
grafMap *srcBmap;		/* ptr to src bitmap */
int srcBgnByte;			/* Source byte begin */
char maskFirst,maskLast; /* masks for first & last bytes on scan lines, */
char ropALU;			/*  gDataRot field for current raster op */
char readLast;			/*  1 if source byte needs to be read before
							writing last dest byte */
char loadTwo;			/*  1 if 2 source bytes must be read before
							writing first dest byte */
char fullRopALU;		/*  ropALU with shift field also set */
char flagTToB;			/*  bit 0 set for top->bottom bits, reset
							otherwise; bit 1 set for left->right
							blits, reset otherwise */
int shfCnt;				/* shift count (-=shfRt, +=shfLf) */
int flipMask;			/* 0xffff for NOT SOURCE rops, 0 else */
int shiftMask;			/* mask used to mix adjacent source bytes
						before ORing together writing rotated to dest */
int srcWidthBase;		/* source bitmap width */
int srcWidth,dstWidth;	/* temp storage for +/- source/dest bitmap widths */
int middleWidth;		/* # of solid bytes per row */
int middleSrcAdvance;	/* # of bytes from end of one middle */
int middleDstAdvance;	/*  row blit to start of next row */
int firstOffset;		/* 1 for left->right copies, -1 for
							right->left copies */
int lastOffset;			/* middleWidth + 1 for left->right copies.
							 -middleWidth - 1 for right->left */
int srcBlockAdvance;	/* distance to the start of the next source
							block of rows */
int dstBlockAdvance;	/* distance to the start of the next dest
							block of rows */
char drawFirstByte;		/* 1 if first byte on line != 0xff, 0 if it is */
char drawLastByte;		/* 1 if last byte on line != 0xff, 0 if it is */
char RNMOddByte;		/* 1 if width is odd in RNM3, 0 if width is even */
char copyLeftToRight;	/* 1 if copy goes left->right, 0 for right->left */
int oldMask,newMask;	/* masks used by RNM3 */
int RNMInlineEntry;		/* vector used by RNM3 */
int RNMPushEntry;		/* vector used by RNM3 */
int RNMExitVector;		/* vector used by RNM3 */
int RNMLoopVector;		/* vector used by RNM3 */
long *rowTablePtr[4];	/* pointers to row table entries */
int rowTableSkip;		/* used to move forward or backward through
							row tables */
int RNMNarrowVecto;		/* for narrow solid middle bytes, the entry
							point in the narrow handler in-line code,
							otherwise just a continuation vector */
byte *stackBuffer;		/* pointer to temporary buffer for one-bank blits */
int baseBankComboVector; /* copy of bankComboVector for multiplane use */
char multiplaneFlag;	/* 1 if multiplane copy in progress, 0 if single */
char isImage;			/* 1 if image copy in process, 0 if blit */
int lclBlitRop;			/* local copy of blitRop */
int lclPixPlanes;		/* # of planes to process */
long *temp1,*temp2;		/* general temporary storage */
long fullPnColr,fullBkColr; /* 32-bit fg/bg */
long tempPnColr,tempBkColr; /* working 32-bit fg/bg */
int initialSourceY;		/* starting src row for N->N blits */
int initialDestY;		/* starting dest row for 1->N and N->N blits */
int replaceVector;		/* aligned/non-aligned replace vector in
							1->N blits */
byte *dstPtr;			/* pointer to dest mem for planar->E/VGA */
byte *srcPtr;			/* pointer to src mem for planar->E/VGA */
word *dstPtr16;			/* pointer to dest 16-bit mem */
word *srcPtr16;			/* pointer to src 16-bit mem */
byte lclPenColor;		/* local pen color for line */
word lclPenColor16;		/* local pen color for line */
byte lclPenColorR;		/* local red pen color for line */
byte lclPenColorG;		/* local green pen color for line */
byte lclPenColorB;		/* local blue pen color for line */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -