summaryrefslogtreecommitdiffstats
path: root/src/Generating/PieceGenerator.cpp
diff options
context:
space:
mode:
authorworktycho <work.tycho@gmail.com>2014-03-14 15:34:29 +0100
committerworktycho <work.tycho@gmail.com>2014-03-14 15:34:29 +0100
commitb8cffe569f8bf6e3379f1c45d9e32a986efac25e (patch)
tree4688783dbca9b7a6f0ef662926d07e4c5edc25d6 /src/Generating/PieceGenerator.cpp
parentcPlugin:BindConsoleCommand can be called statically. (diff)
parentMerge branch 'master' into warnings (diff)
downloadcuberite-b8cffe569f8bf6e3379f1c45d9e32a986efac25e.tar
cuberite-b8cffe569f8bf6e3379f1c45d9e32a986efac25e.tar.gz
cuberite-b8cffe569f8bf6e3379f1c45d9e32a986efac25e.tar.bz2
cuberite-b8cffe569f8bf6e3379f1c45d9e32a986efac25e.tar.lz
cuberite-b8cffe569f8bf6e3379f1c45d9e32a986efac25e.tar.xz
cuberite-b8cffe569f8bf6e3379f1c45d9e32a986efac25e.tar.zst
cuberite-b8cffe569f8bf6e3379f1c45d9e32a986efac25e.zip
Diffstat (limited to 'src/Generating/PieceGenerator.cpp')
-rw-r--r--src/Generating/PieceGenerator.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/Generating/PieceGenerator.cpp b/src/Generating/PieceGenerator.cpp
index cf5ab6226..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() = %u\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("%u: {%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,
@@ -183,7 +183,6 @@ cPiece::cConnector cPiece::RotateMoveConnector(const cConnector & a_Connector, i
cPiece::cConnector res(a_Connector);
// Rotate the res connector:
- Vector3i Size = GetSize();
switch (a_NumCCWRotations)
{
case 0:
@@ -338,7 +337,7 @@ cPlacedPiece * cPieceGenerator::PlaceStartingPiece(int a_BlockX, int a_BlockY, i
// Choose a random supported rotation:
int Rotations[4] = {0};
int NumRotations = 1;
- for (int i = 1; i < ARRAYCOUNT(Rotations); i++)
+ for (size_t i = 1; i < ARRAYCOUNT(Rotations); i++)
{
if (StartingPiece->CanRotateCCW(i))
{
@@ -503,11 +502,11 @@ bool cPieceGenerator::CheckConnection(
// DEBUG:
void cPieceGenerator::DebugConnectorPool(const cPieceGenerator::cFreeConnectors & a_ConnectorPool, size_t a_NumProcessed)
{
- printf(" Connector pool: %u 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)
{
- printf(" %u: {%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,