aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_blend/imp_blend_def.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/others/mimesh/libg3d-0.0.8/plugins/import/imp_blend/imp_blend_def.h')
-rw-r--r--src/others/mimesh/libg3d-0.0.8/plugins/import/imp_blend/imp_blend_def.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_blend/imp_blend_def.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_blend/imp_blend_def.h
new file mode 100644
index 0000000..0a89af4
--- /dev/null
+++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_blend/imp_blend_def.h
@@ -0,0 +1,42 @@
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_BLEND_DEF_H
23#define _IMP_BLEND_DEF_H
24
25#include <glib.h>
26
27#define BLEND_HEADER_SIZE 12
28
29#define FLAG_LITTLE_ENDIAN 1
30#define FLAG_POINTERSIZE_4 4
31#define FLAG_POINTERSIZE_8 8
32#define FLAG_POINTER_MASK 0xC
33
34#define MKID(a,b,c,d) ((a) | ((b) << 8) | ((c) << 16) | ((d) << 24))
35#define MKID2(a,b) ((a) | ((b) << 8))
36
37static inline gchar blend_from_id(guint32 id, guint8 pos) {
38 guint8 c = ((id >> (pos * 8)) & 0xFF);
39 return ((c < 0x20) || (c > 0x7F)) ? '_' : c;
40}
41
42#endif /* _IMP_BLEND_DEF_H */