aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_max
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/others/mimesh/libg3d-0.0.8/plugins/import/imp_max/Makefile515
-rw-r--r--src/others/mimesh/libg3d-0.0.8/plugins/import/imp_max/Makefile.am26
-rw-r--r--src/others/mimesh/libg3d-0.0.8/plugins/import/imp_max/Makefile.in515
-rw-r--r--src/others/mimesh/libg3d-0.0.8/plugins/import/imp_max/imp_max.c358
-rw-r--r--src/others/mimesh/libg3d-0.0.8/plugins/import/imp_max/imp_max_callbacks.c696
-rw-r--r--src/others/mimesh/libg3d-0.0.8/plugins/import/imp_max/imp_max_callbacks.h82
-rw-r--r--src/others/mimesh/libg3d-0.0.8/plugins/import/imp_max/imp_max_chunks.h289
7 files changed, 2481 insertions, 0 deletions
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 @@
1# Makefile.in generated by automake 1.10.1 from Makefile.am.
2# plugins/import/imp_max/Makefile. Generated from Makefile.in by configure.
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
6# This Makefile.in is free software; the Free Software Foundation
7# gives unlimited permission to copy and/or distribute it,
8# with or without modifications, as long as this notice is preserved.
9
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13# PARTICULAR PURPOSE.
14
15
16
17
18pkgdatadir = $(datadir)/libg3d
19pkglibdir = $(libdir)/libg3d
20pkgincludedir = $(includedir)/libg3d
21am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
22install_sh_DATA = $(install_sh) -c -m 644
23install_sh_PROGRAM = $(install_sh) -c
24install_sh_SCRIPT = $(install_sh) -c
25INSTALL_HEADER = $(INSTALL_DATA)
26transform = $(program_transform_name)
27NORMAL_INSTALL = :
28PRE_INSTALL = :
29POST_INSTALL = :
30NORMAL_UNINSTALL = :
31PRE_UNINSTALL = :
32POST_UNINSTALL = :
33build_triplet = x86_64-unknown-linux-gnu
34host_triplet = x86_64-unknown-linux-gnu
35subdir = plugins/import/imp_max
36DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
37ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
38am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
39 $(top_srcdir)/m4/glib-2.0.m4 $(top_srcdir)/m4/gtk-2.0.m4 \
40 $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \
41 $(top_srcdir)/m4/libxml2.m4 $(top_srcdir)/m4/win32.m4 \
42 $(top_srcdir)/configure.in
43am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
44 $(ACLOCAL_M4)
45mkinstalldirs = $(install_sh) -d
46CONFIG_HEADER = $(top_builddir)/include/g3d/config.h
47CONFIG_CLEAN_FILES =
48am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
49am__vpath_adj = case $$p in \
50 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
51 *) f=$$p;; \
52 esac;
53am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
54am__installdirs = "$(DESTDIR)$(pluginimpdir)"
55pluginimpLTLIBRARIES_INSTALL = $(INSTALL)
56LTLIBRARIES = $(pluginimp_LTLIBRARIES)
57imp_max_la_DEPENDENCIES = $(top_builddir)/src/libg3d.la
58am_imp_max_la_OBJECTS = imp_max.lo imp_max_callbacks.lo
59imp_max_la_OBJECTS = $(am_imp_max_la_OBJECTS)
60#am_imp_max_la_rpath = -rpath \
61# $(pluginimpdir)
62DEFAULT_INCLUDES = -I. -I$(top_builddir)/include/g3d
63depcomp = $(SHELL) $(top_srcdir)/config/depcomp
64am__depfiles_maybe = depfiles
65COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
66 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
67LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
68 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
69 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
70CCLD = $(CC)
71LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
72 --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
73 $(LDFLAGS) -o $@
74SOURCES = $(imp_max_la_SOURCES)
75DIST_SOURCES = $(imp_max_la_SOURCES)
76ETAGS = etags
77CTAGS = ctags
78DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
79ACLOCAL = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run aclocal-1.10
80AMTAR = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run tar
81AR = ar
82AS = as
83AUTOCONF = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run autoconf
84AUTOHEADER = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run autoheader
85AUTOMAKE = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run automake-1.10
86AWK = gawk
87CC = gcc
88CCDEPMODE = depmode=gcc3
89CFLAGS = -g -O2
90CPP = gcc -E
91CPPFLAGS =
92CXX = g++
93CXXCPP = g++ -E
94CXXDEPMODE = depmode=gcc3
95CXXFLAGS = -g -O2
96CYGPATH_W = echo
97DBG_CFLAGS = -O2
98DEBUG = 0
99DEFS = -DHAVE_CONFIG_H
100DEPDIR = .deps
101DLLTOOL = dlltool
102ECHO = echo
103ECHO_C =
104ECHO_N = -n
105ECHO_T =
106EGREP = /bin/grep -E
107EXEEXT =
108F77 =
109FFLAGS =
110GDKPIXBUF_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
111GDKPIXBUF_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
112GLIB_CFLAGS = -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include
113GLIB_GENMARSHAL = glib-genmarshal
114GLIB_LIBS = -Wl,--export-dynamic -pthread -lgmodule-2.0 -lrt -lgobject-2.0 -lglib-2.0
115GLIB_MKENUMS = glib-mkenums
116GOBJECT_QUERY = gobject-query
117GREP = /bin/grep
118GTKDOC_CHECK = /usr/bin/gtkdoc-check
119GTK_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
120GTK_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
121HTML_DIR = ${datadir}/gtk-doc/html
122INSTALL = /usr/bin/install -c
123INSTALL_DATA = ${INSTALL} -m 644
124INSTALL_PROGRAM = ${INSTALL}
125INSTALL_SCRIPT = ${INSTALL}
126INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
127LDFLAGS =
128LEX = flex
129LEXLIB = -lfl
130LEX_OUTPUT_ROOT = lex.yy
131LIBGSF_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
132LIBGSF_LIBS = -lgsf-1 -lgobject-2.0 -lxml2 -lglib-2.0
133LIBOBJS =
134LIBS = -lm
135LIBTOOL = $(SHELL) $(top_builddir)/libtool --quiet
136LIBXML2_CFLAGS = -I/usr/include/libxml2
137LIBXML2_LIBS = -L/usr/lib/x86_64-linux-gnu -lxml2
138LN_S = ln -s
139LTLIBOBJS =
140LTVERSION = 0:8:0
141MAGIC_LIBS = -lmagic
142MAKEINFO = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run makeinfo
143MATH_LIBS = -lm
144MKDIR_P = /bin/mkdir -p
145OBJDUMP = objdump
146OBJEXT = o
147PACKAGE = libg3d
148PACKAGE_BUGREPORT =
149PACKAGE_NAME =
150PACKAGE_STRING =
151PACKAGE_TARNAME =
152PACKAGE_VERSION =
153PATH_SEPARATOR = :
154PKG_CONFIG = /usr/bin/pkg-config
155PLUGINS_LDFLAGS = -avoid-version -export-dynamic
156RANLIB = ranlib
157SET_MAKE =
158SHELL = /bin/bash
159STRIP = strip
160VERSION = 0.0.8
161XML2_CONFIG = /usr/bin/xml2-config
162XML_CPPFLAGS = -I/usr/include/libxml2
163XML_LIBS = -L/usr/lib/x86_64-linux-gnu -lxml2
164Z_CFLAGS =
165Z_LIBS = -lz
166abs_builddir = /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_max
167abs_srcdir = /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_max
168abs_top_builddir = /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8
169abs_top_srcdir = /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8
170ac_ct_CC = gcc
171ac_ct_CXX = g++
172ac_ct_F77 =
173am__include = include
174am__leading_dot = .
175am__quote =
176am__tar = ${AMTAR} chof - "$$tardir"
177am__untar = ${AMTAR} xf -
178bindir = ${exec_prefix}/bin
179build = x86_64-unknown-linux-gnu
180build_alias =
181build_cpu = x86_64
182build_os = linux-gnu
183build_vendor = unknown
184builddir = .
185datadir = ${datarootdir}
186datarootdir = ${prefix}/share
187docdir = ${datarootdir}/doc/${PACKAGE}
188dvidir = ${docdir}
189exec_prefix = ${prefix}
190host = x86_64-unknown-linux-gnu
191host_alias =
192host_cpu = x86_64
193host_os = linux-gnu
194host_vendor = unknown
195htmldir = ${docdir}
196includedir = ${prefix}/include
197infodir = ${datarootdir}/info
198install_sh = $(SHELL) /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/install-sh
199libdir = ${exec_prefix}/lib
200libexecdir = ${exec_prefix}/libexec
201localedir = ${datarootdir}/locale
202localstatedir = ${prefix}/var
203mandir = ${datarootdir}/man
204mkdir_p = /bin/mkdir -p
205oldincludedir = /usr/include
206pdfdir = ${docdir}
207prefix = /usr/local
208program_transform_name = s,x,x,
209psdir = ${docdir}
210sbindir = ${exec_prefix}/sbin
211sharedstatedir = ${prefix}/com
212srcdir = .
213sysconfdir = ${prefix}/etc
214target_alias =
215top_builddir = ../../..
216top_srcdir = ../../..
217pluginimpdir = $(pkglibdir)/plugins/import
218#pluginimp_LTLIBRARIES = imp_max.la
219AM_CFLAGS = \
220 -Wall -ansi -pedantic \
221 -DG_LOG_DOMAIN=\"LibG3D\" \
222 -O2 -DDEBUG=0 \
223 -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include
224
225INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include
226AM_LDFLAGS = \
227 -no-undefined -module \
228 -avoid-version -export-dynamic
229
230imp_max_la_SOURCES = imp_max.c \
231 imp_max_chunks.h imp_max_callbacks.c imp_max_callbacks.h
232
233imp_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
234all: all-am
235
236.SUFFIXES:
237.SUFFIXES: .c .lo .o .obj
238$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
239 @for dep in $?; do \
240 case '$(am__configure_deps)' in \
241 *$$dep*) \
242 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
243 && exit 0; \
244 exit 1;; \
245 esac; \
246 done; \
247 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/import/imp_max/Makefile'; \
248 cd $(top_srcdir) && \
249 $(AUTOMAKE) --gnu plugins/import/imp_max/Makefile
250.PRECIOUS: Makefile
251Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
252 @case '$?' in \
253 *config.status*) \
254 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
255 *) \
256 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
257 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
258 esac;
259
260$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
261 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
262
263$(top_srcdir)/configure: $(am__configure_deps)
264 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
265$(ACLOCAL_M4): $(am__aclocal_m4_deps)
266 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
267install-pluginimpLTLIBRARIES: $(pluginimp_LTLIBRARIES)
268 @$(NORMAL_INSTALL)
269 test -z "$(pluginimpdir)" || $(MKDIR_P) "$(DESTDIR)$(pluginimpdir)"
270 @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \
271 if test -f $$p; then \
272 f=$(am__strip_dir) \
273 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pluginimpLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(pluginimpdir)/$$f'"; \
274 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pluginimpLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(pluginimpdir)/$$f"; \
275 else :; fi; \
276 done
277
278uninstall-pluginimpLTLIBRARIES:
279 @$(NORMAL_UNINSTALL)
280 @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \
281 p=$(am__strip_dir) \
282 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pluginimpdir)/$$p'"; \
283 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pluginimpdir)/$$p"; \
284 done
285
286clean-pluginimpLTLIBRARIES:
287 -test -z "$(pluginimp_LTLIBRARIES)" || rm -f $(pluginimp_LTLIBRARIES)
288 @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \
289 dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
290 test "$$dir" != "$$p" || dir=.; \
291 echo "rm -f \"$${dir}/so_locations\""; \
292 rm -f "$${dir}/so_locations"; \
293 done
294imp_max.la: $(imp_max_la_OBJECTS) $(imp_max_la_DEPENDENCIES)
295 $(LINK) $(am_imp_max_la_rpath) $(imp_max_la_OBJECTS) $(imp_max_la_LIBADD) $(LIBS)
296
297mostlyclean-compile:
298 -rm -f *.$(OBJEXT)
299
300distclean-compile:
301 -rm -f *.tab.c
302
303include ./$(DEPDIR)/imp_max.Plo
304include ./$(DEPDIR)/imp_max_callbacks.Plo
305
306.c.o:
307 $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
308 mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
309# source='$<' object='$@' libtool=no \
310# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
311# $(COMPILE) -c $<
312
313.c.obj:
314 $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
315 mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
316# source='$<' object='$@' libtool=no \
317# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
318# $(COMPILE) -c `$(CYGPATH_W) '$<'`
319
320.c.lo:
321 $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
322 mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
323# source='$<' object='$@' libtool=yes \
324# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
325# $(LTCOMPILE) -c -o $@ $<
326
327mostlyclean-libtool:
328 -rm -f *.lo
329
330clean-libtool:
331 -rm -rf .libs _libs
332
333ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
334 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
335 unique=`for i in $$list; do \
336 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
337 done | \
338 $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
339 END { if (nonempty) { for (i in files) print i; }; }'`; \
340 mkid -fID $$unique
341tags: TAGS
342
343TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
344 $(TAGS_FILES) $(LISP)
345 tags=; \
346 here=`pwd`; \
347 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
348 unique=`for i in $$list; do \
349 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
350 done | \
351 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
352 END { if (nonempty) { for (i in files) print i; }; }'`; \
353 if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
354 test -n "$$unique" || unique=$$empty_fix; \
355 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
356 $$tags $$unique; \
357 fi
358ctags: CTAGS
359CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
360 $(TAGS_FILES) $(LISP)
361 tags=; \
362 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
363 unique=`for i in $$list; do \
364 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
365 done | \
366 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
367 END { if (nonempty) { for (i in files) print i; }; }'`; \
368 test -z "$(CTAGS_ARGS)$$tags$$unique" \
369 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
370 $$tags $$unique
371
372GTAGS:
373 here=`$(am__cd) $(top_builddir) && pwd` \
374 && cd $(top_srcdir) \
375 && gtags -i $(GTAGS_ARGS) $$here
376
377distclean-tags:
378 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
379
380distdir: $(DISTFILES)
381 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
382 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
383 list='$(DISTFILES)'; \
384 dist_files=`for file in $$list; do echo $$file; done | \
385 sed -e "s|^$$srcdirstrip/||;t" \
386 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
387 case $$dist_files in \
388 */*) $(MKDIR_P) `echo "$$dist_files" | \
389 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
390 sort -u` ;; \
391 esac; \
392 for file in $$dist_files; do \
393 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
394 if test -d $$d/$$file; then \
395 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
396 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
397 cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
398 fi; \
399 cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
400 else \
401 test -f $(distdir)/$$file \
402 || cp -p $$d/$$file $(distdir)/$$file \
403 || exit 1; \
404 fi; \
405 done
406check-am: all-am
407check: check-am
408all-am: Makefile $(LTLIBRARIES)
409installdirs:
410 for dir in "$(DESTDIR)$(pluginimpdir)"; do \
411 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
412 done
413install: install-am
414install-exec: install-exec-am
415install-data: install-data-am
416uninstall: uninstall-am
417
418install-am: all-am
419 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
420
421installcheck: installcheck-am
422install-strip:
423 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
424 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
425 `test -z '$(STRIP)' || \
426 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
427mostlyclean-generic:
428
429clean-generic:
430
431distclean-generic:
432 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
433
434maintainer-clean-generic:
435 @echo "This command is intended for maintainers to use"
436 @echo "it deletes files that may require special tools to rebuild."
437clean: clean-am
438
439clean-am: clean-generic clean-libtool clean-pluginimpLTLIBRARIES \
440 mostlyclean-am
441
442distclean: distclean-am
443 -rm -rf ./$(DEPDIR)
444 -rm -f Makefile
445distclean-am: clean-am distclean-compile distclean-generic \
446 distclean-tags
447
448dvi: dvi-am
449
450dvi-am:
451
452html: html-am
453
454info: info-am
455
456info-am:
457
458install-data-am: install-pluginimpLTLIBRARIES
459
460install-dvi: install-dvi-am
461
462install-exec-am:
463
464install-html: install-html-am
465
466install-info: install-info-am
467
468install-man:
469
470install-pdf: install-pdf-am
471
472install-ps: install-ps-am
473
474installcheck-am:
475
476maintainer-clean: maintainer-clean-am
477 -rm -rf ./$(DEPDIR)
478 -rm -f Makefile
479maintainer-clean-am: distclean-am maintainer-clean-generic
480
481mostlyclean: mostlyclean-am
482
483mostlyclean-am: mostlyclean-compile mostlyclean-generic \
484 mostlyclean-libtool
485
486pdf: pdf-am
487
488pdf-am:
489
490ps: ps-am
491
492ps-am:
493
494uninstall-am: uninstall-pluginimpLTLIBRARIES
495
496.MAKE: install-am install-strip
497
498.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
499 clean-libtool clean-pluginimpLTLIBRARIES ctags distclean \
500 distclean-compile distclean-generic distclean-libtool \
501 distclean-tags distdir dvi dvi-am html html-am info info-am \
502 install install-am install-data install-data-am install-dvi \
503 install-dvi-am install-exec install-exec-am install-html \
504 install-html-am install-info install-info-am install-man \
505 install-pdf install-pdf-am install-pluginimpLTLIBRARIES \
506 install-ps install-ps-am install-strip installcheck \
507 installcheck-am installdirs maintainer-clean \
508 maintainer-clean-generic mostlyclean mostlyclean-compile \
509 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
510 tags uninstall uninstall-am uninstall-pluginimpLTLIBRARIES
511
512 -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
513# Tell versions [3.59,3.63) of GNU make to not export all variables.
514# Otherwise a system limit (for SysV at least) may be exceeded.
515.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 @@
1pluginimpdir = $(pkglibdir)/plugins/import
2
3if EXPERIMENTAL
4if HAVE_LIBGSF
5pluginimp_LTLIBRARIES = imp_max.la
6endif
7endif
8
9AM_CFLAGS = \
10 -Wall -ansi -pedantic \
11 -DG_LOG_DOMAIN=\"LibG3D\" \
12 @DBG_CFLAGS@ -DDEBUG=@DEBUG@ \
13 @GLIB_CFLAGS@
14 @LIBGSF_CFLAGS@
15
16INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include
17
18AM_LDFLAGS = \
19 -no-undefined -module \
20 @PLUGINS_LDFLAGS@
21
22LIBTOOL += --quiet
23
24imp_max_la_SOURCES = imp_max.c \
25 imp_max_chunks.h imp_max_callbacks.c imp_max_callbacks.h
26imp_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 @@
1# Makefile.in generated by automake 1.10.1 from Makefile.am.
2# @configure_input@
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
6# This Makefile.in is free software; the Free Software Foundation
7# gives unlimited permission to copy and/or distribute it,
8# with or without modifications, as long as this notice is preserved.
9
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13# PARTICULAR PURPOSE.
14
15@SET_MAKE@
16
17VPATH = @srcdir@
18pkgdatadir = $(datadir)/@PACKAGE@
19pkglibdir = $(libdir)/@PACKAGE@
20pkgincludedir = $(includedir)/@PACKAGE@
21am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
22install_sh_DATA = $(install_sh) -c -m 644
23install_sh_PROGRAM = $(install_sh) -c
24install_sh_SCRIPT = $(install_sh) -c
25INSTALL_HEADER = $(INSTALL_DATA)
26transform = $(program_transform_name)
27NORMAL_INSTALL = :
28PRE_INSTALL = :
29POST_INSTALL = :
30NORMAL_UNINSTALL = :
31PRE_UNINSTALL = :
32POST_UNINSTALL = :
33build_triplet = @build@
34host_triplet = @host@
35subdir = plugins/import/imp_max
36DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
37ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
38am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
39 $(top_srcdir)/m4/glib-2.0.m4 $(top_srcdir)/m4/gtk-2.0.m4 \
40 $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \
41 $(top_srcdir)/m4/libxml2.m4 $(top_srcdir)/m4/win32.m4 \
42 $(top_srcdir)/configure.in
43am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
44 $(ACLOCAL_M4)
45mkinstalldirs = $(install_sh) -d
46CONFIG_HEADER = $(top_builddir)/include/g3d/config.h
47CONFIG_CLEAN_FILES =
48am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
49am__vpath_adj = case $$p in \
50 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
51 *) f=$$p;; \
52 esac;
53am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
54am__installdirs = "$(DESTDIR)$(pluginimpdir)"
55pluginimpLTLIBRARIES_INSTALL = $(INSTALL)
56LTLIBRARIES = $(pluginimp_LTLIBRARIES)
57imp_max_la_DEPENDENCIES = $(top_builddir)/src/libg3d.la
58am_imp_max_la_OBJECTS = imp_max.lo imp_max_callbacks.lo
59imp_max_la_OBJECTS = $(am_imp_max_la_OBJECTS)
60@EXPERIMENTAL_TRUE@@HAVE_LIBGSF_TRUE@am_imp_max_la_rpath = -rpath \
61@EXPERIMENTAL_TRUE@@HAVE_LIBGSF_TRUE@ $(pluginimpdir)
62DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include/g3d
63depcomp = $(SHELL) $(top_srcdir)/config/depcomp
64am__depfiles_maybe = depfiles
65COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
66 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
67LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
68 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
69 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
70CCLD = $(CC)
71LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
72 --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
73 $(LDFLAGS) -o $@
74SOURCES = $(imp_max_la_SOURCES)
75DIST_SOURCES = $(imp_max_la_SOURCES)
76ETAGS = etags
77CTAGS = ctags
78DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
79ACLOCAL = @ACLOCAL@
80AMTAR = @AMTAR@
81AR = @AR@
82AS = @AS@
83AUTOCONF = @AUTOCONF@
84AUTOHEADER = @AUTOHEADER@
85AUTOMAKE = @AUTOMAKE@
86AWK = @AWK@
87CC = @CC@
88CCDEPMODE = @CCDEPMODE@
89CFLAGS = @CFLAGS@
90CPP = @CPP@
91CPPFLAGS = @CPPFLAGS@
92CXX = @CXX@
93CXXCPP = @CXXCPP@
94CXXDEPMODE = @CXXDEPMODE@
95CXXFLAGS = @CXXFLAGS@
96CYGPATH_W = @CYGPATH_W@
97DBG_CFLAGS = @DBG_CFLAGS@
98DEBUG = @DEBUG@
99DEFS = @DEFS@
100DEPDIR = @DEPDIR@
101DLLTOOL = @DLLTOOL@
102ECHO = @ECHO@
103ECHO_C = @ECHO_C@
104ECHO_N = @ECHO_N@
105ECHO_T = @ECHO_T@
106EGREP = @EGREP@
107EXEEXT = @EXEEXT@
108F77 = @F77@
109FFLAGS = @FFLAGS@
110GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@
111GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@
112GLIB_CFLAGS = @GLIB_CFLAGS@
113GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
114GLIB_LIBS = @GLIB_LIBS@
115GLIB_MKENUMS = @GLIB_MKENUMS@
116GOBJECT_QUERY = @GOBJECT_QUERY@
117GREP = @GREP@
118GTKDOC_CHECK = @GTKDOC_CHECK@
119GTK_CFLAGS = @GTK_CFLAGS@
120GTK_LIBS = @GTK_LIBS@
121HTML_DIR = @HTML_DIR@
122INSTALL = @INSTALL@
123INSTALL_DATA = @INSTALL_DATA@
124INSTALL_PROGRAM = @INSTALL_PROGRAM@
125INSTALL_SCRIPT = @INSTALL_SCRIPT@
126INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
127LDFLAGS = @LDFLAGS@
128LEX = @LEX@
129LEXLIB = @LEXLIB@
130LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
131LIBGSF_CFLAGS = @LIBGSF_CFLAGS@
132LIBGSF_LIBS = @LIBGSF_LIBS@
133LIBOBJS = @LIBOBJS@
134LIBS = @LIBS@
135LIBTOOL = @LIBTOOL@ --quiet
136LIBXML2_CFLAGS = @LIBXML2_CFLAGS@
137LIBXML2_LIBS = @LIBXML2_LIBS@
138LN_S = @LN_S@
139LTLIBOBJS = @LTLIBOBJS@
140LTVERSION = @LTVERSION@
141MAGIC_LIBS = @MAGIC_LIBS@
142MAKEINFO = @MAKEINFO@
143MATH_LIBS = @MATH_LIBS@
144MKDIR_P = @MKDIR_P@
145OBJDUMP = @OBJDUMP@
146OBJEXT = @OBJEXT@
147PACKAGE = @PACKAGE@
148PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
149PACKAGE_NAME = @PACKAGE_NAME@
150PACKAGE_STRING = @PACKAGE_STRING@
151PACKAGE_TARNAME = @PACKAGE_TARNAME@
152PACKAGE_VERSION = @PACKAGE_VERSION@
153PATH_SEPARATOR = @PATH_SEPARATOR@
154PKG_CONFIG = @PKG_CONFIG@
155PLUGINS_LDFLAGS = @PLUGINS_LDFLAGS@
156RANLIB = @RANLIB@
157SET_MAKE = @SET_MAKE@
158SHELL = @SHELL@
159STRIP = @STRIP@
160VERSION = @VERSION@
161XML2_CONFIG = @XML2_CONFIG@
162XML_CPPFLAGS = @XML_CPPFLAGS@
163XML_LIBS = @XML_LIBS@
164Z_CFLAGS = @Z_CFLAGS@
165Z_LIBS = @Z_LIBS@
166abs_builddir = @abs_builddir@
167abs_srcdir = @abs_srcdir@
168abs_top_builddir = @abs_top_builddir@
169abs_top_srcdir = @abs_top_srcdir@
170ac_ct_CC = @ac_ct_CC@
171ac_ct_CXX = @ac_ct_CXX@
172ac_ct_F77 = @ac_ct_F77@
173am__include = @am__include@
174am__leading_dot = @am__leading_dot@
175am__quote = @am__quote@
176am__tar = @am__tar@
177am__untar = @am__untar@
178bindir = @bindir@
179build = @build@
180build_alias = @build_alias@
181build_cpu = @build_cpu@
182build_os = @build_os@
183build_vendor = @build_vendor@
184builddir = @builddir@
185datadir = @datadir@
186datarootdir = @datarootdir@
187docdir = @docdir@
188dvidir = @dvidir@
189exec_prefix = @exec_prefix@
190host = @host@
191host_alias = @host_alias@
192host_cpu = @host_cpu@
193host_os = @host_os@
194host_vendor = @host_vendor@
195htmldir = @htmldir@
196includedir = @includedir@
197infodir = @infodir@
198install_sh = @install_sh@
199libdir = @libdir@
200libexecdir = @libexecdir@
201localedir = @localedir@
202localstatedir = @localstatedir@
203mandir = @mandir@
204mkdir_p = @mkdir_p@
205oldincludedir = @oldincludedir@
206pdfdir = @pdfdir@
207prefix = @prefix@
208program_transform_name = @program_transform_name@
209psdir = @psdir@
210sbindir = @sbindir@
211sharedstatedir = @sharedstatedir@
212srcdir = @srcdir@
213sysconfdir = @sysconfdir@
214target_alias = @target_alias@
215top_builddir = @top_builddir@
216top_srcdir = @top_srcdir@
217pluginimpdir = $(pkglibdir)/plugins/import
218@EXPERIMENTAL_TRUE@@HAVE_LIBGSF_TRUE@pluginimp_LTLIBRARIES = imp_max.la
219AM_CFLAGS = \
220 -Wall -ansi -pedantic \
221 -DG_LOG_DOMAIN=\"LibG3D\" \
222 @DBG_CFLAGS@ -DDEBUG=@DEBUG@ \
223 @GLIB_CFLAGS@
224
225INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include
226AM_LDFLAGS = \
227 -no-undefined -module \
228 @PLUGINS_LDFLAGS@
229
230imp_max_la_SOURCES = imp_max.c \
231 imp_max_chunks.h imp_max_callbacks.c imp_max_callbacks.h
232
233imp_max_la_LIBADD = $(top_builddir)/src/libg3d.la @GLIB_LIBS@ @LIBGSF_LIBS@
234all: all-am
235
236.SUFFIXES:
237.SUFFIXES: .c .lo .o .obj
238$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
239 @for dep in $?; do \
240 case '$(am__configure_deps)' in \
241 *$$dep*) \
242 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
243 && exit 0; \
244 exit 1;; \
245 esac; \
246 done; \
247 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/import/imp_max/Makefile'; \
248 cd $(top_srcdir) && \
249 $(AUTOMAKE) --gnu plugins/import/imp_max/Makefile
250.PRECIOUS: Makefile
251Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
252 @case '$?' in \
253 *config.status*) \
254 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
255 *) \
256 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
257 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
258 esac;
259
260$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
261 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
262
263$(top_srcdir)/configure: $(am__configure_deps)
264 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
265$(ACLOCAL_M4): $(am__aclocal_m4_deps)
266 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
267install-pluginimpLTLIBRARIES: $(pluginimp_LTLIBRARIES)
268 @$(NORMAL_INSTALL)
269 test -z "$(pluginimpdir)" || $(MKDIR_P) "$(DESTDIR)$(pluginimpdir)"
270 @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \
271 if test -f $$p; then \
272 f=$(am__strip_dir) \
273 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pluginimpLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(pluginimpdir)/$$f'"; \
274 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pluginimpLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(pluginimpdir)/$$f"; \
275 else :; fi; \
276 done
277
278uninstall-pluginimpLTLIBRARIES:
279 @$(NORMAL_UNINSTALL)
280 @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \
281 p=$(am__strip_dir) \
282 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pluginimpdir)/$$p'"; \
283 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pluginimpdir)/$$p"; \
284 done
285
286clean-pluginimpLTLIBRARIES:
287 -test -z "$(pluginimp_LTLIBRARIES)" || rm -f $(pluginimp_LTLIBRARIES)
288 @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \
289 dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
290 test "$$dir" != "$$p" || dir=.; \
291 echo "rm -f \"$${dir}/so_locations\""; \
292 rm -f "$${dir}/so_locations"; \
293 done
294imp_max.la: $(imp_max_la_OBJECTS) $(imp_max_la_DEPENDENCIES)
295 $(LINK) $(am_imp_max_la_rpath) $(imp_max_la_OBJECTS) $(imp_max_la_LIBADD) $(LIBS)
296
297mostlyclean-compile:
298 -rm -f *.$(OBJEXT)
299
300distclean-compile:
301 -rm -f *.tab.c
302
303@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imp_max.Plo@am__quote@
304@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imp_max_callbacks.Plo@am__quote@
305
306.c.o:
307@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
308@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
309@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
310@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
311@am__fastdepCC_FALSE@ $(COMPILE) -c $<
312
313.c.obj:
314@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
315@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
316@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
317@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
318@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
319
320.c.lo:
321@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
322@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
323@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
324@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
325@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
326
327mostlyclean-libtool:
328 -rm -f *.lo
329
330clean-libtool:
331 -rm -rf .libs _libs
332
333ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
334 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
335 unique=`for i in $$list; do \
336 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
337 done | \
338 $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
339 END { if (nonempty) { for (i in files) print i; }; }'`; \
340 mkid -fID $$unique
341tags: TAGS
342
343TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
344 $(TAGS_FILES) $(LISP)
345 tags=; \
346 here=`pwd`; \
347 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
348 unique=`for i in $$list; do \
349 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
350 done | \
351 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
352 END { if (nonempty) { for (i in files) print i; }; }'`; \
353 if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
354 test -n "$$unique" || unique=$$empty_fix; \
355 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
356 $$tags $$unique; \
357 fi
358ctags: CTAGS
359CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
360 $(TAGS_FILES) $(LISP)
361 tags=; \
362 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
363 unique=`for i in $$list; do \
364 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
365 done | \
366 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
367 END { if (nonempty) { for (i in files) print i; }; }'`; \
368 test -z "$(CTAGS_ARGS)$$tags$$unique" \
369 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
370 $$tags $$unique
371
372GTAGS:
373 here=`$(am__cd) $(top_builddir) && pwd` \
374 && cd $(top_srcdir) \
375 && gtags -i $(GTAGS_ARGS) $$here
376
377distclean-tags:
378 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
379
380distdir: $(DISTFILES)
381 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
382 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
383 list='$(DISTFILES)'; \
384 dist_files=`for file in $$list; do echo $$file; done | \
385 sed -e "s|^$$srcdirstrip/||;t" \
386 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
387 case $$dist_files in \
388 */*) $(MKDIR_P) `echo "$$dist_files" | \
389 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
390 sort -u` ;; \
391 esac; \
392 for file in $$dist_files; do \
393 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
394 if test -d $$d/$$file; then \
395 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
396 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
397 cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
398 fi; \
399 cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
400 else \
401 test -f $(distdir)/$$file \
402 || cp -p $$d/$$file $(distdir)/$$file \
403 || exit 1; \
404 fi; \
405 done
406check-am: all-am
407check: check-am
408all-am: Makefile $(LTLIBRARIES)
409installdirs:
410 for dir in "$(DESTDIR)$(pluginimpdir)"; do \
411 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
412 done
413install: install-am
414install-exec: install-exec-am
415install-data: install-data-am
416uninstall: uninstall-am
417
418install-am: all-am
419 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
420
421installcheck: installcheck-am
422install-strip:
423 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
424 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
425 `test -z '$(STRIP)' || \
426 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
427mostlyclean-generic:
428
429clean-generic:
430
431distclean-generic:
432 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
433
434maintainer-clean-generic:
435 @echo "This command is intended for maintainers to use"
436 @echo "it deletes files that may require special tools to rebuild."
437clean: clean-am
438
439clean-am: clean-generic clean-libtool clean-pluginimpLTLIBRARIES \
440 mostlyclean-am
441
442distclean: distclean-am
443 -rm -rf ./$(DEPDIR)
444 -rm -f Makefile
445distclean-am: clean-am distclean-compile distclean-generic \
446 distclean-tags
447
448dvi: dvi-am
449
450dvi-am:
451
452html: html-am
453
454info: info-am
455
456info-am:
457
458install-data-am: install-pluginimpLTLIBRARIES
459
460install-dvi: install-dvi-am
461
462install-exec-am:
463
464install-html: install-html-am
465
466install-info: install-info-am
467
468install-man:
469
470install-pdf: install-pdf-am
471
472install-ps: install-ps-am
473
474installcheck-am:
475
476maintainer-clean: maintainer-clean-am
477 -rm -rf ./$(DEPDIR)
478 -rm -f Makefile
479maintainer-clean-am: distclean-am maintainer-clean-generic
480
481mostlyclean: mostlyclean-am
482
483mostlyclean-am: mostlyclean-compile mostlyclean-generic \
484 mostlyclean-libtool
485
486pdf: pdf-am
487
488pdf-am:
489
490ps: ps-am
491
492ps-am:
493
494uninstall-am: uninstall-pluginimpLTLIBRARIES
495
496.MAKE: install-am install-strip
497
498.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
499 clean-libtool clean-pluginimpLTLIBRARIES ctags distclean \
500 distclean-compile distclean-generic distclean-libtool \
501 distclean-tags distdir dvi dvi-am html html-am info info-am \
502 install install-am install-data install-data-am install-dvi \
503 install-dvi-am install-exec install-exec-am install-html \
504 install-html-am install-info install-info-am install-man \
505 install-pdf install-pdf-am install-pluginimpLTLIBRARIES \
506 install-ps install-ps-am install-strip installcheck \
507 installcheck-am installdirs maintainer-clean \
508 maintainer-clean-generic mostlyclean mostlyclean-compile \
509 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
510 tags uninstall uninstall-am uninstall-pluginimpLTLIBRARIES
511
512 @LIBGSF_CFLAGS@
513# Tell versions [3.59,3.63) of GNU make to not export all variables.
514# Otherwise a system limit (for SysV at least) may be exceeded.
515.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 @@
1/* $Id$ */
2
3/*
4 libg3d - 3D object loading library
5
6 Copyright (C) 2005-2009 Markus Dahms <mad@automagically.de>
7
8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Lesser General Public
10 License as published by the Free Software Foundation; either
11 version 2.1 of the License, or (at your option) any later version.
12
13 This library is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
17
18 You should have received a copy of the GNU Lesser General Public
19 License along with this library; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21*/
22
23#include <g3d/config.h>
24
25#include <string.h>
26
27#include <g3d/types.h>
28#include <g3d/context.h>
29#include <g3d/object.h>
30#include <g3d/material.h>
31#include <g3d/stream.h>
32#include <g3d/debug.h>
33
34#include "imp_max_chunks.h"
35
36
37
38static gboolean max_read_subfile(G3DContext *context, G3DModel *model,
39 G3DStream *stream, const gchar *subfile);
40static gboolean max_read_chunk(MaxGlobalData *global, gint32 *nb,
41 guint32 level, gint32 parentid, gpointer object, guint32 *l2cnt,
42 GNode *tree);
43static MaxChunk *max_get_chunk_desc(guint16 id, gint32 parentid,
44 gboolean container);
45
46static const gchar *max_subfiles[] = {
47#if 0
48 "Config",
49 "VideoPostQueue",
50 "ScriptedCustAttribDefs",
51 "DllDirectory",
52 "ClassDirectory",
53 "ClassDirectory2",
54 "ClassDirectory3",
55 "ClassData",
56#endif
57 "Scene",
58 NULL
59};
60
61typedef enum {
62 MAX_ROOT_NODE,
63 MAX_L2_NODE,
64 MAX_CNT_NODE,
65 MAX_DATA_NODE
66} MaxNodeType;
67
68typedef struct {
69 MaxNodeType type;
70 gchar *name;
71 guint32 cnt2034;
72 guint32 val2034;
73 gint32 data2034;
74 GSList *children;
75} MaxNode;
76
77typedef struct {
78 guint32 l2id;
79 guint32 id;
80 gchar *text;
81 G3DObject *object;
82} MaxTreeItem;
83
84EAPI
85gboolean plugin_load_model_from_stream(G3DContext *context, G3DStream *stream,
86 G3DModel *model)
87{
88 gboolean retval = FALSE;
89 G3DMaterial *material;
90 const gchar **subfile = max_subfiles;
91
92 /* create default material */
93 material = g3d_material_new();
94 material->name = g_strdup("default material");
95 model->materials = g_slist_append(model->materials, material);
96
97 /* debugging material */
98 material = g3d_material_new();
99 material->r = 1.0;
100 material->g = 0.2;
101 material->b = 0.1;
102 material->name = g_strdup("debugging material");
103 model->materials = g_slist_append(model->materials, material);
104
105 while(*subfile) {
106 retval = max_read_subfile(context, model, stream, *subfile);
107 subfile ++;
108 }
109
110 g3d_context_update_progress_bar(context, 0.0, FALSE);
111
112 return retval;
113}
114
115EAPI
116gchar *plugin_description(void)
117{
118 return g_strdup("3D Studio MAX models (EXPERIMENTAL).");
119}
120
121EAPI
122gchar **plugin_extensions(void)
123{
124 return g_strsplit("max:gmax", ":", 0);
125}
126
127/*****************************************************************************
128 * max specific
129 *****************************************************************************/
130
131static void max_walk_tree(GNode *tree, guint32 level)
132{
133 GNode *node;
134 MaxTreeItem *mtitem;
135
136 mtitem = (MaxTreeItem *)tree->data;
137
138#if DEBUG > 0
139 g_debug("\\%s(%u)[0x%04X][0x%04X] %s", debug_pad(level), level,
140 mtitem->l2id, mtitem->id, mtitem->text);
141#endif
142
143 for(node = tree->children; node != NULL; node = node->next) {
144 max_walk_tree(node, level + 1);
145 }
146}
147
148static gboolean max_read_subfile(G3DContext *context, G3DModel *model,
149 G3DStream *stream, const gchar *subfile)
150{
151 G3DStream *ssf;
152 MaxGlobalData *global;
153 gint32 fsize;
154 guint32 l2cnt = 0;
155 MaxTreeItem *rootitem;
156 GNode *tree;
157
158 rootitem = g_new0(MaxTreeItem, 1);
159 rootitem->text = g_strdup("ROOT");
160 tree = g_node_new(rootitem);
161
162 ssf = g3d_stream_open_structured_file_from_stream(stream, subfile);
163 if(ssf == NULL) {
164 g_warning("MAX: failed to open '%s' in structured file '%s'",
165 subfile, stream->uri);
166 return FALSE;
167 }
168
169 fsize = g3d_stream_size(ssf);
170
171 g_debug("\\%s (%d bytes)", subfile, fsize);
172
173 global = g_new0(MaxGlobalData, 1);
174 global->context = context;
175 global->model = model;
176 global->stream = ssf;
177 global->subfile = subfile;
178
179 while(max_read_chunk(global, &fsize, 1 /* level */, IDNONE, NULL, &l2cnt,
180 tree));
181
182 g_debug("MAX tree:");
183 max_walk_tree(tree, 0);
184
185 g_free(global);
186 g3d_stream_close(ssf);
187
188 return TRUE;
189}
190
191static GNode *max_find_node(GNode *tree, guint32 id)
192{
193 GNode *node, *found;
194 MaxTreeItem *mtitem;
195
196 mtitem = (MaxTreeItem *)tree->data;
197 if(mtitem->l2id == id)
198 return tree;
199
200 for(node = tree->children; node != NULL; node = node->next) {
201 found = max_find_node(node, id);
202 if(found != NULL)
203 return found;
204 }
205
206 return NULL;
207}
208
209static gboolean max_create_l2_tree_object(MaxGlobalData *global,
210 MaxLocalData *local, G3DObject *parent)
211{
212 G3DObject *object;
213
214 object = g_new0(G3DObject, 1);
215 object->name = g_strdup_printf("0x%04X object @ 0x%08x",
216 local->id, (guint32)g3d_stream_tell(global->stream));
217 local->object = object;
218 if(parent)
219 parent->objects = g_slist_append(parent->objects, object);
220 else
221 global->model->objects = g_slist_append(global->model->objects,
222 object);
223
224 global->object = object;
225 global->vertex_offset = 0;
226
227 return TRUE;
228}
229
230static gboolean max_read_chunk(MaxGlobalData *global, gint32 *nb,
231 guint32 level, gint32 parentid, gpointer object, guint32 *l2cnt,
232 GNode *tree)
233{
234 guint16 id;
235 guint32 length;
236 gboolean container;
237 MaxChunk *chunk;
238 MaxLocalData *local;
239 MaxTreeItem *mtitem;
240 GNode *pnode = NULL, *node;
241
242 if(nb && (*nb < 6))
243 return FALSE;
244
245 id = g3d_stream_read_int16_le(global->stream);
246 length = g3d_stream_read_int32_le(global->stream);
247 container = (length & 0x80000000);
248 length &= 0x7FFFFFFF;
249
250 if(nb && (length > *nb))
251 return FALSE;
252 if(nb)
253 *nb -= length;
254
255 if((level == 2) && l2cnt)
256 (*l2cnt) ++;
257
258 chunk = max_get_chunk_desc(id, parentid, container);
259
260#if DEBUG > 0
261 g_debug("\\%s(%d)[0x%04X][%c%c] %s -- %d (%d) bytes @ 0x%08x",
262 debug_pad(level), level,
263 id, (container ? 'c' : ' '),
264 (chunk && chunk->callback) ? 'f' : ' ',
265 chunk ? chunk->desc : (level == 2) ? "level 2 container" : "unknown",
266 length - 6, length,
267 (guint32)g3d_stream_tell(global->stream) - 6);
268#endif
269
270 node = tree;
271 if(level == 2) {
272 pnode = max_find_node(tree, id);
273 if(pnode != NULL) {
274 mtitem = g_new0(MaxTreeItem, 1);
275 mtitem->l2id = *l2cnt;
276 mtitem->id = id;
277 mtitem->text = g_strdup("L2ITEM");
278 node = g_node_append_data(pnode, mtitem);
279 } else {
280 mtitem = g_new0(MaxTreeItem, 1);
281 mtitem->l2id = 0xFFFF;
282 mtitem->id = id;
283 mtitem->text = g_strdup_printf("OUTOFTREE: 0x%04X", id);
284 node = g_node_append_data(tree, mtitem);
285 }
286 } else if(level > 2) {
287 mtitem = g_new0(MaxTreeItem, 1);
288 mtitem->l2id = 0xFFFF;
289 mtitem->id = id;
290 mtitem->text = g_strdup_printf("REGITEM: 0x%04X: %s",
291 id, chunk ? chunk->desc : "unknown");
292 node = g_node_append_data(tree, mtitem);
293 }
294
295 local = g_new0(MaxLocalData, 1);
296 local->id = (level > 2) ? id : 0x0000;
297 local->parentid = parentid;
298 local->nb = length - 6;
299 local->level = level + 1;
300 local->object = object;
301
302 if((level > 2) && chunk && chunk->callback)
303 chunk->callback(global, local);
304 if(level == 2) {
305 mtitem = pnode ? pnode->data : NULL;
306 max_create_l2_tree_object(global, local,
307 mtitem ? mtitem->object : NULL);
308 mtitem = node->data;
309 mtitem->object = local->object;
310 }
311
312 if(container)
313 while(local->nb > 0)
314 if(!max_read_chunk(global, &(local->nb), level + 1, id,
315 local->object, l2cnt, node))
316 return FALSE;
317
318 if(local->nb > 0)
319 g3d_stream_skip(global->stream, local->nb);
320
321 g_free(local);
322
323 g3d_context_update_interface(global->context);
324
325 if(level < 3)
326 g3d_context_update_progress_bar(global->context,
327 (G3DFloat)g3d_stream_tell(global->stream) /
328 (G3DFloat)g3d_stream_size(global->stream),
329 TRUE);
330
331 return TRUE;
332}
333
334static MaxChunk *max_get_chunk_desc(guint16 id, gint32 parentid,
335 gboolean container)
336{
337 MaxChunk *chunk, *chunks;
338 gint32 i;
339
340 if(container)
341 chunks = max_cnt_chunks;
342 else
343 chunks = max_chunks;
344
345 for(i = 0, chunk = &(chunks[i]); chunk->id != IDNONE;
346 i ++, chunk = &(chunks[i])) {
347 if((chunk->parentid == IDSOME) || (parentid == chunk->parentid) ||
348 (parentid == IDSOME) ||
349 ((chunk->parentid == IDROOT) && ID_IS_ROOT(parentid)) ||
350 ((chunk->parentid == IDGEOM) && ID_IS_GEOM(parentid)) ||
351 ((chunk->parentid == IDMATG) && ID_IS_MATG(parentid)) ||
352 ((chunk->parentid == IDFILE) && ID_IS_FILE(parentid))) {
353 if(chunk->id == id)
354 return chunk;
355 } /* parentid */
356 }
357 return NULL;
358}
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 @@
1/* $Id$ */
2
3/*
4 libg3d - 3D object loading library
5
6 Copyright (C) 2005-2009 Markus Dahms <mad@automagically.de>
7
8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Lesser General Public
10 License as published by the Free Software Foundation; either
11 version 2.1 of the License, or (at your option) any later version.
12
13 This library is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
17
18 You should have received a copy of the GNU Lesser General Public
19 License along with this library; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21*/
22
23#include <string.h>
24#include <g3d/material.h>
25#include <g3d/stream.h>
26#include <g3d/debug.h>
27
28#include "imp_max_callbacks.h"
29
30static gchar *max_read_wchar(G3DStream *stream, guint32 n)
31{
32 gint32 i;
33 gunichar2 *u16text;
34 gchar *text;
35 GError *error = NULL;
36
37 u16text = g_new0(gunichar2, n + 1);
38 for(i = 0; i < n; i ++) {
39 u16text[i] = g3d_stream_read_int16_le(stream);
40 }
41
42 text = g_utf16_to_utf8(u16text, n, NULL, NULL, &error);
43 if(error != NULL) {
44 g_warning("UTF-16 to UTF-8 conversion failed: %s",
45 error->message);
46 g_error_free(error);
47 }
48 g_free(u16text);
49
50 return text;
51}
52
53gboolean max_cb_debug_int32(MaxGlobalData *global, MaxLocalData *local)
54{
55 union {
56 gint32 i;
57 G3DFloat f;
58 } u;
59
60 while(local->nb >= 4) {
61 u.i = g3d_stream_read_int32_le(global->stream);
62 local->nb -= 4;
63#if DEBUG > 0
64 g_debug("|%s[D32] 0x%08x, %d, %.2f", debug_pad(local->level),
65 u.i, u.i, u.f);
66#endif
67 }
68 return TRUE;
69}
70
71gboolean max_cb_debug_wchars(MaxGlobalData *global, MaxLocalData *local)
72{
73 gchar *str;
74 guint32 len;
75
76 len = local->nb / 2;
77 str = max_read_wchar(global->stream, len);
78 local->nb -= len * 2;
79#if DEBUG > 0
80 g_debug("|%s[TEXT] %s (%d)", debug_pad(local->level),
81 str, len);
82#endif
83 g_free(str);
84
85 return TRUE;
86}
87
88gboolean max_cb_debug_string(MaxGlobalData *global, MaxLocalData *local)
89{
90 gchar *str;
91 guint32 len;
92
93 g_return_val_if_fail(local->nb >= 4, FALSE);
94 len = g3d_stream_read_int32_le(global->stream);
95 local->nb -= 4;
96 if(len > local->nb)
97 len = local->nb;
98
99 str = g_new0(gchar, len + 1);
100 g3d_stream_read(global->stream, str, len);
101 local->nb -= len;
102#if DEBUG > 0
103 g_debug("|%s[TEXT] %s (%d)", debug_pad(local->level),
104 str, len);
105#endif
106 g_free(str);
107
108 return TRUE;
109}
110
111gboolean max_cb_0x0001_0x0005(MaxGlobalData *global, MaxLocalData *local)
112{
113 gchar *str;
114 gint32 len, i, w3[3], cnt = 0;
115
116 if(local->nb < 4)
117 return FALSE;
118
119 /* flags? */
120 i = g3d_stream_read_int32_le(global->stream);
121 local->nb -= 4;
122
123#if DEBUG > 0
124 g_debug("|%s[PROP] 0x%08x", debug_pad(local->level), i);
125#endif
126
127 while(local->nb > 0) {
128 len = g3d_stream_read_int32_le(global->stream);
129 local->nb -= 4;
130 str = g_malloc0(len + 1);
131 g3d_stream_read(global->stream, str, len);
132 local->nb -= len;
133 for(i = 0; i < 3; i ++)
134 w3[i] = g3d_stream_read_int16_le(global->stream);
135 local->nb -= 6;
136 cnt ++;
137#if DEBUG > 0
138 g_debug("|%s[PROP] %04d: '%s' (%d bytes) [%d, %d, %d]",
139 debug_pad(local->level),
140 cnt, str, len,
141 w3[0], w3[1], w3[2]);
142#endif
143 g_free(str);
144 }
145 return TRUE;
146}
147
148gboolean max_cb_IDFILE_0x1201(MaxGlobalData *global, MaxLocalData *local)
149{
150 guint16 width, height;
151
152 width = g3d_stream_read_int16_le(global->stream);
153 height = g3d_stream_read_int16_le(global->stream);
154 local->nb -= 4;
155#if DEBUG > 0
156 g_debug("|%s[IMG] %u x %u", debug_pad(local->level), width, height);
157#endif
158 return TRUE;
159}
160
161/* vertex data */
162gboolean max_cb_0x08FE_0x0100(MaxGlobalData *global, MaxLocalData *local)
163{
164 guint32 num;
165 gint i, j;
166 G3DObject *object;
167
168 if(local->nb < 4)
169 return FALSE;
170
171 /* vertices */
172 num = g3d_stream_read_int32_le(global->stream);
173 local->nb -= 4;
174 object = (G3DObject *)local->object;
175 if(object == NULL) {
176 g_warning("MAX: 0x08FE::0x0100: no object");
177 return FALSE;
178 }
179
180#if DEBUG > 0
181 g_debug("|%s[VERT] %d vertices", debug_pad(local->level), num);
182#endif
183 global->vertex_offset = object->vertex_count;
184 object->vertex_count += num;
185 object->vertex_data = g_realloc(object->vertex_data,
186 object->vertex_count * 3 * sizeof(G3DFloat));
187
188 for(i = 0; i < num; i ++) {
189 if(local->nb < 16)
190 return FALSE;
191 g3d_stream_read_int32_le(global->stream); /* always 0 */
192 for(j = 0; j < 3; j ++)
193 object->vertex_data[(global->vertex_offset + i) * 3 + j] =
194 g3d_stream_read_float_le(global->stream);
195 local->nb -= 16;
196 }
197 return TRUE;
198}
199
200/* lines (vertex indices) */
201gboolean max_cb_0x08FE_0x010A(MaxGlobalData *global, MaxLocalData *local)
202{
203 guint32 num;
204 gint i, j;
205 guint32 v[3];
206
207 if(local->nb < 4)
208 return FALSE;
209
210 num = g3d_stream_read_int32_le(global->stream);
211 local->nb -= 4;
212
213#if DEBUG > 0
214 g_debug("|%s[LINE] %d lines", debug_pad(local->level), num);
215#endif
216 for(i = 0; i < num; i ++) {
217 if(local->nb < 12)
218 return FALSE;
219 for(j = 0; j < 3; j ++) {
220 v[j] = g3d_stream_read_int32_le(global->stream);
221 }
222 local->nb -= 12;
223
224#if DEBUG > 1
225 g_debug("|%s[LINE] 0x%08x: (%d => %d)", debug_pad(local->level),
226 v[0], v[1], v[2]);
227#endif
228 }
229 return TRUE;
230}
231
232/* polygon data */
233gboolean max_cb_0x08FE_0x011A(MaxGlobalData *global, MaxLocalData *local)
234{
235 gint32 i;
236 guint32 numpoly, type, numvert, cntpoly = 0;
237 G3DObject *object = (G3DObject *)local->object;
238 G3DFace *face;
239 G3DMaterial *material;
240
241 g_return_val_if_fail(local->nb >= 4, FALSE);
242 g_return_val_if_fail(object != NULL, FALSE);
243
244 material = (G3DMaterial *)g_slist_nth_data(global->model->materials,
245 (global->vertex_offset ? 1 : 0));
246 g_return_val_if_fail(material != NULL, FALSE);
247
248 numpoly = g3d_stream_read_int32_le(global->stream);
249 local->nb -= 4;
250#if DEBUG > 0
251 g_debug("|%s[POLY] %d polygons to read", debug_pad(local->level),
252 numpoly);
253#endif
254 while(local->nb >= 4) {
255 numvert = g3d_stream_read_int32_le(global->stream);
256 local->nb -= 4;
257#if DEBUG > 0
258 g_debug("|%s[POLY] %04d: %d vertices", debug_pad(local->level),
259 cntpoly, numvert);
260#endif
261 g_return_val_if_fail(numvert >= 3, FALSE);
262
263 face = g_new0(G3DFace, 1);
264 face->material = material;
265 face->vertex_count = numvert;
266 face->vertex_indices = g_new0(guint32, numvert);
267 object->faces = g_slist_append(object->faces, face);
268 for(i = 0; i < numvert; i ++) {
269 face->vertex_indices[i] =
270 global->vertex_offset +
271 g3d_stream_read_int32_le(global->stream);
272 local->nb -= 4;
273 g_return_val_if_fail(
274 face->vertex_indices[i] < object->vertex_count, FALSE);
275 }
276 type = g3d_stream_read_int16_le(global->stream);
277 local->nb -= 2;
278
279 if(type & 0xFFC6) {
280 g_warning("MAX: 0x011A: unhandled 0x%08x", type);
281#if DEBUG > 0
282 numvert = MIN(local->nb / 2, 20);
283 for(i = 0; i < numvert; i ++) {
284 g_debug("|%s[POLY] 0x%04x", debug_pad(local->level),
285 g3d_stream_read_int16_le(global->stream));
286 local->nb -= 2;
287 }
288#endif
289 return FALSE;
290 }
291
292 /* FIXME: order of additional data most likely wrong */
293 for(i = 3; i < numvert; i ++) {
294 g3d_stream_read_int32_le(global->stream);
295 g3d_stream_read_int32_le(global->stream);
296 local->nb -= 8;
297 }
298 if(type & 0x0001) {
299 g3d_stream_read_int32_le(global->stream);
300 local->nb -= 4;
301 }
302 if(type & 0x0008) {
303 g3d_stream_read_int16_le(global->stream);
304 local->nb -= 2;
305 }
306 if(type & 0x0010) {
307 g3d_stream_read_int32_le(global->stream);
308 local->nb -= 4;
309 }
310 cntpoly ++;
311 }
312#if DEBUG > 0
313 g_debug("|%s[POLY] %d faces added to object", debug_pad(local->level),
314 cntpoly);
315#endif
316 return TRUE;
317}
318
319/* texture vertices */
320gboolean max_cb_0x08FE_0x0128(MaxGlobalData *global, MaxLocalData *local)
321{
322 guint32 num;
323 G3DObject *object = (G3DObject *)local->object;
324
325 g_return_val_if_fail(local->nb >= 4, FALSE);
326 g_return_val_if_fail(object != NULL, FALSE);
327
328 num = g3d_stream_read_int32_le(global->stream);
329 local->nb -= 4;
330
331#if DEBUG > 0
332 g_debug("|%s[TEXV] %d texture vertices", debug_pad(local->level), num);
333#endif
334 return TRUE;
335}
336
337/* texture indices */
338gboolean max_cb_0x08FE_0x012B(MaxGlobalData *global, MaxLocalData *local)
339{
340 gint i;
341 guint32 *vdata, vcnt, maxidx = 0, numpoly = 0, maxvcnt = 0;
342#if 0
343 G3DObject *object = (G3DObject *)local->object;
344 G3DFace *face;
345
346 g_return_val_if_fail(object != NULL, FALSE);
347#endif
348
349 while(local->nb >= 4) {
350 vcnt = g3d_stream_read_int32_le(global->stream);
351 local->nb -= 4;
352 if(vcnt > maxvcnt)
353 maxvcnt = vcnt;
354#if 0
355 face = g_new0(G3DFace, 1);
356 face->vertex_count = vcnt;
357#endif
358 if(local->nb < (vcnt * 4)) {
359#if DEBUG > 0
360 g_debug("|%s[TIDX] %d polygons, max index: %d, max vcnt: %d "
361 "(nb=%d, vcnt=%d)", debug_pad(local->level),
362 numpoly, maxidx, maxvcnt, local->nb, vcnt);
363#endif
364
365 return FALSE;
366 }
367 vdata = g_new0(guint32, vcnt);
368 numpoly ++;
369 for(i = 0; i < vcnt; i ++) {
370 vdata[i] = g3d_stream_read_int32_le(global->stream);
371 local->nb -= 4;
372 if(vdata[i] > maxidx)
373 maxidx = vdata[i];
374 }
375#if 1
376 g_free(vdata);
377#endif
378 }
379#if DEBUG > 0
380 g_debug("|%s[TIDX] %d polygons, max index: %d, max vcnt: %d",
381 debug_pad(local->level), numpoly, maxidx, maxvcnt);
382#endif
383 return TRUE;
384}
385
386/* geometric object */
387gboolean max_cb_IDROOT_IDGEOM(MaxGlobalData *global, MaxLocalData *local)
388{
389 G3DObject *object;
390
391 object = g_new0(G3DObject, 1);
392 object->name = g_strdup_printf("0x%04X object @ 0x%08x",
393 local->id, (guint32)g3d_stream_tell(global->stream));
394 local->object = object;
395 global->model->objects = g_slist_append(global->model->objects, object);
396
397 global->object = object;
398 global->vertex_offset = 0;
399
400 return TRUE;
401}
402
403/* mesh */
404gboolean max_cb_IDGEOM_0x08FE(MaxGlobalData *global, MaxLocalData *local)
405{
406 g_return_val_if_fail(global->object != NULL, FALSE);
407 return TRUE;
408}
409
410/* object name */
411gboolean max_cb_IDGEOM_0x0962(MaxGlobalData *global, MaxLocalData *local)
412{
413 G3DObject *object = (G3DObject *)local->object;
414 gchar *name;
415 gint32 len;
416
417 g_return_val_if_fail(object != NULL, FALSE);
418
419 g_free(object->name);
420 len = local->nb / 2;
421 name = max_read_wchar(global->stream, len);
422 object->name = g_strdup_printf("%s (0x%08x)",
423 name, (guint32)g3d_stream_tell(global->stream) - len - 6);
424 g_free(name);
425#if DEBUG > 0
426 g_debug("|%s[NAME] %s", debug_pad(local->level), object->name);
427#endif
428 local->nb -= len * 2;
429
430 return TRUE;
431}
432
433/* single face */
434gboolean max_cb_0x0118_0x0110(MaxGlobalData *global, MaxLocalData *local)
435{
436 guint32 num;
437 gint i;
438 G3DObject *object = (G3DObject *)local->object;
439 G3DMaterial *mat;
440 G3DFace *face;
441
442 g_return_val_if_fail(local->nb >= 4, FALSE);
443 g_return_val_if_fail(object != NULL, FALSE);
444
445 mat = (G3DMaterial *)g_slist_nth_data(global->model->materials,
446 (global->vertex_offset ? 1 : 0));
447
448 num = g3d_stream_read_int32_le(global->stream);
449 local->nb -= 4;
450
451 face = g_new0(G3DFace, 1);
452 face->vertex_count = num;
453 face->vertex_indices = g_new0(guint32, num);
454 face->material = mat;
455 object->faces = g_slist_append(object->faces, face);
456
457 g_return_val_if_fail(local->nb >= (num * 4), FALSE);
458 for(i = 0; i < num; i ++) {
459 face->vertex_indices[i] =
460 global->vertex_offset +
461 g3d_stream_read_int32_le(global->stream);
462 local->nb -= 4;
463 if(face->vertex_indices[i] >= object->vertex_count) {
464 g_warning("MAX: 0x0118::0x0110: vertex index (%d) >= "
465 "vertex count (%d)",
466 face->vertex_indices[i],
467 object->vertex_count);
468 face->vertex_indices[i] = 0;
469 }
470 }
471 return TRUE;
472}
473
474/* triangles */
475gboolean max_cb_0x08FE_0x0912(MaxGlobalData *global, MaxLocalData *local)
476{
477 guint32 num;
478 gint i, j;
479 G3DObject *object;
480 G3DFace *face;
481 G3DMaterial *mat;
482
483 mat = (G3DMaterial *)g_slist_nth_data(global->model->materials,
484 (global->vertex_offset ? 1 : 0));
485
486 if(local->nb < 4)
487 return FALSE;
488
489 /* faces */
490 num = g3d_stream_read_int32_le(global->stream);
491 local->nb -= 4;
492 object = (G3DObject *)local->object;
493 if(object == NULL) {
494 g_warning("MAX: 0x08FE::0x0912: no object");
495 return FALSE;
496 }
497#if DEBUG > 0
498 g_debug("|%s[TRIS] %d triangles", debug_pad(local->level), num);
499#endif
500 for(i = 0; i < num; i ++) {
501 face = g_new0(G3DFace, 1);
502 face->vertex_count = 3;
503 face->vertex_indices = g_new0(guint32, 3);
504 face->material = mat;
505 object->faces = g_slist_append(object->faces, face);
506
507 if(local->nb < 20)
508 return FALSE;
509 for(j = 0; j < 3; j ++) {
510 face->vertex_indices[j] =
511 global->vertex_offset +
512 g3d_stream_read_int32_le(global->stream);
513 if(face->vertex_indices[j] >= object->vertex_count) {
514 g_warning("MAX: 0x08FE::0x0912: vertex index too high"
515 " (%d (0x%08x) >= %d)",
516 face->vertex_indices[j], face->vertex_indices[j],
517 object->vertex_count);
518 face->vertex_indices[j] = 0;
519 }
520 }
521 /* unknown for now */
522 g3d_stream_read_int32_le(global->stream);
523 g3d_stream_read_int32_le(global->stream);
524 local->nb -= 20;
525 }
526 return TRUE;
527}
528
529/* vertices */
530gboolean max_cb_0x08FE_0x0914(MaxGlobalData *global, MaxLocalData *local)
531{
532 guint32 num;
533 gint i, j;
534 G3DObject *object = (G3DObject *)local->object;
535
536 g_return_val_if_fail(local->nb >= 4, FALSE);
537 g_return_val_if_fail(object != NULL, FALSE);
538
539 /* vertices */
540 num = g3d_stream_read_int32_le(global->stream);
541 local->nb -= 4;
542#if DEBUG > 0
543 g_debug("|%s[VERT] %d vertices", debug_pad(local->level), num);
544#endif
545 global->vertex_offset = object->vertex_count;
546 object->vertex_count += num;
547 object->vertex_data = g_realloc(object->vertex_data,
548 object->vertex_count * 3 * sizeof(G3DFloat));
549
550 for(i = 0; i < num; i ++) {
551 if(local->nb < 12)
552 return FALSE;
553 for(j = 0; j < 3; j ++)
554 object->vertex_data[(global->vertex_offset + i) * 3 + j] =
555 g3d_stream_read_float_le(global->stream);
556 local->nb -= 12;
557 }
558 return TRUE;
559}
560
561/* texture vertices */
562gboolean max_cb_0x08FE_0x0916(MaxGlobalData *global, MaxLocalData *local)
563{
564 return max_cb_0x08FE_0x0128(global, local);
565}
566
567/* texture triangles */
568gboolean max_cb_0x08FE_0x0918(MaxGlobalData *global, MaxLocalData *local)
569{
570 guint32 cnttris = 0;
571
572 while(local->nb >= 12) {
573 cnttris ++;
574
575 g3d_stream_read_int32_le(global->stream);
576 g3d_stream_read_int32_le(global->stream);
577 g3d_stream_read_int32_le(global->stream);
578 local->nb -= 12;
579 }
580
581#if DEBUG > 0
582 g_debug("|%s[TEXI] %d textured triangles (%d bytes left)",
583 debug_pad(local->level), cnttris, local->nb);
584#endif
585 return 0;
586}
587
588/* vertices */
589gboolean max_cb_0x08FE_0x2394(MaxGlobalData *global, MaxLocalData *local)
590{
591 return max_cb_0x08FE_0x0914(global, local);
592}
593
594/* triangles */
595gboolean max_cb_0x08FE_0x2396(MaxGlobalData *global, MaxLocalData *local)
596{
597 guint32 num;
598 gint32 i, j;
599 G3DObject *object = (G3DObject *)local->object;
600 G3DFace *face;
601 G3DMaterial *mat;
602
603 mat = (G3DMaterial *)g_slist_nth_data(global->model->materials,
604 (global->vertex_offset ? 1 : 0));
605
606 g_return_val_if_fail(local->nb >= 4, FALSE);
607 g_return_val_if_fail(object != NULL, FALSE);
608
609 /* faces */
610 num = g3d_stream_read_int32_le(global->stream);
611 local->nb -= 4;
612#if DEBUG > 0
613 g_debug("|%s[TRIS] %d triangles", debug_pad(local->level), num);
614#endif
615 for(i = 0; i < num; i ++) {
616 g_return_val_if_fail(local->nb >= 12, FALSE);
617
618 face = g_new0(G3DFace, 1);
619 face->vertex_count = 3;
620 face->vertex_indices = g_new0(guint32, 3);
621 face->material = mat;
622 object->faces = g_slist_append(object->faces, face);
623
624 g_return_val_if_fail(local->nb >= 12, FALSE);
625 for(j = 0; j < 3; j ++) {
626 face->vertex_indices[j] =
627 global->vertex_offset +
628 g3d_stream_read_int32_le(global->stream);
629 local->nb -= 4;
630 if(face->vertex_indices[j] >= object->vertex_count) {
631 g_warning("MAX: 0x08FE::0x2396: vertex index too high"
632 " (%d (0x%08x) >= %d)",
633 face->vertex_indices[j], face->vertex_indices[j],
634 object->vertex_count);
635 face->vertex_indices[j] = 0;
636 }
637 }
638 }
639 return TRUE;
640}
641
642/* material */
643gboolean max_cb_IDMATG_0x4000(MaxGlobalData *global, MaxLocalData *local)
644{
645 G3DMaterial *material;
646
647 if(strcmp(global->subfile, "Scene") != 0)
648 return FALSE;
649
650 material = g3d_material_new();
651 material->name = g_strdup_printf("0x4000 material @ 0x%08x",
652 (guint32)g3d_stream_tell(global->stream));
653 local->object = material;
654 global->model->materials = g_slist_append(global->model->materials,
655 material);
656 return TRUE;
657}
658
659/* material name */
660gboolean max_cb_0x4000_0x4001(MaxGlobalData *global, MaxLocalData *local)
661{
662 guint32 len;
663 G3DMaterial *material = (G3DMaterial *)local->object;
664
665 g_return_val_if_fail(material != NULL, FALSE);
666 if(material->name)
667 g_free(material->name);
668 len = local->nb / 2;
669 material->name = max_read_wchar(global->stream, len);
670 local->nb -= len * 2;
671#if DEBUG > 0
672 g_debug("|%s[MATN] %s", debug_pad(local->level), material->name);
673#endif
674 return TRUE;
675}
676
677/* material color */
678gboolean max_cb_0x4000_0x4030(MaxGlobalData *global, MaxLocalData *local)
679{
680 G3DMaterial *material = (G3DMaterial *)local->object;
681
682 g_return_val_if_fail(material != NULL, FALSE);
683 g_return_val_if_fail(local->nb >= 16, FALSE);
684
685 material->r = g3d_stream_read_float_le(global->stream);
686 material->g = g3d_stream_read_float_le(global->stream);
687 material->b = g3d_stream_read_float_le(global->stream);
688 material->a = g3d_stream_read_float_le(global->stream);
689 local->nb -= 16;
690#if DEBUG > 0
691 g_debug("|%s[MATC] %.2f, %.2f, %.2f, %.2f", debug_pad(local->level),
692 material->r, material->g, material->b, material->a);
693#endif
694 return TRUE;
695}
696
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 @@
1/* $Id$ */
2
3/*
4 libg3d - 3D object loading library
5
6 Copyright (C) 2005-2009 Markus Dahms <mad@automagically.de>
7
8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Lesser General Public
10 License as published by the Free Software Foundation; either
11 version 2.1 of the License, or (at your option) any later version.
12
13 This library is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
17
18 You should have received a copy of the GNU Lesser General Public
19 License along with this library; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21*/
22#ifndef _IMP_MAX_CALLBACKS_H
23#define _IMP_MAX_CALLBACKS_H
24
25#include <stdio.h>
26#include <glib.h>
27#include <g3d/types.h>
28
29typedef struct {
30 G3DContext *context;
31 G3DModel *model;
32 G3DStream *stream;
33 const gchar *subfile;
34
35 G3DObject *object;
36 guint32 vertex_offset;
37} MaxGlobalData;
38
39typedef struct {
40 guint16 id;
41 gint32 parentid;
42 guint16 level;
43 gint32 nb;
44 gpointer object;
45} MaxLocalData;
46
47typedef gboolean (* MaxCallback)(MaxGlobalData *global, MaxLocalData *local);
48
49/* callbacks */
50
51gboolean max_cb_debug_int32(MaxGlobalData *global, MaxLocalData *local);
52gboolean max_cb_debug_string(MaxGlobalData *global, MaxLocalData *local);
53gboolean max_cb_debug_wchars(MaxGlobalData *global, MaxLocalData *local);
54
55gboolean max_cb_IDROOT_IDGEOM(MaxGlobalData *global, MaxLocalData *local);
56gboolean max_cb_IDMATG_0x4000(MaxGlobalData *global, MaxLocalData *local);
57
58gboolean max_cb_IDGEOM_0x08FE(MaxGlobalData *global, MaxLocalData *local);
59gboolean max_cb_IDGEOM_0x0962(MaxGlobalData *global, MaxLocalData *local);
60
61gboolean max_cb_IDFILE_0x1201(MaxGlobalData *global, MaxLocalData *local);
62
63gboolean max_cb_0x0001_0x0005(MaxGlobalData *global, MaxLocalData *local);
64
65gboolean max_cb_0x0118_0x0110(MaxGlobalData *global, MaxLocalData *local);
66
67gboolean max_cb_0x08FE_0x0100(MaxGlobalData *global, MaxLocalData *local);
68gboolean max_cb_0x08FE_0x010A(MaxGlobalData *global, MaxLocalData *local);
69gboolean max_cb_0x08FE_0x011A(MaxGlobalData *global, MaxLocalData *local);
70gboolean max_cb_0x08FE_0x0128(MaxGlobalData *global, MaxLocalData *local);
71gboolean max_cb_0x08FE_0x012B(MaxGlobalData *global, MaxLocalData *local);
72gboolean max_cb_0x08FE_0x0912(MaxGlobalData *global, MaxLocalData *local);
73gboolean max_cb_0x08FE_0x0914(MaxGlobalData *global, MaxLocalData *local);
74gboolean max_cb_0x08FE_0x0916(MaxGlobalData *global, MaxLocalData *local);
75gboolean max_cb_0x08FE_0x0918(MaxGlobalData *global, MaxLocalData *local);
76gboolean max_cb_0x08FE_0x2394(MaxGlobalData *global, MaxLocalData *local);
77gboolean max_cb_0x08FE_0x2396(MaxGlobalData *global, MaxLocalData *local);
78
79gboolean max_cb_0x4000_0x4001(MaxGlobalData *global, MaxLocalData *local);
80gboolean max_cb_0x4000_0x4030(MaxGlobalData *global, MaxLocalData *local);
81
82#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 @@
1/* $Id$ */
2
3/*
4 libg3d - 3D object loading library
5
6 Copyright (C) 2005-2009 Markus Dahms <mad@automagically.de>
7
8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Lesser General Public
10 License as published by the Free Software Foundation; either
11 version 2.1 of the License, or (at your option) any later version.
12
13 This library is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
17
18 You should have received a copy of the GNU Lesser General Public
19 License along with this library; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21*/
22#ifndef _IMP_MAX_CHUNKS_H
23#define _IMP_MAX_CHUNKS_H
24
25#include <glib.h>
26
27#include "imp_max_callbacks.h"
28
29#define IDNONE -1
30#define IDSOME -2
31#define IDROOT -3
32#define IDGEOM -4
33#define IDMATG -5
34#define IDFILE -6
35
36#define ID_IS_ROOT(pid) \
37 (((pid) == 0x2001) || ((pid) == 0x2003) || ((pid) == 0x2004) || \
38 ((pid) == 0x2006) || ((pid) == 0x2008) || ((pid) == 0x2009) || \
39 ((pid) == 0x200A) || ((pid) == 0x200B))
40#define ID_IS_GEOM(pid) \
41 ((((pid) >= 0x0010) && ((pid) <= 0x0011)) || \
42 (((pid) >= 0x0013) && ((pid) <= 0x0014)) || \
43 (((pid) >= 0x0016) && ((pid) <= 0x001C)) || \
44 ((pid) == 0x0023) || ((pid) == 0x0026))
45#define ID_IS_MATG(pid) \
46 (((pid) == 0x0002) || \
47 (((pid) >= 0x0004) && ((pid) <= 0x000F)))
48#define ID_IS_FILE(pid) \
49 (((pid) == 0x0003) || ((pid) == 0x0400))
50
51typedef struct {
52 gint32 id;
53 gint32 parentid;
54 char *desc;
55 MaxCallback callback;
56} MaxChunk;
57
58/* container chunks */
59static MaxChunk max_cnt_chunks[] = {
60 { 0x0118, 0x08FE, "face", NULL },
61
62 { 0x08FE, IDGEOM, "mesh", max_cb_IDGEOM_0x08FE },
63 { 0x0901, IDGEOM, "matrix or not", NULL },
64 { 0x0906, IDGEOM, "matrix or not", NULL },
65
66 { 0x092C, 0x08FE, "mesh bit map group", NULL },
67 { 0x092D, 0x08FE, "mesh bit map group", NULL },
68 { 0x092E, 0x08FE, "mesh bit map group", NULL },
69
70 { 0x2001, IDNONE, "3ds MAX x.x root node", NULL },
71 { 0x2003, IDNONE, "3ds MAX x.x root node", NULL },
72 { 0x2004, IDNONE, "3ds MAX 3.x root node", NULL },
73 { 0x2006, IDNONE, "3ds MAX 4.x root node", NULL },
74 { 0x2008, IDNONE, "3ds MAX 5.x root node", NULL },
75 { 0x2009, IDNONE, "3ds MAX 6.x root node", NULL },
76 { 0x200A, IDNONE, "3ds MAX 7.x root node", NULL },
77 { 0x200B, IDNONE, "3ds MAX 8.x root node", NULL },
78 { 0x2038, IDNONE, "DLL directory entry", NULL },
79 { 0x2040, IDNONE, "class directory entry", NULL },
80 { 0x2100, IDNONE, "class data entry", NULL },
81
82 { 0x4000, IDMATG, "material group", max_cb_IDMATG_0x4000 },
83
84 { IDNONE, IDSOME, NULL, NULL }
85};
86
87/* data chunks */
88static MaxChunk max_chunks[] = {
89 /* IDGEOM */
90 { 0x08FF, IDGEOM, "mesh something", max_cb_debug_int32 },
91 { 0x0900, IDGEOM, "object something", max_cb_debug_int32 },
92 { 0x0902, IDGEOM, "object something", max_cb_debug_int32 },
93 { 0x0903, IDGEOM, "object something", max_cb_debug_int32 },
94 { 0x0904, IDGEOM, "object something", max_cb_debug_int32 },
95 { 0x0960, IDGEOM, "object something", max_cb_debug_int32 },
96 { 0x0962, IDGEOM, "object name", max_cb_IDGEOM_0x0962 },
97 { 0x0963, IDGEOM, "object something", max_cb_debug_int32 },
98 { 0x096A, IDGEOM, "object something", max_cb_debug_int32 },
99 { 0x096B, IDGEOM, "object something", max_cb_debug_int32 },
100 { 0x096C, IDGEOM, "object something", max_cb_debug_int32 },
101 { 0x0974, IDGEOM, "object something", max_cb_debug_int32 },
102 { 0x0975, IDGEOM, "object flag", NULL },
103 { 0x0978, IDGEOM, "object flag", NULL },
104 { 0x099C, IDGEOM, "object something", max_cb_debug_int32 },
105 { 0x09BA, IDGEOM, "object flag", NULL },
106 { 0x09CE, IDGEOM, "object something", max_cb_debug_int32 },
107 { 0x0A28, IDGEOM, "object something", max_cb_debug_int32 },
108 { 0x0A32, IDGEOM, "object something", max_cb_debug_int32 },
109 { 0x0ABE, IDGEOM, "object something", max_cb_debug_int32 },
110 { 0x2500, IDGEOM, "object something", max_cb_debug_int32 },
111 { 0x2501, IDGEOM, "object something", max_cb_debug_int32 },
112 { 0x2505, IDGEOM, "object something", max_cb_debug_int32 },
113 { 0x2532, IDGEOM, "object something", max_cb_debug_int32 },
114 { 0x3002, IDGEOM, "object something", max_cb_debug_int32 },
115 { 0x3003, IDGEOM, "object something", max_cb_debug_int32 },
116 { 0x3005, IDGEOM, "object something", max_cb_debug_int32 },
117 { 0x4020, IDGEOM, "object something", max_cb_debug_int32 },
118 { 0x4024, IDGEOM, "object something", max_cb_debug_int32 },
119 { 0x4025, IDGEOM, "object something", max_cb_debug_int32 },
120 { 0x4026, IDGEOM, "object something", max_cb_debug_int32 },
121 { 0x402C, IDGEOM, "object something", max_cb_debug_int32 },
122 { 0x402D, IDGEOM, "object something", max_cb_debug_int32 },
123 { 0x4030, IDGEOM, "object something", max_cb_debug_int32 },
124 { 0x4034, IDGEOM, "object something", max_cb_debug_int32 },
125 { 0x4038, IDGEOM, "object something", max_cb_debug_int32 },
126 { 0x403B, IDGEOM, "object something", max_cb_debug_int32 },
127 { 0x7230, IDGEOM, "object something", max_cb_debug_int32 },
128 { 0x7231, IDGEOM, "object something", max_cb_debug_int32 },
129 /* IDMATG */
130 { 0x5300, IDMATG, "material something", max_cb_debug_int32 },
131 /* IDFILE */
132 { 0x1201, IDFILE, "file dimensions + unknown", max_cb_IDFILE_0x1201 },
133 { 0x1230, IDFILE, "file name", max_cb_debug_wchars },
134 { 0x1240, IDFILE, "file type", max_cb_debug_wchars },
135 /* 0x0000 */
136 { 0x0005, 0x0000, "[DEBUG] big chunk", NULL },
137 { 0x0009, 0x0000, "[DEBUG] 16", max_cb_debug_int32 },
138 { 0x000A, 0x0000, "[DEBUG] 3n, 11", NULL },
139 { 0x000B, 0x0000, "[DEBUG] 24", max_cb_debug_int32 },
140 { 0x000C, 0x0000, "[DEBUG] 10", NULL },
141 { 0x2035, 0x0000, "[DEBUG] n * 4", max_cb_debug_int32 },
142 /* 0x0001 */
143 { 0x0005, 0x0001, "properties", max_cb_0x0001_0x0005 },
144 { 0x1000, 0x0003, "[DEBUG] 4", max_cb_debug_int32 },
145 { 0x2045, 0x0001, "[DEBUG] 4", max_cb_debug_int32 },
146 /* 0x0002 */
147 { 0x2045, 0x0002, "[DEBUG] 4", max_cb_debug_int32 },
148 /* 0x0003 */
149 { 0x2045, 0x0003, "[DEBUG] 4", max_cb_debug_int32 },
150 { 0x1030, 0x0003, "[DEBUG] 4", max_cb_debug_int32 },
151 { 0x1040, 0x0003, "[DEBUG] 4", max_cb_debug_int32 },
152 /* 0x0004 */
153 { 0x2035, 0x0004, "[DEBUG] n * 4", max_cb_debug_int32 },
154 { 0x2500, 0x0004, "[DEBUG] 8", max_cb_debug_int32 },
155 { 0x2501, 0x0004, "[DEBUG] 4", max_cb_debug_int32 },
156 { 0x2532, 0x0004, "[DEBUG] flag", NULL },
157 { 0x2533, 0x0004, "[DEBUG] flag", NULL },
158 { 0x2534, 0x0004, "[DEBUG] flag", NULL },
159 { 0x3002, 0x0004, "[DEBUG] 4", max_cb_debug_int32 },
160 { 0x3003, 0x0004, "[DEBUG] 8", max_cb_debug_int32 },
161 { 0x3005, 0x0004, "[DEBUG] 4", max_cb_debug_int32 },
162 /* 0x0010 */
163 { 0x0962, 0x0010, "name", max_cb_debug_wchars },
164 /* 0x0013 */
165 { 0x1000, 0x0013, "text", max_cb_debug_string },
166 /* 0x0019 */
167 { 0x0110, 0x0019, "name", max_cb_debug_wchars },
168 { 0x0120, 0x0019, "name", max_cb_debug_wchars },
169 /* 0x0022 */
170 { 0x0110, 0x0022, "text", max_cb_debug_wchars },
171 { 0x0120, 0x0022, "type data", max_cb_debug_int32 },
172 { 0x0130, 0x0022, "type data", max_cb_debug_int32 },
173 /* 0x0027 */
174 { 0x0110, 0x0027, "text", max_cb_debug_wchars },
175 /* 0x002C */
176 { 0x0110, 0x002C, "text", max_cb_debug_wchars },
177 /* 0x002E */
178 { 0x0110, 0x002E, "text", max_cb_debug_wchars },
179 { 0x0120, 0x002E, "type data", max_cb_debug_int32 },
180 { 0x0130, 0x002E, "type data", max_cb_debug_int32 },
181 { 0x0140, 0x002E, "type data", max_cb_debug_int32 },
182 /* 0x0110 */
183 { 0x0120, 0x0110, "something", max_cb_debug_int32 },
184 { 0x0130, 0x0110, "something", max_cb_debug_int32 },
185 /* 0x0118 */
186 { 0x0100, 0x0118, "face data", max_cb_debug_int32 },
187 { 0x0110, 0x0118, "face indices", max_cb_0x0118_0x0110 },
188
189 /* 0x08FE */
190 { 0x0100, 0x08FE, "vertices", max_cb_0x08FE_0x0100 },
191 { 0x0108, 0x08FE, "mesh data", max_cb_debug_int32 },
192 { 0x010A, 0x08FE, "lines", max_cb_0x08FE_0x010A },
193 { 0x0110, 0x08FE, "[DEBUG] 4", max_cb_debug_int32 },
194 { 0x0114, 0x08FE, "[DEBUG] 4", max_cb_debug_int32 },
195 { 0x011A, 0x08FE, "polygons", max_cb_0x08FE_0x011A },
196 { 0x0120, 0x08FE, "[DEBUG] 4", max_cb_debug_int32 },
197 { 0x0124, 0x08FE, "[DEBUG] 4", max_cb_debug_int32 },
198 { 0x0128, 0x08FE, "texture vertices", max_cb_0x08FE_0x0128 },
199 { 0x012B, 0x08FE, "texture indices", max_cb_0x08FE_0x012B },
200 { 0x0130, 0x08FE, "[DEBUG] 4", max_cb_debug_int32 },
201 { 0x0140, 0x08FE, "[DEBUG] 4", max_cb_debug_int32 },
202 { 0x0150, 0x08FE, "[DEBUG] 4", max_cb_debug_int32 },
203 { 0x0906, 0x08FE, "mesh something", max_cb_debug_int32 },
204 { 0x0908, 0x08FE, "mesh something", max_cb_debug_int32 },
205 { 0x0912, 0x08FE, "triangles", max_cb_0x08FE_0x0912 },
206 { 0x0914, 0x08FE, "vertices", max_cb_0x08FE_0x0914 },
207 { 0x0916, 0x08FE, "texture vertices", max_cb_0x08FE_0x0916 },
208 { 0x0918, 0x08FE, "texture indices (tris)", max_cb_0x08FE_0x0918 },
209 { 0x0924, 0x08FE, "mesh something", max_cb_debug_int32 },
210 { 0x0928, 0x08FE, "mesh something", max_cb_debug_int32 },
211 { 0x092A, 0x08FE, "mesh something", max_cb_debug_int32 },
212 { 0x0959, 0x08FE, "mesh something", max_cb_debug_int32 },
213 { 0x2394, 0x08FE, "vertices", max_cb_0x08FE_0x2394 },
214 { 0x2396, 0x08FE, "triangles", max_cb_0x08FE_0x2396 },
215 { 0x2398, 0x08FE, "mesh something", max_cb_debug_int32 },
216 /* 0x0901 */
217 { 0x300D, 0x0901, "x32", max_cb_debug_int32 },
218 { 0x300E, 0x0901, "x32", max_cb_debug_int32 },
219 { 0x300F, 0x0901, "x32", max_cb_debug_int32 },
220 { 0x3010, 0x0901, "x32", max_cb_debug_int32 },
221 { 0x3012, 0x0901, "x32", max_cb_debug_int32 },
222 { 0x3013, 0x0901, "x32", max_cb_debug_int32 },
223 { 0x3014, 0x0901, "x32", max_cb_debug_int32 },
224 { 0x3015, 0x0901, "x32", max_cb_debug_int32 },
225 { 0x3016, 0x0901, "x32", max_cb_debug_int32 },
226 { 0x3017, 0x0901, "x32", max_cb_debug_int32 },
227 { 0x3019, 0x0901, "x32", max_cb_debug_int32 },
228 { 0x301A, 0x0901, "x32", max_cb_debug_int32 },
229 { 0x301B, 0x0901, "x32", max_cb_debug_int32 },
230 { 0x301C, 0x0901, "x32", max_cb_debug_int32 },
231 { 0x301D, 0x0901, "x32", max_cb_debug_int32 },
232 { 0x301E, 0x0901, "x32", max_cb_debug_int32 },
233 /* 0x0906 */
234 { 0x300D, 0x0906, "x32", max_cb_debug_int32 },
235 { 0x300E, 0x0906, "x32", max_cb_debug_int32 },
236 { 0x300F, 0x0906, "x32", max_cb_debug_int32 },
237 { 0x3010, 0x0906, "x32", max_cb_debug_int32 },
238 { 0x3012, 0x0906, "x32", max_cb_debug_int32 },
239 { 0x3013, 0x0906, "x32", max_cb_debug_int32 },
240 { 0x3014, 0x0906, "x32", max_cb_debug_int32 },
241 { 0x3015, 0x0906, "x32", max_cb_debug_int32 },
242 { 0x3016, 0x0906, "x32", max_cb_debug_int32 },
243 { 0x3017, 0x0906, "x32", max_cb_debug_int32 },
244 { 0x3019, 0x0906, "x32", max_cb_debug_int32 },
245 { 0x301A, 0x0906, "x32", max_cb_debug_int32 },
246 { 0x301B, 0x0906, "x32", max_cb_debug_int32 },
247 { 0x301C, 0x0906, "x32", max_cb_debug_int32 },
248 { 0x301D, 0x0906, "x32", max_cb_debug_int32 },
249 { 0x301E, 0x0906, "x32", max_cb_debug_int32 },
250 /* 0x092C */
251 { 0x2700, 0x092C, "bit map", NULL },
252 /* 0x092D */
253 { 0x2700, 0x092D, "bit map", NULL },
254 /* 0x092E */
255 { 0x2700, 0x092E, "bit map", NULL },
256 /* 0x0AF0 */
257 { 0x0001, 0x0AF0, "something", max_cb_debug_int32 },
258 { 0x0002, 0x0AF0, "something", max_cb_debug_int32 },
259 { 0x0003, 0x0AF0, "something", max_cb_debug_int32 },
260 { 0x0004, 0x0AF0, "something", max_cb_debug_int32 },
261 { 0x0005, 0x0AF0, "something", max_cb_debug_int32 },
262 { 0x0006, 0x0AF0, "something", max_cb_debug_int32 },
263 { 0x0007, 0x0AF0, "something", max_cb_debug_int32 },
264 { 0x0008, 0x0AF0, "something", max_cb_debug_int32 },
265 /* 2500 */
266 { 0x2510, 0x2500, "something", max_cb_debug_int32 },
267 { 0x2511, 0x2500, "something", max_cb_debug_int32 },
268 { 0x2513, 0x2500, "something", max_cb_debug_int32 },
269 /* 2512 */
270 { 0x0530, 0x2512, "something", max_cb_debug_int32 },
271 { 0x0540, 0x2512, "something", max_cb_debug_int32 },
272 { 0x0550, 0x2512, "something", max_cb_debug_int32 },
273 { 0x0560, 0x2512, "something", max_cb_debug_int32 },
274 /* 0x39BF */
275 { 0x0100, 0x39BF, "text", max_cb_debug_wchars },
276 /* 0x4000 */
277 { 0x4001, 0x4000, "material name", max_cb_0x4000_0x4001 },
278 { 0x4003, 0x4000, "material something (4)", max_cb_debug_int32 },
279 { 0x4020, 0x4000, "material something (4)", max_cb_debug_int32 },
280 { 0x4030, 0x4000, "material color", max_cb_0x4000_0x4030 },
281
282 /* IDSOME */
283 { 0x2034, IDSOME, "init something", max_cb_debug_int32 },
284 { 0x2035, IDSOME, "init something", max_cb_debug_int32 },
285
286 { IDNONE, IDSOME, NULL, NULL }
287};
288
289#endif /* _IMP_MAX_CHUNKS_H */