diff options
| author | JapaMala | 2011-10-18 00:39:54 +0530 |
|---|---|---|
| committer | JapaMala | 2011-10-18 00:39:54 +0530 |
| commit | ee36fbd147e6f96a7c9b49f15ca1d55355e7c0d0 (patch) | |
| tree | 59a4fa65b6439c04180baabf29d190d5e50cea2b /WorldSegment.cpp | |
| parent | 71e67bc744792d02f01cc882dc21a3be788996b6 (diff) | |
| download | stonesense-ee36fbd147e6f96a7c9b49f15ca1d55355e7c0d0.tar.gz stonesense-ee36fbd147e6f96a7c9b49f15ca1d55355e7c0d0.tar.bz2 stonesense-ee36fbd147e6f96a7c9b49f15ca1d55355e7c0d0.tar.xz | |
added preliminary functions to save volumetric data. Also fixed the large screenshot feature.
Signed-off-by: JapaMala <japa.mala.illo@gmail.com>
Diffstat (limited to 'WorldSegment.cpp')
| -rw-r--r-- | WorldSegment.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/WorldSegment.cpp b/WorldSegment.cpp index c8801e4..24efceb 100644 --- a/WorldSegment.cpp +++ b/WorldSegment.cpp @@ -358,3 +358,15 @@ bool WorldSegment::CoordinateInsideSegment(uint32_t x, uint32_t y, uint32_t z){ if( (int32_t)z < this->z || (int32_t)z >= this->z + this->sizez) return false;
return true;
}
+
+void WorldSegment::drawPixels()
+{
+ for(int32_t vsx=0; vsx < this->sizex; vsx++)
+ for(int32_t vsy=0; vsy < this->sizey; vsy++)
+ for(int32_t vsz=0; vsz < this->sizez; vsz++)
+ {
+ Block *b = getBlockLocal(vsx,vsy,vsz);
+ if (b)
+ b->DrawPixel(vsx, (vsz*this->sizey) + vsy);
+ }
+}
\ No newline at end of file |
