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_lwo/Makefile | 512 ++++++++++++++++++ .../plugins/import/imp_lwo/Makefile.am | 21 + .../plugins/import/imp_lwo/Makefile.in | 512 ++++++++++++++++++ .../libg3d-0.0.8/plugins/import/imp_lwo/imp_lwo.c | 216 ++++++++ .../libg3d-0.0.8/plugins/import/imp_lwo/imp_lwo.h | 48 ++ .../plugins/import/imp_lwo/imp_lwo_callbacks.c | 584 +++++++++++++++++++++ .../plugins/import/imp_lwo/imp_lwo_callbacks.h | 41 ++ .../plugins/import/imp_lwo/imp_lwo_chunks.h | 124 +++++ 8 files changed, 2058 insertions(+) create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_lwo/Makefile create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_lwo/Makefile.am create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_lwo/Makefile.in create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_lwo/imp_lwo.c create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_lwo/imp_lwo.h create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_lwo/imp_lwo_callbacks.c create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_lwo/imp_lwo_callbacks.h create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_lwo/imp_lwo_chunks.h (limited to 'src/others/mimesh/libg3d-0.0.8/plugins/import/imp_lwo') diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_lwo/Makefile b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_lwo/Makefile new file mode 100644 index 0000000..54c1aef --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_lwo/Makefile @@ -0,0 +1,512 @@ +# Makefile.in generated by automake 1.10.1 from Makefile.am. +# plugins/import/imp_lwo/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_lwo +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_lwo_la_DEPENDENCIES = $(top_builddir)/src/libg3d.la +am_imp_lwo_la_OBJECTS = imp_lwo.lo imp_lwo_callbacks.lo +imp_lwo_la_OBJECTS = $(am_imp_lwo_la_OBJECTS) +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_lwo_la_SOURCES) +DIST_SOURCES = $(imp_lwo_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_lwo +abs_srcdir = /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_lwo +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_lwo.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_lwo_la_SOURCES = imp_lwo.c imp_lwo.h imp_lwo_chunks.h \ + imp_lwo_callbacks.c imp_lwo_callbacks.h + +imp_lwo_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_lwo/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu plugins/import/imp_lwo/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_lwo.la: $(imp_lwo_la_OBJECTS) $(imp_lwo_la_DEPENDENCIES) + $(LINK) -rpath $(pluginimpdir) $(imp_lwo_la_OBJECTS) $(imp_lwo_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +include ./$(DEPDIR)/imp_lwo.Plo +include ./$(DEPDIR)/imp_lwo_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_lwo/Makefile.am b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_lwo/Makefile.am new file mode 100644 index 0000000..8eba1a1 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_lwo/Makefile.am @@ -0,0 +1,21 @@ +pluginimpdir = $(pkglibdir)/plugins/import + +pluginimp_LTLIBRARIES = imp_lwo.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@ + +LIBTOOL += --quiet + +imp_lwo_la_SOURCES = imp_lwo.c imp_lwo.h imp_lwo_chunks.h \ + imp_lwo_callbacks.c imp_lwo_callbacks.h +imp_lwo_la_LIBADD = $(top_builddir)/src/libg3d.la @GLIB_LIBS@ diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_lwo/Makefile.in b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_lwo/Makefile.in new file mode 100644 index 0000000..db7b118 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_lwo/Makefile.in @@ -0,0 +1,512 @@ +# 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_lwo +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_lwo_la_DEPENDENCIES = $(top_builddir)/src/libg3d.la +am_imp_lwo_la_OBJECTS = imp_lwo.lo imp_lwo_callbacks.lo +imp_lwo_la_OBJECTS = $(am_imp_lwo_la_OBJECTS) +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_lwo_la_SOURCES) +DIST_SOURCES = $(imp_lwo_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 +pluginimp_LTLIBRARIES = imp_lwo.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_lwo_la_SOURCES = imp_lwo.c imp_lwo.h imp_lwo_chunks.h \ + imp_lwo_callbacks.c imp_lwo_callbacks.h + +imp_lwo_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_lwo/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu plugins/import/imp_lwo/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_lwo.la: $(imp_lwo_la_OBJECTS) $(imp_lwo_la_DEPENDENCIES) + $(LINK) -rpath $(pluginimpdir) $(imp_lwo_la_OBJECTS) $(imp_lwo_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imp_lwo.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imp_lwo_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_lwo/imp_lwo.c b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_lwo/imp_lwo.c new file mode 100644 index 0000000..d01b817 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_lwo/imp_lwo.c @@ -0,0 +1,216 @@ +/* $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 +*/ + +/* + * imp_lwo.c - LightWave import plugin + * + * (C) 2005,2006 Markus Dahms + * + * based on gtkglarea example viewlw: + * Copyright (C) 1998 Janne Löf + */ + +#include + +#include +#include +#include +#include +#include + +#define LW_MAX_POINTS 200 +#define LW_MAX_NAME_LEN 500 +#define LW_F_LWO2 1 + +#include "imp_lwo.h" +#include "imp_lwo_chunks.h" + +/*****************************************************************************/ +/* plugin interface */ +/*****************************************************************************/ + +static void lwo_fix_texfaces(G3DModel *model); + +EAPI +gboolean plugin_load_model_from_stream(G3DContext *context, G3DStream *stream, + G3DModel *model, gpointer user_data) +{ + LwoObject *obj; + G3DMaterial *material; + guint32 id; + gsize len; + G3DIffGlobal *global; + G3DIffLocal *local; + + if(!g3d_iff_check(stream, &id, &len)) + return FALSE; + + if((id != G3D_IFF_MKID('L','W','O','B')) && + (id != G3D_IFF_MKID('L','W','O','2'))) { + g_warning("'%s' is not a LightWave object", stream->uri); + return FALSE; + } + + obj = g_new0(LwoObject, 1); + + global = g_new0(G3DIffGlobal, 1); + global->stream = stream; + global->context = context; + global->model = model; + if(id == G3D_IFF_MKID('L','W','O','2')) + global->flags |= LWO_FLAG_LWO2; + global->user_data = obj; + + local = g_new0(G3DIffLocal, 1); + local->id = id; + local->nb = len; + + material = g3d_material_new(); + material->name = g_strdup("fallback material"); + model->materials = g_slist_append(model->materials, material); + + g3d_iff_read_ctnr(global, local, lwo_chunks, + G3D_IFF_PAD2 | G3D_IFF_SUBCHUNK_LEN16); + + lwo_fix_texfaces(model); + + /* cleanup */ + if(obj->ntags) + g_strfreev(obj->tags); + + if(obj->nclips) + { + g_free(obj->clips); + g_strfreev(obj->clipfiles); + } + + if(obj->tex_vertices) + g_free(obj->tex_vertices); + + g_free(obj); + + g_free(local); + g_free(global); + + g3d_context_update_progress_bar(context, 0.0, FALSE); + + return TRUE; +} + +EAPI +gchar *plugin_description(G3DContext *context) +{ + return g_strdup("LightWave models.\n" + "Author: Markus Dahms."); +} + +EAPI +gchar **plugin_extensions(G3DContext *context) +{ + return g_strsplit("lwo:lwb:lw", ":", 0); +} + +/*****************************************************************************/ +/* private */ +/*****************************************************************************/ + +G3DObject *lwo_create_object(G3DStream *stream, G3DModel *model, guint32 flags) +{ + G3DObject *object = g_new0(G3DObject, 1); + object->name = g_strdup_printf("LWO%c object @ 0x%08x", + (flags & LW_F_LWO2) ? '2' : 'B', (guint32)g3d_stream_tell(stream) - 8); + model->objects = g_slist_append(model->objects, object); + +#if 0 + /* LWO files should have correct faces */ + model->glflags &= ~G3D_FLAG_GL_ALLTWOSIDE; +#endif + + return object; +} + +/*****************************************************************************/ +/* LWO specific */ +/*****************************************************************************/ + +gint lwo_read_string(G3DStream *stream, char *s) +{ + gint c; + gint cnt = 0; + do { + c = g3d_stream_read_int8(stream); + if (cnt < LW_MAX_NAME_LEN) + s[cnt] = c; + else + s[LW_MAX_NAME_LEN-1] = 0; + cnt++; + } while (c != 0); + /* if length of string (including \0) is odd skip another byte */ + if (cnt%2) { + g3d_stream_read_int8(stream); + cnt++; + } + return cnt; +} + +guint32 lwo_read_vx(G3DStream *stream, guint *index) +{ + *index = g3d_stream_read_int16_be(stream); + if((*index & 0xFF00) == 0xFF00) { + *index <<= 16; + *index += g3d_stream_read_int16_be(stream); + *index &= 0x00FFFFFF; + return 4; + } else { + return 2; + } +} + +static void lwo_fix_texfaces(G3DModel *model) +{ + GSList *olist, *flist; + G3DObject *object; + G3DFace *face; + + olist = model->objects; + while(olist) + { + object = (G3DObject *)olist->data; + olist = olist->next; + + flist = object->faces; + while(flist) + { + face = (G3DFace *)flist->data; + flist = flist->next; + + if(face->flags & G3D_FLAG_FAC_TEXMAP) + { + face->tex_image = face->material->tex_image; + if(face->tex_image == NULL) + { + face->flags &= ~G3D_FLAG_FAC_TEXMAP; + } + } + } + } +} diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_lwo/imp_lwo.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_lwo/imp_lwo.h new file mode 100644 index 0000000..84aba2d --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_lwo/imp_lwo.h @@ -0,0 +1,48 @@ +/* $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_LWO_H +#define _IMP_LWO_H + +#include +#include + +#define LWO_FLAG_LWO2 (1 << 0) + +typedef struct { + gint32 ntags; + gchar **tags; + + gint32 nclips; + guint32 *clips; + gchar **clipfiles; + + G3DFloat *tex_vertices; + + G3DObject *object; +} LwoObject; + +G3DObject *lwo_create_object(G3DStream *stream, G3DModel *model, + guint32 flags); +gint lwo_read_string(G3DStream *stream, gchar *s); +guint32 lwo_read_vx(G3DStream *stream, guint *index); + +#endif /* _IMP_LWO_H */ diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_lwo/imp_lwo_callbacks.c b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_lwo/imp_lwo_callbacks.c new file mode 100644 index 0000000..165c3aa --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_lwo/imp_lwo_callbacks.c @@ -0,0 +1,584 @@ +/* $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 +#include + +#include "imp_lwo.h" + +gboolean lwo_cb_CLIP(G3DIffGlobal *global, G3DIffLocal *local) +{ + LwoObject *obj; + guint32 index; + + obj = (LwoObject *)global->user_data; + g_return_val_if_fail(obj != NULL, FALSE); + + if(!local->finalize) + { + index = g3d_stream_read_int32_be(global->stream); + local->nb -= 4; + + obj->nclips ++; + obj->clips = g_realloc(obj->clips, obj->nclips * sizeof(guint32)); + obj->clipfiles = g_realloc(obj->clipfiles, + (obj->nclips + 1) * sizeof(gchar *)); + + obj->clips[obj->nclips - 1] = index; + obj->clipfiles[obj->nclips - 1] = g_strdup("undef"); + obj->clipfiles[obj->nclips] = NULL; + } + + return TRUE; +} + +gboolean lwo_cb_COLR(G3DIffGlobal *global, G3DIffLocal *local) +{ + G3DMaterial *material; + + material = (G3DMaterial *)local->object; + g_return_val_if_fail(material != NULL, FALSE); + + if(global->flags & LWO_FLAG_LWO2) + { + material->r = g3d_stream_read_float_be(global->stream); + material->g = g3d_stream_read_float_be(global->stream); + material->b = g3d_stream_read_float_be(global->stream); + local->nb -= 12; + g3d_stream_read_int16_be(global->stream); + local->nb -= 2; + } + else + { + material->r = g3d_stream_read_int8(global->stream) / 255.0; + material->g = g3d_stream_read_int8(global->stream) / 255.0; + material->b = g3d_stream_read_int8(global->stream) / 255.0; + g3d_stream_read_int8(global->stream); + local->nb -= 4; + } + + return TRUE; +} + +/* image index */ +gboolean lwo_cb_IMAG(G3DIffGlobal *global, G3DIffLocal *local) +{ + LwoObject *obj; + G3DMaterial *material; + guint32 index, i; + + obj = (LwoObject *)global->user_data; + g_return_val_if_fail(obj != NULL, FALSE); + + material = (G3DMaterial *)local->object; + g_return_val_if_fail(material != NULL, FALSE); + + local->nb -= lwo_read_vx(global->stream, &index); + + for(i = 0; i < obj->nclips; i ++) + { + if(obj->clips[i] == index) + break; + } + + if((i < obj->nclips) && (obj->clips[i] == index)) + { + material->tex_image = g3d_texture_load_cached( + global->context, global->model, obj->clipfiles[i]); + } + + return TRUE; +} + +/* points */ +gboolean lwo_cb_PNTS(G3DIffGlobal *global, G3DIffLocal *local) +{ + LwoObject *obj; + G3DObject *object; + gint32 i, off; + + obj = (LwoObject *)global->user_data; + g_return_val_if_fail(obj != NULL, FALSE); + + if(global->flags & LWO_FLAG_LWO2) { + object = lwo_create_object(global->stream, global->model, + global->flags); + obj->object = object; + + if(obj->tex_vertices) { + g_free(obj->tex_vertices); + obj->tex_vertices = NULL; + } + } else { + object = (G3DObject *)obj->object; + if(object == NULL) { + object = lwo_create_object(global->stream, global->model, + global->flags); + obj->object = object; + } + } + off = object->vertex_count; + object->vertex_count += (local->nb / 12); + g_return_val_if_fail(object->vertex_count >= 3, FALSE); + + object->vertex_data = g_realloc(object->vertex_data, + sizeof(G3DFloat) * object->vertex_count * 3); + + for(i = off; i < object->vertex_count; i ++) { + object->vertex_data[i * 3 + 0] = + -g3d_stream_read_float_be(global->stream); + object->vertex_data[i * 3 + 1] = + g3d_stream_read_float_be(global->stream); + object->vertex_data[i * 3 + 2] = + g3d_stream_read_float_be(global->stream); + local->nb -= 12; + } + return TRUE; +} + +/* polygons */ +gboolean lwo_cb_POLS(G3DIffGlobal *global, G3DIffLocal *local) +{ + LwoObject *obj; + G3DObject *object; + G3DFace *face; + gboolean skip_face; + guint32 type; + gint32 n = 0, i, nmat, det_cnt, cnt; + gint16 index; + gchar *tmp; + + obj = (LwoObject *)global->user_data; + g_return_val_if_fail(obj != NULL, FALSE); + + object = (G3DObject *)obj->object; + g_return_val_if_fail(object != NULL, FALSE); + + if(global->flags & LWO_FLAG_LWO2) { + type = g3d_stream_read_int32_be(global->stream); + local->nb -= 4; + + switch(type) { + case G3D_IFF_MKID('F', 'A', 'C', 'E'): + case G3D_IFF_MKID('P', 'T', 'C', 'H'): + break; + default: + tmp = g3d_iff_id_to_text(type); + g_warning("[LWO] unhandled polygon type %s", tmp); + g_free(tmp); + return FALSE; + } + } + + while(local->nb > 0) { + n ++; + skip_face = FALSE; + face = g_new0(G3DFace, 1); + face->vertex_count = g3d_stream_read_int16_be(global->stream); + local->nb -= 2; + + if(global->flags & LWO_FLAG_LWO2) + face->vertex_count &= 0x03FF; + + face->vertex_indices = g_new0(guint32, face->vertex_count); + + if(obj->tex_vertices) { + face->flags |= G3D_FLAG_FAC_TEXMAP; + face->tex_vertex_count = face->vertex_count; + face->tex_vertex_data = g_new0(G3DFloat, face->tex_vertex_count * 2); + } + + for(i = 0; i < face->vertex_count; i ++) { + if(global->flags & LWO_FLAG_LWO2) { + local->nb -= lwo_read_vx(global->stream, + &(face->vertex_indices[i])); + } else { + index = g3d_stream_read_int16_be(global->stream); + local->nb -= 2; + if(index < 0) { + skip_face = TRUE; + } else + face->vertex_indices[i] = index; + } + + if(obj->tex_vertices) { + face->tex_vertex_data[i * 2 + 0] = + obj->tex_vertices[face->vertex_indices[i] * 2 + 0]; + face->tex_vertex_data[i * 2 + 1] = + obj->tex_vertices[face->vertex_indices[i] * 2 + 1]; + } + } /* i: 0..face->vertex_count */ + + if(!(global->flags & LWO_FLAG_LWO2)) { + nmat = g3d_stream_read_int16_be(global->stream); + local->nb -= 2; + + if(nmat < 0) { + /* detail polygons, skipped */ + det_cnt = g3d_stream_read_int16_be(global->stream); + local->nb -= 2; + nmat *= -1; + while(det_cnt-- > 0) { + cnt = g3d_stream_read_int16_be(global->stream); + local->nb -= 2; + g3d_stream_skip(global->stream, cnt * 2 + 2); + local->nb -= cnt * 2 + 2; + } + } else if(nmat == 0) { + nmat = 1; + } + + face->material = g_slist_nth_data(global->model->materials, nmat); + + if(face->material == NULL) { +#if 0 + g_warning("[LWO] face->material is NULL (#%d)\n", nmat - 1); +#endif + face->material = g_slist_nth_data(global->model->materials, 0); + } + } /* !LWO2 */ else { + face->material = g_slist_nth_data(global->model->materials, 0); + } /* LWO2 */ + + if(skip_face || (face->vertex_count < 3)) { + if(face->tex_vertex_data) + g_free(face->tex_vertex_data); + g_free(face->vertex_indices); + g_free(face); + } else { + object->faces = g_slist_prepend(object->faces, face); + } + + g3d_context_update_interface(global->context); + } /* local->nb > 0 */ + + return TRUE; +} + +/* poly tag mapping */ +gboolean lwo_cb_PTAG(G3DIffGlobal *global, G3DIffLocal *local) +{ + LwoObject *obj; + G3DObject *object; + G3DMaterial *material, *tmat; + G3DFace *face; + GSList *mlist; + gint32 id, fmax; + guint32 poly, tag; + + obj = (LwoObject *)global->user_data; + g_return_val_if_fail(obj != NULL, FALSE); + + object = (G3DObject *)obj->object; + g_return_val_if_fail(object != NULL, FALSE); + + id = g3d_stream_read_int32_be(global->stream); + local->nb -= 4; + + if(id != G3D_IFF_MKID('S','U','R','F')) + return FALSE; + + fmax = g_slist_length(object->faces) - 1; + + while(local->nb > 0) + { + local->nb -= lwo_read_vx(global->stream, &poly); + tag = g3d_stream_read_int16_be(global->stream); + local->nb -= 2; + + face = (G3DFace *)g_slist_nth_data(object->faces, fmax - poly); + g_return_val_if_fail(face != NULL, FALSE); + + if(tag > obj->ntags) + { + g_warning("[LWO] tag %d not listed (%d tags)", tag, obj->ntags); + continue; + } + + material = NULL; + mlist = global->model->materials; + while(mlist != NULL) + { + tmat = (G3DMaterial*)mlist->data; + if(strcmp(obj->tags[tag], tmat->name) == 0) + { + material = tmat; + break; + } + mlist = mlist->next; + } + + if(material) + face->material = material; + else + g_warning("[LWO] unknown material tag %s", obj->tags[tag]); + } + + return TRUE; +} + +/* specularity */ +gboolean lwo_cb_SPEC(G3DIffGlobal *global, G3DIffLocal *local) +{ + G3DMaterial *material; + GLfloat tmpf; + + material = (G3DMaterial *)local->object; + g_return_val_if_fail(material != NULL, FALSE); + + if(global->flags & LWO_FLAG_LWO2) + { + tmpf = 1.0 - g3d_stream_read_float_be(global->stream); + local->nb -= 4; + } + else + { + tmpf = 1.0 - (GLfloat)g3d_stream_read_int16_be(global->stream) / 256.0; + local->nb -= 2; + } + + material->specular[0] = material->r * tmpf; + material->specular[1] = material->g * tmpf; + material->specular[2] = material->b * tmpf; + + return TRUE; +} + +/* surfaces */ +gboolean lwo_cb_SRFS(G3DIffGlobal *global, G3DIffLocal *local) +{ + LwoObject *obj; + G3DMaterial *material; + gchar buffer[512]; + + obj = (LwoObject *)global->user_data; + g_return_val_if_fail(obj != NULL, FALSE); + + while(local->nb > 0) + { + material = g3d_material_new(); + local->nb -= lwo_read_string(global->stream, buffer); + material->name = g_strdup(buffer); + global->model->materials = g_slist_append(global->model->materials, + material); + + } + + return TRUE; +} + +/* still image */ +gboolean lwo_cb_STIL(G3DIffGlobal *global, G3DIffLocal *local) +{ + LwoObject *obj; + + gchar buffer[512]; + + obj = (LwoObject *)global->user_data; + g_return_val_if_fail(obj != NULL, FALSE); + + local->nb -= lwo_read_string(global->stream, buffer); + + g_free(obj->clipfiles[obj->nclips - 1]); + obj->clipfiles[obj->nclips - 1] = g_strdup(buffer); + obj->clipfiles[obj->nclips] = NULL; + + return TRUE; +} + +/* surface */ +gboolean lwo_cb_SURF(G3DIffGlobal *global, G3DIffLocal *local) +{ + LwoObject *obj; + G3DObject *object; + G3DMaterial *material = NULL, *tmat; + GSList *mlist; + gchar name[512]; + + obj = (LwoObject *)global->user_data; + g_return_val_if_fail(obj != NULL, FALSE); + + object = (G3DObject *)obj->object; + g_return_val_if_fail(object != NULL, FALSE); + + if(!local->finalize) + { + local->nb -= lwo_read_string(global->stream, name); + + if(global->flags & LWO_FLAG_LWO2) + { + g3d_stream_read_int16_be(global->stream); + local->nb -= 2; + } + + mlist = global->model->materials; + while(mlist != NULL) + { + tmat = (G3DMaterial*)mlist->data; + if(strcmp(name, tmat->name) == 0) + { + material = tmat; + break; + } + mlist = mlist->next; + } + + if(material == NULL) + { + material = g3d_material_new(); + material->name = g_strdup(name); + global->model->materials = g_slist_append(global->model->materials, + material); + } + + local->object = material; + } + + return TRUE; +} + +/* tags */ +gboolean lwo_cb_TAGS(G3DIffGlobal *global, G3DIffLocal *local) +{ + LwoObject *obj; + G3DMaterial *material; + gchar buffer[512]; + + obj = (LwoObject *)global->user_data; + g_return_val_if_fail(obj != NULL, FALSE); + + if(obj->ntags) + { + g_strfreev(obj->tags); + obj->ntags = 0; + } + + /* read tags */ + while(local->nb > 0) + { + local->nb -= lwo_read_string(global->stream, buffer); + obj->ntags ++; + obj->tags = g_realloc(obj->tags, (1 + obj->ntags) * sizeof(gchar *)); + obj->tags[obj->ntags - 1] = g_strdup(buffer); + obj->tags[obj->ntags] = NULL; + + material = g3d_material_new(); + material->name = g_strdup(buffer); + global->model->materials = g_slist_append(global->model->materials, + material); + } + + return TRUE; +} + +/* transparency */ +gboolean lwo_cb_TRAN(G3DIffGlobal *global, G3DIffLocal *local) +{ + G3DMaterial *material; + + material = (G3DMaterial *)local->object; + g_return_val_if_fail(material != NULL, FALSE); + + if(global->flags & LWO_FLAG_LWO2) { + material->a = 1.0 - g3d_stream_read_float_be(global->stream); + local->nb -= 4; + } else { + material->a = 1.0 - + (G3DFloat)g3d_stream_read_int16_be(global->stream) / 256.0; + local->nb -= 2; + } + if(material->a < 0.1) + material->a = 0.1; + + return TRUE; +} + +/* vertex mapping */ +gboolean lwo_cb_VMAP(G3DIffGlobal *global, G3DIffLocal *local) +{ + LwoObject *obj; + guint32 index, type, dim; + gchar buffer[512], *tmp; + + obj = (LwoObject *)global->user_data; + g_return_val_if_fail(obj != NULL, FALSE); + + tmp = g3d_iff_id_to_text(local->parent_id); + g_debug("[LWO][VMAP] parent is %s", tmp); + g_free(tmp); + + if(local->parent_id == G3D_IFF_MKID('L','W','O','2')) + { + type = g3d_stream_read_int32_be(global->stream); + local->nb -= 4; + + dim = g3d_stream_read_int16_be(global->stream); + local->nb -= 2; + + local->nb -= lwo_read_string(global->stream, buffer); + + if(type == G3D_IFF_MKID('T','X','U','V')) + { + g_debug("[LWO][VMAP] **TXUV**"); + + g_return_val_if_fail(obj->tex_vertices == NULL, FALSE); + + obj->tex_vertices = g_new0(G3DFloat, + obj->object->vertex_count * 2); + + while(local->nb > 0) + { + local->nb -= lwo_read_vx(global->stream, &index); + g_return_val_if_fail(index < obj->object->vertex_count, FALSE); + + obj->tex_vertices[index * 2 + 0] = + g3d_stream_read_float_be(global->stream); + obj->tex_vertices[index * 2 + 1] = 1.0 - + g3d_stream_read_float_be(global->stream); +#if DEBUG > 0 + if((obj->tex_vertices[index * 2 + 0] > 1.0) || + (obj->tex_vertices[index * 2 + 1] > 1.0)) + g_debug("LWO: TXUV: %.2f, %.2f", + obj->tex_vertices[index * 2 + 0], + obj->tex_vertices[index * 2 + 1]); +#endif + local->nb -= 8; + } + } + else + { + tmp = g3d_iff_id_to_text(type); + g_warning("[LWO][VMAP] unhandled vertex mapping %s", tmp); + g_free(tmp); + } + } + + return TRUE; +} diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_lwo/imp_lwo_callbacks.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_lwo/imp_lwo_callbacks.h new file mode 100644 index 0000000..5b8e2e4 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_lwo/imp_lwo_callbacks.h @@ -0,0 +1,41 @@ +/* $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_LWO_CALLBACKS_H +#define _IMP_LWO_CALLBACKS_H + +#include + +gboolean lwo_cb_CLIP(G3DIffGlobal *global, G3DIffLocal *local); +gboolean lwo_cb_COLR(G3DIffGlobal *global, G3DIffLocal *local); +gboolean lwo_cb_IMAG(G3DIffGlobal *global, G3DIffLocal *local); +gboolean lwo_cb_PNTS(G3DIffGlobal *global, G3DIffLocal *local); +gboolean lwo_cb_POLS(G3DIffGlobal *global, G3DIffLocal *local); +gboolean lwo_cb_PTAG(G3DIffGlobal *global, G3DIffLocal *local); +gboolean lwo_cb_SPEC(G3DIffGlobal *global, G3DIffLocal *local); +gboolean lwo_cb_SRFS(G3DIffGlobal *global, G3DIffLocal *local); +gboolean lwo_cb_STIL(G3DIffGlobal *global, G3DIffLocal *local); +gboolean lwo_cb_SURF(G3DIffGlobal *global, G3DIffLocal *local); +gboolean lwo_cb_TAGS(G3DIffGlobal *global, G3DIffLocal *local); +gboolean lwo_cb_TRAN(G3DIffGlobal *global, G3DIffLocal *local); +gboolean lwo_cb_VMAP(G3DIffGlobal *global, G3DIffLocal *local); + +#endif diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_lwo/imp_lwo_chunks.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_lwo/imp_lwo_chunks.h new file mode 100644 index 0000000..ddc7832 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_lwo/imp_lwo_chunks.h @@ -0,0 +1,124 @@ +/* $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_LWO_CHUNKS_H +#define _IMP_LWO_CHUNKS_H + +#include + +#include "imp_lwo_callbacks.h" + +static G3DIffChunkInfo lwo_chunks[] = { + { "AAST", "antialiasing strength", 0, NULL }, + { "ADTR", "additive transparency", 0, NULL }, + { "ALPH", "alpha mode", 0, NULL }, + { "AXIS", "major axis", 0, NULL }, + { "BBOX", "bounding box", 0, NULL }, + { "BLOK", "block", 1, NULL }, + { "BTEX", "unknown", 0, NULL }, + { "BUMP", "bump intensity", 0, NULL }, + { "CLIP", "image or image sequence", 1, lwo_cb_CLIP }, + { "CLRF", "color filter", 0, NULL }, + { "CLRH", "color highlights", 0, NULL }, + { "CMNT", "unknown", 0, NULL }, + { "COLR", "color", 0, lwo_cb_COLR }, + { "CTEX", "unknown", 0, NULL }, + { "DESC", "description", 0, NULL }, + { "DIFF", "diffuse", 0, NULL }, + { "DTEX", "unknown", 0, NULL }, + { "FKEY", "gradient key values", 0, NULL }, + { "FLAG", "flags", 0, NULL }, + { "FUNC", "algorithm and parameters", 0, NULL }, + { "GLOS", "specular glossiness", 0, NULL }, + { "GRAD", "gradient texture (header)", 0, NULL }, + { "GREN", "gradient end", 0, NULL }, + { "GRPT", "gradient repeat mode", 0, NULL }, + { "GRST", "gradient start", 0, NULL }, + { "GVAL", "glow value", 0, NULL }, + { "ICON", "icon", 0, NULL }, + { "IKEY", "gradient key parameters", 0, NULL }, + { "IMAG", "image index", 0, lwo_cb_IMAG }, + { "IMAP", "image map (header)", 0, NULL }, + { "INAM", "item name", 0, NULL }, + { "LAYR", "layer", 0, NULL }, + { "LTEX", "unknown", 0, NULL }, + { "LUMI", "luminosity", 0, NULL }, + { "PIXB", "pixel blending", 0, NULL }, + { "PNAM", "parameter name", 0, NULL }, + { "PNTS", "points", 0, lwo_cb_PNTS }, + { "POLS", "polygons", 0, lwo_cb_POLS }, + { "PROC", "procedural texture (header)", 0, NULL }, + { "PROJ", "projection mode", 0, NULL }, + { "PTAG", "polygon tag mapping", 0, lwo_cb_PTAG }, + { "RBLR", "reflection blurring", 0, NULL }, + { "REFL", "reflection", 0, NULL }, + { "RFLT", "unknown", 0, NULL }, + { "RFOP", "reflection options", 0, NULL }, + { "RIMG", "reflection map image", 0, NULL }, + { "RIND", "refractive index", 0, NULL }, + { "RSAN", "reflection map seam angle", 0, NULL }, + { "SHDR", "shader", 0, NULL }, + { "SIDE", "polygon sidedness", 0, NULL }, + { "SMAN", "max smooting angle", 0, NULL }, + { "SPEC", "specular", 0, lwo_cb_SPEC }, + { "SRFS", "surface materials", 0, lwo_cb_SRFS }, + { "STEX", "unknown", 0, NULL }, + { "STIL", "still image", 0, lwo_cb_STIL }, + { "SURF", "surface material", 1, lwo_cb_SURF }, + { "TAAS", "unknown", 0, NULL }, + { "TAGS", "tags", 0, lwo_cb_TAGS }, + { "TAMP", "texture amplitude", 0, NULL }, + { "TCLR", "unknown", 0, NULL }, + { "TCTR", "unknown", 0, NULL }, + { "TEXT", "commentary text", 0, NULL }, + { "TFAL", "unknown", 0, NULL }, + { "TFLG", "unknown", 0, NULL }, + { "TFP0", "unknown", 0, NULL }, + { "TFP1", "unknown", 0, NULL }, + { "TFP2", "unknown", 0, NULL }, + { "TFP3", "unknown", 0, NULL }, + { "TFRQ", "unknown", 0, NULL }, + { "TIMG", "refraction map image", 0, NULL }, + { "TIP0", "unknown", 0, NULL }, + { "TMAP", "texture map", 0, NULL }, + { "TRAN", "transparency", 0, lwo_cb_TRAN }, + { "TRNL", "translucency", 0, NULL }, + { "TROP", "transparency options", 0, NULL }, + { "TSIZ", "unknown", 0, NULL }, + { "TSP0", "unknown", 0, NULL }, + { "TTEX", "unknown", 0, NULL }, + { "TVAL", "unknown", 0, NULL }, + { "VALU", "basic value", 0, NULL }, + { "VDIF", "unknown", 0, NULL }, + { "VMAD", "discontinuous vertex map", 0, NULL }, + { "VMAP", "uv vertex map", 0, lwo_cb_VMAP }, + { "VMPA", "vertex map parameters", 0, NULL }, + { "VRFL", "unknown", 0, NULL }, + { "VSPC", "unknown", 0, NULL }, + { "VTRN", "unknown", 0, NULL }, + { "WRAP", "image wrap options", 0, NULL }, + { "WRPH", "wrap amount (width)", 0, NULL }, + { "WRPW", "wrap amount (height)", 0, NULL }, + + { NULL, NULL, 0, NULL } +}; + +#endif /* _IMP_LWO_CHUNKS_H */ -- cgit v1.1