aboutsummaryrefslogtreecommitdiff
path: root/include/graphics.hpp
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2020-03-19 11:28:30 +0100
committerCharles <sircharlesaze@gmail.com>2020-03-19 11:28:30 +0100
commitce65a7e1f682fa31934c05623c41ea25d9b71ce7 (patch)
tree2fb658bf47c0f8802c9c53c81ce5cb5b3ef4fa2a /include/graphics.hpp
parent9578de486aa49d4f89548155ab462732e42267cd (diff)
download2048-ce65a7e1f682fa31934c05623c41ea25d9b71ce7.tar.gz
2048-ce65a7e1f682fa31934c05623c41ea25d9b71ce7.tar.bz2
2048-ce65a7e1f682fa31934c05623c41ea25d9b71ce7.zip
Added colors
Diffstat (limited to 'include/graphics.hpp')
-rw-r--r--include/graphics.hpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/graphics.hpp b/include/graphics.hpp
index 44f631c..ccebdae 100644
--- a/include/graphics.hpp
+++ b/include/graphics.hpp
@@ -3,6 +3,10 @@
#include <string>
#include <iostream>
+#include <vector>
+#include <map>
+#include <utility>
+#include <utility>
#include <SDL2/SDL.h>
#include <SDL2/SDL_ttf.h>
#include "game.hpp"
@@ -28,8 +32,12 @@ class Graphics
SDL_Renderer *renderer;
SDL_Window *window;
TTF_Font *font;
+ std::vector< std::pair<int, SDL_Texture*> > numberTexBuf;
+ std::map< int, SDL_Color > palette;
void handleEvent();
+ SDL_Texture *addNumberTex(int n);
+ SDL_Texture *getNumberTex(int n);
void error();
};