diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-09-03 14:12:25 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-09-03 14:12:25 +0400 |
commit | 95f7264014994a65bd022a670e6d89d0e4f72229 (patch) | |
tree | bfb73465f7b236c2d66dbae16935410afccf23ce /source/blender/blenloader | |
parent | b8b5bf7dcde37d1be38f0dbbbbf268a4c292d4d8 (diff) |
code cleanup: split out defines in BKE_utildefines.h into BLO_blend_defs.h and ui defines in interface_intern.h
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/BLO_blend_defs.h | 47 | ||||
-rw-r--r-- | source/blender/blenloader/CMakeLists.txt | 1 | ||||
-rw-r--r-- | source/blender/blenloader/intern/readblenentry.c | 1 | ||||
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 1 | ||||
-rw-r--r-- | source/blender/blenloader/intern/writefile.c | 1 |
5 files changed, 51 insertions, 0 deletions
diff --git a/source/blender/blenloader/BLO_blend_defs.h b/source/blender/blenloader/BLO_blend_defs.h new file mode 100644 index 00000000000..8005be158ce --- /dev/null +++ b/source/blender/blenloader/BLO_blend_defs.h @@ -0,0 +1,47 @@ +/* + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * ***** END GPL LICENSE BLOCK ***** + */ +#ifndef __BLO_BLEND_DEFS_H__ +#define __BLO_BLEND_DEFS_H__ + +/** \file BLO_blend_defs.h + * \ingroup blenloader + * \brief defines for blendfile codes + */ + +/* INTEGER CODES */ +#ifdef __BIG_ENDIAN__ +/* Big Endian */ +# define BLEND_MAKE_ID(a, b, c, d) ( (int)(a) << 24 | (int)(b) << 16 | (c) << 8 | (d) ) +#else +/* Little Endian */ +# define BLEND_MAKE_ID(a, b, c, d) ( (int)(d) << 24 | (int)(c) << 16 | (b) << 8 | (a) ) +#endif + +#define DATA BLEND_MAKE_ID('D', 'A', 'T', 'A') +#define GLOB BLEND_MAKE_ID('G', 'L', 'O', 'B') + +#define DNA1 BLEND_MAKE_ID('D', 'N', 'A', '1') +#define TEST BLEND_MAKE_ID('T', 'E', 'S', 'T') /* used as preview between 'REND' and 'GLOB' */ +#define REND BLEND_MAKE_ID('R', 'E', 'N', 'D') +#define USER BLEND_MAKE_ID('U', 'S', 'E', 'R') + +#define ENDB BLEND_MAKE_ID('E', 'N', 'D', 'B') + +#endif /* __BLO_BLEND_DEFS_H__ */ diff --git a/source/blender/blenloader/CMakeLists.txt b/source/blender/blenloader/CMakeLists.txt index a0fe042e7fb..74df5211dad 100644 --- a/source/blender/blenloader/CMakeLists.txt +++ b/source/blender/blenloader/CMakeLists.txt @@ -48,6 +48,7 @@ set(SRC intern/versioning_legacy.c intern/writefile.c + BLO_blend_defs.h BLO_readfile.h BLO_runtime.h BLO_soundfile.h diff --git a/source/blender/blenloader/intern/readblenentry.c b/source/blender/blenloader/intern/readblenentry.c index eb12a7bd837..6f4d9b2137c 100644 --- a/source/blender/blenloader/intern/readblenentry.c +++ b/source/blender/blenloader/intern/readblenentry.c @@ -59,6 +59,7 @@ #include "BLO_readfile.h" #include "BLO_undofile.h" +#include "BLO_blend_defs.h" #include "readfile.h" diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 5c8a50c76ca..890a2714d33 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -150,6 +150,7 @@ #include "BLO_readfile.h" #include "BLO_undofile.h" +#include "BLO_blend_defs.h" #include "RE_engine.h" diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 252e81537c4..3b502ae892b 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -163,6 +163,7 @@ Any case: direct data is ALWAYS after the lib block #include "BLO_writefile.h" #include "BLO_readfile.h" #include "BLO_undofile.h" +#include "BLO_blend_defs.h" #include "readfile.h" |