home *** CD-ROM | disk | FTP | other *** search
- /***************************************************************************
- * *
- * Header file for use with WANIM.DLL *
- * *
- * Copyright (c) 1991 Louis X. Savain *
- * *
- * AND-XOR Systems *
- * *
- * TAB = 3 *
- * *
- ****************************************************************************/
-
- #ifndef __WANIM__
- #define __WANIM__
-
-
- /************************* TYPE DEFINITIONS ********************************/
-
- typedef HANDLE HAC; /* animation context handle */
- typedef HANDLE HANIMOB; /* animation object handle */
- typedef HANDLE HAZ; /* animation zone handle */
-
-
- /* This typedef defines a callback function. It is used when creating
- algorithmic and combination animobs. */
-
- typedef void (FAR PASCAL *ALGOPROC)(HDC hDC, RECT FAR *lpRect);
-
-
-
- /******************* ANIMATION FUNCTION PROTOTYPES *************************/
-
-
- BOOL FAR PASCAL AnimobAlive(HANIMOB hAnimob);
-
- BOOL FAR PASCAL AnimobCollide(HANIMOB hAnimob1,
- HANIMOB hAnimob2);
-
- BOOL FAR PASCAL AnimobRectCollide(HANIMOB hAnimob, RECT FAR *lpRect);
-
- BOOL FAR PASCAL AttachAnimob(HAZ hAZ, HANIMOB hanimob);
-
- HANIMOB FAR PASCAL CreateAlgoAnimob(int nWidth,
- int nHeight,
- int nPriority,
- ALGOPROC lpProc);
-
- HAC FAR PASCAL CreateAnimContext(HDC hDC,
- int nWidth,
- int nHeight);
-
- HAZ FAR PASCAL CreateAnimZone(HAC hAC,
- HBITMAP hbmZone,
- int x, int y,
- int nClipLeft,
- int nClipTop,
- int nClipWidth,
- int nClipHeight);
-
- HANIMOB FAR PASCAL CreateBitmapAnimob(HBITMAP hbmImage,
- HBITMAP hbmMask,
- int nPriority);
-
- HANIMOB FAR PASCAL CreateCombAnimob(HBITMAP hbmImage,
- HBITMAP hbmMask,
- int nPriority,
- ALGOPROC lpProc);
-
- HBITMAP FAR PASCAL CreateMask(HDC hDC,
- HBITMAP hbmImage,
- COLORREF crTransColor);
-
- HBITMAP FAR PASCAL CreateMaskXY(HDC hDC,
- HBITMAP hbmImage,
- int x,
- int y);
-
- HAZ FAR PASCAL DeriveAnimZone(HDC hDC,
- HAC hAC,
- RECT FAR *lpRect);
-
- BOOL FAR PASCAL DetachAnimob(HANIMOB hAnimob);
-
- void FAR PASCAL DisplayAnimob(HANIMOB hAnimob, int x, int y);
-
- void FAR PASCAL EraseAnimob(HANIMOB hAnimob);
-
- void FAR PASCAL EraseAnimobBitmap(HDC hDC,
- HANIMOB hAnimob,
- int x,
- int y);
-
- void FAR PASCAL FreeAnimob(HANIMOB hAnimob);
-
- void FAR PASCAL FreeAnimobStruct(HANIMOB hAnimob);
-
- void FAR PASCAL FreeAnimContext(HAC hAC);
-
-
- void FAR PASCAL FreeAnimZone(HAZ hAZ);
-
- void FAR PASCAL GetAnimobPos(HANIMOB hAnimob, POINT FAR *lpPoint);
-
- WORD FAR PASCAL GetLastWanimError(void);
-
- void FAR PASCAL ModifyAnimZoneClip(HAZ hAZ,
- int nClipLeft,
- int nClipTop,
- int nClipWidth,
- int nClipHeight);
-
- void FAR PASCAL MoveAlgoAnimate(HANIMOB hAnimob,
- int nWidth,
- int nHeight,
- int nDeltaX,
- int nDeltaY);
-
- void FAR PASCAL MoveAnimate(HANIMOB hAnimob,
- HBITMAP hbmImage,
- HBITMAP hbmMask,
- int nDeltaX,
- int nDeltaY);
-
- void FAR PASCAL MoveAnimob(HANIMOB hAnimob,
- int nDeltaX,
- int nDeltaY);
-
- void FAR PASCAL ModifyAnimZoneLoc(HAZ hAZ, int x, int y);
-
- void FAR PASCAL NewAnimZoneBitmap(HAZ hAZ, HBITMAP hbmZone);
-
- void FAR PASCAL PaintAnimobBitmap(HDC hDC,
- HANIMOB hAnimob,
- int x,
- int y);
-
- void FAR PASCAL PaintAnimZone(HDC hDC, HAZ hAZ);
-
- void FAR PASCAL RefreshAnimZone(HDC hDC, HAZ hAZ);
-
- void FAR PASCAL ResetAnimobPriority(HANIMOB hAnimob,
- int nPriority);
-
- void FAR PASCAL ResetAnimobProc(HANIMOB hAnimob,
- ALGOPROC lpProc);
-
- void FAR PASCAL _export RestoreRect(HDC hDC,
- HAZ hAZ,
- RECT FAR *lpRect);
-
- void FAR PASCAL SetAnimobFrame(HANIMOB hAnimob,
- HBITMAP hbmImage,
- HBITMAP hbmMask);
-
- void FAR PASCAL SetAlgoAnimobSize(HANIMOB hAnimob,
- int nWidth,
- int nHeight);
-
- void FAR PASCAL UpdateAnimZone(HDC hDC, HAZ hAZ);
-
-
-
-
- /******************************* Errors ************************************/
-
-
- enum WanimErrors {
- NO_WANIM_ERROR = 0, /* there was no error during last operation */
- MDC_PAD_ERROR, /* could not create a memory device context for
- internal scratch pad */
- MDC_ZONE_ERROR, /* could not create a memory device context for
- for animation zone */
- MDC_ANIMOB_ERROR, /* could not create a memory device context for
- animobs */
- RGN_PAD_ERROR, /* could not create a rectangular clipping region */
- BMP_TEMP_ERROR, /* could not create a temporary bitmap */
- BMP_PAD_ERROR, /* could not create a bitmap for internal scratch
- pad */
- BMP_ZONE_ERROR, /* could not create a bitmap for animation zone */
- HAC_ALLOC_ERROR, /* could not allocate memory for animation context */
- HAZ_ALLOC_ERROR, /* could not allocate memory for animation zone */
- HANIMOB_ALLOC_ERROR, /* could not allocate memory for animob */
- PARENT_EXISTS_ERROR, /* attempt to attach a non-orphan animob */
- LOST_CHILD_ERROR, /* child animob not assigned to a parent zone */
- ORPHAN_ERROR, /* child animob already an orphan. Cannot detach */
- ZONE_FULL_ERROR, /* no more animob can be attached to this object */
- MDC_MASK_ERROR, /* could not create a memory device context for mask */
- BMP_MASK_ERROR /* could not create a memory bitmap for mask */
- };
-
- #endif
-