Advertisement
Guest User

AnvilChunk.hpp

a guest
Apr 13th, 2012
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.88 KB | None | 0 0
  1. #pragma once
  2. #ifndef ANVILCHUNK_HPP
  3. #define ANVILCHUNK_HPP
  4.  
  5. #include "Chunk.hpp"
  6.  
  7. class Section
  8. {
  9. public:
  10.     int y;
  11.  
  12.     BYTE* blocks;
  13.     BYTE* blockData;
  14.     BYTE* skyLight;
  15.     BYTE* blockLight;
  16.  
  17.     Section();
  18.     ~Section();
  19. };
  20.  
  21. class AnvilChunk : public Chunk
  22. {
  23. public:
  24.     AnvilChunk();
  25.     ~AnvilChunk();
  26.  
  27.     BYTE ReadBlock(int x, int z, int y);
  28.     BYTE ReadBlockData(int x, int z, int y);
  29.     BYTE ReadBlockLight(int x, int z, int y);
  30.     virtual int GetHeight(int x, int y, int z = MAPZ, int minZ = 0);
  31.     virtual Color GetColor(int x, int y, int z, bool side = false);
  32.  
  33.  
  34. protected:
  35.     Section** sections;
  36.     int* anvilHeightMap;
  37.  
  38.     virtual void Allocate();
  39.     virtual void Deallocate();
  40.     virtual bool ParseNBT(void*);
  41.  
  42.     virtual void PassExclude(int & x, int & y, int & z, Color & color);
  43.     virtual void PassNight(int & x, int & y, int & z, Color & color);
  44. };
  45.  
  46. #endif // ANVILCHUNK_HPP
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement