Skip to content

Commit

Permalink
unlocked fps counter
Browse files Browse the repository at this point in the history
  • Loading branch information
okkindel committed May 8, 2018
1 parent 9f7704d commit 6fd7ecb
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
Binary file added data/texture/bush.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/Window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ void drawMinimap(sf::RenderWindow &window)
}

//draw player
rectangle.setFillColor(sf::Color::White);
rectangle.setFillColor(sf::Color::Magenta);
// not very accurate values but less of math
rectangle.setSize(sf::Vector2f((map_scale - 3), (map_scale - 3)));
sf::Vector2f pos = getPosition();
Expand Down
3 changes: 1 addition & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include <stdio.h>
#include <stdint.h>
#include <SFML/Graphics.hpp>
#include "Engine.h"
#include "Window.h"

// time between FPS text refresh. FPS is smoothed out over this time
Expand Down Expand Up @@ -37,7 +36,7 @@ int draw()
sf::RenderWindow window(sf::VideoMode(screenWidth, screenHeight), "Roguelike");
window.setSize(sf::Vector2u(screenWidth, screenHeight));

window.setFramerateLimit(60);
window.setFramerateLimit(1000);
bool hasFocus = true;

sf::Text fpsText("", font, 50); // text object for FPS counter
Expand Down

0 comments on commit 6fd7ecb

Please sign in to comment.