I am pretty sure I am missing something, but I have been Google-ing this for the last week.
My problem is, that the underneath can not find any pixels Blue (0, 0, 255), and I have absolutely no idea why it is not working.
Little explanation:
startingCave is the name of the Image
what I am trying to achive, is that with the two for loops, the code should go through the image row by row and everytime it finds a blue pixel it should set the if statement true
Vector2f globalCurrentPos;
sf::Color pixelColor;
for (int y = 0; y < startingCave.getSize().y; y++) {
for (int x = 0; x < startingCave.getSize().x; x++) {
globalCurrentPos.x = originDirt.x + x ;
globalCurrentPos.y = originDirt.y + y ;
pixelColor == startingCave.getPixel(x, y);
if (pixelColor == sf::Color(0, 0, 255)) {
//createDirt(world, globalCurrentPos);
debugText.setString("found");
}
}
}