aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp
diff options
context:
space:
mode:
authorDavid Walter Seikel2016-03-29 02:16:55 +1000
committerDavid Walter Seikel2016-03-29 02:16:55 +1000
commitcb3716ffb584fe0f593b6f1669a8efdba1305104 (patch)
tree5d1ebc4b6fc17b30f4b34e7e64a2d9514893459b /src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp
parentAdd Prosody build script. (diff)
downloadSledjHamr-cb3716ffb584fe0f593b6f1669a8efdba1305104.zip
SledjHamr-cb3716ffb584fe0f593b6f1669a8efdba1305104.tar.gz
SledjHamr-cb3716ffb584fe0f593b6f1669a8efdba1305104.tar.bz2
SledjHamr-cb3716ffb584fe0f593b6f1669a8efdba1305104.tar.xz
Added my version of libg3d and friends.
Diffstat (limited to '')
-rw-r--r--src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/Makefile516
-rw-r--r--src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/Makefile.am24
-rw-r--r--src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/Makefile.in516
-rw-r--r--src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp.c218
-rw-r--r--src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp.h25
-rw-r--r--src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp_callbacks.c614
-rw-r--r--src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp_callbacks.h59
-rw-r--r--src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp_chunks.h62
-rw-r--r--src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp_read.c114
-rw-r--r--src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp_read.h35
-rw-r--r--src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp_types.h33
11 files changed, 2216 insertions, 0 deletions
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/Makefile b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/Makefile
new file mode 100644
index 0000000..0a8e16c
--- /dev/null
+++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/Makefile
@@ -0,0 +1,516 @@
1# Makefile.in generated by automake 1.10.1 from Makefile.am.
2# plugins/import/imp_skp/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_skp
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_skp_la_DEPENDENCIES = $(top_builddir)/src/libg3d.la
58am_imp_skp_la_OBJECTS = imp_skp.lo imp_skp_callbacks.lo \
59 imp_skp_read.lo
60imp_skp_la_OBJECTS = $(am_imp_skp_la_OBJECTS)
61#am_imp_skp_la_rpath = -rpath $(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_skp_la_SOURCES)
75DIST_SOURCES = $(imp_skp_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_skp
167abs_srcdir = /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp
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_skp.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
226AM_LDFLAGS = \
227 -no-undefined -module \
228 -avoid-version -export-dynamic
229
230imp_skp_la_SOURCES = imp_skp.c imp_skp.h imp_skp_types.h \
231 imp_skp_chunks.h imp_skp_callbacks.h imp_skp_callbacks.c \
232 imp_skp_read.c imp_skp_read.h
233
234imp_skp_la_LIBADD = $(top_builddir)/src/libg3d.la -Wl,--export-dynamic -pthread -lgmodule-2.0 -lrt -lgobject-2.0 -lglib-2.0
235all: all-am
236
237.SUFFIXES:
238.SUFFIXES: .c .lo .o .obj
239$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
240 @for dep in $?; do \
241 case '$(am__configure_deps)' in \
242 *$$dep*) \
243 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
244 && exit 0; \
245 exit 1;; \
246 esac; \
247 done; \
248 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/import/imp_skp/Makefile'; \
249 cd $(top_srcdir) && \
250 $(AUTOMAKE) --gnu plugins/import/imp_skp/Makefile
251.PRECIOUS: Makefile
252Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
253 @case '$?' in \
254 *config.status*) \
255 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
256 *) \
257 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
258 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
259 esac;
260
261$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
262 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
263
264$(top_srcdir)/configure: $(am__configure_deps)
265 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
266$(ACLOCAL_M4): $(am__aclocal_m4_deps)
267 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
268install-pluginimpLTLIBRARIES: $(pluginimp_LTLIBRARIES)
269 @$(NORMAL_INSTALL)
270 test -z "$(pluginimpdir)" || $(MKDIR_P) "$(DESTDIR)$(pluginimpdir)"
271 @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \
272 if test -f $$p; then \
273 f=$(am__strip_dir) \
274 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pluginimpLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(pluginimpdir)/$$f'"; \
275 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pluginimpLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(pluginimpdir)/$$f"; \
276 else :; fi; \
277 done
278
279uninstall-pluginimpLTLIBRARIES:
280 @$(NORMAL_UNINSTALL)
281 @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \
282 p=$(am__strip_dir) \
283 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pluginimpdir)/$$p'"; \
284 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pluginimpdir)/$$p"; \
285 done
286
287clean-pluginimpLTLIBRARIES:
288 -test -z "$(pluginimp_LTLIBRARIES)" || rm -f $(pluginimp_LTLIBRARIES)
289 @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \
290 dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
291 test "$$dir" != "$$p" || dir=.; \
292 echo "rm -f \"$${dir}/so_locations\""; \
293 rm -f "$${dir}/so_locations"; \
294 done
295imp_skp.la: $(imp_skp_la_OBJECTS) $(imp_skp_la_DEPENDENCIES)
296 $(LINK) $(am_imp_skp_la_rpath) $(imp_skp_la_OBJECTS) $(imp_skp_la_LIBADD) $(LIBS)
297
298mostlyclean-compile:
299 -rm -f *.$(OBJEXT)
300
301distclean-compile:
302 -rm -f *.tab.c
303
304include ./$(DEPDIR)/imp_skp.Plo
305include ./$(DEPDIR)/imp_skp_callbacks.Plo
306include ./$(DEPDIR)/imp_skp_read.Plo
307
308.c.o:
309 $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
310 mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
311# source='$<' object='$@' libtool=no \
312# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
313# $(COMPILE) -c $<
314
315.c.obj:
316 $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
317 mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
318# source='$<' object='$@' libtool=no \
319# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
320# $(COMPILE) -c `$(CYGPATH_W) '$<'`
321
322.c.lo:
323 $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
324 mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
325# source='$<' object='$@' libtool=yes \
326# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
327# $(LTCOMPILE) -c -o $@ $<
328
329mostlyclean-libtool:
330 -rm -f *.lo
331
332clean-libtool:
333 -rm -rf .libs _libs
334
335ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
336 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
337 unique=`for i in $$list; do \
338 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
339 done | \
340 $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
341 END { if (nonempty) { for (i in files) print i; }; }'`; \
342 mkid -fID $$unique
343tags: TAGS
344
345TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
346 $(TAGS_FILES) $(LISP)
347 tags=; \
348 here=`pwd`; \
349 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
350 unique=`for i in $$list; do \
351 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
352 done | \
353 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
354 END { if (nonempty) { for (i in files) print i; }; }'`; \
355 if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
356 test -n "$$unique" || unique=$$empty_fix; \
357 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
358 $$tags $$unique; \
359 fi
360ctags: CTAGS
361CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
362 $(TAGS_FILES) $(LISP)
363 tags=; \
364 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
365 unique=`for i in $$list; do \
366 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
367 done | \
368 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
369 END { if (nonempty) { for (i in files) print i; }; }'`; \
370 test -z "$(CTAGS_ARGS)$$tags$$unique" \
371 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
372 $$tags $$unique
373
374GTAGS:
375 here=`$(am__cd) $(top_builddir) && pwd` \
376 && cd $(top_srcdir) \
377 && gtags -i $(GTAGS_ARGS) $$here
378
379distclean-tags:
380 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
381
382distdir: $(DISTFILES)
383 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
384 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
385 list='$(DISTFILES)'; \
386 dist_files=`for file in $$list; do echo $$file; done | \
387 sed -e "s|^$$srcdirstrip/||;t" \
388 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
389 case $$dist_files in \
390 */*) $(MKDIR_P) `echo "$$dist_files" | \
391 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
392 sort -u` ;; \
393 esac; \
394 for file in $$dist_files; do \
395 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
396 if test -d $$d/$$file; then \
397 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
398 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
399 cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
400 fi; \
401 cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
402 else \
403 test -f $(distdir)/$$file \
404 || cp -p $$d/$$file $(distdir)/$$file \
405 || exit 1; \
406 fi; \
407 done
408check-am: all-am
409check: check-am
410all-am: Makefile $(LTLIBRARIES)
411installdirs:
412 for dir in "$(DESTDIR)$(pluginimpdir)"; do \
413 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
414 done
415install: install-am
416install-exec: install-exec-am
417install-data: install-data-am
418uninstall: uninstall-am
419
420install-am: all-am
421 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
422
423installcheck: installcheck-am
424install-strip:
425 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
426 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
427 `test -z '$(STRIP)' || \
428 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
429mostlyclean-generic:
430
431clean-generic:
432
433distclean-generic:
434 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
435
436maintainer-clean-generic:
437 @echo "This command is intended for maintainers to use"
438 @echo "it deletes files that may require special tools to rebuild."
439clean: clean-am
440
441clean-am: clean-generic clean-libtool clean-pluginimpLTLIBRARIES \
442 mostlyclean-am
443
444distclean: distclean-am
445 -rm -rf ./$(DEPDIR)
446 -rm -f Makefile
447distclean-am: clean-am distclean-compile distclean-generic \
448 distclean-tags
449
450dvi: dvi-am
451
452dvi-am:
453
454html: html-am
455
456info: info-am
457
458info-am:
459
460install-data-am: install-pluginimpLTLIBRARIES
461
462install-dvi: install-dvi-am
463
464install-exec-am:
465
466install-html: install-html-am
467
468install-info: install-info-am
469
470install-man:
471
472install-pdf: install-pdf-am
473
474install-ps: install-ps-am
475
476installcheck-am:
477
478maintainer-clean: maintainer-clean-am
479 -rm -rf ./$(DEPDIR)
480 -rm -f Makefile
481maintainer-clean-am: distclean-am maintainer-clean-generic
482
483mostlyclean: mostlyclean-am
484
485mostlyclean-am: mostlyclean-compile mostlyclean-generic \
486 mostlyclean-libtool
487
488pdf: pdf-am
489
490pdf-am:
491
492ps: ps-am
493
494ps-am:
495
496uninstall-am: uninstall-pluginimpLTLIBRARIES
497
498.MAKE: install-am install-strip
499
500.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
501 clean-libtool clean-pluginimpLTLIBRARIES ctags distclean \
502 distclean-compile distclean-generic distclean-libtool \
503 distclean-tags distdir dvi dvi-am html html-am info info-am \
504 install install-am install-data install-data-am install-dvi \
505 install-dvi-am install-exec install-exec-am install-html \
506 install-html-am install-info install-info-am install-man \
507 install-pdf install-pdf-am install-pluginimpLTLIBRARIES \
508 install-ps install-ps-am install-strip installcheck \
509 installcheck-am installdirs maintainer-clean \
510 maintainer-clean-generic mostlyclean mostlyclean-compile \
511 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
512 tags uninstall uninstall-am uninstall-pluginimpLTLIBRARIES
513
514# Tell versions [3.59,3.63) of GNU make to not export all variables.
515# Otherwise a system limit (for SysV at least) may be exceeded.
516.NOEXPORT:
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/Makefile.am b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/Makefile.am
new file mode 100644
index 0000000..5aa678f
--- /dev/null
+++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/Makefile.am
@@ -0,0 +1,24 @@
1pluginimpdir = $(pkglibdir)/plugins/import
2
3if EXPERIMENTAL
4pluginimp_LTLIBRARIES = imp_skp.la
5endif
6
7AM_CFLAGS = \
8 -Wall -ansi -pedantic \
9 -DG_LOG_DOMAIN=\"LibG3D\" \
10 @DBG_CFLAGS@ -DDEBUG=@DEBUG@ \
11 @GLIB_CFLAGS@
12
13INCLUDES = -I$(top_srcdir)/include
14
15AM_LDFLAGS = \
16 -no-undefined -module \
17 @PLUGINS_LDFLAGS@
18
19LIBTOOL += --quiet
20
21imp_skp_la_SOURCES = imp_skp.c imp_skp.h imp_skp_types.h \
22 imp_skp_chunks.h imp_skp_callbacks.h imp_skp_callbacks.c \
23 imp_skp_read.c imp_skp_read.h
24imp_skp_la_LIBADD = $(top_builddir)/src/libg3d.la @GLIB_LIBS@
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/Makefile.in b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/Makefile.in
new file mode 100644
index 0000000..ace9150
--- /dev/null
+++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/Makefile.in
@@ -0,0 +1,516 @@
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_skp
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_skp_la_DEPENDENCIES = $(top_builddir)/src/libg3d.la
58am_imp_skp_la_OBJECTS = imp_skp.lo imp_skp_callbacks.lo \
59 imp_skp_read.lo
60imp_skp_la_OBJECTS = $(am_imp_skp_la_OBJECTS)
61@EXPERIMENTAL_TRUE@am_imp_skp_la_rpath = -rpath $(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_skp_la_SOURCES)
75DIST_SOURCES = $(imp_skp_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@pluginimp_LTLIBRARIES = imp_skp.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
226AM_LDFLAGS = \
227 -no-undefined -module \
228 @PLUGINS_LDFLAGS@
229
230imp_skp_la_SOURCES = imp_skp.c imp_skp.h imp_skp_types.h \
231 imp_skp_chunks.h imp_skp_callbacks.h imp_skp_callbacks.c \
232 imp_skp_read.c imp_skp_read.h
233
234imp_skp_la_LIBADD = $(top_builddir)/src/libg3d.la @GLIB_LIBS@
235all: all-am
236
237.SUFFIXES:
238.SUFFIXES: .c .lo .o .obj
239$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
240 @for dep in $?; do \
241 case '$(am__configure_deps)' in \
242 *$$dep*) \
243 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
244 && exit 0; \
245 exit 1;; \
246 esac; \
247 done; \
248 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/import/imp_skp/Makefile'; \
249 cd $(top_srcdir) && \
250 $(AUTOMAKE) --gnu plugins/import/imp_skp/Makefile
251.PRECIOUS: Makefile
252Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
253 @case '$?' in \
254 *config.status*) \
255 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
256 *) \
257 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
258 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
259 esac;
260
261$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
262 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
263
264$(top_srcdir)/configure: $(am__configure_deps)
265 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
266$(ACLOCAL_M4): $(am__aclocal_m4_deps)
267 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
268install-pluginimpLTLIBRARIES: $(pluginimp_LTLIBRARIES)
269 @$(NORMAL_INSTALL)
270 test -z "$(pluginimpdir)" || $(MKDIR_P) "$(DESTDIR)$(pluginimpdir)"
271 @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \
272 if test -f $$p; then \
273 f=$(am__strip_dir) \
274 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pluginimpLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(pluginimpdir)/$$f'"; \
275 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pluginimpLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(pluginimpdir)/$$f"; \
276 else :; fi; \
277 done
278
279uninstall-pluginimpLTLIBRARIES:
280 @$(NORMAL_UNINSTALL)
281 @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \
282 p=$(am__strip_dir) \
283 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pluginimpdir)/$$p'"; \
284 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pluginimpdir)/$$p"; \
285 done
286
287clean-pluginimpLTLIBRARIES:
288 -test -z "$(pluginimp_LTLIBRARIES)" || rm -f $(pluginimp_LTLIBRARIES)
289 @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \
290 dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
291 test "$$dir" != "$$p" || dir=.; \
292 echo "rm -f \"$${dir}/so_locations\""; \
293 rm -f "$${dir}/so_locations"; \
294 done
295imp_skp.la: $(imp_skp_la_OBJECTS) $(imp_skp_la_DEPENDENCIES)
296 $(LINK) $(am_imp_skp_la_rpath) $(imp_skp_la_OBJECTS) $(imp_skp_la_LIBADD) $(LIBS)
297
298mostlyclean-compile:
299 -rm -f *.$(OBJEXT)
300
301distclean-compile:
302 -rm -f *.tab.c
303
304@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imp_skp.Plo@am__quote@
305@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imp_skp_callbacks.Plo@am__quote@
306@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imp_skp_read.Plo@am__quote@
307
308.c.o:
309@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
310@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
311@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
312@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
313@am__fastdepCC_FALSE@ $(COMPILE) -c $<
314
315.c.obj:
316@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
317@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
318@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
319@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
320@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
321
322.c.lo:
323@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
324@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
325@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
326@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
327@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
328
329mostlyclean-libtool:
330 -rm -f *.lo
331
332clean-libtool:
333 -rm -rf .libs _libs
334
335ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
336 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
337 unique=`for i in $$list; do \
338 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
339 done | \
340 $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
341 END { if (nonempty) { for (i in files) print i; }; }'`; \
342 mkid -fID $$unique
343tags: TAGS
344
345TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
346 $(TAGS_FILES) $(LISP)
347 tags=; \
348 here=`pwd`; \
349 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
350 unique=`for i in $$list; do \
351 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
352 done | \
353 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
354 END { if (nonempty) { for (i in files) print i; }; }'`; \
355 if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
356 test -n "$$unique" || unique=$$empty_fix; \
357 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
358 $$tags $$unique; \
359 fi
360ctags: CTAGS
361CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
362 $(TAGS_FILES) $(LISP)
363 tags=; \
364 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
365 unique=`for i in $$list; do \
366 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
367 done | \
368 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
369 END { if (nonempty) { for (i in files) print i; }; }'`; \
370 test -z "$(CTAGS_ARGS)$$tags$$unique" \
371 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
372 $$tags $$unique
373
374GTAGS:
375 here=`$(am__cd) $(top_builddir) && pwd` \
376 && cd $(top_srcdir) \
377 && gtags -i $(GTAGS_ARGS) $$here
378
379distclean-tags:
380 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
381
382distdir: $(DISTFILES)
383 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
384 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
385 list='$(DISTFILES)'; \
386 dist_files=`for file in $$list; do echo $$file; done | \
387 sed -e "s|^$$srcdirstrip/||;t" \
388 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
389 case $$dist_files in \
390 */*) $(MKDIR_P) `echo "$$dist_files" | \
391 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
392 sort -u` ;; \
393 esac; \
394 for file in $$dist_files; do \
395 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
396 if test -d $$d/$$file; then \
397 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
398 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
399 cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
400 fi; \
401 cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
402 else \
403 test -f $(distdir)/$$file \
404 || cp -p $$d/$$file $(distdir)/$$file \
405 || exit 1; \
406 fi; \
407 done
408check-am: all-am
409check: check-am
410all-am: Makefile $(LTLIBRARIES)
411installdirs:
412 for dir in "$(DESTDIR)$(pluginimpdir)"; do \
413 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
414 done
415install: install-am
416install-exec: install-exec-am
417install-data: install-data-am
418uninstall: uninstall-am
419
420install-am: all-am
421 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
422
423installcheck: installcheck-am
424install-strip:
425 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
426 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
427 `test -z '$(STRIP)' || \
428 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
429mostlyclean-generic:
430
431clean-generic:
432
433distclean-generic:
434 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
435
436maintainer-clean-generic:
437 @echo "This command is intended for maintainers to use"
438 @echo "it deletes files that may require special tools to rebuild."
439clean: clean-am
440
441clean-am: clean-generic clean-libtool clean-pluginimpLTLIBRARIES \
442 mostlyclean-am
443
444distclean: distclean-am
445 -rm -rf ./$(DEPDIR)
446 -rm -f Makefile
447distclean-am: clean-am distclean-compile distclean-generic \
448 distclean-tags
449
450dvi: dvi-am
451
452dvi-am:
453
454html: html-am
455
456info: info-am
457
458info-am:
459
460install-data-am: install-pluginimpLTLIBRARIES
461
462install-dvi: install-dvi-am
463
464install-exec-am:
465
466install-html: install-html-am
467
468install-info: install-info-am
469
470install-man:
471
472install-pdf: install-pdf-am
473
474install-ps: install-ps-am
475
476installcheck-am:
477
478maintainer-clean: maintainer-clean-am
479 -rm -rf ./$(DEPDIR)
480 -rm -f Makefile
481maintainer-clean-am: distclean-am maintainer-clean-generic
482
483mostlyclean: mostlyclean-am
484
485mostlyclean-am: mostlyclean-compile mostlyclean-generic \
486 mostlyclean-libtool
487
488pdf: pdf-am
489
490pdf-am:
491
492ps: ps-am
493
494ps-am:
495
496uninstall-am: uninstall-pluginimpLTLIBRARIES
497
498.MAKE: install-am install-strip
499
500.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
501 clean-libtool clean-pluginimpLTLIBRARIES ctags distclean \
502 distclean-compile distclean-generic distclean-libtool \
503 distclean-tags distdir dvi dvi-am html html-am info info-am \
504 install install-am install-data install-data-am install-dvi \
505 install-dvi-am install-exec install-exec-am install-html \
506 install-html-am install-info install-info-am install-man \
507 install-pdf install-pdf-am install-pluginimpLTLIBRARIES \
508 install-ps install-ps-am install-strip installcheck \
509 installcheck-am installdirs maintainer-clean \
510 maintainer-clean-generic mostlyclean mostlyclean-compile \
511 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
512 tags uninstall uninstall-am uninstall-pluginimpLTLIBRARIES
513
514# Tell versions [3.59,3.63) of GNU make to not export all variables.
515# Otherwise a system limit (for SysV at least) may be exceeded.
516.NOEXPORT:
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp.c b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp.c
new file mode 100644
index 0000000..64b74c8
--- /dev/null
+++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp.c
@@ -0,0 +1,218 @@
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 <g3d/types.h>
26#include <g3d/context.h>
27#include <g3d/read.h>
28#include <g3d/stream.h>
29
30#include "imp_skp.h"
31#include "imp_skp_read.h"
32#include "imp_skp_chunks.h"
33
34static gboolean skp_parse_version_map(G3DStream *stream, guint32 *max_nlen,
35 guint32 *max_version);
36static gchar *skp_find_section(G3DStream *stream, guint32 max_nlen,
37 guint32 max_version, guint32 *version);
38static SkpChunkDesc *skp_get_chunk_desc(gchar *cname);
39
40EAPI
41gboolean plugin_load_model_from_stream(G3DContext *context, G3DStream *stream,
42 G3DModel *model, gpointer user_data)
43{
44 gchar *smagic, *sversion, *stmp, *ssection;
45 guint32 max_nlen = 0, max_version = 0, version = 0;
46 SkpChunkDesc *desc;
47 SkpGlobalData *global;
48 SkpLocalData *local;
49
50 smagic = skp_read_wchar(stream);
51 if(smagic == NULL) {
52 g_warning("not a valid .skp file: '%s'", stream->uri);
53 return FALSE;
54 }
55 sversion = skp_read_wchar(stream);
56 if(sversion == NULL) {
57 g_warning("failed to read version from '%s'", stream->uri);
58 g_free(smagic);
59 return FALSE;
60 }
61
62 g_debug("SKP: magic: '%s', version: '%s'", smagic, sversion);
63 g_free(smagic);
64 g_free(sversion);
65
66 g3d_stream_seek(stream, 16, G_SEEK_CUR);
67 stmp = skp_read_wchar(stream);
68 if(stmp != NULL)
69 g_free(stmp);
70 g3d_stream_read_int32_le(stream);
71
72 ssection = skp_read_char(stream);
73 if(ssection) {
74 if(strcmp(ssection, "CVersionMap") == 0)
75 g_debug("\\CVersionMap");
76 skp_parse_version_map(stream, &max_nlen, &max_version);
77 g_free(ssection);
78 }
79
80 global = g_new0(SkpGlobalData, 1);
81 global->context = context;
82 global->model = model;
83 global->stream = stream;
84
85 ssection = skp_find_section(stream, max_nlen, max_version, &version);
86 while(ssection != NULL) {
87 desc = skp_get_chunk_desc(ssection);
88 if(desc == NULL) {
89 g_warning("SKP: unknown chunk type '%s'", ssection);
90 } else {
91 if((version > desc->max_ver) || (version < desc->min_ver)) {
92 g_warning("SKP: %s: unhandled version %u (%u - %u)",
93 ssection, version, desc->min_ver, desc->max_ver);
94 } else {
95 if(desc->callback) {
96 local = g_new0(SkpLocalData, 1);
97 local->id = desc->id;
98 local->version = version;
99
100 desc->callback(global, local);
101
102 g_free(local);
103 }
104 } /* version check */
105 } /* has desc */
106
107 ssection = skp_find_section(stream, max_nlen, max_version, &version);
108 } /* sections */
109
110 /* clean up */
111 g_free(global);
112
113 return TRUE;
114}
115
116EAPI
117gchar *plugin_description(void)
118{
119 return g_strdup("SketchUp models.");
120}
121
122EAPI
123gchar **plugin_extensions(void)
124{
125 return g_strsplit("skp", ":", 0);
126}
127
128
129/*****************************************************************************/
130
131static gboolean skp_parse_version_map(G3DStream *stream, guint32 *max_nlen,
132 guint32 *max_version)
133{
134 gchar *part;
135 guint32 version;
136
137 while(TRUE) {
138 part = skp_read_wchar(stream);
139 if(part == NULL)
140 return FALSE;
141 version = g3d_stream_read_int32_le(stream);
142#if DEBUG > 1
143 g_debug("\t%-30s %u", part, version);
144#endif
145 if(strcmp(part, "End-Of-Version-Map") == 0) {
146 g_free(part);
147 return TRUE;
148 }
149
150 if(version > *max_version)
151 *max_version = version;
152 if(strlen(part) > *max_nlen)
153 *max_nlen = strlen(part);
154
155 g_free(part);
156 }
157 return FALSE;
158}
159
160static gchar *skp_find_section(G3DStream *stream, guint32 max_nlen,
161 guint32 max_version, guint32 *version)
162{
163 goffset offset;
164 guint32 ver, nlen;
165 guint16 w1;
166 gchar *name;
167
168 while(!g3d_stream_eof(stream) && (g3d_stream_read_int8(stream) != 0xFF));
169
170 if(g3d_stream_eof(stream))
171 return NULL;
172
173 offset = g3d_stream_tell(stream);
174 if(g3d_stream_read_int8(stream) != 0xFF) {
175 g3d_stream_seek(stream, offset, G_SEEK_SET);
176 return skp_find_section(stream, max_nlen, max_version, version);
177 }
178
179 ver = g3d_stream_read_int16_le(stream);
180 if(ver > max_version) {
181 g3d_stream_seek(stream, offset, G_SEEK_SET);
182 return skp_find_section(stream, max_nlen, max_version, version);
183 }
184
185 nlen = g3d_stream_read_int16_le(stream);
186 if(nlen > max_nlen) {
187 g3d_stream_seek(stream, offset, G_SEEK_SET);
188 return skp_find_section(stream, max_nlen, max_version, version);
189 }
190
191 name = g_new0(gchar, nlen + 1);
192 g3d_stream_read(stream, name, nlen);
193 if(name[0] != 'C') {
194 g_free(name);
195 g3d_stream_seek(stream, offset, G_SEEK_SET);
196 return skp_find_section(stream, max_nlen, max_version, version);
197 }
198 *version = ver;
199
200 w1 = g3d_stream_read_int16_le(stream);
201 g3d_stream_seek(stream, -2, G_SEEK_CUR);
202
203 g_debug("\\%-30s v%-2u @ 0x%08x (0x%04x)", name, ver,
204 (guint32)g3d_stream_tell(stream), w1);
205
206 return name;
207}
208
209static SkpChunkDesc *skp_get_chunk_desc(gchar *cname)
210{
211 guint32 i;
212
213 for(i = 0; skp_chunks[i].id != NULL; i ++) {
214 if(strcmp(cname, skp_chunks[i].id) == 0)
215 return &(skp_chunks[i]);
216 }
217 return NULL;
218}
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp.h
new file mode 100644
index 0000000..037b50b
--- /dev/null
+++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp.h
@@ -0,0 +1,25 @@
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_SKB_H
23#define _IMP_SKB_H
24
25#endif /* _IMP_SKB_H */
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp_callbacks.c b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp_callbacks.c
new file mode 100644
index 0000000..938a93c
--- /dev/null
+++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp_callbacks.c
@@ -0,0 +1,614 @@
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#include <g3d/types.h>
23#include <g3d/material.h>
24
25#include "imp_skp.h"
26#include "imp_skp_callbacks.h"
27#include "imp_skp_read.h"
28#include "imp_skp_types.h"
29
30gboolean skp_cb_arc_curve(SkpGlobalData *global, SkpLocalData *local)
31{
32 guint16 w1;
33
34 w1 = g3d_stream_read_int16_le(global->stream);
35 g_return_val_if_fail(w1 == 0x0000, FALSE);
36
37 return TRUE;
38}
39
40/*****************************************************************************/
41
42gboolean skp_cb_attribute_container(SkpGlobalData *global, SkpLocalData *local)
43{
44 guint16 w1;
45
46 w1 = g3d_stream_read_int16_le(global->stream);
47 g_return_val_if_fail(w1 == 0x0000, FALSE);
48
49 return TRUE;
50}
51
52/*****************************************************************************/
53
54gboolean skp_cb_attribute_named(SkpGlobalData *global, SkpLocalData *local)
55{
56 guint32 x1;
57 guint16 w1, w2, w3;
58 guint8 u1, u2;
59 gdouble d1;
60 gchar *name, *val, *tmp;
61
62 w1 = g3d_stream_read_int16_le(global->stream);
63 w2 = g3d_stream_read_int16_le(global->stream);
64 w3 = g3d_stream_read_int16_le(global->stream);
65
66 name = skp_read_wchar(global->stream);
67 while(name != NULL) {
68 tmp = skp_read_wchar(global->stream);
69 if(tmp != NULL) {
70 /* got a section */
71#if DEBUG > 1
72 g_debug("\t%s", name);
73#endif
74 g_free(name);
75 name = tmp;
76 continue;
77 }
78 u1 = g3d_stream_read_int8(global->stream);
79 switch(u1) {
80 case 0x00: /* end of CAttributeNamed */
81 g_free(name);
82 return TRUE;
83 break;
84 case 0x04: /* 32-bit */
85 x1 = g3d_stream_read_int32_le(global->stream);
86#if DEBUG > 1
87 g_debug("\t\t%-20s: 0x%08x", name, x1);
88#endif
89 break;
90 case 0x06: /* double */
91 d1 = g3d_stream_read_double_le(global->stream);
92#if DEBUG > 1
93 g_debug("\t\t%-20s: %.4f", name, d1);
94#endif
95 break;
96 case 0x07: /* boolean */
97 u2 = g3d_stream_read_int8(global->stream);
98#if DEBUG > 1
99 g_debug("\t\t%-20s: %s", name, (u2 ? "true" : "false"));
100#endif
101 break;
102 case 0x09: /* end of section? */
103 g3d_stream_seek(global->stream, 7, G_SEEK_CUR);
104#if DEBUG > 1
105 g_debug("\t\t%-20s: EOS", name);
106#endif
107 break;
108 case 0x0A: /* string */
109 val = skp_read_wchar(global->stream);
110 g_return_val_if_fail(val != NULL, FALSE);
111#if DEBUG > 1
112 g_debug("\t\t%-20s: %s", name, val);
113#endif
114 g_free(val);
115 break;
116 default:
117 g_warning(
118 "SKP: CAttributeNamed: unknown attribute type: 0x%02X",
119 u1);
120 return FALSE;
121 break;
122 }
123
124 g_free(name);
125 name = skp_read_wchar(global->stream);
126 }
127 return TRUE;
128}
129
130/*****************************************************************************/
131
132gboolean skp_cb_component_definition(SkpGlobalData *global,
133 SkpLocalData *local)
134{
135 SkpComponent *comp;
136 guint32 x1, w1;
137 gchar *s;
138 gdouble d1, d2;
139
140 w1 = g3d_stream_read_int16_le(global->stream);
141 g_return_val_if_fail(w1 == 0x0000, FALSE);
142
143 skp_read_10b(global->stream);
144 skp_read_10b(global->stream);
145
146 x1 = g3d_stream_read_int32_le(global->stream);
147 g_debug("CComponentDefinition: %d", x1);
148
149 w1 = g3d_stream_read_int16_le(global->stream);
150 if(!(w1 & 0x8000)) {
151 g_warning("CComponentDefinition: layerid=0x%04x", w1);
152 return FALSE;
153 }
154 w1 &= 0x7FFF;
155 g3d_stream_read_int16_le(global->stream); /* 0000 */
156
157 s = skp_read_wchar(global->stream);
158 if(s == NULL) {
159 g_warning("CComponentDefinition: s[0] == NULL");
160 return FALSE;
161 }
162 g3d_stream_seek(global->stream, 3, G_SEEK_CUR);
163 s = skp_read_wchar(global->stream);
164 if(s == NULL) {
165 g_warning("CComponentDefinition: s[1] == NULL");
166 return FALSE;
167 }
168 g3d_stream_seek(global->stream, 6, G_SEEK_CUR);
169 s = skp_read_wchar(global->stream);
170 if(s == NULL) {
171 g_warning("CComponentDefinition: s[2] == NULL");
172 return FALSE;
173 }
174
175 d1 = g3d_stream_read_double_le(global->stream);
176 d2 = g3d_stream_read_double_le(global->stream);
177 g_debug("CComponentDefinition: d1=%.2f, d2=%.2f", d1, d2);
178
179 g3d_stream_seek(global->stream, 5, G_SEEK_CUR);
180
181 comp = g_new0(SkpComponent, 1);
182 comp->layerid = w1;
183
184 comp->id0 = g3d_stream_read_int16_le(global->stream);
185 g3d_stream_read_int32_le(global->stream);
186 g3d_stream_read_int8(global->stream);
187 comp->id1 = g3d_stream_read_int16_le(global->stream);
188
189 g_debug("Component: 0x%02x, 0x%02x (0x%02x)",
190 comp->id0, comp->id1, comp->layerid);
191
192 global->components = g_slist_append(global->components, comp);
193
194 return TRUE;
195}
196
197/*****************************************************************************/
198
199static gboolean skp_read_5b(G3DStream *stream)
200{
201 guint32 w1, w2, u1;
202
203 w1 = g3d_stream_read_int16_le(stream);
204 u1 = g3d_stream_read_int8(stream);
205 w2 = g3d_stream_read_int16_le(stream);
206 g_debug("\tread 5b: %04x %02x %04x", w1, u1, w2);
207 return TRUE;
208}
209
210gboolean skp_cb_edge_use(SkpGlobalData *global, SkpLocalData *local)
211{
212 guint16 w1, w2;
213 guint32 x1;
214 gdouble d1, d2, d3, d4;
215 gboolean handled;
216 GSList *item;
217 SkpComponent *comp;
218
219 w1 = g3d_stream_read_int16_le(global->stream);
220 g_return_val_if_fail(w1 == 0x0000, FALSE);
221
222 skp_read_5b(global->stream);
223
224 do {
225 w1 = g3d_stream_read_int16_le(global->stream);
226 handled = FALSE;
227
228 g_debug("opcode: 0x%04x", w1);
229 if(w1 == 0xFFFF) {
230 g3d_stream_seek(global->stream, -2, G_SEEK_CUR);
231 return TRUE;
232 }
233 if(w1 & 0x8000) {
234 g3d_stream_read_int16_le(global->stream);
235 w1 &= 0x7FFF;
236 }
237 if(w1 == 0x0000) {
238 handled = TRUE;
239 }
240
241 for(item = global->components;
242 (handled == FALSE) && (item != NULL);
243 item = item->next) {
244
245 comp = item->data;
246
247 switch(w1 - comp->id0) {
248 case 1:
249 skp_read_10b(global->stream);
250 w2 = g3d_stream_read_int16_le(global->stream);
251 handled = TRUE;
252 g_debug("\tw2=0x%04x", w2);
253 break;
254 case 3:
255 skp_read_dbl3(global->stream, &d1, &d2, &d3);
256 g_debug("\tvertex: %.4f, %.4f, %.4f", d1, d2, d3);
257 handled = TRUE;
258 break;
259 case 4:
260 case 5:
261 case 7:
262 g_debug("\tempty");
263 handled = TRUE;
264 break;
265 default:
266 break;
267 }
268 if(handled)
269 break;
270 switch(w1 - comp->id1) {
271 case 0:
272 skp_read_10b(global->stream);
273 d1 = g3d_stream_read_double_le(global->stream);
274 d2 = g3d_stream_read_double_le(global->stream);
275 d3 = g3d_stream_read_double_le(global->stream);
276 d4 = g3d_stream_read_double_le(global->stream);
277 x1 = g3d_stream_read_int32_le(global->stream);
278 g_debug("\tid1+4: dbl4: %.2f, %.2f, %.2f, %.2f (%i)",
279 d1, d2, d3, d4, x1);
280 handled = TRUE;
281 break;
282 case 2:
283 w2 = g3d_stream_read_int16_le(global->stream);
284 g_debug("\ti16: 0x%04x", w2);
285 handled = TRUE;
286 break;
287 case 4:
288 skp_read_5b(global->stream);
289 handled = TRUE;
290 break;
291 case 5:
292 case 9:
293 case 17:
294 case 19:
295 g_debug("\tempty");
296 handled = TRUE;
297 break;
298 default:
299 break;
300 }
301 } /* loop through known layers */
302
303 if(handled == FALSE) {
304 g_debug("vertex: unknown opcode %#04x (layer0: 0x%04x, 0x%04x)",
305 w1,
306 global->components ?
307 ((SkpComponent *)(global->components->data))->id0 : -1,
308 global->components ?
309 ((SkpComponent *)(global->components->data))->id1 : -1);
310 }
311 } while(TRUE);
312
313 return FALSE;
314
315}
316
317/*****************************************************************************/
318
319gboolean skp_cb_face_texture_coords(SkpGlobalData *global, SkpLocalData *local)
320{
321#if DEBUG > 1
322 gint32 i;
323 guint16 w1;
324 G3DFloat f1, f2, f3, f4;
325
326 w1 = g3d_stream_read_int16_le(global->stream);
327 g_return_val_if_fail(w1 == 0x0000, FALSE);
328
329 for(i = 0; i < 24; i ++) {
330 f1 = g3d_stream_read_float_le(global->stream);
331 f2 = g3d_stream_read_float_le(global->stream);
332 f3 = g3d_stream_read_float_le(global->stream);
333 f4 = g3d_stream_read_float_le(global->stream);
334 g_debug("\tf: %.4f, %.4f, %.4f, %.4f", f1, f2, f3, f4);
335 }
336#endif
337 return TRUE;
338}
339
340/*****************************************************************************/
341
342gboolean skp_cb_layer(SkpGlobalData *global, SkpLocalData *local)
343{
344 guint32 x1;
345 guint16 w1;
346 guint8 u1, u2, u3;
347 gchar *s1, *s2;
348
349 do {
350 w1 = g3d_stream_read_int16_le(global->stream);
351 g_return_val_if_fail(w1 == 0x0000, FALSE);
352
353 s1 = skp_read_wchar(global->stream);
354 u1 = g3d_stream_read_int8(global->stream);
355 u2 = g3d_stream_read_int8(global->stream);
356 u3 = g3d_stream_read_int8(global->stream);
357
358 g_debug("\\ %s (0x%02X, 0x%02X, 0x%02X)", s1, u1, u2, u3);
359
360 s2 = skp_read_wchar(global->stream);
361 u1 = g3d_stream_read_int8(global->stream);
362 u2 = g3d_stream_read_int8(global->stream);
363 g_return_val_if_fail(u2 == 0x01, FALSE);
364
365 /* layer color? */
366 x1 = g3d_stream_read_int32_le(global->stream);
367 g_debug("\\ %s (0x%02X, 0x%02X, 0x%08x)", s2, u1, u2, x1);
368
369 x1 = g3d_stream_read_int32_le(global->stream);
370 if(x1 == 0x00fffeff)
371 g3d_stream_seek(global->stream, 21, G_SEEK_CUR);
372 else if(x1 == 0xfffffeff)
373 g3d_stream_seek(global->stream, 20, G_SEEK_CUR);
374 else {
375 g_warning("CLayer: unexpected value 0x%08x @ 0x%08x", x1,
376 (guint32)g3d_stream_tell(global->stream) - 4);
377 return FALSE;
378 }
379 w1 = g3d_stream_read_int16_le(global->stream);
380 global->layers = g_slist_append(global->layers,
381 GINT_TO_POINTER(w1 & 0x7FFF));
382 g_debug("CLayer ID: 0x%2x", w1 & 0x7FFF);
383
384 if(s1)
385 g_free(s1);
386 if(s2)
387 g_free(s2);
388
389 } while(w1 & 0x8000);
390
391 x1 = g3d_stream_read_int32_le(global->stream);
392 g_debug("CLayer: last 0x%08x", x1);
393
394 return TRUE;
395}
396
397/*****************************************************************************/
398
399gboolean skp_cb_material(SkpGlobalData *global, SkpLocalData *local)
400{
401 gchar *name, *tmp;
402 guint8 u1, u2, u3;
403 guint32 x1, type, size;
404 G3DFloat r, g, b, a;
405 G3DMaterial *material;
406
407 g3d_stream_read_int16_le(global->stream);
408
409 name = skp_read_wchar(global->stream);
410 while(name) {
411 tmp = NULL;
412 size = 0;
413
414 material = g3d_material_new();
415 material->name = g_strdup(name);
416 global->model->materials = g_slist_append(global->model->materials,
417 material);
418
419 type = g3d_stream_read_int16_le(global->stream);
420 switch(type) {
421 case 0x0000: /* simple color */
422 r = g3d_stream_read_int8(global->stream);
423 g = g3d_stream_read_int8(global->stream);
424 b = g3d_stream_read_int8(global->stream);
425 a = g3d_stream_read_int8(global->stream);
426
427 material->r = r / 255.0;
428 material->g = g / 255.0;
429 material->b = b / 255.0;
430 material->a = a / 255.0;
431#if DEBUG > 1
432 g_debug(
433 "\tmaterial: %-30s 0x%04x, "
434 "color (%.1f, %.1f, %.1f)",
435 name, type, material->r, material->g, material->b);
436#endif
437 break;
438
439 case 0x0001: /* texture */
440 u1 = g3d_stream_read_int8(global->stream);
441 u2 = g3d_stream_read_int8(global->stream);
442 u3 = g3d_stream_read_int8(global->stream);
443 if(u3 == 0x80) {
444 /* number of textures? */
445 x1 = g3d_stream_read_int32_le(global->stream);
446 if(x1 > 0) {
447 size = g3d_stream_read_int32_le(global->stream);
448 g3d_stream_seek(global->stream, size, G_SEEK_CUR);
449 }
450 } else {
451 x1 = 0x0004;
452 }
453 switch(x1) {
454 case 0x0000:
455 g3d_stream_seek(global->stream, 12, G_SEEK_CUR);
456 break;
457 case 0x0001:
458 g3d_stream_seek(global->stream, 20, G_SEEK_CUR);
459 break;
460 case 0x0002:
461 g3d_stream_seek(global->stream, 16, G_SEEK_CUR);
462 break;
463 case 0x0004:
464 g3d_stream_seek(global->stream, 16, G_SEEK_CUR);
465 break;
466 default:
467 g3d_stream_seek(global->stream, 16, G_SEEK_CUR);
468 g_debug("SKP: mat0001: x1=%x: "
469 "%02X%02X %02X%02X %02X%02X %02X%02X", x1,
470 g3d_stream_read_int8(global->stream),
471 g3d_stream_read_int8(global->stream),
472 g3d_stream_read_int8(global->stream),
473 g3d_stream_read_int8(global->stream),
474 g3d_stream_read_int8(global->stream),
475 g3d_stream_read_int8(global->stream),
476 g3d_stream_read_int8(global->stream),
477 g3d_stream_read_int8(global->stream));
478 break;
479 }
480 tmp = skp_read_wchar(global->stream);
481 g3d_stream_seek(global->stream, 8, G_SEEK_CUR);
482#if DEBUG > 1
483 g_debug(
484 "\tmaterial: %-30s 0x%04x, %02X, %02X, %02X, 0x%08x\n"
485 "\t\ttexture (%d bytes, 0x%08x):\n\t\t%s",
486 name, type, u1, u2, u3, x1, size,
487 (guint32)g3d_stream_tell(global->stream), tmp);
488#endif
489
490 break;
491
492 case 0x0101: /* texture */
493 /* number of textures? */
494 x1 = g3d_stream_read_int32_le(global->stream);
495 size = g3d_stream_read_int32_le(global->stream);
496 g3d_stream_seek(global->stream, size, G_SEEK_CUR);
497 g3d_stream_seek(global->stream, 16, G_SEEK_CUR);
498 tmp = skp_read_wchar(global->stream);
499 g3d_stream_seek(global->stream, 8, G_SEEK_CUR);
500#if DEBUG > 1
501 g_debug(
502 "\tmaterial: %-30s 0x%04x, 0x%08x\n"
503 "\t\ttexture (%i bytes):\n\t\t%s",
504 name, type, x1, size, tmp);
505#endif
506 break;
507
508 default:
509 g_debug("SKP: material: unknown type 0x%04X @ 0x%08x",
510 type, (guint32)g3d_stream_tell(global->stream));
511 return FALSE;
512 }
513
514 x1 = g3d_stream_read_int32_be(global->stream);
515 switch(x1 & 0x00FFL) {
516 case 0x00:
517 g3d_stream_seek(global->stream, 21, G_SEEK_CUR);
518 break;
519 case 0xFF:
520 g3d_stream_seek(global->stream, 22, G_SEEK_CUR);
521 break;
522 default:
523 g_debug("x1: 0x%08x", x1);
524 break;
525 }
526
527 /* clean up */
528 if(tmp)
529 g_free(tmp);
530 g_free(name);
531
532 /* next one */
533 name = skp_read_wchar(global->stream);
534 }
535 return TRUE;
536}
537
538/*****************************************************************************/
539
540gboolean skp_cb_vertex(SkpGlobalData *global, SkpLocalData *local)
541{
542 guint16 w1;
543 gdouble d1, d2, d3;
544 gboolean handled;
545 GSList *item;
546 SkpComponent *comp;
547
548 return FALSE;
549
550 w1 = g3d_stream_read_int16_le(global->stream);
551 g_return_val_if_fail(w1 == 0x0000, FALSE);
552
553 skp_read_dbl3(global->stream, &d1, &d2, &d3);
554 g_debug("\tvertex: %.4f, %.4f, %.4f", d1, d2, d3);
555
556 do {
557 w1 = g3d_stream_read_int16_le(global->stream);
558 handled = FALSE;
559
560 g_debug("opcode: 0x%04x", w1);
561 if(w1 == 0xFFFF) {
562 g3d_stream_seek(global->stream, -2, G_SEEK_CUR);
563 return TRUE;
564 }
565 if(w1 & 0x8000) {
566 g3d_stream_read_int16_le(global->stream);
567 w1 &= 0x7FFF;
568 }
569 if(w1 == 0x0000) {
570 handled = TRUE;
571 }
572
573 for(item = global->components;
574 (handled == FALSE) && (item != NULL);
575 item = item->next) {
576
577 comp = item->data;
578
579 switch(w1 - comp->id0) {
580 case 1:
581 skp_read_10b(global->stream);
582 handled = TRUE;
583 break;
584 case 3:
585 skp_read_dbl3(global->stream, &d1, &d2, &d3);
586 g_debug("\tvertex: %.4f, %.4f, %.4f", d1, d2, d3);
587 handled = TRUE;
588 break;
589 case 4:
590 case 5:
591 case 7:
592 case 9:
593 case 11:
594 case 13:
595 g_debug("\tempty");
596 handled = TRUE;
597 break;
598 default:
599 break;
600 }
601 } /* loop through known layers */
602
603 if(handled == FALSE) {
604 g_debug("vertex: unknown opcode %#04x (layer0: 0x%04x, 0x%04x)",
605 w1,
606 global->components ?
607 ((SkpComponent *)(global->components->data))->id0 : -1,
608 global->components ?
609 ((SkpComponent *)(global->components->data))->id1 : -1);
610 }
611 } while(TRUE);
612
613 return FALSE;
614}
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp_callbacks.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp_callbacks.h
new file mode 100644
index 0000000..92af752
--- /dev/null
+++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp_callbacks.h
@@ -0,0 +1,59 @@
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#ifndef _IMP_SKP_CALLBACKS_H
24#define _IMP_SKP_CALLBACKS_H
25
26#include <g3d/types.h>
27
28typedef struct {
29 G3DContext *context;
30 G3DModel *model;
31 G3DStream *stream;
32 GSList *layers;
33 GSList *components;
34} SkpGlobalData;
35
36typedef struct {
37 gchar *id;
38 guint32 version;
39 gpointer object;
40} SkpLocalData;
41
42typedef gboolean (* SkpCallback)(SkpGlobalData *global, SkpLocalData *local);
43
44/* callbacks */
45
46gboolean skp_cb_arc_curve(SkpGlobalData *global, SkpLocalData *local);
47gboolean skp_cb_attribute_container(SkpGlobalData *global,
48 SkpLocalData *local);
49gboolean skp_cb_attribute_named(SkpGlobalData *global, SkpLocalData *local);
50gboolean skp_cb_component_definition(SkpGlobalData *global,
51 SkpLocalData *local);
52gboolean skp_cb_edge_use(SkpGlobalData *global, SkpLocalData *local);
53gboolean skp_cb_face_texture_coords(SkpGlobalData *global,
54 SkpLocalData *local);
55gboolean skp_cb_layer(SkpGlobalData *global, SkpLocalData *local);
56gboolean skp_cb_material(SkpGlobalData *global, SkpLocalData *local);
57gboolean skp_cb_vertex(SkpGlobalData *global, SkpLocalData *local);
58
59#endif /* _IMP_SKP_CALLBACKS_H */
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp_chunks.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp_chunks.h
new file mode 100644
index 0000000..bbee439
--- /dev/null
+++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp_chunks.h
@@ -0,0 +1,62 @@
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#ifndef _IMP_SKP_CHUNKS_H
24#define _IMP_SKP_CHUNKS_H
25
26#include "imp_skp_callbacks.h"
27
28typedef struct {
29 gchar *id;
30 guint32 min_ver;
31 guint32 max_ver;
32 SkpCallback callback;
33} SkpChunkDesc;
34
35static SkpChunkDesc skp_chunks[] = {
36 { "CArcCurve", 1, 1, skp_cb_arc_curve },
37 { "CAttributeContainer", 0, 0, skp_cb_attribute_container },
38 { "CAttributeNamed", 0, 0, skp_cb_attribute_named },
39 { "CCamera", 4, 5, NULL },
40 { "CComponentDefinition", 10, 10, skp_cb_component_definition },
41 { "CComponentInstance", 4, 4, NULL },
42 { "CCurve", 4, 4, NULL },
43 { "CDib", 2, 3, NULL },
44 { "CEdge", 2, 2, NULL },
45 { "CEdgeUse", 1, 1, skp_cb_edge_use },
46 { "CFace", 3, 3, NULL },
47 { "CFaceTextureCoords", 4, 4, skp_cb_face_texture_coords },
48 { "CGroup", 1, 1, NULL },
49 { "CLayer", 2, 2, skp_cb_layer },
50 { "CLoop", 1, 1, NULL },
51 { "CMaterial", 12, 12, skp_cb_material },
52 { "CRelationship", 0, 0, NULL },
53 { "CSkFont", 0, 1, NULL },
54 { "CSkpStyle", 1, 1, NULL },
55 { "CThumbnail", 1, 1, NULL },
56 { "CVertex", 0, 0, skp_cb_vertex },
57 { "CViewPage", 9, 11, NULL },
58
59 { NULL, 0, 0, NULL }
60};
61
62#endif /* _IMP_SKP_CHUNKS_H */
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp_read.c b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp_read.c
new file mode 100644
index 0000000..7f95477
--- /dev/null
+++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp_read.c
@@ -0,0 +1,114 @@
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#include "imp_skp.h"
23#include "imp_skp_read.h"
24
25guint32 skp_read_xint16(G3DStream *stream)
26{
27 guint32 val;
28
29 val = g3d_stream_read_int16_le(stream);
30 if(val & 0x8000L) {
31 val &= 0x7FFF;
32 val |= (g3d_stream_read_int16_le(stream) << 16);
33 }
34 return val;
35}
36
37gchar *skp_read_char(G3DStream *stream)
38{
39 guint32 magic, n;
40 gchar *text;
41
42 magic = g3d_stream_read_int32_be(stream);
43 if(magic != 0xffff0000) {
44 g_warning("SKP: wrong text magic: 0x%08x", magic);
45 return NULL;
46 }
47 n = g3d_stream_read_int16_le(stream);
48
49 text = g_new0(gchar, n + 1);
50 g3d_stream_read(stream, text, n);
51
52 return text;
53}
54
55gchar *skp_read_wchar(G3DStream *stream)
56{
57 gint32 i;
58 guint32 magic, n;
59 gunichar2 *u16text;
60 gchar *text;
61 GError *error = NULL;
62
63 magic = g3d_stream_read_int32_be(stream);
64 if((magic & 0xFFFFFF00) != 0xfffeff00) {
65#if DEBUG > 1
66 g_debug("SKP: wrong UTF-16 magic: 0x%08x", magic);
67#endif
68 g3d_stream_seek(stream, -4, G_SEEK_CUR);
69 return NULL;
70 }
71 n = magic & 0x000000FF;
72
73 u16text = g_new0(gunichar2, n + 1);
74 for(i = 0; i < n; i ++) {
75 u16text[i] = g3d_stream_read_int16_le(stream);
76 }
77
78 text = g_utf16_to_utf8(u16text, n, NULL, NULL, &error);
79 if(error != NULL) {
80 g_warning("UTF-16 to UTF-8 conversion failed: %s",
81 error->message);
82 g_error_free(error);
83 }
84 g_free(u16text);
85
86 return text;
87}
88
89gboolean skp_read_dbl3(G3DStream *stream,
90 gdouble *d1, gdouble *d2, gdouble *d3)
91{
92 *d1 = g3d_stream_read_double_le(stream);
93 *d2 = g3d_stream_read_double_le(stream);
94 *d3 = g3d_stream_read_double_le(stream);
95 return TRUE;
96}
97
98gboolean skp_read_10b(G3DStream *stream)
99{
100 guint32 x1, x2;
101 guint8 u1, u2;
102
103 x1 = g3d_stream_read_int32_be(stream);
104 u1 = g3d_stream_read_int8(stream);
105
106 if(((x1 & 0x00FFFFFF) != 0x0001) || (u1 != 0x01)) {
107 g_warning("skp_read_10b: %#08x, %#02x", x1, u1);
108 }
109 u2 = g3d_stream_read_int8(stream);
110 x2 = g3d_stream_read_int32_le(stream);
111 g_debug("\tread 10b: %08x %02x %02x %08x", x1, u1, u2, x2);
112 return TRUE;
113}
114
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp_read.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp_read.h
new file mode 100644
index 0000000..fc1dc4d
--- /dev/null
+++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp_read.h
@@ -0,0 +1,35 @@
1#ifndef _IMP_SKP_READ_H
2/* $Id:$ */
3
4/*
5 libg3d - 3D object loading library
6
7 Copyright (C) 2005-2009 Markus Dahms <mad@automagically.de>
8
9 This library is free software; you can redistribute it and/or
10 modify it under the terms of the GNU Lesser General Public
11 License as published by the Free Software Foundation; either
12 version 2.1 of the License, or (at your option) any later version.
13
14 This library is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 Lesser General Public License for more details.
18
19 You should have received a copy of the GNU Lesser General Public
20 License along with this library; if not, write to the Free Software
21 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22*/
23#define _IMP_SKP_READ_H
24
25#include <g3d/stream.h>
26
27guint32 skp_read_xint16(G3DStream *stream);
28gchar *skp_read_char(G3DStream *stream);
29gchar *skp_read_wchar(G3DStream *stream);
30
31gboolean skp_read_dbl3(G3DStream *stream,
32 gdouble *d1, gdouble *d2, gdouble *d3);
33gboolean skp_read_10b(G3DStream *stream);
34
35#endif /* _IMP_SKP_READ_H */
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp_types.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp_types.h
new file mode 100644
index 0000000..a2a95c7
--- /dev/null
+++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp_types.h
@@ -0,0 +1,33 @@
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_SKP_TYPES_H
23#define _IMP_SKP_TYPES_H
24
25#include <glib.h>
26
27typedef struct {
28 guint32 id0;
29 guint32 id1;
30 guint32 layerid;
31} SkpComponent;
32
33#endif /* _IMP_SKP_TYPES_H */