/* *********** Copyright 1989-1991 by Vermont Creative Software *********** vv_exp.h Header file of symbols for window animation (explosions, etc.) */ /*----------------------------------------------------------------------------*/ /* The animation code uses integer math for speed. Since division is a */ /* required operation, it is necessary to scale all numbers to maintain */ /* accuracy. The following symbols determine the magnitude of the scaling */ /*----------------------------------------------------------------------------*/ #define SCALE 256 /* scaler for division accuracy */ #define SCALED2 128 /* one half of above */ /*----------------------------------------------------------------------------*/ /* internal box structure */ /*----------------------------------------------------------------------------*/ typedef struct { short rb; short re; short cb; short ce; } BOX; /*----------------------------------------------------------------------------*/ /* common variables structure */ /* these elements are initialized by function _wn_expprime() */ /*----------------------------------------------------------------------------*/ typedef struct { UCHAR FAR *dstp; /* destination pointer */ short border; /* border flag */ short noborder; /* inverse of above */ USHORT rbx; /* scaled origin coordinates */ USHORT rex; /* these must be unsigned because */ USHORT cbx; /* scaling could cause overflow using */ USHORT cex; /* signed values */ short stepupx; /* scaled growth factors */ short stepdnx; short steprtx; short steplfx; UCHAR wnatt; /* window attribue */ UCHAR scratt; /* screen clear attribute */ } X; /*----------------------------------------------------------------------------*/ /* quad array indices */ /*----------------------------------------------------------------------------*/ #define QTOP 0 #define QLFT 1 #define QRGT 2 #define QBOT 3 /*----------------------------------------------------------------------------*/ /* Internal Quad structure shared with assembly code */ /* If this structure changes, the corresponding structure in _expstep.inc */ /* must also change. */ /*----------------------------------------------------------------------------*/ typedef struct { UCHAR FAR *srcp; /* source pointer */ short nb; /* number of bytes = nc * 2 */ UCHAR FAR *dstp; /* destination pointer */ short nr; /* number of rows */ short nc; /* number of columns */ short rb; short re; short cb; short ce; short dummy; /* dummy member for alignment */ } QUAD; /*----------------------------------------------------------------------------*/ /* Parameter List structure shared with assembly code */ /* If this structure changes, the corresponding structure in _expstep.inc */ /* must also change. */ /*----------------------------------------------------------------------------*/ typedef struct { QUAD quads[4]; /* rectangles */ UCHAR FAR *bdr_dstp; /* pointer to where UL corner of */ /* border will be drawn */ short vsecho; /* window's vsecho flag */ UCHAR FAR *spacep; /* pointer to blank video string */ short srcnbpr; /* source buffer byte width */ short dstnbpr; /* video buffer byte width */ short port; /* video board status port */ short nir; /* number of inside rows */ short nor; /* number of outside rows */ short nic; /* number of inside columns */ short noc; /* number of outside columns */ short nob; /* number of outside bytes */ UCHAR ul; /* upper left corner character */ UCHAR ur; /* upper right corner character */ UCHAR ll; /* lower left corner character */ UCHAR lr; /* lower right corner character */ UCHAR top; /* top line character */ UCHAR bottom; /* bottom line character */ UCHAR right; /* right line character */ UCHAR left; /* left line character */ UCHAR bdratt; /* border attribute */ UCHAR srcatt; /* buffer/fill attribute */ UCHAR vmask; /* vertical retrace bit */ UCHAR vpolar; /* -1 = retracing, 0 = drawing screen */ } PLIST; /*----------------------------------------------------------------------------*/ /* internal prototypes */ /*----------------------------------------------------------------------------*/ #ifdef LINT_ARGS PROTOTYPE short FASTCALL _wn_expprime(WINDOWPTR, X *, PLIST *); PROTOTYPE void CDECL _expstep(PLIST *); PROTOTYPE void FASTCALL _rollstep(PLIST *); #else extern short FASTCALL _wn_expprime(); extern void CDECL _expstep(); extern void FASTCALL _rollstep(); #endif