summaryrefslogtreecommitdiff
path: root/WorldSegment.h
diff options
context:
space:
mode:
authorJapa2010-04-09 14:12:29 +0000
committerJapa2010-04-09 14:12:29 +0000
commit81aefc8e03ff3f647494012e18bcdc8f33f4de42 (patch)
tree4b825dc642cb6eb9a060e54bf8d69288fbee4904 /WorldSegment.h
parentc3d0b7d6778af46299901d959d589d6599afa21c (diff)
downloadstonesense-81aefc8e03ff3f647494012e18bcdc8f33f4de42.tar.gz
stonesense-81aefc8e03ff3f647494012e18bcdc8f33f4de42.tar.bz2
stonesense-81aefc8e03ff3f647494012e18bcdc8f33f4de42.tar.xz
There is no trunk
it is not the code that compiles, it is you.
Diffstat (limited to 'WorldSegment.h')
-rw-r--r--WorldSegment.h54
1 files changed, 0 insertions, 54 deletions
diff --git a/WorldSegment.h b/WorldSegment.h
deleted file mode 100644
index 4ecb409..0000000
--- a/WorldSegment.h
+++ /dev/null
@@ -1,54 +0,0 @@
-#pragma once
-
-#include "Block.h"
-
-class WorldSegment{
-private:
- vector<Block*> blocks;
-public:
- int x, y, z;
- int sizex, sizey, sizez;
- Crd3D regionSize;
- Block** blocksAsPointerVolume;
- BITMAP* level;
-
- WorldSegment(int x, int y, int z, int sizex, int sizey, int sizez){
- this->x = x;
- this->y = y;
- this->z = z - sizez + 1;
- this->sizex = sizex; this->sizey = sizey; this->sizez = sizez;
- level = NULL;
-
- regionSize.x = regionSize.y = regionSize.z = 0;
-
- uint32_t memoryNeeded = sizex * sizey * sizez * sizeof(Block*);
- blocksAsPointerVolume = (Block**) malloc( memoryNeeded );
- memset(blocksAsPointerVolume, 0, memoryNeeded);
- }
-
- ~WorldSegment(){
- uint32_t num = (uint32_t)blocks.size();
- for(uint32_t i = 0; i < num; i++){
- delete(blocks[i]);
- }
- blocks.clear();
- if (level)
- destroy_bitmap(level);
- }
-
- void Dispose(void){
- free(blocksAsPointerVolume);
- }
-
- uint32_t getNumBlocks(){
- return (uint32_t)blocks.size();
- }
-
- Block* getBlock(int32_t x, int32_t y, int32_t z);
- Block* getBlockLocal(uint32_t x, uint32_t y, uint32_t z);
- Block* getBlockRelativeTo(uint32_t x, uint32_t y, uint32_t z, dirRelative direction);
- Block* getBlock(uint32_t index);
- void addBlock(Block* b);
- void drawAllBlocks(BITMAP* target);
- bool CoordinateInsideSegment(uint32_t x, uint32_t y, uint32_t z);
-}; \ No newline at end of file