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_max/Makefile | 515 +++++++++++++++ .../plugins/import/imp_max/Makefile.am | 26 + .../plugins/import/imp_max/Makefile.in | 515 +++++++++++++++ .../libg3d-0.0.8/plugins/import/imp_max/imp_max.c | 358 +++++++++++ .../plugins/import/imp_max/imp_max_callbacks.c | 696 +++++++++++++++++++++ .../plugins/import/imp_max/imp_max_callbacks.h | 82 +++ .../plugins/import/imp_max/imp_max_chunks.h | 289 +++++++++ 7 files changed, 2481 insertions(+) create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_max/Makefile create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_max/Makefile.am create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_max/Makefile.in create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_max/imp_max.c create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_max/imp_max_callbacks.c create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_max/imp_max_callbacks.h create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_max/imp_max_chunks.h (limited to 'src/others/mimesh/libg3d-0.0.8/plugins/import/imp_max') diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_max/Makefile b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_max/Makefile new file mode 100644 index 0000000..53add53 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_max/Makefile @@ -0,0 +1,515 @@ +# Makefile.in generated by automake 1.10.1 from Makefile.am. +# plugins/import/imp_max/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_max +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_max_la_DEPENDENCIES = $(top_builddir)/src/libg3d.la +am_imp_max_la_OBJECTS = imp_max.lo imp_max_callbacks.lo +imp_max_la_OBJECTS = $(am_imp_max_la_OBJECTS) +#am_imp_max_la_rpath = -rpath \ +# $(pluginimpdir) +DEFAULT_INCLUDES = -I. -I$(top_builddir)/include/g3d +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(imp_max_la_SOURCES) +DIST_SOURCES = $(imp_max_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_max +abs_srcdir = /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_max +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_max.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 -I$(top_builddir)/include +AM_LDFLAGS = \ + -no-undefined -module \ + -avoid-version -export-dynamic + +imp_max_la_SOURCES = imp_max.c \ + imp_max_chunks.h imp_max_callbacks.c imp_max_callbacks.h + +imp_max_la_LIBADD = $(top_builddir)/src/libg3d.la -Wl,--export-dynamic -pthread -lgmodule-2.0 -lrt -lgobject-2.0 -lglib-2.0 -lgsf-1 -lgobject-2.0 -lxml2 -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_max/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu plugins/import/imp_max/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_max.la: $(imp_max_la_OBJECTS) $(imp_max_la_DEPENDENCIES) + $(LINK) $(am_imp_max_la_rpath) $(imp_max_la_OBJECTS) $(imp_max_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +include ./$(DEPDIR)/imp_max.Plo +include ./$(DEPDIR)/imp_max_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 + + -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 +# 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_max/Makefile.am b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_max/Makefile.am new file mode 100644 index 0000000..c1b46fb --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_max/Makefile.am @@ -0,0 +1,26 @@ +pluginimpdir = $(pkglibdir)/plugins/import + +if EXPERIMENTAL +if HAVE_LIBGSF +pluginimp_LTLIBRARIES = imp_max.la +endif +endif + +AM_CFLAGS = \ + -Wall -ansi -pedantic \ + -DG_LOG_DOMAIN=\"LibG3D\" \ + @DBG_CFLAGS@ -DDEBUG=@DEBUG@ \ + @GLIB_CFLAGS@ + @LIBGSF_CFLAGS@ + +INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include + +AM_LDFLAGS = \ + -no-undefined -module \ + @PLUGINS_LDFLAGS@ + +LIBTOOL += --quiet + +imp_max_la_SOURCES = imp_max.c \ + imp_max_chunks.h imp_max_callbacks.c imp_max_callbacks.h +imp_max_la_LIBADD = $(top_builddir)/src/libg3d.la @GLIB_LIBS@ @LIBGSF_LIBS@ diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_max/Makefile.in b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_max/Makefile.in new file mode 100644 index 0000000..054a849 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_max/Makefile.in @@ -0,0 +1,515 @@ +# 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_max +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_max_la_DEPENDENCIES = $(top_builddir)/src/libg3d.la +am_imp_max_la_OBJECTS = imp_max.lo imp_max_callbacks.lo +imp_max_la_OBJECTS = $(am_imp_max_la_OBJECTS) +@EXPERIMENTAL_TRUE@@HAVE_LIBGSF_TRUE@am_imp_max_la_rpath = -rpath \ +@EXPERIMENTAL_TRUE@@HAVE_LIBGSF_TRUE@ $(pluginimpdir) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include/g3d +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(imp_max_la_SOURCES) +DIST_SOURCES = $(imp_max_la_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DBG_CFLAGS = @DBG_CFLAGS@ +DEBUG = @DEBUG@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@ +GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GREP = @GREP@ +GTKDOC_CHECK = @GTKDOC_CHECK@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +HTML_DIR = @HTML_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBGSF_CFLAGS = @LIBGSF_CFLAGS@ +LIBGSF_LIBS = @LIBGSF_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ --quiet +LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ +LIBXML2_LIBS = @LIBXML2_LIBS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LTVERSION = @LTVERSION@ +MAGIC_LIBS = @MAGIC_LIBS@ +MAKEINFO = @MAKEINFO@ +MATH_LIBS = @MATH_LIBS@ +MKDIR_P = @MKDIR_P@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PLUGINS_LDFLAGS = @PLUGINS_LDFLAGS@ +RANLIB = @RANLIB@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +XML2_CONFIG = @XML2_CONFIG@ +XML_CPPFLAGS = @XML_CPPFLAGS@ +XML_LIBS = @XML_LIBS@ +Z_CFLAGS = @Z_CFLAGS@ +Z_LIBS = @Z_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +pluginimpdir = $(pkglibdir)/plugins/import +@EXPERIMENTAL_TRUE@@HAVE_LIBGSF_TRUE@pluginimp_LTLIBRARIES = imp_max.la +AM_CFLAGS = \ + -Wall -ansi -pedantic \ + -DG_LOG_DOMAIN=\"LibG3D\" \ + @DBG_CFLAGS@ -DDEBUG=@DEBUG@ \ + @GLIB_CFLAGS@ + +INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include +AM_LDFLAGS = \ + -no-undefined -module \ + @PLUGINS_LDFLAGS@ + +imp_max_la_SOURCES = imp_max.c \ + imp_max_chunks.h imp_max_callbacks.c imp_max_callbacks.h + +imp_max_la_LIBADD = $(top_builddir)/src/libg3d.la @GLIB_LIBS@ @LIBGSF_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_max/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu plugins/import/imp_max/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_max.la: $(imp_max_la_OBJECTS) $(imp_max_la_DEPENDENCIES) + $(LINK) $(am_imp_max_la_rpath) $(imp_max_la_OBJECTS) $(imp_max_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imp_max.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imp_max_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 + + @LIBGSF_CFLAGS@ +# 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_max/imp_max.c b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_max/imp_max.c new file mode 100644 index 0000000..0dba25c --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_max/imp_max.c @@ -0,0 +1,358 @@ +/* $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_max_chunks.h" + + + +static gboolean max_read_subfile(G3DContext *context, G3DModel *model, + G3DStream *stream, const gchar *subfile); +static gboolean max_read_chunk(MaxGlobalData *global, gint32 *nb, + guint32 level, gint32 parentid, gpointer object, guint32 *l2cnt, + GNode *tree); +static MaxChunk *max_get_chunk_desc(guint16 id, gint32 parentid, + gboolean container); + +static const gchar *max_subfiles[] = { +#if 0 + "Config", + "VideoPostQueue", + "ScriptedCustAttribDefs", + "DllDirectory", + "ClassDirectory", + "ClassDirectory2", + "ClassDirectory3", + "ClassData", +#endif + "Scene", + NULL +}; + +typedef enum { + MAX_ROOT_NODE, + MAX_L2_NODE, + MAX_CNT_NODE, + MAX_DATA_NODE +} MaxNodeType; + +typedef struct { + MaxNodeType type; + gchar *name; + guint32 cnt2034; + guint32 val2034; + gint32 data2034; + GSList *children; +} MaxNode; + +typedef struct { + guint32 l2id; + guint32 id; + gchar *text; + G3DObject *object; +} MaxTreeItem; + +EAPI +gboolean plugin_load_model_from_stream(G3DContext *context, G3DStream *stream, + G3DModel *model) +{ + gboolean retval = FALSE; + G3DMaterial *material; + const gchar **subfile = max_subfiles; + + /* create default material */ + material = g3d_material_new(); + material->name = g_strdup("default material"); + model->materials = g_slist_append(model->materials, material); + + /* debugging material */ + material = g3d_material_new(); + material->r = 1.0; + material->g = 0.2; + material->b = 0.1; + material->name = g_strdup("debugging material"); + model->materials = g_slist_append(model->materials, material); + + while(*subfile) { + retval = max_read_subfile(context, model, stream, *subfile); + subfile ++; + } + + g3d_context_update_progress_bar(context, 0.0, FALSE); + + return retval; +} + +EAPI +gchar *plugin_description(void) +{ + return g_strdup("3D Studio MAX models (EXPERIMENTAL)."); +} + +EAPI +gchar **plugin_extensions(void) +{ + return g_strsplit("max:gmax", ":", 0); +} + +/***************************************************************************** + * max specific + *****************************************************************************/ + +static void max_walk_tree(GNode *tree, guint32 level) +{ + GNode *node; + MaxTreeItem *mtitem; + + mtitem = (MaxTreeItem *)tree->data; + +#if DEBUG > 0 + g_debug("\\%s(%u)[0x%04X][0x%04X] %s", debug_pad(level), level, + mtitem->l2id, mtitem->id, mtitem->text); +#endif + + for(node = tree->children; node != NULL; node = node->next) { + max_walk_tree(node, level + 1); + } +} + +static gboolean max_read_subfile(G3DContext *context, G3DModel *model, + G3DStream *stream, const gchar *subfile) +{ + G3DStream *ssf; + MaxGlobalData *global; + gint32 fsize; + guint32 l2cnt = 0; + MaxTreeItem *rootitem; + GNode *tree; + + rootitem = g_new0(MaxTreeItem, 1); + rootitem->text = g_strdup("ROOT"); + tree = g_node_new(rootitem); + + ssf = g3d_stream_open_structured_file_from_stream(stream, subfile); + if(ssf == NULL) { + g_warning("MAX: failed to open '%s' in structured file '%s'", + subfile, stream->uri); + return FALSE; + } + + fsize = g3d_stream_size(ssf); + + g_debug("\\%s (%d bytes)", subfile, fsize); + + global = g_new0(MaxGlobalData, 1); + global->context = context; + global->model = model; + global->stream = ssf; + global->subfile = subfile; + + while(max_read_chunk(global, &fsize, 1 /* level */, IDNONE, NULL, &l2cnt, + tree)); + + g_debug("MAX tree:"); + max_walk_tree(tree, 0); + + g_free(global); + g3d_stream_close(ssf); + + return TRUE; +} + +static GNode *max_find_node(GNode *tree, guint32 id) +{ + GNode *node, *found; + MaxTreeItem *mtitem; + + mtitem = (MaxTreeItem *)tree->data; + if(mtitem->l2id == id) + return tree; + + for(node = tree->children; node != NULL; node = node->next) { + found = max_find_node(node, id); + if(found != NULL) + return found; + } + + return NULL; +} + +static gboolean max_create_l2_tree_object(MaxGlobalData *global, + MaxLocalData *local, G3DObject *parent) +{ + G3DObject *object; + + object = g_new0(G3DObject, 1); + object->name = g_strdup_printf("0x%04X object @ 0x%08x", + local->id, (guint32)g3d_stream_tell(global->stream)); + local->object = object; + if(parent) + parent->objects = g_slist_append(parent->objects, object); + else + global->model->objects = g_slist_append(global->model->objects, + object); + + global->object = object; + global->vertex_offset = 0; + + return TRUE; +} + +static gboolean max_read_chunk(MaxGlobalData *global, gint32 *nb, + guint32 level, gint32 parentid, gpointer object, guint32 *l2cnt, + GNode *tree) +{ + guint16 id; + guint32 length; + gboolean container; + MaxChunk *chunk; + MaxLocalData *local; + MaxTreeItem *mtitem; + GNode *pnode = NULL, *node; + + if(nb && (*nb < 6)) + return FALSE; + + id = g3d_stream_read_int16_le(global->stream); + length = g3d_stream_read_int32_le(global->stream); + container = (length & 0x80000000); + length &= 0x7FFFFFFF; + + if(nb && (length > *nb)) + return FALSE; + if(nb) + *nb -= length; + + if((level == 2) && l2cnt) + (*l2cnt) ++; + + chunk = max_get_chunk_desc(id, parentid, container); + +#if DEBUG > 0 + g_debug("\\%s(%d)[0x%04X][%c%c] %s -- %d (%d) bytes @ 0x%08x", + debug_pad(level), level, + id, (container ? 'c' : ' '), + (chunk && chunk->callback) ? 'f' : ' ', + chunk ? chunk->desc : (level == 2) ? "level 2 container" : "unknown", + length - 6, length, + (guint32)g3d_stream_tell(global->stream) - 6); +#endif + + node = tree; + if(level == 2) { + pnode = max_find_node(tree, id); + if(pnode != NULL) { + mtitem = g_new0(MaxTreeItem, 1); + mtitem->l2id = *l2cnt; + mtitem->id = id; + mtitem->text = g_strdup("L2ITEM"); + node = g_node_append_data(pnode, mtitem); + } else { + mtitem = g_new0(MaxTreeItem, 1); + mtitem->l2id = 0xFFFF; + mtitem->id = id; + mtitem->text = g_strdup_printf("OUTOFTREE: 0x%04X", id); + node = g_node_append_data(tree, mtitem); + } + } else if(level > 2) { + mtitem = g_new0(MaxTreeItem, 1); + mtitem->l2id = 0xFFFF; + mtitem->id = id; + mtitem->text = g_strdup_printf("REGITEM: 0x%04X: %s", + id, chunk ? chunk->desc : "unknown"); + node = g_node_append_data(tree, mtitem); + } + + local = g_new0(MaxLocalData, 1); + local->id = (level > 2) ? id : 0x0000; + local->parentid = parentid; + local->nb = length - 6; + local->level = level + 1; + local->object = object; + + if((level > 2) && chunk && chunk->callback) + chunk->callback(global, local); + if(level == 2) { + mtitem = pnode ? pnode->data : NULL; + max_create_l2_tree_object(global, local, + mtitem ? mtitem->object : NULL); + mtitem = node->data; + mtitem->object = local->object; + } + + if(container) + while(local->nb > 0) + if(!max_read_chunk(global, &(local->nb), level + 1, id, + local->object, l2cnt, node)) + return FALSE; + + if(local->nb > 0) + g3d_stream_skip(global->stream, local->nb); + + g_free(local); + + g3d_context_update_interface(global->context); + + if(level < 3) + g3d_context_update_progress_bar(global->context, + (G3DFloat)g3d_stream_tell(global->stream) / + (G3DFloat)g3d_stream_size(global->stream), + TRUE); + + return TRUE; +} + +static MaxChunk *max_get_chunk_desc(guint16 id, gint32 parentid, + gboolean container) +{ + MaxChunk *chunk, *chunks; + gint32 i; + + if(container) + chunks = max_cnt_chunks; + else + chunks = max_chunks; + + for(i = 0, chunk = &(chunks[i]); chunk->id != IDNONE; + i ++, chunk = &(chunks[i])) { + if((chunk->parentid == IDSOME) || (parentid == chunk->parentid) || + (parentid == IDSOME) || + ((chunk->parentid == IDROOT) && ID_IS_ROOT(parentid)) || + ((chunk->parentid == IDGEOM) && ID_IS_GEOM(parentid)) || + ((chunk->parentid == IDMATG) && ID_IS_MATG(parentid)) || + ((chunk->parentid == IDFILE) && ID_IS_FILE(parentid))) { + if(chunk->id == id) + return chunk; + } /* parentid */ + } + return NULL; +} diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_max/imp_max_callbacks.c b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_max/imp_max_callbacks.c new file mode 100644 index 0000000..219ad4f --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_max/imp_max_callbacks.c @@ -0,0 +1,696 @@ +/* $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 "imp_max_callbacks.h" + +static gchar *max_read_wchar(G3DStream *stream, guint32 n) +{ + gint32 i; + gunichar2 *u16text; + gchar *text; + GError *error = NULL; + + u16text = g_new0(gunichar2, n + 1); + for(i = 0; i < n; i ++) { + u16text[i] = g3d_stream_read_int16_le(stream); + } + + text = g_utf16_to_utf8(u16text, n, NULL, NULL, &error); + if(error != NULL) { + g_warning("UTF-16 to UTF-8 conversion failed: %s", + error->message); + g_error_free(error); + } + g_free(u16text); + + return text; +} + +gboolean max_cb_debug_int32(MaxGlobalData *global, MaxLocalData *local) +{ + union { + gint32 i; + G3DFloat f; + } u; + + while(local->nb >= 4) { + u.i = g3d_stream_read_int32_le(global->stream); + local->nb -= 4; +#if DEBUG > 0 + g_debug("|%s[D32] 0x%08x, %d, %.2f", debug_pad(local->level), + u.i, u.i, u.f); +#endif + } + return TRUE; +} + +gboolean max_cb_debug_wchars(MaxGlobalData *global, MaxLocalData *local) +{ + gchar *str; + guint32 len; + + len = local->nb / 2; + str = max_read_wchar(global->stream, len); + local->nb -= len * 2; +#if DEBUG > 0 + g_debug("|%s[TEXT] %s (%d)", debug_pad(local->level), + str, len); +#endif + g_free(str); + + return TRUE; +} + +gboolean max_cb_debug_string(MaxGlobalData *global, MaxLocalData *local) +{ + gchar *str; + guint32 len; + + g_return_val_if_fail(local->nb >= 4, FALSE); + len = g3d_stream_read_int32_le(global->stream); + local->nb -= 4; + if(len > local->nb) + len = local->nb; + + str = g_new0(gchar, len + 1); + g3d_stream_read(global->stream, str, len); + local->nb -= len; +#if DEBUG > 0 + g_debug("|%s[TEXT] %s (%d)", debug_pad(local->level), + str, len); +#endif + g_free(str); + + return TRUE; +} + +gboolean max_cb_0x0001_0x0005(MaxGlobalData *global, MaxLocalData *local) +{ + gchar *str; + gint32 len, i, w3[3], cnt = 0; + + if(local->nb < 4) + return FALSE; + + /* flags? */ + i = g3d_stream_read_int32_le(global->stream); + local->nb -= 4; + +#if DEBUG > 0 + g_debug("|%s[PROP] 0x%08x", debug_pad(local->level), i); +#endif + + while(local->nb > 0) { + len = g3d_stream_read_int32_le(global->stream); + local->nb -= 4; + str = g_malloc0(len + 1); + g3d_stream_read(global->stream, str, len); + local->nb -= len; + for(i = 0; i < 3; i ++) + w3[i] = g3d_stream_read_int16_le(global->stream); + local->nb -= 6; + cnt ++; +#if DEBUG > 0 + g_debug("|%s[PROP] %04d: '%s' (%d bytes) [%d, %d, %d]", + debug_pad(local->level), + cnt, str, len, + w3[0], w3[1], w3[2]); +#endif + g_free(str); + } + return TRUE; +} + +gboolean max_cb_IDFILE_0x1201(MaxGlobalData *global, MaxLocalData *local) +{ + guint16 width, height; + + width = g3d_stream_read_int16_le(global->stream); + height = g3d_stream_read_int16_le(global->stream); + local->nb -= 4; +#if DEBUG > 0 + g_debug("|%s[IMG] %u x %u", debug_pad(local->level), width, height); +#endif + return TRUE; +} + +/* vertex data */ +gboolean max_cb_0x08FE_0x0100(MaxGlobalData *global, MaxLocalData *local) +{ + guint32 num; + gint i, j; + G3DObject *object; + + if(local->nb < 4) + return FALSE; + + /* vertices */ + num = g3d_stream_read_int32_le(global->stream); + local->nb -= 4; + object = (G3DObject *)local->object; + if(object == NULL) { + g_warning("MAX: 0x08FE::0x0100: no object"); + return FALSE; + } + +#if DEBUG > 0 + g_debug("|%s[VERT] %d vertices", debug_pad(local->level), num); +#endif + global->vertex_offset = object->vertex_count; + object->vertex_count += num; + object->vertex_data = g_realloc(object->vertex_data, + object->vertex_count * 3 * sizeof(G3DFloat)); + + for(i = 0; i < num; i ++) { + if(local->nb < 16) + return FALSE; + g3d_stream_read_int32_le(global->stream); /* always 0 */ + for(j = 0; j < 3; j ++) + object->vertex_data[(global->vertex_offset + i) * 3 + j] = + g3d_stream_read_float_le(global->stream); + local->nb -= 16; + } + return TRUE; +} + +/* lines (vertex indices) */ +gboolean max_cb_0x08FE_0x010A(MaxGlobalData *global, MaxLocalData *local) +{ + guint32 num; + gint i, j; + guint32 v[3]; + + if(local->nb < 4) + return FALSE; + + num = g3d_stream_read_int32_le(global->stream); + local->nb -= 4; + +#if DEBUG > 0 + g_debug("|%s[LINE] %d lines", debug_pad(local->level), num); +#endif + for(i = 0; i < num; i ++) { + if(local->nb < 12) + return FALSE; + for(j = 0; j < 3; j ++) { + v[j] = g3d_stream_read_int32_le(global->stream); + } + local->nb -= 12; + +#if DEBUG > 1 + g_debug("|%s[LINE] 0x%08x: (%d => %d)", debug_pad(local->level), + v[0], v[1], v[2]); +#endif + } + return TRUE; +} + +/* polygon data */ +gboolean max_cb_0x08FE_0x011A(MaxGlobalData *global, MaxLocalData *local) +{ + gint32 i; + guint32 numpoly, type, numvert, cntpoly = 0; + G3DObject *object = (G3DObject *)local->object; + G3DFace *face; + G3DMaterial *material; + + g_return_val_if_fail(local->nb >= 4, FALSE); + g_return_val_if_fail(object != NULL, FALSE); + + material = (G3DMaterial *)g_slist_nth_data(global->model->materials, + (global->vertex_offset ? 1 : 0)); + g_return_val_if_fail(material != NULL, FALSE); + + numpoly = g3d_stream_read_int32_le(global->stream); + local->nb -= 4; +#if DEBUG > 0 + g_debug("|%s[POLY] %d polygons to read", debug_pad(local->level), + numpoly); +#endif + while(local->nb >= 4) { + numvert = g3d_stream_read_int32_le(global->stream); + local->nb -= 4; +#if DEBUG > 0 + g_debug("|%s[POLY] %04d: %d vertices", debug_pad(local->level), + cntpoly, numvert); +#endif + g_return_val_if_fail(numvert >= 3, FALSE); + + face = g_new0(G3DFace, 1); + face->material = material; + face->vertex_count = numvert; + face->vertex_indices = g_new0(guint32, numvert); + object->faces = g_slist_append(object->faces, face); + for(i = 0; i < numvert; i ++) { + face->vertex_indices[i] = + global->vertex_offset + + g3d_stream_read_int32_le(global->stream); + local->nb -= 4; + g_return_val_if_fail( + face->vertex_indices[i] < object->vertex_count, FALSE); + } + type = g3d_stream_read_int16_le(global->stream); + local->nb -= 2; + + if(type & 0xFFC6) { + g_warning("MAX: 0x011A: unhandled 0x%08x", type); +#if DEBUG > 0 + numvert = MIN(local->nb / 2, 20); + for(i = 0; i < numvert; i ++) { + g_debug("|%s[POLY] 0x%04x", debug_pad(local->level), + g3d_stream_read_int16_le(global->stream)); + local->nb -= 2; + } +#endif + return FALSE; + } + + /* FIXME: order of additional data most likely wrong */ + for(i = 3; i < numvert; i ++) { + g3d_stream_read_int32_le(global->stream); + g3d_stream_read_int32_le(global->stream); + local->nb -= 8; + } + if(type & 0x0001) { + g3d_stream_read_int32_le(global->stream); + local->nb -= 4; + } + if(type & 0x0008) { + g3d_stream_read_int16_le(global->stream); + local->nb -= 2; + } + if(type & 0x0010) { + g3d_stream_read_int32_le(global->stream); + local->nb -= 4; + } + cntpoly ++; + } +#if DEBUG > 0 + g_debug("|%s[POLY] %d faces added to object", debug_pad(local->level), + cntpoly); +#endif + return TRUE; +} + +/* texture vertices */ +gboolean max_cb_0x08FE_0x0128(MaxGlobalData *global, MaxLocalData *local) +{ + guint32 num; + G3DObject *object = (G3DObject *)local->object; + + g_return_val_if_fail(local->nb >= 4, FALSE); + g_return_val_if_fail(object != NULL, FALSE); + + num = g3d_stream_read_int32_le(global->stream); + local->nb -= 4; + +#if DEBUG > 0 + g_debug("|%s[TEXV] %d texture vertices", debug_pad(local->level), num); +#endif + return TRUE; +} + +/* texture indices */ +gboolean max_cb_0x08FE_0x012B(MaxGlobalData *global, MaxLocalData *local) +{ + gint i; + guint32 *vdata, vcnt, maxidx = 0, numpoly = 0, maxvcnt = 0; +#if 0 + G3DObject *object = (G3DObject *)local->object; + G3DFace *face; + + g_return_val_if_fail(object != NULL, FALSE); +#endif + + while(local->nb >= 4) { + vcnt = g3d_stream_read_int32_le(global->stream); + local->nb -= 4; + if(vcnt > maxvcnt) + maxvcnt = vcnt; +#if 0 + face = g_new0(G3DFace, 1); + face->vertex_count = vcnt; +#endif + if(local->nb < (vcnt * 4)) { +#if DEBUG > 0 + g_debug("|%s[TIDX] %d polygons, max index: %d, max vcnt: %d " + "(nb=%d, vcnt=%d)", debug_pad(local->level), + numpoly, maxidx, maxvcnt, local->nb, vcnt); +#endif + + return FALSE; + } + vdata = g_new0(guint32, vcnt); + numpoly ++; + for(i = 0; i < vcnt; i ++) { + vdata[i] = g3d_stream_read_int32_le(global->stream); + local->nb -= 4; + if(vdata[i] > maxidx) + maxidx = vdata[i]; + } +#if 1 + g_free(vdata); +#endif + } +#if DEBUG > 0 + g_debug("|%s[TIDX] %d polygons, max index: %d, max vcnt: %d", + debug_pad(local->level), numpoly, maxidx, maxvcnt); +#endif + return TRUE; +} + +/* geometric object */ +gboolean max_cb_IDROOT_IDGEOM(MaxGlobalData *global, MaxLocalData *local) +{ + G3DObject *object; + + object = g_new0(G3DObject, 1); + object->name = g_strdup_printf("0x%04X object @ 0x%08x", + local->id, (guint32)g3d_stream_tell(global->stream)); + local->object = object; + global->model->objects = g_slist_append(global->model->objects, object); + + global->object = object; + global->vertex_offset = 0; + + return TRUE; +} + +/* mesh */ +gboolean max_cb_IDGEOM_0x08FE(MaxGlobalData *global, MaxLocalData *local) +{ + g_return_val_if_fail(global->object != NULL, FALSE); + return TRUE; +} + +/* object name */ +gboolean max_cb_IDGEOM_0x0962(MaxGlobalData *global, MaxLocalData *local) +{ + G3DObject *object = (G3DObject *)local->object; + gchar *name; + gint32 len; + + g_return_val_if_fail(object != NULL, FALSE); + + g_free(object->name); + len = local->nb / 2; + name = max_read_wchar(global->stream, len); + object->name = g_strdup_printf("%s (0x%08x)", + name, (guint32)g3d_stream_tell(global->stream) - len - 6); + g_free(name); +#if DEBUG > 0 + g_debug("|%s[NAME] %s", debug_pad(local->level), object->name); +#endif + local->nb -= len * 2; + + return TRUE; +} + +/* single face */ +gboolean max_cb_0x0118_0x0110(MaxGlobalData *global, MaxLocalData *local) +{ + guint32 num; + gint i; + G3DObject *object = (G3DObject *)local->object; + G3DMaterial *mat; + G3DFace *face; + + g_return_val_if_fail(local->nb >= 4, FALSE); + g_return_val_if_fail(object != NULL, FALSE); + + mat = (G3DMaterial *)g_slist_nth_data(global->model->materials, + (global->vertex_offset ? 1 : 0)); + + num = g3d_stream_read_int32_le(global->stream); + local->nb -= 4; + + face = g_new0(G3DFace, 1); + face->vertex_count = num; + face->vertex_indices = g_new0(guint32, num); + face->material = mat; + object->faces = g_slist_append(object->faces, face); + + g_return_val_if_fail(local->nb >= (num * 4), FALSE); + for(i = 0; i < num; i ++) { + face->vertex_indices[i] = + global->vertex_offset + + g3d_stream_read_int32_le(global->stream); + local->nb -= 4; + if(face->vertex_indices[i] >= object->vertex_count) { + g_warning("MAX: 0x0118::0x0110: vertex index (%d) >= " + "vertex count (%d)", + face->vertex_indices[i], + object->vertex_count); + face->vertex_indices[i] = 0; + } + } + return TRUE; +} + +/* triangles */ +gboolean max_cb_0x08FE_0x0912(MaxGlobalData *global, MaxLocalData *local) +{ + guint32 num; + gint i, j; + G3DObject *object; + G3DFace *face; + G3DMaterial *mat; + + mat = (G3DMaterial *)g_slist_nth_data(global->model->materials, + (global->vertex_offset ? 1 : 0)); + + if(local->nb < 4) + return FALSE; + + /* faces */ + num = g3d_stream_read_int32_le(global->stream); + local->nb -= 4; + object = (G3DObject *)local->object; + if(object == NULL) { + g_warning("MAX: 0x08FE::0x0912: no object"); + return FALSE; + } +#if DEBUG > 0 + g_debug("|%s[TRIS] %d triangles", debug_pad(local->level), num); +#endif + for(i = 0; i < num; i ++) { + face = g_new0(G3DFace, 1); + face->vertex_count = 3; + face->vertex_indices = g_new0(guint32, 3); + face->material = mat; + object->faces = g_slist_append(object->faces, face); + + if(local->nb < 20) + return FALSE; + for(j = 0; j < 3; j ++) { + face->vertex_indices[j] = + global->vertex_offset + + g3d_stream_read_int32_le(global->stream); + if(face->vertex_indices[j] >= object->vertex_count) { + g_warning("MAX: 0x08FE::0x0912: vertex index too high" + " (%d (0x%08x) >= %d)", + face->vertex_indices[j], face->vertex_indices[j], + object->vertex_count); + face->vertex_indices[j] = 0; + } + } + /* unknown for now */ + g3d_stream_read_int32_le(global->stream); + g3d_stream_read_int32_le(global->stream); + local->nb -= 20; + } + return TRUE; +} + +/* vertices */ +gboolean max_cb_0x08FE_0x0914(MaxGlobalData *global, MaxLocalData *local) +{ + guint32 num; + gint i, j; + G3DObject *object = (G3DObject *)local->object; + + g_return_val_if_fail(local->nb >= 4, FALSE); + g_return_val_if_fail(object != NULL, FALSE); + + /* vertices */ + num = g3d_stream_read_int32_le(global->stream); + local->nb -= 4; +#if DEBUG > 0 + g_debug("|%s[VERT] %d vertices", debug_pad(local->level), num); +#endif + global->vertex_offset = object->vertex_count; + object->vertex_count += num; + object->vertex_data = g_realloc(object->vertex_data, + object->vertex_count * 3 * sizeof(G3DFloat)); + + for(i = 0; i < num; i ++) { + if(local->nb < 12) + return FALSE; + for(j = 0; j < 3; j ++) + object->vertex_data[(global->vertex_offset + i) * 3 + j] = + g3d_stream_read_float_le(global->stream); + local->nb -= 12; + } + return TRUE; +} + +/* texture vertices */ +gboolean max_cb_0x08FE_0x0916(MaxGlobalData *global, MaxLocalData *local) +{ + return max_cb_0x08FE_0x0128(global, local); +} + +/* texture triangles */ +gboolean max_cb_0x08FE_0x0918(MaxGlobalData *global, MaxLocalData *local) +{ + guint32 cnttris = 0; + + while(local->nb >= 12) { + cnttris ++; + + g3d_stream_read_int32_le(global->stream); + g3d_stream_read_int32_le(global->stream); + g3d_stream_read_int32_le(global->stream); + local->nb -= 12; + } + +#if DEBUG > 0 + g_debug("|%s[TEXI] %d textured triangles (%d bytes left)", + debug_pad(local->level), cnttris, local->nb); +#endif + return 0; +} + +/* vertices */ +gboolean max_cb_0x08FE_0x2394(MaxGlobalData *global, MaxLocalData *local) +{ + return max_cb_0x08FE_0x0914(global, local); +} + +/* triangles */ +gboolean max_cb_0x08FE_0x2396(MaxGlobalData *global, MaxLocalData *local) +{ + guint32 num; + gint32 i, j; + G3DObject *object = (G3DObject *)local->object; + G3DFace *face; + G3DMaterial *mat; + + mat = (G3DMaterial *)g_slist_nth_data(global->model->materials, + (global->vertex_offset ? 1 : 0)); + + g_return_val_if_fail(local->nb >= 4, FALSE); + g_return_val_if_fail(object != NULL, FALSE); + + /* faces */ + num = g3d_stream_read_int32_le(global->stream); + local->nb -= 4; +#if DEBUG > 0 + g_debug("|%s[TRIS] %d triangles", debug_pad(local->level), num); +#endif + for(i = 0; i < num; i ++) { + g_return_val_if_fail(local->nb >= 12, FALSE); + + face = g_new0(G3DFace, 1); + face->vertex_count = 3; + face->vertex_indices = g_new0(guint32, 3); + face->material = mat; + object->faces = g_slist_append(object->faces, face); + + g_return_val_if_fail(local->nb >= 12, FALSE); + for(j = 0; j < 3; j ++) { + face->vertex_indices[j] = + global->vertex_offset + + g3d_stream_read_int32_le(global->stream); + local->nb -= 4; + if(face->vertex_indices[j] >= object->vertex_count) { + g_warning("MAX: 0x08FE::0x2396: vertex index too high" + " (%d (0x%08x) >= %d)", + face->vertex_indices[j], face->vertex_indices[j], + object->vertex_count); + face->vertex_indices[j] = 0; + } + } + } + return TRUE; +} + +/* material */ +gboolean max_cb_IDMATG_0x4000(MaxGlobalData *global, MaxLocalData *local) +{ + G3DMaterial *material; + + if(strcmp(global->subfile, "Scene") != 0) + return FALSE; + + material = g3d_material_new(); + material->name = g_strdup_printf("0x4000 material @ 0x%08x", + (guint32)g3d_stream_tell(global->stream)); + local->object = material; + global->model->materials = g_slist_append(global->model->materials, + material); + return TRUE; +} + +/* material name */ +gboolean max_cb_0x4000_0x4001(MaxGlobalData *global, MaxLocalData *local) +{ + guint32 len; + G3DMaterial *material = (G3DMaterial *)local->object; + + g_return_val_if_fail(material != NULL, FALSE); + if(material->name) + g_free(material->name); + len = local->nb / 2; + material->name = max_read_wchar(global->stream, len); + local->nb -= len * 2; +#if DEBUG > 0 + g_debug("|%s[MATN] %s", debug_pad(local->level), material->name); +#endif + return TRUE; +} + +/* material color */ +gboolean max_cb_0x4000_0x4030(MaxGlobalData *global, MaxLocalData *local) +{ + G3DMaterial *material = (G3DMaterial *)local->object; + + g_return_val_if_fail(material != NULL, FALSE); + g_return_val_if_fail(local->nb >= 16, FALSE); + + material->r = g3d_stream_read_float_le(global->stream); + material->g = g3d_stream_read_float_le(global->stream); + material->b = g3d_stream_read_float_le(global->stream); + material->a = g3d_stream_read_float_le(global->stream); + local->nb -= 16; +#if DEBUG > 0 + g_debug("|%s[MATC] %.2f, %.2f, %.2f, %.2f", debug_pad(local->level), + material->r, material->g, material->b, material->a); +#endif + return TRUE; +} + diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_max/imp_max_callbacks.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_max/imp_max_callbacks.h new file mode 100644 index 0000000..244020e --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_max/imp_max_callbacks.h @@ -0,0 +1,82 @@ +/* $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_MAX_CALLBACKS_H +#define _IMP_MAX_CALLBACKS_H + +#include +#include +#include + +typedef struct { + G3DContext *context; + G3DModel *model; + G3DStream *stream; + const gchar *subfile; + + G3DObject *object; + guint32 vertex_offset; +} MaxGlobalData; + +typedef struct { + guint16 id; + gint32 parentid; + guint16 level; + gint32 nb; + gpointer object; +} MaxLocalData; + +typedef gboolean (* MaxCallback)(MaxGlobalData *global, MaxLocalData *local); + +/* callbacks */ + +gboolean max_cb_debug_int32(MaxGlobalData *global, MaxLocalData *local); +gboolean max_cb_debug_string(MaxGlobalData *global, MaxLocalData *local); +gboolean max_cb_debug_wchars(MaxGlobalData *global, MaxLocalData *local); + +gboolean max_cb_IDROOT_IDGEOM(MaxGlobalData *global, MaxLocalData *local); +gboolean max_cb_IDMATG_0x4000(MaxGlobalData *global, MaxLocalData *local); + +gboolean max_cb_IDGEOM_0x08FE(MaxGlobalData *global, MaxLocalData *local); +gboolean max_cb_IDGEOM_0x0962(MaxGlobalData *global, MaxLocalData *local); + +gboolean max_cb_IDFILE_0x1201(MaxGlobalData *global, MaxLocalData *local); + +gboolean max_cb_0x0001_0x0005(MaxGlobalData *global, MaxLocalData *local); + +gboolean max_cb_0x0118_0x0110(MaxGlobalData *global, MaxLocalData *local); + +gboolean max_cb_0x08FE_0x0100(MaxGlobalData *global, MaxLocalData *local); +gboolean max_cb_0x08FE_0x010A(MaxGlobalData *global, MaxLocalData *local); +gboolean max_cb_0x08FE_0x011A(MaxGlobalData *global, MaxLocalData *local); +gboolean max_cb_0x08FE_0x0128(MaxGlobalData *global, MaxLocalData *local); +gboolean max_cb_0x08FE_0x012B(MaxGlobalData *global, MaxLocalData *local); +gboolean max_cb_0x08FE_0x0912(MaxGlobalData *global, MaxLocalData *local); +gboolean max_cb_0x08FE_0x0914(MaxGlobalData *global, MaxLocalData *local); +gboolean max_cb_0x08FE_0x0916(MaxGlobalData *global, MaxLocalData *local); +gboolean max_cb_0x08FE_0x0918(MaxGlobalData *global, MaxLocalData *local); +gboolean max_cb_0x08FE_0x2394(MaxGlobalData *global, MaxLocalData *local); +gboolean max_cb_0x08FE_0x2396(MaxGlobalData *global, MaxLocalData *local); + +gboolean max_cb_0x4000_0x4001(MaxGlobalData *global, MaxLocalData *local); +gboolean max_cb_0x4000_0x4030(MaxGlobalData *global, MaxLocalData *local); + +#endif /* _IMP_MAX_CALLBACKS_H */ diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_max/imp_max_chunks.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_max/imp_max_chunks.h new file mode 100644 index 0000000..96691bc --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_max/imp_max_chunks.h @@ -0,0 +1,289 @@ +/* $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_MAX_CHUNKS_H +#define _IMP_MAX_CHUNKS_H + +#include + +#include "imp_max_callbacks.h" + +#define IDNONE -1 +#define IDSOME -2 +#define IDROOT -3 +#define IDGEOM -4 +#define IDMATG -5 +#define IDFILE -6 + +#define ID_IS_ROOT(pid) \ + (((pid) == 0x2001) || ((pid) == 0x2003) || ((pid) == 0x2004) || \ + ((pid) == 0x2006) || ((pid) == 0x2008) || ((pid) == 0x2009) || \ + ((pid) == 0x200A) || ((pid) == 0x200B)) +#define ID_IS_GEOM(pid) \ + ((((pid) >= 0x0010) && ((pid) <= 0x0011)) || \ + (((pid) >= 0x0013) && ((pid) <= 0x0014)) || \ + (((pid) >= 0x0016) && ((pid) <= 0x001C)) || \ + ((pid) == 0x0023) || ((pid) == 0x0026)) +#define ID_IS_MATG(pid) \ + (((pid) == 0x0002) || \ + (((pid) >= 0x0004) && ((pid) <= 0x000F))) +#define ID_IS_FILE(pid) \ + (((pid) == 0x0003) || ((pid) == 0x0400)) + +typedef struct { + gint32 id; + gint32 parentid; + char *desc; + MaxCallback callback; +} MaxChunk; + +/* container chunks */ +static MaxChunk max_cnt_chunks[] = { + { 0x0118, 0x08FE, "face", NULL }, + + { 0x08FE, IDGEOM, "mesh", max_cb_IDGEOM_0x08FE }, + { 0x0901, IDGEOM, "matrix or not", NULL }, + { 0x0906, IDGEOM, "matrix or not", NULL }, + + { 0x092C, 0x08FE, "mesh bit map group", NULL }, + { 0x092D, 0x08FE, "mesh bit map group", NULL }, + { 0x092E, 0x08FE, "mesh bit map group", NULL }, + + { 0x2001, IDNONE, "3ds MAX x.x root node", NULL }, + { 0x2003, IDNONE, "3ds MAX x.x root node", NULL }, + { 0x2004, IDNONE, "3ds MAX 3.x root node", NULL }, + { 0x2006, IDNONE, "3ds MAX 4.x root node", NULL }, + { 0x2008, IDNONE, "3ds MAX 5.x root node", NULL }, + { 0x2009, IDNONE, "3ds MAX 6.x root node", NULL }, + { 0x200A, IDNONE, "3ds MAX 7.x root node", NULL }, + { 0x200B, IDNONE, "3ds MAX 8.x root node", NULL }, + { 0x2038, IDNONE, "DLL directory entry", NULL }, + { 0x2040, IDNONE, "class directory entry", NULL }, + { 0x2100, IDNONE, "class data entry", NULL }, + + { 0x4000, IDMATG, "material group", max_cb_IDMATG_0x4000 }, + + { IDNONE, IDSOME, NULL, NULL } +}; + +/* data chunks */ +static MaxChunk max_chunks[] = { + /* IDGEOM */ + { 0x08FF, IDGEOM, "mesh something", max_cb_debug_int32 }, + { 0x0900, IDGEOM, "object something", max_cb_debug_int32 }, + { 0x0902, IDGEOM, "object something", max_cb_debug_int32 }, + { 0x0903, IDGEOM, "object something", max_cb_debug_int32 }, + { 0x0904, IDGEOM, "object something", max_cb_debug_int32 }, + { 0x0960, IDGEOM, "object something", max_cb_debug_int32 }, + { 0x0962, IDGEOM, "object name", max_cb_IDGEOM_0x0962 }, + { 0x0963, IDGEOM, "object something", max_cb_debug_int32 }, + { 0x096A, IDGEOM, "object something", max_cb_debug_int32 }, + { 0x096B, IDGEOM, "object something", max_cb_debug_int32 }, + { 0x096C, IDGEOM, "object something", max_cb_debug_int32 }, + { 0x0974, IDGEOM, "object something", max_cb_debug_int32 }, + { 0x0975, IDGEOM, "object flag", NULL }, + { 0x0978, IDGEOM, "object flag", NULL }, + { 0x099C, IDGEOM, "object something", max_cb_debug_int32 }, + { 0x09BA, IDGEOM, "object flag", NULL }, + { 0x09CE, IDGEOM, "object something", max_cb_debug_int32 }, + { 0x0A28, IDGEOM, "object something", max_cb_debug_int32 }, + { 0x0A32, IDGEOM, "object something", max_cb_debug_int32 }, + { 0x0ABE, IDGEOM, "object something", max_cb_debug_int32 }, + { 0x2500, IDGEOM, "object something", max_cb_debug_int32 }, + { 0x2501, IDGEOM, "object something", max_cb_debug_int32 }, + { 0x2505, IDGEOM, "object something", max_cb_debug_int32 }, + { 0x2532, IDGEOM, "object something", max_cb_debug_int32 }, + { 0x3002, IDGEOM, "object something", max_cb_debug_int32 }, + { 0x3003, IDGEOM, "object something", max_cb_debug_int32 }, + { 0x3005, IDGEOM, "object something", max_cb_debug_int32 }, + { 0x4020, IDGEOM, "object something", max_cb_debug_int32 }, + { 0x4024, IDGEOM, "object something", max_cb_debug_int32 }, + { 0x4025, IDGEOM, "object something", max_cb_debug_int32 }, + { 0x4026, IDGEOM, "object something", max_cb_debug_int32 }, + { 0x402C, IDGEOM, "object something", max_cb_debug_int32 }, + { 0x402D, IDGEOM, "object something", max_cb_debug_int32 }, + { 0x4030, IDGEOM, "object something", max_cb_debug_int32 }, + { 0x4034, IDGEOM, "object something", max_cb_debug_int32 }, + { 0x4038, IDGEOM, "object something", max_cb_debug_int32 }, + { 0x403B, IDGEOM, "object something", max_cb_debug_int32 }, + { 0x7230, IDGEOM, "object something", max_cb_debug_int32 }, + { 0x7231, IDGEOM, "object something", max_cb_debug_int32 }, + /* IDMATG */ + { 0x5300, IDMATG, "material something", max_cb_debug_int32 }, + /* IDFILE */ + { 0x1201, IDFILE, "file dimensions + unknown", max_cb_IDFILE_0x1201 }, + { 0x1230, IDFILE, "file name", max_cb_debug_wchars }, + { 0x1240, IDFILE, "file type", max_cb_debug_wchars }, + /* 0x0000 */ + { 0x0005, 0x0000, "[DEBUG] big chunk", NULL }, + { 0x0009, 0x0000, "[DEBUG] 16", max_cb_debug_int32 }, + { 0x000A, 0x0000, "[DEBUG] 3n, 11", NULL }, + { 0x000B, 0x0000, "[DEBUG] 24", max_cb_debug_int32 }, + { 0x000C, 0x0000, "[DEBUG] 10", NULL }, + { 0x2035, 0x0000, "[DEBUG] n * 4", max_cb_debug_int32 }, + /* 0x0001 */ + { 0x0005, 0x0001, "properties", max_cb_0x0001_0x0005 }, + { 0x1000, 0x0003, "[DEBUG] 4", max_cb_debug_int32 }, + { 0x2045, 0x0001, "[DEBUG] 4", max_cb_debug_int32 }, + /* 0x0002 */ + { 0x2045, 0x0002, "[DEBUG] 4", max_cb_debug_int32 }, + /* 0x0003 */ + { 0x2045, 0x0003, "[DEBUG] 4", max_cb_debug_int32 }, + { 0x1030, 0x0003, "[DEBUG] 4", max_cb_debug_int32 }, + { 0x1040, 0x0003, "[DEBUG] 4", max_cb_debug_int32 }, + /* 0x0004 */ + { 0x2035, 0x0004, "[DEBUG] n * 4", max_cb_debug_int32 }, + { 0x2500, 0x0004, "[DEBUG] 8", max_cb_debug_int32 }, + { 0x2501, 0x0004, "[DEBUG] 4", max_cb_debug_int32 }, + { 0x2532, 0x0004, "[DEBUG] flag", NULL }, + { 0x2533, 0x0004, "[DEBUG] flag", NULL }, + { 0x2534, 0x0004, "[DEBUG] flag", NULL }, + { 0x3002, 0x0004, "[DEBUG] 4", max_cb_debug_int32 }, + { 0x3003, 0x0004, "[DEBUG] 8", max_cb_debug_int32 }, + { 0x3005, 0x0004, "[DEBUG] 4", max_cb_debug_int32 }, + /* 0x0010 */ + { 0x0962, 0x0010, "name", max_cb_debug_wchars }, + /* 0x0013 */ + { 0x1000, 0x0013, "text", max_cb_debug_string }, + /* 0x0019 */ + { 0x0110, 0x0019, "name", max_cb_debug_wchars }, + { 0x0120, 0x0019, "name", max_cb_debug_wchars }, + /* 0x0022 */ + { 0x0110, 0x0022, "text", max_cb_debug_wchars }, + { 0x0120, 0x0022, "type data", max_cb_debug_int32 }, + { 0x0130, 0x0022, "type data", max_cb_debug_int32 }, + /* 0x0027 */ + { 0x0110, 0x0027, "text", max_cb_debug_wchars }, + /* 0x002C */ + { 0x0110, 0x002C, "text", max_cb_debug_wchars }, + /* 0x002E */ + { 0x0110, 0x002E, "text", max_cb_debug_wchars }, + { 0x0120, 0x002E, "type data", max_cb_debug_int32 }, + { 0x0130, 0x002E, "type data", max_cb_debug_int32 }, + { 0x0140, 0x002E, "type data", max_cb_debug_int32 }, + /* 0x0110 */ + { 0x0120, 0x0110, "something", max_cb_debug_int32 }, + { 0x0130, 0x0110, "something", max_cb_debug_int32 }, + /* 0x0118 */ + { 0x0100, 0x0118, "face data", max_cb_debug_int32 }, + { 0x0110, 0x0118, "face indices", max_cb_0x0118_0x0110 }, + + /* 0x08FE */ + { 0x0100, 0x08FE, "vertices", max_cb_0x08FE_0x0100 }, + { 0x0108, 0x08FE, "mesh data", max_cb_debug_int32 }, + { 0x010A, 0x08FE, "lines", max_cb_0x08FE_0x010A }, + { 0x0110, 0x08FE, "[DEBUG] 4", max_cb_debug_int32 }, + { 0x0114, 0x08FE, "[DEBUG] 4", max_cb_debug_int32 }, + { 0x011A, 0x08FE, "polygons", max_cb_0x08FE_0x011A }, + { 0x0120, 0x08FE, "[DEBUG] 4", max_cb_debug_int32 }, + { 0x0124, 0x08FE, "[DEBUG] 4", max_cb_debug_int32 }, + { 0x0128, 0x08FE, "texture vertices", max_cb_0x08FE_0x0128 }, + { 0x012B, 0x08FE, "texture indices", max_cb_0x08FE_0x012B }, + { 0x0130, 0x08FE, "[DEBUG] 4", max_cb_debug_int32 }, + { 0x0140, 0x08FE, "[DEBUG] 4", max_cb_debug_int32 }, + { 0x0150, 0x08FE, "[DEBUG] 4", max_cb_debug_int32 }, + { 0x0906, 0x08FE, "mesh something", max_cb_debug_int32 }, + { 0x0908, 0x08FE, "mesh something", max_cb_debug_int32 }, + { 0x0912, 0x08FE, "triangles", max_cb_0x08FE_0x0912 }, + { 0x0914, 0x08FE, "vertices", max_cb_0x08FE_0x0914 }, + { 0x0916, 0x08FE, "texture vertices", max_cb_0x08FE_0x0916 }, + { 0x0918, 0x08FE, "texture indices (tris)", max_cb_0x08FE_0x0918 }, + { 0x0924, 0x08FE, "mesh something", max_cb_debug_int32 }, + { 0x0928, 0x08FE, "mesh something", max_cb_debug_int32 }, + { 0x092A, 0x08FE, "mesh something", max_cb_debug_int32 }, + { 0x0959, 0x08FE, "mesh something", max_cb_debug_int32 }, + { 0x2394, 0x08FE, "vertices", max_cb_0x08FE_0x2394 }, + { 0x2396, 0x08FE, "triangles", max_cb_0x08FE_0x2396 }, + { 0x2398, 0x08FE, "mesh something", max_cb_debug_int32 }, + /* 0x0901 */ + { 0x300D, 0x0901, "x32", max_cb_debug_int32 }, + { 0x300E, 0x0901, "x32", max_cb_debug_int32 }, + { 0x300F, 0x0901, "x32", max_cb_debug_int32 }, + { 0x3010, 0x0901, "x32", max_cb_debug_int32 }, + { 0x3012, 0x0901, "x32", max_cb_debug_int32 }, + { 0x3013, 0x0901, "x32", max_cb_debug_int32 }, + { 0x3014, 0x0901, "x32", max_cb_debug_int32 }, + { 0x3015, 0x0901, "x32", max_cb_debug_int32 }, + { 0x3016, 0x0901, "x32", max_cb_debug_int32 }, + { 0x3017, 0x0901, "x32", max_cb_debug_int32 }, + { 0x3019, 0x0901, "x32", max_cb_debug_int32 }, + { 0x301A, 0x0901, "x32", max_cb_debug_int32 }, + { 0x301B, 0x0901, "x32", max_cb_debug_int32 }, + { 0x301C, 0x0901, "x32", max_cb_debug_int32 }, + { 0x301D, 0x0901, "x32", max_cb_debug_int32 }, + { 0x301E, 0x0901, "x32", max_cb_debug_int32 }, + /* 0x0906 */ + { 0x300D, 0x0906, "x32", max_cb_debug_int32 }, + { 0x300E, 0x0906, "x32", max_cb_debug_int32 }, + { 0x300F, 0x0906, "x32", max_cb_debug_int32 }, + { 0x3010, 0x0906, "x32", max_cb_debug_int32 }, + { 0x3012, 0x0906, "x32", max_cb_debug_int32 }, + { 0x3013, 0x0906, "x32", max_cb_debug_int32 }, + { 0x3014, 0x0906, "x32", max_cb_debug_int32 }, + { 0x3015, 0x0906, "x32", max_cb_debug_int32 }, + { 0x3016, 0x0906, "x32", max_cb_debug_int32 }, + { 0x3017, 0x0906, "x32", max_cb_debug_int32 }, + { 0x3019, 0x0906, "x32", max_cb_debug_int32 }, + { 0x301A, 0x0906, "x32", max_cb_debug_int32 }, + { 0x301B, 0x0906, "x32", max_cb_debug_int32 }, + { 0x301C, 0x0906, "x32", max_cb_debug_int32 }, + { 0x301D, 0x0906, "x32", max_cb_debug_int32 }, + { 0x301E, 0x0906, "x32", max_cb_debug_int32 }, + /* 0x092C */ + { 0x2700, 0x092C, "bit map", NULL }, + /* 0x092D */ + { 0x2700, 0x092D, "bit map", NULL }, + /* 0x092E */ + { 0x2700, 0x092E, "bit map", NULL }, + /* 0x0AF0 */ + { 0x0001, 0x0AF0, "something", max_cb_debug_int32 }, + { 0x0002, 0x0AF0, "something", max_cb_debug_int32 }, + { 0x0003, 0x0AF0, "something", max_cb_debug_int32 }, + { 0x0004, 0x0AF0, "something", max_cb_debug_int32 }, + { 0x0005, 0x0AF0, "something", max_cb_debug_int32 }, + { 0x0006, 0x0AF0, "something", max_cb_debug_int32 }, + { 0x0007, 0x0AF0, "something", max_cb_debug_int32 }, + { 0x0008, 0x0AF0, "something", max_cb_debug_int32 }, + /* 2500 */ + { 0x2510, 0x2500, "something", max_cb_debug_int32 }, + { 0x2511, 0x2500, "something", max_cb_debug_int32 }, + { 0x2513, 0x2500, "something", max_cb_debug_int32 }, + /* 2512 */ + { 0x0530, 0x2512, "something", max_cb_debug_int32 }, + { 0x0540, 0x2512, "something", max_cb_debug_int32 }, + { 0x0550, 0x2512, "something", max_cb_debug_int32 }, + { 0x0560, 0x2512, "something", max_cb_debug_int32 }, + /* 0x39BF */ + { 0x0100, 0x39BF, "text", max_cb_debug_wchars }, + /* 0x4000 */ + { 0x4001, 0x4000, "material name", max_cb_0x4000_0x4001 }, + { 0x4003, 0x4000, "material something (4)", max_cb_debug_int32 }, + { 0x4020, 0x4000, "material something (4)", max_cb_debug_int32 }, + { 0x4030, 0x4000, "material color", max_cb_0x4000_0x4030 }, + + /* IDSOME */ + { 0x2034, IDSOME, "init something", max_cb_debug_int32 }, + { 0x2035, IDSOME, "init something", max_cb_debug_int32 }, + + { IDNONE, IDSOME, NULL, NULL } +}; + +#endif /* _IMP_MAX_CHUNKS_H */ -- cgit v1.1