diff --git a/Board.cpp b/Board.cpp index aaa94c9..73c957e 100644 --- a/Board.cpp +++ b/Board.cpp @@ -18,7 +18,7 @@ maxWarningLevel(maxWarningLevel){ } clumps.reserve(100); - BlockClump newClump; + /*BlockClump newClump; BlockClump newClump2; newClump.addBlock(2,0,BlockColor::WHITE); newClump.addBlock(1,0,BlockColor::BLUE); @@ -34,7 +34,7 @@ maxWarningLevel(maxWarningLevel){ newClump.y=100; newClump2.y=100; clumps.push_back(newClump); - clumps.push_back(newClump2); + clumps.push_back(newClump2);*/ } void Board::spawnBlock(int col){ diff --git a/C++ProjectTemplate b/C++ProjectTemplate index 2f40430..725c497 100755 Binary files a/C++ProjectTemplate and b/C++ProjectTemplate differ diff --git a/main.cpp b/main.cpp index 4d46efc..46cae12 100644 --- a/main.cpp +++ b/main.cpp @@ -133,7 +133,7 @@ void Meteos::spawnBlocks(float fElapsedTime){ lastBlockSpawn+=fElapsedTime; if (lastBlockSpawn>=gameBoard.spawnRate){ lastBlockSpawn-=gameBoard.spawnRate; - //gameBoard.spawnBlock(randBlockPos(gen)); + gameBoard.spawnBlock(randBlockPos(gen)); } } @@ -984,7 +984,15 @@ void Meteos::drawGame(float fElapsedTime,bool debugView){ DrawStringDecal(gameBoard.drawOffset+vi2d{0,-8},"+"+std::to_string(accumulatedScore),frameTime%5>2?Pixel{224, 184, 148}:WHITE,{0.75,0.75}); GradientFillRectDecal(gameBoard.drawOffset+vi2d{gameBoard.boardSize.x*12+16,0}, {32,32}, BLACK, VERY_DARK_GREEN, VERY_DARK_GREEN, BLACK); DrawRectDecal(gameBoard.drawOffset+vi2d{gameBoard.boardSize.x*12+16,0}, {32,32}, DARK_YELLOW); - DrawStringDecal(gameBoard.drawOffset+vi2d{gameBoard.boardSize.x*12+16,8},std::to_string(blocksInAttackQueue),{66, 125, 92}); + std::string attackQueueDisplay=""; + if (blocksInAttackQueue<100){ + attackQueueDisplay+='0'; + } + if (blocksInAttackQueue<10){ + attackQueueDisplay+='0'; + } + attackQueueDisplay+=std::to_string(blocksInAttackQueue); + DrawStringDecal(gameBoard.drawOffset-vf2d{GetTextSize(attackQueueDisplay).x*0.85f/2,0}+vi2d{gameBoard.boardSize.x*12+16+16,3},attackQueueDisplay,{66, 125, 92},{0.85,1}); } }