home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 1.toast / Sample Code / Contributed / SpriteWorld / SpriteWorld Files / Utils / SWGameUtils.h < prev    next >
Encoding:
Text File  |  2000-10-06  |  1.3 KB  |  54 lines  |  [TEXT/CWIE]

  1. ///--------------------------------------------------------------------------------------
  2. //    SWGameUtils.h
  3. //
  4. //    Portions are copyright: © 1991-94 Tony Myles, All rights reserved worldwide.
  5. //
  6. //    Description:    some utility functions for games
  7. ///--------------------------------------------------------------------------------------
  8.  
  9.  
  10. #ifndef __SWGAMEUTILS__
  11. #define __SWGAMEUTILS__
  12.  
  13. #ifndef __QUICKDRAW__
  14. #include <QuickDraw.h>
  15. #endif
  16.  
  17. #ifndef __SOUND__
  18. #include <Sound.h>
  19. #endif
  20.  
  21. #ifdef __cplusplus
  22. extern "C" {
  23. #endif
  24.  
  25.  
  26. void        Randomize( void );
  27. short        GetRandom(short min, short max);
  28. UInt16        GetUnsignedRandom(UInt16 min, UInt16 max);
  29. void        CenterRect(Rect* rectA, Rect* rectB);
  30. void        AlignRect(Rect* rectP);
  31. Boolean        ResourceExists(ResType resourceType, short resID);
  32. void        AllowKeyUpEvents( void );
  33. void        RestoreEventMask( void );
  34.  
  35. RgnHandle    SWHideMenuBar(GrafPtr grafPort);
  36. void         KeepMenuBarHidden(GrafPtr grafPort);
  37. void        SWShowMenuBar(GrafPtr grafPort);
  38.  
  39. short        GetDepthFromGlobalRect( Rect* globalRect );
  40. short        GetDepthFromWindow( WindowPtr theWindow );
  41. short        GetGDeviceDepth( GDHandle theGDH );
  42. void        RestoreSystemPalette( void );
  43. Boolean        HasSystem7( void );
  44.  
  45. void        HideControlStrip(void);
  46. void        RestoreControlStrip(void);
  47.  
  48. #ifdef __cplusplus
  49. }
  50. #endif
  51.  
  52.  
  53. #endif /* __SWGAMEUTILS__ */
  54.