placeHolder texture rename + comments
This commit is contained in:
parent
f574bd769d
commit
d849c8b037
3 changed files with 5 additions and 3 deletions
|
@ -15,4 +15,6 @@ static constexpr unsigned int FLOWER_SIZE = SCREEN_WIDTH * 0.05;
|
||||||
namespace sf {
|
namespace sf {
|
||||||
class Texture;
|
class Texture;
|
||||||
};
|
};
|
||||||
extern sf::Texture placeHolder;
|
// created because sprite doesn't have default constructor
|
||||||
|
// Not optimal but easy to use + initialized in GameData.cpp
|
||||||
|
extern sf::Texture PLACE_HOLDER_TEXTURE;
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
const sf::Time Game::TimePerFrame = sf::seconds(1.f / 60.f);
|
const sf::Time Game::TimePerFrame = sf::seconds(1.f / 60.f);
|
||||||
sf::Texture bgTexture;
|
sf::Texture bgTexture;
|
||||||
|
|
||||||
Game::Game() : backGround(placeHolder) {
|
Game::Game() : backGround(PLACE_HOLDER_TEXTURE) {
|
||||||
assert(mFont.openFromFile("media/Sansation.ttf"));
|
assert(mFont.openFromFile("media/Sansation.ttf"));
|
||||||
mStatisticsText.setPosition({5.f, 5.f});
|
mStatisticsText.setPosition({5.f, 5.f});
|
||||||
mStatisticsText.setCharacterSize(10);
|
mStatisticsText.setCharacterSize(10);
|
||||||
|
|
|
@ -2,4 +2,4 @@
|
||||||
#include <SFML/Graphics/Texture.hpp>
|
#include <SFML/Graphics/Texture.hpp>
|
||||||
#include <SFML/System/Vector2.hpp>
|
#include <SFML/System/Vector2.hpp>
|
||||||
|
|
||||||
sf::Texture placeHolder = sf::Texture(sf::Vector2u(200, 200));
|
sf::Texture PLACE_HOLDER_TEXTURE = sf::Texture(sf::Vector2u(20, 20));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue