hahahah dam it. found out the solution.
my card was set to 16 bits and the .exe I build was set to 32 bits and that made the fps drop...
if thats the case, why the .exe that came with the source didnt had slow down with 16 or 32 bits?
and also, is this the correct way to move a sprite?
#include <SFML/Graphics.hpp>
int main()
{
// Create the main rendering window
sf::RenderWindow App(sf::VideoMode(800, 600, 32), "SFML Graphics");
App.SetFramerateLimit(60);
sf::Image Image;
Image.LoadFromFile("Xis.png");
sf::Sprite Sprite(Image);
while (App.IsOpened())
{
// Process events
sf::Event Event;
while (App.GetEvent(Event))
{
// Close window : exit
if (Event.Type == sf::Event::Closed)
App.Close();
}
// Move the sprite
if (App.GetInput().IsKeyDown(sf::Key::Left)) Sprite.Move(-4, 0);
if (App.GetInput().IsKeyDown(sf::Key::Right)) Sprite.Move( 4, 0);
if (App.GetInput().IsKeyDown(sf::Key::Up)) Sprite.Move(0, -4);
if (App.GetInput().IsKeyDown(sf::Key::Down)) Sprite.Move(0, 4);
// Clear screen
App.Clear();
// Display sprite in our window
App.Draw(Sprite);
// Display window contents on screen
App.Display();
}
return EXIT_SUCCESS;
}
becuase in Allegro it seems that moving a sprite is better