Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- GAME_ENGINE->SetColor(COLOR(255, 0, 0));
- DrawDotGrid(700, 0, 15, 2, 5, 4);
- GAME_ENGINE->SetColor(COLOR(0, 255, 0));
- DrawDotGrid(700, 200, 15, 2, 4, 5);
- GAME_ENGINE->SetColor(COLOR(0, 0, 255));
- DrawDotGrid(695, 195, 10, 12, 4, 5);
- void MethodsLab1::DrawDotGrid(int x, int y, int dotRadius, int gap, int rows, int cols)
- {
- int yPos = y + dotRadius + gap;
- for (int row = 0; row < rows; ++row, yPos += dotRadius * 2 + gap)
- {
- //Draw columns in this row
- int xPos = x + dotRadius + gap;
- for (int col = 0; col < cols; ++col, xPos += dotRadius * 2 + gap)
- {
- GAME_ENGINE->FillEllipse(xPos, yPos, dotRadius, dotRadius);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement