diff options
Diffstat (limited to 'Tools/QtBiomeVisualiser')
-rw-r--r-- | Tools/QtBiomeVisualiser/BiomeView.cpp | 42 | ||||
-rw-r--r-- | Tools/QtBiomeVisualiser/Globals.h | 15 |
2 files changed, 27 insertions, 30 deletions
diff --git a/Tools/QtBiomeVisualiser/BiomeView.cpp b/Tools/QtBiomeVisualiser/BiomeView.cpp index c77b39482..472d1b5ad 100644 --- a/Tools/QtBiomeVisualiser/BiomeView.cpp +++ b/Tools/QtBiomeVisualiser/BiomeView.cpp @@ -17,7 +17,7 @@ static const int DELTA_STEP = 120; // The normal per-notch wheel delta /** Map for converting biome values to colors. Initialized from biomeColors[]. */ static uchar biomeToColor[256 * 4]; -/** Map for converting biome values to colors. Used to initialize biomeToColor[].*/ +/** Map for converting biome values to colors. Used to initialize biomeToColor[]. */ static struct { EMCSBiome m_Biome; @@ -49,22 +49,22 @@ static struct { biJungleHills, { 0x2c, 0x42, 0x05 }, }, { biJungleEdge, { 0x62, 0x8b, 0x17 }, }, - { biDeepOcean, { 0x00, 0x00, 0x30 }, }, - { biStoneBeach, { 0xa2, 0xa2, 0x84 }, }, - { biColdBeach, { 0xfa, 0xf0, 0xc0 }, }, - { biBirchForest, { 0x30, 0x74, 0x44 }, }, - { biBirchForestHills, { 0x1f, 0x5f, 0x32 }, }, - { biRoofedForest, { 0x40, 0x51, 0x1a }, }, - { biColdTaiga, { 0x31, 0x55, 0x4a }, }, - { biColdTaigaHills, { 0x59, 0x7d, 0x72 }, }, - { biMegaTaiga, { 0x59, 0x66, 0x51 }, }, - { biMegaTaigaHills, { 0x59, 0x66, 0x59 }, }, - { biExtremeHillsPlus, { 0x50, 0x70, 0x50 }, }, - { biSavanna, { 0xbd, 0xb2, 0x5f }, }, - { biSavannaPlateau, { 0xa7, 0x9d, 0x64 }, }, - { biMesa, { 0xd9, 0x45, 0x15 }, }, - { biMesaPlateauF, { 0xb0, 0x97, 0x65 }, }, - { biMesaPlateau, { 0xca, 0x8c, 0x65 }, }, + { biDeepOcean, { 0x00, 0x00, 0x30 }, }, + { biStoneBeach, { 0xa2, 0xa2, 0x84 }, }, + { biColdBeach, { 0xfa, 0xf0, 0xc0 }, }, + { biBirchForest, { 0x30, 0x74, 0x44 }, }, + { biBirchForestHills, { 0x1f, 0x5f, 0x32 }, }, + { biRoofedForest, { 0x40, 0x51, 0x1a }, }, + { biColdTaiga, { 0x31, 0x55, 0x4a }, }, + { biColdTaigaHills, { 0x59, 0x7d, 0x72 }, }, + { biMegaTaiga, { 0x59, 0x66, 0x51 }, }, + { biMegaTaigaHills, { 0x59, 0x66, 0x59 }, }, + { biExtremeHillsPlus, { 0x50, 0x70, 0x50 }, }, + { biSavanna, { 0xbd, 0xb2, 0x5f }, }, + { biSavannaPlateau, { 0xa7, 0x9d, 0x64 }, }, + { biMesa, { 0xd9, 0x45, 0x15 }, }, + { biMesaPlateauF, { 0xb0, 0x97, 0x65 }, }, + { biMesaPlateau, { 0xca, 0x8c, 0x65 }, }, // M variants: { biSunflowerPlains, { 0xb5, 0xdb, 0x88 }, }, @@ -307,8 +307,8 @@ void BiomeView::drawChunk(int a_ChunkX, int a_ChunkZ) // which need to be shifted to account for panning inside that chunk centerx -= (m_X - centerchunkx * 16) * m_Zoom; centery -= (m_Z - centerchunkz * 16) * m_Zoom; - // centerx,y now points to the top left corner of the center chunk - // so now calculate our x,y in relation + // centerx, centery now points to the top left corner of the center chunk + // so now calculate our x, y in relation double chunksize = 16 * m_Zoom; centerx += (a_ChunkX - centerchunkx) * chunksize; centery += (a_ChunkZ - centerchunkz) * chunksize; @@ -550,7 +550,3 @@ void BiomeView::keyPressEvent(QKeyEvent * a_Event) } } } - - - - diff --git a/Tools/QtBiomeVisualiser/Globals.h b/Tools/QtBiomeVisualiser/Globals.h index d73881868..0fed2cd48 100644 --- a/Tools/QtBiomeVisualiser/Globals.h +++ b/Tools/QtBiomeVisualiser/Globals.h @@ -15,9 +15,9 @@ // Useful warnings from warning level 4: #pragma warning(3 : 4127) // Conditional expression is constant #pragma warning(3 : 4189) // Local variable is initialized but not referenced - #pragma warning(3 : 4245) // Conversion from 'type1' to 'type2', signed/unsigned mismatch + #pragma warning(3 : 4245) // Conversion from 'type1' to 'type2', signed / unsigned mismatch #pragma warning(3 : 4310) // Cast truncates constant value - #pragma warning(3 : 4389) // Signed/unsigned mismatch + #pragma warning(3 : 4389) // Signed / unsigned mismatch #pragma warning(3 : 4505) // Unreferenced local function has been removed #pragma warning(3 : 4701) // Potentially unitialized local variable used #pragma warning(3 : 4702) // Unreachable code @@ -254,9 +254,9 @@ template class SizeChecker<UInt16, 2>; #include "src/Logger.h" #else // Logging functions -void inline LOGERROR(const char* a_Format, ...) FORMATSTRING(1, 2); +void inline LOGERROR(const char * a_Format, ...) FORMATSTRING(1, 2); -void inline LOGERROR(const char* a_Format, ...) +void inline LOGERROR(const char * a_Format, ...) { va_list argList; va_start(argList, a_Format); @@ -271,14 +271,15 @@ void inline LOGERROR(const char* a_Format, ...) // Common definitions: -/// Evaluates to the number of elements in an array (compile-time!) +/** Evaluates to the number of elements in an array (compile-time!) */ #define ARRAYCOUNT(X) (sizeof(X) / sizeof(*(X))) -/// Allows arithmetic expressions like "32 KiB" (but consider using parenthesis around it, "(32 KiB)") +/** Allows arithmetic expressions like "32 KiB" (but consider using parenthesis +around it, "(32 KiB)") */ #define KiB * 1024 #define MiB * 1024 * 1024 -/// Faster than (int)floorf((float)x / (float)div) +/** Faster than (int)floorf((float)x / (float)div) */ #define FAST_FLOOR_DIV( x, div) (((x) - (((x) < 0) ? ((div) - 1) : 0)) / (div)) // Own version of assert() that writes failed assertions to the log for review |