home *** CD-ROM | disk | FTP | other *** search
- /*
-
- QuickQD.h
-
- Quick QuickDraw Routines for accelerated graphics
-
- Written by Hubert Figuière
- ©Copyright 1995, Hubert Figuière, All right reserved.
-
- April 26th, 1995
-
-
- Modified :
- -6Sept95
-
- Public Distrbution 1.0
-
- */
-
- #include <QuickDraw.h>
-
-
- /**********************************************************************/
- /* these are macro for inline inclusion... very small size and speedy */
- /* */
- /* */
-
- /* Math macros */
-
- /* 5/07/95
- absolute value
- WARNING : do not put Function as argument...
- */
- #define QuickAbs(x) ((x)<0 ? -(x))
-
- /* 4/26/95
- compare 2 Points... very speedy
- */
- #define QuickEqualPt(pt1, pt2) (*(long*)&pt1 == *(long*)&pt2)
-
- /* 4/26/95
- from a Point, make a Point...
- */
- #define QuickCopyPt(dst, src) (*(long*)&dst = *(long*)&src)
-
- /* 4/26/95
- from 2 shorts make a Point...
- */
- #define QuickSetPt(pt1, ph, pv) pt1.v = pv; pt1.h = ph;
-
- /*
- from a long make a Point
- */
- #define QuickMakePt(x) (*(Point *)&x)
-
-
- /***
- Word operations
- 6Sept95
- ***/
- /*
- Retrieve the Highest word from a long word
- */
- #define QuickHiWord(x) ((unsigned long)(x) >> 16)
-
- /*
- Retrieve the Lowest word from a long word
- */
- #define QuickLoWord(x) ((unsigned long)(x) & 0xFFFF)
-
- /* */
- /**********************************************************************/
-