home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / C / Games / SpriteFight 2002 v2.0a1 / SpriteWorldUtils.h < prev    next >
Encoding:
Text File  |  1994-04-25  |  3.4 KB  |  177 lines  |  [TEXT/KAHL]

  1. ///--------------------------------------------------------------------------------------
  2. //    SpriteWorldUtils.h
  3. //
  4. //    Created:    Monday, January 18, 1993 at 8:57:36 PM
  5. //    By:        Tony Myles
  6. //
  7. //    Copyright: © 1993-94 Tony Myles, All rights reserved worldwide.
  8. //
  9. //    Description:    constants, structures, and prototypes for sprite utilities
  10. ///--------------------------------------------------------------------------------------
  11.  
  12.  
  13. #ifndef __SPRITEWORLDUTILS__
  14. #define __SPRITEWORLDUTILS__
  15.  
  16. #ifndef __SWCOMMON__
  17. #include "SWCommonHeaders.h"
  18. #endif
  19.  
  20. #ifndef __QUICKDRAW__
  21. #include <QuickDraw.h>
  22. #endif
  23.  
  24. #ifndef __QDOFFSCREEN__
  25. #include <QDOffscreen.h>
  26. #endif
  27.  
  28. #ifndef __SPRITEWORLD__
  29. #include "SpriteWorld.h"
  30. #endif
  31.  
  32. #ifndef __SPRITELAYER__
  33. #include "SpriteLayer.h"
  34. #endif
  35.  
  36. #ifndef __SPRITE__
  37. #include "Sprite.h"
  38. #endif
  39.  
  40. #ifndef __FRAME__
  41. #include "Frame.h"
  42. #endif
  43.  
  44.  
  45. enum
  46. {
  47.     kColorIconResType = 'cicn'
  48. };
  49.  
  50.  
  51. ///--------------------------------------------------------------------------------------
  52. //    sprite utilities function prototypes
  53. ///--------------------------------------------------------------------------------------
  54.  
  55. #ifdef __cplusplus
  56. extern "C" {
  57. #endif
  58.  
  59. SW_FUNC OSErr SWCreateBestCGrafPort(
  60.     CGrafPtr *newCGrafPort,
  61.     Rect *offScreenRect);
  62.  
  63. SW_FUNC OSErr SWCreateCGrafPort(
  64.     CGrafPtr *newCGrafPort,
  65.     Rect *bounds,
  66.     short depth,
  67.     CTabHandle colors,
  68.     GDHandle useGDevice);
  69.  
  70. SW_FUNC OSErr SWCreateCGrafPortFromCIconMask(
  71.     CGrafPtr *newCGrafPort,
  72.     CIconHandle cIconH);
  73.  
  74. SW_FUNC OSErr SWCreateCGrafPortFromPictResource(
  75.     CGrafPtr *newCGrafPort,
  76.     short pictResID);
  77.  
  78. SW_FUNC OSErr SWCreateCGrafPortFromPict(
  79.     CGrafPtr *newCGrafPort,
  80.     PicHandle srcPictH);
  81.  
  82. SW_FUNC OSErr SWSetUpPixMap(
  83.     PixMapHandle aPixMap,
  84.     short depth,
  85.     Rect *bounds,
  86.     CTabHandle colors,
  87.     short bytesPerRow);
  88.  
  89. SW_FUNC OSErr SWCreateGDevice(
  90.     GDHandle *retGDevice,
  91.     PixMapHandle basePixMap);
  92.  
  93. SW_FUNC void SWDisposeCGrafPort(
  94.     CGrafPtr doomedPort);
  95.  
  96. SW_FUNC OSErr SWCreateGrafPort(
  97.     GrafPtr *newPort,
  98.     Rect *newPortRect);
  99.  
  100. SW_FUNC OSErr SWCreateGrafPortFromPict(
  101.     GrafPtr *offScrnPort,
  102.     PicHandle srcPictH);
  103.  
  104. SW_FUNC OSErr SWCreateGrafPortFromPictResource(
  105.     GrafPtr *offScrnPort,
  106.     short pictResID);
  107.  
  108. SW_FUNC OSErr SWCreateGrafPortFromCIconMask(
  109.     GrafPtr *newGrafPort,
  110.     CIconHandle cIconH);
  111.  
  112. SW_FUNC void SWDisposeGrafPort(
  113.     GrafPtr doomedPort);
  114.  
  115. SW_FUNC OSErr SWCreateRegionFromCIconMask(
  116.     RgnHandle *maskRgn,
  117.     CIconHandle cIconH);
  118.  
  119. SW_FUNC OSErr SWCreateRegionFromPict(
  120.     RgnHandle *pictRgnH,
  121.     PicHandle srcPictH);
  122.  
  123. SW_FUNC OSErr SWCreateRegionFromPictResource(
  124.     RgnHandle *pictRgnH,
  125.     short pictResID);
  126.  
  127. SW_FUNC OSErr SWGetCIcon(
  128.     CIconHandle* cIconH,
  129.     short iconResID);
  130.  
  131. SW_FUNC OSErr SWPlotCIcon(
  132.     CIconHandle cIconH,
  133.     Rect* iconRect);
  134.  
  135. SW_FUNC void SWDisposeCIcon(
  136.     CIconHandle cIconH);
  137.  
  138. SW_FUNC OSErr SWCreateOptimumGWorld(
  139.     GWorldPtr *optGWorld,
  140.     Rect *devRect);
  141.  
  142. SW_FUNC OSErr SWCreateGWorldFromPictResource(
  143.     GWorldPtr *pictGWorldP,
  144.     short pictResID);
  145.  
  146. SW_FUNC OSErr SWCreateGWorldFromPict(
  147.     GWorldPtr *pictGWorld,
  148.     PicHandle srcPictH);
  149.  
  150. SW_FUNC OSErr SWCreateGWorldFromCIconResource(
  151.     GWorldPtr *iconGWorldP,
  152.     short iconResID);
  153.  
  154. SW_FUNC OSErr SWCreateGWorldFromCIcon(
  155.     GWorldPtr *iconGWorldP,
  156.     CIconHandle cIconH);
  157.  
  158. SW_FUNC OSErr SWCreateGWorldFromCIconMask(
  159.     GWorldPtr *maskGWorldP,
  160.     CIconHandle cIconH);
  161.  
  162. SW_FUNC Boolean SWHasColorQuickDraw(void);
  163.  
  164. SW_FUNC Boolean SWHasGWorlds(void);
  165.  
  166. #ifndef BitMapToRegionGlue
  167. //pascal OSErr BitMapToRegionGlue(RgnHandle rgn, BitMap* bits);
  168. #endif
  169.  
  170. #ifdef __cplusplus
  171. };
  172. #endif
  173.  
  174.  
  175. #endif /* __SPRITEWORLDUTILS__ */
  176.  
  177.