summaryrefslogtreecommitdiffstats
path: root/src/Generating
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-03-12 18:12:13 +0100
committerTycho <work.tycho+git@gmail.com>2014-03-12 18:12:13 +0100
commitd904e89712ee87b4b2bb73c6568f230fff15933a (patch)
tree50b4530dde0a80d1271c3bc1dab770f1f69fc7cd /src/Generating
parentAdded macros support to tools (diff)
parentFixed printf format compatabilty (diff)
downloadcuberite-d904e89712ee87b4b2bb73c6568f230fff15933a.tar
cuberite-d904e89712ee87b4b2bb73c6568f230fff15933a.tar.gz
cuberite-d904e89712ee87b4b2bb73c6568f230fff15933a.tar.bz2
cuberite-d904e89712ee87b4b2bb73c6568f230fff15933a.tar.lz
cuberite-d904e89712ee87b4b2bb73c6568f230fff15933a.tar.xz
cuberite-d904e89712ee87b4b2bb73c6568f230fff15933a.tar.zst
cuberite-d904e89712ee87b4b2bb73c6568f230fff15933a.zip
Diffstat (limited to '')
-rw-r--r--src/Generating/PieceGenerator.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/Generating/PieceGenerator.cpp b/src/Generating/PieceGenerator.cpp
index 8fcc14389..8999a5ff7 100644
--- a/src/Generating/PieceGenerator.cpp
+++ b/src/Generating/PieceGenerator.cpp
@@ -31,14 +31,14 @@ public:
Gen.PlacePieces(500, 50, 500, 3, OutPieces);
// Print out the pieces:
- printf("OutPieces.size() = %zu\n", OutPieces.size());
+ printf("OutPieces.size() = " SIZE_T_FMT "\n", OutPieces.size());
size_t idx = 0;
for (cPlacedPieces::const_iterator itr = OutPieces.begin(), end = OutPieces.end(); itr != end; ++itr, ++idx)
{
const Vector3i & Coords = (*itr)->GetCoords();
cCuboid Hitbox = (*itr)->GetHitBox();
Hitbox.Sort();
- printf("%zu: {%d, %d, %d}, rot %d, hitbox {%d, %d, %d} - {%d, %d, %d} (%d * %d * %d)\n", idx,
+ printf(SIZE_T_FMT ": {%d, %d, %d}, rot %d, hitbox {%d, %d, %d} - {%d, %d, %d} (%d * %d * %d)\n", idx,
Coords.x, Coords.y, Coords.z,
(*itr)->GetNumCCWRotations(),
Hitbox.p1.x, Hitbox.p1.y, Hitbox.p1.z,
@@ -376,8 +376,8 @@ bool cPieceGenerator::TryPlacePieceAtConnector(
// You need DirectionRotationTable[rot1][rot2] CCW turns to connect rot1 to rot2 (they are opposite)
static const int DirectionRotationTable[6][6] =
{
- /* YM, YP, ZM, ZP, XM, XP
- YM */ { 0, 0, 0, 0, 0, 0},
+ /* YM, YP, ZM, ZP, XM, XP */
+ /* YM */ { 0, 0, 0, 0, 0, 0},
/* YP */ { 0, 0, 0, 0, 0, 0},
/* ZM */ { 0, 0, 2, 0, 1, 3},
/* ZP */ { 0, 0, 0, 2, 3, 1},
@@ -502,12 +502,11 @@ bool cPieceGenerator::CheckConnection(
// DEBUG:
void cPieceGenerator::DebugConnectorPool(const cPieceGenerator::cFreeConnectors & a_ConnectorPool, size_t a_NumProcessed)
{
- printf(" Connector pool: %zu items\n", a_ConnectorPool.size() - a_NumProcessed);
+ printf(" Connector pool: " SIZE_T_FMT " items\n", a_ConnectorPool.size() - a_NumProcessed);
size_t idx = 0;
for (cPieceGenerator::cFreeConnectors::const_iterator itr = a_ConnectorPool.begin() + a_NumProcessed, end = a_ConnectorPool.end(); itr != end; ++itr, ++idx)
{
- // Format specifier for size_t is zu
- printf(" %zu: {%d, %d, %d}, type %d, direction %s, depth %d\n",
+ printf(" " SIZE_T_FMT ": {%d, %d, %d}, type %d, direction %s, depth %d\n",
idx,
itr->m_Connector.m_Pos.x, itr->m_Connector.m_Pos.y, itr->m_Connector.m_Pos.z,
itr->m_Connector.m_Type,