home *** CD-ROM | disk | FTP | other *** search
/ NEXT Generation 27 / NEXT27.iso / pc / demos / emperor / dx3.exe / SDK / SAMPLES / IKLOWNS / CGUPDATE.H < prev    next >
C/C++ Source or Header  |  1996-08-28  |  2KB  |  60 lines

  1. /*===========================================================================*\
  2. |
  3. |  File:        cgupdate.h
  4. |
  5. |  Description: 
  6. |       
  7. |-----------------------------------------------------------------------------
  8. |
  9. |  Copyright (C) 1995-1996 Microsoft Corporation.  All Rights Reserved.
  10. |
  11. |  Written by Moss Bay Engineering, Inc. under contract to Microsoft Corporation
  12. |
  13. \*===========================================================================*/
  14.  
  15. /**************************************************************************
  16.  
  17.     (C) Copyright 1995-1996 Microsoft Corp.  All rights reserved.
  18.  
  19.     You have a royalty-free right to use, modify, reproduce and 
  20.     distribute the Sample Files (and/or any modified version) in 
  21.     any way you find useful, provided that you agree that 
  22.     Microsoft has no warranty obligations or liability for any 
  23.     Sample Application Files which are modified. 
  24.  
  25.     we do not recomend you base your game on IKlowns, start with one of
  26.     the other simpler sample apps in the GDK
  27.  
  28.  **************************************************************************/
  29.  
  30. #ifndef CGUPDATE_H
  31. #define CGUPDATE_H
  32.  
  33. #include <linklist.h>
  34.  
  35. // NOTE: all update rectangles are inclusive; both coordinates in the
  36. // RECT are included in the update
  37. class CGameUpdateList
  38. {
  39. public:
  40.     CGameUpdateList();
  41.     virtual ~CGameUpdateList();
  42.  
  43.     virtual void AddRect( RECT Rect );      // add to update list
  44.     virtual BOOL Intersect( RECT Rect );        // find out if rectangle intersects us...
  45.     virtual void Clear() {                      // remove all rectangles
  46.         mRect.top = mRect.bottom = mRect.left = mRect.right = 0;
  47.         mDirty = FALSE;
  48.     };                      
  49.     virtual LPRECT GetDirtyRect()
  50.     {
  51.         return &mRect;
  52.     }
  53.  
  54. protected:
  55.     RECT    mRect;
  56.     BOOL    mDirty;
  57. };
  58.  
  59. #endif // CGUPDATE_H
  60.