diff options
author | ludwig <ludwig@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2005-08-30 15:35:24 +0000 |
---|---|---|
committer | ludwig <ludwig@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2005-08-30 15:35:24 +0000 |
commit | 39fe95169562fdf410cb5b0270454cede79b1070 (patch) | |
tree | 48fdce1ab26dd9ea00f6ee023b15af118444c68e /code | |
parent | 224a312cb85c18f35f89fd21d7e957f3764fd423 (diff) | |
download | ioquake3-aero-39fe95169562fdf410cb5b0270454cede79b1070.tar.gz ioquake3-aero-39fe95169562fdf410cb5b0270454cede79b1070.zip |
fix build against system libfreetype
git-svn-id: svn://svn.icculus.org/quake3/trunk@30 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code')
-rw-r--r-- | code/renderer/tr_font.c | 19 | ||||
-rw-r--r-- | code/unix/Makefile | 9 |
2 files changed, 21 insertions, 7 deletions
diff --git a/code/renderer/tr_font.c b/code/renderer/tr_font.c index 3813ce4..8aeec5e 100644 --- a/code/renderer/tr_font.c +++ b/code/renderer/tr_font.c @@ -74,11 +74,12 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "../qcommon/qcommon.h" #ifdef BUILD_FREETYPE -#include "../ft2/fterrors.h" -#include "../ft2/ftsystem.h" -#include "../ft2/ftimage.h" -#include "../ft2/freetype.h" -#include "../ft2/ftoutln.h" +#include <ft2build.h> +#include <freetype/fterrors.h> +#include <freetype/ftsystem.h> +#include <freetype/ftimage.h> +#include <freetype/freetype.h> +#include <freetype/ftoutln.h> #define _FLOOR(x) ((x) & -64) #define _CEIL(x) (((x)+63) & -64) @@ -310,7 +311,7 @@ typedef union { float readFloat() { poor me; -#if idppc +#if __WORD_ORDER == __BIG_ENDIAN me.fred[0] = fdFile[fdOffset+3]; me.fred[1] = fdFile[fdOffset+2]; me.fred[2] = fdFile[fdOffset+1]; @@ -342,6 +343,12 @@ void RE_RegisterFont(const char *fontName, int pointSize, fontInfo_t *font) { float dpi = 72; // float glyphScale = 72.0f / dpi; // change the scale to be relative to 1 based on 72 dpi ( so dpi of 144 means a scale of .5 ) + + if (!fontName) { + ri.Printf(PRINT_ALL, "RE_RegisterFont: called with empty name\n"); + return; + } + if (pointSize <= 0) { pointSize = 12; } diff --git a/code/unix/Makefile b/code/unix/Makefile index 10e8dc5..2e4dafc 100644 --- a/code/unix/Makefile +++ b/code/unix/Makefile @@ -46,7 +46,7 @@ BDIR=$(MOUNT_DIR)/../run # BUILD_NAME=$(BUILD_NAME) BUILD_NAME=quake3 - +BUILD_FREETYPE=0 ############################################################################# ## @@ -156,6 +156,13 @@ ifeq ($(PLATFORM),linux) LDFLAGS=-ldl -lm GLLDFLAGS=-L/usr/X11R6/$(LIB) -lX11 -lXext -lXxf86dga -lXxf86vm + DEBUG_CFLAGS += -DHAVE_EXECINFO_H + ifeq ($(BUILD_FREETYPE),1) + RELEASE_CFLAGS += $(shell pkg-config --cflags freetype2) -DBUILD_FREETYPE + DEBUG_CFLAGS += $(shell pkg-config --cflags freetype2) -DBUILD_FREETYPE + LDFLAGS += $(shell pkg-config --libs freetype2) + endif + ifeq ($(ARCH),i386) # linux32 make ... BASE_CFLAGS += -m32 |