From cb3716ffb584fe0f593b6f1669a8efdba1305104 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Tue, 29 Mar 2016 02:16:55 +1000 Subject: Added my version of libg3d and friends. --- .../libg3d-0.0.8/plugins/import/imp_flt/Makefile | 514 +++++++++++ .../plugins/import/imp_flt/Makefile.am | 24 + .../plugins/import/imp_flt/Makefile.in | 514 +++++++++++ .../libg3d-0.0.8/plugins/import/imp_flt/imp_flt.c | 175 ++++ .../libg3d-0.0.8/plugins/import/imp_flt/imp_flt.h | 30 + .../plugins/import/imp_flt/imp_flt_callbacks.c | 999 +++++++++++++++++++++ .../plugins/import/imp_flt/imp_flt_callbacks.h | 95 ++ .../plugins/import/imp_flt/imp_flt_opcodes.h | 136 +++ 8 files changed, 2487 insertions(+) create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_flt/Makefile create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_flt/Makefile.am create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_flt/Makefile.in create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_flt/imp_flt.c create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_flt/imp_flt.h create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_flt/imp_flt_callbacks.c create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_flt/imp_flt_callbacks.h create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_flt/imp_flt_opcodes.h (limited to 'src/others/mimesh/libg3d-0.0.8/plugins/import/imp_flt') diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_flt/Makefile b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_flt/Makefile new file mode 100644 index 0000000..a9fb9fa --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_flt/Makefile @@ -0,0 +1,514 @@ +# Makefile.in generated by automake 1.10.1 from Makefile.am. +# plugins/import/imp_flt/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 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. + + + + +pkgdatadir = $(datadir)/libg3d +pkglibdir = $(libdir)/libg3d +pkgincludedir = $(includedir)/libg3d +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-unknown-linux-gnu +host_triplet = x86_64-unknown-linux-gnu +subdir = plugins/import/imp_flt +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ + $(top_srcdir)/m4/glib-2.0.m4 $(top_srcdir)/m4/gtk-2.0.m4 \ + $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/libxml2.m4 $(top_srcdir)/m4/win32.m4 \ + $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/g3d/config.h +CONFIG_CLEAN_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 = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(pluginimpdir)" +pluginimpLTLIBRARIES_INSTALL = $(INSTALL) +LTLIBRARIES = $(pluginimp_LTLIBRARIES) +imp_flt_la_DEPENDENCIES = $(top_builddir)/src/libg3d.la +am_imp_flt_la_OBJECTS = imp_flt.lo imp_flt_callbacks.lo +imp_flt_la_OBJECTS = $(am_imp_flt_la_OBJECTS) +#am_imp_flt_la_rpath = -rpath $(pluginimpdir) +DEFAULT_INCLUDES = -I. -I$(top_builddir)/include/g3d +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +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 = $(imp_flt_la_SOURCES) +DIST_SOURCES = $(imp_flt_la_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run aclocal-1.10 +AMTAR = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run tar +AR = ar +AS = as +AUTOCONF = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run autoconf +AUTOHEADER = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run autoheader +AUTOMAKE = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run automake-1.10 +AWK = gawk +CC = gcc +CCDEPMODE = depmode=gcc3 +CFLAGS = -g -O2 +CPP = gcc -E +CPPFLAGS = +CXX = g++ +CXXCPP = g++ -E +CXXDEPMODE = depmode=gcc3 +CXXFLAGS = -g -O2 +CYGPATH_W = echo +DBG_CFLAGS = -O2 +DEBUG = 0 +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +DLLTOOL = dlltool +ECHO = echo +ECHO_C = +ECHO_N = -n +ECHO_T = +EGREP = /bin/grep -E +EXEEXT = +F77 = +FFLAGS = +GDKPIXBUF_CFLAGS = -pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 +GDKPIXBUF_LIBS = -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0 +GLIB_CFLAGS = -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include +GLIB_GENMARSHAL = glib-genmarshal +GLIB_LIBS = -Wl,--export-dynamic -pthread -lgmodule-2.0 -lrt -lgobject-2.0 -lglib-2.0 +GLIB_MKENUMS = glib-mkenums +GOBJECT_QUERY = gobject-query +GREP = /bin/grep +GTKDOC_CHECK = /usr/bin/gtkdoc-check +GTK_CFLAGS = -pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 +GTK_LIBS = -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0 +HTML_DIR = ${datadir}/gtk-doc/html +INSTALL = /usr/bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +LDFLAGS = +LEX = flex +LEXLIB = -lfl +LEX_OUTPUT_ROOT = lex.yy +LIBGSF_CFLAGS = -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libxml2 -I/usr/include/libgsf-1 +LIBGSF_LIBS = -lgsf-1 -lgobject-2.0 -lxml2 -lglib-2.0 +LIBOBJS = +LIBS = -lm +LIBTOOL = $(SHELL) $(top_builddir)/libtool --quiet +LIBXML2_CFLAGS = -I/usr/include/libxml2 +LIBXML2_LIBS = -L/usr/lib/x86_64-linux-gnu -lxml2 +LN_S = ln -s +LTLIBOBJS = +LTVERSION = 0:8:0 +MAGIC_LIBS = -lmagic +MAKEINFO = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run makeinfo +MATH_LIBS = -lm +MKDIR_P = /bin/mkdir -p +OBJDUMP = objdump +OBJEXT = o +PACKAGE = libg3d +PACKAGE_BUGREPORT = +PACKAGE_NAME = +PACKAGE_STRING = +PACKAGE_TARNAME = +PACKAGE_VERSION = +PATH_SEPARATOR = : +PKG_CONFIG = /usr/bin/pkg-config +PLUGINS_LDFLAGS = -avoid-version -export-dynamic +RANLIB = ranlib +SET_MAKE = +SHELL = /bin/bash +STRIP = strip +VERSION = 0.0.8 +XML2_CONFIG = /usr/bin/xml2-config +XML_CPPFLAGS = -I/usr/include/libxml2 +XML_LIBS = -L/usr/lib/x86_64-linux-gnu -lxml2 +Z_CFLAGS = +Z_LIBS = -lz +abs_builddir = /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_flt +abs_srcdir = /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_flt +abs_top_builddir = /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8 +abs_top_srcdir = /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8 +ac_ct_CC = gcc +ac_ct_CXX = g++ +ac_ct_F77 = +am__include = include +am__leading_dot = . +am__quote = +am__tar = ${AMTAR} chof - "$$tardir" +am__untar = ${AMTAR} xf - +bindir = ${exec_prefix}/bin +build = x86_64-unknown-linux-gnu +build_alias = +build_cpu = x86_64 +build_os = linux-gnu +build_vendor = unknown +builddir = . +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE} +dvidir = ${docdir} +exec_prefix = ${prefix} +host = x86_64-unknown-linux-gnu +host_alias = +host_cpu = x86_64 +host_os = linux-gnu +host_vendor = unknown +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = $(SHELL) /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/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 = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +srcdir = . +sysconfdir = ${prefix}/etc +target_alias = +top_builddir = ../../.. +top_srcdir = ../../.. +pluginimpdir = $(pkglibdir)/plugins/import +#pluginimp_LTLIBRARIES = imp_flt.la +AM_CFLAGS = \ + -Wall -ansi -pedantic \ + -DG_LOG_DOMAIN=\"LibG3D\" \ + -O2 -DDEBUG=0 \ + -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include + +INCLUDES = -I$(top_srcdir)/include +AM_LDFLAGS = \ + -no-undefined -module \ + -avoid-version -export-dynamic + +imp_flt_la_SOURCES = imp_flt.c imp_flt.h \ + imp_flt_opcodes.h \ + imp_flt_callbacks.c imp_flt_callbacks.h + +imp_flt_la_LIBADD = $(top_builddir)/src/libg3d.la -Wl,--export-dynamic -pthread -lgmodule-2.0 -lrt -lgobject-2.0 -lglib-2.0 +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 \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/import/imp_flt/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu plugins/import/imp_flt/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 +install-pluginimpLTLIBRARIES: $(pluginimp_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pluginimpdir)" || $(MKDIR_P) "$(DESTDIR)$(pluginimpdir)" + @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pluginimpLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(pluginimpdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pluginimpLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(pluginimpdir)/$$f"; \ + else :; fi; \ + done + +uninstall-pluginimpLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pluginimpdir)/$$p'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pluginimpdir)/$$p"; \ + done + +clean-pluginimpLTLIBRARIES: + -test -z "$(pluginimp_LTLIBRARIES)" || rm -f $(pluginimp_LTLIBRARIES) + @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +imp_flt.la: $(imp_flt_la_OBJECTS) $(imp_flt_la_DEPENDENCIES) + $(LINK) $(am_imp_flt_la_rpath) $(imp_flt_la_OBJECTS) $(imp_flt_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +include ./$(DEPDIR)/imp_flt.Plo +include ./$(DEPDIR)/imp_flt_callbacks.Plo + +.c.o: + $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< + mv -f $(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) '$<'` + mv -f $(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 $@ $< + mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +# source='$<' object='$@' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(LTCOMPILE) -c -o $@ $< + +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; nonemtpy = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + 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; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + 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)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +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 $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$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)$(pluginimpdir)"; 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: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_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-libtool clean-pluginimpLTLIBRARIES \ + 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 + +info: info-am + +info-am: + +install-data-am: install-pluginimpLTLIBRARIES + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: 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-pluginimpLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-pluginimpLTLIBRARIES 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-man \ + install-pdf install-pdf-am install-pluginimpLTLIBRARIES \ + 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-pluginimpLTLIBRARIES + +# 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/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_flt/Makefile.am b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_flt/Makefile.am new file mode 100644 index 0000000..4b479c7 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_flt/Makefile.am @@ -0,0 +1,24 @@ +pluginimpdir = $(pkglibdir)/plugins/import + +if EXPERIMENTAL +pluginimp_LTLIBRARIES = imp_flt.la +endif + +AM_CFLAGS = \ + -Wall -ansi -pedantic \ + -DG_LOG_DOMAIN=\"LibG3D\" \ + @DBG_CFLAGS@ -DDEBUG=@DEBUG@ \ + @GLIB_CFLAGS@ + +INCLUDES = -I$(top_srcdir)/include + +AM_LDFLAGS = \ + -no-undefined -module \ + @PLUGINS_LDFLAGS@ + +LIBTOOL += --quiet + +imp_flt_la_SOURCES = imp_flt.c imp_flt.h \ + imp_flt_opcodes.h \ + imp_flt_callbacks.c imp_flt_callbacks.h +imp_flt_la_LIBADD = $(top_builddir)/src/libg3d.la @GLIB_LIBS@ diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_flt/Makefile.in b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_flt/Makefile.in new file mode 100644 index 0000000..1838da2 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_flt/Makefile.in @@ -0,0 +1,514 @@ +# Makefile.in generated by automake 1.10.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 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@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@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@ +subdir = plugins/import/imp_flt +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ + $(top_srcdir)/m4/glib-2.0.m4 $(top_srcdir)/m4/gtk-2.0.m4 \ + $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/libxml2.m4 $(top_srcdir)/m4/win32.m4 \ + $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/g3d/config.h +CONFIG_CLEAN_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 = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(pluginimpdir)" +pluginimpLTLIBRARIES_INSTALL = $(INSTALL) +LTLIBRARIES = $(pluginimp_LTLIBRARIES) +imp_flt_la_DEPENDENCIES = $(top_builddir)/src/libg3d.la +am_imp_flt_la_OBJECTS = imp_flt.lo imp_flt_callbacks.lo +imp_flt_la_OBJECTS = $(am_imp_flt_la_OBJECTS) +@EXPERIMENTAL_TRUE@am_imp_flt_la_rpath = -rpath $(pluginimpdir) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include/g3d +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +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 = $(imp_flt_la_SOURCES) +DIST_SOURCES = $(imp_flt_la_SOURCES) +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@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DBG_CFLAGS = @DBG_CFLAGS@ +DEBUG = @DEBUG@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@ +GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GREP = @GREP@ +GTKDOC_CHECK = @GTKDOC_CHECK@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +HTML_DIR = @HTML_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBGSF_CFLAGS = @LIBGSF_CFLAGS@ +LIBGSF_LIBS = @LIBGSF_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ --quiet +LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ +LIBXML2_LIBS = @LIBXML2_LIBS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LTVERSION = @LTVERSION@ +MAGIC_LIBS = @MAGIC_LIBS@ +MAKEINFO = @MAKEINFO@ +MATH_LIBS = @MATH_LIBS@ +MKDIR_P = @MKDIR_P@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PLUGINS_LDFLAGS = @PLUGINS_LDFLAGS@ +RANLIB = @RANLIB@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +XML2_CONFIG = @XML2_CONFIG@ +XML_CPPFLAGS = @XML_CPPFLAGS@ +XML_LIBS = @XML_LIBS@ +Z_CFLAGS = @Z_CFLAGS@ +Z_LIBS = @Z_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +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_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +pluginimpdir = $(pkglibdir)/plugins/import +@EXPERIMENTAL_TRUE@pluginimp_LTLIBRARIES = imp_flt.la +AM_CFLAGS = \ + -Wall -ansi -pedantic \ + -DG_LOG_DOMAIN=\"LibG3D\" \ + @DBG_CFLAGS@ -DDEBUG=@DEBUG@ \ + @GLIB_CFLAGS@ + +INCLUDES = -I$(top_srcdir)/include +AM_LDFLAGS = \ + -no-undefined -module \ + @PLUGINS_LDFLAGS@ + +imp_flt_la_SOURCES = imp_flt.c imp_flt.h \ + imp_flt_opcodes.h \ + imp_flt_callbacks.c imp_flt_callbacks.h + +imp_flt_la_LIBADD = $(top_builddir)/src/libg3d.la @GLIB_LIBS@ +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 \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/import/imp_flt/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu plugins/import/imp_flt/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 +install-pluginimpLTLIBRARIES: $(pluginimp_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pluginimpdir)" || $(MKDIR_P) "$(DESTDIR)$(pluginimpdir)" + @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pluginimpLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(pluginimpdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pluginimpLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(pluginimpdir)/$$f"; \ + else :; fi; \ + done + +uninstall-pluginimpLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pluginimpdir)/$$p'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pluginimpdir)/$$p"; \ + done + +clean-pluginimpLTLIBRARIES: + -test -z "$(pluginimp_LTLIBRARIES)" || rm -f $(pluginimp_LTLIBRARIES) + @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +imp_flt.la: $(imp_flt_la_OBJECTS) $(imp_flt_la_DEPENDENCIES) + $(LINK) $(am_imp_flt_la_rpath) $(imp_flt_la_OBJECTS) $(imp_flt_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imp_flt.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imp_flt_callbacks.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(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@ mv -f $(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@ mv -f $(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 $@ $< + +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; nonemtpy = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + 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; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + 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)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +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 $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$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)$(pluginimpdir)"; 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: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_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-libtool clean-pluginimpLTLIBRARIES \ + 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 + +info: info-am + +info-am: + +install-data-am: install-pluginimpLTLIBRARIES + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: 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-pluginimpLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-pluginimpLTLIBRARIES 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-man \ + install-pdf install-pdf-am install-pluginimpLTLIBRARIES \ + 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-pluginimpLTLIBRARIES + +# 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/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_flt/imp_flt.c b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_flt/imp_flt.c new file mode 100644 index 0000000..6a92b5a --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_flt/imp_flt.c @@ -0,0 +1,175 @@ +/* $Id$ */ + +/* + libg3d - 3D object loading library + + Copyright (C) 2005-2009 Markus Dahms + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include +#include +#include +#include +#include +#include + +#include "imp_flt_opcodes.h" + +FltOpcode *flt_opcode_info(guint32 opcode); + +EAPI +gboolean plugin_load_model_from_stream(G3DContext *context, G3DStream *stream, + G3DModel *model, gpointer user_data) +{ + guint16 opcode, rlen; + FltOpcode *oi; + FltGlobalData *gd; + FltLocalData *ld; + G3DObject *g3dobj = NULL; + gpointer level_object = NULL; + gchar *pad; + G3DFloat prev_pcnt = 0.0, pcnt; + G3DMatrix rmatrix[16]; + + gd = g_new0(FltGlobalData, 1); + gd->context = context; + gd->model = model; + gd->stream = stream; + gd->oqueue = g_queue_new(); + + while(!g3d_stream_eof(stream)) { + /* get record information */ + opcode = g3d_stream_read_int16_be(stream); + rlen = g3d_stream_read_int16_be(stream); + + /* create local data */ + ld = g_new0(FltLocalData, 1); + ld->opcode = opcode; + ld->nb = rlen - 4; + ld->g3dobj = g3dobj; + ld->level_object = level_object; + + if(opcode == 0) { + /* end of file or error */ + break; + } + + oi = flt_opcode_info(opcode); + + pad = g_strnfill(gd->level, ' '); + g_debug("\\%s[%04d][%c] %8d: %s", pad, opcode, + oi ? (oi->callback ? 'f' : ' ') : ' ', + rlen, + oi ? oi->description : "unknown"); + g_free(pad); + + if(oi && oi->callback) + oi->callback(gd, ld); + + /* skip remaining bytes */ + if(ld->nb > 0) + g3d_stream_skip(stream, ld->nb); + + /* free local data */ + g3dobj = ld->g3dobj; + level_object = ld->level_object; + g_free(ld); + + /* update caller */ + pcnt = (G3DFloat)g3d_stream_tell(stream) / + (G3DFloat)g3d_stream_size(stream); + if((pcnt - prev_pcnt) > 0.002) { + prev_pcnt = pcnt; + g3d_context_update_progress_bar(context, pcnt, TRUE); + } + g3d_context_update_interface(context); + } + + g_queue_free(gd->oqueue); + if(gd->vertex_palette) { + g_free(gd->vertex_palette->offsets); + g_free(gd->vertex_palette->flags); + g_free(gd->vertex_palette->vertex_data); + g_free(gd->vertex_palette->normal_data); + g_free(gd->vertex_palette->tex_vertex_data); + g_free(gd->vertex_palette->vertex_materials); + g_free(gd->vertex_palette); + } + if(gd->texture_palette) { + g_free(gd->texture_palette->offsets); + g_free(gd->texture_palette->textures); + g_free(gd->texture_palette); + } + g_free(gd); + + g3d_matrix_identity(rmatrix); + g3d_matrix_rotate_xyz(G_PI * -90.0 / 180, 0.0, 0.0, rmatrix); + g3d_model_transform(model, rmatrix); + + return TRUE; +} + +EAPI +gchar *plugin_description(G3DContext *context) +{ + return g_strdup("OpenFlight models."); +} + +EAPI +gchar **plugin_extensions(G3DContext *context) +{ + return g_strsplit("flt", ":", 0); +} + +/* + * FLT specific + */ + +FltOpcode *flt_opcode_info(guint32 opcode) +{ + guint32 i; + + for(i = 0; flt_opcodes[i].opcode != 0; i ++) + if(flt_opcodes[i].opcode == opcode) + return &(flt_opcodes[i]); + return NULL; +} + +guint32 flt_read_typed_index(G3DStream *stream, guint32 type, gint32 *len) +{ + guint32 val = 0; + + switch(type) { + case 1: + val = g3d_stream_read_int8(stream); + *len -= 1; + break; + case 2: + val = g3d_stream_read_int16_be(stream); + *len -= 2; + break; + case 4: + val = g3d_stream_read_int32_be(stream); + *len -= 4; + break; + default: + g_warning("FLT: unknown index type %d\n", type); + break; + } + return val; +} + diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_flt/imp_flt.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_flt/imp_flt.h new file mode 100644 index 0000000..0c23cd1 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_flt/imp_flt.h @@ -0,0 +1,30 @@ +/* $Id$ */ + +/* + libg3d - 3D object loading library + + Copyright (C) 2005-2009 Markus Dahms + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ +#ifndef _IMP_FLT_H +#define _IMP_FLT_H + +#include +#include + +guint32 flt_read_typed_index(G3DStream *stream, guint32 type, gint32 *len); + +#endif /* _IMP_FLT_H */ diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_flt/imp_flt_callbacks.c b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_flt/imp_flt_callbacks.c new file mode 100644 index 0000000..44fd8f6 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_flt/imp_flt_callbacks.c @@ -0,0 +1,999 @@ +/* $Id$ */ + +/* + libg3d - 3D object loading library + + Copyright (C) 2005-2009 Markus Dahms + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include +#include + +#include +#include +#include +#include + +#include "imp_flt.h" +#include "imp_flt_callbacks.h" + +/* header */ +gboolean flt_cb_0001(FltGlobalData *gd, FltLocalData *ld) +{ + gchar id[8]; + + g3d_stream_read(gd->stream, id, 8); + id[7] = '\0'; + ld->nb -= 8; + gd->fversion = g3d_stream_read_int32_be(gd->stream); + ld->nb -= 4; + + g_debug("FLT: header: '%s' revision %u", id, gd->fversion); + + return TRUE; +} + +/* group */ +gboolean flt_cb_0002(FltGlobalData *gd, FltLocalData *ld) +{ + G3DObject *object, *pobj; + gchar namebuf[8]; + + object = g_new0(G3DObject, 1); + pobj = (G3DObject *)g_queue_peek_head(gd->oqueue); + if(pobj != NULL) + pobj->objects = g_slist_append(pobj->objects, object); + else + gd->model->objects = g_slist_append(gd->model->objects, object); + ld->g3dobj = object; + + /* group ID */ + g3d_stream_read(gd->stream, namebuf, 8); + ld->nb -= 8; + namebuf[7] = '\0'; + object->name = g_strdup_printf("group '%s'", namebuf); + + return TRUE; +} + +/* object */ +gboolean flt_cb_0004(FltGlobalData *gd, FltLocalData *ld) +{ + G3DObject *object, *pobj; + G3DMaterial *material; + gchar namebuf[8]; + + object = g_new0(G3DObject, 1); + pobj = (G3DObject *)g_queue_peek_head(gd->oqueue); + if(pobj != NULL) + pobj->objects = g_slist_append(pobj->objects, object); + else + gd->model->objects = g_slist_append(gd->model->objects, object); + ld->g3dobj = object; + + material = g3d_material_new(); + material->name = g_strdup("fallback material"); + object->materials = g_slist_append(object->materials, material); + + /* object ID */ + g3d_stream_read(gd->stream, namebuf, 8); + ld->nb -= 8; + namebuf[7] = '\0'; + object->name = g_strdup_printf("object '%s'", namebuf); + + /* flags */ + g3d_stream_read_int32_be(gd->stream); + ld->nb -= 4; + + /* relative priority */ + g3d_stream_read_int16_be(gd->stream); + ld->nb -= 2; + + /* transparency */ + g3d_stream_read_int16_be(gd->stream); + ld->nb -= 2; + + /* special effect ID 1 */ + g3d_stream_read_int16_be(gd->stream); + ld->nb -= 2; + + /* special effect ID 2 */ + g3d_stream_read_int16_be(gd->stream); + ld->nb -= 2; + + /* significance */ + g3d_stream_read_int16_be(gd->stream); + ld->nb -= 2; + + /* reserved */ + g3d_stream_read_int16_be(gd->stream); + ld->nb -= 2; + + return TRUE; +} + +/* face */ +gboolean flt_cb_0005(FltGlobalData *gd, FltLocalData *ld) +{ + G3DObject *object = ld->g3dobj; + G3DMaterial *material; + G3DFace *face; + gint16 index; + guint32 flags; + G3DFloat r, g, b; + + g_return_val_if_fail(object != NULL, FALSE); + + if(object->materials == NULL) { + material = g3d_material_new(); + material->name = g_strdup("(default material)"); + object->materials = g_slist_append(object->materials, material); + } + + face = g_new0(G3DFace, 1); + face->material = g_slist_nth_data(object->materials, 0); + object->faces = g_slist_append(object->faces, face); + ld->level_object = face; + + if(object->vertex_count == 0) { + if(gd->vertex_palette) { + /* copy vertex palette to object */ + object->vertex_count = gd->vertex_palette->n_entries; + object->vertex_data = g_new0(G3DFloat, object->vertex_count * 3); + memcpy(object->vertex_data, gd->vertex_palette->vertex_data, + object->vertex_count * 3 * sizeof(G3DFloat)); + } + } + + /* id */ + g3d_stream_skip(gd->stream, 8); + ld->nb -= 8; + /* IR color code */ + g3d_stream_read_int32_be(gd->stream); + ld->nb -= 4; + /* relative priority */ + g3d_stream_read_int16_be(gd->stream); + ld->nb -= 2; + /* draw type */ + g3d_stream_read_int8(gd->stream); + ld->nb --; + /* texture white */ + g3d_stream_read_int8(gd->stream); + ld->nb --; + /* color name index */ + g3d_stream_read_int16_be(gd->stream); + ld->nb -= 2; + /* alternate color name index */ + g3d_stream_read_int16_be(gd->stream); + ld->nb -= 2; + /* reserved */ + g3d_stream_read_int8(gd->stream); + ld->nb --; + /* template (billboard) */ + g3d_stream_read_int8(gd->stream); + ld->nb --; + /* detail texture pattern */ + index = g3d_stream_read_int16_be(gd->stream); + ld->nb -= 2; + if(index != -1) + if(gd->texture_palette && (index < gd->texture_palette->size)) + face->tex_image = gd->texture_palette->textures[index]; + /* texture pattern */ + index = g3d_stream_read_int16_be(gd->stream); + ld->nb -= 2; + if((face->tex_image == NULL) && (index != -1)) + if(gd->texture_palette && (index < gd->texture_palette->size)) + face->tex_image = gd->texture_palette->textures[index]; + + if(face->tex_image) + face->tex_image->tex_env = G3D_TEXENV_REPLACE; + + /* material index */ + index = g3d_stream_read_int16_be(gd->stream); + ld->nb -= 2; + if(index != -1) { + material = g_slist_nth_data(gd->model->materials, index); + if(material) + face->material = material; + } + /* surface material code */ + g3d_stream_read_int16_be(gd->stream); + ld->nb -= 2; + /* feature ID */ + g3d_stream_read_int16_be(gd->stream); + ld->nb -= 2; + /* IR material code */ + g3d_stream_read_int32_be(gd->stream); + ld->nb -= 4; + /* transparency */ + g3d_stream_read_int16_be(gd->stream); + ld->nb -= 2; + /* LOD generation control */ + g3d_stream_read_int8(gd->stream); + ld->nb --; + /* line style index */ + g3d_stream_read_int8(gd->stream); + ld->nb --; + /* flags */ + flags = g3d_stream_read_int32_be(gd->stream); + ld->nb -= 4; + /* light mode */ + g3d_stream_read_int8(gd->stream); + ld->nb --; + /* reserved */ + g3d_stream_skip(gd->stream, 7); + ld->nb -= 7; + /* packed color, primary */ + if((flags & (1 << 1)) /* no color */ || + !(flags & (1 << 3))) /* packed color */ + g3d_stream_read_int32_be(gd->stream); + else { + g3d_stream_read_int8(gd->stream); /* alpha, unused */ + b = (G3DFloat)g3d_stream_read_int8(gd->stream) / 255.0; + g = (G3DFloat)g3d_stream_read_int8(gd->stream) / 255.0; + r = (G3DFloat)g3d_stream_read_int8(gd->stream) / 255.0; + material = g3d_material_new(); + material->r = r; + material->g = g; + material->b = b; + material->a = 1.0; + face->material = material; + } + ld->nb -= 4; + /* packed color, alternate */ + g3d_stream_read_int32_be(gd->stream); + ld->nb -= 4; + /* texture mapping index */ + index = g3d_stream_read_int16_be(gd->stream); + ld->nb -= 2; + + return TRUE; +} + +/* push level */ +gboolean flt_cb_0010(FltGlobalData *gd, FltLocalData *ld) +{ + g_queue_push_head(gd->oqueue, ld->g3dobj); + + gd->level ++; + return TRUE; +} + +/* pop level */ +gboolean flt_cb_0011(FltGlobalData *gd, FltLocalData *ld) +{ + ld->g3dobj = g_queue_pop_head(gd->oqueue); + ld->level_object = NULL; + + if(gd->level > 0) + gd->level --; + return TRUE; +} + +/* color palette */ +gboolean flt_cb_0032(FltGlobalData *gd, FltLocalData *ld) +{ + G3DMaterial *material; + G3DObject *cobj; + gint32 i; + + cobj = g_new0(G3DObject, 1); + cobj->name = g_strdup("color palette"); + gd->model->objects = g_slist_append(gd->model->objects, cobj); + + /* skip reserved bytes */ + g3d_stream_skip(gd->stream, 128); + ld->nb -= 128; + + /* get colors */ + for(i = 0; i < 1024; i ++) { + material = g3d_material_new(); + material->name = g_strdup_printf("color %d", i); + cobj->materials = g_slist_append(cobj->materials, material); + + material->a = g3d_stream_read_int8(gd->stream) / 255.0; + material->b = g3d_stream_read_int8(gd->stream) / 255.0; + material->g = g3d_stream_read_int8(gd->stream) / 255.0; + material->r = g3d_stream_read_int8(gd->stream) / 255.0; + ld->nb -= 4; + } + + return TRUE; +} + +/* long ID */ +gboolean flt_cb_0033(FltGlobalData *gd, FltLocalData *ld) +{ + G3DObject *object = ld->g3dobj; + + g_return_val_if_fail(object != NULL, FALSE); + + g_free(object->name); + object->name = g_new0(gchar, ld->nb); + g3d_stream_read(gd->stream, object->name, ld->nb); + object->name[ld->nb - 1] = '\0'; + ld->nb = 0; + + return TRUE; +} + +/* texture palette */ +gboolean flt_cb_0064(FltGlobalData *gd, FltLocalData *ld) +{ + gchar fname[201]; + gint32 max, index, offx, offy; + + g3d_stream_read(gd->stream, fname, 200); + ld->nb -= 200; + + index = g3d_stream_read_int32_be(gd->stream); + offx = g3d_stream_read_int32_be(gd->stream); + offy = g3d_stream_read_int32_be(gd->stream); + ld->nb -= 12; + + if(gd->texture_palette == NULL) + gd->texture_palette = g_new0(FltTexturePalette, 1); + + max = MAX(index + 1, gd->texture_palette->size); + gd->texture_palette->size = max; + gd->texture_palette->offsets = g_realloc(gd->texture_palette->offsets, + max * 2 * sizeof(gint32)); + gd->texture_palette->textures = g_realloc(gd->texture_palette->textures, + max * sizeof(G3DImage *)); + gd->texture_palette->offsets[index * 2 + 0] = offx; + gd->texture_palette->offsets[index * 2 + 1] = offy; + +#if DEBUG > 2 + g_debug("FLT: 0064: %s (index %d @ %d, %d)", fname, index, offx, offy); +#endif + + gd->texture_palette->textures[index] = + g3d_texture_load_cached(gd->context, gd->model, fname); + + return TRUE; +} + +static gboolean flt_inc_vertex_palette(FltGlobalData *gd) +{ + g_return_val_if_fail(gd->vertex_palette != NULL, FALSE); + + gd->vertex_palette->n_entries ++; + gd->vertex_palette->offsets = g_realloc( + gd->vertex_palette->offsets, + gd->vertex_palette->n_entries * sizeof(goffset)); + gd->vertex_palette->flags = g_realloc( + gd->vertex_palette->flags, + gd->vertex_palette->n_entries * sizeof(guint32)); + gd->vertex_palette->vertex_data = g_realloc( + gd->vertex_palette->vertex_data, + gd->vertex_palette->n_entries * 3 * sizeof(G3DFloat)); + gd->vertex_palette->normal_data = g_realloc( + gd->vertex_palette->normal_data, + gd->vertex_palette->n_entries * 3 * sizeof(G3DFloat)); + gd->vertex_palette->tex_vertex_data = g_realloc( + gd->vertex_palette->tex_vertex_data, + gd->vertex_palette->n_entries * 2 * sizeof(G3DFloat)); + gd->vertex_palette->vertex_materials = g_realloc( + gd->vertex_palette->vertex_materials, + gd->vertex_palette->n_entries * sizeof(G3DMaterial *)); + return TRUE; +} + +/* vertex palette */ +gboolean flt_cb_0067(FltGlobalData *gd, FltLocalData *ld) +{ + gd->vertex_palette = g_new0(FltVertexPalette, 1); + gd->vertex_palette->offset = 8; + return TRUE; +} + +static G3DMaterial *flt_material_by_index(FltGlobalData *gd, guint32 i) +{ + G3DObject *colobj; + + colobj = g3d_model_get_object_by_name(gd->model, "color palette"); + if(colobj == NULL) + return NULL; + + return g_slist_nth_data(colobj->materials, i); +} + +#define FLOAT_EQUALS(a, b) (fabs((a) - (b)) < 0.001) + +static G3DMaterial *flt_find_color(G3DObject *pobj, + G3DFloat r, G3DFloat g, G3DFloat b, G3DFloat a) +{ + GSList *item; + G3DMaterial *material; + + for(item = pobj->materials; item != NULL; item = item->next) { + material = item->data; + if(FLOAT_EQUALS(material->r, r) && FLOAT_EQUALS(material->g, g) && + FLOAT_EQUALS(material->b, b) && FLOAT_EQUALS(material->a, a)) + return material; + } + g_debug("did not find material"); + return NULL; +} + +static gboolean flt_handle_vertex_color(FltGlobalData *gd, FltLocalData *ld, + guint32 flags) +{ + G3DObject *vcolobj; + G3DMaterial *material; + G3DFloat r, g, b, a; + + if(flags & FLT_FLAG_NO_COLOR) + return TRUE; + + vcolobj = g3d_model_get_object_by_name(gd->model, "vertex colors"); + if(vcolobj == NULL) { + vcolobj = g_new0(G3DObject, 1); + vcolobj->name = g_strdup("vertex colors"); + gd->model->objects = g_slist_append(gd->model->objects, vcolobj); + } + a = (G3DFloat)g3d_stream_read_int8(gd->stream) / 255.0; + b = (G3DFloat)g3d_stream_read_int8(gd->stream) / 255.0; + g = (G3DFloat)g3d_stream_read_int8(gd->stream) / 255.0; + r = (G3DFloat)g3d_stream_read_int8(gd->stream) / 255.0; + ld->nb -= 4; + + if(flags & FLT_FLAG_PACKED_COLOR) { + material = flt_find_color(vcolobj, r, g, b, a); + if(material == NULL) { + material = g3d_material_new(); + material->r = r; + material->g = g; + material->b = b; + material->a = a; + material->name = g_strdup_printf( + "vertex material (%.2f, %.2f, %.2f, %.2f)", r, g, b, a); + vcolobj->materials = g_slist_prepend(vcolobj->materials, material); + } + } else { + /* color index */ + material = flt_material_by_index(gd, + g3d_stream_read_int32_be(gd->stream)); + ld->nb -= 4; + } + gd->vertex_palette->vertex_materials[gd->vertex_palette->n_entries - 1] = + material; + return TRUE; +} + +/* vertex with color record */ +gboolean flt_cb_0068(FltGlobalData *gd, FltLocalData *ld) +{ + gint32 i, index; + guint32 flags; + + if(!flt_inc_vertex_palette(gd)) + return FALSE; + + index = gd->vertex_palette->n_entries - 1; + gd->vertex_palette->offsets[index] = gd->vertex_palette->offset; + gd->vertex_palette->offset += ld->nb + 4; + gd->vertex_palette->flags[index] = 0; + + /* color name index */ + gd->vertex_palette->vertex_materials[index] = + flt_material_by_index(gd, g3d_stream_read_int16_be(gd->stream)); + ld->nb -= 2; + + /* flags */ + flags = g3d_stream_read_int16_be(gd->stream); + ld->nb -= 2; + + /* vertex coordinate */ + for(i = 0; i < 3; i ++) { + gd->vertex_palette->vertex_data[index * 3 + i] = + g3d_stream_read_double_be(gd->stream); + ld->nb -= 8; + } + + flt_handle_vertex_color(gd, ld, flags); + + return TRUE; +} + +/* vertex with color and normal record */ +gboolean flt_cb_0069(FltGlobalData *gd, FltLocalData *ld) +{ + gint32 i, index; + guint32 flags; + + if(!flt_inc_vertex_palette(gd)) + return FALSE; + + index = gd->vertex_palette->n_entries - 1; + gd->vertex_palette->offsets[index] = gd->vertex_palette->offset; + gd->vertex_palette->offset += ld->nb + 4; + gd->vertex_palette->flags[index] = G3D_FLAG_FAC_NORMALS; + + /* color name index */ + gd->vertex_palette->vertex_materials[index] = + flt_material_by_index(gd, g3d_stream_read_int16_be(gd->stream)); + ld->nb -= 2; + + /* flags */ + flags = g3d_stream_read_int16_be(gd->stream); + ld->nb -= 2; + + /* vertex coordinate */ + for(i = 0; i < 3; i ++) { + gd->vertex_palette->vertex_data[index * 3 + i] = + g3d_stream_read_double_be(gd->stream); + ld->nb -= 8; + } + + /* vertex normal */ + for(i = 0; i < 3; i ++) { + gd->vertex_palette->normal_data[index * 3 + i] = + g3d_stream_read_float_be(gd->stream); + ld->nb -= 4; + } + + flt_handle_vertex_color(gd, ld, flags); + + return TRUE; +} + +/* vertex with color, normal and uv record */ +gboolean flt_cb_0070(FltGlobalData *gd, FltLocalData *ld) +{ + gint32 i, index; + guint32 flags; + + if(!flt_inc_vertex_palette(gd)) + return FALSE; + + index = gd->vertex_palette->n_entries - 1; + gd->vertex_palette->offsets[index] = gd->vertex_palette->offset; + gd->vertex_palette->offset += ld->nb + 4; + gd->vertex_palette->flags[index] = + G3D_FLAG_FAC_NORMALS | G3D_FLAG_FAC_TEXMAP; + + /* color name index */ + gd->vertex_palette->vertex_materials[index] = + flt_material_by_index(gd, g3d_stream_read_int16_be(gd->stream)); + ld->nb -= 2; + + /* flags */ + flags = g3d_stream_read_int16_be(gd->stream); + ld->nb -= 2; + + /* vertex coordinate */ + for(i = 0; i < 3; i ++) { + gd->vertex_palette->vertex_data[index * 3 + i] = + g3d_stream_read_double_be(gd->stream); + ld->nb -= 8; + } + + /* vertex normal */ + for(i = 0; i < 3; i ++) { + gd->vertex_palette->normal_data[index * 3 + i] = + g3d_stream_read_float_be(gd->stream); + ld->nb -= 4; + } + + /* vertex texture coordinate */ + for(i = 0; i < 2; i ++) { + gd->vertex_palette->tex_vertex_data[index * 2 + i] = + g3d_stream_read_float_be(gd->stream); + ld->nb -= 4; + } + + flt_handle_vertex_color(gd, ld, flags); + + return TRUE; +} + +/* vertex with color and uv record */ +gboolean flt_cb_0071(FltGlobalData *gd, FltLocalData *ld) +{ + gint32 i, index; + guint32 flags; + + if(!flt_inc_vertex_palette(gd)) + return FALSE; + + index = gd->vertex_palette->n_entries - 1; + gd->vertex_palette->offsets[index] = gd->vertex_palette->offset; + gd->vertex_palette->offset += ld->nb + 4; + gd->vertex_palette->flags[index] = G3D_FLAG_FAC_TEXMAP; + + /* color name index */ + gd->vertex_palette->vertex_materials[index] = + flt_material_by_index(gd, g3d_stream_read_int16_be(gd->stream)); + ld->nb -= 2; + + /* flags */ + flags = g3d_stream_read_int16_be(gd->stream); + ld->nb -= 2; + + /* vertex coordinate */ + for(i = 0; i < 3; i ++) { + gd->vertex_palette->vertex_data[index * 3 + i] = + g3d_stream_read_double_be(gd->stream); + ld->nb -= 8; + } + + /* vertex texture coordinate */ + for(i = 0; i < 2; i ++) { + gd->vertex_palette->tex_vertex_data[index * 2 + i] = + g3d_stream_read_float_be(gd->stream); + ld->nb -= 4; + } + + flt_handle_vertex_color(gd, ld, flags); + + return TRUE; +} + +static gint32 flt_vertex_palette_index_from_offset(FltGlobalData *gd, + goffset offset) +{ + FltVertexPalette *pal = gd->vertex_palette; + gint i; + + g_return_val_if_fail(pal != NULL, -1); + + for(i = 0; (i < pal->n_entries) && (pal->offsets[i] < offset); i ++); + if((i < pal->n_entries) && (pal->offsets[i] == offset)) + return i; + g_warning("FLT: flt_vertex_palette_index_from_offset: " + "could not get index for offset %li (i=%d)", (long int)offset, i); + return -1; +} + +/* vertex list */ +gboolean flt_cb_0072(FltGlobalData *gd, FltLocalData *ld) +{ + G3DFace *face = ld->level_object; + gint32 i, j, index; + guint32 n; + + g_return_val_if_fail(face != NULL, FALSE); + + n = ld->nb / 4; + face->vertex_count = n; + face->vertex_indices = g_new0(guint32, n); + + for(i = 0; i < n; i ++) { + j = g3d_stream_read_int32_be(gd->stream); + ld->nb -= 4; + +#define FLT_SUPPORT_BROKEN_VERTEX_LIST 1 +#if FLT_SUPPORT_BROKEN_VERTEX_LIST + /* FIXME: there are some broken models which directly specify the + * index instead of a byte offset in the vertex palette */ + + if(gd->flags & FLT_FLAG_BROKEN_VERTEX_LIST) + index = j; + else + index = flt_vertex_palette_index_from_offset(gd, j); + if(index == -1) { + index = j; + gd->flags |= FLT_FLAG_BROKEN_VERTEX_LIST; + } +#else + index = flt_vertex_palette_index_from_offset(gd, j); +#endif + if(index == -1) + return FALSE; + face->vertex_indices[i] = index; + if(gd->vertex_palette->flags[index] & G3D_FLAG_FAC_NORMALS) { + /* copy normal data */ + if(face->normals == NULL) { + face->normals = g_new0(G3DFloat, n * 3); + face->flags |= G3D_FLAG_FAC_NORMALS; + } + for(j = 0; j < 3; j ++) + face->normals[i * 3 + j] = + gd->vertex_palette->normal_data[index * 3 + j]; + } + if(gd->vertex_palette->flags[index] & G3D_FLAG_FAC_TEXMAP) { + /* copy texture coordinate data */ + if(face->tex_vertex_data == NULL) { + face->tex_vertex_data = g_new0(G3DFloat, n * 2); + face->tex_vertex_count = n; + if(face->tex_image) + face->flags |= G3D_FLAG_FAC_TEXMAP; + } + for(j = 0; j < 2; j ++) + face->tex_vertex_data[i * 2 + j] = + gd->vertex_palette->tex_vertex_data[index * 2 + j]; + } + if(gd->vertex_palette->vertex_materials[index] != NULL) + face->material = gd->vertex_palette->vertex_materials[index]; + } + return TRUE; +} + +/* mesh */ +gboolean flt_cb_0084(FltGlobalData *gd, FltLocalData *ld) +{ + G3DObject *object; + gchar *namebuf[8]; + gint32 index; + + object = (G3DObject *)g_queue_peek_head(gd->oqueue); + g_return_val_if_fail(object != NULL, FALSE); + + /* ASCII ID */ + g3d_stream_read(gd->stream, namebuf, 8); + namebuf[7] = '\0'; + ld->nb -= 8; + + /* reserved */ + g3d_stream_read_int32_be(gd->stream); + ld->nb -= 4; + /* IR color code */ + g3d_stream_read_int32_be(gd->stream); + ld->nb -= 4; + /* priority */ + g3d_stream_read_int16_be(gd->stream); + ld->nb -= 2; + /* draw type */ + g3d_stream_read_int8(gd->stream); + ld->nb --; + /* texture white */ + g3d_stream_read_int8(gd->stream); + ld->nb --; + /* color name index */ + g3d_stream_read_int16_be(gd->stream); + ld->nb -= 2; + /* alternate color name index */ + g3d_stream_read_int16_be(gd->stream); + ld->nb -= 2; + /* reserved */ + g3d_stream_read_int8(gd->stream); + ld->nb --; + /* template (billboard) */ + g3d_stream_read_int8(gd->stream); + ld->nb --; + /* detail texture pattern */ + index = g3d_stream_read_int16_be(gd->stream); + ld->nb -= 2; + if(index > -1) + if(gd->texture_palette && (index < gd->texture_palette->size)) + object->tex_image = gd->texture_palette->textures[index]; + /* texture pattern */ + index = g3d_stream_read_int16_be(gd->stream); + ld->nb -= 2; + if((index > -1) && (object->tex_image == NULL)) + if(gd->texture_palette && (index < gd->texture_palette->size)) + object->tex_image = gd->texture_palette->textures[index]; + + return TRUE; +} + +/* local vertex pool */ +gboolean flt_cb_0085(FltGlobalData *gd, FltLocalData *ld) +{ + G3DObject *object; + guint32 nverts, attrmask; + gint32 i; + + object = (G3DObject *)g_queue_peek_head(gd->oqueue); + g_return_val_if_fail(object != NULL, FALSE); + + nverts = g3d_stream_read_int32_be(gd->stream); + attrmask = g3d_stream_read_int32_be(gd->stream); + ld->nb -= 8; + + object->vertex_count = nverts; + object->vertex_data = g_new0(G3DFloat, nverts * 3); + object->tex_vertex_count = nverts; + object->tex_vertex_data = g_new0(G3DFloat, nverts * 2); + + for(i = 0; i < nverts; i ++) { + if(attrmask & (1 << 31)) { /* has position */ + object->vertex_data[i * 3 + 0] = + g3d_stream_read_double_be(gd->stream); + object->vertex_data[i * 3 + 1] = + g3d_stream_read_double_be(gd->stream); + object->vertex_data[i * 3 + 2] = + g3d_stream_read_double_be(gd->stream); + ld->nb -= 24; + } + + if(attrmask & (1 << 30)) { /* has color index */ + g3d_stream_read_int32_be(gd->stream); + ld->nb -= 4; + } + + if(attrmask & (1 << 29)) { /* has RGBA color */ + g3d_stream_read_int32_be(gd->stream); + ld->nb -= 4; + } + + if(attrmask & (1 << 28)) { /* has normal */ + g3d_stream_read_float_be(gd->stream); + g3d_stream_read_float_be(gd->stream); + g3d_stream_read_float_be(gd->stream); + ld->nb -= 12; + } + + if(attrmask & (1 << 27)) { /* has base UV */ + object->tex_vertex_data[i * 2 + 0] = + g3d_stream_read_float_be(gd->stream); + object->tex_vertex_data[i * 2 + 1] = + g3d_stream_read_float_be(gd->stream); + ld->nb -= 8; + } + + if(attrmask & (1 << 26)) { /* has UV layer 1 */ + g3d_stream_read_float_be(gd->stream); + g3d_stream_read_float_be(gd->stream); + ld->nb -= 8; + } + + if(attrmask & (1 << 25)) { /* has UV layer 2 */ + g3d_stream_read_float_be(gd->stream); + g3d_stream_read_float_be(gd->stream); + ld->nb -= 8; + } + + if(attrmask & (1 << 24)) { /* has UV layer 3 */ + g3d_stream_read_float_be(gd->stream); + g3d_stream_read_float_be(gd->stream); + ld->nb -= 8; + } + + if(attrmask & (1 << 23)) { /* has UV layer 4 */ + g3d_stream_read_float_be(gd->stream); + g3d_stream_read_float_be(gd->stream); + ld->nb -= 8; + } + + if(attrmask & (1 << 22)) { /* has UV layer 5 */ + g3d_stream_read_float_be(gd->stream); + g3d_stream_read_float_be(gd->stream); + ld->nb -= 8; + } + + if(attrmask & (1 << 21)) { /* has UV layer 6 */ + g3d_stream_read_float_be(gd->stream); + g3d_stream_read_float_be(gd->stream); + ld->nb -= 8; + } + + if(attrmask & (1 << 20)) { /* has UV layer 7 */ + g3d_stream_read_float_be(gd->stream); + g3d_stream_read_float_be(gd->stream); + ld->nb -= 8; + } + } + + return TRUE; +} + +/* mesh primitive */ +gboolean flt_cb_0086(FltGlobalData *gd, FltLocalData *ld) +{ + guint32 type, isize, nverts; + gint32 i; + G3DFace *face; + G3DObject *object; + + object = (G3DObject *)g_queue_peek_head(gd->oqueue); + g_return_val_if_fail(object != NULL, FALSE); + + type = g3d_stream_read_int16_be(gd->stream); + isize = g3d_stream_read_int16_be(gd->stream); + nverts = g3d_stream_read_int32_be(gd->stream); + ld->nb -= 8; + + switch(type) { + case 1: /* triangle strip */ + g_debug("0086: triangle strip"); + break; + + case 2: /* triangle fan */ + g_debug("0086: triangle fan"); + break; + + case 3: /* quadriteral strip */ + g_debug("0086: quadriteral strip"); + break; + + case 4: /* indexed polygon */ + face = g_new0(G3DFace, 1); + face->material = (G3DMaterial *)g_slist_nth_data(object->materials, + 0); + face->vertex_count = nverts; + face->vertex_indices = g_new0(guint32, nverts); + for(i = 0; i < nverts; i ++) { + face->vertex_indices[i] = flt_read_typed_index( + gd->stream, isize, &(ld->nb)); + } + face->tex_image = object->tex_image; + if(face->tex_image != NULL) { + face->tex_vertex_count = nverts; + face->tex_vertex_data = g_new0(G3DFloat, nverts * 2); + for(i = 0; i < nverts; i ++) { + face->tex_vertex_data[i * 2 + 0] = + object->tex_vertex_data[ + face->vertex_indices[i] * 2 + 0]; + face->tex_vertex_data[i * 2 + 1] = + object->tex_vertex_data[ + face->vertex_indices[i] * 2 + 1]; + } + face->flags |= G3D_FLAG_FAC_TEXMAP; + } + object->faces = g_slist_append(object->faces, face); + break; + + default: + g_warning("FLT: mesh primitive: unknown type %d\n", type); + } + + return TRUE; +} + +/* material palette */ +gboolean flt_cb_0113(FltGlobalData *gd, FltLocalData *ld) +{ + G3DMaterial *material; + gchar name[13]; + + material = g3d_material_new(); + + /* material index */ + g3d_stream_read_int32_be(gd->stream); + ld->nb -= 4; + /* material name */ + g3d_stream_read(gd->stream, name, 12); + ld->nb -= 12; + name[12] = '\0'; + material->name = g_strdup(name); + /* flags */ + g3d_stream_read_int32_be(gd->stream); + ld->nb -= 4; + /* ambient */ + g3d_stream_read_float_be(gd->stream); + g3d_stream_read_float_be(gd->stream); + g3d_stream_read_float_be(gd->stream); + ld->nb -= 12; + /* diffuse */ + material->r = g3d_stream_read_float_be(gd->stream); + material->g = g3d_stream_read_float_be(gd->stream); + material->b = g3d_stream_read_float_be(gd->stream); + ld->nb -= 12; + /* specular */ + material->specular[0] = g3d_stream_read_float_be(gd->stream); + material->specular[1] = g3d_stream_read_float_be(gd->stream); + material->specular[2] = g3d_stream_read_float_be(gd->stream); + ld->nb -= 12; + /* emissive */ + g3d_stream_read_float_be(gd->stream); + g3d_stream_read_float_be(gd->stream); + g3d_stream_read_float_be(gd->stream); + ld->nb -= 12; + /* shininess */ + material->shininess = g3d_stream_read_float_be(gd->stream); + ld->nb -= 4; + /* alpha */ + material->a = g3d_stream_read_float_be(gd->stream); + ld->nb -= 4; + + gd->model->materials = g_slist_append(gd->model->materials, material); + + return TRUE; +} + diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_flt/imp_flt_callbacks.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_flt/imp_flt_callbacks.h new file mode 100644 index 0000000..cc26120 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_flt/imp_flt_callbacks.h @@ -0,0 +1,95 @@ +/* $Id$ */ + +/* + libg3d - 3D object loading library + + Copyright (C) 2005-2009 Markus Dahms + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ +#ifndef _IMP_FLT_CALLBACKS_H +#define _IMP_FLT_CALLBACKS_H + +#include +#include +#include +#include + +typedef struct { + guint32 n_entries; + goffset offset; + + goffset *offsets; /* n * goffset */ + guint32 *flags; /* n * guint32 */ + G3DMaterial **vertex_materials; /* n * G3DMaterial* */ + G3DFloat *vertex_data; /* 3 x n * G3DFloat */ + G3DFloat *normal_data; /* 3 x n * G3DFloat */ + G3DFloat *tex_vertex_data; /* 2 x n * G3DFloat */ +} FltVertexPalette; + +typedef struct { + guint32 size; + G3DImage **textures; + gint32 *offsets; +} FltTexturePalette; + +#define FLT_FLAG_BROKEN_VERTEX_LIST (1 << 0) + +#define FLT_FLAG_NO_COLOR (1 << 2) +#define FLT_FLAG_PACKED_COLOR (1 << 3) + +typedef struct { + G3DContext *context; + G3DModel *model; + G3DStream *stream; + guint32 level; + GQueue *oqueue; + FltVertexPalette *vertex_palette; + FltTexturePalette *texture_palette; + guint32 fversion; /* format version */ + guint32 flags; +} FltGlobalData; + +typedef struct { + guint32 opcode; + G3DObject *g3dobj; + gpointer level_object; + gint32 nb; +} FltLocalData; + +typedef gboolean (*FltCallbackFunc)(FltGlobalData *gd, FltLocalData *ld); + +/* callback functions */ +gboolean flt_cb_0001(FltGlobalData *gd, FltLocalData *ld); +gboolean flt_cb_0002(FltGlobalData *gd, FltLocalData *ld); +gboolean flt_cb_0004(FltGlobalData *gd, FltLocalData *ld); +gboolean flt_cb_0005(FltGlobalData *gd, FltLocalData *ld); +gboolean flt_cb_0010(FltGlobalData *gd, FltLocalData *ld); +gboolean flt_cb_0011(FltGlobalData *gd, FltLocalData *ld); +gboolean flt_cb_0032(FltGlobalData *gd, FltLocalData *ld); +gboolean flt_cb_0033(FltGlobalData *gd, FltLocalData *ld); +gboolean flt_cb_0064(FltGlobalData *gd, FltLocalData *ld); +gboolean flt_cb_0067(FltGlobalData *gd, FltLocalData *ld); +gboolean flt_cb_0068(FltGlobalData *gd, FltLocalData *ld); +gboolean flt_cb_0069(FltGlobalData *gd, FltLocalData *ld); +gboolean flt_cb_0070(FltGlobalData *gd, FltLocalData *ld); +gboolean flt_cb_0071(FltGlobalData *gd, FltLocalData *ld); +gboolean flt_cb_0072(FltGlobalData *gd, FltLocalData *ld); +gboolean flt_cb_0084(FltGlobalData *gd, FltLocalData *ld); +gboolean flt_cb_0085(FltGlobalData *gd, FltLocalData *ld); +gboolean flt_cb_0086(FltGlobalData *gd, FltLocalData *ld); +gboolean flt_cb_0113(FltGlobalData *gd, FltLocalData *ld); + +#endif /* _IMP_FLT_CALLBACKS_H */ diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_flt/imp_flt_opcodes.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_flt/imp_flt_opcodes.h new file mode 100644 index 0000000..8cb02b0 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_flt/imp_flt_opcodes.h @@ -0,0 +1,136 @@ +/* $Id$ */ + +/* + libg3d - 3D object loading library + + Copyright (C) 2005-2009 Markus Dahms + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ +#ifndef _IMP_FLT_OPCODES_H +#define _IMP_FLT_OPCODES_H + +#include + +#include "imp_flt_callbacks.h" + +typedef struct { + guint32 opcode; + gchar *description; + gboolean container; + FltCallbackFunc callback; +} FltOpcode; + +static FltOpcode flt_opcodes[] = { + { 1, "header", 0, flt_cb_0001 }, + { 2, "group", 0, flt_cb_0002 }, + + { 4, "object", 0, flt_cb_0004 }, + { 5, "face", 0, flt_cb_0005 }, + + { 10, "push level", 0, flt_cb_0010 }, + { 11, "pop level", 0, flt_cb_0011 }, + + { 14, "degree of freedom", 0, NULL }, + + { 19, "push subface", 0, NULL }, + { 20, "pop subface", 0, NULL }, + { 21, "push extension", 0, NULL }, + { 22, "pop extension", 0, NULL }, + { 23, "continuation", 0, NULL }, + + { 31, "comment", 0, NULL }, + { 32, "color palette", 0, flt_cb_0032 }, + { 33, "long ID", 0, flt_cb_0033 }, + + { 49, "matrix", 0, NULL }, + { 50, "vector", 0, NULL }, + + { 52, "multitexture", 0, NULL }, + { 53, "UV list", 0, NULL }, + + { 55, "binary separating plane", 0, NULL }, + + { 60, "replicate", 0, NULL }, + { 61, "instance reference", 0, NULL }, + { 62, "instance definition", 0, NULL }, + { 63, "external reference", 0, NULL }, + { 64, "texture palette", 0, flt_cb_0064 }, + + { 67, "vertex palette", 0, flt_cb_0067 }, + { 68, "vertex with color", 0, flt_cb_0068 }, + { 69, "vertex with color and normal", 0, flt_cb_0069 }, + { 70, "vertex with color, normal and UV", 0, flt_cb_0070 }, + { 71, "vertex with color and UV", 0, flt_cb_0071 }, + { 72, "vertex list", 0, flt_cb_0072 }, + { 73, "level of detail", 0, NULL }, + { 74, "bounding box", 0, NULL }, + + { 76, "rotate about edge", 0, NULL }, + + { 78, "translate", 0, NULL }, + { 79, "scale", 0, NULL }, + { 80, "rotate about point", 0, NULL }, + { 81, "rotate and/or scale to point", 0, NULL }, + { 82, "put", 0, NULL }, + { 83, "eyepoint and trackplane palette", 0, NULL }, + { 84, "mesh", 0, flt_cb_0084 }, + { 85, "local vertex pool", 0, flt_cb_0085 }, + { 86, "mesh primitive", 0, flt_cb_0086 }, + { 87, "road segment", 0, NULL }, + { 88, "road zone", 0, NULL }, + { 89, "morph vertex list", 0, NULL }, + { 90, "linkage palette", 0, NULL }, + { 91, "sound node", 0, NULL }, + { 92, "road path", 0, NULL }, + { 93, "sound palette", 0, NULL }, + { 94, "general matrix", 0, NULL }, + { 95, "text", 0, NULL }, + { 96, "switch", 0, NULL }, + { 97, "line style palette", 0, NULL }, + { 98, "clip region", 0, NULL }, + + { 100, "extension", 0, NULL }, + { 101, "light source", 0, NULL }, + { 102, "light source palette", 0, NULL }, + + { 105, "bounding sphere", 0, NULL }, + { 106, "bounding cylinder", 0, NULL }, + { 107, "bounding convex hull", 0, NULL }, + { 108, "bounding volume center", 0, NULL }, + { 109, "bounding volume orientation", 0, NULL }, + + { 111, "light point", 0, NULL }, + { 112, "texture mapping palette", 0, NULL }, + { 113, "material palette", 0, flt_cb_0113 }, + { 114, "name table", 0, NULL }, + { 115, "continuously adaptive terrain (CAT)", 0, NULL }, + { 116, "CAT data", 0, NULL }, + + { 119, "bounding histogram", 0, NULL }, + + { 126, "curve", 0, NULL }, + { 127, "road construction", 0, NULL }, + { 128, "light point appearance palette", 0, NULL }, + { 129, "light point animation", 0, NULL }, + { 130, "indexed light point", 0, NULL }, + + { 132, "indexed string", 0, NULL }, + { 133, "shader", 0, NULL }, + + { 0, NULL, 0, NULL } +}; + +#endif /* _IMP_FLT_OPCODES_H */ -- cgit v1.1