BasicBlocks.h 917 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #pragma once
  2. #include <Textur.h>
  3. #include "Block.h"
  4. #include "BlockType.h"
  5. #include "Item.h"
  6. class BlockType;
  7. class ItemType;
  8. class DirtBlockType;
  9. class DirtBlockItemType;
  10. class BasicBlock : public Block
  11. {
  12. public:
  13. BasicBlock( ItemType *zTool, Framework::Vec3<int> pos, Framework::Textur *t );
  14. friend DirtBlockType;
  15. };
  16. class DirtBlockType : public BlockType
  17. {
  18. REGISTRABLE( DirtBlockType )
  19. protected:
  20. virtual void loadSuperBlock( Block *zBlock, Framework::StreamReader *zReader ) override;
  21. virtual Block *createBlock( Framework::Vec3<int> position ) override;
  22. DirtBlockType();
  23. };
  24. REGISTER( DirtBlockType, BlockType )
  25. class DirtBlockItemType : public BasicBlockItemType
  26. {
  27. REGISTRABLE( DirtBlockItemType )
  28. protected:
  29. DirtBlockItemType();
  30. public:
  31. virtual Item *createItem() const override;
  32. };
  33. REGISTER( DirtBlockItemType, ItemType )