MineBrush.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. #ifndef MINEBRUSH_H
  2. #define MINEBRUSH_H
  3. /*************************************************************************************************\
  4. MineBrush.h : Interface for the MineBrush component.
  5. //---------------------------------------------------------------------------//
  6. // Copyright (C) Microsoft Corporation. All rights reserved. //
  7. //===========================================================================//
  8. \*************************************************************************************************/
  9. #ifndef BRUSH_H
  10. #include "Brush.h"
  11. #endif
  12. #include "Action.h"
  13. #include "EditorObjects.h"
  14. //*************************************************************************************************
  15. /**************************************************************************************************
  16. CLASS DESCRIPTION
  17. MineBrush:
  18. **************************************************************************************************/
  19. class MineBrush: public Brush
  20. {
  21. public:
  22. MineBrush(){ pAction = NULL; }
  23. virtual ~MineBrush(){}
  24. virtual bool beginPaint();
  25. virtual Action* endPaint();
  26. virtual bool paint( Stuff::Vector3D& worldPos, int screenX, int screenY );
  27. virtual bool canPaint( Stuff::Vector3D& worldPos, int screenX, int screenY, int flags );
  28. virtual bool canPaintSelection( );
  29. virtual Action* applyToSelection();
  30. private:
  31. class MineAction : public Action
  32. {
  33. public:
  34. virtual ~MineAction(){}
  35. virtual bool redo();
  36. virtual bool undo();
  37. struct CTileMineInfo {
  38. int row;
  39. int column;
  40. unsigned long mineState;
  41. };
  42. typedef EList< CTileMineInfo, const CTileMineInfo&> MINE_INFO_LIST;
  43. MINE_INFO_LIST mineInfoList;
  44. void AddChangedTileMineInfo( CTileMineInfo& info );
  45. };
  46. MineAction* pAction;
  47. };
  48. //*************************************************************************************************
  49. #endif // end of file ( MineBrush.h )