From 82600b3e2e3ce8454e15b489310ed642ef7673d8 Mon Sep 17 00:00:00 2001 From: John Zimmermann Date: Thu, 26 Jul 2018 17:27:14 +0200 Subject: [PATCH] game/render/font_ft2.cpp: PAGE_SIZE -> FONT_PAGE_SIZE to fix naming conflict with musl libc --- source/game/render/font_ft2.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/source/game/render/font_ft2.cpp b/source/game/render/font_ft2.cpp index 632a01a..0e95fb5 100644 --- a/source/game/render/font_ft2.cpp +++ b/source/game/render/font_ft2.cpp @@ -343,18 +343,18 @@ public: FT_Library* library = 0; std::map faces; -const int PAGE_SIZE = 512; +const int FONT_PAGE_SIZE = 512; Font* loadFontFT2(render::RenderDriver& driver, const char* filename, std::vector>& pages, int size) { FontFT2* font = new FontFT2(); - font->textureWidth = PAGE_SIZE; - font->textureHeight = PAGE_SIZE; + font->textureWidth = FONT_PAGE_SIZE; + font->textureHeight = FONT_PAGE_SIZE; std::vector images; int cur_page = 0; - Image* img = new Image(PAGE_SIZE, PAGE_SIZE, FMT_Alpha, 0xff); + Image* img = new Image(FONT_PAGE_SIZE, FONT_PAGE_SIZE, FMT_Alpha, 0xff); images.push_back(img); int x = 0, y = 0; @@ -428,7 +428,7 @@ Font* loadFontFT2(render::RenderDriver& driver, const char* filename, //Find a fitting spot on the image x += (unsigned)glyph.w + 2; - if(x > PAGE_SIZE) { + if(x > FONT_PAGE_SIZE) { x = (unsigned)glyph.w + 2; glyph.x = 0; @@ -436,8 +436,8 @@ Font* loadFontFT2(render::RenderDriver& driver, const char* filename, glyph.y += lineHeight + 1; lineHeight = glyph.h; - if(y + font->glyphHeight + 1 > (unsigned)PAGE_SIZE) { - img = new Image(PAGE_SIZE, PAGE_SIZE, FMT_Alpha, 0xff); + if(y + font->glyphHeight + 1 > (unsigned)FONT_PAGE_SIZE) { + img = new Image(FONT_PAGE_SIZE, FONT_PAGE_SIZE, FMT_Alpha, 0xff); images.push_back(img); y = 0;