aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_flt/imp_flt_callbacks.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/others/mimesh/libg3d-0.0.8/plugins/import/imp_flt/imp_flt_callbacks.h')
-rw-r--r--src/others/mimesh/libg3d-0.0.8/plugins/import/imp_flt/imp_flt_callbacks.h95
1 files changed, 95 insertions, 0 deletions
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_flt/imp_flt_callbacks.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_flt/imp_flt_callbacks.h
new file mode 100644
index 0000000..cc26120
--- /dev/null
+++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_flt/imp_flt_callbacks.h
@@ -0,0 +1,95 @@
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_FLT_CALLBACKS_H
23#define _IMP_FLT_CALLBACKS_H
24
25#include <stdio.h>
26#include <glib.h>
27#include <g3d/types.h>
28#include <g3d/stream.h>
29
30typedef struct {
31 guint32 n_entries;
32 goffset offset;
33
34 goffset *offsets; /* n * goffset */
35 guint32 *flags; /* n * guint32 */
36 G3DMaterial **vertex_materials; /* n * G3DMaterial* */
37 G3DFloat *vertex_data; /* 3 x n * G3DFloat */
38 G3DFloat *normal_data; /* 3 x n * G3DFloat */
39 G3DFloat *tex_vertex_data; /* 2 x n * G3DFloat */
40} FltVertexPalette;
41
42typedef struct {
43 guint32 size;
44 G3DImage **textures;
45 gint32 *offsets;
46} FltTexturePalette;
47
48#define FLT_FLAG_BROKEN_VERTEX_LIST (1 << 0)
49
50#define FLT_FLAG_NO_COLOR (1 << 2)
51#define FLT_FLAG_PACKED_COLOR (1 << 3)
52
53typedef struct {
54 G3DContext *context;
55 G3DModel *model;
56 G3DStream *stream;
57 guint32 level;
58 GQueue *oqueue;
59 FltVertexPalette *vertex_palette;
60 FltTexturePalette *texture_palette;
61 guint32 fversion; /* format version */
62 guint32 flags;
63} FltGlobalData;
64
65typedef struct {
66 guint32 opcode;
67 G3DObject *g3dobj;
68 gpointer level_object;
69 gint32 nb;
70} FltLocalData;
71
72typedef gboolean (*FltCallbackFunc)(FltGlobalData *gd, FltLocalData *ld);
73
74/* callback functions */
75gboolean flt_cb_0001(FltGlobalData *gd, FltLocalData *ld);
76gboolean flt_cb_0002(FltGlobalData *gd, FltLocalData *ld);
77gboolean flt_cb_0004(FltGlobalData *gd, FltLocalData *ld);
78gboolean flt_cb_0005(FltGlobalData *gd, FltLocalData *ld);
79gboolean flt_cb_0010(FltGlobalData *gd, FltLocalData *ld);
80gboolean flt_cb_0011(FltGlobalData *gd, FltLocalData *ld);
81gboolean flt_cb_0032(FltGlobalData *gd, FltLocalData *ld);
82gboolean flt_cb_0033(FltGlobalData *gd, FltLocalData *ld);
83gboolean flt_cb_0064(FltGlobalData *gd, FltLocalData *ld);
84gboolean flt_cb_0067(FltGlobalData *gd, FltLocalData *ld);
85gboolean flt_cb_0068(FltGlobalData *gd, FltLocalData *ld);
86gboolean flt_cb_0069(FltGlobalData *gd, FltLocalData *ld);
87gboolean flt_cb_0070(FltGlobalData *gd, FltLocalData *ld);
88gboolean flt_cb_0071(FltGlobalData *gd, FltLocalData *ld);
89gboolean flt_cb_0072(FltGlobalData *gd, FltLocalData *ld);
90gboolean flt_cb_0084(FltGlobalData *gd, FltLocalData *ld);
91gboolean flt_cb_0085(FltGlobalData *gd, FltLocalData *ld);
92gboolean flt_cb_0086(FltGlobalData *gd, FltLocalData *ld);
93gboolean flt_cb_0113(FltGlobalData *gd, FltLocalData *ld);
94
95#endif /* _IMP_FLT_CALLBACKS_H */