ATTRIB.H 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. ////////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright 2016 RWS Inc, All Rights Reserved
  4. //
  5. // This program is free software; you can redistribute it and/or modify
  6. // it under the terms of version 2 of the GNU General Public License as published by
  7. // the Free Software Foundation
  8. //
  9. // This program is distributed in the hope that it will be useful,
  10. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. // GNU General Public License for more details.
  13. //
  14. // You should have received a copy of the GNU General Public License along
  15. // with this program; if not, write to the Free Software Foundation, Inc.,
  16. // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  17. //
  18. //*****************************************************************************
  19. //
  20. // ATTRIB.H
  21. //
  22. //*****************************************************************************
  23. #ifndef attrib_h
  24. #define attrib_h
  25. #define ATTRIBUTE_MASK 0xffc0
  26. #define CONTOUR_MASK 0x006f
  27. typedef struct tag_CONTOUR
  28. {
  29. WORD block[16];
  30. } CONTOUR;
  31. typedef struct tag_ATTRIB
  32. {
  33. short s;
  34. } ATTRIB;
  35. class CAttribute
  36. {
  37. protected:
  38. WORD* m_pAttribMap; //Pointer to attribute map
  39. CONTOUR* m_pAttribCont;
  40. short m_sMapWidth;
  41. public:
  42. CAttribute();
  43. ~CAttribute();
  44. void Reset();
  45. void FromBlock();
  46. void ToBlock();
  47. void PutBlock();
  48. void GetReward();
  49. BOOL GetPointAttrib(short sX, short sY, WORD* wAttribute);
  50. short GetPointSurface(short sX, short sY);
  51. };
  52. #endif //attrib_h
  53. //*****************************************************************************
  54. // EOF
  55. //*****************************************************************************