]> git.sesse.net Git - ccbs/blobdiff - bigscreen/fonts.h
Add a better framework for showing what's changed.
[ccbs] / bigscreen / fonts.h
index fe43c586ed5b5c30b2559f89d0b1adc4da6d1033..b465aa1ff859d591c35f24783eaf9fa4df4b156b 100644 (file)
@@ -6,7 +6,19 @@
 #include <vector>
 #include "widestring.h"
 
 #include <vector>
 #include "widestring.h"
 
+struct TextDefer {
+       widestring str;
+       double size;
+       unsigned xpos, ypos;
+
+       bool changed;
+};
+
 void init_freetype();
 unsigned my_draw_text(const widestring &str, unsigned char *buf, double size, int xpos = 0, int ypos = 0, int r = 255, int g = 255, int b = 255);
 
 void init_freetype();
 unsigned my_draw_text(const widestring &str, unsigned char *buf, double size, int xpos = 0, int ypos = 0, int r = 255, int g = 255, int b = 255);
 
+// draw_all_deferred_text draws every string in current that is not the same in old, in red
+void my_draw_text_deferred(std::vector<TextDefer> &td, const widestring &str, double size, int xpos, int ypos);
+void draw_all_deferred_text(unsigned char *buf, std::vector<TextDefer> &current, std::vector<TextDefer> &old);
+
 #endif /* !defined(_FONTS_H) */
 #endif /* !defined(_FONTS_H) */