diff options
Diffstat (limited to 'modules/mod_flic')
-rw-r--r-- | modules/mod_flic/Makefile | 610 | ||||
-rw-r--r-- | modules/mod_flic/Makefile.am | 15 | ||||
-rw-r--r-- | modules/mod_flic/Makefile.in | 610 | ||||
-rw-r--r-- | modules/mod_flic/mod_flic.c | 806 | ||||
-rw-r--r-- | modules/mod_flic/mod_flic.h | 173 | ||||
-rw-r--r-- | modules/mod_flic/mod_flic_exports.h | 66 |
6 files changed, 2280 insertions, 0 deletions
diff --git a/modules/mod_flic/Makefile b/modules/mod_flic/Makefile new file mode 100644 index 0000000..91cc15e --- /dev/null +++ b/modules/mod_flic/Makefile @@ -0,0 +1,610 @@ +# Makefile.in generated by automake 1.12.1 from Makefile.am. +# mod_flic/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 = mod_flic +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 = +libmod_flic_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) +am_libmod_flic_la_OBJECTS = libmod_flic_la-mod_flic.lo +libmod_flic_la_OBJECTS = $(am_libmod_flic_la_OBJECTS) +libmod_flic_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libmod_flic_la_CFLAGS) \ + $(CFLAGS) $(libmod_flic_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 = $(libmod_flic_la_SOURCES) +DIST_SOURCES = $(libmod_flic_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/mod_flic +abs_srcdir = /home/steward/Github/miyoo_src/bennugd/modules/mod_flic +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 = libmod_flic.la +libmod_flic_la_SOURCES = mod_flic.c +libmod_flic_la_CFLAGS = $(COMMON_CFLAGS) $(SDL_CFLAGS) -I$(BGD_PATH)/include -I. -I../librender/ -I../libblit/ -I../libgrbase/ +libmod_flic_la_LDFLAGS = -s -module -no-undefined -avoid-version +libmod_flic_la_LIBADD = $(COMMON_LDFLAGS) $(SDL_LIBS) -L$(BGD_PATH)/bgdrtm/src/.libs -L../librender/.libs -lrender -L../libblit/.libs -lblit -L../libgrbase/.libs -lgrbase -L$(BGD_PATH)/bgdrtm/src/.libs -lbgdrtm +CLEANFILES = libmod_flic.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 mod_flic/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu mod_flic/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}; \ + } +libmod_flic.la: $(libmod_flic_la_OBJECTS) $(libmod_flic_la_DEPENDENCIES) $(EXTRA_libmod_flic_la_DEPENDENCIES) + $(libmod_flic_la_LINK) -rpath $(libdir) $(libmod_flic_la_OBJECTS) $(libmod_flic_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +include ./$(DEPDIR)/libmod_flic_la-mod_flic.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 $@ $< + +libmod_flic_la-mod_flic.lo: mod_flic.c + $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmod_flic_la_CFLAGS) $(CFLAGS) -MT libmod_flic_la-mod_flic.lo -MD -MP -MF $(DEPDIR)/libmod_flic_la-mod_flic.Tpo -c -o libmod_flic_la-mod_flic.lo `test -f 'mod_flic.c' || echo '$(srcdir)/'`mod_flic.c + $(am__mv) $(DEPDIR)/libmod_flic_la-mod_flic.Tpo $(DEPDIR)/libmod_flic_la-mod_flic.Plo +# source='mod_flic.c' object='libmod_flic_la-mod_flic.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmod_flic_la_CFLAGS) $(CFLAGS) -c -o libmod_flic_la-mod_flic.lo `test -f 'mod_flic.c' || echo '$(srcdir)/'`mod_flic.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/mod_flic/Makefile.am b/modules/mod_flic/Makefile.am new file mode 100644 index 0000000..4baafc1 --- /dev/null +++ b/modules/mod_flic/Makefile.am @@ -0,0 +1,15 @@ +## Process this file with automake to produce Makefile.in + +#AUTOMAKE_OPTIONS = no-dependencies foreign + +lib_LTLIBRARIES = libmod_flic.la + +libmod_flic_la_SOURCES = mod_flic.c +libmod_flic_la_CFLAGS = $(COMMON_CFLAGS) $(SDL_CFLAGS) -I$(BGD_PATH)/include -I. -I../librender/ -I../libblit/ -I../libgrbase/ +libmod_flic_la_LDFLAGS = -s -module -no-undefined -avoid-version +libmod_flic_la_LIBADD = $(COMMON_LDFLAGS) $(SDL_LIBS) -L$(BGD_PATH)/bgdrtm/src/.libs -L../librender/.libs -lrender -L../libblit/.libs -lblit -L../libgrbase/.libs -lgrbase -L$(BGD_PATH)/bgdrtm/src/.libs -lbgdrtm + +## Make sure these will be cleaned even when they're not built by +## default. +CLEANFILES = libmod_flic.la + diff --git a/modules/mod_flic/Makefile.in b/modules/mod_flic/Makefile.in new file mode 100644 index 0000000..8b94bf8 --- /dev/null +++ b/modules/mod_flic/Makefile.in @@ -0,0 +1,610 @@ +# 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 = mod_flic +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 = +libmod_flic_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) +am_libmod_flic_la_OBJECTS = libmod_flic_la-mod_flic.lo +libmod_flic_la_OBJECTS = $(am_libmod_flic_la_OBJECTS) +libmod_flic_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libmod_flic_la_CFLAGS) \ + $(CFLAGS) $(libmod_flic_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 = $(libmod_flic_la_SOURCES) +DIST_SOURCES = $(libmod_flic_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 = libmod_flic.la +libmod_flic_la_SOURCES = mod_flic.c +libmod_flic_la_CFLAGS = $(COMMON_CFLAGS) $(SDL_CFLAGS) -I$(BGD_PATH)/include -I. -I../librender/ -I../libblit/ -I../libgrbase/ +libmod_flic_la_LDFLAGS = -s -module -no-undefined -avoid-version +libmod_flic_la_LIBADD = $(COMMON_LDFLAGS) $(SDL_LIBS) -L$(BGD_PATH)/bgdrtm/src/.libs -L../librender/.libs -lrender -L../libblit/.libs -lblit -L../libgrbase/.libs -lgrbase -L$(BGD_PATH)/bgdrtm/src/.libs -lbgdrtm +CLEANFILES = libmod_flic.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 mod_flic/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu mod_flic/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}; \ + } +libmod_flic.la: $(libmod_flic_la_OBJECTS) $(libmod_flic_la_DEPENDENCIES) $(EXTRA_libmod_flic_la_DEPENDENCIES) + $(libmod_flic_la_LINK) -rpath $(libdir) $(libmod_flic_la_OBJECTS) $(libmod_flic_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmod_flic_la-mod_flic.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 $@ $< + +libmod_flic_la-mod_flic.lo: mod_flic.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmod_flic_la_CFLAGS) $(CFLAGS) -MT libmod_flic_la-mod_flic.lo -MD -MP -MF $(DEPDIR)/libmod_flic_la-mod_flic.Tpo -c -o libmod_flic_la-mod_flic.lo `test -f 'mod_flic.c' || echo '$(srcdir)/'`mod_flic.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libmod_flic_la-mod_flic.Tpo $(DEPDIR)/libmod_flic_la-mod_flic.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mod_flic.c' object='libmod_flic_la-mod_flic.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) $(libmod_flic_la_CFLAGS) $(CFLAGS) -c -o libmod_flic_la-mod_flic.lo `test -f 'mod_flic.c' || echo '$(srcdir)/'`mod_flic.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/mod_flic/mod_flic.c b/modules/mod_flic/mod_flic.c new file mode 100644 index 0000000..b5b84bc --- /dev/null +++ b/modules/mod_flic/mod_flic.c @@ -0,0 +1,806 @@ +/* + * 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 <string.h> + +#include <math.h> +#include <stdlib.h> + +#include "bgddl.h" +#include "dlvaracc.h" + +#include "libgrbase.h" +#include "libblit.h" +#include "librender.h" + +#include "mod_flic.h" + +/* --------------------------------------------------------------------- */ +/* Librería para reproducir ficheros FLI directamente desde el disco */ +/* --------------------------------------------------------------------- */ + +static FLIC * current_fli = 0 ; + +/* ----------------------------------------------------------------- */ + +static int info_fli( FLIC * flic, REGION * clip, int * z, int * drawme ) ; +static void draw_fli( FLIC * flic, REGION * clip ) ; +static void flic_destroy( FLIC * flic ) ; +static FLIC * flic_open( const char * filename ) ; +static FLIC * flic_do_delta( FLIC * flic ) ; +static FLIC * flic_do_delta_flc( FLIC * flic ) ; +static FLIC * flic_do_color( FLIC * flic ) ; +static FLIC * flic_do_brun( FLIC * flic ) ; +static FLIC * flic_do_chunk( FLIC * flic ) ; +static FLIC * flic_do_frame( FLIC * flic ) ; +static void flic_reset( FLIC * flic ) ; +static int modflic_start( INSTANCE * my, int * params ) ; +static int modflic_reset( INSTANCE * my, int * params ) ; +static int modflic_end( INSTANCE * my, int * params ) ; +static int modflic_frame( INSTANCE * my, int * params ) ; + +/* ----------------------------------------------------------------- */ + +static int info_fli( FLIC * flic, REGION * clip, int * z, int * drawme ) +{ + int changed ; + int ms ; + + * drawme = 1; + * z = flic->z; + + changed = + flic->saved_x != flic->x || + flic->saved_y != flic->y || + flic->saved_z != flic->z || + flic->saved_angle != flic->angle || + flic->saved_size != flic->size || + flic->saved_flags != flic->flags ; + + if ( changed ) + { + flic->saved_x = flic->x ; + flic->saved_y = flic->y ; + flic->saved_z = flic->z ; + flic->saved_angle = flic->angle; + flic->saved_size = flic->size ; + flic->saved_flags = flic->flags; + } + + ms = SDL_GetTicks() ; + if ( flic->last_frame_ms + flic->speed_ms < ms && !flic->finished ) + changed |= ( flic_do_frame( flic ) != NULL ) ; + + if ( !changed ) return 0; + + if ( flic->angle || flic->size != 100 ) + { + gr_get_bbox( clip, + 0, + flic->x + flic->bitmap->width / 2, + flic->y + flic->bitmap->height / 2, + flic->flags, + flic->angle, + flic->size, + flic->size, + flic->bitmap + ) ; + } + else + { + clip->x = flic->x ; + clip->x2 = flic->x + flic->bitmap->width ; + clip->y = flic->y ; + clip->y2 = flic->y + flic->bitmap->height ; + } + + return 1; +} + +static void draw_fli( FLIC * flic, REGION * clip ) +{ + if ( flic->angle || flic->size != 100 ) + gr_rotated_blit( 0, + clip, + flic->x + flic->bitmap->width / 2, + flic->y + flic->bitmap->height / 2, + flic->flags, + flic->angle, + flic->size, + flic->size, + flic->bitmap ) ; + else + gr_blit( 0, + clip, + flic->x + flic->bitmap->width / 2, + flic->y + flic->bitmap->height / 2, + flic->flags, + flic->bitmap ) ; +} + +/* --------------------------------------------------------------------- */ + +static void flic_destroy( FLIC * flic ) +{ + if ( !flic ) return ; + + file_close( flic->fp ) ; + if ( flic->objid ) gr_destroy_object( flic->objid ); + if ( flic->bitmap ) bitmap_destroy( flic->bitmap ) ; + if ( flic->frame ) free( flic->frame ) ; + free( flic ) ; +} + +static FLIC * flic_open( const char * filename ) +{ + FLIC * flic ; + + flic = ( FLIC * ) malloc( sizeof( FLIC ) ) ; + if ( !flic ) return 0 ; + + flic->objid = 0; + + flic->fp = file_open( filename, "rb" ) ; + if ( !flic->fp ) + { + free( flic ) ; + return 0 ; + } + flic->frame_reserved = 8192 ; + flic->frame = ( FLIC_FRAME * ) malloc( 8192 ) ; + if ( !flic->frame ) + { + flic_destroy( flic ) ; + return 0 ; + } + + if ( !file_read( flic->fp, &flic->header, sizeof( FLIC_HEADER ) ) ) + { + flic_destroy( flic ) ; + return 0 ; + } + + if ( flic->header.type != 0xAF11 && flic->header.type != 0xAF12 ) + { + /* Tipo de FLIC no reconocido */ + flic_destroy( flic ) ; + return 0 ; + } + + flic->bitmap = bitmap_new( 0, flic->header.width, flic->header.height, 8 ) ; + if ( !flic->bitmap ) + { + /* Tamaño incorrecto */ + flic_destroy( flic ) ; + return 0 ; + } + + if ( !flic->header.oframe1 ) flic->header.oframe1 = file_pos( flic->fp ) ; + + flic->current_frame = 0 ; + flic->finished = 0 ; + flic->last_frame_ms = SDL_GetTicks() ; + + if ( flic->header.type == 0xAF11 ) + flic->speed_ms = ( int )(( 1000.0F / 70.0F ) * flic->header.speed ) ; + else + flic->speed_ms = flic->header.speed ; + + flic->objid = gr_new_object( 0, info_fli, draw_fli, flic ); + + return flic ; +} + +static FLIC * flic_do_delta( FLIC * flic ) +{ + GRAPH * bitmap = flic->bitmap ; + int first_line, line_count ; + uint8_t * ptr, * optr, * loptr, packet_count ; + int size; + + first_line = flic->chunk->delta_fli.first_line ; + line_count = flic->chunk->delta_fli.line_count ; + ptr = flic->chunk->delta_fli.data ; + + loptr = ( uint8_t * )bitmap->data + bitmap->pitch * first_line ; + + while ( line_count-- > 0 ) + { + optr = loptr ; + loptr += bitmap->pitch ; + packet_count = *ptr++ ; + + while ( packet_count-- ) + { + optr += *ptr++ ; + size = *( Sint8 * )ptr++ ; + if ( size > 0 ) + { + memcpy( optr, ptr, size ) ; + ptr += size ; + } + else if ( size < 0 ) + { + size = -size ; + memset( optr, *ptr++, size ) ; + } + optr += size ; + } + } + + return flic ; +} + +static FLIC * flic_do_delta_flc( FLIC * flic ) +{ + GRAPH * bitmap = flic->bitmap ; + int line_count ; + uint16_t * ptr, opcode ; + uint8_t * optr, * loptr ; + Sint8 data_count ; + + ptr = ( uint16_t * )flic->chunk->raw.data ; + + line_count = *ptr++ ; + + optr = bitmap->data ; + + while ( line_count > 0 ) + { + opcode = *ptr++ ; + + switch ( opcode & 0xC000 ) + { + case 0x0000: + loptr = optr ; + while ( opcode-- > 0 ) + { + optr += *( uint8_t * )ptr ; + data_count = *(( Sint8 * )ptr + 1 ) ; + ptr++ ; + + if ( data_count > 0 ) + { + memcpy( optr, ptr, ( int )data_count * 2 ) ; + ptr += data_count ; + optr += data_count * 2 ; + } + else if ( data_count < 0 ) + { + data_count = -data_count ; + while ( data_count-- ) + { + *optr++ = ( *ptr & 0xFF ) ; + *optr++ = ( *ptr >> 8 ) ; + } + ptr++ ; + } + } + + optr = loptr ; + optr += bitmap->width ; + line_count-- ; + break ; + + case 0x4000: + return 0 ; + + case 0x8000: + optr[bitmap->width-1] = ( opcode & 0xFF ) ; + break ; + + case 0xC000: + optr += bitmap->pitch * -( Sint16 )opcode; + break ; + } + } + + return flic ; +} + +static FLIC * flic_do_color( FLIC * flic ) +{ + uint8_t * ptr ; + int packet_count ; + int copy_count ; + rgb_component * palette ; + rgb_component * color; + PALETTE * pal ; + + if ( sys_pixel_format->depth == 8 ) + { + if ( ! sys_pixel_format->palette ) + { + sys_pixel_format->palette = pal_new( NULL ) ; + palette_changed = 1 ; + } + pal = sys_pixel_format->palette ; + } + else + { + if ( !flic->bitmap->format->palette ) + { + flic->bitmap->format->palette = pal_new( NULL ) ; + palette_changed = 1 ; + } + pal = flic->bitmap->format->palette ; + } + + palette = pal->rgb; + + ptr = flic->chunk->raw.data ; + + packet_count = *( uint16_t * )ptr ; + ptr += 2 ; + + while ( packet_count-- > 0 ) + { + color = &palette[*ptr++] ; + copy_count = *ptr++ ; + if ( copy_count < 1 ) copy_count = 256 ; + + if ( flic->chunk->header.type == CHUNK_COLOR_64 ) + { + while ( copy_count-- ) + { + color->r = ( *ptr++ << 2 ) ; + color->g = ( *ptr++ << 2 ) ; + color->b = ( *ptr++ << 2 ) ; + color++ ; + } + } + else + { + while ( copy_count-- ) + { + color->r = *ptr++ ; + color->g = *ptr++ ; + color->b = *ptr++ ; + color++ ; + } + } + } + + pal_refresh( pal ); + + return flic ; +} + +static FLIC * flic_do_brun( FLIC * flic ) +{ + GRAPH * bitmap = flic->bitmap ; + int line_count ; + uint8_t * ptr, * optr, * loptr ; + uint16_t remaining_width ; + int size; + + ptr = flic->chunk->raw.data ; + loptr = bitmap->data ; + line_count = bitmap->height ; + + while ( line_count-- ) + { + optr = loptr; + loptr += bitmap->pitch ; + ptr++ ; + remaining_width = bitmap->width ; + + while ( remaining_width > 0 ) + { + size = *( Sint8 * )ptr++; + if ( size < 0 ) + { + size = -size; + memcpy( optr, ptr, size ) ; + ptr += size ; + } + else if ( size > 0 ) + { + memset( optr, *ptr++, size ) ; + } + optr += size ; + remaining_width -= size ; + } + } + + return flic ; +} + +static FLIC * flic_do_chunk( FLIC * flic ) +{ + uint32_t y; + uint8_t * data ; + uint8_t * rawdata ; + + /* Procesa el contenido del chunk actual */ + + switch ( flic->chunk->header.type ) + { + case CHUNK_BLACK: + data = ( uint8_t * )flic->bitmap->data ; + for ( y = flic->bitmap->height ; y-- ; ) + { + memset( data, 0, flic->bitmap->pitch ) ; + data += flic->bitmap->pitch ; + } + break ; + + case CHUNK_FLI_COPY: + data = ( uint8_t * )flic->bitmap->data ; + rawdata = ( uint8_t * )flic->chunk->raw.data ; + for ( y = flic->bitmap->height ; y-- ; ) + { + memcpy( data, rawdata, flic->bitmap->width ) ; + data += flic->bitmap->pitch ; + rawdata += flic->bitmap->width ; + } + break ; + + case CHUNK_DELTA_FLI: + if ( !flic_do_delta( flic ) ) return 0 ; + break ; + + case CHUNK_DELTA_FLC: + if ( !flic_do_delta_flc( flic ) ) return 0 ; + break ; + + case CHUNK_BYTE_RUN: + if ( !flic_do_brun( flic ) ) return 0 ; + break ; + + case CHUNK_COLOR_256: + case CHUNK_COLOR_64: + if ( !flic_do_color( flic ) ) return 0 ; + break ; + + case CHUNK_STAMP: + break ; + + default: + /* Tipo de chunk desconocido */ + return 0 ; + } + + return flic ; +} + +static FLIC * flic_do_frame( FLIC * flic ) +{ + int chunkno = 0 ; + + /* Cuenta el frame y vuelve al inicio si es necesario */ + + flic->current_frame++ ; + + if ( flic->current_frame >= flic->header.frames ) + { + file_seek( flic->fp, flic->header.oframe1, SEEK_SET ) ; + flic->current_frame = 1 ; + flic->finished = 1 ; + return flic ; + } + + do + { + /* Recupera información del siguiente chunk del fichero */ + + if ( !file_read( flic->fp, flic->frame, sizeof( FLIC_FRAME ) ) ) return 0 ; + + /* Tipo de frame incorrecto */ + if ( flic->frame->type != CHUNK_FRAME && flic->frame->type != CHUNK_PREFIX ) return 0 ; + + /* Fichero corrupto */ + if ( flic->frame->size < sizeof( FLIC_FRAME ) ) return 0; + + /* Reserva la memoria necesaria y carga el chunk */ + + if ( flic->frame_reserved < flic->frame->size ) + { + flic->frame_reserved = flic->frame->size ; + flic->frame = ( FLIC_FRAME * ) realloc( flic->frame, flic->frame_reserved ) ; + + /* Error: sin memoria */ + if ( !flic->frame ) return 0 ; + } + + /* If it's a prefix frame, skip it. */ + + if ( flic->frame->size > sizeof( FLIC_FRAME ) ) + if ( !file_read( flic->fp, &flic->frame[1], flic->frame->size - sizeof( FLIC_FRAME ) ) ) return 0 ; + + } + while ( flic->frame->type != CHUNK_FRAME ) ; + + /* Procesa cada sub-chunk */ + + flic->chunk = ( FLIC_CHUNK * ) & flic->frame[1] ; + + for ( chunkno = 0 ; chunkno < flic->frame->chunks ; chunkno++ ) + { + if ( !flic_do_chunk( flic ) ) return 0 ; + flic->chunk = ( FLIC_CHUNK * )((( uint8_t * )flic->chunk ) + flic->chunk->header.size ) ; + } + + flic->last_frame_ms += flic->speed_ms ; + return flic ; +} + +static void flic_reset( FLIC * flic ) +{ + flic->current_frame = 0 ; + flic->finished = 0 ; + file_seek( flic->fp, flic->header.oframe1, SEEK_SET ) ; +} + +/* ----------------------------------------------------------------- */ +/* Reproducción de FLI */ + +/* + * FUNCTION : modflic_start + * + * Load & start playing a FLI/FLC animation + * + * PARAMS: + * + * file : filename/path for the FLI/FLC file + * x,y : screen position + * + */ + +static int modflic_start( INSTANCE * my, int * params ) +{ + const char * str = string_get( params[0] ) ; + if ( !str ) return 0 ; + + if ( current_fli ) flic_destroy( current_fli ) ; + + current_fli = flic_open( str ) ; + + string_discard( params[0] ) ; + + if ( current_fli ) + { + current_fli->x = params[1] ; + current_fli->y = params[2] ; + current_fli->z = 0; + current_fli->angle = 0; + current_fli->size = 100; + current_fli->flags = 0; + + return current_fli->header.frames ; + } + + return 0 ; +} + +/* + * FUNCTION : modflic_reset + * + * Reset current FLI/FLC animation to frame 0 + * + * PARAMS: + * + * No params + * + */ + +static int modflic_reset( INSTANCE * my, int * params ) +{ + if ( current_fli ) flic_reset( current_fli ) ; + return 1 ; +} + +/* + * FUNCTION : modflic_end + * + * Stop current FLI/FLC animation + * + * PARAMS: + * + * No params + * + */ + +static int modflic_end( INSTANCE * my, int * params ) +{ + if ( current_fli ) + { + flic_destroy( current_fli ) ; + current_fli = 0 ; + } + return 1 ; +} + +/* + * FUNCTION : modflic_frame + * + * Check status for the current FLI/FLC animation + * + * RETURN VALUE: + * + * Current frame or 0 if animation has ended + * + * PARAMS: + * + * No params + * + */ + +static int modflic_frame( INSTANCE * my, int * params ) +{ + if ( current_fli ) return current_fli->finished ? 0 : current_fli->current_frame ; + return 0 ; +} + +/* --------------------------------------------------------------------------- */ + +static int modflic_startx1( INSTANCE * my, int * params ) +{ + FLIC * flic ; + const char * str = string_get( params[0] ) ; + if ( !str ) return 0 ; + + flic = flic_open( str ) ; + + string_discard( params[0] ) ; + + if ( flic ) + { + flic->x = params[1] ; + flic->y = params[2] ; + flic->z = 0 ; + flic->angle = 0; + flic->size = 100; + flic->flags = 0; + + return ( int ) flic ; + } + + return 0 ; +} + +static int modflic_startx2( INSTANCE * my, int * params ) +{ + FLIC * flic ; + const char * str = string_get( params[0] ) ; + if ( !str ) return 0 ; + + flic = flic_open( str ) ; + + string_discard( params[0] ) ; + + if ( flic ) + { + flic->x = params[1] ; + flic->y = params[2] ; + flic->z = params[3] ; + flic->angle = params[4]; + flic->size = params[5]; + flic->flags = params[6]; + + return ( int ) flic ; + } + + return 0 ; +} + +static int modflic_resetx( INSTANCE * my, int * params ) +{ + flic_reset(( FLIC * ) params[0] ) ; + return 1 ; +} + +static int modflic_endx( INSTANCE * my, int * params ) +{ + flic_destroy((( FLIC * ) params[0] ) ) ; + return 1 ; +} + +static int modflic_framex( INSTANCE * my, int * params ) +{ + return (( FLIC * ) params[0] )->finished ? 0 : (( FLIC * ) params[0] )->current_frame ; +} + +static int modflic_params( INSTANCE * my, int * params ) +{ + FLIC * flic = ( FLIC * ) params[0] ; + + flic->x = params[1] ; + flic->y = params[2] ; + flic->z = params[3] ; + flic->angle = params[4]; + flic->size = params[5]; + flic->flags = params[6]; + + return 1 ; +} + +static int modflic_move( INSTANCE * my, int * params ) +{ + FLIC * flic = ( FLIC * ) params[0] ; + + flic->x = params[1] ; + flic->y = params[2] ; + + return 1 ; +} + +static int modflic_z( INSTANCE * my, int * params ) +{ + (( FLIC * ) params[0] )->z = params[1] ; + + return 1 ; +} + +static int modflic_angle( INSTANCE * my, int * params ) +{ + (( FLIC * ) params[0] )->angle = params[1] ; + + return 1 ; +} + +static int modflic_size( INSTANCE * my, int * params ) +{ + (( FLIC * ) params[0] )->size = params[1] ; + + return 1 ; +} + +static int modflic_flags( INSTANCE * my, int * params ) +{ + (( FLIC * ) params[0] )->flags = params[1] ; + + return 1 ; +} + +static int modflic_getinfo( INSTANCE * my, int * params ) +{ + FLIC * flic = ( FLIC * ) params[0] ; + + if ((( int * ) params[1] ) ) *(( int * ) params[1] ) = flic->x ; + if ((( int * ) params[2] ) ) *(( int * ) params[2] ) = flic->y ; + if ((( int * ) params[3] ) ) *(( int * ) params[3] ) = flic->z ; + if ((( int * ) params[4] ) ) *(( int * ) params[4] ) = flic->angle ; + if ((( int * ) params[5] ) ) *(( int * ) params[5] ) = flic->size ; + if ((( int * ) params[6] ) ) *(( int * ) params[6] ) = flic->flags ; + if ((( int * ) params[7] ) ) *(( int * ) params[7] ) = flic->header.frames ; + if ((( int * ) params[8] ) ) *(( int * ) params[8] ) = flic->header.width ; + if ((( int * ) params[9] ) ) *(( int * ) params[9] ) = flic->header.height ; + + return 1 ; +} + +/* ----------------------------------------------------------------- */ +/* exports */ +/* ----------------------------------------------------------------- */ + +#include "mod_flic_exports.h" + +/* ----------------------------------------------------------------- */ diff --git a/modules/mod_flic/mod_flic.h b/modules/mod_flic/mod_flic.h new file mode 100644 index 0000000..65f4eb7 --- /dev/null +++ b/modules/mod_flic/mod_flic.h @@ -0,0 +1,173 @@ +/* + * 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 __FLIC_H +#define __FLIC_H + +#include "libgrbase.h" +#include "files.h" +#include "xstrings.h" + +#include <SDL_types.h> + +#ifndef __GNUC__ +#define __PACKED +#define inline __inline +#else +#define __PACKED __attribute__ ((packed)) +#endif + +#ifdef _MSC_VER +#pragma pack(push, 1) +#endif + +/* Reproducción de FLI */ +/* ------------------- */ + +typedef struct +{ + uint32_t size; /* Size of FLIC including this header */ + uint16_t type; /* File type 0xAF11, 0xAF12, 0xAF30, 0xAF44, ... */ + uint16_t frames; /* Number of frames in first segment */ + uint16_t width; /* FLIC width in pixels */ + uint16_t height; /* FLIC height in pixels */ + uint16_t depth; /* Bits per pixel (usually 8) */ + uint16_t flags; /* Set to zero or to three */ + uint32_t speed; /* Delay between frames */ + uint16_t reserved1; /* Set to zero */ + uint32_t created; /* Date of FLIC creation (FLC only) */ + uint32_t creator; /* Serial number or compiler id (FLC only) */ + uint32_t updated; /* Date of FLIC update (FLC only) */ + uint32_t updater; /* Serial number (FLC only), see creator */ + uint16_t aspect_dx; /* Width of square rectangle (FLC only) */ + uint16_t aspect_dy; /* Height of square rectangle (FLC only) */ + uint16_t ext_flags; /* EGI: flags for specific EGI extensions */ + uint16_t keyframes; /* EGI: key-image frequency */ + uint16_t totalframes; /* EGI: total number of frames (segments) */ + uint32_t req_memory; /* EGI: maximum chunk size (uncompressed) */ + uint16_t max_regions; /* EGI: max. number of regions in a CHK_REGION chunk */ + uint16_t transp_num; /* EGI: number of transparent levels */ + uint8_t reserved2[24]; /* Set to zero */ + uint32_t oframe1; /* Offset to frame 1 (FLC only) */ + uint32_t oframe2; /* Offset to frame 2 (FLC only) */ + uint8_t reserved3[40]; /* Set to zero */ +} +__PACKED +FLIC_HEADER; + +typedef union +{ + struct + { + uint32_t size; /* Size of the chunk */ + uint16_t type; /* Chunk type */ + } + header ; + + struct + { + uint32_t size; /* Size of the chunk */ + uint16_t type; /* Chunk type: 12 */ + uint16_t first_line; /* First line */ + uint16_t line_count; /* Number of lines in the chunk */ + uint8_t data[0]; + } + delta_fli ; + + struct + { + uint32_t size; /* Size of the chunk */ + uint16_t type; /* Chunk type: 15, 12, etc. */ + uint8_t data[0]; + } + raw ; +} +FLIC_CHUNK ; + +typedef struct +{ + uint32_t size; /* Size of the frame, including subchunks */ + uint16_t type; /* Chunk type: 0xF1FA */ + uint16_t chunks; /* Number of subchunks */ + uint8_t expand[8]; +} +FLIC_FRAME ; + +typedef struct +{ + FLIC_HEADER header ; + FLIC_CHUNK * chunk ; + FLIC_FRAME * frame ; + uint32_t frame_reserved ; + + GRAPH * bitmap ; + + file * fp ; + + int objid; + + int current_frame ; + int speed_ms ; + int last_frame_ms ; + int finished ; + + int x; + int y; + int z; + int angle; + int size; + int flags; + + int saved_x; + int saved_y; + int saved_z; + int saved_angle; + int saved_size; + int saved_flags; + +} +FLIC ; + +/* Tipos de chunk */ + +#define CHUNK_COLOR_256 4 +#define CHUNK_COLOR_64 11 +#define CHUNK_DELTA_FLI 12 +#define CHUNK_DELTA_FLC 7 +#define CHUNK_BLACK 13 +#define CHUNK_BYTE_RUN 15 +#define CHUNK_FLI_COPY 16 +#define CHUNK_STAMP 18 +#define CHUNK_PREFIX 0xF100 +#define CHUNK_FRAME 0xF1FA + +#ifdef _MSC_VER +#pragma pack(pop) +#endif + +#endif diff --git a/modules/mod_flic/mod_flic_exports.h b/modules/mod_flic/mod_flic_exports.h new file mode 100644 index 0000000..25fcd4a --- /dev/null +++ b/modules/mod_flic/mod_flic_exports.h @@ -0,0 +1,66 @@ +/* + * 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 __MOD_FLIC_EXPORTS +#define __MOD_FLIC_EXPORTS + +/* --------------------------------------------------------------------------- */ + +#include "bgddl.h" + +/* ----------------------------------------------------------------- */ +/* Declaracion de funciones */ + +DLSYSFUNCS __bgdexport( mod_flic, functions_exports )[] = +{ + /* Animaciones FLI */ + FUNC( "START_FLI" , "SII" , TYPE_INT , modflic_start ), + FUNC( "END_FLI" , "" , TYPE_INT , modflic_end ), + FUNC( "FRAME_FLI" , "" , TYPE_INT , modflic_frame ), + FUNC( "RESET_FLI" , "" , TYPE_INT , modflic_reset ), + + FUNC( "FLI_START" , "SII" , TYPE_INT , modflic_startx1 ), + FUNC( "FLI_START" , "SIIIIII" , TYPE_INT , modflic_startx2 ), + FUNC( "FLI_END" , "I" , TYPE_INT , modflic_endx ), + FUNC( "FLI_FRAME" , "I" , TYPE_INT , modflic_framex ), + FUNC( "FLI_RESET" , "I" , TYPE_INT , modflic_resetx ), + + FUNC( "FLI_PARAMS" , "IIIIIII" , TYPE_INT , modflic_params ), + FUNC( "FLI_MOVE" , "III" , TYPE_INT , modflic_move ), + FUNC( "FLI_ANGLE" , "II" , TYPE_INT , modflic_angle ), + FUNC( "FLI_SIZE" , "II" , TYPE_INT , modflic_size ), + FUNC( "FLI_FLAGS" , "II" , TYPE_INT , modflic_flags ), + FUNC( "FLI_Z" , "II" , TYPE_INT , modflic_z ), + FUNC( "FLI_GETINFO" , "IPPPPPPPPP" , TYPE_INT , modflic_getinfo ), + + FUNC( NULL , NULL , 0 , NULL ) +}; + +/* ----------------------------------------------------------------- */ + +#endif |