diff options
| author | Japa | 2011-02-19 19:11:19 +0000 |
|---|---|---|
| committer | Japa | 2011-02-19 19:11:19 +0000 |
| commit | f1cd36716229dd3f0795824197b14dcd0d979540 (patch) | |
| tree | a9391276cc5f0c569fe531996964a6cb57d2263e /WorldSegment.h | |
| parent | d8523cd32f9aea85ce0ef0c6fb12c8562922dad2 (diff) | |
| parent | c2f73a1f356890e8ed6ada37a4613ce4836d4712 (diff) | |
| download | stonesense-f1cd36716229dd3f0795824197b14dcd0d979540.tar.gz stonesense-f1cd36716229dd3f0795824197b14dcd0d979540.tar.bz2 stonesense-f1cd36716229dd3f0795824197b14dcd0d979540.tar.xz | |
merged in the multithreaded branch.
Diffstat (limited to 'WorldSegment.h')
| -rw-r--r-- | WorldSegment.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/WorldSegment.h b/WorldSegment.h index 1a46a8a..c7e8ffe 100644 --- a/WorldSegment.h +++ b/WorldSegment.h @@ -6,8 +6,11 @@ class WorldSegment{ private:
vector<Block*> blocks;
public:
+ ALLEGRO_MUTEX * mutie;
+ bool loaded;
int x, y, z;
int sizex, sizey, sizez;
+ unsigned char rotation;
Crd3D regionSize;
Block** blocksAsPointerVolume;
WorldSegment(int x, int y, int z, int sizex, int sizey, int sizez)
@@ -24,6 +27,7 @@ public: uint32_t memoryNeeded = sizex * sizey * sizez * sizeof(Block*);
blocksAsPointerVolume = (Block**) malloc( memoryNeeded );
memset(blocksAsPointerVolume, 0, memoryNeeded);
+ mutie = al_create_mutex();
}
~WorldSegment(){
@@ -36,6 +40,7 @@ public: void Dispose(void){
free(blocksAsPointerVolume);
+ al_destroy_mutex(mutie);
}
uint32_t getNumBlocks(){
|
