aboutsummaryrefslogtreecommitdiff
path: root/modules/libtext
diff options
context:
space:
mode:
Diffstat (limited to 'modules/libtext')
-rw-r--r--modules/libtext/Makefile609
-rw-r--r--modules/libtext/Makefile.am14
-rw-r--r--modules/libtext/Makefile.in609
-rw-r--r--modules/libtext/libtext.c934
-rw-r--r--modules/libtext/libtext.h99
-rw-r--r--modules/libtext/libtext_exports.h63
-rw-r--r--modules/libtext/libtext_la-g_text.loT7
7 files changed, 2335 insertions, 0 deletions
diff --git a/modules/libtext/Makefile b/modules/libtext/Makefile
new file mode 100644
index 0000000..1c0b1c8
--- /dev/null
+++ b/modules/libtext/Makefile
@@ -0,0 +1,609 @@
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
+# libtext/Makefile. Generated from Makefile.in by configure.
+
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+#AUTOMAKE_OPTIONS = no-dependencies foreign
+
+
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
+pkgdatadir = $(datadir)/bennu
+pkgincludedir = $(includedir)/bennu
+pkglibdir = $(libdir)/bennu
+pkglibexecdir = $(libexecdir)/bennu
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = x86_64-pc-none
+host_triplet = arm-unknown-linux-gnu
+target_triplet = arm-unknown-linux-gnu
+subdir = libtext
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(top_srcdir)/depcomp
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__installdirs = "$(DESTDIR)$(libdir)"
+LTLIBRARIES = $(lib_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+libtext_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am_libtext_la_OBJECTS = libtext_la-libtext.lo
+libtext_la_OBJECTS = $(am_libtext_la_OBJECTS)
+libtext_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libtext_la_CFLAGS) \
+ $(CFLAGS) $(libtext_la_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I.
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+SOURCES = $(libtext_la_SOURCES)
+DIST_SOURCES = $(libtext_la_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = ${SHELL} /home/steward/Github/miyoo_src/bennugd/modules/missing --run aclocal-1.12
+AMTAR = $${TAR-tar}
+AR = /opt/miyoo/usr/bin/arm-linux-ar
+AS = as
+AUTOCONF = ${SHELL} /home/steward/Github/miyoo_src/bennugd/modules/missing --run autoconf
+AUTOHEADER = ${SHELL} /home/steward/Github/miyoo_src/bennugd/modules/missing --run autoheader
+AUTOMAKE = ${SHELL} /home/steward/Github/miyoo_src/bennugd/modules/missing --run automake-1.12
+AWK = mawk
+BGD_PATH = /home/steward/Github/miyoo_src/bennugd/modules/../core
+CC = /opt/miyoo/usr/bin/arm-linux-gcc
+CCDEPMODE = depmode=gcc3
+CFLAGS = -DTARGET_MIYOO -mcpu=arm926ej-s -mtune=arm926ej-s -O3 -DARM -D_ARM_ASSEM_ -I/opt/miyoo/arm-miyoo-linux-uclibcgnueabi/sysroot/usr/include/SDL -O2 -finline-functions -fno-strict-aliasing -Wall -DTARGET_LINUX -DUSE_LIBDES -DTARGET_MIYOO -mcpu=arm926ej-s -mtune=arm926ej-s -O3 -DARM -D_ARM_ASSEM_ -I/opt/miyoo/arm-miyoo-linux-uclibcgnueabi/sysroot/usr/include/SDL -I/home/steward/Github/miyoo_src/bennugd/modules/../3rdparty/des-4.04b
+COMMON_CFLAGS = -Wall -DTARGET_LINUX -DUSE_LIBDES -DTARGET_MIYOO -mcpu=arm926ej-s -mtune=arm926ej-s -O3 -DARM -D_ARM_ASSEM_ -I/opt/miyoo/arm-miyoo-linux-uclibcgnueabi/sysroot/usr/include/SDL -I/home/steward/Github/miyoo_src/bennugd/modules/../3rdparty/des-4.04b
+COMMON_LDFLAGS = -lc -ldl -D_REENTRANT -L/home/steward/Github/miyoo_src/bennugd/modules/../3rdparty/des-4.04b -ldes
+CPP = /opt/miyoo/usr/bin/arm-linux-gcc -E
+CPPFLAGS =
+CYGPATH_W = echo
+DEFS = -DPACKAGE_NAME=\"bennu\" -DPACKAGE_TARNAME=\"bennu\" -DPACKAGE_VERSION=\"1.0.0\" -DPACKAGE_STRING=\"bennu\ 1.0.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DPACKAGE=\"bennu\" -DVERSION=\"1.0.0\" -DHAVE_LIBM=1
+DEPDIR = .deps
+DESLIBS =
+DLLTOOL = false
+DSYMUTIL =
+DUMPBIN =
+ECHO_C =
+ECHO_N = -n
+ECHO_T =
+EGREP = /bin/grep -E
+EXEEXT =
+FGREP = /bin/grep -F
+GREP = /bin/grep
+INSTALL = /usr/bin/install -c
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
+LD = /opt/miyoo/usr/bin/arm-linux-ld
+LDFLAGS = -D_REENTRANT
+LIBOBJS =
+LIBS = -lm
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LIPO =
+LN_S = ln -s
+LTLIBOBJS =
+MAINT = #
+MAKEINFO = ${SHELL} /home/steward/Github/miyoo_src/bennugd/modules/missing --run makeinfo
+MANIFEST_TOOL = :
+MKDIR_P = /bin/mkdir -p
+NM = /opt/miyoo/bin//arm-linux-nm -B
+NMEDIT =
+OBJDUMP = arm-linux-objdump
+OBJEXT = o
+OTOOL =
+OTOOL64 =
+PACKAGE = bennu
+PACKAGE_BUGREPORT =
+PACKAGE_NAME = bennu
+PACKAGE_STRING = bennu 1.0.0
+PACKAGE_TARNAME = bennu
+PACKAGE_URL =
+PACKAGE_VERSION = 1.0.0
+PATH_SEPARATOR = :
+PKG_CONFIG = /usr/bin/pkg-config
+PKG_CONFIG_LIBDIR = /opt/miyoo/arm-miyoo-linux-uclibcgnueabi/sysroot/usr/lib/pkgconfig
+PKG_CONFIG_PATH = /opt/miyoo/arm-miyoo-linux-uclibcgnueabi/sysroot/usr/lib/pkgconfig
+PNGLIBS =
+PNG_CFLAGS = -I/usr/include/libpng16
+PNG_LIBS = -lpng16 -lz
+RANLIB = /opt/miyoo/usr/bin/arm-linux-ranlib
+SDL_CFLAGS = -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT
+SDL_LIBS = -lSDL -lpthread
+SDL_mixer_CFLAGS = -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT
+SDL_mixer_LIBS = -lSDL_mixer -lSDL -lpthread
+SED = /bin/sed
+SET_MAKE =
+SHELL = /bin/bash
+STRIP = /opt/miyoo/usr/bin/arm-linux-strip
+VERSION = 1.0.0
+WINDRES =
+X11LIBS = -lX11
+ZLIBS =
+ZLIB_CFLAGS =
+ZLIB_LIBS = -lz
+abs_builddir = /home/steward/Github/miyoo_src/bennugd/modules/libtext
+abs_srcdir = /home/steward/Github/miyoo_src/bennugd/modules/libtext
+abs_top_builddir = /home/steward/Github/miyoo_src/bennugd/modules
+abs_top_srcdir = /home/steward/Github/miyoo_src/bennugd/modules
+ac_ct_AR =
+ac_ct_CC =
+ac_ct_DUMPBIN =
+am__include = include
+am__leading_dot = .
+am__quote =
+am__tar = $${TAR-tar} chof - "$$tardir"
+am__untar = $${TAR-tar} xf -
+bindir = ${exec_prefix}/bin
+build = x86_64-pc-none
+build_alias = x86_64
+build_cpu = x86_64
+build_os = none
+build_vendor = pc
+builddir = .
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+exec_prefix = ${prefix}
+host = arm-unknown-linux-gnu
+host_alias = arm-linux
+host_cpu = arm
+host_os = linux-gnu
+host_vendor = unknown
+htmldir = ${docdir}
+includedir = ${prefix}/include
+infodir = ${datarootdir}/info
+install_sh = ${SHELL} /home/steward/Github/miyoo_src/bennugd/modules/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localedir = ${datarootdir}/locale
+localstatedir = ${prefix}/var
+mandir = ${datarootdir}/man
+mkdir_p = /bin/mkdir -p
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+prefix = /opt/miyoo/usr
+program_transform_name = s&^&arm-linux-&
+psdir = ${docdir}
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+srcdir = .
+sysconfdir = ${prefix}/etc
+target = arm-unknown-linux-gnu
+target_alias = arm-linux
+target_cpu = arm
+target_os = linux-gnu
+target_vendor = unknown
+top_build_prefix = ../
+top_builddir = ..
+top_srcdir = ..
+lib_LTLIBRARIES = libtext.la
+libtext_la_SOURCES = libtext.c
+libtext_la_CFLAGS = $(COMMON_CFLAGS) $(SDL_CFLAGS) -I$(BGD_PATH)/include -I$(BGD_PATH)/bgdrtm/include -I. -I../libfont/ -I../librender/ -I../libblit/ -I../libgrbase/
+libtext_la_LDFLAGS = -s -module -no-undefined -avoid-version
+libtext_la_LIBADD = $(COMMON_LDFLAGS) -L$(BGD_PATH)/bgdrtm/src/.libs -lbgdrtm -L../libfont/.libs -lfont -L../librender/.libs -lrender -L../libblit/.libs -lblit -L../libgrbase/.libs -lgrbase
+CLEANFILES = libtext.la
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: # $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libtext/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu libtext/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: # $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): # $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+ list2=; for p in $$list; do \
+ if test -f $$p; then \
+ list2="$$list2 $$p"; \
+ else :; fi; \
+ done; \
+ test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
+ }
+
+uninstall-libLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
+ done
+
+clean-libLTLIBRARIES:
+ -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+ @list='$(lib_LTLIBRARIES)'; \
+ locs=`for p in $$list; do echo $$p; done | \
+ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+ sort -u`; \
+ test -z "$$locs" || { \
+ echo rm -f $${locs}; \
+ rm -f $${locs}; \
+ }
+libtext.la: $(libtext_la_OBJECTS) $(libtext_la_DEPENDENCIES) $(EXTRA_libtext_la_DEPENDENCIES)
+ $(libtext_la_LINK) -rpath $(libdir) $(libtext_la_OBJECTS) $(libtext_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+include ./$(DEPDIR)/libtext_la-libtext.Plo
+
+.c.o:
+ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+# source='$<' object='$@' libtool=no \
+# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+# $(COMPILE) -c $<
+
+.c.obj:
+ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+# source='$<' object='$@' libtool=no \
+# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+# $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+# source='$<' object='$@' libtool=yes \
+# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+# $(LTCOMPILE) -c -o $@ $<
+
+libtext_la-libtext.lo: libtext.c
+ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtext_la_CFLAGS) $(CFLAGS) -MT libtext_la-libtext.lo -MD -MP -MF $(DEPDIR)/libtext_la-libtext.Tpo -c -o libtext_la-libtext.lo `test -f 'libtext.c' || echo '$(srcdir)/'`libtext.c
+ $(am__mv) $(DEPDIR)/libtext_la-libtext.Tpo $(DEPDIR)/libtext_la-libtext.Plo
+# source='libtext.c' object='libtext_la-libtext.lo' libtool=yes \
+# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+# $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtext_la_CFLAGS) $(CFLAGS) -c -o libtext_la-libtext.lo `test -f 'libtext.c' || echo '$(srcdir)/'`libtext.c
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+cscopelist: $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES)
+installdirs:
+ for dir in "$(DESTDIR)$(libdir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-libLTLIBRARIES
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-libLTLIBRARIES
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libLTLIBRARIES clean-libtool cscopelist ctags distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am \
+ install-libLTLIBRARIES install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags uninstall uninstall-am uninstall-libLTLIBRARIES
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/modules/libtext/Makefile.am b/modules/libtext/Makefile.am
new file mode 100644
index 0000000..7fe6cb2
--- /dev/null
+++ b/modules/libtext/Makefile.am
@@ -0,0 +1,14 @@
+## Process this file with automake to produce Makefile.in
+
+#AUTOMAKE_OPTIONS = no-dependencies foreign
+
+lib_LTLIBRARIES = libtext.la
+
+libtext_la_SOURCES = libtext.c
+libtext_la_CFLAGS = $(COMMON_CFLAGS) $(SDL_CFLAGS) -I$(BGD_PATH)/include -I$(BGD_PATH)/bgdrtm/include -I. -I../libfont/ -I../librender/ -I../libblit/ -I../libgrbase/
+libtext_la_LDFLAGS = -s -module -no-undefined -avoid-version
+libtext_la_LIBADD = $(COMMON_LDFLAGS) -L$(BGD_PATH)/bgdrtm/src/.libs -lbgdrtm -L../libfont/.libs -lfont -L../librender/.libs -lrender -L../libblit/.libs -lblit -L../libgrbase/.libs -lgrbase
+
+## Make sure these will be cleaned even when they're not built by
+## default.
+CLEANFILES = libtext.la
diff --git a/modules/libtext/Makefile.in b/modules/libtext/Makefile.in
new file mode 100644
index 0000000..1141b00
--- /dev/null
+++ b/modules/libtext/Makefile.in
@@ -0,0 +1,609 @@
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+#AUTOMAKE_OPTIONS = no-dependencies foreign
+
+VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = libtext
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(top_srcdir)/depcomp
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__installdirs = "$(DESTDIR)$(libdir)"
+LTLIBRARIES = $(lib_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+libtext_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am_libtext_la_OBJECTS = libtext_la-libtext.lo
+libtext_la_OBJECTS = $(am_libtext_la_OBJECTS)
+libtext_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libtext_la_CFLAGS) \
+ $(CFLAGS) $(libtext_la_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I.@am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+SOURCES = $(libtext_la_SOURCES)
+DIST_SOURCES = $(libtext_la_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BGD_PATH = @BGD_PATH@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+COMMON_CFLAGS = @COMMON_CFLAGS@
+COMMON_LDFLAGS = @COMMON_LDFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DESLIBS = @DESLIBS@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+PNGLIBS = @PNGLIBS@
+PNG_CFLAGS = @PNG_CFLAGS@
+PNG_LIBS = @PNG_LIBS@
+RANLIB = @RANLIB@
+SDL_CFLAGS = @SDL_CFLAGS@
+SDL_LIBS = @SDL_LIBS@
+SDL_mixer_CFLAGS = @SDL_mixer_CFLAGS@
+SDL_mixer_LIBS = @SDL_mixer_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+WINDRES = @WINDRES@
+X11LIBS = @X11LIBS@
+ZLIBS = @ZLIBS@
+ZLIB_CFLAGS = @ZLIB_CFLAGS@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+lib_LTLIBRARIES = libtext.la
+libtext_la_SOURCES = libtext.c
+libtext_la_CFLAGS = $(COMMON_CFLAGS) $(SDL_CFLAGS) -I$(BGD_PATH)/include -I$(BGD_PATH)/bgdrtm/include -I. -I../libfont/ -I../librender/ -I../libblit/ -I../libgrbase/
+libtext_la_LDFLAGS = -s -module -no-undefined -avoid-version
+libtext_la_LIBADD = $(COMMON_LDFLAGS) -L$(BGD_PATH)/bgdrtm/src/.libs -lbgdrtm -L../libfont/.libs -lfont -L../librender/.libs -lrender -L../libblit/.libs -lblit -L../libgrbase/.libs -lgrbase
+CLEANFILES = libtext.la
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libtext/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu libtext/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+ list2=; for p in $$list; do \
+ if test -f $$p; then \
+ list2="$$list2 $$p"; \
+ else :; fi; \
+ done; \
+ test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
+ }
+
+uninstall-libLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
+ done
+
+clean-libLTLIBRARIES:
+ -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+ @list='$(lib_LTLIBRARIES)'; \
+ locs=`for p in $$list; do echo $$p; done | \
+ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+ sort -u`; \
+ test -z "$$locs" || { \
+ echo rm -f $${locs}; \
+ rm -f $${locs}; \
+ }
+libtext.la: $(libtext_la_OBJECTS) $(libtext_la_DEPENDENCIES) $(EXTRA_libtext_la_DEPENDENCIES)
+ $(libtext_la_LINK) -rpath $(libdir) $(libtext_la_OBJECTS) $(libtext_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtext_la-libtext.Plo@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+
+libtext_la-libtext.lo: libtext.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtext_la_CFLAGS) $(CFLAGS) -MT libtext_la-libtext.lo -MD -MP -MF $(DEPDIR)/libtext_la-libtext.Tpo -c -o libtext_la-libtext.lo `test -f 'libtext.c' || echo '$(srcdir)/'`libtext.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libtext_la-libtext.Tpo $(DEPDIR)/libtext_la-libtext.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libtext.c' object='libtext_la-libtext.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtext_la_CFLAGS) $(CFLAGS) -c -o libtext_la-libtext.lo `test -f 'libtext.c' || echo '$(srcdir)/'`libtext.c
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+cscopelist: $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES)
+installdirs:
+ for dir in "$(DESTDIR)$(libdir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-libLTLIBRARIES
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-libLTLIBRARIES
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libLTLIBRARIES clean-libtool cscopelist ctags distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am \
+ install-libLTLIBRARIES install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags uninstall uninstall-am uninstall-libLTLIBRARIES
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/modules/libtext/libtext.c b/modules/libtext/libtext.c
new file mode 100644
index 0000000..3403dfe
--- /dev/null
+++ b/modules/libtext/libtext.c
@@ -0,0 +1,934 @@
+/*
+ * Copyright © 2006-2016 SplinterGU (Fenix/Bennugd)
+ * Copyright © 2002-2006 Fenix Team (Fenix)
+ * Copyright © 1999-2002 José Luis Cebrián Pagüe (Fenix)
+ *
+ * This file is part of Bennu - Game Development
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty. In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ * claim that you wrote the original software. If you use this software
+ * in a product, an acknowledgment in the product documentation would be
+ * appreciated but is not required.
+ *
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ * misrepresented as being the original software.
+ *
+ * 3. This notice may not be removed or altered from any source
+ * distribution.
+ *
+ */
+
+/* --------------------------------------------------------------------------- */
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "bgdrtm.h"
+
+#include "bgddl.h"
+#include "dlvaracc.h"
+
+#include "xstrings.h"
+
+#include "libblit.h"
+#include "librender.h"
+
+#include "libtext.h"
+
+#include "libtext_exports.h"
+
+/* --------------------------------------------------------------------------- */
+
+int fntcolor8 = -1 ;
+int fntcolor16 = 0xFFFF;
+int fntcolor32 = 0xFFFFFFFF;
+
+/* --------------------------------------------------------------------------- */
+
+typedef struct _text
+{
+ int id ;
+ int on ; /* 1 - Texto ; 2 - VarSTR; 3 - VarINT; 4 - VarFLOAT; 5 - VarWORD; 6 - VarBYTE */
+ int fontid ;
+ int x ;
+ int y ;
+ int z ;
+ int alignment ;
+ int color8 ;
+ int color16 ;
+ int color32 ;
+ int objectid ;
+ int last_value ;
+ char * text ; /* Memoria dinámica */
+ const void * var ; /* CHANGED TO VOID to allow diff. data types */
+ int last_z ;
+ int last_color8 ;
+ int last_color16 ;
+ int last_color32 ;
+ /* Internals, for speed up */
+ int _x ;
+ int _y ;
+ int _width;
+ int _height;
+} TEXT;
+
+TEXT texts[MAX_TEXTS] ;
+
+int text_nextid = 1 ;
+int text_count = 0 ;
+
+/* --------------------------------------------------------------------------- */
+
+int gr_text_height_no_margin( int fontid, const unsigned char * text );
+int gr_text_widthn( int fontid, const unsigned char * text, int n );
+
+/* --------------------------------------------------------------------------- */
+
+enum {
+ TEXTZ = 0,
+ TEXT_FLAGS
+};
+
+/* --------------------------------------------------------------------------- */
+/* Son las variables que se desea acceder. */
+/* El interprete completa esta estructura, si la variable existe. */
+/* (usada en tiempo de ejecucion) */
+
+DLVARFIXUP __bgdexport( libtext, globals_fixup )[] =
+{
+ /* Nombre de variable global, puntero al dato, tamaño del elemento, cantidad de elementos */
+ { "text_z" , NULL, -1, -1 },
+ { "text_flags" , NULL, -1, -1 },
+ { NULL , NULL, -1, -1 }
+};
+
+/* --------------------------------------------------------------------------- */
+/*
+ * FUNCTION : get_text
+ *
+ * Returns the character string of a given text
+ * (may be the representation of a integer or float value)
+ *
+ * PARAMS :
+ * text Pointer to the text object
+ *
+ * RETURN VALUE :
+ * String contained within the text
+ *
+ */
+
+static const char * get_text( TEXT * text )
+{
+ static char buffer[64];
+
+ switch ( text->on )
+ {
+ case TEXT_TEXT:
+ return text->text;
+
+ case TEXT_STRING:
+ return string_get( *( int* )text->var ) ;
+
+ case TEXT_INT:
+ _string_ntoa( buffer, *( int * )text->var ) ;
+ return buffer ;
+
+ case TEXT_DWORD:
+ _string_utoa( buffer, *( int * )text->var ) ;
+ return buffer ;
+
+ case TEXT_FLOAT:
+ {
+ char * aux;
+ sprintf( buffer, "%f", *( float * )text->var ) ;
+ aux = buffer + 1; // We know that buffer contain at least 2 chars, skip first
+ while ( *( aux + 1 ) ) aux++; // We can test for pointer + 1 because we know that buffer contain at least 2 chars
+ while ( *aux == '0' && *( aux - 1 ) != '.' ) *aux-- = '\0';
+ return buffer ;
+ }
+
+ case TEXT_BYTE:
+ _string_utoa( buffer, *( uint8_t * )text->var ) ;
+ return buffer ;
+
+ case TEXT_SBYTE:
+ _string_ntoa( buffer, *( int8_t * )text->var ) ;
+ return buffer ;
+
+ case TEXT_CHAR:
+ *buffer = *( uint8_t * )text->var ;
+ *( buffer + 1 ) = '\0';
+ return buffer ;
+
+ case TEXT_WORD:
+ _string_utoa( buffer, *( uint16_t * )text->var ) ;
+ return buffer ;
+
+ case TEXT_SHORT:
+ _string_ntoa( buffer, *( int16_t * )text->var ) ;
+ return buffer ;
+
+ case TEXT_CHARARRAY:
+ return ( const char * )( text->var );
+
+ case TEXT_POINTER:
+ _string_ptoa( buffer, *( void ** ) text->var );
+ return buffer ;
+ }
+
+ return NULL;
+}
+
+/* --------------------------------------------------------------------------- */
+/*
+ * FUNCTION : info_text
+ *
+ * Returns information about a text object
+ *
+ * PARAMS :
+ * text Pointer to the text object
+ * bbox Region to update with the text bounding box
+ *
+ * RETURN VALUE :
+ * 1 if the text has changed since last frame
+ *
+ */
+
+static int info_text( TEXT * text, REGION * bbox, int * z, int * drawme )
+{
+ const char * str = get_text( text );
+ REGION prev = *bbox;
+ FONT * font;
+ int changed = 0;
+
+ * drawme = 0;
+
+ // Splinter
+ if ( !str || !*str )
+ {
+ /* bbox->x = -2;
+ bbox->y = -2;
+ bbox->x2 = -2;
+ bbox->y2 = -2; */
+ return 0;
+ }
+
+ font = gr_font_get( text->fontid );
+ if ( !font )
+ {
+ /* bbox->x = -2;
+ bbox->y = -2;
+ bbox->x2 = -2;
+ bbox->y2 = -2; */
+ return 0;
+ }
+
+ * drawme = 1;
+
+ * z = text->z;
+
+ /* Calculate the text dimensions */
+
+ text->_x = text->x;
+ text->_y = text->y;
+ text->_width = gr_text_width( text->fontid, ( const unsigned char * ) str );
+ text->_height = gr_text_height_no_margin( text->fontid, ( const unsigned char * ) str );
+
+ /* Update the font's maxheight (if needed) */
+
+ if ( !font->maxheight )
+ {
+ int c;
+
+ for ( c = 0 ; c < 256 ; c++ )
+ {
+ if ( !font->glyph[c].bitmap ) continue;
+ if ( font->maxheight < ( int )font->glyph[c].bitmap->height + font->glyph[c].yoffset )
+ font->maxheight = ( int )font->glyph[c].bitmap->height + font->glyph[c].yoffset;
+ }
+ }
+
+ /* Adjust top-left coordinates for text alignment */
+
+ switch ( text->alignment )
+ {
+ case ALIGN_TOP: // 1
+ case ALIGN_CENTER: // 4
+ case ALIGN_BOTTOM: // 7
+ text->_x -= text->_width / 2;
+ break;
+
+ case ALIGN_TOP_RIGHT: // 2
+ case ALIGN_CENTER_RIGHT: // 5
+ case ALIGN_BOTTOM_RIGHT: // 8
+ text->_x -= text->_width - 1;
+ break;
+ }
+
+ switch ( text->alignment )
+ {
+ case ALIGN_CENTER_LEFT: // 3
+ case ALIGN_CENTER: // 4
+ case ALIGN_CENTER_RIGHT: // 5
+ text->_y -= font->maxheight / 2;
+ break;
+
+ case ALIGN_BOTTOM_LEFT: // 6
+ case ALIGN_BOTTOM: // 7
+ case ALIGN_BOTTOM_RIGHT: // 8
+ text->_y -= font->maxheight - 1;
+ break;
+ }
+
+ /* Fill the bounding box */
+
+ bbox->x = text->_x;
+ bbox->y = text->_y;
+ bbox->x2 = text->_x + text->_width - 1;
+ bbox->y2 = text->_y + text->_height - 1;
+
+ /* Check if the var has changed since last call */
+
+ changed =
+ text->color8 != text->last_color8 ||
+ text->color16 != text->last_color16 ||
+ text->color32 != text->last_color32 ||
+ text->z != text->last_z ||
+ bbox->x != prev.x || bbox->y != prev.y ||
+ bbox->x2 != prev.x2 || bbox->y2 != prev.y2;
+
+ text->last_z = text->z;
+ text->last_color8 = text->color8;
+ text->last_color16 = text->color16;
+ text->last_color32 = text->color32;
+
+ switch ( text->on )
+ {
+ case TEXT_TEXT:
+ return changed;
+
+ case TEXT_STRING:
+ case TEXT_FLOAT:
+ case TEXT_INT:
+ case TEXT_DWORD:
+ case TEXT_POINTER:
+ if ( text->last_value == *( int * )text->var ) return changed;
+ text->last_value = *( int * )text->var;
+ return 1;
+
+ case TEXT_BYTE:
+ case TEXT_SBYTE:
+ case TEXT_CHAR:
+ if ( text->last_value == *( uint8_t * )text->var ) return changed;
+ text->last_value = *( uint8_t * )text->var;
+ return 1;
+
+ case TEXT_WORD:
+ case TEXT_SHORT:
+ if ( text->last_value == *( uint16_t * )text->var ) return changed;
+ text->last_value = *( uint16_t * )text->var;
+ return 1;
+
+ case TEXT_CHARARRAY:
+ return 1;
+ }
+
+ return changed;
+}
+
+/* --------------------------------------------------------------------------- */
+/*
+ * FUNCTION : draw_text
+ *
+ * Draws a text object
+ *
+ * PARAMS :
+ * text Pointer to the text object
+ * clip Clipping region
+ *
+ * RETURN VALUE :
+ * None
+ *
+ */
+
+void draw_text( TEXT * text, REGION * clip )
+{
+ const char * str = get_text( text );
+ int save8, save16, save32;
+ FONT * font;
+
+ // Splinter
+ if ( !str ) return;
+
+ font = gr_font_get( text->fontid );
+ if ( !font )
+ {
+ gr_text_destroy( text->id );
+ return;
+ }
+
+ /* Draw the text */
+
+ save8 = fntcolor8;
+ save16 = fntcolor16;
+ save32 = fntcolor32;
+
+ fntcolor8 = text->color8;
+ fntcolor16 = text->color16;
+ fntcolor32 = text->color32;
+
+ if ( !gr_text_put( 0, clip, text->fontid, text->_x, text->_y, ( const unsigned char * ) str ) ) gr_text_destroy( text->id );
+
+ fntcolor8 = save8;
+ fntcolor16 = save16;
+ fntcolor32 = save32;
+}
+
+/* --------------------------------------------------------------------------- */
+/*
+ * FUNCTION : gr_text_new2
+ *
+ * Create a new text, using a fixed text string
+ *
+ * PARAMS :
+ * fontid Font number
+ * x, y, z Screen coordinates
+ * alignment Alignment
+ * text Pointer to text
+ *
+ * RETURN VALUE :
+ * None
+ *
+ */
+
+int gr_text_new2( int fontid, int x, int y, int z, int alignment, const char * text )
+{
+ int textid = text_nextid ;
+
+ if ( text_nextid == MAX_TEXTS )
+ {
+ for ( textid = 1 ; textid < MAX_TEXTS ; textid++ ) if ( !texts[textid].on ) break ;
+
+ if ( textid == MAX_TEXTS ) return 0; // error ("Demasiados textos en pantalla") ;
+ }
+ else
+ text_nextid++ ;
+
+ text_count++ ;
+
+ texts[textid].id = textid ;
+ texts[textid].on = TEXT_TEXT ;
+ texts[textid].fontid = fontid ;
+ texts[textid].x = x ;
+ texts[textid].y = y ;
+ texts[textid].z = z ;
+ texts[textid].alignment = alignment ;
+ texts[textid].text = text ? strdup( text ) : 0 ;
+ texts[textid].color8 = fntcolor8 ;
+ texts[textid].color16 = fntcolor16 ;
+ texts[textid].color32 = fntcolor32 ;
+ texts[textid].objectid = gr_new_object( texts[textid].z, info_text, draw_text, &texts[textid] );
+ texts[textid].last_value = 0 ;
+ texts[textid].last_z = 0 ;
+
+ return textid ;
+}
+
+/* --------------------------------------------------------------------------- */
+/*
+ * FUNCTION : gr_text_new
+ *
+ * Create a new text, using a fixed text string
+ *
+ * PARAMS :
+ * fontid Font number
+ * x, y Screen coordinates
+ * alignment Alignment
+ * text Pointer to text
+ *
+ * RETURN VALUE :
+ * None
+ *
+ */
+
+int gr_text_new( int fontid, int x, int y, int alignment, const char * text )
+{
+ return gr_text_new2( fontid, x, y, GLOINT32( libtext, TEXTZ ), alignment, text );
+}
+
+/* --------------------------------------------------------------------------- */
+
+int gr_text_new_var( int fontid, int x, int y, int alignment, const void * var, int type )
+{
+ int textid = gr_text_new( fontid, x, y, alignment, 0 ) ;
+ if ( !textid ) return 0 ;
+ texts[textid].on = type ;
+ if ( type > TEXT_TEXT ) texts[textid].var = var ;
+ return textid ;
+}
+
+/* --------------------------------------------------------------------------- */
+
+int gr_text_new_var2( int fontid, int x, int y, int z, int alignment, const void * var, int type )
+{
+ int textid = gr_text_new2( fontid, x, y, z, alignment, 0 ) ;
+ if ( !textid ) return 0 ;
+ texts[textid].on = type ;
+ if ( type > TEXT_TEXT ) texts[textid].var = var ;
+ return textid ;
+}
+
+/* --------------------------------------------------------------------------- */
+
+void gr_text_move( int textid, int x, int y )
+{
+ if ( textid > 0 && textid < text_nextid )
+ {
+ texts[textid].x = x ;
+ texts[textid].y = y ;
+ }
+}
+
+/* --------------------------------------------------------------------------- */
+
+void gr_text_move2( int textid, int x, int y, int z )
+{
+ if ( textid > 0 && textid < text_nextid )
+ {
+ texts[textid].x = x ;
+ texts[textid].y = y ;
+ texts[textid].z = z ;
+ }
+}
+
+/* --------------------------------------------------------------------------- */
+
+void gr_text_destroy( int textid )
+{
+ if ( !textid )
+ {
+ for ( textid = 1 ; textid < text_nextid ; textid++ )
+ {
+ if ( texts[textid].on )
+ {
+ gr_destroy_object( texts[textid].objectid );
+ if ( texts[textid].text ) free( texts[textid].text ) ;
+ texts[textid].on = 0 ;
+ }
+ }
+ text_count = 0 ;
+ text_nextid = 1 ;
+ return ;
+ }
+ if ( textid > 0 && textid < text_nextid )
+ {
+ if ( !texts[textid].on ) return ;
+
+ gr_destroy_object( texts[textid].objectid );
+ if ( texts[textid].text ) free( texts[textid].text ) ;
+ texts[textid].on = 0 ;
+ if ( textid == text_nextid - 1 )
+ {
+ while ( text_nextid > 1 && !texts[text_nextid-1].on ) text_nextid-- ;
+ }
+ text_count-- ;
+ }
+}
+
+/* --------------------------------------------------------------------------- */
+
+int gr_text_width( int fontid, const unsigned char * text )
+{
+ return gr_text_widthn( fontid, text, strlen( ( char * ) text ) );
+}
+
+/* --------------------------------------------------------------------------- */
+
+int gr_text_widthn( int fontid, const unsigned char * text, int n )
+{
+ int l = 0 ;
+ FONT * f ;
+
+ if ( !text || !*text ) return 0;
+ if ( fontid < 0 || fontid >= MAX_FONTS || !fonts[fontid] ) return 0; // Incorrect font type
+
+ f = fonts[fontid] ;
+
+ while ( *text && n-- )
+ {
+ switch ( f->charset )
+ {
+ case CHARSET_ISO8859:
+ l += f->glyph[dos_to_win[*text]].xadvance ;
+ break;
+
+ case CHARSET_CP850:
+ l += f->glyph[*text].xadvance ;
+ break;
+ }
+ text++;
+ }
+ return l ;
+}
+
+/* --------------------------------------------------------------------------- */
+
+int gr_text_margintop( int fontid, const unsigned char * text )
+{
+ int minyoffset = 0x7FFFFFFF ;
+ FONT * f ;
+
+ if ( !text || !*text ) return 0;
+ if ( fontid < 0 || fontid >= MAX_FONTS || !fonts[fontid] ) return 0; // Incorrect font type
+
+ f = fonts[fontid] ;
+
+ while ( *text )
+ {
+ switch ( f->charset )
+ {
+ case CHARSET_ISO8859:
+ if ( minyoffset > f->glyph[dos_to_win[*text]].yoffset )
+ minyoffset = f->glyph[dos_to_win[*text]].yoffset;
+ break;
+
+ case CHARSET_CP850:
+ if ( minyoffset > f->glyph[*text].yoffset )
+ minyoffset = f->glyph[*text].yoffset;
+ break;
+ }
+ text++ ;
+ }
+ return minyoffset ;
+}
+
+/* --------------------------------------------------------------------------- */
+
+int gr_text_height_no_margin( int fontid, const unsigned char * text )
+{
+ int l = 0;
+ FONT * f ;
+
+ if ( !text || !*text ) return 0;
+ if ( fontid < 0 || fontid >= MAX_FONTS || !fonts[fontid] ) return 0; // Incorrect font type
+
+ f = fonts[fontid] ;
+
+ while ( *text )
+ {
+ if ( f->glyph[*text].bitmap )
+ {
+ switch ( f->charset )
+ {
+ case CHARSET_ISO8859:
+ if ( l < f->glyph[dos_to_win[*text]].yoffset + ( int )f->glyph[dos_to_win[*text]].bitmap->height )
+ {
+ l = f->glyph[dos_to_win[*text]].yoffset + ( int )f->glyph[dos_to_win[*text]].bitmap->height ;
+ }
+ break;
+
+ case CHARSET_CP850:
+ if ( l < f->glyph[*text].yoffset + ( int )f->glyph[*text].bitmap->height )
+ {
+ l = f->glyph[*text].yoffset + ( int )f->glyph[*text].bitmap->height ;
+ }
+ break;
+ }
+ }
+ text++ ;
+ }
+ return l ;
+}
+
+/* --------------------------------------------------------------------------- */
+
+int gr_text_height( int fontid, const unsigned char * text )
+{
+ int l = gr_text_height_no_margin( fontid, text );
+ if ( l ) l -= gr_text_margintop( fontid, text );
+ return l ;
+}
+
+/* --------------------------------------------------------------------------- */
+
+int gr_text_put( GRAPH * dest, REGION * clip, int fontid, int x, int y, const unsigned char * text )
+{
+ GRAPH * ch ;
+ FONT * f ;
+ uint8_t current_char;
+ int flags ;
+ int save8, save16, save32;
+
+ if ( !text || !*text ) return -1;
+ if ( fontid < 0 || fontid >= MAX_FONTS || !fonts[fontid] ) return 0; // Incorrect font type
+
+ if ( !dest ) dest = scrbitmap ;
+
+ f = fonts[fontid] ;
+
+ flags = GLODWORD( libtext, TEXT_FLAGS );
+
+ save8 = pixel_color8;
+ save16 = pixel_color16;
+ save32 = pixel_color32;
+
+ if ( fntcolor8 == -1 )
+ {
+ gr_setcolor(( dest->format->depth == 8 ) ? gr_find_nearest_color( 255, 255, 255 ) : gr_rgb_depth( dest->format->depth, 255, 255, 255 ) );
+ }
+ else
+ {
+ pixel_color8 = fntcolor8;
+ pixel_color16 = fntcolor16;
+ pixel_color32 = fntcolor32;
+ }
+
+ while ( *text )
+ {
+ switch ( f->charset )
+ {
+ case CHARSET_ISO8859:
+ current_char = dos_to_win[*text];
+ break;
+
+ case CHARSET_CP850:
+ current_char = *text;
+ break;
+
+ default:
+ current_char = 0;
+ break;
+ }
+
+ ch = f->glyph[current_char].bitmap ;
+ if ( ch )
+ {
+ gr_blit( dest, clip, x + f->glyph[current_char].xoffset, y + f->glyph[current_char].yoffset, flags, ch ) ;
+ }
+ x += f->glyph[current_char].xadvance ;
+ text++ ;
+ }
+
+ pixel_color8 = save8;
+ pixel_color16 = save16;
+ pixel_color32 = save32;
+
+ return 1;
+}
+
+/* --------------------------------------------------------------------------- */
+
+GRAPH * gr_text_bitmap( int fontid, const char * text, int alignment )
+{
+ GRAPH * gr ;
+ int x, y ;
+ FONT * f ;
+
+ // Splinter
+ if ( !text || !*text ) return NULL;
+ if ( fontid < 0 || fontid >= MAX_FONTS || !fonts[fontid] ) return NULL; // Incorrect font type
+
+ f = fonts[fontid] ;
+
+ /* Un refresco de paleta en mitad de gr_text_put puede provocar efectos
+ * desagradables al modificar el tipo de letra del sistema */
+
+ if ( palette_changed ) gr_refresh_palette() ;
+
+ gr = bitmap_new_syslib( gr_text_width( fontid, ( const unsigned char * ) text ), gr_text_height( fontid, ( const unsigned char * ) text ), sys_pixel_format->depth ) ;
+ if ( !gr ) return NULL;
+
+ gr_clear( gr ) ;
+ if ( !gr_text_put( gr, 0, fontid, 0, -gr_text_margintop( fontid, ( const unsigned char * ) text ), ( const unsigned char * ) text ) )
+ {
+ bitmap_destroy( gr );
+ return NULL;
+ }
+
+ switch ( alignment )
+ {
+ case ALIGN_TOP_LEFT: // 0
+ case ALIGN_TOP: // 1
+ case ALIGN_TOP_RIGHT: // 2
+ y = 0 ;
+ break ;
+
+ case ALIGN_CENTER_LEFT: // 3
+ case ALIGN_CENTER: // 4
+ case ALIGN_CENTER_RIGHT:// 5
+ y = gr->height / 2 ;
+ break ;
+
+ default:
+ y = gr->height - 1 ;
+ break ;
+
+ }
+
+ switch ( alignment )
+ {
+ case ALIGN_TOP_LEFT: // 0
+ case ALIGN_CENTER_LEFT: // 3
+ case ALIGN_BOTTOM_LEFT: // 6
+ x = 0 ;
+ break ;
+
+ case ALIGN_TOP: // 1
+ case ALIGN_CENTER: // 4
+ case ALIGN_BOTTOM: // 7
+ x = gr->width / 2 ;
+ break ;
+
+ default:
+ x = gr->width - 1 ;
+ break ;
+
+ }
+
+ bitmap_add_cpoint( gr, x, y ) ;
+ return gr ;
+}
+
+/* --------------------------------------------------------------------------- */
+
+void gr_text_setcolor( int c )
+{
+ int r, g, b;
+
+ if ( !c )
+ {
+ fntcolor8 = 0;
+ fntcolor16 = 0;
+ fntcolor32 = 0;
+ }
+ else
+ {
+ switch ( sys_pixel_format->depth )
+ {
+ case 8:
+ {
+ fntcolor8 = c ;
+ break;
+ }
+
+ case 16:
+ {
+ gr_get_rgb( c, &r, &g, &b );
+ fntcolor8 = gr_find_nearest_color( r, g, b );
+ fntcolor16 = c ;
+ break;
+ }
+ case 32:
+ {
+ gr_get_rgb( c, &r, &g, &b );
+ fntcolor8 = gr_find_nearest_color( r, g, b );
+ fntcolor32 = c ;
+ break;
+ }
+ }
+ }
+}
+
+/* --------------------------------------------------------------------------- */
+
+void gr_text_setcolor2( int textid, int c )
+{
+ int r, g, b;
+
+ if ( textid > 0 && textid < text_nextid )
+ {
+ if ( !c )
+ {
+ texts[textid].color8 = 0;
+ texts[textid].color16 = 0;
+ texts[textid].color32 = 0;
+ }
+ else
+ {
+ switch ( sys_pixel_format->depth )
+ {
+ case 8:
+ {
+ texts[textid].color8 = c ;
+ break;
+ }
+
+ case 16:
+ {
+ gr_get_rgb( c, &r, &g, &b );
+ texts[textid].color8 = gr_find_nearest_color( r, g, b );
+ texts[textid].color16 = c ;
+ break;
+ }
+ case 32:
+ {
+ gr_get_rgb( c, &r, &g, &b );
+ texts[textid].color8 = gr_find_nearest_color( r, g, b );
+ texts[textid].color32 = c ;
+ break;
+ }
+ }
+ }
+ }
+}
+
+/* --------------------------------------------------------------------------- */
+
+int gr_text_getcolor()
+{
+ switch ( sys_pixel_format->depth )
+ {
+ case 8:
+ {
+ return fntcolor8 ;
+ }
+
+ case 16:
+ {
+ return fntcolor16 ;
+ }
+ case 32:
+ {
+ return fntcolor32 ;
+ }
+ }
+
+ return 0;
+}
+
+/* --------------------------------------------------------------------------- */
+
+int gr_text_getcolor2( int textid )
+{
+ if ( textid > 0 && textid < text_nextid )
+ {
+ switch ( sys_pixel_format->depth )
+ {
+ case 8:
+ {
+ return texts[textid].color8 ;
+ }
+
+ case 16:
+ {
+ return texts[textid].color16 ;
+ }
+ case 32:
+ {
+ return texts[textid].color32 ;
+ }
+ }
+ }
+
+ return 0;
+}
+
+/* --------------------------------------------------------------------------- */
diff --git a/modules/libtext/libtext.h b/modules/libtext/libtext.h
new file mode 100644
index 0000000..a7478ff
--- /dev/null
+++ b/modules/libtext/libtext.h
@@ -0,0 +1,99 @@
+/*
+ * Copyright © 2006-2013 SplinterGU (Fenix/Bennugd)
+ * Copyright © 2002-2006 Fenix Team (Fenix)
+ * Copyright © 1999-2002 José Luis Cebrián Pagüe (Fenix)
+ *
+ * This file is part of Bennu - Game Development
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty. In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ * claim that you wrote the original software. If you use this software
+ * in a product, an acknowledgment in the product documentation would be
+ * appreciated but is not required.
+ *
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ * misrepresented as being the original software.
+ *
+ * 3. This notice may not be removed or altered from any source
+ * distribution.
+ *
+ */
+
+#ifndef __TEXT_H
+#define __TEXT_H
+
+/* --------------------------------------------------------------------------- */
+
+#ifndef __BGDC__
+#include "libgrbase.h"
+#include "libfont.h"
+#endif
+
+/* --------------------------------------------------------------------------- */
+
+#define MAX_TEXTS 512
+
+// Tipos para gr_text_new_var
+
+#define TEXT_TEXT 1
+#define TEXT_STRING 2
+#define TEXT_INT 3
+#define TEXT_FLOAT 4
+#define TEXT_WORD 5
+#define TEXT_BYTE 6
+#define TEXT_CHARARRAY 7
+#define TEXT_SHORT 8
+#define TEXT_DWORD 9
+#define TEXT_SBYTE 10
+#define TEXT_CHAR 11
+#define TEXT_POINTER 12
+
+/* Alineacion para textos */
+#define ALIGN_TOP_LEFT 0
+#define ALIGN_TOP 1
+#define ALIGN_TOP_RIGHT 2
+#define ALIGN_CENTER_LEFT 3
+#define ALIGN_CENTER 4
+#define ALIGN_CENTER_RIGHT 5
+#define ALIGN_BOTTOM_LEFT 6
+#define ALIGN_BOTTOM 7
+#define ALIGN_BOTTOM_RIGHT 8
+
+#ifndef __BGDC__
+
+/* --------------------------------------------------------------------------- */
+
+extern int fntcolor ; /* Color for drawing bitmap text */
+
+/* --------------------------------------------------------------------------- */
+
+extern void gr_text_setcolor( int c ) ;
+extern void gr_text_setcolor2( int textid, int c ) ;
+extern int gr_text_getcolor() ;
+extern int gr_text_getcolor2( int textid ) ;
+extern int gr_text_new( int fontid, int x, int y, int centered, const char * text ) ;
+extern int gr_text_new2( int fontid, int x, int y, int z, int centered, const char * text ) ;
+extern int gr_text_new_var( int fontid, int x, int y, int centered, const void * var, int type ) ;
+extern int gr_text_new_var2( int fontid, int x, int y, int z, int centered, const void * var, int type ) ;
+extern void gr_text_move( int textid, int x, int y ) ;
+extern void gr_text_move2( int textid, int x, int y, int z ) ;
+extern void gr_text_destroy( int textid ) ;
+extern int gr_text_margintop( int fontid, const unsigned char * text ) ;
+extern int gr_text_width( int fontid, const unsigned char * text ) ;
+extern int gr_text_widthn( int fontid, const unsigned char * text, int n ) ;
+extern int gr_text_height( int fontid, const unsigned char * text ) ;
+extern int gr_text_put( GRAPH * dest, REGION * region, int fontid, int x, int y, const unsigned char * text ) ;
+extern GRAPH * gr_text_bitmap( int fontid, const char * text, int centered ) ;
+
+/* --------------------------------------------------------------------------- */
+
+#endif
+
+#endif
diff --git a/modules/libtext/libtext_exports.h b/modules/libtext/libtext_exports.h
new file mode 100644
index 0000000..d00bcdb
--- /dev/null
+++ b/modules/libtext/libtext_exports.h
@@ -0,0 +1,63 @@
+/*
+ * Copyright © 2006-2013 SplinterGU (Fenix/Bennugd)
+ * Copyright © 2002-2006 Fenix Team (Fenix)
+ * Copyright © 1999-2002 José Luis Cebrián Pagüe (Fenix)
+ *
+ * This file is part of Bennu - Game Development
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty. In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ * claim that you wrote the original software. If you use this software
+ * in a product, an acknowledgment in the product documentation would be
+ * appreciated but is not required.
+ *
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ * misrepresented as being the original software.
+ *
+ * 3. This notice may not be removed or altered from any source
+ * distribution.
+ *
+ */
+
+#ifndef __LIBTEXT_EXPORTS
+#define __LIBTEXT_EXPORTS
+
+/* --------------------------------------------------------------------------- */
+
+#if defined(__BGDC__) || !defined(__STATIC__)
+
+/* --------------------------------------------------------------------------- */
+
+#include "bgddl.h"
+
+/* --------------------------------------------------------------------------- */
+/* Definicion de variables globales (usada en tiempo de compilacion) */
+
+char * __bgdexport( libtext, globals_def ) =
+ "text_z = -256;\n"
+ "text_flags;\n"
+ ;
+
+#endif
+
+/* --------------------------------------------------------------------------- */
+
+char * __bgdexport( libtext, modules_dependency )[] =
+{
+ "libgrbase",
+ "libblit",
+ "librender",
+ "libfont",
+ NULL
+};
+
+/* --------------------------------------------------------------------------- */
+
+#endif
diff --git a/modules/libtext/libtext_la-g_text.loT b/modules/libtext/libtext_la-g_text.loT
new file mode 100644
index 0000000..311f3d7
--- /dev/null
+++ b/modules/libtext/libtext_la-g_text.loT
@@ -0,0 +1,7 @@
+# libtext_la-g_text.lo - a libtool object file
+# Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06)
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.