BasicBlocks.cpp 762 B

123456789101112131415161718192021222324252627282930313233
  1. #include "BasicBlocks.h"
  2. BasicBlock::BasicBlock( ItemType *zTool, Framework::Vec3<int> pos, Framework::Textur *t )
  3. : Block( zTool, pos )
  4. {}
  5. DirtBlockType::DirtBlockType()
  6. : BlockType( ID )
  7. {}
  8. void DirtBlockType::loadSuperBlock( Block *zBlock, Framework::StreamReader *zReader )
  9. {
  10. BlockType::loadSuperBlock( zBlock, zReader );
  11. }
  12. Block *DirtBlockType::createBlock( Framework::Vec3<int> position )
  13. {
  14. // TODO: load texture
  15. return new BasicBlock( 0, position, 0 ); // TODO: add efective tool
  16. }
  17. DirtBlockItemType::DirtBlockItemType()
  18. : BasicBlockItemType( ID )
  19. {}
  20. Item *DirtBlockItemType::createItem() const
  21. {
  22. BasicBlockItem *item = new BasicBlockItem( (ItemType *)this, "Dirt" );
  23. return item;
  24. }