diff options
Diffstat (limited to '')
8 files changed, 2058 insertions, 0 deletions
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_lwo/Makefile b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_lwo/Makefile new file mode 100644 index 0000000..54c1aef --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_lwo/Makefile | |||
@@ -0,0 +1,512 @@ | |||
1 | # Makefile.in generated by automake 1.10.1 from Makefile.am. | ||
2 | # plugins/import/imp_lwo/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 | |||
18 | pkgdatadir = $(datadir)/libg3d | ||
19 | pkglibdir = $(libdir)/libg3d | ||
20 | pkgincludedir = $(includedir)/libg3d | ||
21 | am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd | ||
22 | install_sh_DATA = $(install_sh) -c -m 644 | ||
23 | install_sh_PROGRAM = $(install_sh) -c | ||
24 | install_sh_SCRIPT = $(install_sh) -c | ||
25 | INSTALL_HEADER = $(INSTALL_DATA) | ||
26 | transform = $(program_transform_name) | ||
27 | NORMAL_INSTALL = : | ||
28 | PRE_INSTALL = : | ||
29 | POST_INSTALL = : | ||
30 | NORMAL_UNINSTALL = : | ||
31 | PRE_UNINSTALL = : | ||
32 | POST_UNINSTALL = : | ||
33 | build_triplet = x86_64-unknown-linux-gnu | ||
34 | host_triplet = x86_64-unknown-linux-gnu | ||
35 | subdir = plugins/import/imp_lwo | ||
36 | DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in | ||
37 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 | ||
38 | am__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 | ||
43 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ | ||
44 | $(ACLOCAL_M4) | ||
45 | mkinstalldirs = $(install_sh) -d | ||
46 | CONFIG_HEADER = $(top_builddir)/include/g3d/config.h | ||
47 | CONFIG_CLEAN_FILES = | ||
48 | am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; | ||
49 | am__vpath_adj = case $$p in \ | ||
50 | $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ | ||
51 | *) f=$$p;; \ | ||
52 | esac; | ||
53 | am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; | ||
54 | am__installdirs = "$(DESTDIR)$(pluginimpdir)" | ||
55 | pluginimpLTLIBRARIES_INSTALL = $(INSTALL) | ||
56 | LTLIBRARIES = $(pluginimp_LTLIBRARIES) | ||
57 | imp_lwo_la_DEPENDENCIES = $(top_builddir)/src/libg3d.la | ||
58 | am_imp_lwo_la_OBJECTS = imp_lwo.lo imp_lwo_callbacks.lo | ||
59 | imp_lwo_la_OBJECTS = $(am_imp_lwo_la_OBJECTS) | ||
60 | DEFAULT_INCLUDES = -I. -I$(top_builddir)/include/g3d | ||
61 | depcomp = $(SHELL) $(top_srcdir)/config/depcomp | ||
62 | am__depfiles_maybe = depfiles | ||
63 | COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ | ||
64 | $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) | ||
65 | LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ | ||
66 | --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ | ||
67 | $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) | ||
68 | CCLD = $(CC) | ||
69 | LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ | ||
70 | --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ | ||
71 | $(LDFLAGS) -o $@ | ||
72 | SOURCES = $(imp_lwo_la_SOURCES) | ||
73 | DIST_SOURCES = $(imp_lwo_la_SOURCES) | ||
74 | ETAGS = etags | ||
75 | CTAGS = ctags | ||
76 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) | ||
77 | ACLOCAL = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run aclocal-1.10 | ||
78 | AMTAR = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run tar | ||
79 | AR = ar | ||
80 | AS = as | ||
81 | AUTOCONF = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run autoconf | ||
82 | AUTOHEADER = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run autoheader | ||
83 | AUTOMAKE = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run automake-1.10 | ||
84 | AWK = gawk | ||
85 | CC = gcc | ||
86 | CCDEPMODE = depmode=gcc3 | ||
87 | CFLAGS = -g -O2 | ||
88 | CPP = gcc -E | ||
89 | CPPFLAGS = | ||
90 | CXX = g++ | ||
91 | CXXCPP = g++ -E | ||
92 | CXXDEPMODE = depmode=gcc3 | ||
93 | CXXFLAGS = -g -O2 | ||
94 | CYGPATH_W = echo | ||
95 | DBG_CFLAGS = -O2 | ||
96 | DEBUG = 0 | ||
97 | DEFS = -DHAVE_CONFIG_H | ||
98 | DEPDIR = .deps | ||
99 | DLLTOOL = dlltool | ||
100 | ECHO = echo | ||
101 | ECHO_C = | ||
102 | ECHO_N = -n | ||
103 | ECHO_T = | ||
104 | EGREP = /bin/grep -E | ||
105 | EXEEXT = | ||
106 | F77 = | ||
107 | FFLAGS = | ||
108 | 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 | ||
109 | 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 | ||
110 | GLIB_CFLAGS = -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include | ||
111 | GLIB_GENMARSHAL = glib-genmarshal | ||
112 | GLIB_LIBS = -Wl,--export-dynamic -pthread -lgmodule-2.0 -lrt -lgobject-2.0 -lglib-2.0 | ||
113 | GLIB_MKENUMS = glib-mkenums | ||
114 | GOBJECT_QUERY = gobject-query | ||
115 | GREP = /bin/grep | ||
116 | GTKDOC_CHECK = /usr/bin/gtkdoc-check | ||
117 | 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 | ||
118 | 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 | ||
119 | HTML_DIR = ${datadir}/gtk-doc/html | ||
120 | INSTALL = /usr/bin/install -c | ||
121 | INSTALL_DATA = ${INSTALL} -m 644 | ||
122 | INSTALL_PROGRAM = ${INSTALL} | ||
123 | INSTALL_SCRIPT = ${INSTALL} | ||
124 | INSTALL_STRIP_PROGRAM = $(install_sh) -c -s | ||
125 | LDFLAGS = | ||
126 | LEX = flex | ||
127 | LEXLIB = -lfl | ||
128 | LEX_OUTPUT_ROOT = lex.yy | ||
129 | 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 | ||
130 | LIBGSF_LIBS = -lgsf-1 -lgobject-2.0 -lxml2 -lglib-2.0 | ||
131 | LIBOBJS = | ||
132 | LIBS = -lm | ||
133 | LIBTOOL = $(SHELL) $(top_builddir)/libtool --quiet | ||
134 | LIBXML2_CFLAGS = -I/usr/include/libxml2 | ||
135 | LIBXML2_LIBS = -L/usr/lib/x86_64-linux-gnu -lxml2 | ||
136 | LN_S = ln -s | ||
137 | LTLIBOBJS = | ||
138 | LTVERSION = 0:8:0 | ||
139 | MAGIC_LIBS = -lmagic | ||
140 | MAKEINFO = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run makeinfo | ||
141 | MATH_LIBS = -lm | ||
142 | MKDIR_P = /bin/mkdir -p | ||
143 | OBJDUMP = objdump | ||
144 | OBJEXT = o | ||
145 | PACKAGE = libg3d | ||
146 | PACKAGE_BUGREPORT = | ||
147 | PACKAGE_NAME = | ||
148 | PACKAGE_STRING = | ||
149 | PACKAGE_TARNAME = | ||
150 | PACKAGE_VERSION = | ||
151 | PATH_SEPARATOR = : | ||
152 | PKG_CONFIG = /usr/bin/pkg-config | ||
153 | PLUGINS_LDFLAGS = -avoid-version -export-dynamic | ||
154 | RANLIB = ranlib | ||
155 | SET_MAKE = | ||
156 | SHELL = /bin/bash | ||
157 | STRIP = strip | ||
158 | VERSION = 0.0.8 | ||
159 | XML2_CONFIG = /usr/bin/xml2-config | ||
160 | XML_CPPFLAGS = -I/usr/include/libxml2 | ||
161 | XML_LIBS = -L/usr/lib/x86_64-linux-gnu -lxml2 | ||
162 | Z_CFLAGS = | ||
163 | Z_LIBS = -lz | ||
164 | abs_builddir = /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_lwo | ||
165 | abs_srcdir = /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_lwo | ||
166 | abs_top_builddir = /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8 | ||
167 | abs_top_srcdir = /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8 | ||
168 | ac_ct_CC = gcc | ||
169 | ac_ct_CXX = g++ | ||
170 | ac_ct_F77 = | ||
171 | am__include = include | ||
172 | am__leading_dot = . | ||
173 | am__quote = | ||
174 | am__tar = ${AMTAR} chof - "$$tardir" | ||
175 | am__untar = ${AMTAR} xf - | ||
176 | bindir = ${exec_prefix}/bin | ||
177 | build = x86_64-unknown-linux-gnu | ||
178 | build_alias = | ||
179 | build_cpu = x86_64 | ||
180 | build_os = linux-gnu | ||
181 | build_vendor = unknown | ||
182 | builddir = . | ||
183 | datadir = ${datarootdir} | ||
184 | datarootdir = ${prefix}/share | ||
185 | docdir = ${datarootdir}/doc/${PACKAGE} | ||
186 | dvidir = ${docdir} | ||
187 | exec_prefix = ${prefix} | ||
188 | host = x86_64-unknown-linux-gnu | ||
189 | host_alias = | ||
190 | host_cpu = x86_64 | ||
191 | host_os = linux-gnu | ||
192 | host_vendor = unknown | ||
193 | htmldir = ${docdir} | ||
194 | includedir = ${prefix}/include | ||
195 | infodir = ${datarootdir}/info | ||
196 | install_sh = $(SHELL) /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/install-sh | ||
197 | libdir = ${exec_prefix}/lib | ||
198 | libexecdir = ${exec_prefix}/libexec | ||
199 | localedir = ${datarootdir}/locale | ||
200 | localstatedir = ${prefix}/var | ||
201 | mandir = ${datarootdir}/man | ||
202 | mkdir_p = /bin/mkdir -p | ||
203 | oldincludedir = /usr/include | ||
204 | pdfdir = ${docdir} | ||
205 | prefix = /usr/local | ||
206 | program_transform_name = s,x,x, | ||
207 | psdir = ${docdir} | ||
208 | sbindir = ${exec_prefix}/sbin | ||
209 | sharedstatedir = ${prefix}/com | ||
210 | srcdir = . | ||
211 | sysconfdir = ${prefix}/etc | ||
212 | target_alias = | ||
213 | top_builddir = ../../.. | ||
214 | top_srcdir = ../../.. | ||
215 | pluginimpdir = $(pkglibdir)/plugins/import | ||
216 | pluginimp_LTLIBRARIES = imp_lwo.la | ||
217 | AM_CFLAGS = \ | ||
218 | -Wall -ansi -pedantic \ | ||
219 | -DG_LOG_DOMAIN=\"LibG3D\" \ | ||
220 | -O2 -DDEBUG=0 \ | ||
221 | -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include | ||
222 | |||
223 | INCLUDES = -I$(top_srcdir)/include | ||
224 | AM_LDFLAGS = \ | ||
225 | -no-undefined -module \ | ||
226 | -avoid-version -export-dynamic | ||
227 | |||
228 | imp_lwo_la_SOURCES = imp_lwo.c imp_lwo.h imp_lwo_chunks.h \ | ||
229 | imp_lwo_callbacks.c imp_lwo_callbacks.h | ||
230 | |||
231 | imp_lwo_la_LIBADD = $(top_builddir)/src/libg3d.la -Wl,--export-dynamic -pthread -lgmodule-2.0 -lrt -lgobject-2.0 -lglib-2.0 | ||
232 | all: all-am | ||
233 | |||
234 | .SUFFIXES: | ||
235 | .SUFFIXES: .c .lo .o .obj | ||
236 | $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) | ||
237 | @for dep in $?; do \ | ||
238 | case '$(am__configure_deps)' in \ | ||
239 | *$$dep*) \ | ||
240 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ | ||
241 | && exit 0; \ | ||
242 | exit 1;; \ | ||
243 | esac; \ | ||
244 | done; \ | ||
245 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/import/imp_lwo/Makefile'; \ | ||
246 | cd $(top_srcdir) && \ | ||
247 | $(AUTOMAKE) --gnu plugins/import/imp_lwo/Makefile | ||
248 | .PRECIOUS: Makefile | ||
249 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status | ||
250 | @case '$?' in \ | ||
251 | *config.status*) \ | ||
252 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ | ||
253 | *) \ | ||
254 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ | ||
255 | cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ | ||
256 | esac; | ||
257 | |||
258 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) | ||
259 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
260 | |||
261 | $(top_srcdir)/configure: $(am__configure_deps) | ||
262 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
263 | $(ACLOCAL_M4): $(am__aclocal_m4_deps) | ||
264 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
265 | install-pluginimpLTLIBRARIES: $(pluginimp_LTLIBRARIES) | ||
266 | @$(NORMAL_INSTALL) | ||
267 | test -z "$(pluginimpdir)" || $(MKDIR_P) "$(DESTDIR)$(pluginimpdir)" | ||
268 | @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \ | ||
269 | if test -f $$p; then \ | ||
270 | f=$(am__strip_dir) \ | ||
271 | echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pluginimpLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(pluginimpdir)/$$f'"; \ | ||
272 | $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pluginimpLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(pluginimpdir)/$$f"; \ | ||
273 | else :; fi; \ | ||
274 | done | ||
275 | |||
276 | uninstall-pluginimpLTLIBRARIES: | ||
277 | @$(NORMAL_UNINSTALL) | ||
278 | @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \ | ||
279 | p=$(am__strip_dir) \ | ||
280 | echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pluginimpdir)/$$p'"; \ | ||
281 | $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pluginimpdir)/$$p"; \ | ||
282 | done | ||
283 | |||
284 | clean-pluginimpLTLIBRARIES: | ||
285 | -test -z "$(pluginimp_LTLIBRARIES)" || rm -f $(pluginimp_LTLIBRARIES) | ||
286 | @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \ | ||
287 | dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ | ||
288 | test "$$dir" != "$$p" || dir=.; \ | ||
289 | echo "rm -f \"$${dir}/so_locations\""; \ | ||
290 | rm -f "$${dir}/so_locations"; \ | ||
291 | done | ||
292 | imp_lwo.la: $(imp_lwo_la_OBJECTS) $(imp_lwo_la_DEPENDENCIES) | ||
293 | $(LINK) -rpath $(pluginimpdir) $(imp_lwo_la_OBJECTS) $(imp_lwo_la_LIBADD) $(LIBS) | ||
294 | |||
295 | mostlyclean-compile: | ||
296 | -rm -f *.$(OBJEXT) | ||
297 | |||
298 | distclean-compile: | ||
299 | -rm -f *.tab.c | ||
300 | |||
301 | include ./$(DEPDIR)/imp_lwo.Plo | ||
302 | include ./$(DEPDIR)/imp_lwo_callbacks.Plo | ||
303 | |||
304 | .c.o: | ||
305 | $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< | ||
306 | mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | ||
307 | # source='$<' object='$@' libtool=no \ | ||
308 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
309 | # $(COMPILE) -c $< | ||
310 | |||
311 | .c.obj: | ||
312 | $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` | ||
313 | mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | ||
314 | # source='$<' object='$@' libtool=no \ | ||
315 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
316 | # $(COMPILE) -c `$(CYGPATH_W) '$<'` | ||
317 | |||
318 | .c.lo: | ||
319 | $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< | ||
320 | mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo | ||
321 | # source='$<' object='$@' libtool=yes \ | ||
322 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
323 | # $(LTCOMPILE) -c -o $@ $< | ||
324 | |||
325 | mostlyclean-libtool: | ||
326 | -rm -f *.lo | ||
327 | |||
328 | clean-libtool: | ||
329 | -rm -rf .libs _libs | ||
330 | |||
331 | ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) | ||
332 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
333 | unique=`for i in $$list; do \ | ||
334 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
335 | done | \ | ||
336 | $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ | ||
337 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
338 | mkid -fID $$unique | ||
339 | tags: TAGS | ||
340 | |||
341 | TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ | ||
342 | $(TAGS_FILES) $(LISP) | ||
343 | tags=; \ | ||
344 | here=`pwd`; \ | ||
345 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
346 | unique=`for i in $$list; do \ | ||
347 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
348 | done | \ | ||
349 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | ||
350 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
351 | if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ | ||
352 | test -n "$$unique" || unique=$$empty_fix; \ | ||
353 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ | ||
354 | $$tags $$unique; \ | ||
355 | fi | ||
356 | ctags: CTAGS | ||
357 | CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ | ||
358 | $(TAGS_FILES) $(LISP) | ||
359 | tags=; \ | ||
360 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
361 | unique=`for i in $$list; do \ | ||
362 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
363 | done | \ | ||
364 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | ||
365 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
366 | test -z "$(CTAGS_ARGS)$$tags$$unique" \ | ||
367 | || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ | ||
368 | $$tags $$unique | ||
369 | |||
370 | GTAGS: | ||
371 | here=`$(am__cd) $(top_builddir) && pwd` \ | ||
372 | && cd $(top_srcdir) \ | ||
373 | && gtags -i $(GTAGS_ARGS) $$here | ||
374 | |||
375 | distclean-tags: | ||
376 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags | ||
377 | |||
378 | distdir: $(DISTFILES) | ||
379 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | ||
380 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | ||
381 | list='$(DISTFILES)'; \ | ||
382 | dist_files=`for file in $$list; do echo $$file; done | \ | ||
383 | sed -e "s|^$$srcdirstrip/||;t" \ | ||
384 | -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ | ||
385 | case $$dist_files in \ | ||
386 | */*) $(MKDIR_P) `echo "$$dist_files" | \ | ||
387 | sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ | ||
388 | sort -u` ;; \ | ||
389 | esac; \ | ||
390 | for file in $$dist_files; do \ | ||
391 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ | ||
392 | if test -d $$d/$$file; then \ | ||
393 | dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ | ||
394 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ | ||
395 | cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ | ||
396 | fi; \ | ||
397 | cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ | ||
398 | else \ | ||
399 | test -f $(distdir)/$$file \ | ||
400 | || cp -p $$d/$$file $(distdir)/$$file \ | ||
401 | || exit 1; \ | ||
402 | fi; \ | ||
403 | done | ||
404 | check-am: all-am | ||
405 | check: check-am | ||
406 | all-am: Makefile $(LTLIBRARIES) | ||
407 | installdirs: | ||
408 | for dir in "$(DESTDIR)$(pluginimpdir)"; do \ | ||
409 | test -z "$$dir" || $(MKDIR_P) "$$dir"; \ | ||
410 | done | ||
411 | install: install-am | ||
412 | install-exec: install-exec-am | ||
413 | install-data: install-data-am | ||
414 | uninstall: uninstall-am | ||
415 | |||
416 | install-am: all-am | ||
417 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am | ||
418 | |||
419 | installcheck: installcheck-am | ||
420 | install-strip: | ||
421 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ | ||
422 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ | ||
423 | `test -z '$(STRIP)' || \ | ||
424 | echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install | ||
425 | mostlyclean-generic: | ||
426 | |||
427 | clean-generic: | ||
428 | |||
429 | distclean-generic: | ||
430 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) | ||
431 | |||
432 | maintainer-clean-generic: | ||
433 | @echo "This command is intended for maintainers to use" | ||
434 | @echo "it deletes files that may require special tools to rebuild." | ||
435 | clean: clean-am | ||
436 | |||
437 | clean-am: clean-generic clean-libtool clean-pluginimpLTLIBRARIES \ | ||
438 | mostlyclean-am | ||
439 | |||
440 | distclean: distclean-am | ||
441 | -rm -rf ./$(DEPDIR) | ||
442 | -rm -f Makefile | ||
443 | distclean-am: clean-am distclean-compile distclean-generic \ | ||
444 | distclean-tags | ||
445 | |||
446 | dvi: dvi-am | ||
447 | |||
448 | dvi-am: | ||
449 | |||
450 | html: html-am | ||
451 | |||
452 | info: info-am | ||
453 | |||
454 | info-am: | ||
455 | |||
456 | install-data-am: install-pluginimpLTLIBRARIES | ||
457 | |||
458 | install-dvi: install-dvi-am | ||
459 | |||
460 | install-exec-am: | ||
461 | |||
462 | install-html: install-html-am | ||
463 | |||
464 | install-info: install-info-am | ||
465 | |||
466 | install-man: | ||
467 | |||
468 | install-pdf: install-pdf-am | ||
469 | |||
470 | install-ps: install-ps-am | ||
471 | |||
472 | installcheck-am: | ||
473 | |||
474 | maintainer-clean: maintainer-clean-am | ||
475 | -rm -rf ./$(DEPDIR) | ||
476 | -rm -f Makefile | ||
477 | maintainer-clean-am: distclean-am maintainer-clean-generic | ||
478 | |||
479 | mostlyclean: mostlyclean-am | ||
480 | |||
481 | mostlyclean-am: mostlyclean-compile mostlyclean-generic \ | ||
482 | mostlyclean-libtool | ||
483 | |||
484 | pdf: pdf-am | ||
485 | |||
486 | pdf-am: | ||
487 | |||
488 | ps: ps-am | ||
489 | |||
490 | ps-am: | ||
491 | |||
492 | uninstall-am: uninstall-pluginimpLTLIBRARIES | ||
493 | |||
494 | .MAKE: install-am install-strip | ||
495 | |||
496 | .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ | ||
497 | clean-libtool clean-pluginimpLTLIBRARIES ctags distclean \ | ||
498 | distclean-compile distclean-generic distclean-libtool \ | ||
499 | distclean-tags distdir dvi dvi-am html html-am info info-am \ | ||
500 | install install-am install-data install-data-am install-dvi \ | ||
501 | install-dvi-am install-exec install-exec-am install-html \ | ||
502 | install-html-am install-info install-info-am install-man \ | ||
503 | install-pdf install-pdf-am install-pluginimpLTLIBRARIES \ | ||
504 | install-ps install-ps-am install-strip installcheck \ | ||
505 | installcheck-am installdirs maintainer-clean \ | ||
506 | maintainer-clean-generic mostlyclean mostlyclean-compile \ | ||
507 | mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ | ||
508 | tags uninstall uninstall-am uninstall-pluginimpLTLIBRARIES | ||
509 | |||
510 | # Tell versions [3.59,3.63) of GNU make to not export all variables. | ||
511 | # Otherwise a system limit (for SysV at least) may be exceeded. | ||
512 | .NOEXPORT: | ||
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_lwo/Makefile.am b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_lwo/Makefile.am new file mode 100644 index 0000000..8eba1a1 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_lwo/Makefile.am | |||
@@ -0,0 +1,21 @@ | |||
1 | pluginimpdir = $(pkglibdir)/plugins/import | ||
2 | |||
3 | pluginimp_LTLIBRARIES = imp_lwo.la | ||
4 | |||
5 | AM_CFLAGS = \ | ||
6 | -Wall -ansi -pedantic \ | ||
7 | -DG_LOG_DOMAIN=\"LibG3D\" \ | ||
8 | @DBG_CFLAGS@ -DDEBUG=@DEBUG@ \ | ||
9 | @GLIB_CFLAGS@ | ||
10 | |||
11 | INCLUDES = -I$(top_srcdir)/include | ||
12 | |||
13 | AM_LDFLAGS = \ | ||
14 | -no-undefined -module \ | ||
15 | @PLUGINS_LDFLAGS@ | ||
16 | |||
17 | LIBTOOL += --quiet | ||
18 | |||
19 | imp_lwo_la_SOURCES = imp_lwo.c imp_lwo.h imp_lwo_chunks.h \ | ||
20 | imp_lwo_callbacks.c imp_lwo_callbacks.h | ||
21 | imp_lwo_la_LIBADD = $(top_builddir)/src/libg3d.la @GLIB_LIBS@ | ||
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_lwo/Makefile.in b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_lwo/Makefile.in new file mode 100644 index 0000000..db7b118 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_lwo/Makefile.in | |||
@@ -0,0 +1,512 @@ | |||
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 | |||
17 | VPATH = @srcdir@ | ||
18 | pkgdatadir = $(datadir)/@PACKAGE@ | ||
19 | pkglibdir = $(libdir)/@PACKAGE@ | ||
20 | pkgincludedir = $(includedir)/@PACKAGE@ | ||
21 | am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd | ||
22 | install_sh_DATA = $(install_sh) -c -m 644 | ||
23 | install_sh_PROGRAM = $(install_sh) -c | ||
24 | install_sh_SCRIPT = $(install_sh) -c | ||
25 | INSTALL_HEADER = $(INSTALL_DATA) | ||
26 | transform = $(program_transform_name) | ||
27 | NORMAL_INSTALL = : | ||
28 | PRE_INSTALL = : | ||
29 | POST_INSTALL = : | ||
30 | NORMAL_UNINSTALL = : | ||
31 | PRE_UNINSTALL = : | ||
32 | POST_UNINSTALL = : | ||
33 | build_triplet = @build@ | ||
34 | host_triplet = @host@ | ||
35 | subdir = plugins/import/imp_lwo | ||
36 | DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in | ||
37 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 | ||
38 | am__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 | ||
43 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ | ||
44 | $(ACLOCAL_M4) | ||
45 | mkinstalldirs = $(install_sh) -d | ||
46 | CONFIG_HEADER = $(top_builddir)/include/g3d/config.h | ||
47 | CONFIG_CLEAN_FILES = | ||
48 | am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; | ||
49 | am__vpath_adj = case $$p in \ | ||
50 | $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ | ||
51 | *) f=$$p;; \ | ||
52 | esac; | ||
53 | am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; | ||
54 | am__installdirs = "$(DESTDIR)$(pluginimpdir)" | ||
55 | pluginimpLTLIBRARIES_INSTALL = $(INSTALL) | ||
56 | LTLIBRARIES = $(pluginimp_LTLIBRARIES) | ||
57 | imp_lwo_la_DEPENDENCIES = $(top_builddir)/src/libg3d.la | ||
58 | am_imp_lwo_la_OBJECTS = imp_lwo.lo imp_lwo_callbacks.lo | ||
59 | imp_lwo_la_OBJECTS = $(am_imp_lwo_la_OBJECTS) | ||
60 | DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include/g3d | ||
61 | depcomp = $(SHELL) $(top_srcdir)/config/depcomp | ||
62 | am__depfiles_maybe = depfiles | ||
63 | COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ | ||
64 | $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) | ||
65 | LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ | ||
66 | --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ | ||
67 | $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) | ||
68 | CCLD = $(CC) | ||
69 | LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ | ||
70 | --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ | ||
71 | $(LDFLAGS) -o $@ | ||
72 | SOURCES = $(imp_lwo_la_SOURCES) | ||
73 | DIST_SOURCES = $(imp_lwo_la_SOURCES) | ||
74 | ETAGS = etags | ||
75 | CTAGS = ctags | ||
76 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) | ||
77 | ACLOCAL = @ACLOCAL@ | ||
78 | AMTAR = @AMTAR@ | ||
79 | AR = @AR@ | ||
80 | AS = @AS@ | ||
81 | AUTOCONF = @AUTOCONF@ | ||
82 | AUTOHEADER = @AUTOHEADER@ | ||
83 | AUTOMAKE = @AUTOMAKE@ | ||
84 | AWK = @AWK@ | ||
85 | CC = @CC@ | ||
86 | CCDEPMODE = @CCDEPMODE@ | ||
87 | CFLAGS = @CFLAGS@ | ||
88 | CPP = @CPP@ | ||
89 | CPPFLAGS = @CPPFLAGS@ | ||
90 | CXX = @CXX@ | ||
91 | CXXCPP = @CXXCPP@ | ||
92 | CXXDEPMODE = @CXXDEPMODE@ | ||
93 | CXXFLAGS = @CXXFLAGS@ | ||
94 | CYGPATH_W = @CYGPATH_W@ | ||
95 | DBG_CFLAGS = @DBG_CFLAGS@ | ||
96 | DEBUG = @DEBUG@ | ||
97 | DEFS = @DEFS@ | ||
98 | DEPDIR = @DEPDIR@ | ||
99 | DLLTOOL = @DLLTOOL@ | ||
100 | ECHO = @ECHO@ | ||
101 | ECHO_C = @ECHO_C@ | ||
102 | ECHO_N = @ECHO_N@ | ||
103 | ECHO_T = @ECHO_T@ | ||
104 | EGREP = @EGREP@ | ||
105 | EXEEXT = @EXEEXT@ | ||
106 | F77 = @F77@ | ||
107 | FFLAGS = @FFLAGS@ | ||
108 | GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@ | ||
109 | GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@ | ||
110 | GLIB_CFLAGS = @GLIB_CFLAGS@ | ||
111 | GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ | ||
112 | GLIB_LIBS = @GLIB_LIBS@ | ||
113 | GLIB_MKENUMS = @GLIB_MKENUMS@ | ||
114 | GOBJECT_QUERY = @GOBJECT_QUERY@ | ||
115 | GREP = @GREP@ | ||
116 | GTKDOC_CHECK = @GTKDOC_CHECK@ | ||
117 | GTK_CFLAGS = @GTK_CFLAGS@ | ||
118 | GTK_LIBS = @GTK_LIBS@ | ||
119 | HTML_DIR = @HTML_DIR@ | ||
120 | INSTALL = @INSTALL@ | ||
121 | INSTALL_DATA = @INSTALL_DATA@ | ||
122 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ | ||
123 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ | ||
124 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ | ||
125 | LDFLAGS = @LDFLAGS@ | ||
126 | LEX = @LEX@ | ||
127 | LEXLIB = @LEXLIB@ | ||
128 | LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ | ||
129 | LIBGSF_CFLAGS = @LIBGSF_CFLAGS@ | ||
130 | LIBGSF_LIBS = @LIBGSF_LIBS@ | ||
131 | LIBOBJS = @LIBOBJS@ | ||
132 | LIBS = @LIBS@ | ||
133 | LIBTOOL = @LIBTOOL@ --quiet | ||
134 | LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ | ||
135 | LIBXML2_LIBS = @LIBXML2_LIBS@ | ||
136 | LN_S = @LN_S@ | ||
137 | LTLIBOBJS = @LTLIBOBJS@ | ||
138 | LTVERSION = @LTVERSION@ | ||
139 | MAGIC_LIBS = @MAGIC_LIBS@ | ||
140 | MAKEINFO = @MAKEINFO@ | ||
141 | MATH_LIBS = @MATH_LIBS@ | ||
142 | MKDIR_P = @MKDIR_P@ | ||
143 | OBJDUMP = @OBJDUMP@ | ||
144 | OBJEXT = @OBJEXT@ | ||
145 | PACKAGE = @PACKAGE@ | ||
146 | PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ | ||
147 | PACKAGE_NAME = @PACKAGE_NAME@ | ||
148 | PACKAGE_STRING = @PACKAGE_STRING@ | ||
149 | PACKAGE_TARNAME = @PACKAGE_TARNAME@ | ||
150 | PACKAGE_VERSION = @PACKAGE_VERSION@ | ||
151 | PATH_SEPARATOR = @PATH_SEPARATOR@ | ||
152 | PKG_CONFIG = @PKG_CONFIG@ | ||
153 | PLUGINS_LDFLAGS = @PLUGINS_LDFLAGS@ | ||
154 | RANLIB = @RANLIB@ | ||
155 | SET_MAKE = @SET_MAKE@ | ||
156 | SHELL = @SHELL@ | ||
157 | STRIP = @STRIP@ | ||
158 | VERSION = @VERSION@ | ||
159 | XML2_CONFIG = @XML2_CONFIG@ | ||
160 | XML_CPPFLAGS = @XML_CPPFLAGS@ | ||
161 | XML_LIBS = @XML_LIBS@ | ||
162 | Z_CFLAGS = @Z_CFLAGS@ | ||
163 | Z_LIBS = @Z_LIBS@ | ||
164 | abs_builddir = @abs_builddir@ | ||
165 | abs_srcdir = @abs_srcdir@ | ||
166 | abs_top_builddir = @abs_top_builddir@ | ||
167 | abs_top_srcdir = @abs_top_srcdir@ | ||
168 | ac_ct_CC = @ac_ct_CC@ | ||
169 | ac_ct_CXX = @ac_ct_CXX@ | ||
170 | ac_ct_F77 = @ac_ct_F77@ | ||
171 | am__include = @am__include@ | ||
172 | am__leading_dot = @am__leading_dot@ | ||
173 | am__quote = @am__quote@ | ||
174 | am__tar = @am__tar@ | ||
175 | am__untar = @am__untar@ | ||
176 | bindir = @bindir@ | ||
177 | build = @build@ | ||
178 | build_alias = @build_alias@ | ||
179 | build_cpu = @build_cpu@ | ||
180 | build_os = @build_os@ | ||
181 | build_vendor = @build_vendor@ | ||
182 | builddir = @builddir@ | ||
183 | datadir = @datadir@ | ||
184 | datarootdir = @datarootdir@ | ||
185 | docdir = @docdir@ | ||
186 | dvidir = @dvidir@ | ||
187 | exec_prefix = @exec_prefix@ | ||
188 | host = @host@ | ||
189 | host_alias = @host_alias@ | ||
190 | host_cpu = @host_cpu@ | ||
191 | host_os = @host_os@ | ||
192 | host_vendor = @host_vendor@ | ||
193 | htmldir = @htmldir@ | ||
194 | includedir = @includedir@ | ||
195 | infodir = @infodir@ | ||
196 | install_sh = @install_sh@ | ||
197 | libdir = @libdir@ | ||
198 | libexecdir = @libexecdir@ | ||
199 | localedir = @localedir@ | ||
200 | localstatedir = @localstatedir@ | ||
201 | mandir = @mandir@ | ||
202 | mkdir_p = @mkdir_p@ | ||
203 | oldincludedir = @oldincludedir@ | ||
204 | pdfdir = @pdfdir@ | ||
205 | prefix = @prefix@ | ||
206 | program_transform_name = @program_transform_name@ | ||
207 | psdir = @psdir@ | ||
208 | sbindir = @sbindir@ | ||
209 | sharedstatedir = @sharedstatedir@ | ||
210 | srcdir = @srcdir@ | ||
211 | sysconfdir = @sysconfdir@ | ||
212 | target_alias = @target_alias@ | ||
213 | top_builddir = @top_builddir@ | ||
214 | top_srcdir = @top_srcdir@ | ||
215 | pluginimpdir = $(pkglibdir)/plugins/import | ||
216 | pluginimp_LTLIBRARIES = imp_lwo.la | ||
217 | AM_CFLAGS = \ | ||
218 | -Wall -ansi -pedantic \ | ||
219 | -DG_LOG_DOMAIN=\"LibG3D\" \ | ||
220 | @DBG_CFLAGS@ -DDEBUG=@DEBUG@ \ | ||
221 | @GLIB_CFLAGS@ | ||
222 | |||
223 | INCLUDES = -I$(top_srcdir)/include | ||
224 | AM_LDFLAGS = \ | ||
225 | -no-undefined -module \ | ||
226 | @PLUGINS_LDFLAGS@ | ||
227 | |||
228 | imp_lwo_la_SOURCES = imp_lwo.c imp_lwo.h imp_lwo_chunks.h \ | ||
229 | imp_lwo_callbacks.c imp_lwo_callbacks.h | ||
230 | |||
231 | imp_lwo_la_LIBADD = $(top_builddir)/src/libg3d.la @GLIB_LIBS@ | ||
232 | all: all-am | ||
233 | |||
234 | .SUFFIXES: | ||
235 | .SUFFIXES: .c .lo .o .obj | ||
236 | $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) | ||
237 | @for dep in $?; do \ | ||
238 | case '$(am__configure_deps)' in \ | ||
239 | *$$dep*) \ | ||
240 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ | ||
241 | && exit 0; \ | ||
242 | exit 1;; \ | ||
243 | esac; \ | ||
244 | done; \ | ||
245 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/import/imp_lwo/Makefile'; \ | ||
246 | cd $(top_srcdir) && \ | ||
247 | $(AUTOMAKE) --gnu plugins/import/imp_lwo/Makefile | ||
248 | .PRECIOUS: Makefile | ||
249 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status | ||
250 | @case '$?' in \ | ||
251 | *config.status*) \ | ||
252 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ | ||
253 | *) \ | ||
254 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ | ||
255 | cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ | ||
256 | esac; | ||
257 | |||
258 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) | ||
259 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
260 | |||
261 | $(top_srcdir)/configure: $(am__configure_deps) | ||
262 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
263 | $(ACLOCAL_M4): $(am__aclocal_m4_deps) | ||
264 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
265 | install-pluginimpLTLIBRARIES: $(pluginimp_LTLIBRARIES) | ||
266 | @$(NORMAL_INSTALL) | ||
267 | test -z "$(pluginimpdir)" || $(MKDIR_P) "$(DESTDIR)$(pluginimpdir)" | ||
268 | @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \ | ||
269 | if test -f $$p; then \ | ||
270 | f=$(am__strip_dir) \ | ||
271 | echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pluginimpLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(pluginimpdir)/$$f'"; \ | ||
272 | $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pluginimpLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(pluginimpdir)/$$f"; \ | ||
273 | else :; fi; \ | ||
274 | done | ||
275 | |||
276 | uninstall-pluginimpLTLIBRARIES: | ||
277 | @$(NORMAL_UNINSTALL) | ||
278 | @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \ | ||
279 | p=$(am__strip_dir) \ | ||
280 | echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pluginimpdir)/$$p'"; \ | ||
281 | $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pluginimpdir)/$$p"; \ | ||
282 | done | ||
283 | |||
284 | clean-pluginimpLTLIBRARIES: | ||
285 | -test -z "$(pluginimp_LTLIBRARIES)" || rm -f $(pluginimp_LTLIBRARIES) | ||
286 | @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \ | ||
287 | dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ | ||
288 | test "$$dir" != "$$p" || dir=.; \ | ||
289 | echo "rm -f \"$${dir}/so_locations\""; \ | ||
290 | rm -f "$${dir}/so_locations"; \ | ||
291 | done | ||
292 | imp_lwo.la: $(imp_lwo_la_OBJECTS) $(imp_lwo_la_DEPENDENCIES) | ||
293 | $(LINK) -rpath $(pluginimpdir) $(imp_lwo_la_OBJECTS) $(imp_lwo_la_LIBADD) $(LIBS) | ||
294 | |||
295 | mostlyclean-compile: | ||
296 | -rm -f *.$(OBJEXT) | ||
297 | |||
298 | distclean-compile: | ||
299 | -rm -f *.tab.c | ||
300 | |||
301 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imp_lwo.Plo@am__quote@ | ||
302 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imp_lwo_callbacks.Plo@am__quote@ | ||
303 | |||
304 | .c.o: | ||
305 | @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< | ||
306 | @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | ||
307 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ | ||
308 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
309 | @am__fastdepCC_FALSE@ $(COMPILE) -c $< | ||
310 | |||
311 | .c.obj: | ||
312 | @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` | ||
313 | @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | ||
314 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ | ||
315 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
316 | @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` | ||
317 | |||
318 | .c.lo: | ||
319 | @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< | ||
320 | @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo | ||
321 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ | ||
322 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
323 | @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< | ||
324 | |||
325 | mostlyclean-libtool: | ||
326 | -rm -f *.lo | ||
327 | |||
328 | clean-libtool: | ||
329 | -rm -rf .libs _libs | ||
330 | |||
331 | ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) | ||
332 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
333 | unique=`for i in $$list; do \ | ||
334 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
335 | done | \ | ||
336 | $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ | ||
337 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
338 | mkid -fID $$unique | ||
339 | tags: TAGS | ||
340 | |||
341 | TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ | ||
342 | $(TAGS_FILES) $(LISP) | ||
343 | tags=; \ | ||
344 | here=`pwd`; \ | ||
345 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
346 | unique=`for i in $$list; do \ | ||
347 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
348 | done | \ | ||
349 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | ||
350 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
351 | if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ | ||
352 | test -n "$$unique" || unique=$$empty_fix; \ | ||
353 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ | ||
354 | $$tags $$unique; \ | ||
355 | fi | ||
356 | ctags: CTAGS | ||
357 | CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ | ||
358 | $(TAGS_FILES) $(LISP) | ||
359 | tags=; \ | ||
360 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
361 | unique=`for i in $$list; do \ | ||
362 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
363 | done | \ | ||
364 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | ||
365 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
366 | test -z "$(CTAGS_ARGS)$$tags$$unique" \ | ||
367 | || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ | ||
368 | $$tags $$unique | ||
369 | |||
370 | GTAGS: | ||
371 | here=`$(am__cd) $(top_builddir) && pwd` \ | ||
372 | && cd $(top_srcdir) \ | ||
373 | && gtags -i $(GTAGS_ARGS) $$here | ||
374 | |||
375 | distclean-tags: | ||
376 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags | ||
377 | |||
378 | distdir: $(DISTFILES) | ||
379 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | ||
380 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | ||
381 | list='$(DISTFILES)'; \ | ||
382 | dist_files=`for file in $$list; do echo $$file; done | \ | ||
383 | sed -e "s|^$$srcdirstrip/||;t" \ | ||
384 | -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ | ||
385 | case $$dist_files in \ | ||
386 | */*) $(MKDIR_P) `echo "$$dist_files" | \ | ||
387 | sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ | ||
388 | sort -u` ;; \ | ||
389 | esac; \ | ||
390 | for file in $$dist_files; do \ | ||
391 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ | ||
392 | if test -d $$d/$$file; then \ | ||
393 | dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ | ||
394 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ | ||
395 | cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ | ||
396 | fi; \ | ||
397 | cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ | ||
398 | else \ | ||
399 | test -f $(distdir)/$$file \ | ||
400 | || cp -p $$d/$$file $(distdir)/$$file \ | ||
401 | || exit 1; \ | ||
402 | fi; \ | ||
403 | done | ||
404 | check-am: all-am | ||
405 | check: check-am | ||
406 | all-am: Makefile $(LTLIBRARIES) | ||
407 | installdirs: | ||
408 | for dir in "$(DESTDIR)$(pluginimpdir)"; do \ | ||
409 | test -z "$$dir" || $(MKDIR_P) "$$dir"; \ | ||
410 | done | ||
411 | install: install-am | ||
412 | install-exec: install-exec-am | ||
413 | install-data: install-data-am | ||
414 | uninstall: uninstall-am | ||
415 | |||
416 | install-am: all-am | ||
417 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am | ||
418 | |||
419 | installcheck: installcheck-am | ||
420 | install-strip: | ||
421 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ | ||
422 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ | ||
423 | `test -z '$(STRIP)' || \ | ||
424 | echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install | ||
425 | mostlyclean-generic: | ||
426 | |||
427 | clean-generic: | ||
428 | |||
429 | distclean-generic: | ||
430 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) | ||
431 | |||
432 | maintainer-clean-generic: | ||
433 | @echo "This command is intended for maintainers to use" | ||
434 | @echo "it deletes files that may require special tools to rebuild." | ||
435 | clean: clean-am | ||
436 | |||
437 | clean-am: clean-generic clean-libtool clean-pluginimpLTLIBRARIES \ | ||
438 | mostlyclean-am | ||
439 | |||
440 | distclean: distclean-am | ||
441 | -rm -rf ./$(DEPDIR) | ||
442 | -rm -f Makefile | ||
443 | distclean-am: clean-am distclean-compile distclean-generic \ | ||
444 | distclean-tags | ||
445 | |||
446 | dvi: dvi-am | ||
447 | |||
448 | dvi-am: | ||
449 | |||
450 | html: html-am | ||
451 | |||
452 | info: info-am | ||
453 | |||
454 | info-am: | ||
455 | |||
456 | install-data-am: install-pluginimpLTLIBRARIES | ||
457 | |||
458 | install-dvi: install-dvi-am | ||
459 | |||
460 | install-exec-am: | ||
461 | |||
462 | install-html: install-html-am | ||
463 | |||
464 | install-info: install-info-am | ||
465 | |||
466 | install-man: | ||
467 | |||
468 | install-pdf: install-pdf-am | ||
469 | |||
470 | install-ps: install-ps-am | ||
471 | |||
472 | installcheck-am: | ||
473 | |||
474 | maintainer-clean: maintainer-clean-am | ||
475 | -rm -rf ./$(DEPDIR) | ||
476 | -rm -f Makefile | ||
477 | maintainer-clean-am: distclean-am maintainer-clean-generic | ||
478 | |||
479 | mostlyclean: mostlyclean-am | ||
480 | |||
481 | mostlyclean-am: mostlyclean-compile mostlyclean-generic \ | ||
482 | mostlyclean-libtool | ||
483 | |||
484 | pdf: pdf-am | ||
485 | |||
486 | pdf-am: | ||
487 | |||
488 | ps: ps-am | ||
489 | |||
490 | ps-am: | ||
491 | |||
492 | uninstall-am: uninstall-pluginimpLTLIBRARIES | ||
493 | |||
494 | .MAKE: install-am install-strip | ||
495 | |||
496 | .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ | ||
497 | clean-libtool clean-pluginimpLTLIBRARIES ctags distclean \ | ||
498 | distclean-compile distclean-generic distclean-libtool \ | ||
499 | distclean-tags distdir dvi dvi-am html html-am info info-am \ | ||
500 | install install-am install-data install-data-am install-dvi \ | ||
501 | install-dvi-am install-exec install-exec-am install-html \ | ||
502 | install-html-am install-info install-info-am install-man \ | ||
503 | install-pdf install-pdf-am install-pluginimpLTLIBRARIES \ | ||
504 | install-ps install-ps-am install-strip installcheck \ | ||
505 | installcheck-am installdirs maintainer-clean \ | ||
506 | maintainer-clean-generic mostlyclean mostlyclean-compile \ | ||
507 | mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ | ||
508 | tags uninstall uninstall-am uninstall-pluginimpLTLIBRARIES | ||
509 | |||
510 | # Tell versions [3.59,3.63) of GNU make to not export all variables. | ||
511 | # Otherwise a system limit (for SysV at least) may be exceeded. | ||
512 | .NOEXPORT: | ||
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_lwo/imp_lwo.c b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_lwo/imp_lwo.c new file mode 100644 index 0000000..d01b817 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_lwo/imp_lwo.c | |||
@@ -0,0 +1,216 @@ | |||
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 | /* | ||
24 | * imp_lwo.c - LightWave import plugin | ||
25 | * | ||
26 | * (C) 2005,2006 Markus Dahms | ||
27 | * | ||
28 | * based on gtkglarea example viewlw: | ||
29 | * Copyright (C) 1998 Janne Löf <jlof@mail.student.oulu.fi> | ||
30 | */ | ||
31 | |||
32 | #include <string.h> | ||
33 | |||
34 | #include <g3d/types.h> | ||
35 | #include <g3d/context.h> | ||
36 | #include <g3d/stream.h> | ||
37 | #include <g3d/material.h> | ||
38 | #include <g3d/iff.h> | ||
39 | |||
40 | #define LW_MAX_POINTS 200 | ||
41 | #define LW_MAX_NAME_LEN 500 | ||
42 | #define LW_F_LWO2 1 | ||
43 | |||
44 | #include "imp_lwo.h" | ||
45 | #include "imp_lwo_chunks.h" | ||
46 | |||
47 | /*****************************************************************************/ | ||
48 | /* plugin interface */ | ||
49 | /*****************************************************************************/ | ||
50 | |||
51 | static void lwo_fix_texfaces(G3DModel *model); | ||
52 | |||
53 | EAPI | ||
54 | gboolean plugin_load_model_from_stream(G3DContext *context, G3DStream *stream, | ||
55 | G3DModel *model, gpointer user_data) | ||
56 | { | ||
57 | LwoObject *obj; | ||
58 | G3DMaterial *material; | ||
59 | guint32 id; | ||
60 | gsize len; | ||
61 | G3DIffGlobal *global; | ||
62 | G3DIffLocal *local; | ||
63 | |||
64 | if(!g3d_iff_check(stream, &id, &len)) | ||
65 | return FALSE; | ||
66 | |||
67 | if((id != G3D_IFF_MKID('L','W','O','B')) && | ||
68 | (id != G3D_IFF_MKID('L','W','O','2'))) { | ||
69 | g_warning("'%s' is not a LightWave object", stream->uri); | ||
70 | return FALSE; | ||
71 | } | ||
72 | |||
73 | obj = g_new0(LwoObject, 1); | ||
74 | |||
75 | global = g_new0(G3DIffGlobal, 1); | ||
76 | global->stream = stream; | ||
77 | global->context = context; | ||
78 | global->model = model; | ||
79 | if(id == G3D_IFF_MKID('L','W','O','2')) | ||
80 | global->flags |= LWO_FLAG_LWO2; | ||
81 | global->user_data = obj; | ||
82 | |||
83 | local = g_new0(G3DIffLocal, 1); | ||
84 | local->id = id; | ||
85 | local->nb = len; | ||
86 | |||
87 | material = g3d_material_new(); | ||
88 | material->name = g_strdup("fallback material"); | ||
89 | model->materials = g_slist_append(model->materials, material); | ||
90 | |||
91 | g3d_iff_read_ctnr(global, local, lwo_chunks, | ||
92 | G3D_IFF_PAD2 | G3D_IFF_SUBCHUNK_LEN16); | ||
93 | |||
94 | lwo_fix_texfaces(model); | ||
95 | |||
96 | /* cleanup */ | ||
97 | if(obj->ntags) | ||
98 | g_strfreev(obj->tags); | ||
99 | |||
100 | if(obj->nclips) | ||
101 | { | ||
102 | g_free(obj->clips); | ||
103 | g_strfreev(obj->clipfiles); | ||
104 | } | ||
105 | |||
106 | if(obj->tex_vertices) | ||
107 | g_free(obj->tex_vertices); | ||
108 | |||
109 | g_free(obj); | ||
110 | |||
111 | g_free(local); | ||
112 | g_free(global); | ||
113 | |||
114 | g3d_context_update_progress_bar(context, 0.0, FALSE); | ||
115 | |||
116 | return TRUE; | ||
117 | } | ||
118 | |||
119 | EAPI | ||
120 | gchar *plugin_description(G3DContext *context) | ||
121 | { | ||
122 | return g_strdup("LightWave models.\n" | ||
123 | "Author: Markus Dahms."); | ||
124 | } | ||
125 | |||
126 | EAPI | ||
127 | gchar **plugin_extensions(G3DContext *context) | ||
128 | { | ||
129 | return g_strsplit("lwo:lwb:lw", ":", 0); | ||
130 | } | ||
131 | |||
132 | /*****************************************************************************/ | ||
133 | /* private */ | ||
134 | /*****************************************************************************/ | ||
135 | |||
136 | G3DObject *lwo_create_object(G3DStream *stream, G3DModel *model, guint32 flags) | ||
137 | { | ||
138 | G3DObject *object = g_new0(G3DObject, 1); | ||
139 | object->name = g_strdup_printf("LWO%c object @ 0x%08x", | ||
140 | (flags & LW_F_LWO2) ? '2' : 'B', (guint32)g3d_stream_tell(stream) - 8); | ||
141 | model->objects = g_slist_append(model->objects, object); | ||
142 | |||
143 | #if 0 | ||
144 | /* LWO files should have correct faces */ | ||
145 | model->glflags &= ~G3D_FLAG_GL_ALLTWOSIDE; | ||
146 | #endif | ||
147 | |||
148 | return object; | ||
149 | } | ||
150 | |||
151 | /*****************************************************************************/ | ||
152 | /* LWO specific */ | ||
153 | /*****************************************************************************/ | ||
154 | |||
155 | gint lwo_read_string(G3DStream *stream, char *s) | ||
156 | { | ||
157 | gint c; | ||
158 | gint cnt = 0; | ||
159 | do { | ||
160 | c = g3d_stream_read_int8(stream); | ||
161 | if (cnt < LW_MAX_NAME_LEN) | ||
162 | s[cnt] = c; | ||
163 | else | ||
164 | s[LW_MAX_NAME_LEN-1] = 0; | ||
165 | cnt++; | ||
166 | } while (c != 0); | ||
167 | /* if length of string (including \0) is odd skip another byte */ | ||
168 | if (cnt%2) { | ||
169 | g3d_stream_read_int8(stream); | ||
170 | cnt++; | ||
171 | } | ||
172 | return cnt; | ||
173 | } | ||
174 | |||
175 | guint32 lwo_read_vx(G3DStream *stream, guint *index) | ||
176 | { | ||
177 | *index = g3d_stream_read_int16_be(stream); | ||
178 | if((*index & 0xFF00) == 0xFF00) { | ||
179 | *index <<= 16; | ||
180 | *index += g3d_stream_read_int16_be(stream); | ||
181 | *index &= 0x00FFFFFF; | ||
182 | return 4; | ||
183 | } else { | ||
184 | return 2; | ||
185 | } | ||
186 | } | ||
187 | |||
188 | static void lwo_fix_texfaces(G3DModel *model) | ||
189 | { | ||
190 | GSList *olist, *flist; | ||
191 | G3DObject *object; | ||
192 | G3DFace *face; | ||
193 | |||
194 | olist = model->objects; | ||
195 | while(olist) | ||
196 | { | ||
197 | object = (G3DObject *)olist->data; | ||
198 | olist = olist->next; | ||
199 | |||
200 | flist = object->faces; | ||
201 | while(flist) | ||
202 | { | ||
203 | face = (G3DFace *)flist->data; | ||
204 | flist = flist->next; | ||
205 | |||
206 | if(face->flags & G3D_FLAG_FAC_TEXMAP) | ||
207 | { | ||
208 | face->tex_image = face->material->tex_image; | ||
209 | if(face->tex_image == NULL) | ||
210 | { | ||
211 | face->flags &= ~G3D_FLAG_FAC_TEXMAP; | ||
212 | } | ||
213 | } | ||
214 | } | ||
215 | } | ||
216 | } | ||
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_lwo/imp_lwo.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_lwo/imp_lwo.h new file mode 100644 index 0000000..84aba2d --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_lwo/imp_lwo.h | |||
@@ -0,0 +1,48 @@ | |||
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_LWO_H | ||
23 | #define _IMP_LWO_H | ||
24 | |||
25 | #include <stdio.h> | ||
26 | #include <g3d/types.h> | ||
27 | |||
28 | #define LWO_FLAG_LWO2 (1 << 0) | ||
29 | |||
30 | typedef struct { | ||
31 | gint32 ntags; | ||
32 | gchar **tags; | ||
33 | |||
34 | gint32 nclips; | ||
35 | guint32 *clips; | ||
36 | gchar **clipfiles; | ||
37 | |||
38 | G3DFloat *tex_vertices; | ||
39 | |||
40 | G3DObject *object; | ||
41 | } LwoObject; | ||
42 | |||
43 | G3DObject *lwo_create_object(G3DStream *stream, G3DModel *model, | ||
44 | guint32 flags); | ||
45 | gint lwo_read_string(G3DStream *stream, gchar *s); | ||
46 | guint32 lwo_read_vx(G3DStream *stream, guint *index); | ||
47 | |||
48 | #endif /* _IMP_LWO_H */ | ||
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_lwo/imp_lwo_callbacks.c b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_lwo/imp_lwo_callbacks.c new file mode 100644 index 0000000..165c3aa --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_lwo/imp_lwo_callbacks.c | |||
@@ -0,0 +1,584 @@ | |||
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 | |||
25 | #include <glib.h> | ||
26 | |||
27 | #include <g3d/context.h> | ||
28 | #include <g3d/stream.h> | ||
29 | #include <g3d/material.h> | ||
30 | #include <g3d/texture.h> | ||
31 | #include <g3d/iff.h> | ||
32 | #include <g3d/debug.h> | ||
33 | |||
34 | #include "imp_lwo.h" | ||
35 | |||
36 | gboolean lwo_cb_CLIP(G3DIffGlobal *global, G3DIffLocal *local) | ||
37 | { | ||
38 | LwoObject *obj; | ||
39 | guint32 index; | ||
40 | |||
41 | obj = (LwoObject *)global->user_data; | ||
42 | g_return_val_if_fail(obj != NULL, FALSE); | ||
43 | |||
44 | if(!local->finalize) | ||
45 | { | ||
46 | index = g3d_stream_read_int32_be(global->stream); | ||
47 | local->nb -= 4; | ||
48 | |||
49 | obj->nclips ++; | ||
50 | obj->clips = g_realloc(obj->clips, obj->nclips * sizeof(guint32)); | ||
51 | obj->clipfiles = g_realloc(obj->clipfiles, | ||
52 | (obj->nclips + 1) * sizeof(gchar *)); | ||
53 | |||
54 | obj->clips[obj->nclips - 1] = index; | ||
55 | obj->clipfiles[obj->nclips - 1] = g_strdup("undef"); | ||
56 | obj->clipfiles[obj->nclips] = NULL; | ||
57 | } | ||
58 | |||
59 | return TRUE; | ||
60 | } | ||
61 | |||
62 | gboolean lwo_cb_COLR(G3DIffGlobal *global, G3DIffLocal *local) | ||
63 | { | ||
64 | G3DMaterial *material; | ||
65 | |||
66 | material = (G3DMaterial *)local->object; | ||
67 | g_return_val_if_fail(material != NULL, FALSE); | ||
68 | |||
69 | if(global->flags & LWO_FLAG_LWO2) | ||
70 | { | ||
71 | material->r = g3d_stream_read_float_be(global->stream); | ||
72 | material->g = g3d_stream_read_float_be(global->stream); | ||
73 | material->b = g3d_stream_read_float_be(global->stream); | ||
74 | local->nb -= 12; | ||
75 | g3d_stream_read_int16_be(global->stream); | ||
76 | local->nb -= 2; | ||
77 | } | ||
78 | else | ||
79 | { | ||
80 | material->r = g3d_stream_read_int8(global->stream) / 255.0; | ||
81 | material->g = g3d_stream_read_int8(global->stream) / 255.0; | ||
82 | material->b = g3d_stream_read_int8(global->stream) / 255.0; | ||
83 | g3d_stream_read_int8(global->stream); | ||
84 | local->nb -= 4; | ||
85 | } | ||
86 | |||
87 | return TRUE; | ||
88 | } | ||
89 | |||
90 | /* image index */ | ||
91 | gboolean lwo_cb_IMAG(G3DIffGlobal *global, G3DIffLocal *local) | ||
92 | { | ||
93 | LwoObject *obj; | ||
94 | G3DMaterial *material; | ||
95 | guint32 index, i; | ||
96 | |||
97 | obj = (LwoObject *)global->user_data; | ||
98 | g_return_val_if_fail(obj != NULL, FALSE); | ||
99 | |||
100 | material = (G3DMaterial *)local->object; | ||
101 | g_return_val_if_fail(material != NULL, FALSE); | ||
102 | |||
103 | local->nb -= lwo_read_vx(global->stream, &index); | ||
104 | |||
105 | for(i = 0; i < obj->nclips; i ++) | ||
106 | { | ||
107 | if(obj->clips[i] == index) | ||
108 | break; | ||
109 | } | ||
110 | |||
111 | if((i < obj->nclips) && (obj->clips[i] == index)) | ||
112 | { | ||
113 | material->tex_image = g3d_texture_load_cached( | ||
114 | global->context, global->model, obj->clipfiles[i]); | ||
115 | } | ||
116 | |||
117 | return TRUE; | ||
118 | } | ||
119 | |||
120 | /* points */ | ||
121 | gboolean lwo_cb_PNTS(G3DIffGlobal *global, G3DIffLocal *local) | ||
122 | { | ||
123 | LwoObject *obj; | ||
124 | G3DObject *object; | ||
125 | gint32 i, off; | ||
126 | |||
127 | obj = (LwoObject *)global->user_data; | ||
128 | g_return_val_if_fail(obj != NULL, FALSE); | ||
129 | |||
130 | if(global->flags & LWO_FLAG_LWO2) { | ||
131 | object = lwo_create_object(global->stream, global->model, | ||
132 | global->flags); | ||
133 | obj->object = object; | ||
134 | |||
135 | if(obj->tex_vertices) { | ||
136 | g_free(obj->tex_vertices); | ||
137 | obj->tex_vertices = NULL; | ||
138 | } | ||
139 | } else { | ||
140 | object = (G3DObject *)obj->object; | ||
141 | if(object == NULL) { | ||
142 | object = lwo_create_object(global->stream, global->model, | ||
143 | global->flags); | ||
144 | obj->object = object; | ||
145 | } | ||
146 | } | ||
147 | off = object->vertex_count; | ||
148 | object->vertex_count += (local->nb / 12); | ||
149 | g_return_val_if_fail(object->vertex_count >= 3, FALSE); | ||
150 | |||
151 | object->vertex_data = g_realloc(object->vertex_data, | ||
152 | sizeof(G3DFloat) * object->vertex_count * 3); | ||
153 | |||
154 | for(i = off; i < object->vertex_count; i ++) { | ||
155 | object->vertex_data[i * 3 + 0] = | ||
156 | -g3d_stream_read_float_be(global->stream); | ||
157 | object->vertex_data[i * 3 + 1] = | ||
158 | g3d_stream_read_float_be(global->stream); | ||
159 | object->vertex_data[i * 3 + 2] = | ||
160 | g3d_stream_read_float_be(global->stream); | ||
161 | local->nb -= 12; | ||
162 | } | ||
163 | return TRUE; | ||
164 | } | ||
165 | |||
166 | /* polygons */ | ||
167 | gboolean lwo_cb_POLS(G3DIffGlobal *global, G3DIffLocal *local) | ||
168 | { | ||
169 | LwoObject *obj; | ||
170 | G3DObject *object; | ||
171 | G3DFace *face; | ||
172 | gboolean skip_face; | ||
173 | guint32 type; | ||
174 | gint32 n = 0, i, nmat, det_cnt, cnt; | ||
175 | gint16 index; | ||
176 | gchar *tmp; | ||
177 | |||
178 | obj = (LwoObject *)global->user_data; | ||
179 | g_return_val_if_fail(obj != NULL, FALSE); | ||
180 | |||
181 | object = (G3DObject *)obj->object; | ||
182 | g_return_val_if_fail(object != NULL, FALSE); | ||
183 | |||
184 | if(global->flags & LWO_FLAG_LWO2) { | ||
185 | type = g3d_stream_read_int32_be(global->stream); | ||
186 | local->nb -= 4; | ||
187 | |||
188 | switch(type) { | ||
189 | case G3D_IFF_MKID('F', 'A', 'C', 'E'): | ||
190 | case G3D_IFF_MKID('P', 'T', 'C', 'H'): | ||
191 | break; | ||
192 | default: | ||
193 | tmp = g3d_iff_id_to_text(type); | ||
194 | g_warning("[LWO] unhandled polygon type %s", tmp); | ||
195 | g_free(tmp); | ||
196 | return FALSE; | ||
197 | } | ||
198 | } | ||
199 | |||
200 | while(local->nb > 0) { | ||
201 | n ++; | ||
202 | skip_face = FALSE; | ||
203 | face = g_new0(G3DFace, 1); | ||
204 | face->vertex_count = g3d_stream_read_int16_be(global->stream); | ||
205 | local->nb -= 2; | ||
206 | |||
207 | if(global->flags & LWO_FLAG_LWO2) | ||
208 | face->vertex_count &= 0x03FF; | ||
209 | |||
210 | face->vertex_indices = g_new0(guint32, face->vertex_count); | ||
211 | |||
212 | if(obj->tex_vertices) { | ||
213 | face->flags |= G3D_FLAG_FAC_TEXMAP; | ||
214 | face->tex_vertex_count = face->vertex_count; | ||
215 | face->tex_vertex_data = g_new0(G3DFloat, face->tex_vertex_count * 2); | ||
216 | } | ||
217 | |||
218 | for(i = 0; i < face->vertex_count; i ++) { | ||
219 | if(global->flags & LWO_FLAG_LWO2) { | ||
220 | local->nb -= lwo_read_vx(global->stream, | ||
221 | &(face->vertex_indices[i])); | ||
222 | } else { | ||
223 | index = g3d_stream_read_int16_be(global->stream); | ||
224 | local->nb -= 2; | ||
225 | if(index < 0) { | ||
226 | skip_face = TRUE; | ||
227 | } else | ||
228 | face->vertex_indices[i] = index; | ||
229 | } | ||
230 | |||
231 | if(obj->tex_vertices) { | ||
232 | face->tex_vertex_data[i * 2 + 0] = | ||
233 | obj->tex_vertices[face->vertex_indices[i] * 2 + 0]; | ||
234 | face->tex_vertex_data[i * 2 + 1] = | ||
235 | obj->tex_vertices[face->vertex_indices[i] * 2 + 1]; | ||
236 | } | ||
237 | } /* i: 0..face->vertex_count */ | ||
238 | |||
239 | if(!(global->flags & LWO_FLAG_LWO2)) { | ||
240 | nmat = g3d_stream_read_int16_be(global->stream); | ||
241 | local->nb -= 2; | ||
242 | |||
243 | if(nmat < 0) { | ||
244 | /* detail polygons, skipped */ | ||
245 | det_cnt = g3d_stream_read_int16_be(global->stream); | ||
246 | local->nb -= 2; | ||
247 | nmat *= -1; | ||
248 | while(det_cnt-- > 0) { | ||
249 | cnt = g3d_stream_read_int16_be(global->stream); | ||
250 | local->nb -= 2; | ||
251 | g3d_stream_skip(global->stream, cnt * 2 + 2); | ||
252 | local->nb -= cnt * 2 + 2; | ||
253 | } | ||
254 | } else if(nmat == 0) { | ||
255 | nmat = 1; | ||
256 | } | ||
257 | |||
258 | face->material = g_slist_nth_data(global->model->materials, nmat); | ||
259 | |||
260 | if(face->material == NULL) { | ||
261 | #if 0 | ||
262 | g_warning("[LWO] face->material is NULL (#%d)\n", nmat - 1); | ||
263 | #endif | ||
264 | face->material = g_slist_nth_data(global->model->materials, 0); | ||
265 | } | ||
266 | } /* !LWO2 */ else { | ||
267 | face->material = g_slist_nth_data(global->model->materials, 0); | ||
268 | } /* LWO2 */ | ||
269 | |||
270 | if(skip_face || (face->vertex_count < 3)) { | ||
271 | if(face->tex_vertex_data) | ||
272 | g_free(face->tex_vertex_data); | ||
273 | g_free(face->vertex_indices); | ||
274 | g_free(face); | ||
275 | } else { | ||
276 | object->faces = g_slist_prepend(object->faces, face); | ||
277 | } | ||
278 | |||
279 | g3d_context_update_interface(global->context); | ||
280 | } /* local->nb > 0 */ | ||
281 | |||
282 | return TRUE; | ||
283 | } | ||
284 | |||
285 | /* poly tag mapping */ | ||
286 | gboolean lwo_cb_PTAG(G3DIffGlobal *global, G3DIffLocal *local) | ||
287 | { | ||
288 | LwoObject *obj; | ||
289 | G3DObject *object; | ||
290 | G3DMaterial *material, *tmat; | ||
291 | G3DFace *face; | ||
292 | GSList *mlist; | ||
293 | gint32 id, fmax; | ||
294 | guint32 poly, tag; | ||
295 | |||
296 | obj = (LwoObject *)global->user_data; | ||
297 | g_return_val_if_fail(obj != NULL, FALSE); | ||
298 | |||
299 | object = (G3DObject *)obj->object; | ||
300 | g_return_val_if_fail(object != NULL, FALSE); | ||
301 | |||
302 | id = g3d_stream_read_int32_be(global->stream); | ||
303 | local->nb -= 4; | ||
304 | |||
305 | if(id != G3D_IFF_MKID('S','U','R','F')) | ||
306 | return FALSE; | ||
307 | |||
308 | fmax = g_slist_length(object->faces) - 1; | ||
309 | |||
310 | while(local->nb > 0) | ||
311 | { | ||
312 | local->nb -= lwo_read_vx(global->stream, &poly); | ||
313 | tag = g3d_stream_read_int16_be(global->stream); | ||
314 | local->nb -= 2; | ||
315 | |||
316 | face = (G3DFace *)g_slist_nth_data(object->faces, fmax - poly); | ||
317 | g_return_val_if_fail(face != NULL, FALSE); | ||
318 | |||
319 | if(tag > obj->ntags) | ||
320 | { | ||
321 | g_warning("[LWO] tag %d not listed (%d tags)", tag, obj->ntags); | ||
322 | continue; | ||
323 | } | ||
324 | |||
325 | material = NULL; | ||
326 | mlist = global->model->materials; | ||
327 | while(mlist != NULL) | ||
328 | { | ||
329 | tmat = (G3DMaterial*)mlist->data; | ||
330 | if(strcmp(obj->tags[tag], tmat->name) == 0) | ||
331 | { | ||
332 | material = tmat; | ||
333 | break; | ||
334 | } | ||
335 | mlist = mlist->next; | ||
336 | } | ||
337 | |||
338 | if(material) | ||
339 | face->material = material; | ||
340 | else | ||
341 | g_warning("[LWO] unknown material tag %s", obj->tags[tag]); | ||
342 | } | ||
343 | |||
344 | return TRUE; | ||
345 | } | ||
346 | |||
347 | /* specularity */ | ||
348 | gboolean lwo_cb_SPEC(G3DIffGlobal *global, G3DIffLocal *local) | ||
349 | { | ||
350 | G3DMaterial *material; | ||
351 | GLfloat tmpf; | ||
352 | |||
353 | material = (G3DMaterial *)local->object; | ||
354 | g_return_val_if_fail(material != NULL, FALSE); | ||
355 | |||
356 | if(global->flags & LWO_FLAG_LWO2) | ||
357 | { | ||
358 | tmpf = 1.0 - g3d_stream_read_float_be(global->stream); | ||
359 | local->nb -= 4; | ||
360 | } | ||
361 | else | ||
362 | { | ||
363 | tmpf = 1.0 - (GLfloat)g3d_stream_read_int16_be(global->stream) / 256.0; | ||
364 | local->nb -= 2; | ||
365 | } | ||
366 | |||
367 | material->specular[0] = material->r * tmpf; | ||
368 | material->specular[1] = material->g * tmpf; | ||
369 | material->specular[2] = material->b * tmpf; | ||
370 | |||
371 | return TRUE; | ||
372 | } | ||
373 | |||
374 | /* surfaces */ | ||
375 | gboolean lwo_cb_SRFS(G3DIffGlobal *global, G3DIffLocal *local) | ||
376 | { | ||
377 | LwoObject *obj; | ||
378 | G3DMaterial *material; | ||
379 | gchar buffer[512]; | ||
380 | |||
381 | obj = (LwoObject *)global->user_data; | ||
382 | g_return_val_if_fail(obj != NULL, FALSE); | ||
383 | |||
384 | while(local->nb > 0) | ||
385 | { | ||
386 | material = g3d_material_new(); | ||
387 | local->nb -= lwo_read_string(global->stream, buffer); | ||
388 | material->name = g_strdup(buffer); | ||
389 | global->model->materials = g_slist_append(global->model->materials, | ||
390 | material); | ||
391 | |||
392 | } | ||
393 | |||
394 | return TRUE; | ||
395 | } | ||
396 | |||
397 | /* still image */ | ||
398 | gboolean lwo_cb_STIL(G3DIffGlobal *global, G3DIffLocal *local) | ||
399 | { | ||
400 | LwoObject *obj; | ||
401 | |||
402 | gchar buffer[512]; | ||
403 | |||
404 | obj = (LwoObject *)global->user_data; | ||
405 | g_return_val_if_fail(obj != NULL, FALSE); | ||
406 | |||
407 | local->nb -= lwo_read_string(global->stream, buffer); | ||
408 | |||
409 | g_free(obj->clipfiles[obj->nclips - 1]); | ||
410 | obj->clipfiles[obj->nclips - 1] = g_strdup(buffer); | ||
411 | obj->clipfiles[obj->nclips] = NULL; | ||
412 | |||
413 | return TRUE; | ||
414 | } | ||
415 | |||
416 | /* surface */ | ||
417 | gboolean lwo_cb_SURF(G3DIffGlobal *global, G3DIffLocal *local) | ||
418 | { | ||
419 | LwoObject *obj; | ||
420 | G3DObject *object; | ||
421 | G3DMaterial *material = NULL, *tmat; | ||
422 | GSList *mlist; | ||
423 | gchar name[512]; | ||
424 | |||
425 | obj = (LwoObject *)global->user_data; | ||
426 | g_return_val_if_fail(obj != NULL, FALSE); | ||
427 | |||
428 | object = (G3DObject *)obj->object; | ||
429 | g_return_val_if_fail(object != NULL, FALSE); | ||
430 | |||
431 | if(!local->finalize) | ||
432 | { | ||
433 | local->nb -= lwo_read_string(global->stream, name); | ||
434 | |||
435 | if(global->flags & LWO_FLAG_LWO2) | ||
436 | { | ||
437 | g3d_stream_read_int16_be(global->stream); | ||
438 | local->nb -= 2; | ||
439 | } | ||
440 | |||
441 | mlist = global->model->materials; | ||
442 | while(mlist != NULL) | ||
443 | { | ||
444 | tmat = (G3DMaterial*)mlist->data; | ||
445 | if(strcmp(name, tmat->name) == 0) | ||
446 | { | ||
447 | material = tmat; | ||
448 | break; | ||
449 | } | ||
450 | mlist = mlist->next; | ||
451 | } | ||
452 | |||
453 | if(material == NULL) | ||
454 | { | ||
455 | material = g3d_material_new(); | ||
456 | material->name = g_strdup(name); | ||
457 | global->model->materials = g_slist_append(global->model->materials, | ||
458 | material); | ||
459 | } | ||
460 | |||
461 | local->object = material; | ||
462 | } | ||
463 | |||
464 | return TRUE; | ||
465 | } | ||
466 | |||
467 | /* tags */ | ||
468 | gboolean lwo_cb_TAGS(G3DIffGlobal *global, G3DIffLocal *local) | ||
469 | { | ||
470 | LwoObject *obj; | ||
471 | G3DMaterial *material; | ||
472 | gchar buffer[512]; | ||
473 | |||
474 | obj = (LwoObject *)global->user_data; | ||
475 | g_return_val_if_fail(obj != NULL, FALSE); | ||
476 | |||
477 | if(obj->ntags) | ||
478 | { | ||
479 | g_strfreev(obj->tags); | ||
480 | obj->ntags = 0; | ||
481 | } | ||
482 | |||
483 | /* read tags */ | ||
484 | while(local->nb > 0) | ||
485 | { | ||
486 | local->nb -= lwo_read_string(global->stream, buffer); | ||
487 | obj->ntags ++; | ||
488 | obj->tags = g_realloc(obj->tags, (1 + obj->ntags) * sizeof(gchar *)); | ||
489 | obj->tags[obj->ntags - 1] = g_strdup(buffer); | ||
490 | obj->tags[obj->ntags] = NULL; | ||
491 | |||
492 | material = g3d_material_new(); | ||
493 | material->name = g_strdup(buffer); | ||
494 | global->model->materials = g_slist_append(global->model->materials, | ||
495 | material); | ||
496 | } | ||
497 | |||
498 | return TRUE; | ||
499 | } | ||
500 | |||
501 | /* transparency */ | ||
502 | gboolean lwo_cb_TRAN(G3DIffGlobal *global, G3DIffLocal *local) | ||
503 | { | ||
504 | G3DMaterial *material; | ||
505 | |||
506 | material = (G3DMaterial *)local->object; | ||
507 | g_return_val_if_fail(material != NULL, FALSE); | ||
508 | |||
509 | if(global->flags & LWO_FLAG_LWO2) { | ||
510 | material->a = 1.0 - g3d_stream_read_float_be(global->stream); | ||
511 | local->nb -= 4; | ||
512 | } else { | ||
513 | material->a = 1.0 - | ||
514 | (G3DFloat)g3d_stream_read_int16_be(global->stream) / 256.0; | ||
515 | local->nb -= 2; | ||
516 | } | ||
517 | if(material->a < 0.1) | ||
518 | material->a = 0.1; | ||
519 | |||
520 | return TRUE; | ||
521 | } | ||
522 | |||
523 | /* vertex mapping */ | ||
524 | gboolean lwo_cb_VMAP(G3DIffGlobal *global, G3DIffLocal *local) | ||
525 | { | ||
526 | LwoObject *obj; | ||
527 | guint32 index, type, dim; | ||
528 | gchar buffer[512], *tmp; | ||
529 | |||
530 | obj = (LwoObject *)global->user_data; | ||
531 | g_return_val_if_fail(obj != NULL, FALSE); | ||
532 | |||
533 | tmp = g3d_iff_id_to_text(local->parent_id); | ||
534 | g_debug("[LWO][VMAP] parent is %s", tmp); | ||
535 | g_free(tmp); | ||
536 | |||
537 | if(local->parent_id == G3D_IFF_MKID('L','W','O','2')) | ||
538 | { | ||
539 | type = g3d_stream_read_int32_be(global->stream); | ||
540 | local->nb -= 4; | ||
541 | |||
542 | dim = g3d_stream_read_int16_be(global->stream); | ||
543 | local->nb -= 2; | ||
544 | |||
545 | local->nb -= lwo_read_string(global->stream, buffer); | ||
546 | |||
547 | if(type == G3D_IFF_MKID('T','X','U','V')) | ||
548 | { | ||
549 | g_debug("[LWO][VMAP] **TXUV**"); | ||
550 | |||
551 | g_return_val_if_fail(obj->tex_vertices == NULL, FALSE); | ||
552 | |||
553 | obj->tex_vertices = g_new0(G3DFloat, | ||
554 | obj->object->vertex_count * 2); | ||
555 | |||
556 | while(local->nb > 0) | ||
557 | { | ||
558 | local->nb -= lwo_read_vx(global->stream, &index); | ||
559 | g_return_val_if_fail(index < obj->object->vertex_count, FALSE); | ||
560 | |||
561 | obj->tex_vertices[index * 2 + 0] = | ||
562 | g3d_stream_read_float_be(global->stream); | ||
563 | obj->tex_vertices[index * 2 + 1] = 1.0 - | ||
564 | g3d_stream_read_float_be(global->stream); | ||
565 | #if DEBUG > 0 | ||
566 | if((obj->tex_vertices[index * 2 + 0] > 1.0) || | ||
567 | (obj->tex_vertices[index * 2 + 1] > 1.0)) | ||
568 | g_debug("LWO: TXUV: %.2f, %.2f", | ||
569 | obj->tex_vertices[index * 2 + 0], | ||
570 | obj->tex_vertices[index * 2 + 1]); | ||
571 | #endif | ||
572 | local->nb -= 8; | ||
573 | } | ||
574 | } | ||
575 | else | ||
576 | { | ||
577 | tmp = g3d_iff_id_to_text(type); | ||
578 | g_warning("[LWO][VMAP] unhandled vertex mapping %s", tmp); | ||
579 | g_free(tmp); | ||
580 | } | ||
581 | } | ||
582 | |||
583 | return TRUE; | ||
584 | } | ||
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_lwo/imp_lwo_callbacks.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_lwo/imp_lwo_callbacks.h new file mode 100644 index 0000000..5b8e2e4 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_lwo/imp_lwo_callbacks.h | |||
@@ -0,0 +1,41 @@ | |||
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_LWO_CALLBACKS_H | ||
23 | #define _IMP_LWO_CALLBACKS_H | ||
24 | |||
25 | #include <g3d/iff.h> | ||
26 | |||
27 | gboolean lwo_cb_CLIP(G3DIffGlobal *global, G3DIffLocal *local); | ||
28 | gboolean lwo_cb_COLR(G3DIffGlobal *global, G3DIffLocal *local); | ||
29 | gboolean lwo_cb_IMAG(G3DIffGlobal *global, G3DIffLocal *local); | ||
30 | gboolean lwo_cb_PNTS(G3DIffGlobal *global, G3DIffLocal *local); | ||
31 | gboolean lwo_cb_POLS(G3DIffGlobal *global, G3DIffLocal *local); | ||
32 | gboolean lwo_cb_PTAG(G3DIffGlobal *global, G3DIffLocal *local); | ||
33 | gboolean lwo_cb_SPEC(G3DIffGlobal *global, G3DIffLocal *local); | ||
34 | gboolean lwo_cb_SRFS(G3DIffGlobal *global, G3DIffLocal *local); | ||
35 | gboolean lwo_cb_STIL(G3DIffGlobal *global, G3DIffLocal *local); | ||
36 | gboolean lwo_cb_SURF(G3DIffGlobal *global, G3DIffLocal *local); | ||
37 | gboolean lwo_cb_TAGS(G3DIffGlobal *global, G3DIffLocal *local); | ||
38 | gboolean lwo_cb_TRAN(G3DIffGlobal *global, G3DIffLocal *local); | ||
39 | gboolean lwo_cb_VMAP(G3DIffGlobal *global, G3DIffLocal *local); | ||
40 | |||
41 | #endif | ||
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_lwo/imp_lwo_chunks.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_lwo/imp_lwo_chunks.h new file mode 100644 index 0000000..ddc7832 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_lwo/imp_lwo_chunks.h | |||
@@ -0,0 +1,124 @@ | |||
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_LWO_CHUNKS_H | ||
23 | #define _IMP_LWO_CHUNKS_H | ||
24 | |||
25 | #include <g3d/iff.h> | ||
26 | |||
27 | #include "imp_lwo_callbacks.h" | ||
28 | |||
29 | static G3DIffChunkInfo lwo_chunks[] = { | ||
30 | { "AAST", "antialiasing strength", 0, NULL }, | ||
31 | { "ADTR", "additive transparency", 0, NULL }, | ||
32 | { "ALPH", "alpha mode", 0, NULL }, | ||
33 | { "AXIS", "major axis", 0, NULL }, | ||
34 | { "BBOX", "bounding box", 0, NULL }, | ||
35 | { "BLOK", "block", 1, NULL }, | ||
36 | { "BTEX", "unknown", 0, NULL }, | ||
37 | { "BUMP", "bump intensity", 0, NULL }, | ||
38 | { "CLIP", "image or image sequence", 1, lwo_cb_CLIP }, | ||
39 | { "CLRF", "color filter", 0, NULL }, | ||
40 | { "CLRH", "color highlights", 0, NULL }, | ||
41 | { "CMNT", "unknown", 0, NULL }, | ||
42 | { "COLR", "color", 0, lwo_cb_COLR }, | ||
43 | { "CTEX", "unknown", 0, NULL }, | ||
44 | { "DESC", "description", 0, NULL }, | ||
45 | { "DIFF", "diffuse", 0, NULL }, | ||
46 | { "DTEX", "unknown", 0, NULL }, | ||
47 | { "FKEY", "gradient key values", 0, NULL }, | ||
48 | { "FLAG", "flags", 0, NULL }, | ||
49 | { "FUNC", "algorithm and parameters", 0, NULL }, | ||
50 | { "GLOS", "specular glossiness", 0, NULL }, | ||
51 | { "GRAD", "gradient texture (header)", 0, NULL }, | ||
52 | { "GREN", "gradient end", 0, NULL }, | ||
53 | { "GRPT", "gradient repeat mode", 0, NULL }, | ||
54 | { "GRST", "gradient start", 0, NULL }, | ||
55 | { "GVAL", "glow value", 0, NULL }, | ||
56 | { "ICON", "icon", 0, NULL }, | ||
57 | { "IKEY", "gradient key parameters", 0, NULL }, | ||
58 | { "IMAG", "image index", 0, lwo_cb_IMAG }, | ||
59 | { "IMAP", "image map (header)", 0, NULL }, | ||
60 | { "INAM", "item name", 0, NULL }, | ||
61 | { "LAYR", "layer", 0, NULL }, | ||
62 | { "LTEX", "unknown", 0, NULL }, | ||
63 | { "LUMI", "luminosity", 0, NULL }, | ||
64 | { "PIXB", "pixel blending", 0, NULL }, | ||
65 | { "PNAM", "parameter name", 0, NULL }, | ||
66 | { "PNTS", "points", 0, lwo_cb_PNTS }, | ||
67 | { "POLS", "polygons", 0, lwo_cb_POLS }, | ||
68 | { "PROC", "procedural texture (header)", 0, NULL }, | ||
69 | { "PROJ", "projection mode", 0, NULL }, | ||
70 | { "PTAG", "polygon tag mapping", 0, lwo_cb_PTAG }, | ||
71 | { "RBLR", "reflection blurring", 0, NULL }, | ||
72 | { "REFL", "reflection", 0, NULL }, | ||
73 | { "RFLT", "unknown", 0, NULL }, | ||
74 | { "RFOP", "reflection options", 0, NULL }, | ||
75 | { "RIMG", "reflection map image", 0, NULL }, | ||
76 | { "RIND", "refractive index", 0, NULL }, | ||
77 | { "RSAN", "reflection map seam angle", 0, NULL }, | ||
78 | { "SHDR", "shader", 0, NULL }, | ||
79 | { "SIDE", "polygon sidedness", 0, NULL }, | ||
80 | { "SMAN", "max smooting angle", 0, NULL }, | ||
81 | { "SPEC", "specular", 0, lwo_cb_SPEC }, | ||
82 | { "SRFS", "surface materials", 0, lwo_cb_SRFS }, | ||
83 | { "STEX", "unknown", 0, NULL }, | ||
84 | { "STIL", "still image", 0, lwo_cb_STIL }, | ||
85 | { "SURF", "surface material", 1, lwo_cb_SURF }, | ||
86 | { "TAAS", "unknown", 0, NULL }, | ||
87 | { "TAGS", "tags", 0, lwo_cb_TAGS }, | ||
88 | { "TAMP", "texture amplitude", 0, NULL }, | ||
89 | { "TCLR", "unknown", 0, NULL }, | ||
90 | { "TCTR", "unknown", 0, NULL }, | ||
91 | { "TEXT", "commentary text", 0, NULL }, | ||
92 | { "TFAL", "unknown", 0, NULL }, | ||
93 | { "TFLG", "unknown", 0, NULL }, | ||
94 | { "TFP0", "unknown", 0, NULL }, | ||
95 | { "TFP1", "unknown", 0, NULL }, | ||
96 | { "TFP2", "unknown", 0, NULL }, | ||
97 | { "TFP3", "unknown", 0, NULL }, | ||
98 | { "TFRQ", "unknown", 0, NULL }, | ||
99 | { "TIMG", "refraction map image", 0, NULL }, | ||
100 | { "TIP0", "unknown", 0, NULL }, | ||
101 | { "TMAP", "texture map", 0, NULL }, | ||
102 | { "TRAN", "transparency", 0, lwo_cb_TRAN }, | ||
103 | { "TRNL", "translucency", 0, NULL }, | ||
104 | { "TROP", "transparency options", 0, NULL }, | ||
105 | { "TSIZ", "unknown", 0, NULL }, | ||
106 | { "TSP0", "unknown", 0, NULL }, | ||
107 | { "TTEX", "unknown", 0, NULL }, | ||
108 | { "TVAL", "unknown", 0, NULL }, | ||
109 | { "VALU", "basic value", 0, NULL }, | ||
110 | { "VDIF", "unknown", 0, NULL }, | ||
111 | { "VMAD", "discontinuous vertex map", 0, NULL }, | ||
112 | { "VMAP", "uv vertex map", 0, lwo_cb_VMAP }, | ||
113 | { "VMPA", "vertex map parameters", 0, NULL }, | ||
114 | { "VRFL", "unknown", 0, NULL }, | ||
115 | { "VSPC", "unknown", 0, NULL }, | ||
116 | { "VTRN", "unknown", 0, NULL }, | ||
117 | { "WRAP", "image wrap options", 0, NULL }, | ||
118 | { "WRPH", "wrap amount (width)", 0, NULL }, | ||
119 | { "WRPW", "wrap amount (height)", 0, NULL }, | ||
120 | |||
121 | { NULL, NULL, 0, NULL } | ||
122 | }; | ||
123 | |||
124 | #endif /* _IMP_LWO_CHUNKS_H */ | ||