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_3ds/Makefile | 512 +++++++++++ .../plugins/import/imp_3ds/Makefile.am | 21 + .../plugins/import/imp_3ds/Makefile.in | 512 +++++++++++ .../libg3d-0.0.8/plugins/import/imp_3ds/imp_3ds.c | 206 +++++ .../libg3d-0.0.8/plugins/import/imp_3ds/imp_3ds.h | 55 ++ .../plugins/import/imp_3ds/imp_3ds_callbacks.c | 992 +++++++++++++++++++++ .../plugins/import/imp_3ds/imp_3ds_callbacks.h | 56 ++ .../plugins/import/imp_3ds/imp_3ds_chunks.h | 210 +++++ 8 files changed, 2564 insertions(+) create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3ds/Makefile create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3ds/Makefile.am create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3ds/Makefile.in create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3ds/imp_3ds.c create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3ds/imp_3ds.h create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3ds/imp_3ds_callbacks.c create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3ds/imp_3ds_callbacks.h create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3ds/imp_3ds_chunks.h (limited to 'src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3ds') diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3ds/Makefile b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3ds/Makefile new file mode 100644 index 0000000..5fba831 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3ds/Makefile @@ -0,0 +1,512 @@ +# Makefile.in generated by automake 1.10.1 from Makefile.am. +# plugins/import/imp_3ds/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_3ds +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_3ds_la_DEPENDENCIES = $(top_builddir)/src/libg3d.la +am_imp_3ds_la_OBJECTS = imp_3ds.lo imp_3ds_callbacks.lo +imp_3ds_la_OBJECTS = $(am_imp_3ds_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_3ds_la_SOURCES) +DIST_SOURCES = $(imp_3ds_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_3ds +abs_srcdir = /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3ds +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_3ds.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_3ds_la_SOURCES = imp_3ds.c imp_3ds.h imp_3ds_chunks.h \ + imp_3ds_callbacks.c imp_3ds_callbacks.h + +imp_3ds_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_3ds/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu plugins/import/imp_3ds/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_3ds.la: $(imp_3ds_la_OBJECTS) $(imp_3ds_la_DEPENDENCIES) + $(LINK) -rpath $(pluginimpdir) $(imp_3ds_la_OBJECTS) $(imp_3ds_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +include ./$(DEPDIR)/imp_3ds.Plo +include ./$(DEPDIR)/imp_3ds_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_3ds/Makefile.am b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3ds/Makefile.am new file mode 100644 index 0000000..b18ad09 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3ds/Makefile.am @@ -0,0 +1,21 @@ +pluginimpdir = $(pkglibdir)/plugins/import + +pluginimp_LTLIBRARIES = imp_3ds.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_3ds_la_SOURCES = imp_3ds.c imp_3ds.h imp_3ds_chunks.h \ + imp_3ds_callbacks.c imp_3ds_callbacks.h +imp_3ds_la_LIBADD = $(top_builddir)/src/libg3d.la @GLIB_LIBS@ diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3ds/Makefile.in b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3ds/Makefile.in new file mode 100644 index 0000000..a48d289 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3ds/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_3ds +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_3ds_la_DEPENDENCIES = $(top_builddir)/src/libg3d.la +am_imp_3ds_la_OBJECTS = imp_3ds.lo imp_3ds_callbacks.lo +imp_3ds_la_OBJECTS = $(am_imp_3ds_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_3ds_la_SOURCES) +DIST_SOURCES = $(imp_3ds_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_3ds.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_3ds_la_SOURCES = imp_3ds.c imp_3ds.h imp_3ds_chunks.h \ + imp_3ds_callbacks.c imp_3ds_callbacks.h + +imp_3ds_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_3ds/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu plugins/import/imp_3ds/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_3ds.la: $(imp_3ds_la_OBJECTS) $(imp_3ds_la_DEPENDENCIES) + $(LINK) -rpath $(pluginimpdir) $(imp_3ds_la_OBJECTS) $(imp_3ds_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imp_3ds.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imp_3ds_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_3ds/imp_3ds.c b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3ds/imp_3ds.c new file mode 100644 index 0000000..6125984 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3ds/imp_3ds.c @@ -0,0 +1,206 @@ +/* $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_3ds.h" +#include "imp_3ds_chunks.h" + +/*****************************************************************************/ +/* plugin interface */ +/*****************************************************************************/ + +EAPI +gboolean plugin_load_model_from_stream(G3DContext *context, G3DStream *stream, + G3DModel *model, gpointer plugin_data) +{ + G3DMatrix rmatrix[16]; + gint32 nbytes, magic; + gboolean retval; + x3ds_global_data global; + x3ds_parent_data *parent; + + magic = g3d_stream_read_int16_le(stream); + if((magic != 0x4D4D) && (magic != 0xC23D)) + { + g_warning("file %s is not a 3ds file", stream->uri); + return FALSE; + } + nbytes = g3d_stream_read_int32_le(stream); + nbytes -= 6; +#if DEBUG > 0 + g_debug("\\[%4.4X] 3DS file: main length: %d", magic, nbytes); +#endif + + global.context = context; + global.model = model; + global.stream = stream; + global.scale = 1.0; + global.max_tex_id = 0; + + parent = g_new0(x3ds_parent_data, 1); + parent->id = magic; + parent->nb = nbytes; + + retval = x3ds_read_ctnr(&global, parent); + + g3d_matrix_identity(rmatrix); + g3d_matrix_rotate_xyz(G_PI * -90.0 / 180, 0.0, 0.0, rmatrix); + g3d_model_transform(model, rmatrix); + + g_free(parent); + + return retval; +} + +EAPI +gchar *plugin_description(void) +{ + return g_strdup("AutoCAD 3D Studio models."); +} + +EAPI +gchar **plugin_extensions(void) +{ + return g_strsplit("3ds:prj", ":", 0); +} + +/*****************************************************************************/ + +gboolean x3ds_read_ctnr(x3ds_global_data *global, x3ds_parent_data *parent) +{ + gint32 chunk_id, chunk_len, i; + x3ds_parent_data *subparent; + gpointer level_object; + gchar *padding = " "; + + level_object = NULL; + + while(parent->nb > 0) { + chunk_id = g3d_stream_read_int16_le(global->stream); + chunk_len = g3d_stream_read_int32_le(global->stream); + parent->nb -= 6; + chunk_len -= 6; + + i = 0; + while((x3ds_chunks[i].id != 0) && (x3ds_chunks[i].id != chunk_id)) + i ++; + + if(x3ds_chunks[i].id == chunk_id) { + g_debug("\\%s(%d)[0x%04X][%c%c] %s (%d bytes)", + padding + (strlen(padding) - parent->level), parent->level, + chunk_id, + x3ds_chunks[i].container ? 'c' : ' ', + x3ds_chunks[i].callback ? 'f' : ' ', + x3ds_chunks[i].desc, chunk_len); + if (chunk_id==0) { + g_warning("error: bad chunk id"); + return FALSE; + } + + subparent = g_new0(x3ds_parent_data, 1); + subparent->id = parent->id; + subparent->object = parent->object; + subparent->level = parent->level + 1; + subparent->level_object = level_object; + subparent->nb = chunk_len; + + if(x3ds_chunks[i].callback) { + /* callback may change "nb" and "object" of + * "subparent" structure for following container run */ + + x3ds_chunks[i].callback(global, subparent); + } + + subparent->id = chunk_id; + + if(x3ds_chunks[i].container) { + if(x3ds_read_ctnr(global, subparent) == FALSE) { + /* abort on error */ + return FALSE; + } + } + + if(subparent->nb) + g3d_stream_skip(global->stream, subparent->nb); + + level_object = subparent->level_object; + + g_free(subparent); + } else { + g_warning("[3DS] unknown chunk type 0x%04X", chunk_id); + g3d_stream_skip(global->stream, chunk_len); + } + parent->nb -= chunk_len; + + /* update progress bar */ + x3ds_update_progress(global, parent->level); + } + + return TRUE; +} + +void x3ds_update_progress(x3ds_global_data *global, guint32 level) +{ + goffset fpos; + + /* update progress bar */ + if(level < 4) { + fpos = g3d_stream_tell(global->stream); + g3d_context_update_progress_bar(global->context, + ((G3DFloat)fpos / (G3DFloat)g3d_stream_size(global->stream)), TRUE); + } +} + +gint32 x3ds_read_cstr(G3DStream *stream, gchar *string) +{ + gint32 n = 0; + char c; + do { + c = g3d_stream_read_int8(stream); + string[n] = c; + n++; + } while(c != 0); + return n; +} + +G3DObject *x3ds_newobject(G3DModel *model, const gchar *name) +{ + G3DObject *object = g_malloc0(sizeof(G3DObject)); + G3DMaterial *material = g3d_material_new(); + + object->name = g_strdup(name); + object->faces = NULL; + model->objects = g_slist_append(model->objects, object); + object->materials = g_slist_append(object->materials, material); + + return object; +} + diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3ds/imp_3ds.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3ds/imp_3ds.h new file mode 100644 index 0000000..80a2c8c --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3ds/imp_3ds.h @@ -0,0 +1,55 @@ +/* $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_3DS_H +#define _IMP_3DS_H + +#include +#include +#include +#include + +typedef struct { + G3DContext *context; + G3DModel *model; + G3DStream *stream; + G3DFloat scale; + gint32 max_tex_id; +} x3ds_global_data; + +typedef struct { + gint32 id; + gpointer object; + gpointer misc_object; + gint32 level; + gpointer level_object; + guint32 nb; +} x3ds_parent_data; + +typedef gboolean (* x3ds_callback)(x3ds_global_data *global, + x3ds_parent_data *parent); + +gboolean x3ds_read_ctnr(x3ds_global_data *global, x3ds_parent_data *parent); +void x3ds_update_progress(x3ds_global_data *global, guint32 level); +gint32 x3ds_read_cstr(G3DStream *stream, gchar *string); +G3DObject *x3ds_newobject(G3DModel *model, const gchar *name); + +#endif /* _IMP_3DS_H */ diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3ds/imp_3ds_callbacks.c b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3ds/imp_3ds_callbacks.c new file mode 100644 index 0000000..fdd9823 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3ds/imp_3ds_callbacks.c @@ -0,0 +1,992 @@ +/* $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_3ds_callbacks.h" + +#define X3DS_FLAG_TENSION 0x01 +#define X3DS_FLAG_CONTINUITY 0x02 +#define X3DS_FLAG_BIAS 0x04 +#define X3DS_FLAG_EASE_TO 0x08 +#define X3DS_FLAG_EASE_FROM 0x10 + +gboolean x3ds_cb_0x0002(x3ds_global_data *global, x3ds_parent_data *parent) +{ + gint32 version; + + version = g3d_stream_read_int32_le(global->stream); + parent->nb -= 4; +#if DEBUG > 0 + g_debug("[3DS] M3D version %d", version); +#endif + return TRUE; +} + +/* color float */ +gboolean x3ds_cb_0x0010(x3ds_global_data *global, x3ds_parent_data *parent) +{ + G3DMaterial *material; + G3DFloat r, g, b; + + r = g3d_stream_read_float_le(global->stream); + g = g3d_stream_read_float_le(global->stream); + b = g3d_stream_read_float_le(global->stream); + parent->nb -= 12; + + switch(parent->id) + { + case 0x1200: /* SOLID_BGND */ + g3d_context_set_bgcolor(global->context, r, g, b, 1.0); + break; + + case 0xA010: /* ambient color */ + break; + + case 0xA020: /* diffuse color */ + material = (G3DMaterial *)parent->object; + g_return_val_if_fail(material, FALSE); + + material->r = r; + material->g = g; + material->b = b; + break; + + case 0xA030: /* specular color */ + material = (G3DMaterial *)parent->object; + g_return_val_if_fail(material, FALSE); + + material->specular[0] = r; + material->specular[1] = g; + material->specular[2] = b; + material->specular[3] = 0.25; + break; + + default: +#if DEBUG > 0 + g_warning("[3DS] unhandled COLOR_F in 0x%04X", parent->id); +#endif + break; + } + + return TRUE; +} + +/* color 24 */ +gboolean x3ds_cb_0x0011(x3ds_global_data *global, x3ds_parent_data *parent) +{ + G3DMaterial *material; + gint32 r, g, b; + + material = (G3DMaterial *)parent->object; + g_return_val_if_fail(material, FALSE); + + r = g3d_stream_read_int8(global->stream); + g = g3d_stream_read_int8(global->stream); + b = g3d_stream_read_int8(global->stream); + parent->nb -= 3; + + switch(parent->id) + { + + case 0xA010: /* ambient color */ + break; + + case 0xA020: /* diffuse color */ + material->r = (G3DFloat)r / 255.0; + material->g = (G3DFloat)g / 255.0; + material->b = (G3DFloat)b / 255.0; + break; + + case 0xA030: /* specular color */ + material->specular[0] = (GLfloat)r / 255.0; + material->specular[1] = (GLfloat)g / 255.0; + material->specular[2] = (GLfloat)b / 255.0; + material->specular[3] = 0.25; + break; + + default: +#if DEBUG > 0 + g_warning("[3DS] unhandled COLOR_24 in 0x%04X", parent->id); +#endif + break; + } + + return TRUE; +} + +/* short percentage */ +gboolean x3ds_cb_0x0030(x3ds_global_data *global, x3ds_parent_data *parent) +{ + G3DMaterial *material; + gint32 percent; + + material = (G3DMaterial *)parent->object; + g_return_val_if_fail(material, FALSE); + + percent = g3d_stream_read_int16_le(global->stream); + parent->nb -= 2; + + switch(parent->id) + { + case 0xA040: /* shininess */ + material->shininess = (G3DFloat)percent / 100.0; + break; + + case 0xA041: /* shininess (2) */ + /* TODO: do something here? */ + break; + + case 0xA050: /* transparency */ + material->a = 1.0 - ((G3DFloat)percent / 100.0); + break; + + case 0xA052: /* fallthrough */ + /* TODO: do something here? */ + break; + + case 0xA053: /* blur */ + /* TODO: do something here? */ + break; + + case 0xA084: /* self illumination */ + /* TODO: do something here? */ + break; + + case 0xA200: /* texture map */ + /* TODO: do something here? */ + break; + + case 0xA210: /* opacity map */ + /* TODO: do something here? */ + g_debug("[3DS] opacity percentage: %d%%\n", percent); + break; + + case 0xA220: /* reflection map */ + /* TODO: do something here? */ + break; + + case 0xA230: /* bump map */ + /* TODO: do something here? */ + break; + + default: +#if DEBUG > 0 + g_warning("[3DS] unhandled INT_PERCENTAGE in 0x%04X", + parent->id); +#endif + break; + } + + return TRUE; +} + +/* float percentage */ +gboolean x3ds_cb_0x0031(x3ds_global_data *global, x3ds_parent_data *parent) +{ + G3DMaterial *material; + G3DFloat percent; + + material = (G3DMaterial *)parent->object; + g_return_val_if_fail(material, FALSE); + + percent = g3d_stream_read_float_le(global->stream); + parent->nb -= 4; + + switch(parent->id) + { + case 0xA040: /* shininess */ + material->shininess = percent; + break; + + case 0xA050: /* transparency */ + material->a = 1.0 - percent; + break; + + default: +#if DEBUG > 0 + g_warning("[3DS] unhandled FLOAT_PERCENTAGE in 0x%04X", + parent->id); +#endif + break; + } + + return TRUE; +} + +/* master scale */ +gboolean x3ds_cb_0x0100(x3ds_global_data *global, x3ds_parent_data *parent) +{ + global->scale = g3d_stream_read_float_le(global->stream); + parent->nb -= 4; + + return TRUE; +} + +/* named object */ +gboolean x3ds_cb_0x4000(x3ds_global_data *global, x3ds_parent_data *parent) +{ + gchar buffer[1024]; + + parent->nb -= x3ds_read_cstr(global->stream, buffer); + parent->object = x3ds_newobject(global->model, buffer); + + return TRUE; +} + +/* point array */ +gboolean x3ds_cb_0x4110(x3ds_global_data *global, x3ds_parent_data *parent) +{ + G3DObject *object; + gint32 i; + + object = (G3DObject *)parent->object; + g_return_val_if_fail(object, FALSE); + + object->vertex_count = g3d_stream_read_int16_le(global->stream); + parent->nb -= 2; + + object->vertex_data = g_new0(G3DFloat, object->vertex_count * 3); + for(i = 0; i < object->vertex_count; i ++) + { + object->vertex_data[i * 3 + 0] = g3d_stream_read_float_le(global->stream); + object->vertex_data[i * 3 + 1] = g3d_stream_read_float_le(global->stream); + object->vertex_data[i * 3 + 2] = g3d_stream_read_float_le(global->stream); + + parent->nb -= 12; + + if((i % 1000) == 0) x3ds_update_progress(global, parent->level); + } + return TRUE; +} + +/* face array */ +gboolean x3ds_cb_0x4120(x3ds_global_data *global, x3ds_parent_data *parent) +{ + gint32 i, flags, nfaces; +#define X3DS_REORDER_FACES +#ifdef X3DS_REORDER_FACES + gint32 p1 = -1, p2 = -1, bottle; +#endif + G3DFace *face; + G3DObject *object; + + object = (G3DObject *)parent->object; + g_return_val_if_fail(object, FALSE); + + nfaces = g3d_stream_read_int16_le(global->stream); + parent->nb -= 2; + + for(i = 0; i < nfaces; i ++) + { + face = g_new0(G3DFace, 1); + + face->vertex_count = 3; + face->vertex_indices = g_malloc(3 * sizeof(guint32)); + + face->vertex_indices[0] = g3d_stream_read_int16_le(global->stream); + face->vertex_indices[1] = g3d_stream_read_int16_le(global->stream); + face->vertex_indices[2] = g3d_stream_read_int16_le(global->stream); + flags = g3d_stream_read_int16_le(global->stream); + parent->nb -= 8; + +#ifdef X3DS_REORDER_FACES + /* try to put all faces in the same direction */ + if((p1 == face->vertex_indices[0]) && (p2 == face->vertex_indices[1])) + { + bottle = face->vertex_indices[0]; + face->vertex_indices[0] = face->vertex_indices[2]; + face->vertex_indices[2] = bottle; + } + + p1 = face->vertex_indices[0]; + p2 = face->vertex_indices[1]; +#endif + + face->material = g_slist_nth_data(object->materials, 0); + + object->faces = g_slist_append(object->faces, face); + + if((i % 1000) == 0) x3ds_update_progress(global, parent->level); + } + + return TRUE; +} + +/* mesh mat group */ +gboolean x3ds_cb_0x4130(x3ds_global_data *global, x3ds_parent_data *parent) +{ + G3DObject *object; + gint32 i, j, facenum, nfaces; + gchar buffer[512]; + G3DMaterial *material = NULL, *mat; + G3DFace *face; + GSList *mlist; + + object = (G3DObject *)parent->object; + g_return_val_if_fail(object, FALSE); + + /* name of material */ + parent->nb -= x3ds_read_cstr(global->stream, buffer); + + /* find material in list */ + mlist = global->model->materials; + while(mlist != NULL) + { + mat = (G3DMaterial*)mlist->data; + if(strcmp(mat->name, buffer) == 0) + { + material = mat; + break; + } + mlist = mlist->next; + } + + nfaces = g3d_stream_read_int16_le(global->stream); + parent->nb -= 2; + + for(i = 0; i < nfaces; i ++) + { + facenum = g3d_stream_read_int16_le(global->stream); + parent->nb -= 2; + + if(material != NULL) + { + face = (G3DFace*)g_slist_nth_data(object->faces, facenum); + if(face == NULL) continue; + + face->material = material; + + if(face->material->tex_image && object->tex_vertex_data) + { + face->flags |= G3D_FLAG_FAC_TEXMAP; + face->tex_image = face->material->tex_image; + face->tex_vertex_count = 3; + face->tex_vertex_data = g_new0(G3DFloat, 6); + for(j = 0; j < 3; j ++) + { + face->tex_vertex_data[j * 2 + 0] = object->tex_vertex_data[ + face->vertex_indices[j] * 2 + 0]; + face->tex_vertex_data[j * 2 + 1] = object->tex_vertex_data[ + face->vertex_indices[j] * 2 + 1]; + } + } /* textured face */ + } /* material != NULL */ + + if((i % 1000) == 0) x3ds_update_progress(global, parent->level); + } /* 0..nfaces */ + + return TRUE; +} + +/* texture vertices */ +gboolean x3ds_cb_0x4140(x3ds_global_data *global, x3ds_parent_data *parent) +{ + G3DObject *object; + gint32 i; + + object = (G3DObject *)parent->object; + g_return_val_if_fail(object, FALSE); + + object->tex_vertex_count = g3d_stream_read_int16_le(global->stream); + parent->nb -= 2; + + object->tex_vertex_data = g_new0(G3DFloat, object->tex_vertex_count * 2); + + for(i = 0; i < object->tex_vertex_count; i ++) + { + object->tex_vertex_data[i * 2 + 0] = g3d_stream_read_float_le(global->stream); + object->tex_vertex_data[i * 2 + 1] = g3d_stream_read_float_le(global->stream); + parent->nb -= 8; + + if((i % 1000) == 0) x3ds_update_progress(global, parent->level); + } + + return TRUE; +} + +/* smoothing groups */ +gboolean x3ds_cb_0x4150(x3ds_global_data *global, x3ds_parent_data *parent) +{ + G3DObject *object; + G3DFace *face; + GSList *oface; + gint32 i, j, k, n=0, polynum, group; + guint32 *smooth_list; + G3DFloat *pnormal_list, *vertex_normal_buf; + G3DFloat a[3],b[3], *p0,*p1,*p2,*r; + + /* read data */ + object = (G3DObject *)parent->object; + g_return_val_if_fail(object, FALSE); + + oface=object->faces; + polynum=0; + for(oface = object->faces; oface != NULL ; oface = oface->next) + polynum++; /* count polygons */ + + /* polygon normal list */ + pnormal_list = g_new(float, 3 * polynum); + /* normals per vertice */ + vertex_normal_buf = g_new0(float, 3 * object->vertex_count); + + smooth_list = g_new(guint32, polynum); + + for(i = 0 ; i < polynum ; i ++) + smooth_list[i] = g3d_stream_read_int32_le(global->stream); + + parent->nb -= polynum * 4; + /* first, we calculate the normal by the polygon vertices (just vector + * product) */ + i = 0; + for(oface = object->faces; oface != NULL ; oface=oface->next) + { + face = (G3DFace *)oface->data; + r = &(pnormal_list[i*3]); + p0 = &(object->vertex_data[3 * face->vertex_indices[0]]); + p1 = &(object->vertex_data[3 * face->vertex_indices[1]]); + p2 = &(object->vertex_data[3 * face->vertex_indices[2]]); + + a[0]=p1[0] - p0[0]; + a[1]=p1[1] - p0[1]; + a[2]=p1[2] - p0[2]; + b[0]=p2[0] - p0[0]; + b[1]=p2[1] - p0[1]; + b[2]=p2[2] - p0[2]; + + g3d_vector_normal(a[0], a[1], a[2], b[0], b[1], b[2], + &r[0], &r[1], &r[2]); + + g3d_vector_unify(&r[0], &r[1], &r[2]); + + face->flags |= G3D_FLAG_FAC_NORMALS; + i ++; + } + + do { + /* find a suitable group. -1 means we've already taken care */ + group = -1; + for(i = 0; i < polynum; i ++) + if((group = smooth_list[i]) != -1) /* found a group */ + break; + /* handle this group */ + if(group != -1) + { + /* SMOOTH + * we add normals of the polygons's vertices so each vertex will + * finally have + * the sum of the polygons normals where the vertex is part of. + * + * run0: clear the vertex_normal_buf for this group */ + for(i = 0; i < object->vertex_count * 3; i ++) + vertex_normal_buf[i] = 0.0; + /* run1: add normals on themselves into the vertex_normal_buf */ + i = 0; + for(oface = object->faces; oface != NULL ; oface = oface->next) + { + face = (G3DFace *) oface->data; + if(smooth_list[i] == group) + { + /* for all 3 vertices of the polygon */ + for(j = 0; j < 3; j ++) + { + k = face->vertex_indices[j]; + for(n = 0; n < 3; n ++) + vertex_normal_buf[k * 3 + n] += + pnormal_list[i * 3 + n]; + } + } + i ++; + } + i = 0; + /* run2: apply to the final vertex buffer */ + for(oface = object->faces; oface != NULL ; oface = oface->next) + { + face = (G3DFace *)oface->data; + if(smooth_list[i] == group) + { + face->normals = g_new(G3DFloat, 9); + for(j = 0; j < 3; j ++) + { + k = face->vertex_indices[j]; + + g3d_vector_unify( + &(vertex_normal_buf[k * 3 + 0]), + &(vertex_normal_buf[k * 3 + 1]), + &(vertex_normal_buf[k * 3 + 2])); + + if(vertex_normal_buf[k * 3 + 0] != 0.0F) + /* finally, we save the normal in our normal + * buffer */ + memcpy(face->normals + j * 3, + vertex_normal_buf + k * 3, + sizeof(G3DFloat) * 3); + else + /* use the pbuf normal */ + memcpy(face->normals + j * 3, + pnormal_list + i * 3, + sizeof(G3DFloat) * 3); + + } + smooth_list[i] = -1; /* finished this polygon */ + } + i++; + } + /* SMOOTH END */ + } + } while (group != -1); + + g_free(pnormal_list); + g_free(vertex_normal_buf); + g_free(smooth_list); + return TRUE; +} + +/* mesh matrix */ +gboolean x3ds_cb_0x4160(x3ds_global_data *global, x3ds_parent_data *parent) +{ + G3DFloat matrix[16]; + gint32 i; + G3DFloat det; + + g3d_matrix_identity(matrix); + for(i = 0; i < 12; i ++) + matrix[(i / 3) * 4 + (i % 3)] = g3d_stream_read_float_le(global->stream); + parent->nb -= 48; + + det = g3d_matrix_determinant(matrix); + + g3d_matrix_dump(matrix); + g_debug("det: %f", det); + + + if(det < 0.0) { +#if 0 + G3DFloat scale[16]; + g3d_matrix_identity(scale); + g3d_matrix_scale(-1.0, 1.0, 1.0, scale); + g3d_matrix_multiply(scale, matrix, matrix); + g3d_matrix_dump(matrix); +#endif +#define X3DS_MESH_TRANSFORM 0 +#if X3DS_MESH_TRANSFORM + object = parent->object; + if(object) { + object->transformation = g_new0(G3DTransformation, 1); + memcpy(object->transformation->matrix, matrix, 16 * sizeof(G3DFloat)); + } + +#if 0 + if(parent->object) { + g3d_object_transform(parent->object, matrix); + } +#endif +#endif + } + return TRUE; +} + +/* material name */ +gboolean x3ds_cb_0xA000(x3ds_global_data *global, x3ds_parent_data *parent) +{ + G3DMaterial *material; + gchar buffer[1024]; + + g_return_val_if_fail(parent->object, FALSE); + + parent->nb -= x3ds_read_cstr(global->stream, buffer); + material = (G3DMaterial *)(parent->object); + + material->name = g_strdup(buffer); + + return TRUE; +} + +/* two sided material */ +gboolean x3ds_cb_0xA081(x3ds_global_data *global, x3ds_parent_data *parent) +{ + G3DMaterial *material; + + material = (G3DMaterial *)parent->object; + g_return_val_if_fail(material, FALSE); + + material->flags |= G3D_FLAG_MAT_TWOSIDE; + + return TRUE; +} + +/* texture map name */ +gboolean x3ds_cb_0xA300(x3ds_global_data *global, x3ds_parent_data *parent) +{ + G3DMaterial *material; + G3DImage *image; + gchar buffer[512]; + + material = (G3DMaterial *)parent->object; + g_return_val_if_fail(material, FALSE); + + parent->nb -= x3ds_read_cstr(global->stream, buffer); + + switch(parent->id) + { + case 0xA200: /* texture map */ + material->tex_image = g3d_texture_load_cached(global->context, + global->model, buffer); + if(material->tex_image) + { + g3d_texture_flip_y(material->tex_image); + material->tex_image->tex_id = ++ global->max_tex_id; + } + break; + + case 0xA210: /* opacity map */ + image = g3d_texture_load(global->context, buffer); + if(image != NULL) + { + g3d_texture_flip_y(image); + material->tex_image = g3d_texture_merge_alpha( + material->tex_image, image); + g3d_texture_free(image); + } + break; + + case 0xA220: /* reflection map */ + /* TODO: implement */ + break; + + case 0xA230: /* bump map */ + /* TODO: implement */ + break; + + default: +#if DEBUG > 0 + g_warning("[3DS] unhandled texture name in 0x%04X", parent->id); +#endif + + break; + } + + return TRUE; +} + +/* texture map scale u */ +gboolean x3ds_cb_0xA354(x3ds_global_data *global, x3ds_parent_data *parent) +{ + G3DMaterial *material; + G3DImage *image; + G3DFloat scale; + + material = (G3DMaterial *)parent->object; + g_return_val_if_fail(material, FALSE); + + image = material->tex_image; + g_return_val_if_fail(image, FALSE); + + scale = g3d_stream_read_float_le(global->stream); + parent->nb -= 4; + + image->tex_scale_u = scale; +#if DEBUG > 3 + g_debug("[3DS] scale_u: %f", image->tex_scale_u); +#endif + + return TRUE; +} + +/* texture map scale v */ +gboolean x3ds_cb_0xA356(x3ds_global_data *global, x3ds_parent_data *parent) +{ + G3DMaterial *material; + G3DImage *image; + G3DFloat scale; + + material = (G3DMaterial *)parent->object; + g_return_val_if_fail(material, FALSE); + + image = material->tex_image; + g_return_val_if_fail(image, FALSE); + + scale = g3d_stream_read_float_le(global->stream); + parent->nb -= 4; + + image->tex_scale_v = scale; +#if DEBUG > 3 + g_debug("[3DS] scale_v: %f", image->tex_scale_v); +#endif + + return TRUE; +} + +/* material */ +gboolean x3ds_cb_0xAFFF(x3ds_global_data *global, x3ds_parent_data *parent) +{ + G3DMaterial *material; + G3DObject *object; + + material = g3d_material_new(); + + if(parent->object) + { + object = (G3DObject *)parent->object; + object->materials = g_slist_append(object->materials, material); + } + else + { + global->model->materials = g_slist_append(global->model->materials, + material); + } + + parent->object = material; + + return TRUE; +} + +/* keyframe data header */ +gboolean x3ds_cb_0xB00A(x3ds_global_data *global, x3ds_parent_data *parent) +{ + gint32 rev, len; + gchar buffer[512]; + + rev = g3d_stream_read_int16_le(global->stream); + parent->nb -= 2; + parent->nb -= x3ds_read_cstr(global->stream, buffer); + len = g3d_stream_read_int16_le(global->stream); + parent->nb -= 2; + +#if DEBUG > 0 + g_debug("[3DS] keyframe data: r%d, %d frames, \"%s\"", + rev, len, buffer); +#endif + return TRUE; +} + +/* node header */ +gboolean x3ds_cb_0xB010(x3ds_global_data *global, x3ds_parent_data *parent) +{ + GSList *olist; + G3DObject *object; + gchar buffer[512]; + + parent->nb -= x3ds_read_cstr(global->stream, buffer); +#if DEBUG > 3 + g_debug("[3DS] NODE_HDR: %s", buffer); +#endif + + /* find object by name */ + olist = global->model->objects; + while(olist) + { + object = (G3DObject *)olist->data; + if(strcmp(object->name, buffer) == 0) + { + parent->level_object = object; + break; + } + olist = olist->next; + } + + g3d_stream_read_int16_le(global->stream); /* flags 1 */ + g3d_stream_read_int16_le(global->stream); /* flags 2 */ + g3d_stream_read_int16_le(global->stream); /* ? */ + parent->nb -= 6; + + return TRUE; +} + +/* pivot */ +gboolean x3ds_cb_0xB013(x3ds_global_data *global, x3ds_parent_data *parent) +{ + G3DObject *object; +#if 0 + gint32 i; +#endif + G3DFloat x, y, z; + + object = parent->level_object; + if(object == NULL) return FALSE; + + x = g3d_stream_read_float_le(global->stream); + y = g3d_stream_read_float_le(global->stream); + z = g3d_stream_read_float_le(global->stream); + parent->nb -= 12; + +#if DEBUG > 3 + g_debug("[3DS]: PIVOT: (%.2f,%.2f,%.2f)", x, y, z); +#endif + + return TRUE; +} + +#define X3DS_ENABLE_POS_TRACK_TAG 0 + +/* position tracking tag */ +gboolean x3ds_cb_0xB020(x3ds_global_data *global, x3ds_parent_data *parent) +{ + G3DObject *object; + gint32 i, flags, fflags, nkeys, fnum; +#if X3DS_ENABLE_POS_TRACK_TAG + gint32 j; +#endif + G3DFloat x, y, z; + + object = parent->level_object; + if(object == NULL) return FALSE; + + flags = g3d_stream_read_int16_le(global->stream); + g3d_stream_skip(global->stream, 8); + nkeys = g3d_stream_read_int32_le(global->stream); + + parent->nb -= 14; + + for(i = 0; i < nkeys; i ++) + { + fnum = g3d_stream_read_int32_le(global->stream); + fflags = g3d_stream_read_int16_le(global->stream); + parent->nb -= 6; + + if(fflags & X3DS_FLAG_TENSION) + { + g3d_stream_read_float_le(global->stream); + parent->nb -= 4; + } + if(fflags & X3DS_FLAG_CONTINUITY) + { + g3d_stream_read_float_le(global->stream); + parent->nb -= 4; + } + if(fflags & X3DS_FLAG_BIAS) + { + g3d_stream_read_float_le(global->stream); + parent->nb -= 4; + } + if(fflags & X3DS_FLAG_EASE_TO) + { + g3d_stream_read_float_le(global->stream); + parent->nb -= 4; + } + if(fflags & X3DS_FLAG_EASE_FROM) + { + g3d_stream_read_float_le(global->stream); + parent->nb -= 4; + } + + x = g3d_stream_read_float_le(global->stream); + y = g3d_stream_read_float_le(global->stream); + z = g3d_stream_read_float_le(global->stream); + parent->nb -= 12; +#if DEBUG > 3 + g_debug("[3DS]: POS_TRACK_TAG: frame %d: (%.2f,%.2f,%.2f) (0x%X) " + "object: %s", + fnum, x, y, z, fflags, object->name); +#endif + +#if X3DS_ENABLE_POS_TRACK_TAG + if(fnum == 0) + { +#if 1 + for(j = 0; j < object->vertex_count; j ++) + { + object->vertex_data[j * 3 + 0] -= x; + object->vertex_data[j * 3 + 1] -= y; + object->vertex_data[j * 3 + 2] -= z; + } +#endif + } +#endif + } + + return TRUE; +} + +/* rotation tracking tag */ +gboolean x3ds_cb_0xB021(x3ds_global_data *global, x3ds_parent_data *parent) +{ + G3DObject *object; + gint32 i, j, flags, nkeys, fnum; + G3DFloat x, y, z, rot; + G3DFloat matrix[16]; + + object = parent->level_object; + if(object == NULL) return FALSE; + + flags = g3d_stream_read_int16_le(global->stream); + g3d_stream_skip(global->stream, 8); + nkeys = g3d_stream_read_int16_le(global->stream); + g3d_stream_read_int16_le(global->stream); + parent->nb -= 14; + + for(i = 0; i < nkeys; i ++) + { + fnum = g3d_stream_read_int16_le(global->stream); + g3d_stream_read_int32_le(global->stream); + parent->nb -= 6; + + rot = g3d_stream_read_float_le(global->stream); + x = g3d_stream_read_float_le(global->stream); + y = g3d_stream_read_float_le(global->stream); + z = g3d_stream_read_float_le(global->stream); + parent->nb -= 16; +#if DEBUG > 3 + g_debug( + "[3DS]: ROT_TRACK_TAG: frame %d: (%.2f,%.2f,%.2f), %.2f rad", + fnum, x, y, z, rot); +#endif + if(fnum == -1) + { +#if 1 + g3d_matrix_identity(matrix); + g3d_matrix_rotate(rot, x, y, z, matrix); + + for(j = 0; j < object->vertex_count; j ++) + { + g3d_vector_transform( + &(object->vertex_data[j * 3 + 0]), + &(object->vertex_data[j * 3 + 1]), + &(object->vertex_data[j * 3 + 2]), + matrix); + } +#endif + } + } + + return TRUE; + +} + +/* node id */ +gboolean x3ds_cb_0xB030(x3ds_global_data *global, x3ds_parent_data *parent) +{ + gint32 id; + + id = g3d_stream_read_int16_le(global->stream); + parent->nb -= 2; +#if DEBUG > 3 + g_debug("[3DS] NODE_ID: %d", id); +#endif + + return TRUE; +} diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3ds/imp_3ds_callbacks.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3ds/imp_3ds_callbacks.h new file mode 100644 index 0000000..f548bea --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3ds/imp_3ds_callbacks.h @@ -0,0 +1,56 @@ +/* $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_3DS_CALLBACKS_H +#define _IMP_3DS_CALLBACKS_H + +#include "imp_3ds.h" + +gboolean x3ds_cb_0x0002(x3ds_global_data *global, x3ds_parent_data *parent); +gboolean x3ds_cb_0x0010(x3ds_global_data *global, x3ds_parent_data *parent); +gboolean x3ds_cb_0x0011(x3ds_global_data *global, x3ds_parent_data *parent); +gboolean x3ds_cb_0x0030(x3ds_global_data *global, x3ds_parent_data *parent); +gboolean x3ds_cb_0x0031(x3ds_global_data *global, x3ds_parent_data *parent); +gboolean x3ds_cb_0x0100(x3ds_global_data *global, x3ds_parent_data *parent); + +gboolean x3ds_cb_0x4000(x3ds_global_data *global, x3ds_parent_data *parent); +gboolean x3ds_cb_0x4110(x3ds_global_data *global, x3ds_parent_data *parent); +gboolean x3ds_cb_0x4120(x3ds_global_data *global, x3ds_parent_data *parent); +gboolean x3ds_cb_0x4130(x3ds_global_data *global, x3ds_parent_data *parent); +gboolean x3ds_cb_0x4140(x3ds_global_data *global, x3ds_parent_data *parent); +gboolean x3ds_cb_0x4150(x3ds_global_data *global, x3ds_parent_data *parent); +gboolean x3ds_cb_0x4160(x3ds_global_data *global, x3ds_parent_data *parent); + +gboolean x3ds_cb_0xA000(x3ds_global_data *global, x3ds_parent_data *parent); +gboolean x3ds_cb_0xA081(x3ds_global_data *global, x3ds_parent_data *parent); +gboolean x3ds_cb_0xA300(x3ds_global_data *global, x3ds_parent_data *parent); +gboolean x3ds_cb_0xA354(x3ds_global_data *global, x3ds_parent_data *parent); +gboolean x3ds_cb_0xA356(x3ds_global_data *global, x3ds_parent_data *parent); +gboolean x3ds_cb_0xAFFF(x3ds_global_data *global, x3ds_parent_data *parent); + +gboolean x3ds_cb_0xB00A(x3ds_global_data *global, x3ds_parent_data *parent); +gboolean x3ds_cb_0xB010(x3ds_global_data *global, x3ds_parent_data *parent); +gboolean x3ds_cb_0xB013(x3ds_global_data *global, x3ds_parent_data *parent); +gboolean x3ds_cb_0xB020(x3ds_global_data *global, x3ds_parent_data *parent); +gboolean x3ds_cb_0xB021(x3ds_global_data *global, x3ds_parent_data *parent); +gboolean x3ds_cb_0xB030(x3ds_global_data *global, x3ds_parent_data *parent); + +#endif /* _IMP_3DS_CALLBACKS_H */ diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3ds/imp_3ds_chunks.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3ds/imp_3ds_chunks.h new file mode 100644 index 0000000..0c4cd54 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3ds/imp_3ds_chunks.h @@ -0,0 +1,210 @@ +/* $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_3DS_CHUNKS_H +#define _IMP_3DS_CHUNKS_H + +#include + +#include "imp_3ds_callbacks.h" + +typedef struct { + guint32 id; + char *desc; + gboolean container; + x3ds_callback callback; +} x3ds_chunk_desc; + +static x3ds_chunk_desc x3ds_chunks[] = { + { 0x0002, "M3D version", 0, x3ds_cb_0x0002 }, + { 0x0001, "(unknown)", 0, NULL }, + { 0x0010, "color (float)", 0, x3ds_cb_0x0010 }, + { 0x0011, "color (24 bit)", 0, x3ds_cb_0x0011 }, + { 0x0012, "line color (24 bit)", 0, NULL }, + { 0x0013, "line color (float)", 0, NULL }, + { 0x0030, "percentage (short)", 0, x3ds_cb_0x0030 }, + { 0x0031, "percentage (float)", 0, x3ds_cb_0x0031 }, + { 0x0100, "global scale", 0, NULL }, + + { 0x1100, "BIT_MAP", 0, NULL }, + { 0x1101, "USE_BIT_MAP", 0, NULL }, + { 0x1200, "SOLID_BGND", 1, NULL }, + { 0x1201, "USE_SOLID_BGND", 0, NULL }, + { 0x1300, "V_GRADIENT", 0, NULL }, + { 0x1301, "USE_V_GRADIENT", 0, NULL }, + { 0x1400, "LO_SHADOW_BIAS", 0, NULL }, + { 0x1410, "HI_SHADOW_BIAS", 0, NULL }, + { 0x1420, "SHADOW_MAP_SIZE", 0, NULL }, + { 0x1430, "SHADOW_SAMPLES", 0, NULL }, + { 0x1440, "SHADOW_RANGE", 0, NULL }, + { 0x1450, "SHADOW_FILTER", 0, NULL }, + { 0x1460, "RAY_BIAS", 0, NULL }, + { 0x1500, "O_CONSTS", 0, NULL }, + + { 0x2100, "AMBIENT_LIGHT", 0, NULL }, + { 0x2200, "FOG", 0, NULL }, + { 0x2300, "DISTANCE_CUE", 0, NULL }, + { 0x2301, "USE_DISTANCE_CUE", 0, NULL }, + { 0x2302, "LAYER_FOG", 0, NULL }, + { 0x2D2D, "SMAGIC", 0, NULL }, + { 0x2D3D, "LMAGIC", 0, NULL }, + + { 0x3000, "default view", 1, NULL }, + { 0x3010, "VIEW_TOP", 0, NULL }, + { 0x3020, "VIEW_BOTTOM", 0, NULL }, + { 0x3030, "VIEW_LEFT", 0, NULL }, + { 0x3040, "VIEW_RIGHT", 0, NULL }, + { 0x3050, "VIEW_FRONT", 0, NULL }, + { 0x3060, "VIEW_BACK", 0, NULL }, + { 0x3070, "VIEW_USER", 0, NULL }, + { 0x3080, "VIEW_CAMERA", 0, NULL }, + { 0x3090, "VIEW_WINDOW", 0, NULL }, + { 0x3D3D, "mesh", 1, NULL }, + { 0x3D3E, "mesh version", 0, NULL }, + + { 0x4000, "named object", 1, x3ds_cb_0x4000 }, + { 0x4010, "object hidden", 0, NULL }, + { 0x4011, "object vis lofter", 0, NULL }, + { 0x4012, "object doesnt cast", 0, NULL }, + { 0x4013, "object matte", 0, NULL }, + { 0x4014, "object fast", 0, NULL }, + { 0x4015, "object procedural", 0, NULL }, + { 0x4016, "object frozen", 0, NULL }, + { 0x4017, "object dont recv shadow", 0, NULL }, + { 0x4100, "triangle object", 1, NULL }, + { 0x4110, "point array", 0, x3ds_cb_0x4110 }, + { 0x4111, "point flag array", 0, NULL }, + { 0x4120, "face array", 1, x3ds_cb_0x4120 }, + { 0x4130, "mesh mat group", 0, x3ds_cb_0x4130 }, + { 0x4140, "texture vertices", 0, x3ds_cb_0x4140 }, + { 0x4150, "smooth group", 0, x3ds_cb_0x4150 }, + { 0x4160, "mesh matrix", 0, x3ds_cb_0x4160 }, + { 0x4165, "mesh color", 0, NULL }, + { 0x4170, "texture info", 0, NULL }, + { 0x4600, "N_DIRECT_LIGHT", 0, NULL }, + { 0x4700, "N_CAMERA", 0, NULL }, + + { 0x7001, "VIEWPORT_LAYOUT", 0, NULL }, + + { 0x8000, "XDATA_SECTION", 0, NULL }, + + { 0xA000, "material name", 0, x3ds_cb_0xA000 }, + { 0xA010, "ambient color", 1, NULL }, + { 0xA020, "diffuse color", 1, NULL }, + { 0xA030, "specular color", 1, NULL }, + { 0xA040, "shininess", 1, NULL }, + { 0xA041, "shininess (2)", 1, NULL }, + { 0xA042, "shininess (3)", 1, NULL }, + { 0xA050, "transparency", 1, NULL }, + { 0xA052, "fallthrough", 1, NULL }, + { 0xA053, "blur", 1, NULL }, + { 0xA081, "two-sided", 0, x3ds_cb_0xA081 }, + { 0xA082, "decal", 0, NULL }, + { 0xA083, "additive", 0, NULL }, + { 0xA084, "self illumination", 1, NULL }, + { 0xA085, "wire", 0, NULL }, + { 0xA086, "super-sampling", 0, NULL }, + { 0xA087, "wire size", 0, NULL }, + { 0xA088, "MAT_FACEMAP", 0, NULL }, + { 0xA08A, "MAT_XPFALLIN", 0, NULL }, + { 0xA08C, "MAT_PHONGSOFT", 0, NULL }, + { 0xA08E, "MAT_WIREABS", 0, NULL }, + { 0xA100, "shading", 0, NULL }, + { 0xA200, "texture map", 1, NULL }, + { 0xA204, "spec map", 1, NULL }, + { 0xA210, "opacity map", 1, NULL }, + { 0xA220, "reflection map", 1, NULL }, + { 0xA230, "bump map", 1, NULL }, + { 0xA240, "mat use xpfall", 0, NULL }, + { 0xA250, "mat use refblur", 0, NULL }, + { 0xA252, "bump percentage", 0, NULL }, + { 0xA300, "texture map name", 0, x3ds_cb_0xA300 }, + { 0xA310, "MAT_ACUBIC", 0, NULL }, + { 0xA320, "MAT_SXP_TEXT_DATA", 0, NULL }, + { 0xA324, "MAT_SXP_BUMP_DATA", 0, NULL }, + { 0xA33A, "MAT_TEX2MAP", 0, NULL }, + { 0xA351, "texture map tiling", 0, NULL }, + { 0xA352, "texture map blurring (old)", 0, NULL }, + { 0xA353, "texture map blurring", 0, NULL }, + { 0xA354, "texture map scale u", 0, x3ds_cb_0xA354 }, + { 0xA356, "texture map scale v", 0, x3ds_cb_0xA356 }, + { 0xA358, "texture map offset u", 0, NULL }, + { 0xA35A, "texture map offset v", 0, NULL }, + { 0xAFFF, "material", 1, x3ds_cb_0xAFFF }, + + { 0xB000, "keyframe data", 1, NULL }, + { 0xB001, "ambient data node", 1, NULL }, + { 0xB002, "object node", 1, NULL }, + { 0xB003, "camera node", 1, NULL }, + { 0xB004, "target node", 1, NULL }, + { 0xB005, "light node", 1, NULL }, + { 0xB006, "L_TARGET_NODE_TAG", 1, NULL }, + { 0xB007, "spotlight node", 1, NULL }, + { 0xB008, "KFSEG", 0, NULL }, + { 0xB009, "KFCURTIME", 0, NULL }, + { 0xB00A, "keyframe data header", 0, x3ds_cb_0xB00A }, + { 0xB010, "node header", 0, x3ds_cb_0xB010 }, + { 0xB011, "instance name", 0, NULL }, + { 0xB012, "PRESCALE", 0, NULL }, + { 0xB013, "pivot", 0, x3ds_cb_0xB013 }, + { 0xB014, "bounding box", 0, NULL }, + { 0xB015, "MORPH_SMOOTH", 0, NULL }, + { 0xB020, "position tracking tag", 0, x3ds_cb_0xB020 }, + { 0xB021, "rotation tracking tag", 0, x3ds_cb_0xB021 }, + { 0xB022, "scale tracking tag", 0, NULL }, + { 0xB023, "FOV_TRACK_TAG", 0, NULL }, + { 0xB024, "ROLL_TRACK_TAG", 0, NULL }, + { 0xB025, "COL_TRACK_TAG", 0, NULL }, + { 0xB026, "MORPH_TRACK_TAG", 0, NULL }, + { 0xB027, "HOT_TRACK_TAG", 0, NULL }, + { 0xB028, "FALL_TRACK_TAG", 0, NULL }, + { 0xB029, "HIDE_TRACK_TAG", 0, NULL }, + { 0xB030, "node identification", 0, x3ds_cb_0xB030 }, + + { 0xC010, "C_MDRAWER", 0, NULL }, + { 0xC030, "C_SHPDRAWER", 0, NULL }, + { 0xC040, "C_MODDRAWER", 0, NULL }, + { 0xC060, "C_TXDRAWER", 0, NULL }, + { 0xC064, "C_MTLDRAWER", 0, NULL }, + { 0xC066, "C_FLIDRAWER", 0, NULL }, + { 0xC067, "C_CUBDRAWER", 0, NULL }, + { 0xC070, "C_MFILE", 0, NULL }, + { 0xC080, "C_SHPFILE", 0, NULL }, + { 0xC090, "C_MODFILE", 0, NULL }, + { 0xC0B0, "C_TXFILE", 0, NULL }, + { 0xC0B4, "C_MTLFILE", 0, NULL }, + { 0xC0B6, "C_FLIFILE", 0, NULL }, + { 0xC0B8, "C_PALFILE", 0, NULL }, + { 0xC0C0, "C_TX_STRING", 0, NULL }, + { 0xC0D0, "C_CONSTS", 0, NULL }, + { 0xC0E0, "C_SNAPS", 0, NULL }, + { 0xC0F0, "C_GRIDS", 0, NULL }, + { 0xC100, "C_ASNAPS", 0, NULL }, + { 0xC25B, "C_BITMAP_DRAWER", 0, NULL }, + { 0xC525, "C_CUR_MNAME", 0, NULL }, + { 0xCA00, "C_MAPDRAWER", 0, NULL }, + + { 0xD000, "VPDATA", 0, NULL }, + + { 0x0000, NULL, 0, NULL } +}; + +#endif -- cgit v1.1