mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-31 10:14:40 +03:00
Add support for Unicode rendering (#47)
This uses utfcpp combined with a custom font, in the form of a PNG and text file. By default, the game acts exactly as it did before; custom fonts can be provided by third parties.
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "GraphicsResources.h"
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
|
||||
|
||||
@@ -28,6 +29,9 @@ public:
|
||||
|
||||
GraphicsResources grphx;
|
||||
|
||||
int bfontlen(char32_t ch);
|
||||
int font_idx(char32_t ch);
|
||||
|
||||
void Makebfont();
|
||||
|
||||
void drawhuetile(int x, int y, int t, int c);
|
||||
@@ -212,7 +216,6 @@ public:
|
||||
std::vector <SDL_Surface*> bfontmask;
|
||||
std::vector <SDL_Surface*> flipbfont;
|
||||
std::vector <SDL_Surface*> flipbfontmask;
|
||||
std::vector <int> bfontlen;
|
||||
|
||||
bool flipmode;
|
||||
bool setflipmode;
|
||||
@@ -280,6 +283,8 @@ public:
|
||||
bool translucentroomname;
|
||||
|
||||
bool showmousecursor;
|
||||
|
||||
std::map<int, int> font_positions;
|
||||
};
|
||||
|
||||
extern Graphics graphics;
|
||||
|
||||
Reference in New Issue
Block a user