|
|
|
@ -10,7 +10,7 @@ bool GLFontEngine::addFont(std::string fontfile, std::string fontname) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fontpool[fontname] = tmp;
|
|
|
|
|
return false;
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void GLFontEngine::quit() {
|
|
|
|
@ -124,7 +124,7 @@ void GLFontEngine::renderLine(std::string text, SDL_Rect pos) {
|
|
|
|
|
for(unsigned int i=0; i<text.length(); i++) {
|
|
|
|
|
int ch = text[i];
|
|
|
|
|
if(ch<0) {
|
|
|
|
|
ch += 256; // char geht wohl in machen fällen nur von -128 bis +127 *hust*
|
|
|
|
|
ch += 256; // char geht wohl in machen f<EFBFBD>llen nur von -128 bis +127 *hust*
|
|
|
|
|
}
|
|
|
|
|
// std::cout << (int)text[i] << " ";
|
|
|
|
|
tex_x = ((ch-1)%16 / 16.0f);
|
|
|
|
@ -174,7 +174,7 @@ void GLFontEngine::renderLine(std::string str, int x, int y, bool center, SDL_Re
|
|
|
|
|
|
|
|
|
|
void GLFontEngine::renderLines(std::string str, int x, int y, bool center, SDL_Rect *rendered_to, int wrap, int paintbackground) {
|
|
|
|
|
if(wrap) {
|
|
|
|
|
// \n einfügen, wenns zu groß ist
|
|
|
|
|
// \n einf<EFBFBD>gen, wenns zu gro<72> ist
|
|
|
|
|
for(unsigned int i=0, a=0; i<str.length(); i++, a++) {
|
|
|
|
|
if(str[i]!='\n') {
|
|
|
|
|
if(a*font->charwidth*fsize>wrap) {
|
|
|
|
|