summaryrefslogtreecommitdiff
path: root/WorldSegment.h
diff options
context:
space:
mode:
authorJapa2011-02-19 19:11:19 +0000
committerJapa2011-02-19 19:11:19 +0000
commitf1cd36716229dd3f0795824197b14dcd0d979540 (patch)
treea9391276cc5f0c569fe531996964a6cb57d2263e /WorldSegment.h
parentd8523cd32f9aea85ce0ef0c6fb12c8562922dad2 (diff)
parentc2f73a1f356890e8ed6ada37a4613ce4836d4712 (diff)
downloadstonesense-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.h5
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(){