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_ar/Makefile | 517 +++++++++++++++++++++ .../libg3d-0.0.8/plugins/import/imp_ar/Makefile.am | 23 + .../libg3d-0.0.8/plugins/import/imp_ar/Makefile.in | 517 +++++++++++++++++++++ .../libg3d-0.0.8/plugins/import/imp_ar/imp_ar.c | 183 ++++++++ .../libg3d-0.0.8/plugins/import/imp_ar/imp_ar.h | 33 ++ .../plugins/import/imp_ar/imp_ar_carini.c | 247 ++++++++++ .../plugins/import/imp_ar/imp_ar_carini.h | 35 ++ .../plugins/import/imp_ar/imp_ar_decompress.c | 161 +++++++ .../plugins/import/imp_ar/imp_ar_decompress.h | 30 ++ .../plugins/import/imp_ar/imp_ar_dof.c | 446 ++++++++++++++++++ .../plugins/import/imp_ar/imp_ar_dof.h | 33 ++ 11 files changed, 2225 insertions(+) create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ar/Makefile create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ar/Makefile.am create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ar/Makefile.in create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ar/imp_ar.c create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ar/imp_ar.h create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ar/imp_ar_carini.c create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ar/imp_ar_carini.h create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ar/imp_ar_decompress.c create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ar/imp_ar_decompress.h create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ar/imp_ar_dof.c create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ar/imp_ar_dof.h (limited to 'src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ar') diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ar/Makefile b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ar/Makefile new file mode 100644 index 0000000..906d4b3 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ar/Makefile @@ -0,0 +1,517 @@ +# Makefile.in generated by automake 1.10.1 from Makefile.am. +# plugins/import/imp_ar/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_ar +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_ar_la_DEPENDENCIES = $(top_builddir)/src/libg3d.la +am_imp_ar_la_OBJECTS = imp_ar.lo imp_ar_decompress.lo imp_ar_dof.lo \ + imp_ar_carini.lo +imp_ar_la_OBJECTS = $(am_imp_ar_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_ar_la_SOURCES) +DIST_SOURCES = $(imp_ar_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_ar +abs_srcdir = /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ar +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_ar.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_ar_la_SOURCES = imp_ar.c imp_ar.h \ + imp_ar_decompress.c imp_ar_decompress.h \ + imp_ar_dof.c imp_ar_dof.h \ + imp_ar_carini.c imp_ar_carini.h + +imp_ar_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_ar/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu plugins/import/imp_ar/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_ar.la: $(imp_ar_la_OBJECTS) $(imp_ar_la_DEPENDENCIES) + $(LINK) -rpath $(pluginimpdir) $(imp_ar_la_OBJECTS) $(imp_ar_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +include ./$(DEPDIR)/imp_ar.Plo +include ./$(DEPDIR)/imp_ar_carini.Plo +include ./$(DEPDIR)/imp_ar_decompress.Plo +include ./$(DEPDIR)/imp_ar_dof.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_ar/Makefile.am b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ar/Makefile.am new file mode 100644 index 0000000..a307d0b --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ar/Makefile.am @@ -0,0 +1,23 @@ +pluginimpdir = $(pkglibdir)/plugins/import + +pluginimp_LTLIBRARIES = imp_ar.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_ar_la_SOURCES = imp_ar.c imp_ar.h \ + imp_ar_decompress.c imp_ar_decompress.h \ + imp_ar_dof.c imp_ar_dof.h \ + imp_ar_carini.c imp_ar_carini.h +imp_ar_la_LIBADD = $(top_builddir)/src/libg3d.la @GLIB_LIBS@ diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ar/Makefile.in b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ar/Makefile.in new file mode 100644 index 0000000..1f67984 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ar/Makefile.in @@ -0,0 +1,517 @@ +# 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_ar +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_ar_la_DEPENDENCIES = $(top_builddir)/src/libg3d.la +am_imp_ar_la_OBJECTS = imp_ar.lo imp_ar_decompress.lo imp_ar_dof.lo \ + imp_ar_carini.lo +imp_ar_la_OBJECTS = $(am_imp_ar_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_ar_la_SOURCES) +DIST_SOURCES = $(imp_ar_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_ar.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_ar_la_SOURCES = imp_ar.c imp_ar.h \ + imp_ar_decompress.c imp_ar_decompress.h \ + imp_ar_dof.c imp_ar_dof.h \ + imp_ar_carini.c imp_ar_carini.h + +imp_ar_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_ar/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu plugins/import/imp_ar/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_ar.la: $(imp_ar_la_OBJECTS) $(imp_ar_la_DEPENDENCIES) + $(LINK) -rpath $(pluginimpdir) $(imp_ar_la_OBJECTS) $(imp_ar_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imp_ar.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imp_ar_carini.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imp_ar_decompress.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imp_ar_dof.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_ar/imp_ar.c b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ar/imp_ar.c new file mode 100644 index 0000000..58bd274 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ar/imp_ar.c @@ -0,0 +1,183 @@ +/* $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_ar.h" +#include "imp_ar_decompress.h" +#include "imp_ar_dof.h" +#include "imp_ar_carini.h" + +static GSList *ar_read_directory(G3DStream *stream); +static G3DObject *ar_load_subfile(G3DContext *context, G3DModel *model, + G3DStream *stream, const gchar *subfile); + +/*****************************************************************************/ +/* plugin interface */ + +EAPI +gboolean plugin_load_model_from_stream(G3DContext *context, G3DStream *stream, + G3DModel *model, gpointer plugin_data) +{ + GSList *dir, *item; + GHashTable *carini; + G3DMaterial *material; + G3DObject *object; + gchar *mname; + G3DFloat x, y, z; + + setlocale(LC_NUMERIC, "C"); + + /* default material */ + material = g3d_material_new(); + material->name = g_strdup("default material"); + model->materials = g_slist_append(model->materials, material); + + if(g_strcasecmp(stream->uri + (strlen(stream->uri) - 4), ".dof") == 0) { + /* single DOF file */ + ar_dof_load(context, model, stream); + } else { + /* compressed AR archive */ + carini = ar_carini_load(); + + /* load directory */ + dir = ar_read_directory(stream); + + /* decompress files */ + for(item = dir; item != NULL; item = item->next) + ar_decompress_to_file(stream, (ArDirEntry *)item->data); + + /* load body */ + mname = g_hash_table_lookup(carini, "body.model.file"); + ar_load_subfile(context, model, stream, mname); + /* steering wheel */ + mname = g_hash_table_lookup(carini, "steer.model.file"); + if(mname != NULL) + { + printf("D: steering wheel (%s)\n", mname); + object = ar_load_subfile(context, model, stream, mname); + ar_carini_get_position(carini, "steer", &x, &y, &z); + object->transformation = g_new0(G3DTransformation, 1); + g3d_matrix_identity(object->transformation->matrix); + g3d_matrix_translate(x, y, z, object->transformation->matrix); + } + + /* load wheel 0 */ + mname = g_hash_table_lookup(carini, "wheel0~wheel_front.model.file"); + if(mname != NULL) + { + printf("D: loading wheel 0 (%s)\n", mname); + object = ar_load_subfile(context, model, stream, mname); + x = ar_carini_get_float(carini, "susp0~susp_front.x"); + y = ar_carini_get_float(carini, "susp_front.y") - + ar_carini_get_float(carini, "wheel_front.radius"); + z = ar_carini_get_float(carini, "susp_front.z"); + object->transformation = g_new0(G3DTransformation, 1); + g3d_matrix_identity(object->transformation->matrix); + g3d_matrix_translate(x, y, z, object->transformation->matrix); + } + + ar_carini_free(carini); + } + + return TRUE; +} + +EAPI +gchar *plugin_description(void) +{ + return g_strdup("Racer models."); +} + +EAPI +gchar **plugin_extensions(void) +{ + return g_strsplit("ar:dof", ":", 0); +} + +/*****************************************************************************/ + +static GSList *ar_read_directory(G3DStream *stream) +{ + ArDirEntry *dirent; + GSList *list = NULL; + guint32 fsize, dpos; + gint32 nbytes; + gchar buffer[128]; + + g3d_stream_seek(stream, -4, G_SEEK_END); + fsize = g3d_stream_tell(stream); + dpos = g3d_stream_read_int32_le(stream); + + /* start of directory */ + g3d_stream_seek(stream, dpos, G_SEEK_SET); + nbytes = fsize - dpos; +#if DEBUG > 0 + printf("D: AR: directory @ 0x%08x, %d bytes\n", dpos, nbytes); +#endif + + while(nbytes > 0) { + dirent = g_new0(ArDirEntry, 1); + list = g_slist_append(list, dirent); + + nbytes -= g3d_stream_read_cstr(stream, buffer, 127); + dirent->name = g_strdup(buffer); + dirent->offset = g3d_stream_read_int32_le(stream); + dirent->size = g3d_stream_read_int32_le(stream); + nbytes -= 8; + +#if DEBUG > 0 + printf("D: AR: * %s @ 0x%08x, %d bytes\n", + dirent->name, dirent->offset, dirent->size); +#endif + } + + return list; +} + +static G3DObject *ar_load_subfile(G3DContext *context, G3DModel *model, + G3DStream *stream, const gchar *subfile) +{ + G3DStream *substream; + G3DObject *o; + + if(subfile == NULL) + return NULL; + + substream = g3d_stream_open_file(subfile, "rb"); + if(substream == NULL) + return NULL; + + o = ar_dof_load(context, model, substream); + g3d_stream_close(substream); + + return o; +} + diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ar/imp_ar.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ar/imp_ar.h new file mode 100644 index 0000000..8fb2989 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ar/imp_ar.h @@ -0,0 +1,33 @@ +/* $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_AR_H +#define _IMP_AR_H + +typedef struct { + gchar *name; + guint32 offset; + guint32 size; +} ArDirEntry; + +#endif /* _IMP_AR_H */ + diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ar/imp_ar_carini.c b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ar/imp_ar_carini.c new file mode 100644 index 0000000..8ff4b18 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ar/imp_ar_carini.c @@ -0,0 +1,247 @@ +/* $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 +*/ + +#define _ISOC99_SOURCE 1 /* strtof() */ + +#include +#include +#include +#include +#include + +#define CARINI_IN_VAR 1 +#define CARINI_IN_VALUE 2 +#define CARINI_IN_COMMENT 3 + +static gchar *ar_carini_getpath(GQueue *queue) +{ + gchar *tmp, *path = NULL; + gint32 i; + + for(i = 0; i < g_queue_get_length(queue); i ++) + { + if(path == NULL) + path = g_strdup((gchar *)g_queue_peek_nth(queue, i)); + else + { + tmp = g_strdup_printf("%s.%s", + (gchar *)g_queue_peek_nth(queue, i), path); + g_free(path); + path = tmp; + } + } + + return path; +} + +GHashTable *ar_carini_load(void) +{ + GHashTable *ht; + GQueue *q; + FILE *f; + gchar var[256], *varp; /* section or variable */ + gchar val[256], *valp; /* value */ + gchar *tmps, *varname; + guint32 in = CARINI_IN_VAR; + gint32 c; + + f = fopen("car.ini", "r"); + if(f == NULL) + f = fopen("Car.ini", "r"); + + if(f == NULL) + { + g_error("failed to read 'car.ini'\n"); + return NULL; + } + + ht = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free); + if(ht == NULL) + { + fclose(f); + g_error("could not create hash table"); + return NULL; + } + + q = g_queue_new(); + + valp = val; + memset(val, 0, 256); + varp = var; + memset(var, 0, 256); + + while(!feof(f)) + { + c = fgetc(f); + switch(c) + { + case '\0': + case EOF: + break; + + case '{': + /* push section */ + g_queue_push_head(q, g_strdup(var)); + + in = CARINI_IN_VAR; + varp = var; + memset(var, 0, 256); + break; + + case '}': + /* pop section */ + tmps = (gchar *)g_queue_pop_head(q); + g_free(tmps); + + in = CARINI_IN_VAR; + varp = var; + memset(var, 0, 256); + break; + + case ';': + in = CARINI_IN_COMMENT; + break; + + case '=': + if(in == CARINI_IN_VAR) + { + in = CARINI_IN_VALUE; + valp = val; + memset(val, 0, 256); + } + break; + + case '\n': + case '\r': + if(in == CARINI_IN_VALUE) + { + tmps = ar_carini_getpath(q); + if(tmps) + { + varname = g_strdup_printf("%s.%s", tmps, var); + g_free(tmps); + } + else + varname = g_strdup(var); + + /* update hash table */ + g_hash_table_insert(ht, varname, g_strdup(val)); +#if DEBUG > 2 + printf("D: %s = %s\n", varname, val); +#endif + + in = CARINI_IN_VAR; + varp = var; + memset(var, 0, 256); + } + else if(in == CARINI_IN_COMMENT) + { + in = CARINI_IN_VAR; + } + break; + + case ' ': + case '\t': + if(in == CARINI_IN_VALUE) + { + *valp = c; + valp ++; + } + break; + + default: + if(in == CARINI_IN_VALUE) + { + *valp = c; + valp ++; + } + else if(in == CARINI_IN_VAR) + { + *varp = c; + varp ++; + } + break; + } /* switch(c) */ + } /* !feof(f) */ + + /* clean up */ + g_queue_free(q); + + return ht; +} + +void ar_carini_free(GHashTable *ht) +{ + g_hash_table_destroy(ht); +} + +G3DFloat ar_carini_get_float(GHashTable *ht, gchar *path) +{ + gchar *value; + G3DFloat valf; + + value = (gchar *)g_hash_table_lookup(ht, path); + if(value == NULL) + return 0.0; + + valf = strtof(value, NULL); + return valf; +} + +gboolean ar_carini_get_position(GHashTable *ht, gchar *prefix, + G3DFloat *x, G3DFloat *y, G3DFloat *z) +{ + gchar *path, *value; + + /* x */ + path = g_strdup_printf("%s.x", prefix); + value = (gchar *)g_hash_table_lookup(ht, path); + if(value) + *x = strtof(value, NULL); + else + *x = 0.0; + g_free(path); + + /* y */ + path = g_strdup_printf("%s.y", prefix); + value = (gchar *)g_hash_table_lookup(ht, path); + if(value) + *y = strtof(value, NULL); + else + *y = 0.0; + g_free(path); + + /* z */ + path = g_strdup_printf("%s.z", prefix); + value = (gchar *)g_hash_table_lookup(ht, path); + if(value) + *z = strtof(value, NULL); + else + *z = 0.0; + g_free(path); + +#if DEBUG > 0 + printf("D: position for '%s': %.2f, %.2f, %.2f\n", prefix, *x, *y, *z); +#endif + + return TRUE; +} diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ar/imp_ar_carini.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ar/imp_ar_carini.h new file mode 100644 index 0000000..3c8b972 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ar/imp_ar_carini.h @@ -0,0 +1,35 @@ +/* $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_AR_CARINI_H +#define _IMP_AR_CARINI_H + +#include + +GHashTable *ar_carini_load(void); +void ar_carini_free(GHashTable *ht); +G3DFloat ar_carini_get_float(GHashTable *ht, gchar *path); +gboolean ar_carini_get_position(GHashTable *ht, gchar *prefix, + G3DFloat *x, G3DFloat *y, G3DFloat *z); + +#endif /* _IMP_AR_CARINI_H */ + diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ar/imp_ar_decompress.c b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ar/imp_ar_decompress.c new file mode 100644 index 0000000..90703f4 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ar/imp_ar_decompress.c @@ -0,0 +1,161 @@ +/* $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_ar.h" + +#define AR_FLAG_COPIED 0x80 +#define AR_FLAG_COMPRESS 0x40 + +guint8 *ar_decompress_chunk(guint8 *src, guint16 srcsize, guint16 *dstsize) +{ + guint8 *dst = NULL, bit = 16; + gint32 i, j = 0, k, pos, size; + guint16 cmd; + +#if DEBUG > 2 + printf("D: decompressing %d bytes chunk\n", srcsize); +#endif + + if(src[0] == AR_FLAG_COPIED) + { + *dstsize = srcsize - 1; + dst = g_new0(guint8, *dstsize); + memcpy(dst, src + 1, *dstsize); + return dst; + } + + *dstsize = 0; + cmd = (src[1] << 8) + src[2]; + for(i = 3; i < srcsize;) + { + if(bit == 0) + { + /* get new command */ + cmd = (src[i] << 8) + src[i + 1]; + i += 2; + bit = 16; + } + + if(cmd & 0x8000) + { + pos = (src[i] << 4) + (src[i + 1] >> 4); + i ++; + if(pos != 0) + { + /* copy known chunk */ + size = (src[i] & 0xF) + 3; + *dstsize += size; + dst = g_realloc(dst, *dstsize); + i ++; + for(k = 0; k < size; k ++) + dst[j + k] = dst[j - pos + k]; + j += size; + } + else + { + /* RLE style... */ + size = (src[i] << 8) + src[i + 1] + 16; + *dstsize += size; + dst = g_realloc(dst, *dstsize); + i += 2; + for(k = 0; k < size; k ++) + dst[j + k] = src[i]; + i ++; + j += size; + } + } + else + { + /* plain copy */ + *dstsize += 1; + dst = g_realloc(dst, *dstsize); + dst[j] = src[i]; + i ++; + j ++; + } + + cmd <<= 1; + bit --; + } + + return dst; +} + +gboolean ar_decompress_to_file(G3DStream *stream, ArDirEntry *dirent) +{ + FILE *o; + gchar cmd; + guint32 size; + guint16 srcsize, dstsize; + guint8 *src, *dst; + + o = fopen(dirent->name, "wb"); + if(o == NULL) { + g_warning("failed to write to '%s'", dirent->name); + return FALSE; + } + + /* seek to file start */ + g3d_stream_seek(stream, dirent->offset, G_SEEK_SET); + + /* skip tags */ + do { + cmd = g3d_stream_read_int8(stream); + if(cmd != 'D') { + size = g3d_stream_read_int32_le(stream); + g3d_stream_skip(stream, size); + } + } while(cmd != 'D'); + +#if DEBUG > 2 + printf("D: starting decompression part\n"); +#endif + + /* decompress stuff */ + while(1) { + srcsize = g3d_stream_read_int16_le(stream); + if(srcsize == 0) + break; + + src = g_new0(guint8, srcsize); + g3d_stream_read(stream, src, srcsize); + dst = ar_decompress_chunk(src, srcsize, &dstsize); + + if(dstsize > 0) { + fwrite(dst, 1, dstsize, o); + g_free(dst); + } + + g_free(src); + } + + fclose(o); + + return TRUE; +} + + diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ar/imp_ar_decompress.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ar/imp_ar_decompress.h new file mode 100644 index 0000000..ad203a3 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ar/imp_ar_decompress.h @@ -0,0 +1,30 @@ +/* $Id$ */ + +/* + libg3d - 3D object loading library + + Copyright (C) 2005-2009 Markus Dahms + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef _IMP_AR_DECOMPRESS_H +#define _IMP_AR_DECOMPRESS_H + +#include + +gboolean ar_decompress_to_file(G3DStream *stream, ArDirEntry *dirent); + +#endif /* _IMP_AR_DECOMPRESS_H */ diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ar/imp_ar_dof.c b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ar/imp_ar_dof.c new file mode 100644 index 0000000..6b2eff6 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ar/imp_ar_dof.c @@ -0,0 +1,446 @@ +/* $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 + +gchar *ar_dof_read_string(G3DStream *stream, gint32 *dlen) +{ + gint32 len; + gchar *text; + + len = g3d_stream_read_int16_le(stream); + *dlen -= 2; + + text = g_new0(gchar, len + 1); + g3d_stream_read(stream, text, len); + *dlen -= len; + + return text; +} + +G3DMaterial *ar_dof_load_mat(G3DContext *context, G3DModel *model, + G3DStream *stream) +{ + G3DMaterial *material; + gint32 id, len = 0, dlen, i, ntex, trans = 0, blend = 0; + gchar *tmp; + + id = g3d_stream_read_int32_be(stream); + if(id != G3D_IFF_MKID('M','A','T','0')) + return NULL; + + material = g3d_material_new(); + + dlen = g3d_stream_read_int32_le(stream); + do { + id = g3d_stream_read_int32_be(stream); + if(id != G3D_IFF_MKID('M','E','N','D')) + len = g3d_stream_read_int32_le(stream); + + switch(id) { + case G3D_IFF_MKID('M','E','N','D'): + break; + + case G3D_IFF_MKID('M','H','D','R'): + material->name = ar_dof_read_string(stream, &dlen); + tmp = ar_dof_read_string(stream, &dlen); + g_free(tmp); + break; + + case G3D_IFF_MKID('M','C','O','L'): + /* ambient */ + material->r = g3d_stream_read_float_le(stream); + material->g = g3d_stream_read_float_le(stream); + material->b = g3d_stream_read_float_le(stream); + material->a = g3d_stream_read_float_le(stream); + dlen -= 16; + /* diffuse */ + g3d_stream_skip(stream, 16); + dlen -= 16; + /* specular */ + material->specular[0] = g3d_stream_read_float_le(stream); + material->specular[1] = g3d_stream_read_float_le(stream); + material->specular[2] = g3d_stream_read_float_le(stream); + material->specular[3] = g3d_stream_read_float_le(stream); + dlen -= 16; + /* emission */ + g3d_stream_skip(stream, 16); + dlen -= 16; + /* shininess */ + material->shininess = g3d_stream_read_float_le(stream); + dlen -= 4; + break; + + case G3D_IFF_MKID('M','T','E','X'): + ntex = g3d_stream_read_int32_le(stream); + dlen -= 4; + for(i = 0; i < ntex; i ++) { + tmp = ar_dof_read_string(stream, &dlen); + if(i == 0) { + material->tex_image = + g3d_texture_load_cached(context, model, tmp); + if(material->tex_image) + material->tex_image->tex_id = g_str_hash(tmp); + } + g_free(tmp); + } + break; + + case G3D_IFF_MKID('M','T','R','A'): + /* transparency */ + trans = g3d_stream_read_int32_le(stream); + /* blend mode */ + blend = g3d_stream_read_int32_le(stream); + + printf("D: MTRA: %s: trans: 0x%04x, blend: 0x%04x\n", + (material->name ? material->name : "unnamed"), + trans, blend); + + dlen -= 8; + break; + + case G3D_IFF_MKID('M','C','F','L'): + /* creation flags */ + g3d_stream_read_int32_le(stream); + dlen -= 4; + break; + + case G3D_IFF_MKID('M','U','V','W'): + /* u offset */ + g3d_stream_read_int32_le(stream); + /* v offset */ + g3d_stream_read_int32_le(stream); + dlen -= 8; + + /* u tiling */ + g3d_stream_read_int32_le(stream); + /* v tiling */ + g3d_stream_read_int32_le(stream); + dlen -= 8; + + /* angle */ + g3d_stream_read_float_le(stream); + /* blur */ + g3d_stream_read_float_le(stream); + /* blur offset */ + g3d_stream_read_int32_le(stream); + dlen -= 12; + break; + + default: + g3d_stream_skip(stream, len); + dlen -= len; + break; + } + } + while((dlen > 0) && (id != G3D_IFF_MKID('M','E','N','D'))); + + if(material->tex_image != NULL) { + if(blend == 1) + material->tex_image->tex_env = G3D_TEXENV_BLEND; + else + material->tex_image->tex_env = G3D_TEXENV_DECAL; + } + + return material; +} + +G3DObject *ar_dof_load_obj(G3DContext *context, G3DModel *model, + G3DStream *stream) +{ + G3DObject *object, *pobj; + G3DFace *face; + G3DMaterial *material; + GSList *item; + gint32 id, len = 0, dlen, nverts, ntver, nnorm, nind, i, j, index; + G3DFloat *tex_vertices = NULL, *normals = NULL; + + id = g3d_stream_read_int32_be(stream); + dlen = g3d_stream_read_int32_le(stream); + + if(id != G3D_IFF_MKID('G','O','B','1')) { + g3d_stream_skip(stream, dlen); + return NULL; + } + + object = g_new0(G3DObject, 1); + object->name = g_strdup_printf("object @ 0x%08x", + (guint32)g3d_stream_tell(stream)); + + /* parent object for material references */ + pobj = (G3DObject *)g_slist_nth_data(model->objects, 0); + + /* default material */ + material = (G3DMaterial *)g_slist_nth_data(model->materials, 0); + + do { + id = g3d_stream_read_int32_be(stream); + if(id != G3D_IFF_MKID('G','E','N','D')) + len = g3d_stream_read_int32_le(stream); + + switch(id) { + case G3D_IFF_MKID('G','E','N','D'): + /* end of object */ + break; + + case G3D_IFF_MKID('G','H','D','R'): + /* object header */ + /* flags */ + i = g3d_stream_read_int32_le(stream); + printf("D: GHDR: flags = 0x%04X\n", i); + /* paint flags */ + i = g3d_stream_read_int32_le(stream); + printf("D: GHDR: paint flags = 0x%04X\n", i); + + /* material ref */ + i = g3d_stream_read_int32_le(stream); + material = g_slist_nth_data(pobj->materials, i); + if(material == NULL) + material = (G3DMaterial *)g_slist_nth_data( + model->materials, 0); + + dlen -= 12; + break; + + case G3D_IFF_MKID('V','E','R','T'): + /* vertices */ + nverts = g3d_stream_read_int32_le(stream); + +#if DEBUG > 2 + printf("D: %d vertices\n", nverts); +#endif + + dlen -= 4; + if(nverts > 0) { + object->vertex_count = nverts; + object->vertex_data = g_new0(G3DFloat, nverts * 3); + for(i = 0; i < nverts; i ++) { + for(j = 0; j < 3; j ++) + object->vertex_data[i * 3 + j] = + g3d_stream_read_float_le(stream); + dlen -= 12; + } + } + break; + + case G3D_IFF_MKID('N', 'O','R','M'): + /* normals */ + nnorm = g3d_stream_read_int32_le(stream); + normals = g_new0(G3DFloat, nnorm * 3); + dlen -= 4; + for(i = 0; i < nnorm; i ++) { + for(j = 0; j < 3; j ++) + normals[i * 3 + j] = g3d_stream_read_float_le(stream); + dlen -= 12; + } + break; + + case G3D_IFF_MKID('T', 'V','E','R'): + /* texture vertices */ + ntver = g3d_stream_read_int32_le(stream); + tex_vertices = g_new0(G3DFloat, ntver * 2); + dlen -= 4; + +#if DEBUG > 2 + printf("D: %d texture vertices @ 0x%08x\n", ntver, + (guint32)g3d_stream_tell(stream) - 12); +#endif + + for(i = 0; (i < ntver) && (len > 0); i ++) { + tex_vertices[i * 2 + 0] = g3d_stream_read_float_le(stream); + tex_vertices[i * 2 + 1] = + 1.0 - g3d_stream_read_float_le(stream); + dlen -= 8; + } + break; + + case G3D_IFF_MKID('B','R','S','T'): + /* bursts */ + i = g3d_stream_read_int32_le(stream); + dlen -= 4; + g3d_stream_skip(stream, i * 4); /* burstStart */ + g3d_stream_skip(stream, i * 4); /* burstCount */ + g3d_stream_skip(stream, i * 4); /* burstMtlID */ + g3d_stream_skip(stream, i * 4); /* burstVperP */ + dlen -= (4 * 4 * i); + break; + + case G3D_IFF_MKID('V','C','O','L'): + /* vertex colors */ + i = g3d_stream_read_int32_le(stream); + dlen -= 4; + g3d_stream_skip(stream, i * 4 * 3); + dlen -= (i * 4 * 3); + break; + + case G3D_IFF_MKID('I','N','D','I'): + /* indices */ + nind = g3d_stream_read_int32_le(stream); + dlen -= 4; + len -= 4; + +#if DEBUG > 2 + printf("D: %d indices in %d bytes\n", nind, len); +#endif + + for(i = 0; i < nind; i += 3) { + face = g_new0(G3DFace, 1); + face->material = material; + face->vertex_count = 3; + face->vertex_indices = g_new0(guint32, 3); + + for(j = 0; j < 3; j ++) + face->vertex_indices[j] = + g3d_stream_read_int16_le(stream); + dlen -= 6; + len -= 6; + + object->faces = g_slist_append(object->faces, face); + } + break; + + default: +#if DEBUG > 0 + printf("D: skipping tag '%c%c%c%c @ 0x%08x'\n", + (id << 24) & 0xFF, (id << 16) & 0xFF, + (id << 8) & 0xFF, id & 0xFF, + (guint32)g3d_stream_tell(stream)); +#endif + g3d_stream_skip(stream, len); + dlen -= len; + break; + } + } while((dlen > 0) && (id != G3D_IFF_MKID('G','E','N','D'))); + + /* fix faces with normals and texture vertices */ + for(item = object->faces; item != NULL; item = item->next) { + face = (G3DFace *)item->data; + + if(tex_vertices != NULL) { + face->tex_image = material->tex_image; + face->tex_vertex_count = 3; + face->tex_vertex_data = g_new0(G3DFloat, 3 * 2); + for(j = 0; j < 3; j ++) { + index = face->vertex_indices[j]; + face->tex_vertex_data[j * 2 + 0] = tex_vertices[index * 2 + 0]; + face->tex_vertex_data[j * 2 + 1] = tex_vertices[index * 2 + 1]; + } + if(face->tex_image != NULL) + face->flags |= G3D_FLAG_FAC_TEXMAP; + } + + if(normals != NULL) { + face->normals = g_new0(G3DFloat, 3 * 3); + for(j = 0; j < 3; j ++) { + index = face->vertex_indices[j]; + face->normals[j * 3 + 0] = normals[index * 3 + 0]; + face->normals[j * 3 + 1] = normals[index * 3 + 1]; + face->normals[j * 3 + 2] = normals[index * 3 + 2]; + } + face->flags |= G3D_FLAG_FAC_NORMALS; + } + } + + /* cleanup */ + if(tex_vertices != NULL) + g_free(tex_vertices); + + if(normals != NULL) + g_free(normals); + + return object; +} + +G3DObject *ar_dof_load(G3DContext *context, G3DModel *model, + G3DStream *stream) +{ + gint32 id, dlen, len = 0, nmat, nobj, i; + G3DObject *object, *cobj; + G3DMaterial *material; + + /* file is little-endian, but read IDs as big-endian to use + * G3D_IFF_MKID to compare */ + + id = g3d_stream_read_int32_be(stream); + if(id != G3D_IFF_MKID('D','O','F','1')) { + g_warning("%s is not a DOF1 file\n", stream->uri); + return NULL; + } + dlen = g3d_stream_read_int32_le(stream); + + object = g_new0(G3DObject, 1); + object->name = g_strdup(stream->uri); + model->objects = g_slist_append(model->objects, object); + + do { + id = g3d_stream_read_int32_be(stream); + if(id != G3D_IFF_MKID('E','D','O','F')) + len = g3d_stream_read_int32_le(stream); + dlen -= 8; + + switch(id) { + case G3D_IFF_MKID('E','D','O','F'): + /* end of DOF */ + break; + + case G3D_IFF_MKID('M','A','T','S'): + nmat = g3d_stream_read_int32_le(stream); + for(i = 0; i < nmat; i ++) { + material = ar_dof_load_mat(context, model, stream); + if(material) + object->materials = g_slist_append(object->materials, + material); + } + dlen -= len; + break; + + case G3D_IFF_MKID('G','E','O','B'): + nobj = g3d_stream_read_int32_le(stream); + for(i = 0; i < nobj; i ++) { + cobj = ar_dof_load_obj(context, model, stream); + if(cobj) + object->objects = + g_slist_append(object->objects, cobj); + } + dlen -= len; + break; + + default: + g_warning("DOF: unknown ID '%c%c%c%c' @ 0x%08x", + (id >> 24) & 0xFF, (id >> 16) & 0xFF, + (id >> 8) & 0xFF, id & 0xFF, + (guint32)g3d_stream_tell(stream) - 8); + g3d_stream_skip(stream, len); + dlen -= len; + break; + } + } while((dlen > 0) && + (id != G3D_IFF_MKID('E','D','O','F')) && + (!g3d_stream_eof(stream))); + + return object; +} + diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ar/imp_ar_dof.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ar/imp_ar_dof.h new file mode 100644 index 0000000..c3aa61a --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ar/imp_ar_dof.h @@ -0,0 +1,33 @@ +/* $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_AR_DOF_H +#define _IMP_AR_DOF_H + +#include +#include +#include + +G3DObject *ar_dof_load(G3DContext *context, G3DModel *model, + G3DStream *stream); + +#endif -- cgit v1.1