diff options
| author | Japa | 2010-12-14 14:13:43 +0000 |
|---|---|---|
| committer | Japa | 2010-12-14 14:13:43 +0000 |
| commit | a70e0aabbf9a1c4463591ab0614f25d41477046e (patch) | |
| tree | d74f2f45eecfb13d4384699f910b223fee03628c /WorldSegment.h | |
| parent | f289538a4f71e65f4e94503631d0c0852daad518 (diff) | |
| download | stonesense-a70e0aabbf9a1c4463591ab0614f25d41477046e.tar.gz stonesense-a70e0aabbf9a1c4463591ab0614f25d41477046e.tar.bz2 stonesense-a70e0aabbf9a1c4463591ab0614f25d41477046e.tar.xz | |
more stuff to the tilebuilder branch. I'm about to start ripping it a new one now that it works okay.
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 063bbc2..bdf6ce5 100644 --- a/WorldSegment.h +++ b/WorldSegment.h @@ -13,6 +13,7 @@ public: Block** blocksAsPointerVolume;
WorldSegment(int x, int y, int z, int sizex, int sizey, int sizez)
{
+ mute = al_create_mutex();
this->x = x;
this->y = y;
this->z = z - sizez + 1;
@@ -28,6 +29,9 @@ public: }
~WorldSegment(){
+ al_lock_mutex(mute);
+ al_unlock_mutex(mute);
+ al_destroy_mutex(mute);
uint32_t num = (uint32_t)blocks.size();
for(uint32_t i = 0; i < num; i++){
delete(blocks[i]);
@@ -50,4 +54,5 @@ public: void addBlock(Block* b);
void drawAllBlocks();
bool CoordinateInsideSegment(uint32_t x, uint32_t y, uint32_t z);
+ ALLEGRO_MUTEX * mute;
};
\ No newline at end of file |
