1
Graphics / [solved]Tiles are showing black lines at the borders (1.6)
« on: April 09, 2010, 02:59:54 am »
Thanks guys, very helpful forum.
SetSmooth(false) did the trick.
SetSmooth(false) did the trick.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
float loopVarX = 0;
float loopVarY = 0;
int forX, forY;
// Create the main window
sf::RenderWindow App(sf::VideoMode(1600, 1200), "MY GAME");
// SET 2 dimensional array of sprites all to the grass image
Sprite Sprite1[25][18];
for ( int a = 0; a<25; a++)
for (int b = 0; b<18 ; b++)
{
Sprite1[a][b].SetImage(CammyCreature.Grass);
}
// Draw the grass
for (forX = 0; forX <25; forX++) // DRAW 25 tiles horizontally
{
for (forY = 0; forY <18; forY++) // DRAW 18 tiles vertically
{
App.Draw(Sprite1[forX][forY]); // Draws the grass at the location specified by the variables
loopVarY = (forY * 64); // Configures the Y Coordinate to be images new location
Sprite1[forX][forY].SetY(loopVarY); // Sets the next Y Coordinate location of the next image to be drawn
Sprite1[forX][forY].SetX(loopVarX); // Sets the next Y Coordinate location of the next image to be drawn
}
loopVarX = (forX * 64);
}