diff options
author | Matyas Dolak <dolak@eset.cz> | 2014-01-10 11:55:43 +0100 |
---|---|---|
committer | Matyas Dolak <dolak@eset.cz> | 2014-01-10 11:55:43 +0100 |
commit | 8104f611f1c4ed80866803bf5504fc2a1ceedaca (patch) | |
tree | 51927f059665529f71194082570d969eb7c203ac /Tools/BiomeVisualiser/BiomeRenderer.cpp | |
parent | Debuggers: Test code for WECUI plugin messaging. (diff) | |
download | cuberite-8104f611f1c4ed80866803bf5504fc2a1ceedaca.tar cuberite-8104f611f1c4ed80866803bf5504fc2a1ceedaca.tar.gz cuberite-8104f611f1c4ed80866803bf5504fc2a1ceedaca.tar.bz2 cuberite-8104f611f1c4ed80866803bf5504fc2a1ceedaca.tar.lz cuberite-8104f611f1c4ed80866803bf5504fc2a1ceedaca.tar.xz cuberite-8104f611f1c4ed80866803bf5504fc2a1ceedaca.tar.zst cuberite-8104f611f1c4ed80866803bf5504fc2a1ceedaca.zip |
Diffstat (limited to '')
-rw-r--r-- | Tools/BiomeVisualiser/BiomeRenderer.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Tools/BiomeVisualiser/BiomeRenderer.cpp b/Tools/BiomeVisualiser/BiomeRenderer.cpp index 758eb4b48..569128a12 100644 --- a/Tools/BiomeVisualiser/BiomeRenderer.cpp +++ b/Tools/BiomeVisualiser/BiomeRenderer.cpp @@ -40,10 +40,10 @@ bool cBiomeRenderer::Render(cPixmap & a_Pixmap) int Hei = a_Pixmap.GetHeight(); // Hint the approximate view area to the biome source so that it can adjust its caches: - int MinBlockX = ( - m_OriginX) / m_Zoom; - int MaxBlockX = (Wid - m_OriginX) / m_Zoom; - int MinBlockZ = ( - m_OriginY) / m_Zoom; - int MaxBlockZ = (Hei - m_OriginY) / m_Zoom; + int MinBlockX = ( - m_OriginX) * m_Zoom; + int MaxBlockX = (Wid - m_OriginX) * m_Zoom; + int MinBlockZ = ( - m_OriginY) * m_Zoom; + int MaxBlockZ = (Hei - m_OriginY) * m_Zoom; m_Cache.HintViewArea(MinBlockX / 16 - 1, MaxBlockX / 16 + 1, MinBlockZ / 16 - 1, MaxBlockZ / 16 + 1); // Hold one current chunk of biome data: @@ -55,12 +55,12 @@ bool cBiomeRenderer::Render(cPixmap & a_Pixmap) for (int y = 0; y < Hei; y++) { - int BlockZ = (y - m_OriginY) / m_Zoom; + int BlockZ = (y - m_OriginY) * m_Zoom; int ChunkZ = (BlockZ >= 0) ? (BlockZ / 16) : ((BlockZ + 1) / 16 - 1); int RelZ = BlockZ - ChunkZ * 16; for (int x = 0; x < Wid; x++) { - int BlockX = (x - m_OriginX) / m_Zoom; + int BlockX = (x - m_OriginX) * m_Zoom; int ChunkX = (BlockX >= 0) ? (BlockX / 16) : ((BlockX + 1) / 16 - 1); int RelX = BlockX - ChunkX * 16; if ((ChunkZ != CurChunkZ) || (ChunkX != CurChunkX)) |