-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGame.h
41 lines (35 loc) · 951 Bytes
/
Game.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/**
* The Game class (I just lost).
* This will undoubtedly become huge and bloated. Hopefully, I'll be able
* to avoid that.
* @author Chris Brenton
* @date 12-26-11
*/
#ifndef __GAME_H
#define __GAME_H
#include <map>
#include <string>
#include <sstream>
#include <iomanip>
#include <SFML/Graphics.hpp>
#include "Globals.h"
class Game {
public:
Game(sf::RenderWindow *_window);
virtual ~Game() {};
void addText(std::string varName, sf::String varText);
void toggleTextVisibility(std::string varName);
void updateText(std::string varName, std::string varText);
void updateFramerate(float tick);
void update(float tick);
void toggleFramerate();
void drawAllText();
void draw();
private:
sf::RenderWindow *window;
std::map<std::string, sf::String> textMap;
std::vector<GLuint> bufferVec;
std::stringstream fpsStream;
sf::Font hudFont;
};
#endif