Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_ID.h152
-rw-r--r--source/blender/makesdna/DNA_action_types.h102
-rw-r--r--source/blender/makesdna/DNA_actuator_types.h405
-rw-r--r--source/blender/makesdna/DNA_armature_types.h124
-rw-r--r--source/blender/makesdna/DNA_camera_types.h77
-rw-r--r--source/blender/makesdna/DNA_constraint_types.h158
-rw-r--r--source/blender/makesdna/DNA_controller_types.h78
-rw-r--r--source/blender/makesdna/DNA_curve_types.h202
-rw-r--r--source/blender/makesdna/DNA_documentation.h68
-rw-r--r--source/blender/makesdna/DNA_effect_types.h127
-rw-r--r--source/blender/makesdna/DNA_fileglobal_types.h47
-rw-r--r--source/blender/makesdna/DNA_group_types.h100
-rw-r--r--source/blender/makesdna/DNA_ika_types.h91
-rw-r--r--source/blender/makesdna/DNA_image_types.h86
-rw-r--r--source/blender/makesdna/DNA_ipo_types.h302
-rw-r--r--source/blender/makesdna/DNA_key_types.h84
-rw-r--r--source/blender/makesdna/DNA_lamp_types.h96
-rw-r--r--source/blender/makesdna/DNA_lattice_types.h65
-rw-r--r--source/blender/makesdna/DNA_listBase.h63
-rw-r--r--source/blender/makesdna/DNA_material_types.h162
-rw-r--r--source/blender/makesdna/DNA_mesh_types.h229
-rw-r--r--source/blender/makesdna/DNA_meta_types.h100
-rw-r--r--source/blender/makesdna/DNA_nla_types.h71
-rw-r--r--source/blender/makesdna/DNA_object_types.h316
-rw-r--r--source/blender/makesdna/DNA_oops_types.h68
-rw-r--r--source/blender/makesdna/DNA_packedFile_types.h63
-rw-r--r--source/blender/makesdna/DNA_property_types.h67
-rw-r--r--source/blender/makesdna/DNA_radio_types.h52
-rw-r--r--source/blender/makesdna/DNA_scene_types.h346
-rw-r--r--source/blender/makesdna/DNA_screen_types.h152
-rw-r--r--source/blender/makesdna/DNA_scriptlink_types.h63
-rw-r--r--source/blender/makesdna/DNA_sdna_types.h82
-rw-r--r--source/blender/makesdna/DNA_sensor_types.h225
-rw-r--r--source/blender/makesdna/DNA_sequence_types.h158
-rw-r--r--source/blender/makesdna/DNA_sound_types.h190
-rw-r--r--source/blender/makesdna/DNA_space_types.h471
-rw-r--r--source/blender/makesdna/DNA_text_types.h80
-rw-r--r--source/blender/makesdna/DNA_texture_types.h276
-rw-r--r--source/blender/makesdna/DNA_userdef_types.h105
-rw-r--r--source/blender/makesdna/DNA_vec_types.h91
-rw-r--r--source/blender/makesdna/DNA_vfont_types.h59
-rw-r--r--source/blender/makesdna/DNA_view2d_types.h52
-rw-r--r--source/blender/makesdna/DNA_view3d_types.h127
-rw-r--r--source/blender/makesdna/DNA_wave_types.h48
-rw-r--r--source/blender/makesdna/DNA_world_types.h119
-rw-r--r--source/blender/makesdna/Makefile42
-rw-r--r--source/blender/makesdna/intern/Makefile86
-rw-r--r--source/blender/makesdna/intern/dna.c874
-rw-r--r--source/blender/makesdna/intern/makesdna.c1121
49 files changed, 8322 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h
new file mode 100644
index 00000000000..9800f4a5f31
--- /dev/null
+++ b/source/blender/makesdna/DNA_ID.h
@@ -0,0 +1,152 @@
+/**
+ * blenlib/DNA_ID.h (mar-2001 nzc)
+ *
+ * ID and Library types, which are fundamental for sdna,
+ *
+ * $Id$
+ *
+ * ***** BEGIN GPL/BL DUAL 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. The Blender
+ * Foundation also sells licenses for use in proprietary software under
+ * the Blender License. See http://www.blender.org/BL/ for information
+ * about this.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_ID_H
+#define DNA_ID_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* There's a nasty circular dependency here.... void* to the rescue! I
+ * really wonder why this is needed. */
+
+struct Library;
+struct FileData;
+
+/* let op: Sequence heeft identiek begin. */
+/**
+ * ID is the first thing included in all serializable types. It
+ * provides a common handle to place all data in double-linked lists.
+ * */
+typedef struct ID {
+ void *next, *prev;
+ struct ID *newid;
+ struct Library *lib;
+ char name[24];
+ short us;
+ /**
+ * LIB_... flags report on status of the datablock this ID belongs
+ * to.
+ */
+ short flag;
+ int pad;
+} ID;
+
+/**
+ * ??
+ */
+typedef struct Library {
+ ID id;
+ ID *idblock;
+ struct FileData *filedata;
+ char name[160];
+ int tot, pad; /* tot, idblock en filedata zijn voor lezen en schrijven */
+} Library;
+
+/**
+ * Defines for working with IDs.
+ *
+ * The tags represent types! This is a dirty way of enabling RTTI. The
+ * sig_byte end endian defines aren't really used much.
+ *
+ **/
+
+#if defined(__sgi) || defined(__sparc) || defined (__PPC__) || defined (__ppc__) || defined (__BIG_ENDIAN__)
+/* big endian */
+#define MAKE_ID2(c, d) ( (c)<<8 | (d) )
+#define MOST_SIG_BYTE 0
+#define BBIG_ENDIAN
+#else
+/* little endian */
+#define MAKE_ID2(c, d) ( (d)<<8 | (c) )
+#define MOST_SIG_BYTE 1
+#define BLITTLE_ENDIAN
+#endif
+
+/* ID */
+#define ID_SCE MAKE_ID2('S', 'C')
+#define ID_LI MAKE_ID2('L', 'I')
+#define ID_OB MAKE_ID2('O', 'B')
+#define ID_ME MAKE_ID2('M', 'E')
+#define ID_CU MAKE_ID2('C', 'U')
+#define ID_MB MAKE_ID2('M', 'B')
+#define ID_MA MAKE_ID2('M', 'A')
+#define ID_TE MAKE_ID2('T', 'E')
+#define ID_IM MAKE_ID2('I', 'M')
+#define ID_IK MAKE_ID2('I', 'K')
+#define ID_WV MAKE_ID2('W', 'V')
+#define ID_LT MAKE_ID2('L', 'T')
+#define ID_SE MAKE_ID2('S', 'E')
+#define ID_LF MAKE_ID2('L', 'F')
+#define ID_LA MAKE_ID2('L', 'A')
+#define ID_CA MAKE_ID2('C', 'A')
+#define ID_IP MAKE_ID2('I', 'P')
+#define ID_KE MAKE_ID2('K', 'E')
+#define ID_WO MAKE_ID2('W', 'O')
+#define ID_SCR MAKE_ID2('S', 'R')
+#define ID_VF MAKE_ID2('V', 'F')
+#define ID_TXT MAKE_ID2('T', 'X')
+#define ID_SO MAKE_ID2('S', 'O')
+#define ID_SAMPLE MAKE_ID2('S', 'A')
+#define ID_GR MAKE_ID2('G', 'R')
+#define ID_ID MAKE_ID2('I', 'D')
+#define ID_SEQ MAKE_ID2('S', 'Q')
+#define ID_AR MAKE_ID2('A', 'R')
+#define ID_AC MAKE_ID2('A', 'C')
+
+#define IPO_CO MAKE_ID2('C', 'O') /* NOTE! This is not an ID, but is needed for g.sipo->blocktype */
+
+/* id->flag: eerste 8 bits altijd op nul zetten bij inlezen */
+/* (always zero the first 8 bits when reading a file) */
+#define LIB_LOCAL 0
+#define LIB_EXTERN 1
+#define LIB_INDIRECT 2
+#define LIB_TEST 8
+#define LIB_TESTEXT 9
+#define LIB_TESTIND 10
+#define LIB_READ 16
+#define LIB_NEEDLINK 32
+
+#define LIB_NEW 256
+#define LIB_FAKEUSER 512
+/* vrije testflag */
+#define LIB_DOIT 1024
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h
new file mode 100644
index 00000000000..abcd7f3d9c6
--- /dev/null
+++ b/source/blender/makesdna/DNA_action_types.h
@@ -0,0 +1,102 @@
+/* DNA_action_types.h May 2001
+ *
+ * support for the "action" datatype
+ *
+ * Reevan McKay
+ *
+ * $Id$
+ *
+ * ***** BEGIN GPL/BL DUAL 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. The Blender
+ * Foundation also sells licenses for use in proprietary software under
+ * the Blender License. See http://www.blender.org/BL/ for information
+ * about this.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+
+
+#ifndef DNA_ACTION_TYPES_H
+#define DNA_ACTION_TYPES_H
+
+#include "DNA_listBase.h"
+#include "DNA_ID.h"
+#include "DNA_view2d_types.h"
+
+struct SpaceLink;
+
+typedef struct bPoseChannel{
+ struct bPoseChannel *next, *prev;
+ ListBase constraints;
+ int flag;
+ float loc[3];
+ float size[3];
+ float quat[4];
+ float obmat[4][4];
+ char name[32]; /* Channels need longer names than normal blender objects */
+ int reserved1;
+} bPoseChannel;
+
+
+typedef struct bPose{
+ ListBase chanbase;
+} bPose;
+
+typedef struct bActionChannel {
+ struct bActionChannel *next, *prev;
+ struct Ipo *ipo;
+ ListBase constraintChannels;
+ int flag;
+ char name[32]; /* Channel name */
+ int reserved1;
+
+} bActionChannel;
+
+typedef struct bAction {
+ ID id;
+ ListBase chanbase; /* Channels in this action */
+ bActionChannel *achan; /* Current action channel */
+ bPoseChannel *pchan; /* Current pose channel */
+} bAction;
+
+typedef struct SpaceAction {
+ struct SpaceLink *next, *prev;
+ int spacetype, pad;
+ struct ScrArea *area;
+
+ View2D v2d;
+ bAction *action;
+ int flag;
+ short pin, reserved1;
+ short actnr;
+ short lock;
+ int pad2;
+} SpaceAction;
+
+/* Action Channel flags */
+#define ACHAN_SELECTED 0x00000001
+#define ACHAN_HILIGHTED 0x00000002
+
+
+#endif
+
diff --git a/source/blender/makesdna/DNA_actuator_types.h b/source/blender/makesdna/DNA_actuator_types.h
new file mode 100644
index 00000000000..1a97fa88846
--- /dev/null
+++ b/source/blender/makesdna/DNA_actuator_types.h
@@ -0,0 +1,405 @@
+/**
+ * blenlib/DNA_actuator_types.h (mar-2001 nzc)
+ *
+ * $Id$
+ *
+ * ***** BEGIN GPL/BL DUAL 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. The Blender
+ * Foundation also sells licenses for use in proprietary software under
+ * the Blender License. See http://www.blender.org/BL/ for information
+ * about this.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_ACTUATOR_TYPES_H
+#define DNA_ACTUATOR_TYPES_H
+
+struct Object;
+struct Mesh;
+struct Scene;
+struct Group;
+
+/* ****************** ACTUATORS ********************* */
+
+/* unused now, moved to editobjectactuator in 2.02. Still needed for dna */
+typedef struct bAddObjectActuator {
+ int time, pad;
+ struct Object *ob;
+} bAddObjectActuator;
+
+typedef struct bActionActuator {
+ struct bAction *act; /* Pointer to action */
+ short type, flag; /* Playback type */
+ short sta, end; /* Start & End frames */
+ char name[32]; /* For property-driven playback */
+ short blendin; /* Number of frames of blending */
+ short priority; /* Execution priority */
+ float stridelength; /* Displacement incurred by cycle */
+ short strideaxis; /* Displacement axis */
+ short reserved1; /* Padding */
+ short reserved2; /* Padding */
+ short reserved3; /* Padding */
+} bActionActuator;
+
+typedef struct bSoundActuator {
+ short flag, sndnr;
+ short sta, end;
+ struct bSound *sound;
+ short type, makecopy;
+ short copymade, pad[1];
+} bSoundActuator;
+
+typedef struct bCDActuator {
+ short flag, sndnr;
+ short sta, end;
+ short type, track;
+ float volume;
+} bCDActuator;
+
+typedef struct bEditObjectActuator {
+ int time;
+ short type, flag;
+ struct Object *ob;
+ struct Mesh *me;
+ char name[32];
+ float linVelocity[3]; /* initial lin. velocity on creation */
+ short localflag; /* flag for the lin. vel: apply locally */
+ short pad;
+} bEditObjectActuator;
+
+typedef struct bSceneActuator {
+ short type, flag;
+ int pad;
+ struct Scene *scene;
+ struct Object *camera;
+} bSceneActuator;
+
+typedef struct bPropertyActuator {
+ int flag, type;
+ char name[32], value[32];
+ struct Object *ob;
+} bPropertyActuator;
+
+typedef struct bObjectActuator {
+ int flag, type;
+ float forceloc[3], forcerot[3];
+ float loc[3], rot[3];
+ float dloc[3], drot[3];
+ float linearvelocity[3], angularvelocity[3];
+// float addedlinearvelocity[3];
+// char anotherpad[4];
+} bObjectActuator;
+
+typedef struct bIpoActuator {
+ short flag, type;
+ short sta, end;
+ char name[32];
+
+ short pad1, cur, butsta, butend;
+
+} bIpoActuator;
+
+typedef struct bCameraActuator {
+ struct Object *ob;
+ float height, min, max;
+ float fac;
+ short flag, axis;
+ float visifac;
+} bCameraActuator ;
+
+typedef struct bConstraintActuator {
+ short flag, damp;
+ float slow;
+ float minloc[3], maxloc[3];
+ float minrot[3], maxrot[3];
+} bConstraintActuator;
+
+typedef struct bGroupActuator {
+ short flag, type;
+ short sta, end;
+ char name[32]; /* property or groupkey */
+
+ short pad1, cur, butsta, butend;
+ struct Group *group; /* only during game */
+
+} bGroupActuator;
+
+/* I added a few extra fields here, to facilitate conversions */
+typedef struct bRandomActuator {
+ int seed;
+ int distribution;
+ int int_arg_1;
+ int int_arg_2;
+ float float_arg_1;
+ float float_arg_2;
+ char propname[32];
+} bRandomActuator;
+
+typedef struct bMessageActuator {
+ /**
+ * Send to all objects with this propertyname. Empty to broadcast.
+ */
+ char toPropName[32];
+
+ /**
+ * (Possible future use) pointer to a single destination object.
+ */
+ struct Object *toObject;
+
+ /**
+ * Message Subject to send.
+ */
+ char subject[32];
+
+ /**
+ * bodyType is either 'User defined text' or PropName
+ */
+ short bodyType, pad1;
+ int pad2;
+
+ /**
+ * Either User Defined Text or our PropName to send value of
+ */
+ char body[32];
+} bMessageActuator;
+
+typedef struct bGameActuator {
+ short flag, type;
+ short sta, end;
+ char filename[64];
+ char loadaniname[64];
+} bGameActuator;
+
+typedef struct bVisibilityActuator {
+ /** bit 0: Is this object visible? */
+ int flag;
+} bVisibilityActuator;
+
+typedef struct bActuator {
+ struct bActuator *next, *prev, *mynew;
+ short type;
+ /**
+ * Tells what type of actuator data <data> holds.
+ */
+ short flag;
+ short otype, go;
+ char name[32];
+
+ /**
+ * Data must point to an object actuator type struct.
+ */
+ void *data;
+
+ /**
+ * For ipo's and props: to find out which object the actuator
+ * belongs to */
+ struct Object *ob;
+
+} bActuator;
+
+typedef struct FreeCamera {
+ float mass, accelleration;
+ float maxspeed, maxrotspeed, maxtiltspeed;
+ int flag;
+ float rotdamp, tiltdamp, speeddamp, pad;
+} FreeCamera;
+
+/* objectactuator->flag */
+#define ACT_FORCE_LOCAL 1
+#define ACT_TORQUE_LOCAL 2
+#define ACT_DLOC_LOCAL 4
+#define ACT_DROT_LOCAL 8
+#define ACT_LIN_VEL_LOCAL 16
+#define ACT_ANG_VEL_LOCAL 32
+//#define ACT_ADD_LIN_VEL_LOCAL 64
+#define ACT_ADD_LIN_VEL 64
+
+#define ACT_OBJECT_FORCE 0
+#define ACT_OBJECT_TORQUE 1
+#define ACT_OBJECT_DLOC 2
+#define ACT_OBJECT_DROT 3
+#define ACT_OBJECT_LINV 4
+#define ACT_OBJECT_ANGV 5
+
+/* actuator->type */
+#define ACT_OBJECT 0
+#define ACT_IPO 1
+#define ACT_LAMP 2
+#define ACT_CAMERA 3
+#define ACT_MATERIAL 4
+#define ACT_SOUND 5
+#define ACT_PROPERTY 6
+ /* these two obsolete since 2.02 */
+#define ACT_ADD_OBJECT 7
+#define ACT_END_OBJECT 8
+
+#define ACT_CONSTRAINT 9
+#define ACT_EDIT_OBJECT 10
+#define ACT_SCENE 11
+#define ACT_GROUP 12
+#define ACT_RANDOM 13
+#define ACT_MESSAGE 14
+#define ACT_ACTION 15 /* __ NLA */
+#define ACT_CD 16
+#define ACT_GAME 17
+#define ACT_VISIBILITY 18
+
+/* actuator flag */
+#define ACT_SHOW 1
+#define ACT_DEL 2
+#define ACT_NEW 4
+
+/* link codes */
+#define LINK_SENSOR 0
+#define LINK_CONTROLLER 1
+#define LINK_ACTUATOR 2
+
+/* keyboardsensor->type */
+#define SENS_ALL_KEYS 1
+
+/* actionactuator->type */
+#define ACT_ACTION_PLAY 0
+#define ACT_ACTION_PINGPONG 1
+#define ACT_ACTION_FLIPPER 2
+#define ACT_ACTION_LOOP_STOP 3
+#define ACT_ACTION_LOOP_END 4
+#define ACT_ACTION_KEY2KEY 5
+#define ACT_ACTION_FROM_PROP 6
+#define ACT_ACTION_MOTION 7
+
+/* ipoactuator->type */
+#define ACT_IPO_PLAY 0
+#define ACT_IPO_PINGPONG 1
+#define ACT_IPO_FLIPPER 2
+#define ACT_IPO_LOOP_STOP 3
+#define ACT_IPO_LOOP_END 4
+#define ACT_IPO_KEY2KEY 5
+#define ACT_IPO_FROM_PROP 6
+
+/* groupactuator->type */
+#define ACT_GROUP_PLAY 0
+#define ACT_GROUP_PINGPONG 1
+#define ACT_GROUP_FLIPPER 2
+#define ACT_GROUP_LOOP_STOP 3
+#define ACT_GROUP_LOOP_END 4
+#define ACT_GROUP_FROM_PROP 5
+#define ACT_GROUP_SET 6
+
+/* ipoactuator->flag */
+#define ACT_IPOFORCE_BIT 0
+#define ACT_IPOEND_BIT 1
+#define ACT_IPOFORCE_LOCAL_BIT 2
+// unused: 3
+#define ACT_IPOCHILD_BIT 4
+
+#define ACT_IPOFORCE (1 << ACT_IPOFORCE_BIT)
+#define ACT_IPOEND (1 << ACT_IPOEND_BIT)
+#define ACT_IPOFORCE_LOCAL (1 << ACT_IPOFORCE_LOCAL_BIT)
+#define ACT_IPOCHILD (1 << ACT_IPOCHILD_BIT)
+
+/* ipoactuator->flag for k2k */
+#define ACT_K2K_PREV 1
+#define ACT_K2K_CYCLIC 2
+#define ACT_K2K_PINGPONG 4
+#define ACT_K2K_HOLD 8
+
+/* property actuator->type */
+#define ACT_PROP_ASSIGN 0
+#define ACT_PROP_ADD 1
+#define ACT_PROP_COPY 2
+
+/* constraint flag */
+#define ACT_CONST_LOCX 1
+#define ACT_CONST_LOCY 2
+#define ACT_CONST_LOCZ 4
+#define ACT_CONST_ROTX 8
+#define ACT_CONST_ROTY 16
+#define ACT_CONST_ROTZ 32
+
+/* editObjectActuator->type */
+#define ACT_EDOB_ADD_OBJECT 0
+#define ACT_EDOB_END_OBJECT 1
+#define ACT_EDOB_REPLACE_MESH 2
+#define ACT_EDOB_TRACK_TO 3
+#define ACT_EDOB_MAKE_CHILD 4
+#define ACT_EDOB_END_CHILD 5
+
+/* editObjectActuator->flag */
+#define ACT_TRACK_3D 1
+
+/* SceneActuator->type */
+#define ACT_SCENE_RESTART 0
+#define ACT_SCENE_SET 1
+#define ACT_SCENE_CAMERA 2
+#define ACT_SCENE_ADD_FRONT 3
+#define ACT_SCENE_ADD_BACK 4
+#define ACT_SCENE_REMOVE 5
+#define ACT_SCENE_SUSPEND 6
+#define ACT_SCENE_RESUME 7
+
+
+/* randomAct->distribution */
+#define ACT_RANDOM_BOOL_CONST 0
+#define ACT_RANDOM_BOOL_UNIFORM 1
+#define ACT_RANDOM_BOOL_BERNOUILLI 2
+#define ACT_RANDOM_INT_CONST 3
+#define ACT_RANDOM_INT_UNIFORM 4
+#define ACT_RANDOM_INT_POISSON 5
+#define ACT_RANDOM_FLOAT_CONST 6
+#define ACT_RANDOM_FLOAT_UNIFORM 7
+#define ACT_RANDOM_FLOAT_NORMAL 8
+#define ACT_RANDOM_FLOAT_NEGATIVE_EXPONENTIAL 9
+
+/* SoundActuator->type */
+#define ACT_SND_PLAY_STOP_SOUND 0
+#define ACT_SND_PLAY_END_SOUND 1
+#define ACT_SND_LOOP_STOP_SOUND 2
+#define ACT_SND_LOOP_END_SOUND 3
+#define ACT_SND_LOOP_BIDIRECTIONAL_SOUND 4
+#define ACT_SND_LOOP_BIDIRECTIONAL_STOP_SOUND 5
+
+/* messageactuator->type */
+#define ACT_MESG_MESG 0
+#define ACT_MESG_PROP 1
+
+/* cdactuator->type */
+#define ACT_CD_PLAY_ALL 0
+#define ACT_CD_PLAY_TRACK 1
+#define ACT_CD_LOOP_TRACK 2
+#define ACT_CD_VOLUME 3
+#define ACT_CD_STOP 4
+#define ACT_CD_PAUSE 5
+#define ACT_CD_RESUME 6
+
+/* gameactuator->type */
+#define ACT_GAME_LOAD 0
+#define ACT_GAME_START 1
+#define ACT_GAME_RESTART 2
+#define ACT_GAME_QUIT 3
+
+/* visibilityact->flag */
+/* Set means the object will become invisible */
+#define ACT_VISIBILITY_INVISIBLE_BIT 0
+#define ACT_VISIBILITY_INVISIBLE (1 << ACT_VISIBILITY_INVISIBLE_BIT)
+
+#endif
diff --git a/source/blender/makesdna/DNA_armature_types.h b/source/blender/makesdna/DNA_armature_types.h
new file mode 100644
index 00000000000..af2476b5e0c
--- /dev/null
+++ b/source/blender/makesdna/DNA_armature_types.h
@@ -0,0 +1,124 @@
+/**
+ * $Id$
+ *
+ * ***** BEGIN GPL/BL DUAL 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. The Blender
+ * Foundation also sells licenses for use in proprietary software under
+ * the Blender License. See http://www.blender.org/BL/ for information
+ * about this.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+
+
+#ifndef DNA_ARMATURE_TYPES_H
+#define DNA_ARMATURE_TYPES_H
+
+#include "DNA_listBase.h"
+#include "DNA_ID.h"
+
+typedef struct Bone {
+ struct Bone *next, *prev; /* Next/prev elements within this list */
+ struct Bone *parent; /* Parent (ik parent if appropriate flag is set */
+ ListBase childbase; /* Children */
+ char name[32]; /* Name of the bone - must be unique within the armature */
+
+ float roll;
+ float head[3]; /* Orientation & length are implicit now */
+ float tail[3]; /* head/tail represents rest state */
+ int flag;
+
+ /* Transformation data used for posing:
+ The same information stored by other
+ blenderObjects
+ */
+
+ float dist, weight;
+ float loc[3], dloc[3];
+ float size[3], dsize[3];
+ float quat[4], dquat[4];
+ float obmat[4][4];
+ float parmat[4][4];
+ float defmat[4][4];
+ float irestmat[4][4]; /* Cached inverse of rest matrix (objectspace)*/
+ float posemat[4][4]; /* Cached pose matrix (objectspace)*/
+}Bone;
+
+typedef struct bArmature {
+ ID id;
+ ListBase bonebase;
+ ListBase chainbase;
+ int flag;
+ int res1;
+ int res2;
+ int res3;
+}bArmature;
+
+enum {
+ ARM_RESTPOSBIT = 0,
+ ARM_UNUSED1BIT, /* Free for use */
+ ARM_DRAWAXESBIT,
+ ARM_DRAWNAMESBIT,
+ ARM_POSEBIT,
+ ARM_EDITBIT
+};
+
+enum {
+ ARM_RESTPOS = 0x00000001,
+ ARM_UNUSED1 = 0x00000002, /* Free for use */
+ ARM_DRAWAXES = 0x00000004,
+ ARM_DRAWNAMES = 0x00000008,
+ ARM_POSEMODE = 0x00000010,
+ ARM_EDITMODE = 0x00000020
+};
+
+enum {
+ BONE_SELECTED = 0x00000001,
+ BONE_ROOTSEL = 0x00000002,
+ BONE_TIPSEL = 0x00000004,
+
+ BONE_HILIGHTED = 0x00000008,
+ BONE_IK_TOPARENT= 0x00000010,
+ BONE_QUATROT = 0x00000020,
+ BONE_HIDDEN = 0x00000040,
+
+ BONE_DONE = 0x00000080, /* For detecting cyclic dependancies */
+
+ BONE_ISEMPTY = 0x00000100,
+ BONE_ISMUSCLE = 0x00000200
+};
+
+enum {
+ BONE_SELECTEDBIT = 0,
+ BONE_HEADSELBIT,
+ BONE_TAILSELBIT,
+ BONE_HILIGHTEDBIT,
+ BONE_IK_TOPARENTBIT,
+ BONE_QUATROTBIT,
+ BONE_HIDDENBIT,
+ BONE_ISEMPTYBIT,
+ BONE_ISMUSCLEBIT
+};
+
+
+#endif
diff --git a/source/blender/makesdna/DNA_camera_types.h b/source/blender/makesdna/DNA_camera_types.h
new file mode 100644
index 00000000000..71a429ba59e
--- /dev/null
+++ b/source/blender/makesdna/DNA_camera_types.h
@@ -0,0 +1,77 @@
+/**
+ * blenlib/DNA_camera_types.h (mar-2001 nzc)
+ *
+ * $Id$
+ *
+ * ***** BEGIN GPL/BL DUAL 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. The Blender
+ * Foundation also sells licenses for use in proprietary software under
+ * the Blender License. See http://www.blender.org/BL/ for information
+ * about this.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_CAMERA_TYPES_H
+#define DNA_CAMERA_TYPES_H
+
+#include "DNA_ID.h"
+#include "DNA_scriptlink_types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct Ipo;
+
+typedef struct Camera {
+ ID id;
+
+ short type, flag, drawzoom, hold;
+ float clipsta, clipend;
+ float netsta, netend; /* network camera */
+ float lens, drawsize;
+ float hololen, hololen1;
+
+ struct Ipo *ipo;
+
+ ScriptLink scriptlink;
+} Camera;
+
+/* **************** CAMERA ********************* */
+
+/* type */
+#define CAM_PERSP 0
+#define CAM_ORTHO 1
+
+/* flag */
+#define CAM_SHOWLIMITS 1
+#define CAM_SHOWMIST 2
+
+#define CAM_HOLO1 16
+#define CAM_HOLO2 32
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/source/blender/makesdna/DNA_constraint_types.h b/source/blender/makesdna/DNA_constraint_types.h
new file mode 100644
index 00000000000..02199b9aa01
--- /dev/null
+++ b/source/blender/makesdna/DNA_constraint_types.h
@@ -0,0 +1,158 @@
+/**
+ * $Id$
+ *
+ * ***** BEGIN GPL/BL DUAL 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. The Blender
+ * Foundation also sells licenses for use in proprietary software under
+ * the Blender License. See http://www.blender.org/BL/ for information
+ * about this.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ * Constraint DNA data
+ */
+
+#ifndef DNA_CONSTRAINT_TYPES_H
+#define DNA_CONSTRAINT_TYPES_H
+
+#include "DNA_ID.h"
+#include "DNA_ipo_types.h"
+#include "DNA_object_types.h"
+
+struct Action;
+
+typedef struct bConstraintChannel{
+ struct bConstraintChannel *next, *prev;
+ Ipo *ipo;
+ short flag;
+ char name[30];
+} bConstraintChannel;
+
+typedef struct bConstraint{
+ struct bConstraint *next, *prev;
+ void *data; /* Constraint data (a valid constraint type) */
+ Ipo *ipo; /* Constraint ipo */
+ char type; /* Constraint type */
+ char otype; /* Old type - for menu callbacks */
+ short flag; /* Flag */
+ short reserved1;
+ char name[30]; /* Constraint name */
+
+ float enforce;
+ float time;
+ float offset[3]; /* Target location offset */
+ float orient[3]; /* Target orientation offset */
+ float roll[3]; /* Target roll offset (needed?) */
+} bConstraint;
+
+/* Single-target subobject constraints */
+typedef struct bKinematicConstraint{
+ Object *tar;
+ float tolerance; /* Acceptable distance from target */
+ int iterations; /* Maximum number of iterations to try */
+ char subtarget[32]; /* String to specify sub-object target */
+
+ float cacheeff[3]; /* Target location cache */
+ int reserved1;
+
+ float cachemat[4][4]; /* Result cache */
+} bKinematicConstraint;
+
+typedef struct bTrackToConstraint{
+ Object *tar;
+ int reserved1;
+ int reserved2;
+ char subtarget[32];
+} bTrackToConstraint;
+
+typedef struct bRotateLikeConstraint{
+ Object *tar;
+ int flag;
+ int reserved1;
+ char subtarget[32];
+} bRotateLikeConstraint;
+
+typedef struct bLocateLikeConstraint{
+ Object *tar;
+ int flag;
+ int reserved1;
+ char subtarget[32];
+} bLocateLikeConstraint;
+
+typedef struct bActionConstraint{
+ Object *tar;
+ int type;
+ short start;
+ short end;
+ float min;
+ float max;
+ struct bAction *act;
+ char subtarget[32];
+} bActionConstraint;
+
+/* Single-target object constraints */
+typedef struct bFollowPathConstraint{
+ Object *tar; /* Must be path object */
+} bFollowPathConstraint;
+
+/* Zero-target constraints */
+typedef struct bRotationConstraint{
+ float xmin, xmax;
+ float ymin, ymax;
+ float zmin, zmax;
+} bRotationConstraint;
+
+/* bConstraint.type */
+#define CONSTRAINT_TYPE_NULL 0
+#define CONSTRAINT_TYPE_CHILDOF 1 /* Unimplemented */
+#define CONSTRAINT_TYPE_TRACKTO 2
+#define CONSTRAINT_TYPE_KINEMATIC 3
+#define CONSTRAINT_TYPE_FOLLOWPATH 4 /* Unimplemented */
+#define CONSTRAINT_TYPE_ROTLIMIT 5 /* Unimplemented */
+#define CONSTRAINT_TYPE_LOCLIMIT 6 /* Unimplemented */
+#define CONSTRAINT_TYPE_SIZELIMIT 7 /* Unimplemented */
+#define CONSTRAINT_TYPE_ROTLIKE 8
+#define CONSTRAINT_TYPE_LOCLIKE 9
+#define CONSTRAINT_TYPE_SIZELIKE 10 /* Unimplemented */
+#define CONSTRAINT_TYPE_PYTHON 11 /* Unimplemented */
+#define CONSTRAINT_TYPE_ACTION 12
+
+/* bConstraint.flag */
+#define CONSTRAINT_EXPAND 0x00000001
+#define CONSTRAINT_DONE 0x00000002
+#define CONSTRAINT_DISABLE 0x00000004
+#define CONSTRAINT_LOOPTESTED 0x00000008
+
+#define CONSTRAINT_EXPAND_BIT 0
+#define CONSTRAINT_DONE_BIT 1
+#define CONSTRAINT_DISABLE_BIT 2
+
+/* bConstraintChannel.flag */
+#define CONSTRAINT_CHANNEL_SELECT 0x00000001
+
+/* bLocateLikeConstraint.flag */
+#define LOCLIKE_X 0x00000001
+#define LOCLIKE_Y 0x00000002
+#define LOCLIKE_Z 0x00000004
+
+#endif
+
diff --git a/source/blender/makesdna/DNA_controller_types.h b/source/blender/makesdna/DNA_controller_types.h
new file mode 100644
index 00000000000..1d73d27a045
--- /dev/null
+++ b/source/blender/makesdna/DNA_controller_types.h
@@ -0,0 +1,78 @@
+/**
+ * blenlib/DNA_controller_types.h (mar-2001 nzc)
+ *
+ * $Id$
+ *
+ * ***** BEGIN GPL/BL DUAL 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. The Blender
+ * Foundation also sells licenses for use in proprietary software under
+ * the Blender License. See http://www.blender.org/BL/ for information
+ * about this.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_CONTROLLER_TYPES_H
+#define DNA_CONTROLLER_TYPES_H
+
+struct bActuator;
+struct Text;
+struct bSensor;
+
+/* ****************** CONTROLLERS ********************* */
+
+typedef struct bExpressionCont {
+ char str[128];
+} bExpressionCont;
+
+typedef struct bPythonCont {
+ struct Text *text;
+} bPythonCont;
+
+typedef struct bController {
+ struct bController *next, *prev, *mynew;
+ short type, flag, inputs, totlinks;
+ short otype, totslinks, pad2, pad3;
+
+ char name[32];
+ void *data;
+
+ struct bActuator **links;
+
+ struct bSensor **slinks;
+ short val, valo;
+ int pad5;
+
+} bController;
+
+/* controller->type */
+#define CONT_LOGIC_AND 0
+#define CONT_LOGIC_OR 1
+#define CONT_EXPRESSION 2
+#define CONT_PYTHON 3
+
+/* controller->flag */
+#define CONT_SHOW 1
+#define CONT_DEL 2
+#define CONT_NEW 4
+
+#endif
diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h
new file mode 100644
index 00000000000..6fb7c01ca27
--- /dev/null
+++ b/source/blender/makesdna/DNA_curve_types.h
@@ -0,0 +1,202 @@
+/**
+ * blenlib/DNA_curve_types.h (mar-2001 nzc)
+ *
+ * Curve stuff.
+ *
+ * $Id$
+ *
+ * ***** BEGIN GPL/BL DUAL 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. The Blender
+ * Foundation also sells licenses for use in proprietary software under
+ * the Blender License. See http://www.blender.org/BL/ for information
+ * about this.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_CURVE_TYPES_H
+#define DNA_CURVE_TYPES_H
+
+#include "DNA_listBase.h"
+#include "DNA_vec_types.h"
+#include "DNA_ID.h"
+
+struct BoundBox;
+struct Object;
+struct Ipo;
+struct Key;
+struct Material;
+struct VFont;
+
+#
+#
+typedef struct Path {
+ int len;
+ float *data;
+ float totdist;
+} Path;
+
+#
+#
+typedef struct BevList {
+ struct BevList *next, *prev;
+ short nr, flag;
+ short poly, gat;
+} BevList;
+
+#
+#
+typedef struct BevPoint {
+ float x, y, z, alfa, sina, cosa, mat[3][3];
+ short f1, f2;
+} BevPoint;
+
+
+typedef struct BezTriple {
+ float vec[3][3];
+ float alfa;
+ short s[3][2];
+ short h1, h2;
+ char f1, f2, f3, hide;
+} BezTriple;
+
+typedef struct BPoint {
+ float vec[4];
+ float alfa;
+ short s[2];
+ short f1, hide;
+} BPoint;
+
+typedef struct Nurb {
+ struct Nurb *next, *prev;
+ short type, mat_nr;
+ short hide, flag;
+ short pntsu, pntsv;
+ short resolu, resolv;
+ short orderu, orderv;
+ short flagu, flagv;
+
+ float *knotsu, *knotsv;
+ BPoint *bp;
+ BezTriple *bezt;
+
+} Nurb;
+
+
+typedef struct Curve {
+ ID id;
+
+ struct BoundBox *bb;
+
+ ListBase nurb;
+ ListBase disp;
+ struct Object *bevobj, *textoncurve;
+ struct Ipo *ipo;
+ Path *path;
+ struct Key *key;
+ struct Material **mat;
+
+ ListBase bev;
+ float *orco;
+
+ float loc[3];
+ float size[3];
+ float rot[3];
+
+ int texflag;
+
+ short pathlen, totcol;
+ short flag, bevresol;
+ float width, ext1, ext2;
+
+ /* default */
+ short resolu, resolv;
+
+ /* font stuk */
+ short len, lines, pos, spacemode;
+ float spacing, linedist, shear, fsize;
+ float xof, yof;
+
+ char *str, family[24];
+ struct VFont *vfont;
+
+} Curve;
+
+typedef struct IpoCurve {
+ struct IpoCurve *next, *prev;
+
+ struct BPoint *bp;
+ struct BezTriple *bezt;
+
+ rctf maxrct, totrct;
+
+ short blocktype, adrcode, vartype;
+ short totvert;
+ short ipo, extrap;
+ short flag, rt;
+ float ymin, ymax;
+ unsigned int bitmask;
+
+ float curval;
+
+} IpoCurve;
+
+/* **************** CURVE ********************* */
+
+/* flag */
+#define CU_3D 1
+#define CU_FRONT 2
+#define CU_BACK 4
+#define CU_PATH 8
+#define CU_FOLLOW 16
+#define CU_UV_ORCO 32
+#define CU_NOPUNOFLIP 64
+
+/* spacemode */
+#define CU_LEFT 0
+#define CU_MIDDLE 1
+#define CU_RIGHT 2
+#define CU_FLUSH 3
+
+/* flag (nurb) */
+#define CU_SMOOTH ME_SMOOTH
+
+/* type (nurb) */
+#define CU_POLY 0
+#define CU_BEZIER 1
+#define CU_BSPLINE 2
+#define CU_CARDINAL 3
+#define CU_NURBS 4
+#define CU_2D 8
+
+/* flagu flagv (nurb) */
+#define CU_CYCLIC 1
+
+/* h1 h2 (beztriple) */
+#define HD_FREE 0
+#define HD_AUTO 1
+#define HD_VECT 2
+#define HD_ALIGN 3
+
+
+
+#endif
diff --git a/source/blender/makesdna/DNA_documentation.h b/source/blender/makesdna/DNA_documentation.h
new file mode 100644
index 00000000000..dd8e2d06fb8
--- /dev/null
+++ b/source/blender/makesdna/DNA_documentation.h
@@ -0,0 +1,68 @@
+/**
+ * $Id$
+ *
+ * ***** BEGIN GPL/BL DUAL 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. The Blender
+ * Foundation also sells licenses for use in proprietary software under
+ * the Blender License. See http://www.blender.org/BL/ for information
+ * about this.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ *
+ * @mainpage DNA- Makesdna modules
+ *
+ * @section about About the DNA module
+ *
+ * The DNA module holds all type definitions that are serialized in a
+ * blender file. There is an executable that scans all files, looking
+ * for struct-s to serialize (hence sdna: Struct DNA). From this
+ * information, it builds a file with numbers that encode the format,
+ * the names of variables, and the plce to look for them.
+ *
+ * @section issues Known issues with DNA
+ *
+ * - Function pointers:
+ *
+ * Because of historical reasons, some function pointers were
+ * untyped. The parser/dna generator has been modified to explicitly
+ * handle these special cases. Most pointers have been given proper
+ * proto's by now. DNA_space_types.h::Spacefile::returnfuncmay still
+ * be badly defined. The reason for this is that is is called with
+ * different types of arguments. It takes a char* at this moment...
+ *
+ * - Path to the header files
+ *
+ * Also because of historical reasons, there is a path prefix to the
+ * headers that need to be scanned. This is the BASE_HEADER
+ * define. If you change the file-layout for DNA, you will probably
+ * have to change this (Not very flexible, but it is hardly ever
+ * changed. Sorry.).
+ *
+ * @section dependencies Dependencies
+ *
+ * DNA has no external dependencies (except for a few system
+ * includes).
+ *
+ **/
+
+/* This file has intentionally no definitions or implementation. */
diff --git a/source/blender/makesdna/DNA_effect_types.h b/source/blender/makesdna/DNA_effect_types.h
new file mode 100644
index 00000000000..3962e1ef5eb
--- /dev/null
+++ b/source/blender/makesdna/DNA_effect_types.h
@@ -0,0 +1,127 @@
+/**
+ * blenlib/DNA_effect_types.h (mar-2001 nzc)
+ *
+ * $Id$
+ *
+ * ***** BEGIN GPL/BL DUAL 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. The Blender
+ * Foundation also sells licenses for use in proprietary software under
+ * the Blender License. See http://www.blender.org/BL/ for information
+ * about this.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_EFFECT_TYPES_H
+#define DNA_EFFECT_TYPES_H
+
+/* DENK ERAAN: NIEUWE EFFECTEN OOK IN DE WRITEFILE.C IVM DNA!!! */
+
+#define PAF_MAXMULT 4
+
+ /* paf->flag (bitje 0 vrij houden ivm compatibility) */
+#define PAF_BSPLINE 2
+#define PAF_STATIC 4
+#define PAF_FACE 8
+
+ /* eff->type */
+#define EFF_BUILD 0
+#define EFF_PARTICLE 1
+#define EFF_WAVE 2
+
+ /* eff->flag */
+#define EFF_SELECT 1
+#define EFF_CYCLIC 2
+
+ /* paf->stype */
+#define PAF_NORMAL 0
+#define PAF_VECT 1
+
+ /* paf->texmap */
+#define PAF_TEXINT 0
+#define PAF_TEXRGB 1
+#define PAF_TEXGRAD 2
+
+ /* wav->flag */
+#define WAV_X 2
+#define WAV_Y 4
+#define WAV_CYCL 8
+
+
+typedef struct Effect {
+ struct Effect *next, *prev;
+ short type, flag, buttype, rt;
+
+} Effect;
+
+typedef struct BuildEff {
+ struct BuildEff *next, *prev;
+ short type, flag, buttype, rt;
+
+ float len, sfra;
+
+} BuildEff;
+
+#
+#
+typedef struct Particle {
+ float co[3], no[3];
+ float time, lifetime;
+ short mat_nr, rt;
+} Particle;
+
+
+typedef struct PartEff {
+ struct PartEff *next, *prev;
+ short type, flag, buttype, stype;
+
+ float sta, end, lifetime;
+ int totpart, totkey, seed;
+
+ float normfac, obfac, randfac, texfac, randlife;
+ float force[3];
+ float damp;
+
+ float nabla, vectsize, defvec[3];
+
+ float mult[4], life[4];
+ short child[4], mat[4];
+ short texmap, curmult;
+ short staticstep, pad;
+
+ Particle *keys;
+
+} PartEff;
+
+
+typedef struct WaveEff {
+ struct WaveEff *next, *prev;
+ short type, flag, buttype, stype;
+
+ float startx, starty, height, width;
+ float narrow, speed, minfac, damp;
+
+ float timeoffs, lifetime;
+
+} WaveEff;
+
+#endif
diff --git a/source/blender/makesdna/DNA_fileglobal_types.h b/source/blender/makesdna/DNA_fileglobal_types.h
new file mode 100644
index 00000000000..73403f6ff01
--- /dev/null
+++ b/source/blender/makesdna/DNA_fileglobal_types.h
@@ -0,0 +1,47 @@
+/**
+ * blenlib/DNA_fileglobal_types.h (mar-2001 nzc)
+ *
+ * $Id$
+ *
+ * ***** BEGIN GPL/BL DUAL 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. The Blender
+ * Foundation also sells licenses for use in proprietary software under
+ * the Blender License. See http://www.blender.org/BL/ for information
+ * about this.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_FILEGLOBAL_TYPES_H
+#define DNA_FILEGLOBAL_TYPES_H
+
+/**
+ * FileGlobal stores a part of the current user-unterface settings at
+ * the moment of saving, and the file-specific settings.
+ */
+typedef struct FileGlobal {
+ void *curscreen;
+ short displaymode, winpos;
+ int fileflags;
+} FileGlobal;
+
+#endif
diff --git a/source/blender/makesdna/DNA_group_types.h b/source/blender/makesdna/DNA_group_types.h
new file mode 100644
index 00000000000..c8521c1505e
--- /dev/null
+++ b/source/blender/makesdna/DNA_group_types.h
@@ -0,0 +1,100 @@
+/**
+ * blenlib/DNA_group_types.h (mar-2001 nzc)
+ *
+ * $Id$
+ *
+ * ***** BEGIN GPL/BL DUAL 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. The Blender
+ * Foundation also sells licenses for use in proprietary software under
+ * the Blender License. See http://www.blender.org/BL/ for information
+ * about this.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_GROUP_TYPES_H
+#define DNA_GROUP_TYPES_H
+
+#include "DNA_listBase.h"
+#include "DNA_ID.h"
+
+struct Object;
+struct Ipo;
+
+typedef struct GroupKey {
+ struct GroupKey *next, *prev;
+ short sfra, efra;
+ float cfra;
+ char name[32];
+} GroupKey;
+
+typedef struct ObjectKey {
+ struct ObjectKey *next, *prev;
+ GroupKey *gkey; /* for reference */
+
+ /* copy of relevant data */
+ short partype, pad;
+ int par1, par2, par3;
+
+ struct Object *parent, *track;
+ struct Ipo *ipo;
+
+ /* this block identical to object */
+ float loc[3], dloc[3], orig[3];
+ float size[3], dsize[3];
+ float rot[3], drot[3];
+ float quat[4], dquat[4];
+ float obmat[4][4];
+ float parentinv[4][4];
+ float imat[4][4]; /* voor bij render, tijdens simulate, tijdelijk: ipokeys van transform */
+
+ unsigned int lay; /* kopie van Base */
+
+ char transflag, ipoflag;
+ char trackflag, upflag;
+
+ float sf, ctime, padf;
+
+
+} ObjectKey;
+
+typedef struct GroupObject {
+ struct GroupObject *next, *prev;
+ struct Object *ob;
+ ListBase okey; /* ObjectKey */
+
+} GroupObject;
+
+
+typedef struct Group {
+ ID id;
+
+ ListBase gobject; /* GroupObject */
+ ListBase gkey; /* GroupKey */
+
+ GroupKey *active;
+
+} Group;
+
+
+
+#endif
diff --git a/source/blender/makesdna/DNA_ika_types.h b/source/blender/makesdna/DNA_ika_types.h
new file mode 100644
index 00000000000..9afab711f98
--- /dev/null
+++ b/source/blender/makesdna/DNA_ika_types.h
@@ -0,0 +1,91 @@
+/**
+ * blenlib/DNA_ika_types.h (mar-2001 nzc)
+ *
+ * Old ika types. These will be superceded by Reevan's stuff, soon (I
+ * hope).
+ *
+ * $Id$
+ *
+ * ***** BEGIN GPL/BL DUAL 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. The Blender
+ * Foundation also sells licenses for use in proprietary software under
+ * the Blender License. See http://www.blender.org/BL/ for information
+ * about this.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_IKA_TYPES_H
+#define DNA_IKA_TYPES_H
+
+#include "DNA_listBase.h"
+#include "DNA_ID.h"
+
+struct Object;
+struct Ipo;
+
+typedef struct Deform {
+ struct Object *ob;
+ short flag, partype;
+ int par1, par2, par3; /* kunnen vertexnrs zijn */
+ float imat[4][4], premat[4][4], postmat[4][4];
+ float vec[3]; /* als partype==LIMB, voor distfunc */
+ float fac, dist, pad;
+
+} Deform;
+
+typedef struct Limb {
+ struct Limb *next, *prev;
+
+ float len, leno, fac, alpha, alphao, pad;
+ float eff[2];
+
+} Limb;
+
+typedef struct Ika {
+ ID id;
+
+ short partype, flag, iter, lastfra;
+
+ ListBase limbbase;
+ float eff[3], effg[3], effn[3]; /* current, global en (local)wanted */
+ float mem, slow, toty, totx, xyconstraint;
+
+ struct Ipo *ipo;
+ struct Object *parent;
+ int par1, par2, par3; /* kunnen vertexnrs zijn */
+
+ int totdef;
+ Deform *def;
+
+ int def_scroll;
+ int limb_scroll;
+} Ika;
+
+/* these defines are used for working with ikas*/
+
+/* ika.flag: */
+#define IK_GRABEFF 1
+#define IK_XYCONSTRAINT 2
+
+
+#endif
diff --git a/source/blender/makesdna/DNA_image_types.h b/source/blender/makesdna/DNA_image_types.h
new file mode 100644
index 00000000000..11dcde8de2b
--- /dev/null
+++ b/source/blender/makesdna/DNA_image_types.h
@@ -0,0 +1,86 @@
+/**
+ * blenlib/DNA_image_types.h (mar-2001 nzc)
+ *
+ * $Id$
+ *
+ * ***** BEGIN GPL/BL DUAL 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. The Blender
+ * Foundation also sells licenses for use in proprietary software under
+ * the Blender License. See http://www.blender.org/BL/ for information
+ * about this.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_IMAGE_TYPES_H
+#define DNA_IMAGE_TYPES_H
+
+#include "DNA_ID.h"
+
+struct PackedFile;
+struct anim;
+struct ImBuf;
+
+typedef struct Image {
+ ID id;
+
+ char name[160];
+
+ struct anim *anim;
+ struct ImBuf *ibuf;
+ struct ImBuf *mipmap[10];
+
+ short ok, flag;
+ short lastframe, lastquality;
+
+ /* texture pagina */
+ short tpageflag, totbind;
+ short xrep, yrep;
+ short twsta, twend;
+ unsigned int bindcode;
+ unsigned int *repbind; /* om subregio's te kunnen repeaten */
+
+ struct PackedFile * packedfile;
+
+ float lastupdate;
+ short animspeed;
+ short reserved1;
+} Image;
+
+/* in Image struct */
+#define MAXMIPMAP 10
+
+/* **************** IMAGE ********************* */
+
+/* flag */
+#define IMA_HALVE 1
+#define IMA_BW 2
+#define IMA_FROMANIM 4
+#define IMA_USED 8
+#define IMA_REFLECT 16
+
+/* tpageflag */
+#define IMA_TILES 1
+#define IMA_TWINANIM 2
+#define IMA_COLCYCLE 4 /* Depreciated */
+
+#endif
diff --git a/source/blender/makesdna/DNA_ipo_types.h b/source/blender/makesdna/DNA_ipo_types.h
new file mode 100644
index 00000000000..2f332b680c0
--- /dev/null
+++ b/source/blender/makesdna/DNA_ipo_types.h
@@ -0,0 +1,302 @@
+/**
+ * blenlib/DNA_ipo_types.h (mar-2001 nzc)
+ *
+ * $Id$
+ *
+ * ***** BEGIN GPL/BL DUAL 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. The Blender
+ * Foundation also sells licenses for use in proprietary software under
+ * the Blender License. See http://www.blender.org/BL/ for information
+ * about this.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_IPO_TYPES_H
+#define DNA_IPO_TYPES_H
+
+#include "DNA_listBase.h"
+#include "DNA_vec_types.h"
+
+#include "DNA_ID.h"
+
+typedef struct Ipo {
+ ID id;
+
+ ListBase curve;
+ rctf cur;
+ short blocktype, showkey;
+ int pad;
+
+} Ipo;
+
+/* sometimes used */
+
+typedef short IPO_Channel;
+
+/* defines: are these duped or new? */
+
+#define IPOBUTY 17
+
+
+/* disptype */
+#define IPO_DISPDEGR 1
+#define IPO_DISPBITS 2
+#define IPO_DISPTIME 3
+
+/* ******************** */
+
+#define OB_TOTIPO 24
+
+#define OB_LOC_X 1
+#define OB_LOC_Y 2
+#define OB_LOC_Z 3
+#define OB_DLOC_X 4
+#define OB_DLOC_Y 5
+#define OB_DLOC_Z 6
+
+#define OB_ROT_X 7
+#define OB_ROT_Y 8
+#define OB_ROT_Z 9
+#define OB_DROT_X 10
+#define OB_DROT_Y 11
+#define OB_DROT_Z 12
+
+#define OB_SIZE_X 13
+#define OB_SIZE_Y 14
+#define OB_SIZE_Z 15
+#define OB_DSIZE_X 16
+#define OB_DSIZE_Y 17
+#define OB_DSIZE_Z 18
+
+#define OB_LAY 19
+
+#define OB_TIME 20
+
+#define OB_EFF_X 21
+#define OB_EFF_Y 22
+#define OB_EFF_Z 23
+
+#define OB_COL_R 21
+#define OB_COL_G 22
+#define OB_COL_B 23
+#define OB_COL_A 24
+
+
+
+/* ******************** */
+
+#define MA_TOTIPO 32
+
+#define MA_COL_R 1
+#define MA_COL_G 2
+#define MA_COL_B 3
+#define MA_SPEC_R 4
+#define MA_SPEC_G 5
+#define MA_SPEC_B 6
+#define MA_MIR_R 7
+#define MA_MIR_G 8
+#define MA_MIR_B 9
+#define MA_REF 10
+#define MA_ALPHA 11
+#define MA_EMIT 12
+#define MA_AMB 13
+#define MA_SPEC 14
+#define MA_HARD 15
+#define MA_SPTR 16
+#define MA_ANG 17
+#define MA_MODE 18
+#define MA_HASIZE 19
+
+#define MA_MAP1 0x20
+#define MA_MAP2 0x40
+#define MA_MAP3 0x80
+#define MA_MAP4 0x100
+#define MA_MAP5 0x200
+#define MA_MAP6 0x400
+#define MA_MAP7 0x800
+#define MA_MAP8 0x1000
+
+#define MAP_OFS_X 1
+#define MAP_OFS_Y 2
+#define MAP_OFS_Z 3
+#define MAP_SIZE_X 4
+#define MAP_SIZE_Y 5
+#define MAP_SIZE_Z 6
+#define MAP_R 7
+#define MAP_G 8
+#define MAP_B 9
+
+#define MAP_DVAR 10
+#define MAP_COLF 11
+#define MAP_NORF 12
+#define MAP_VARF 13
+
+/* ******************** */
+
+#define SEQ_TOTIPO 1
+
+#define SEQ_FAC1 1
+
+/* ******************** */
+
+#define CU_TOTIPO 1
+
+#define CU_SPEED 1
+
+/* ******************** */
+
+#define KEY_TOTIPO 32
+
+#define KEY_SPEED 0
+#define KEY_NR 1
+
+/* ******************** */
+
+#define WO_TOTIPO 29
+
+#define WO_HOR_R 1
+#define WO_HOR_G 2
+#define WO_HOR_B 3
+#define WO_ZEN_R 4
+#define WO_ZEN_G 5
+#define WO_ZEN_B 6
+
+#define WO_EXPOS 7
+
+#define WO_MISI 8
+#define WO_MISTDI 9
+#define WO_MISTSTA 10
+#define WO_MISTHI 11
+
+#define WO_STAR_R 12
+#define WO_STAR_G 13
+#define WO_STAR_B 14
+#define WO_STARDIST 15
+#define WO_STARSIZE 16
+
+/* ******************** */
+
+#define LA_TOTIPO 23
+
+#define LA_ENERGY 1
+#define LA_COL_R 2
+#define LA_COL_G 3
+#define LA_COL_B 4
+#define LA_DIST 5
+#define LA_SPOTSI 6
+#define LA_SPOTBL 7
+#define LA_QUAD1 8
+#define LA_QUAD2 9
+#define LA_HALOINT 10
+
+/* ******************** */
+
+#define CAM_TOTIPO 3
+
+#define CAM_LENS 1
+#define CAM_STA 2
+#define CAM_END 3
+
+
+/* ******************** */
+
+#define SND_TOTIPO 4
+
+#define SND_VOLUME 1
+#define SND_PITCH 2
+#define SND_PANNING 3
+#define SND_ATTEN 4
+
+/* ******************** */
+
+#define AC_TOTIPO 10 /* __NLA */
+
+#define AC_LOC_X 1
+#define AC_LOC_Y 2
+#define AC_LOC_Z 3
+
+#define AC_SIZE_X 13
+#define AC_SIZE_Y 14
+#define AC_SIZE_Z 15
+
+#define AC_QUAT_W 25
+#define AC_QUAT_X 26
+#define AC_QUAT_Y 27
+#define AC_QUAT_Z 28
+
+/* ******************** */
+#define CO_TOTIPO 1 /* Constraint Ipos */
+
+#define CO_ENFORCE 1
+/*
+#define CO_TIME 2
+#define CO_OFFSET_X 3
+#define CO_OFFSET_Y 4
+#define CO_OFFSET_Z 5
+#define CO_ORIENT_X 6
+#define CO_ORIENT_Y 7
+#define CO_ORIENT_Z 8
+#define CO_ROLL 9
+*/
+
+/* these are ipo-specific */
+/* **************** IPO ********************* */
+
+/* vartype */
+#define IPO_CHAR 0
+#define IPO_SHORT 1
+#define IPO_INT 2
+#define IPO_LONG 3
+#define IPO_FLOAT 4
+#define IPO_DOUBLE 5
+#define IPO_FLOAT_DEGR 6
+/* zeer speciaal geval in keys */
+#define IPO_BEZTRIPLE 100
+#define IPO_BPOINT 101
+
+
+#define IPO_BITS 16
+#define IPO_CHAR_BIT 16
+#define IPO_SHORT_BIT 17
+#define IPO_INT_BIT 18
+
+/* ipo */
+#define IPO_CONST 0
+#define IPO_LIN 1
+#define IPO_BEZ 2
+#define IPO_MIXED 3
+
+/* extrap */
+#define IPO_HORIZ 0
+#define IPO_DIR 1
+#define IPO_CYCL 2
+#define IPO_CYCLX 3
+
+/* flag */
+#define IPO_VISIBLE 1
+#define IPO_SELECT 2
+#define IPO_EDIT 4
+#define IPO_LOCK 8
+
+
+#endif
diff --git a/source/blender/makesdna/DNA_key_types.h b/source/blender/makesdna/DNA_key_types.h
new file mode 100644
index 00000000000..ed2c3308d5f
--- /dev/null
+++ b/source/blender/makesdna/DNA_key_types.h
@@ -0,0 +1,84 @@
+/**
+ * blenlib/DNA_key_types.h (mar-2001 nzc)
+ *
+ * $Id$
+ *
+ * ***** BEGIN GPL/BL DUAL 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. The Blender
+ * Foundation also sells licenses for use in proprietary software under
+ * the Blender License. See http://www.blender.org/BL/ for information
+ * about this.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_KEY_TYPES_H
+#define DNA_KEY_TYPES_H
+
+#include "DNA_listBase.h"
+#include "DNA_ID.h"
+
+struct Ipo;
+
+typedef struct KeyBlock {
+ struct KeyBlock *next, *prev;
+
+ float pos;
+ short flag, totelem;
+ short type, rt;
+ int pad;
+
+ void *data;
+
+} KeyBlock;
+
+
+typedef struct Key {
+ ID id;
+
+ KeyBlock *refkey;
+ char elemstr[32];
+ int elemsize;
+ float curval;
+
+ ListBase block;
+ struct Ipo *ipo;
+
+ ID *from;
+
+ short type, totkey;
+ short slurph, actkey;
+
+} Key;
+
+/* **************** KEY ********************* */
+
+/* type */
+#define KEY_NORMAL 0
+#define KEY_RELATIVE 1
+
+/* keyblock->type */
+#define KEY_LINEAR 0
+#define KEY_CARDINAL 1
+#define KEY_BSPLINE 2
+
+#endif
diff --git a/source/blender/makesdna/DNA_lamp_types.h b/source/blender/makesdna/DNA_lamp_types.h
new file mode 100644
index 00000000000..90ac306edc8
--- /dev/null
+++ b/source/blender/makesdna/DNA_lamp_types.h
@@ -0,0 +1,96 @@
+/**
+ * blenlib/DNA_lamp_types.h (mar-2001 nzc)
+ *
+ * $Id$
+ *
+ * ***** BEGIN GPL/BL DUAL 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. The Blender
+ * Foundation also sells licenses for use in proprietary software under
+ * the Blender License. See http://www.blender.org/BL/ for information
+ * about this.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_LAMP_TYPES_H
+#define DNA_LAMP_TYPES_H
+
+#include "DNA_ID.h"
+#include "DNA_scriptlink_types.h"
+
+struct MTex;
+struct Ipo;
+
+typedef struct Lamp {
+ ID id;
+
+ short type, mode;
+
+ short colormodel, totex;
+ float r, g, b, k;
+
+ float energy, dist, spotsize, spotblend;
+ float haint;
+ float att1, att2;
+
+ short bufsize, samp;
+ float clipsta, clipend, shadspotsize;
+ float bias, soft;
+
+ /* texact is voor buttons */
+ short texact, shadhalostep;
+
+ struct MTex *mtex[8];
+ struct Ipo *ipo;
+
+ ScriptLink scriptlink;
+} Lamp;
+
+/* **************** LAMP ********************* */
+
+/* type */
+#define LA_LOCAL 0
+#define LA_SUN 1
+#define LA_SPOT 2
+#define LA_HEMI 3
+
+/* mode */
+#define LA_SHAD 1
+#define LA_HALO 2
+#define LA_LAYER 4
+#define LA_QUAD 8
+#define LA_NEG 16
+#define LA_ONLYSHADOW 32
+#define LA_SPHERE 64
+#define LA_SQUARE 128
+#define LA_TEXTURE 256
+#define LA_OSATEX 512
+/* use bit 11 for shadow tests... temp only -nzc- */
+#define LA_DEEP_SHADOW 1024
+
+/* mapto */
+#define LAMAP_COL 1
+
+/* bit isolated... */
+#define MAXLAMP 256
+
+#endif
diff --git a/source/blender/makesdna/DNA_lattice_types.h b/source/blender/makesdna/DNA_lattice_types.h
new file mode 100644
index 00000000000..adda253d434
--- /dev/null
+++ b/source/blender/makesdna/DNA_lattice_types.h
@@ -0,0 +1,65 @@
+/**
+ * blenlib/DNA_mesh_types.h (mar-2001 nzc)
+ *
+ * Mesh stuff.
+ *
+ * $Id$
+ *
+ * ***** BEGIN GPL/BL DUAL 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. The Blender
+ * Foundation also sells licenses for use in proprietary software under
+ * the Blender License. See http://www.blender.org/BL/ for information
+ * about this.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_LATTICE_TYPES_H
+#define DNA_LATTICE_TYPES_H
+
+#include "DNA_ID.h"
+
+struct BPoint;
+struct Ipo;
+struct Key;
+
+typedef struct Lattice {
+ ID id;
+
+ short pntsu, pntsv, pntsw, flag;
+ char typeu, typev, typew, type;
+ int pad;
+
+ struct BPoint *def;
+
+ struct Ipo *ipo;
+ struct Key *key;
+
+} Lattice;
+
+/* ***************** LATTICE ********************* */
+
+/* flag */
+#define LT_GRID 1
+#define LT_OUTSIDE 2
+
+#endif
diff --git a/source/blender/makesdna/DNA_listBase.h b/source/blender/makesdna/DNA_listBase.h
new file mode 100644
index 00000000000..817edd4ef9d
--- /dev/null
+++ b/source/blender/makesdna/DNA_listBase.h
@@ -0,0 +1,63 @@
+/**
+ * blenlib/BLI_listBase.h mar 2001 Nzc
+ *
+ * $Id$
+ *
+ * ***** BEGIN GPL/BL DUAL 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. The Blender
+ * Foundation also sells licenses for use in proprietary software under
+ * the Blender License. See http://www.blender.org/BL/ for information
+ * about this.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ *
+ * These structs are the foundation for all linked lists in the
+ * library system.
+ *
+ */
+
+#ifndef DNA_LISTBASE_H
+#define DNA_LISTBASE_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct Link
+{
+ struct Link *next,*prev;
+} Link;
+
+/* never change the size of this! genfile.c detects pointerlen with it */
+typedef struct ListBase
+{
+ void *first, *last;
+} ListBase;
+
+/* 8 byte alignment! */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/source/blender/makesdna/DNA_material_types.h b/source/blender/makesdna/DNA_material_types.h
new file mode 100644
index 00000000000..dad4a427baa
--- /dev/null
+++ b/source/blender/makesdna/DNA_material_types.h
@@ -0,0 +1,162 @@
+/**
+ * blenlib/DNA_material_types.h (mar-2001 nzc)
+ *
+ * $Id$
+ *
+ * ***** BEGIN GPL/BL DUAL 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. The Blender
+ * Foundation also sells licenses for use in proprietary software under
+ * the Blender License. See http://www.blender.org/BL/ for information
+ * about this.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_MATERIAL_TYPES_H
+#define DNA_MATERIAL_TYPES_H
+
+/* #include "BLI_listBase.h" */
+
+#include "DNA_ID.h"
+#include "DNA_scriptlink_types.h"
+
+struct MTex;
+struct Ipo;
+struct Material;
+
+/* LET OP: type veranderen? ook in ipo.h doen */
+
+typedef struct Material {
+ ID id;
+
+ short colormodel, lay; /* lay: voor dynamics */
+ float r, g, b;
+ float specr, specg, specb;
+ float mirr, mirg, mirb;
+ float ambr, ambb, ambg;
+
+ float amb, emit, ang, spectra;
+ float alpha, ref, spec, zoffs, add;
+ float kfac; /* for transparent solids */
+ short har;
+ char seed1, seed2;
+
+ int mode;
+ int mode2; /* even more material settings :) */
+ short flarec, starc, linec, ringc;
+ float hasize, flaresize, subsize, flareboost;
+
+ /* onderstaand is voor buttons en render*/
+ char rgbsel, texact, pr_type, septex;
+ short pr_back, pr_lamp;
+
+ int pad1;
+ short texco, mapto;
+
+ struct MTex *mtex[8];
+ struct Ipo *ipo;
+ struct Material *ren;
+
+ /* dynamic properties */
+ float friction, fh, reflect;
+ float fhdist, xyfrict;
+ short dynamode, pad;
+
+ ScriptLink scriptlink;
+} Material;
+
+/* **************** MATERIAL ********************* */
+
+ /* maximum number of materials per material array
+ * (on object, mesh, lamp, etc.)
+ */
+#define MAXMAT 16
+
+/* colormodel */
+#define MA_RGB 0
+#define MA_CMYK 1
+#define MA_YUV 2
+#define MA_HSV 3
+
+/* mode (is int) */
+#define MA_TRACEBLE 1
+#define MA_SHADOW 2
+#define MA_SHLESS 4
+#define MA_WIRE 8
+#define MA_VERTEXCOL 16
+#define MA_HALO 32
+#define MA_ZTRA 64
+#define MA_VERTEXCOLP 128
+#define MA_ZINV 256
+#define MA_HALO_RINGS 256
+#define MA_ENV 512
+#define MA_HALO_LINES 512
+#define MA_ONLYSHADOW 1024
+#define MA_HALO_XALPHA 1024
+#define MA_STAR 0x800
+#define MA_FACETEXTURE 0x800
+#define MA_HALOTEX 0x1000
+#define MA_HALOPUNO 0x2000
+#define MA_NOMIST 0x4000
+#define MA_HALO_SHADE 0x4000
+#define MA_HALO_FLARE 0x8000
+
+/* dynamode */
+#define MA_DRAW_DYNABUTS 1
+#define MA_FH_NOR 2
+
+/* texco */
+#define TEXCO_ORCO 1
+#define TEXCO_REFL 2
+#define TEXCO_NORM 4
+#define TEXCO_GLOB 8
+#define TEXCO_UV 16
+#define TEXCO_OBJECT 32
+#define TEXCO_LAVECTOR 64
+#define TEXCO_VIEW 128
+#define TEXCO_STICKY 256
+#define TEXCO_OSA 512
+#define TEXCO_WINDOW 1024
+#define NEED_UV 2048
+
+/* mapto */
+#define MAP_COL 1
+#define MAP_NORM 2
+#define MAP_COLSPEC 4
+#define MAP_COLMIR 8
+#define MAP_VARS (0xFFF0)
+#define MAP_REF 16
+#define MAP_SPEC 32
+#define MAP_EMIT 64
+#define MAP_ALPHA 128
+#define MAP_HAR 256
+#define MAP_XTRA 512
+
+/* pr_type */
+#define MA_FLAT 0
+#define MA_SPHERE 1
+#define MA_CUBE 2
+
+/* pr_back */
+#define MA_DARK 1
+
+#endif
diff --git a/source/blender/makesdna/DNA_mesh_types.h b/source/blender/makesdna/DNA_mesh_types.h
new file mode 100644
index 00000000000..20e79a5b632
--- /dev/null
+++ b/source/blender/makesdna/DNA_mesh_types.h
@@ -0,0 +1,229 @@
+/**
+ * blenlib/DNA_mesh_types.h (mar-2001 nzc)
+ *
+ * Mesh stuff.
+ *
+ * $Id$
+ *
+ * ***** BEGIN GPL/BL DUAL 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. The Blender
+ * Foundation also sells licenses for use in proprietary software under
+ * the Blender License. See http://www.blender.org/BL/ for information
+ * about this.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_MESH_TYPES_H
+#define DNA_MESH_TYPES_H
+
+#include "DNA_listBase.h"
+#include "DNA_ID.h"
+
+struct Ipo;
+struct Key;
+struct Material;
+struct MVert;
+struct MCol;
+struct MSticky;
+struct Mesh;
+struct OcInfo;
+struct bDeformGroup;
+
+/* This little gem is needed to satisfy the curious realms of sdna. On
+ * the other hand, it also interferes with sys/types.h, so we get rid
+ * of it asap. */
+
+#define ushort unsigned short
+
+typedef struct MFace {
+/* unsigned short v1, v2, v3, v4; */
+ ushort v1, v2, v3, v4;
+ char puno, mat_nr;
+ char edcode, flag;
+} MFace;
+
+#undef ushort
+
+typedef struct MFaceInt {
+ int v1, v2, v3, v4;
+ char puno, mat_nr;
+ char edcode, flag;
+} MFaceInt;
+
+
+typedef struct TFace {
+
+ /* this one gets interpreted as a image in texture.c */
+ void *tpage;
+
+ float uv[4][2]; /* als je dit wijzigt: ook fie set_correct_uv editmesh.c, ook andere plekken maken gebruik van de lengte van dit blok */
+ unsigned int col[4];
+ char flag, transp;
+ short mode, tile, pad;
+} TFace;
+
+typedef struct MDeformWeight { /* __NLA */
+ int def_nr; /* __NLA */
+ float weight; /* __NLA */
+ struct Bone *data; /* __NLA */ /* Runtime: Does not need to be valid in file */
+} MDeformWeight; /* __NLA */
+
+typedef struct MDeformVert { /* __NLA */
+ struct MDeformWeight *dw; /* __NLA */
+ int totweight; /* __NLA */
+ int reserved1; /* __NLA */
+} MDeformVert; /* __NLA */
+
+
+typedef struct MVert {
+ float co[3];
+ short no[3];
+ char flag, mat_nr;
+} MVert;
+
+
+typedef struct MCol {
+ char a, r, g, b;
+} MCol;
+
+
+typedef struct MSticky {
+ float co[2];
+} MSticky;
+
+
+typedef struct Mesh {
+ ID id;
+
+ struct BoundBox *bb;
+
+ ListBase effect;
+ ListBase disp;
+
+ struct Ipo *ipo;
+ struct Key *key;
+ struct Material **mat;
+
+ void *mface, *dface, *tface;
+ struct MVert *mvert;
+ struct MDeformVert *dvert; /* __NLA */
+ struct MCol *mcol;
+ struct MSticky *msticky;
+ struct Mesh *texcomesh;
+ float *orco;
+
+ struct OcInfo *oc; /* niet in file */
+ void *sumohandle;
+
+ int totvert, totface;
+
+ int texflag;
+ float loc[3];
+ float size[3];
+ float rot[3];
+
+ short smoothresh, flag;
+ short subdiv, subdivr;
+ short totcol;
+ short reserved1, reserved2, reserved3; /* Padding */
+
+ float cubemapsize, rtf;
+
+} Mesh;
+
+
+
+/* **************** MESH ********************* */
+
+/* texflag */
+#define AUTOSPACE 1
+
+/* me->flag */
+#define ME_ISDONE 1
+#define ME_NOPUNOFLIP 2
+#define ME_TWOSIDED 4
+#define ME_UVEFFECT 8
+#define ME_VCOLEFFECT 16
+#define ME_AUTOSMOOTH 32
+#define ME_SMESH 64
+#define ME_SUBSURF 128
+
+/* puno (mface) */
+#define ME_FLIPV1 1
+#define ME_FLIPV2 2
+#define ME_FLIPV3 4
+#define ME_FLIPV4 8
+#define ME_PROJXY 16
+#define ME_PROJXZ 32
+#define ME_PROJYZ 64
+
+/* edcode (mface) */
+#define ME_V1V2 1
+#define ME_V2V3 2
+#define ME_V3V1 4
+#define ME_V3V4 4
+#define ME_V4V1 8
+
+/* flag (mface) */
+#define ME_SMOOTH 1
+
+/* tface->mode (beetje compatible met PMD formaat) */
+/* sharedvert bepaalt hoe de PSX versie wordt, sharedcol is vertexkleur en puno */
+
+#define TF_DYNAMIC 1
+/* #define TF_INVISIBLE 2 */
+#define TF_TEX 4
+#define TF_SHAREDVERT 8
+#define TF_LIGHT 16
+
+#define TF_SHAREDCOL 64
+#define TF_TILES 128
+#define TF_BILLBOARD 256
+#define TF_TWOSIDE 512
+#define TF_INVISIBLE 1024
+
+#define TF_OBCOL 2048
+#define TF_BILLBOARD2 4096 /* with Z axis constraint */
+#define TF_SHADOW 8192
+#define TF_BMFONT 16384
+
+/* tface->flag: 1=select 2=active*/
+#define TF_SELECT 1
+#define TF_ACTIVE 2
+#define TF_SEL1 4
+#define TF_SEL2 8
+#define TF_SEL3 16
+#define TF_SEL4 32
+#define TF_HIDE 64
+
+/* tface->transp */
+#define TF_SOLID 0
+#define TF_ADD 1
+#define TF_ALPHA 2
+#define TF_SUB 3
+
+/* mvert->flag (1=select) */
+#define ME_SPHERETEST 2
+#define ME_SPHERETEMP 4
+
+#endif
diff --git a/source/blender/makesdna/DNA_meta_types.h b/source/blender/makesdna/DNA_meta_types.h
new file mode 100644
index 00000000000..745fe1a823a
--- /dev/null
+++ b/source/blender/makesdna/DNA_meta_types.h
@@ -0,0 +1,100 @@
+/**
+ * blenlib/DNA_meta_types.h (mar-2001 nzc)
+ *
+ * $Id$
+ *
+ * ***** BEGIN GPL/BL DUAL 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. The Blender
+ * Foundation also sells licenses for use in proprietary software under
+ * the Blender License. See http://www.blender.org/BL/ for information
+ * about this.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_META_TYPES_H
+#define DNA_META_TYPES_H
+
+#include "DNA_listBase.h"
+#include "DNA_ID.h"
+
+struct BoundBox;
+struct Ipo;
+struct Material;
+
+
+typedef struct MetaElem {
+ struct MetaElem *next, *prev;
+
+ short type, lay, flag, selcol;
+ float x, y, z;
+ float expx, expy, expz;
+ float rad, rad2, s, len, maxrad2;
+ int pad;
+
+ float *mat, *imat;
+
+} MetaElem;
+
+typedef struct MetaBall {
+ ID id;
+
+ struct BoundBox *bb;
+
+ ListBase elems;
+ ListBase disp;
+ struct Ipo *ipo;
+
+ struct Material **mat;
+
+ short flag, totcol;
+ int texflag;
+ float loc[3];
+ float size[3];
+ float rot[3];
+ float wiresize, rendersize, thresh;
+
+} MetaBall;
+
+/* **************** METABALL ********************* */
+
+#define MB_MAXELEM 1024
+
+/* mb->flag */
+#define MB_UPDATE_ALWAYS 0
+#define MB_UPDATE_HALFRES 1
+#define MB_UPDATE_FAST 2
+
+/* ml->type */
+#define MB_BALL 0
+#define MB_TUBEX 1
+#define MB_TUBEY 2
+#define MB_TUBEZ 3
+#define MB_CIRCLE 4
+
+/* ml->flag */
+#define MB_NEGATIVE 2
+
+
+
+
+#endif
diff --git a/source/blender/makesdna/DNA_nla_types.h b/source/blender/makesdna/DNA_nla_types.h
new file mode 100644
index 00000000000..9d7befd67ee
--- /dev/null
+++ b/source/blender/makesdna/DNA_nla_types.h
@@ -0,0 +1,71 @@
+/**
+ * $Id$
+ *
+ * ***** BEGIN GPL/BL DUAL 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. The Blender
+ * Foundation also sells licenses for use in proprietary software under
+ * the Blender License. See http://www.blender.org/BL/ for information
+ * about this.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+
+
+#ifndef DNA_NLA_TYPES_H
+#define DNA_NLA_TYPES_H
+
+struct bAction;
+struct Ipo;
+
+typedef struct bActionStrip {
+ struct bActionStrip *next, *prev;
+ short flag;
+ short mode;
+ int reserved1;
+
+ struct Ipo *ipo; /* Blending ipo */
+ struct bAction *act; /* The action referenced by this strip */
+
+ float start, end; /* The range of frames covered by this strip */
+ float actstart, actend; /* The range of frames taken from the action */
+ float stridelen; /* The stridelength (considered when flag & ACT_USESTRIDE) */
+ float repeat; /* The number of times to repeat the action range */
+
+ float blendin, blendout;
+} bActionStrip;
+
+#define ACTSTRIPMODE_BLEND 0
+#define ACTSTRIPMODE_ADD 1
+
+#define ACTSTRIP_SELECT 0x00000001
+
+#define ACTSTRIP_USESTRIDE 0x00000002
+#define ACTSTRIP_BLENDTONEXT 0x00000004
+#define ACTSTRIP_HOLDLASTFRAME 0x00000008
+
+#define ACTSTRIP_SELECTBIT 0
+#define ACTSTRIP_USESTRIDEBIT 1
+#define ACTSTRIP_BLENDTONEXTBIT 2
+#define ACTSTRIP_HOLDLASTFRAMEBIT 3
+#endif
+
diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h
new file mode 100644
index 00000000000..df6ccacb71b
--- /dev/null
+++ b/source/blender/makesdna/DNA_object_types.h
@@ -0,0 +1,316 @@
+/**
+ * blenlib/DNA_object_types.h (mar-2001 nzc)
+ *
+ * Object is a sort of wrapper for general info.
+ *
+ * $Id$
+ *
+ * ***** BEGIN GPL/BL DUAL 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. The Blender
+ * Foundation also sells licenses for use in proprietary software under
+ * the Blender License. See http://www.blender.org/BL/ for information
+ * about this.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_OBJECT_TYPES_H
+#define DNA_OBJECT_TYPES_H
+
+#include "DNA_listBase.h"
+#include "DNA_ID.h"
+#include "DNA_scriptlink_types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct bPose;
+struct Object;
+struct Ipo;
+struct BoundBox;
+struct Path;
+struct Material;
+struct bConstraintChannel;
+
+typedef struct bDeformGroup {
+ struct bDeformGroup *next, *prev;
+ char name[32];
+ void *data; /* Temporary data, most likely a pointer to the bone - no need to delete */
+} bDeformGroup;
+
+#
+#
+typedef struct BoundBox {
+ float vec[8][3];
+} BoundBox;
+
+
+typedef struct Object {
+ ID id;
+
+ short type, partype;
+ int par1, par2, par3; /* kunnen vertexnrs zijn */
+ char parsubstr[32]; /* String describing subobject info */
+ void *pardata;
+ struct Object *parent, *track;
+ struct Ipo *ipo;
+ struct Path *path;
+ struct BoundBox *bb;
+ struct bAction *action;
+ struct bPose *pose;
+ void *data;
+
+ struct bConstraintChannel *activecon;
+ ListBase constraintChannels;
+
+ ListBase effect;
+ ListBase network;
+ ListBase disp;
+ ListBase defbase;
+ struct Material **mat;
+
+ /* rot en drot moeten achterelkaar! (transform('r' en 's')) */
+ float loc[3], dloc[3], orig[3];
+ float size[3], dsize[3];
+ float rot[3], drot[3];
+ float quat[4], dquat[4];
+ float obmat[4][4];
+ float parentinv[4][4];
+ float imat[4][4]; /* voor bij render, tijdens simulate, tijdelijk: ipokeys van transform */
+
+ unsigned int lay; /* kopie van Base */
+ short flag; /* kopie van Base */
+ short colbits; /* nul==van obdata */
+ char transflag, ipoflag;
+ char trackflag, upflag;
+ short ipowin, scaflag; /* ipowin: blocktype laatste ipowindow */
+ short scavisflag, boundtype;
+
+ short dupon, dupoff, dupsta, dupend;
+
+ float sf, ctime;
+
+ /* tijdens realtime */
+
+ /* note that inertia is only called inertia for historical reasons
+ * and is not changed to avoid DNA surgery. It actually reflects the
+ * Size value in the GameButtons (= radius) */
+
+ float mass, damping, inertia;
+ /* The form factor k is introduced to give the user more control
+ * and to fix incompatibility problems.
+ * For rotational symmetric objects, the inertia value can be
+ * expressed as: Theta = k * m * r^2
+ * where m = Mass, r = Radius
+ * For a Sphere, the form factor is by default = 0.4
+ */
+
+ float formfactor, dummy_1;
+ float rdamping, sizefac;
+
+ char dt, dtx;
+ char totcol; /* kopie van mesh of curve of meta */
+ char actcol;
+
+ ScriptLink scriptlink;
+ ListBase prop;
+ ListBase sensors;
+ ListBase controllers;
+ ListBase actuators;
+
+ void *sumohandle;
+
+ float bbsize[3];
+ short dfras;
+ unsigned short actdef; /* current deformation group */
+ float col[4];
+ /**
+ * Settings for game objects
+ * bit 0: Object has dynamic behaviour
+ * bit 2: Object is evaluated by the gameengine
+ * bit 6: Use Fh settings in Materials
+ * bit 7: Use face normal to rotate Object
+ * bit 8: Friction is anisotropic
+ * bit 9: Object is a ghost
+ * bit 10: Do rigid body dynamics.
+ */
+ int gameflag;
+ /**
+ * More settings
+ * bit 15: Always ignore activity culling
+ */
+ int gameflag2;
+ int pad;
+ float anisotropicFriction[3];
+
+ ListBase constraints;
+ ListBase nlastrips;
+} Object;
+
+/* this work object is defined in object.c */
+extern Object workob;
+
+
+/* **************** OBJECT ********************* */
+
+/* used many places... should be specialized */
+#define SELECT 1
+#define ACTIVE 2
+
+/* type */
+#define OB_EMPTY 0
+#define OB_MESH 1
+#define OB_CURVE 2
+#define OB_SURF 3
+#define OB_FONT 4
+#define OB_MBALL 5
+
+#define OB_LAMP 10
+#define OB_CAMERA 11
+
+#define OB_IKA 20
+#define OB_WAVE 21
+#define OB_LATTICE 22
+
+/* 23 and 24 are for life and sector (old file compat.) */
+#define OB_ARMATURE 25
+
+/* partype: eerste 5 bits: type */
+#define PARTYPE 15
+#define PAROBJECT 0
+#define PARCURVE 1
+#define PARKEY 2
+#define PARLIMB 3
+#define PARSKEL 4
+#define PARVERT1 5
+#define PARVERT3 6
+#define PARBONE 7
+#define PARSLOW 16
+
+/* char! transflag */
+#define OB_OFFS_LOCAL 1
+#define OB_QUAT 2
+#define OB_DUPLI (8+16)
+#define OB_DUPLIFRAMES 8
+#define OB_DUPLIVERTS 16
+#define OB_DUPLIROT 32
+#define OB_DUPLINOSPEED 64
+
+#define OB_POWERTRACK 128
+
+/* char! ipoflag */
+#define OB_DRAWKEY 1
+#define OB_DRAWKEYSEL 2
+#define OB_OFFS_OB 4
+#define OB_OFFS_MAT 8
+#define OB_OFFS_VKEY 16
+#define OB_OFFS_PATH 32
+#define OB_OFFS_PARENT 64
+#define OB_OFFS_PARTICLE 128
+
+
+/* trackflag / upflag */
+#define OB_POSX 0
+#define OB_POSY 1
+#define OB_POSZ 2
+#define OB_NEGX 3
+#define OB_NEGY 4
+#define OB_NEGZ 5
+
+/* gameflag in game.h */
+
+/* dt: nummers */
+#define OB_BOUNDBOX 1
+#define OB_WIRE 2
+#define OB_SOLID 3
+#define OB_SHADED 4
+#define OB_TEXTURE 5
+
+/* dtx: flags */
+#define OB_AXIS 2
+#define OB_TEXSPACE 4
+#define OB_DRAWNAME 8
+#define OB_DRAWIMAGE 16
+
+/* boundtype */
+#define OB_BOUND_BOX 0
+#define OB_BOUND_SPHERE 1
+#define OB_BOUND_CYLINDER 2
+#define OB_BOUND_CONE 3
+#define OB_BOUND_POLYH 4
+
+/* also needed for base!!!!! or rather, thy interfere....*/
+/* base->flag en ob->flag */
+#define BA_WASSEL 2
+#define BA_PARSEL 4
+#define BA_WHERE_UPDATE 8
+#define BA_DISP_UPDATE 16
+#define BA_DO_IPO 32
+#define BA_FROMSET 128
+#define OB_DO_IMAT 256
+#define OB_FROMDUPLI 512
+#define OB_DONE 1024
+#define OB_RADIO 2048
+#define OB_FROMGROUP 4096
+
+/* ob->gameflag */
+#define OB_DYNAMIC 1
+#define OB_CHILD 2
+#define OB_ACTOR 4
+#define OB_INERTIA_LOCK_X 8
+#define OB_INERTIA_LOCK_Y 16
+#define OB_INERTIA_LOCK_Z 32
+#define OB_DO_FH 64
+#define OB_ROT_FH 128
+#define OB_ANISOTROPIC_FRICTION 256
+#define OB_GHOST 512
+#define OB_RIGID_BODY 1024
+
+#define OB_COLLISION_RESPONSE 4096
+#define OB_SECTOR 8192
+#define OB_PROP 16384
+#define OB_MAINACTOR 32768
+
+/* ob->gameflag2 */
+#define OB_NEVER_DO_ACTIVITY_CULLING 1
+
+#define OB_LIFE (OB_PROP|OB_DYNAMIC|OB_ACTOR|OB_MAINACTOR|OB_CHILD)
+
+/* ob->scavisflag */
+#define OB_VIS_SENS 1
+#define OB_VIS_CONT 2
+#define OB_VIS_ACT 4
+
+/* ob->scaflag */
+#define OB_SHOWSENS 64
+#define OB_SHOWACT 128
+#define OB_ADDSENS 256
+#define OB_ADDCONT 512
+#define OB_ADDACT 1024
+#define OB_SHOWCONT 2048
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/source/blender/makesdna/DNA_oops_types.h b/source/blender/makesdna/DNA_oops_types.h
new file mode 100644
index 00000000000..e4b7c840859
--- /dev/null
+++ b/source/blender/makesdna/DNA_oops_types.h
@@ -0,0 +1,68 @@
+/**
+ * blenlib/DNA_oops_types.h (mar-2001 nzc)
+ *
+ * $Id$
+ *
+ * ***** BEGIN GPL/BL DUAL 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. The Blender
+ * Foundation also sells licenses for use in proprietary software under
+ * the Blender License. See http://www.blender.org/BL/ for information
+ * about this.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_OOPS_TYPES_H
+#define DNA_OOPS_TYPES_H
+
+#define OOPSX 5.0
+#define OOPSY 1.8
+
+#include "DNA_listBase.h"
+
+struct ID;
+
+typedef struct Oops {
+ struct Oops *next, *prev;
+ short type, flag, dt, hide;
+ float x, y; /* linksonder */
+ float dx, dy; /* shuffle */
+ struct ID *id;
+ ListBase link;
+} Oops;
+
+#
+#
+typedef struct OopsLink {
+ struct OopsLink *next, *prev;
+ short type, flag;
+ ID **idfrom;
+ Oops *to, *from; /* from is voor temp */
+ float xof, yof;
+ char name[12];
+} OopsLink;
+
+/* oops->flag (1==SELECT) */
+#define OOPS_DOSELECT 2
+#define OOPS_REFER 4
+
+#endif
diff --git a/source/blender/makesdna/DNA_packedFile_types.h b/source/blender/makesdna/DNA_packedFile_types.h
new file mode 100644
index 00000000000..40ada86cda2
--- /dev/null
+++ b/source/blender/makesdna/DNA_packedFile_types.h
@@ -0,0 +1,63 @@
+/* DNA_packedFile_types.h
+ *
+ * 12-oct-2000 nzc
+ *
+ * $Id$
+ *
+ * ***** BEGIN GPL/BL DUAL 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. The Blender
+ * Foundation also sells licenses for use in proprietary software under
+ * the Blender License. See http://www.blender.org/BL/ for information
+ * about this.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+
+#ifndef DNA_PACKEDFILE_TYPES_H
+#define DNA_PACKEDFILE_TYPES_H
+
+typedef struct PackedFile {
+ int size;
+ int seek;
+ int flags;
+ int pad;
+ void * data;
+} PackedFile;
+
+enum PF_FileStatus
+{
+ PF_EQUAL = 0,
+ PF_DIFFERS,
+ PF_NOFILE,
+
+ PF_WRITE_ORIGINAL,
+ PF_WRITE_LOCAL,
+ PF_USE_LOCAL,
+ PF_USE_ORIGINAL,
+ PF_KEEP,
+ PF_NOOP,
+
+ PF_ASK
+};
+
+#endif /* PACKEDFILE_TYPES_H */
diff --git a/source/blender/makesdna/DNA_property_types.h b/source/blender/makesdna/DNA_property_types.h
new file mode 100644
index 00000000000..1be6ecefa6c
--- /dev/null
+++ b/source/blender/makesdna/DNA_property_types.h
@@ -0,0 +1,67 @@
+/**
+ * blenlib/DNA_property_types.h (mar-2001 nzc)
+ *
+ * Renderrecipe and scene decription. The fact that there is a
+ * hierarchy here is a bit strange, and not desirable.
+ *
+ * $Id$
+ *
+ * ***** BEGIN GPL/BL DUAL 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. The Blender
+ * Foundation also sells licenses for use in proprietary software under
+ * the Blender License. See http://www.blender.org/BL/ for information
+ * about this.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_PROPERTY_TYPES_H
+#define DNA_PROPERTY_TYPES_H
+
+/* ********************* PROPERTY ************************ */
+
+typedef struct bProperty {
+ struct bProperty *next, *prev;
+ char name[32];
+ short type, otype; /* otype is for buttons, when a property type changes */
+ int data; /* data should be 4 bytes to store int,float stuff */
+ int old; /* old is for simul */
+ short flag, pad;
+ void *poin;
+ void *oldpoin; /* oldpoin is for simul */
+
+} bProperty;
+
+/* property->type */
+#define PROP_BOOL 0
+#define PROP_INT 1
+#define PROP_FLOAT 2
+#define PROP_STRING 3
+#define PROP_VECTOR 4
+#define PROP_TIME 5
+
+/* property->flag */
+#define PROP_DEBUG 1
+
+#define MAX_PROPSTRING 128
+
+#endif
diff --git a/source/blender/makesdna/DNA_radio_types.h b/source/blender/makesdna/DNA_radio_types.h
new file mode 100644
index 00000000000..2fe9048f612
--- /dev/null
+++ b/source/blender/makesdna/DNA_radio_types.h
@@ -0,0 +1,52 @@
+/**
+ * radio_types.h dec 2000 Nzc
+ *
+ * All type defs for the Blender core.
+ *
+ * $Id$
+ *
+ * ***** BEGIN GPL/BL DUAL 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. The Blender
+ * Foundation also sells licenses for use in proprietary software under
+ * the Blender License. See http://www.blender.org/BL/ for information
+ * about this.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ *
+ */
+
+#ifndef DNA_RADIO_TYPES_H
+#define DNA_RADIO_TYPES_H
+
+typedef struct Radio {
+ short hemires, maxiter;
+ short drawtype, flag; /* bit 0 en 1: limits laten zien */
+ short subshootp, subshoote, nodelim, maxsublamp;
+ short pama, pami, elma, elmi; /* patch en elem limits */
+ int maxnode;
+ float convergence;
+ float radfac, gamma; /* voor afbeelden */
+
+} Radio;
+
+#endif
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
new file mode 100644
index 00000000000..147f4e22ed6
--- /dev/null
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -0,0 +1,346 @@
+/**
+ * blenlib/DNA_scene_types.h (mar-2001 nzc)
+ *
+ * Renderrecipe and scene decription. The fact that there is a
+ * hierarchy here is a bit strange, and not desirable.
+ *
+ * $Id$
+ *
+ * ***** BEGIN GPL/BL DUAL 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. The Blender
+ * Foundation also sells licenses for use in proprietary software under
+ * the Blender License. See http://www.blender.org/BL/ for information
+ * about this.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_SCENE_TYPES_H
+#define DNA_SCENE_TYPES_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "DNA_vec_types.h"
+#include "DNA_listBase.h"
+#include "DNA_scriptlink_types.h"
+#include "DNA_ID.h"
+#include "DNA_scriptlink_types.h"
+
+struct FreeCamera;
+struct Radio;
+struct Object;
+struct World;
+struct Scene;
+struct Image;
+struct Group;
+
+typedef struct Base {
+ struct Base *next, *prev;
+ unsigned int lay, selcol;
+ int flag;
+ short sx, sy;
+ struct Object *object;
+} Base;
+
+typedef struct AviCodecData {
+ void *lpFormat; /* save format */
+ void *lpParms; /* compressor options */
+ unsigned int cbFormat; /* size of lpFormat buffer */
+ unsigned int cbParms; /* size of lpParms buffer */
+
+ unsigned int fccType; /* stream type, for consistency */
+ unsigned int fccHandler; /* compressor */
+ unsigned int dwKeyFrameEvery; /* keyframe rate */
+ unsigned int dwQuality; /* compress quality 0-10,000 */
+ unsigned int dwBytesPerSecond; /* bytes per second */
+ unsigned int dwFlags; /* flags... see below */
+ unsigned int dwInterleaveEvery; /* for non-video streams only */
+ unsigned int pad;
+} AviCodecData;
+
+typedef struct RenderData {
+ struct AviCodecData *avicodecdata;
+
+ /* hoe gaat tijd gedefinieerd worden? */
+ short cfra, sfra, efra; /* plaatjes */
+ short images, framapto, flag;
+ float ctime; /* hiermee rekenen? */
+ float framelen, blurfac;
+
+ /** For UR edge rendering: give the edges this colour */
+ float edgeR, edgeG, edgeB;
+
+ short fullscreen, xplay, yplay, freqplay; /* standalone player */
+ short depth, attrib, rt1, rt2; /* standalone player */
+
+ short stereomode; /* standalone player stereo settings */
+ short pad[3];
+
+ short size, maximsize; /* size in %, max in Kb */
+ /* uit buttons: */
+ /**
+ * The desired number of pixels in the x direction
+ */
+ short xsch;
+ /**
+ * The desired number of pixels in the y direction
+ */
+ short ysch;
+ /**
+ * Adjustment factors for the aspect ratio in the x direction
+ */
+ short xasp;
+ /**
+ * Adjustment factors for the aspect ratio in the x direction
+ */
+ short yasp;
+ /**
+ * The number of part to use in the x direction
+ */
+ short xparts;
+ /**
+ * The number of part to use in the y direction
+ */
+ short yparts;
+ /* should rewrite this I think... */
+ rctf safety, border;
+
+ short winpos, planes, imtype;
+ /** Mode bits: */
+ /* 0: Enable backbuffering for images */
+ short bufflag;
+ short quality;
+ /**
+ * Flags for render settings. Use bit-masking to access the settings.
+ * 0: enable sequence output rendering
+ * 1: render daemon
+ * 4: add extensions to filenames
+ */
+ short scemode;
+
+ /**
+ * Flags for render settings. Use bit-masking to access the settings.
+ * The bits have these meanings:
+ * 0: do oversampling
+ * 1: do shadows
+ * 2: do gamma correction
+ * 3: ortho (not used?)
+ * 4: trace (not used?)
+ * 5: edge shading
+ * 6: field rendering
+ * 7: Disables time difference in field calculations
+ * 8: Gauss ? is this for sampling?
+ * 9: borders
+ * 10: panorama
+ * 11: crop
+ * 12: save SGI movies with Cosmo hardware (????)
+ * 13: odd field first rendering
+ * 14: motion blur
+ * 15: use unified renderer for this pic!
+ */
+ short mode;
+
+ /**
+ * What to do with the sky/background. Picks sky/premul/key
+ * blending for the background
+ */
+ short alphamode;
+ /**
+ * Toggles whether to apply a gamma correction for subpixel to
+ * pixel blending
+ */
+ short dogamma;
+ /**
+ * The number of samples to use per pixel.
+ */
+ short osa;
+ short frs_sec, edgeint;
+
+ /** For unified renderer: reduce intensity on boundaries with
+ * identical materials with this number.*/
+ short same_mat_redux, pad_3[3];
+
+ /**
+ * The gamma for the normal rendering. Used when doing
+ * oversampling, to correctly blend subpixels to pixels. */
+ float gamma;
+ /** post-production settings. Don't really belong here */
+ float postmul, postgamma, postadd, postigamma;
+
+ char backbuf[160], pic[160], ftype[160];
+
+} RenderData;
+
+
+typedef struct GameFraming {
+ float col[3];
+ char type, pad1, pad2, pad3;
+} GameFraming;
+
+#define SCE_GAMEFRAMING_BARS 0
+#define SCE_GAMEFRAMING_EXTEND 1
+#define SCE_GAMEFRAMING_SCALE 2
+
+typedef struct Scene {
+ ID id;
+ struct Object *camera;
+ struct World *world;
+
+ struct Scene *set;
+ struct Image *ima;
+
+ ListBase base;
+ struct Base *basact;
+ struct Group *group;
+
+ float cursor[3];
+ unsigned int lay;
+
+ /* enkele realtime vars */
+ struct FreeCamera *fcam;
+
+ void *ed;
+ struct Radio *radio;
+ void *sumohandle;
+
+ struct GameFraming framing;
+
+ /* migrate or replace? depends on some internal things... */
+ /* no, is on the right place (ton) */
+ struct RenderData r;
+
+ ScriptLink scriptlink;
+} Scene;
+
+
+/* **************** RENDERDATA ********************* */
+
+/* bufflag */
+#define R_BACKBUF 1
+#define R_BACKBUFANIM 2
+#define R_FRONTBUF 4
+#define R_FRONTBUFANIM 8
+
+/* mode */
+#define R_OSA 0x0001
+#define R_SHADOW 0x0002
+#define R_GAMMA 0x0004
+#define R_ORTHO 0x0008
+#define R_TRACE 0x0010
+#define R_EDGE 0x0020
+#define R_FIELDS 0x0040
+#define R_FIELDSTILL 0x0080
+#define R_GAUSS 0x0100
+#define R_BORDER 0x0200
+#define R_PANORAMA 0x0400
+#define R_MOVIECROP 0x0800
+#define R_COSMO 0x1000
+/* deze verschillen tussen IrisGL en OpenGL!!! */
+#define R_ODDFIELD 0x2000
+#define R_MBLUR 0x4000
+#define R_UNIFIED 0x8000
+
+/* scemode */
+#define R_DOSEQ 0x0001
+#define R_BG_RENDER 0x0002
+
+#define R_EXTENSION 0x0010
+#define R_OGL 0x0020
+
+/* alphamode */
+#define R_ADDSKY 0
+#define R_ALPHAPREMUL 1
+#define R_ALPHAKEY 2
+
+/* planes */
+#define R_PLANES24 24
+#define R_PLANES32 32
+#define R_PLANESBW 8
+
+/* imtype */
+#define R_TARGA 0
+#define R_IRIS 1
+#define R_HAMX 2
+#define R_FTYPE 3
+#define R_JPEG90 4
+#define R_MOVIE 5
+#define R_IRIZ 7
+#define R_RAWTGA 14
+#define R_AVIRAW 15
+#define R_AVIJPEG 16
+#define R_PNG 17
+#define R_AVICODEC 18
+
+
+/* **************** RENDER ********************* */
+/* mode flag is same as for renderdata */
+/* flag */
+#define R_ZTRA 1
+#define R_HALO 2
+#define R_SEC_FIELD 4
+#define R_LAMPHALO 8
+#define R_RENDERING 16
+#define R_ANIMRENDER 32
+
+/* vlakren->flag */
+#define R_SMOOTH 1
+#define R_VISIBLE 2
+#define R_NOPUNOFLIP 8
+#define R_CMAPCODE 16
+#define R_FACE_SPLIT 32
+
+/* vertren->texofs (texcoordinaten offset vanaf vertren->orco */
+#define R_UVOFS3 1
+
+/* **************** SCENE ********************* */
+#define RAD_PHASE_PATCHES 1
+#define RAD_PHASE_FACES 2
+
+/* base->flag en ob->flag */
+#define BA_WASSEL 2
+#define BA_PARSEL 4
+#define BA_WHERE_UPDATE 8
+#define BA_DISP_UPDATE 16
+#define BA_DO_IPO 32
+#define BA_FROMSET 128
+#define OB_DO_IMAT 256
+#define OB_FROMDUPLI 512
+#define OB_DONE 1024
+#define OB_RADIO 2048
+#define OB_FROMGROUP 4096
+
+/* sce->flag */
+#define SCE_ADDSCENAME 1
+
+/* return flag next_object function */
+#define F_START 0
+#define F_SCENE 1
+#define F_SET 2
+#define F_DUPLI 3
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h
new file mode 100644
index 00000000000..8ccd2eef7d1
--- /dev/null
+++ b/source/blender/makesdna/DNA_screen_types.h
@@ -0,0 +1,152 @@
+/**
+ * blenlib/DNA_screen_types.h (mar-2001 nzc)
+ *
+ * $Id$
+ *
+ * ***** BEGIN GPL/BL DUAL 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. The Blender
+ * Foundation also sells licenses for use in proprietary software under
+ * the Blender License. See http://www.blender.org/BL/ for information
+ * about this.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_SCREEN_TYPES_H
+#define DNA_SCREEN_TYPES_H
+
+#include "DNA_listBase.h"
+#include "DNA_vec_types.h"
+
+#include "DNA_ID.h"
+#include "DNA_scriptlink_types.h"
+
+struct Scene;
+
+typedef struct bScreen {
+ ID id;
+ ListBase vertbase, edgebase, areabase;
+ struct Scene *scene;
+ short startx, endx, starty, endy; /* framebuffer coords */
+ short sizex, sizey;
+ short scenenr, screennr; /* alleen voor pupmenu */
+ short full, rt;
+ short mainwin, winakt;
+} bScreen;
+
+
+typedef struct ScrVert {
+ struct ScrVert *next, *prev, *newv;
+ vec2s vec;
+ int flag;
+} ScrVert;
+
+typedef struct ScrEdge {
+ struct ScrEdge *next, *prev;
+ ScrVert *v1, *v2;
+ short border; /* 1 als op rand screen */
+ short flag;
+ int pad;
+} ScrEdge;
+
+#ifndef DNA_USHORT_FIX
+#define DNA_USHORT_FIX
+/**
+ * @deprecated This typedef serves to avoid badly typed functions when
+ * @deprecated compiling while delivering a proper dna.c. Do not use
+ * @deprecated it in any case.
+ */
+typedef unsigned short dna_ushort_fix;
+#endif
+
+typedef struct ScrArea {
+ struct ScrArea *next, *prev;
+ ScrVert *v1, *v2, *v3, *v4;
+ bScreen *full; /* als area==full, dit is de parent */
+ float winmat[4][4];
+ rcti totrct, headrct, winrct;
+
+ short headwin, win;
+ short headertype; /* 0=niets, 1= down, 2= up */
+ char spacetype, butspacetype; /* SPACE_... */
+ short winx, winy; /* size */
+ char head_swap, head_equal;
+ char win_swap, win_equal;
+
+ short headbutlen, headbutofs;
+ short cursor, rt;
+
+ ListBase spacedata;
+ ListBase uiblocks;
+} ScrArea;
+
+#define MAXWIN 128
+
+/* Als je EDGEWIDTH verandert, ook globale array edcol[] goedzetten */
+#define EDGEWIDTH 5
+#define EDGEWIDTH2 (2)
+#define AREAGRID 4
+#define AREAMINX 32
+#define HEADERY 21
+#define AREAMINY (HEADERY+EDGEWIDTH)
+
+#define HEADERDOWN 1
+#define HEADERTOP 2
+
+#define SCREENNORMAL 0
+#define SCREENFULL 1
+#define SCREENAUTOPLAY 2
+
+/* sa->win_swap */
+#define WIN_FRONT_OK 1
+#define WIN_BACK_OK 2
+#define WIN_EQUAL 3
+
+#define L_SCROLL 1 /* left scrollbar */
+#define R_SCROLL 2
+#define VERT_SCROLL 3
+#define T_SCROLL 4
+#define B_SCROLL 8
+#define HOR_SCROLL 12
+
+enum {
+ SPACE_EMPTY,
+ SPACE_VIEW3D,
+ SPACE_IPO,
+ SPACE_OOPS,
+ SPACE_BUTS,
+ SPACE_FILE,
+ SPACE_IMAGE,
+ SPACE_INFO,
+ SPACE_SEQ,
+ SPACE_TEXT,
+ SPACE_IMASEL,
+ SPACE_SOUND,
+ SPACE_ACTION,
+ SPACE_NLA
+/* SPACE_LOGIC */
+};
+
+/* Adding a new space type? Change SPACEICONMAX in headerbuttons.c */
+/* -- should rather handle this with the above enum... */
+
+#endif
diff --git a/source/blender/makesdna/DNA_scriptlink_types.h b/source/blender/makesdna/DNA_scriptlink_types.h
new file mode 100644
index 00000000000..6ac581b1233
--- /dev/null
+++ b/source/blender/makesdna/DNA_scriptlink_types.h
@@ -0,0 +1,63 @@
+/**
+ * blenlib/DNA_object_types.h (mar-2001 nzc)
+ *
+ * Scriptlink is hard-coded in object for some reason.
+ *
+ * $Id$
+ *
+ * ***** BEGIN GPL/BL DUAL 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. The Blender
+ * Foundation also sells licenses for use in proprietary software under
+ * the Blender License. See http://www.blender.org/BL/ for information
+ * about this.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_SCRIPTLINK_TYPES_H
+#define DNA_SCRIPTLINK_TYPES_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct ID;
+
+typedef struct ScriptLink {
+ struct ID **scripts;
+ short *flag;
+
+ short actscript, totscript;
+ int pad;
+} ScriptLink;
+
+/* **************** SCRIPTLINKS ********************* */
+
+#define SCRIPT_FRAMECHANGED 1
+#define SCRIPT_ONLOAD 2
+#define SCRIPT_REDRAW 4
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/source/blender/makesdna/DNA_sdna_types.h b/source/blender/makesdna/DNA_sdna_types.h
new file mode 100644
index 00000000000..9541516453b
--- /dev/null
+++ b/source/blender/makesdna/DNA_sdna_types.h
@@ -0,0 +1,82 @@
+/**
+ * blenlib/DNA_sdna.h (mar-2001 nzc)
+ *
+ * $Id$
+ *
+ * ***** BEGIN GPL/BL DUAL 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. The Blender
+ * Foundation also sells licenses for use in proprietary software under
+ * the Blender License. See http://www.blender.org/BL/ for information
+ * about this.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_SDNA_H
+#define DNA_SDNA_H
+
+#
+#
+struct SDNA {
+ char *data;
+ int datalen, nr_names;
+ char **names;
+ int nr_types, pointerlen;
+ char **types;
+ short *typelens;
+ int nr_structs;
+ short **structs;
+
+ /* wrong place for this really, its a simple
+ * cache for findstruct_nr.
+ */
+ int lastfind;
+};
+
+#
+#
+typedef struct BHead {
+ int code, len;
+ void *old;
+ int SDNAnr, nr;
+} BHead;
+#
+#
+typedef struct BHead4 {
+ int code, len;
+ int old;
+ int SDNAnr, nr;
+} BHead4;
+#
+#
+typedef struct BHead8 {
+ int code, len;
+#ifdef WIN32
+ /* This is a compiler type! */
+ __int64 old;
+#else
+ long long old;
+#endif
+ int SDNAnr, nr;
+} BHead8;
+
+#endif
diff --git a/source/blender/makesdna/DNA_sensor_types.h b/source/blender/makesdna/DNA_sensor_types.h
new file mode 100644
index 00000000000..ad3e83ea6c0
--- /dev/null
+++ b/source/blender/makesdna/DNA_sensor_types.h
@@ -0,0 +1,225 @@
+/**
+ * blenlib/DNA_sensor_types.h (mar-2001 nzc)
+ *
+ * $Id$
+ *
+ * ***** BEGIN GPL/BL DUAL 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. The Blender
+ * Foundation also sells licenses for use in proprietary software under
+ * the Blender License. See http://www.blender.org/BL/ for information
+ * about this.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_SENSOR_TYPES_H
+#define DNA_SENSOR_TYPES_H
+
+struct Object;
+struct Material;
+
+/* ****************** SENSORS ********************* */
+
+typedef struct bNearSensor {
+ char name[32];
+ float dist, resetdist;
+ int lastval, pad;
+} bNearSensor;
+
+/**
+ * Defines the settings of a mouse sensor.
+ */
+typedef struct bMouseSensor {
+ /**
+ * The type of key this sensor listens to.
+ */
+ short type;
+ short flag;
+ short pad1;
+ short pad2;
+} bMouseSensor;
+
+typedef struct bTouchSensor {
+ char name[32];
+ struct Material *ma;
+ float dist, pad;
+} bTouchSensor;
+
+typedef struct bKeyboardSensor {
+ short key, qual;
+ short type, qual2;
+ /**
+ * Name of the target property
+ */
+ char targetName[32];
+ /**
+ * Name of the toggle property
+ */
+ char toggleName[32];
+} bKeyboardSensor;
+
+typedef struct bPropertySensor {
+ int type;
+ int pad;
+ char name[32];
+ char value[32];
+ char maxvalue[32];
+} bPropertySensor;
+
+typedef struct bCollisionSensor {
+ char name[32]; /* property name */
+ char materialName[32]; /* material */
+ short damptimer, damp;
+ short mode; /* flag to choose material or property */
+ short pad2;
+} bCollisionSensor;
+
+typedef struct bRadarSensor {
+ char name[32];
+ float angle;
+ float range;
+ short flag, axis;
+} bRadarSensor;
+
+typedef struct bRandomSensor {
+ char name[32];
+ int seed;
+ int delay;
+} bRandomSensor;
+
+typedef struct bRaySensor {
+ char name[32];
+ float range;
+ char propname[32];
+ char matname[32];
+ short mode;
+ short pad1;
+ int axisflag;
+} bRaySensor;
+
+typedef struct bMessageSensor {
+ /**
+ * (Possible future use) pointer to a single sender object
+ */
+ struct Object *fromObject;
+
+ /**
+ * Can be used to filter on subjects like this
+ */
+ char subject[32];
+
+ /**
+ * (Possible future use) body to filter on
+ */
+ char body[32];
+} bMessageSensor;
+
+typedef struct bSensor {
+ struct bSensor *next, *prev;
+ /* pulse and freq are the bool toggle and frame count for pulse mode */
+ short type, otype, flag, pulse;
+ short freq, totlinks, pad1, pad2;
+ char name[32];
+ void *data;
+
+ struct bController **links;
+
+ struct Object *ob;
+
+ /* just add here, to avoid align errors... */
+ short invert; /* Whether or not to invert the output. */
+ short freq2; /* The negative pulsing frequency? Not used anymore... */
+ int pad;
+} bSensor;
+
+/* bMouseSensor->type: uses blender event defines */
+
+/* propertysensor->type */
+#define SENS_PROP_EQUAL 0
+#define SENS_PROP_NEQUAL 1
+#define SENS_PROP_INTERVAL 2
+#define SENS_PROP_CHANGED 3
+#define SENS_PROP_EXPRESSION 4
+
+/* raysensor->axisflag */
+/* flip x and y to make y default!!! */
+#define SENS_RAY_X_AXIS 1
+#define SENS_RAY_Y_AXIS 0
+#define SENS_RAY_Z_AXIS 2
+#define SENS_RAY_NEG_X_AXIS 3
+#define SENS_RAY_NEG_Y_AXIS 4
+#define SENS_RAY_NEG_Z_AXIS 5
+//#define SENS_RAY_NEGATIVE_AXIS 1
+
+/* bMessageSensor->type */
+#define SENS_MESG_MESG 0
+#define SENS_MESG_PROP 1
+
+/* sensor->type */
+#define SENS_ALWAYS 0
+#define SENS_TOUCH 1
+#define SENS_NEAR 2
+#define SENS_KEYBOARD 3
+#define SENS_PROPERTY 4
+#define SENS_MOUSE 5
+#define SENS_COLLISION 6
+#define SENS_RADAR 7
+#define SENS_RANDOM 8
+#define SENS_RAY 9
+#define SENS_MESSAGE 10
+
+/* sensor->flag */
+#define SENS_SHOW 1
+#define SENS_DEL 2
+#define SENS_NEW 4
+#define SENS_NOT 8
+
+/* sensor->pulse */
+#define SENS_PULSE_CONT 0
+#define SENS_PULSE_REPEAT 1
+#define SENS_PULSE_ONCE 2
+#define SENS_NEG_PULSE_MODE 4
+
+/* sensor->suppress */
+#define SENS_SUPPRESS_POSITIVE_BIT 0
+#define SENS_SUPPRESS_NEGATIVE_BIT 1
+
+#define SENS_SUPPRESS_POSITIVE (1 << SENS_SUPPRESS_POSITIVE_BIT)
+#define SENS_SUPPRESS_NEGATIVE (1 << SENS_SUPPRESS_NEGATIVE_BIT)
+
+/* collision, ray sensor modes: */
+/* A little bit fake: when property is active, the first bit is
+ * reset. Bite me :) So we don't actually use it, so we comment it out
+ * ... The reason for this is that we need to be backward compatible,
+ * and have a proper default value for this thing.
+ * */
+/* #define SENS_COLLISION_PROPERTY 0 */
+#define SENS_COLLISION_MATERIAL 1
+
+/* Some stuff for the mouse sensor Type: */
+#define BL_SENS_MOUSE_LEFT_BUTTON 1
+#define BL_SENS_MOUSE_MIDDLE_BUTTON 2
+#define BL_SENS_MOUSE_RIGHT_BUTTON 4
+#define BL_SENS_MOUSE_MOVEMENT 8
+#define BL_SENS_MOUSE_MOUSEOVER 16
+
+#endif
diff --git a/source/blender/makesdna/DNA_sequence_types.h b/source/blender/makesdna/DNA_sequence_types.h
new file mode 100644
index 00000000000..217d852b9ec
--- /dev/null
+++ b/source/blender/makesdna/DNA_sequence_types.h
@@ -0,0 +1,158 @@
+/**
+ * blenlib/DNA_sequence_types.h (mar-2001 nzc)
+ *
+ * $Id$
+ *
+ * ***** BEGIN GPL/BL DUAL 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. The Blender
+ * Foundation also sells licenses for use in proprietary software under
+ * the Blender License. See http://www.blender.org/BL/ for information
+ * about this.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_SEQUENCE_TYPES_H
+#define DNA_SEQUENCE_TYPES_H
+
+#include "DNA_listBase.h"
+
+struct Ipo;
+struct Scene;
+
+typedef struct StripElem {
+ char name[40];
+ struct ImBuf *ibuf;
+ struct StripElem *se1, *se2, *se3;
+ short ok, nr;
+ int pad;
+
+} StripElem;
+
+typedef struct Strip {
+ struct Strip *next, *prev;
+ short rt, len, us, done;
+ StripElem *stripdata;
+ char dir[80];
+ short orx, ory;
+ int pad;
+
+} Strip;
+
+
+typedef struct PluginSeq {
+ char name[80];
+ void *handle;
+
+ char *pname;
+
+ int vars, version;
+
+ void *varstr;
+ float *cfra;
+
+ float data[32];
+
+ void (*doit)(void);
+
+ void (*callback)(void);
+} PluginSeq;
+
+
+/* LET OP: eerste stuk identiek aan ID (ivm ipo's) */
+
+typedef struct Sequence {
+
+ struct Sequence *next, *prev, *newseq;
+ void *lib;
+ char name[24];
+
+ short flag, type;
+ int len;
+ int start, startofs, endofs;
+ int startstill, endstill;
+ int machine, depth;
+ int startdisp, enddisp;
+ float mul, handsize;
+ int sfra;
+
+ Strip *strip;
+ StripElem *curelem;
+
+ struct Ipo *ipo;
+ struct Scene *scene;
+ struct anim *anim;
+ float facf0, facf1;
+
+ PluginSeq *plugin;
+
+ /* pointers voor effecten: */
+ struct Sequence *seq1, *seq2, *seq3;
+
+ /* meta */
+ ListBase seqbase;
+
+} Sequence;
+
+
+#
+#
+typedef struct MetaStack {
+ struct MetaStack *next, *prev;
+ ListBase *oldbasep;
+ Sequence *parseq;
+} MetaStack;
+
+typedef struct Editing {
+ ListBase *seqbasep;
+ ListBase seqbase;
+ ListBase metastack;
+ short flag, rt;
+ int pad;
+} Editing;
+
+/* ***************** SEQUENCE ****************** */
+
+/* seq->flag */
+#define SEQ_LEFTSEL 2
+#define SEQ_RIGHTSEL 4
+#define SEQ_OVERLAP 8
+#define SEQ_FILTERY 16
+
+/* seq->type LET OP BITJE 3!!! */
+#define SEQ_IMAGE 0
+#define SEQ_META 1
+#define SEQ_SCENE 2
+#define SEQ_MOVIE 3
+
+#define SEQ_EFFECT 8
+#define SEQ_CROSS 8
+#define SEQ_ADD 9
+#define SEQ_SUB 10
+#define SEQ_ALPHAOVER 11
+#define SEQ_ALPHAUNDER 12
+#define SEQ_GAMCROSS 13
+#define SEQ_MUL 14
+#define SEQ_OVERDROP 15
+#define SEQ_PLUGIN 24
+
+#endif
diff --git a/source/blender/makesdna/DNA_sound_types.h b/source/blender/makesdna/DNA_sound_types.h
new file mode 100644
index 00000000000..814192cca5e
--- /dev/null
+++ b/source/blender/makesdna/DNA_sound_types.h
@@ -0,0 +1,190 @@
+/**
+ * blenlib/DNA_sound_types.h (mar-2001 nzc)
+ *
+ * $Id$
+ *
+ * ***** BEGIN GPL/BL DUAL 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. The Blender
+ * Foundation also sells licenses for use in proprietary software under
+ * the Blender License. See http://www.blender.org/BL/ for information
+ * about this.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_SOUND_TYPES_H
+#define DNA_SOUND_TYPES_H
+
+#include "DNA_listBase.h"
+#include "DNA_ID.h"
+
+/* stupid... could easily be solved */
+#include "DNA_view2d_types.h"
+
+/* extern int noaudio; * defined in sound.c . also not very nice */
+/* extern ListBase *samples; don't do this in DNA, but in BKE_... instead */
+
+struct bSample;
+struct Ipo;
+struct PackedFile;
+struct SpaceLink;
+
+/* should not be here! */
+#
+#
+typedef struct bSample {
+ ID id;
+ void *data;
+ void *snd_sample;
+ short type, bits;
+ short channels;
+ int len, rate;
+// int buffer;
+ int alindex;
+ char fakedata[16];
+ int flags;
+ char name[160];
+ struct PackedFile * packedfile;
+ short us;
+} bSample;
+
+
+
+typedef struct bSound {
+ ID id;
+ char name[160];
+ struct bSample *sample;
+ struct PackedFile *packedfile;
+ struct PackedFile *newpackedfile;
+ void *snd_sound;
+ struct Ipo *ipo;
+ float volume, panning;
+ /**
+ * Sets the rollofffactor. The rollofffactor is a per-Source parameter
+ * the application can use to increase or decrease the range of a source
+ * by decreasing or increasing the attenuation, respectively. The default
+ * value is 1. The implementation is free to optimize for a rollofffactor
+ * value of 0, which indicates that the application does not wish any
+ * distance attenuation on the respective Source.
+ */
+ float attenuation;
+ float pitch;
+ /**
+ * min_gain indicates the minimal gain which is always guaranteed for this sound
+ */
+ float min_gain;
+ /**
+ * max_gain indicates the maximal gain which is always guaranteed for this sound
+ */
+ float max_gain;
+ /**
+ * Sets the referencedistance at which the listener will experience gain.
+ */
+ float distance;
+ int flags;
+// unsigned int loopstart;
+// unsigned int loopend;
+ char channels;
+ char highprio;
+ char pad[6];
+
+} bSound;
+
+typedef struct bSoundListener {
+ ID id;
+ /**
+ * Overall gain
+ */
+ float gain;
+ /**
+ * Sets a scaling to exaggerate or deemphasize the Doppler (pitch) shift
+ * resulting from the calculation.
+ */
+ float dopplerfactor;
+ /**
+ * Sets the value of the propagation speed relative to which the source
+ * velocities are interpreted.
+ */
+ float dopplervelocity;
+ short numsoundsblender;
+ short numsoundsgameengine;
+
+} bSoundListener;
+
+typedef struct SpaceSound {
+ struct SpaceLink *next, *prev;
+ int spacetype, pad;
+ struct ScrArea *area;
+
+ View2D v2d;
+
+ bSound *sound;
+ short mode, sndnr;
+ short xof, yof;
+ short flag, lock;
+ int pad2;
+} SpaceSound;
+
+
+enum SAMPLE_FileTypes {
+ SAMPLE_INVALID = -1, // must be negative
+ SAMPLE_UNKNOWN = 0,
+ SAMPLE_RAW,
+ SAMPLE_WAV,
+ SAMPLE_MP2,
+ SAMPLE_MP3,
+ SAMPLE_OGG_VORBIS,
+ SAMPLE_WMA,
+ SAMPLE_ASF,
+ SAMPLE_AIFF
+};
+
+
+#define SOUND_CHANNELS_STEREO 0
+#define SOUND_CHANNELS_LEFT 1
+#define SOUND_CHANNELS_RIGHT 2
+
+enum SOUND_FLAGS_BITS {
+ SOUND_FLAGS_LOOP_BIT = 0,
+ SOUND_FLAGS_FIXED_VOLUME_BIT,
+ SOUND_FLAGS_FIXED_PANNING_BIT,
+ SOUND_FLAGS_3D_BIT,
+ SOUND_FLAGS_BIDIRECTIONAL_LOOP_BIT,
+ SOUND_FLAGS_PRIORITY_BIT
+};
+
+#define SOUND_FLAGS_LOOP (1 << SOUND_FLAGS_LOOP_BIT)
+#define SOUND_FLAGS_FIXED_VOLUME (1 << SOUND_FLAGS_FIXED_VOLUME_BIT)
+#define SOUND_FLAGS_FIXED_PANNING (1 << SOUND_FLAGS_FIXED_PANNING_BIT)
+#define SOUND_FLAGS_3D (1 << SOUND_FLAGS_3D_BIT)
+#define SOUND_FLAGS_BIDIRECTIONAL_LOOP (1 << SOUND_FLAGS_BIDIRECTIONAL_LOOP_BIT)
+#define SOUND_FLAGS_PRIORITY (1 << SOUND_FLAGS_PRIORITY_BIT)
+
+enum SAMPLE_FLAGS_BITS {
+ SAMPLE_NEEDS_SAVE_BIT = 0
+};
+
+#define SAMPLE_NEEDS_SAVE (1 << SAMPLE_NEEDS_SAVE_BIT)
+
+/* to DNA_sound_types.h*/
+
+#endif
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
new file mode 100644
index 00000000000..092dc6eb1d3
--- /dev/null
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -0,0 +1,471 @@
+/**
+ * blenlib/DNA_space_types.h (mar-2001 nzc)
+ *
+ * $Id$
+ *
+ * ***** BEGIN GPL/BL DUAL 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. The Blender
+ * Foundation also sells licenses for use in proprietary software under
+ * the Blender License. See http://www.blender.org/BL/ for information
+ * about this.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_SPACE_TYPES_H
+#define DNA_SPACE_TYPES_H
+
+#include "DNA_listBase.h"
+#include "DNA_vec_types.h"
+/* Hum ... Not really nice... but needed for spacebuts. */
+#include "DNA_view2d_types.h"
+
+struct Ipo;
+struct ID;
+struct Text;
+struct ImBuf;
+struct Image;
+struct SpaceIpo;
+struct BlendHandle;
+
+ /**
+ * The base structure all the other spaces
+ * are derived (implicitly) from. Would be
+ * good to make this explicit.
+ */
+typedef struct SpaceLink SpaceLink;
+struct SpaceLink {
+ SpaceLink *next, *prev;
+ int spacetype, pad;
+ struct ScrArea *area;
+};
+
+typedef struct SpaceInfo {
+ SpaceLink *next, *prev;
+ int spacetype, pad1;
+ struct ScrArea *area;
+} SpaceInfo;
+
+typedef struct SpaceIpo {
+ SpaceLink *next, *prev;
+ int spacetype, pad1;
+ struct ScrArea *area;
+
+ unsigned int rowbut, pad2;
+ View2D v2d;
+
+ void *editipo;
+ ListBase ipokey;
+ struct Ipo *ipo;
+ struct ID *from;
+
+ short totipo, pin;
+ short butofs, channel;
+ short showkey, blocktype;
+ short menunr, lock;
+ int flag;
+ int reserved1;
+ rctf tot;
+} SpaceIpo;
+
+typedef struct SpaceButs {
+ SpaceLink *next, *prev;
+ int spacetype, pad1;
+ struct ScrArea *area;
+
+ short cursens, curact;
+ int pad2;
+ View2D v2d;
+
+ short mainb, menunr; /* texnr en menunr moeten shorts blijven */
+ short pin, mainbo;
+ void *lockpoin;
+
+ short texnr;
+ char texfrom, showgroup;
+
+ short rectx, recty; /* preview render */
+ unsigned int *rect;
+ short cury, modeltype;
+
+ short scriptblock;
+ short scaflag;
+
+ char texact, pad3[7];
+
+ /* a hackish link the anim buts keep
+ * to a SpaceIpo.
+ */
+ struct SpaceIpo *anim_linked_sipo;
+} SpaceButs;
+
+typedef struct SpaceSeq {
+ SpaceLink *next, *prev;
+ int spacetype, pad;
+ struct ScrArea *area;
+
+ View2D v2d;
+
+ short mainb, zoom;
+ int pad2;
+
+} SpaceSeq;
+
+typedef struct SpaceFile {
+ SpaceLink *next, *prev;
+ int spacetype, pad;
+ struct ScrArea *area;
+
+ struct direntry *filelist;
+ int totfile;
+ char title[24];
+ char dir[160];
+ char file[80];
+ short type, ofs, flag, sort;
+ short maxnamelen, collums;
+
+ struct BlendHandle *libfiledata;
+
+ short retval, ipotype;
+ short menu, act;
+
+ /* changed type for compiling */
+ /* void (*returnfunc)(short); ? used with char* ....*/
+ /**
+ * @attention Called in filesel.c:
+ * @attention returnfunc(this->retval) : short
+ * @attention returnfunc(name) : char*
+ * @attention Other uses are limited to testing against
+ * @attention the value. How do we resolve this? Two args?
+ * @attention For now, keep the char*, as it seems stable.
+ * @attention Be warned that strange behaviour _has_ been spotted!
+ */
+ void (*returnfunc)(char*);
+
+ short *menup;
+} SpaceFile;
+
+typedef struct SpaceOops {
+ SpaceLink *next, *prev;
+ int spacetype, pad;
+ struct ScrArea *area;
+
+ View2D v2d;
+
+ ListBase oops;
+ short pin, visiflag, flag, rt;
+ void *lockpoin;
+
+} SpaceOops;
+
+typedef struct SpaceImage {
+ SpaceLink *next, *prev;
+ int spacetype, pad;
+ struct ScrArea *area;
+
+ View2D v2d;
+
+ struct Image *image;
+ float zoom;
+ float pad2; /* MAART: is this needed? Ton: yes, padding with 8 bytes aligned */
+ short mode, pin;
+ short imanr, curtile;
+ short xof, yof;
+ short flag, lock;
+
+} SpaceImage;
+
+typedef struct SpaceNla{
+ struct SpaceLink *next, *prev;
+ int spacetype;
+ int lock;
+ struct ScrArea *area;
+
+ View2D v2d;
+} SpaceNla;
+
+typedef struct SpaceText {
+ SpaceLink *next, *prev;
+ int spacetype, pad;
+ struct ScrArea *area;
+
+ struct Text *text;
+
+ int top, viewlines;
+ short flags, menunr;
+
+ int font_id;
+ int lheight;
+ int left, pad2;
+
+ float pix_per_line;
+
+ struct rcti txtscroll, txtbar;
+
+ void *py_draw;
+ void *py_event;
+ void *py_button;
+ void *py_globaldict;
+} SpaceText;
+
+#
+#
+typedef struct OneSelectableIma {
+ int header;
+ int ibuf_type;
+ struct ImBuf *pict;
+ struct OneSelectableIma *next;
+ struct OneSelectableIma *prev;
+
+ short cmap, image, draw_me, rt;
+ short sx, sy, ex, ey, dw, dh;
+ short selectable, selected;
+ int mtime, disksize;
+ char file_name[64];
+
+ short orgx, orgy, orgd, anim; /* same as ibuf->x...*/
+ char dummy[4]; /* 128 */
+
+ char pict_rect[3968]; /* 4096 (RECT = 64 * 62) */
+
+} OneSelectableIma;
+
+#
+#
+typedef struct ImaDir {
+ struct ImaDir *next, *prev;
+ int selected, hilite;
+ int type, size;
+ int mtime;
+ char name[100];
+} ImaDir;
+
+typedef struct SpaceImaSel {
+ SpaceLink *next, *prev;
+ int spacetype, pad1;
+ struct ScrArea *area;
+
+ char title[28];
+
+ int fase;
+ short mode, subfase;
+ short mouse_move_redraw, imafase;
+ short mx, my;
+
+ short dirsli, dirsli_lines;
+ short dirsli_sx, dirsli_ey , dirsli_ex, dirsli_h;
+ short imasli, fileselmenuitem;
+ short imasli_sx, imasli_ey , imasli_ex, imasli_h;
+
+ short dssx, dssy, dsex, dsey;
+ short desx, desy, deex, deey;
+ short fssx, fssy, fsex, fsey;
+ short dsdh, fsdh;
+ short fesx, fesy, feex, feey;
+ short infsx, infsy, infex, infey;
+ short dnsx, dnsy, dnw, dnh;
+ short fnsx, fnsy, fnw, fnh;
+
+
+ char fole[128], dor[128];
+ char file[128], dir[128];
+ ImaDir *firstdir, *firstfile;
+ int topdir, totaldirs, hilite;
+ int topfile, totalfiles;
+
+ float image_slider;
+ float slider_height;
+ float slider_space;
+ short topima, totalima;
+ short curimax, curimay;
+ OneSelectableIma *first_sel_ima;
+ OneSelectableIma *hilite_ima;
+ short total_selected, ima_redraw;
+ int pad2;
+
+ struct ImBuf *cmap;
+
+ /* Also fucked. Needs to change so things compile, but breaks sdna
+ * ... */
+/* void (*returnfunc)(void); */
+ void (*returnfunc)(char*);
+ void *arg1;
+} SpaceImaSel;
+
+
+/* **************** SPACE ********************* */
+
+
+/* view3d->flag */ /* Now in DNA_view3d_types.h */
+/*
+#define V3D_DISPIMAGE 1
+#define V3D_DISPBGPIC 2
+#define V3D_SETUPBUTS 4
+#define V3D_NEEDBACKBUFDRAW 8
+#define V3D_MODE (16+32+64+128)
+#define V3D_EDITMODE 16
+#define V3D_VERTEXPAINT 32
+#define V3D_FACESELECT 64
+#define V3D_POSEMODE 128
+*/
+
+/* view3d->around */ /* Now in DNA_view3d_types.h */
+/*
+#define V3D_CENTRE 0
+#define V3D_CENTROID 3
+#define V3D_CURSOR 1
+#define V3D_LOCAL 2
+*/
+
+/* buts->mainb */
+#define BUTS_VIEW 0
+#define BUTS_LAMP 1
+#define BUTS_MAT 2
+#define BUTS_TEX 3
+#define BUTS_ANIM 4
+#define BUTS_WORLD 5
+#define BUTS_RENDER 6
+#define BUTS_EDIT 7
+#define BUTS_GAME 8
+#define BUTS_FPAINT 9
+#define BUTS_RADIO 10
+#define BUTS_SCRIPT 11
+#define BUTS_SOUND 12
+#define BUTS_CONSTRAINT 13
+
+/* buts->scaflag */
+#define BUTS_SENS_SEL 1
+#define BUTS_SENS_ACT 2
+#define BUTS_SENS_LINK 4
+#define BUTS_CONT_SEL 8
+#define BUTS_CONT_ACT 16
+#define BUTS_CONT_LINK 32
+#define BUTS_ACT_SEL 64
+#define BUTS_ACT_ACT 128
+#define BUTS_ACT_LINK 256
+
+/* deze getallen ook invullen in blender.h SpaceFile: struct dna herkent geen defines */
+#define FILE_MAXDIR 160
+#define FILE_MAXFILE 80
+
+/* filesel types */
+#define FILE_UNIX 8
+#define FILE_BLENDER 8
+#define FILE_SPECIAL 9
+
+#define FILE_LOADLIB 1
+#define FILE_MAIN 2
+
+/* sfile->flag */
+#define FILE_SHOWSHORT 1
+#define FILE_STRINGCODE 2
+#define FILE_LINK 4
+#define FILE_HIDE_DOT 8
+
+/* sfile->sort */
+#define FILE_SORTALPHA 0
+#define FILE_SORTDATE 1
+#define FILE_SORTSIZE 2
+#define FILE_SORTEXTENS 3
+
+/* files in filesel list: 2=ACTIVE */
+#define HILITE 1
+#define BLENDERFILE 4
+#define PSXFILE 8
+#define IMAGEFILE 16
+#define MOVIEFILE 32
+
+#define SCROLLH 16 /* hoogte scrollbar */
+#define SCROLLB 16 /* breedte scrollbar */
+
+/* SpaceImage->mode */
+#define SI_TEXTURE 0
+#define SI_SHOW 1
+
+/* SpaceImage->flag */
+#define SI_BE_SQUARE 1
+#define SI_EDITTILE 2
+#define SI_CLIP_UV 4
+#define SI_DRAWTOOL 8
+
+/* SpaceText flags (moved from DNA_text_types.h) */
+
+#define ST_SCROLL_SELECT 0x0001 // scrollable
+#define ST_CLEAR_NAMESPACE 0x0010 // clear namespace after script
+ // execution (see BPY_main.c)
+
+/* SpaceOops->flag */
+#define SO_TESTBLOCKS 1
+#define SO_NEWSELECTED 2
+
+/* SpaceOops->visiflag */
+#define OOPS_SCE 1
+#define OOPS_OB 2
+#define OOPS_ME 4
+#define OOPS_CU 8
+#define OOPS_MB 16
+#define OOPS_LT 32
+#define OOPS_LA 64
+#define OOPS_MA 128
+#define OOPS_TE 256
+#define OOPS_IP 512
+#define OOPS_LAY 1024
+#define OOPS_LI 2048
+#define OOPS_IM 4096
+
+/* headerbuttons: 450-499 */
+
+#define B_IMASELHOME 451
+#define B_IMASELREMOVEBIP 452
+
+#define C_BACK 0xBAAAAA
+#define C_DARK 0x665656
+#define C_DERK 0x766666
+#define C_HI 0xCBBBBB
+#define C_LO 0x544444
+
+/* queue settings */
+#define IMS_KNOW_WIN 1
+#define IMS_KNOW_BIP 2
+#define IMS_KNOW_DIR 4
+#define IMS_DOTHE_INF 8
+#define IMS_KNOW_INF 16
+#define IMS_DOTHE_IMA 32
+#define IMS_KNOW_IMA 64
+#define IMS_FOUND_BIP 128
+#define IMS_DOTHE_BIP 256
+#define IMS_WRITE_NO_BIP 512
+
+/* imasel->mode */
+#define IMS_NOIMA 0
+#define IMS_IMA 1
+#define IMS_ANIM 2
+#define IMS_DIR 4
+#define IMS_FILE 8
+#define IMS_STRINGCODE 16
+
+#define IMS_INDIR 1
+#define IMS_INDIRSLI 2
+#define IMS_INFILE 3
+#define IMS_INFILESLI 4
+
+#endif
diff --git a/source/blender/makesdna/DNA_text_types.h b/source/blender/makesdna/DNA_text_types.h
new file mode 100644
index 00000000000..e5ac46b2e00
--- /dev/null
+++ b/source/blender/makesdna/DNA_text_types.h
@@ -0,0 +1,80 @@
+/**
+ * blenlib/DNA_text_types.h (mar-2001 nzc)
+ *
+ * $Id$
+ *
+ * ***** BEGIN GPL/BL DUAL 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. The Blender
+ * Foundation also sells licenses for use in proprietary software under
+ * the Blender License. See http://www.blender.org/BL/ for information
+ * about this.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_TEXT_TYPES_H
+#define DNA_TEXT_TYPES_H
+
+#include "DNA_listBase.h"
+#include "DNA_ID.h"
+
+typedef struct TextLine {
+ struct TextLine *next, *prev;
+
+ char *line;
+ int len, blen;
+} TextLine;
+
+typedef struct Text {
+ ID id;
+
+ char *name;
+
+ int flags, nlines;
+
+ ListBase lines;
+ TextLine *curl, *sell;
+ int curc, selc;
+
+ char *undo_buf;
+ int undo_pos, undo_len;
+
+ void *compiled;
+} Text;
+
+
+#define TXT_OFFSET 35
+#define TXT_TABSIZE 4
+#define TXT_INIT_UNDO 1024
+#define TXT_MAX_UNDO (TXT_INIT_UNDO*TXT_INIT_UNDO)
+
+/* text flags */
+#define TXT_ISDIRTY 0x0001
+#define TXT_ISTMP 0x0002
+#define TXT_ISMEM 0x0004
+#define TXT_ISEXT 0x0008
+#define TXT_ISSCRIPT 0x0010
+#define TXT_READONLY 0x0100
+#define TXT_FOLLOW 0x0200 // always follow cursor (console)
+
+
+#endif
diff --git a/source/blender/makesdna/DNA_texture_types.h b/source/blender/makesdna/DNA_texture_types.h
new file mode 100644
index 00000000000..53f2fd71fcf
--- /dev/null
+++ b/source/blender/makesdna/DNA_texture_types.h
@@ -0,0 +1,276 @@
+/**
+ * blenlib/DNA_texture_types.h (mar-2001 nzc)
+ *
+ * $Id$
+ *
+ * ***** BEGIN GPL/BL DUAL 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. The Blender
+ * Foundation also sells licenses for use in proprietary software under
+ * the Blender License. See http://www.blender.org/BL/ for information
+ * about this.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_TEXTURE_TYPES_H
+#define DNA_TEXTURE_TYPES_H
+
+#include "DNA_ID.h"
+
+struct Ipo;
+struct PluginTex;
+struct ColorBand;
+struct EnvMap;
+struct Object;
+struct Tex;
+struct Image;
+
+typedef struct MTex {
+
+ short texco, mapto, maptoneg, blendtype;
+ struct Object *object;
+ struct Tex *tex;
+
+ char projx, projy, projz, mapping;
+ float ofs[3], size[3];
+
+ short texflag, colormodel;
+ float r, g, b, k;
+ float def_var;
+
+ float colfac, norfac, varfac;
+
+} MTex;
+
+#ifndef DNA_USHORT_FIX
+#define DNA_USHORT_FIX
+/**
+ * @deprecated This typedef serves to avoid badly typed functions when
+ * @deprecated compiling while delivering a proper dna.c. Do not use
+ * @deprecated it in any case.
+ */
+typedef unsigned short dna_ushort_fix;
+#endif
+
+typedef struct PluginTex {
+ char name[160];
+ void *handle;
+
+ char *pname;
+ char *stnames;
+
+ int stypes;
+ int vars;
+ void *varstr;
+ float *result;
+ float *cfra;
+
+ float data[32];
+
+ int (*doit)(void);
+
+ /* should be void (*)(unsigned short)... patched */
+ void (*callback)(dna_ushort_fix);
+
+ int version, pad;
+} PluginTex;
+
+typedef struct CBData {
+ float r, g, b, a, pos;
+ int cur;
+} CBData;
+
+typedef struct ColorBand {
+ short flag, tot, cur, ipotype;
+ CBData data[16];
+
+} ColorBand;
+
+typedef struct EnvMap {
+ struct Object *object;
+ struct Image *ima; /* type ENV_LOAD */
+ struct Image *cube[6]; /* these images are dynamic, not part of the main struct */
+ float imat[4][4];
+ short type, stype;
+ float clipsta, clipend;
+ unsigned int notlay;
+ int cuberes;
+ short ok, lastframe;
+} EnvMap;
+
+typedef struct Tex {
+ ID id;
+
+ float noisesize, turbul;
+ float bright, contrast, rfac, gfac, bfac;
+ float filtersize;
+ short noisedepth, noisetype;
+
+ short imaflag, flag;
+ short type, stype;
+
+ float cropxmin, cropymin, cropxmax, cropymax;
+ short xrepeat, yrepeat;
+ short extend, len;
+ short frames, offset, sfra, fie_ima;
+ float norfac, *nor;
+
+ struct Ipo *ipo;
+ struct Image *ima;
+ struct PluginTex *plugin;
+ struct ColorBand *coba;
+ struct EnvMap *env;
+
+ short fradur[4][2];
+
+} Tex;
+
+/* **************** TEX ********************* */
+
+/* type */
+#define TEX_CLOUDS 1
+#define TEX_WOOD 2
+#define TEX_MARBLE 3
+#define TEX_MAGIC 4
+#define TEX_BLEND 5
+#define TEX_STUCCI 6
+#define TEX_NOISE 7
+#define TEX_IMAGE 8
+#define TEX_PLUGIN 9
+#define TEX_ENVMAP 10
+
+/* imaflag */
+#define TEX_INTERPOL 1
+#define TEX_USEALPHA 2
+#define TEX_MIPMAP 4
+#define TEX_FIELDS 8
+#define TEX_IMAROT 16
+#define TEX_CALCALPHA 32
+#define TEX_ANIMCYCLIC 64
+#define TEX_ANIM5 128
+#define TEX_ANTIALI 256
+#define TEX_ANTISCALE 512
+#define TEX_STD_FIELD 1024
+
+#define TEX_LASOPPATCH 8192
+#define TEX_MORKPATCH 16384
+
+/* flag */
+#define TEX_COLORBAND 1
+#define TEX_FLIPBLEND 2
+#define TEX_NEGALPHA 4
+
+/* extend (begint bij 1 ivm backward comp.) */
+#define TEX_EXTEND 1
+#define TEX_CLIP 2
+#define TEX_REPEAT 3
+#define TEX_CLIPCUBE 4
+
+/* noisetype */
+#define TEX_NOISESOFT 0
+#define TEX_NOISEPERL 1
+
+/* wrap */
+#define MTEX_FLAT 0
+#define MTEX_CUBE 1
+#define MTEX_TUBE 2
+#define MTEX_SPHERE 3
+
+/* return value */
+#define TEX_INT 0
+#define TEX_RGB 1
+#define TEX_NOR 2
+
+/* texco */
+#define TEXCO_ORCO 1
+#define TEXCO_REFL 2
+#define TEXCO_NORM 4
+#define TEXCO_GLOB 8
+#define TEXCO_UV 16
+#define TEXCO_OBJECT 32
+#define TEXCO_LAVECTOR 64
+#define TEXCO_VIEW 128
+#define TEXCO_STICKY 256
+#define TEXCO_OSA 512
+#define TEXCO_WINDOW 1024
+#define NEED_UV 2048
+
+/* mapto */
+#define MAP_COL 1
+#define MAP_NORM 2
+#define MAP_COLSPEC 4
+#define MAP_COLMIR 8
+#define MAP_VARS (0xFFF0)
+#define MAP_REF 16
+#define MAP_SPEC 32
+#define MAP_EMIT 64
+#define MAP_ALPHA 128
+#define MAP_HAR 256
+#define MAP_XTRA 512
+
+/* pr_type */
+#define MA_FLAT 0
+#define MA_SPHERE 1
+#define MA_CUBE 2
+
+/* pr_back */
+#define MA_DARK 1
+
+/* pr_lamp */
+
+/* **************** MTEX ********************* */
+
+/* proj */
+#define PROJ_N 0
+#define PROJ_X 1
+#define PROJ_Y 2
+#define PROJ_Z 3
+
+/* texflag */
+#define MTEX_RGBTOINT 1
+#define MTEX_STENCIL 2
+#define MTEX_NEGATIVE 4
+#define MTEX_ALPHAMIX 8
+
+/* blendtype */
+#define MTEX_BLEND 0
+#define MTEX_MUL 1
+#define MTEX_ADD 2
+#define MTEX_SUB 3
+
+/* **************** EnvMap ********************* */
+
+/* type */
+#define ENV_CUBE 0
+#define ENV_PLANE 1
+#define ENV_SPHERE 2
+
+/* stype */
+#define ENV_STATIC 0
+#define ENV_ANIM 1
+#define ENV_LOAD 2
+
+/* ok */
+#define ENV_NORMAL 1
+#define ENV_OSA 2
+
+#endif
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
new file mode 100644
index 00000000000..a55fa5a1d8d
--- /dev/null
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -0,0 +1,105 @@
+/**
+ * blenkernel/DNA_userdef_types.h (mar-2001 nzc)
+ *
+ * $Id$
+ *
+ * ***** BEGIN GPL/BL DUAL 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. The Blender
+ * Foundation also sells licenses for use in proprietary software under
+ * the Blender License. See http://www.blender.org/BL/ for information
+ * about this.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+*/
+
+#ifndef DNA_USERDEF_TYPES_H
+#define DNA_USERDEF_TYPES_H
+
+typedef struct UserDef {
+ short flag, dupflag;
+ int savetime;
+ char tempdir[64];
+ char fontdir[64];
+ char renderdir[64];
+ char textudir[64];
+ char plugtexdir[64];
+ char plugseqdir[64];
+ char pythondir[64];
+ char sounddir[64];
+ short versions, vrmlflag; // tmp for export, will be replaced by strubi
+ int gameflags;
+ int dummy_1;
+} UserDef;
+
+extern UserDef U; /* from usiblender.c !!!! */
+
+/* ***************** USERDEF ****************** */
+
+/* flag */
+#define AUTOSAVE 1
+#define AUTOGRABGRID 2
+#define AUTOROTGRID 4
+#define AUTOSIZEGRID 8
+#define SCENEGLOBAL 16
+#define TRACKBALL 32
+#define DUPLILINK 64
+#define FSCOLLUM 128
+#define MAT_ON_OB 256
+#define NO_CAPSLOCK 512
+#define VIEWMOVE 1024
+#define TOOLTIPS 2048
+#define TWOBUTTONMOUSE 4096
+#define NONUMPAD 8192
+
+/* dupflag */
+#define DUPMESH 1
+#define DUPCURVE 2
+#define DUPSURF 4
+#define DUPFONT 8
+#define DUPMBALL 16
+#define DUPLAMP 32
+#define DUPIPO 64
+#define DUPMAT 128
+#define DUPTEX 256
+#define DUPARM 512
+#define DUPACT 1024
+
+/* gameflags */
+#define USERDEF_VERTEX_ARRAYS_BIT 0
+#define USERDEF_DISABLE_SOUND_BIT 1
+#define USERDEF_DISABLE_MIPMAP_BIT 2
+
+
+#define USERDEF_VERTEX_ARRAYS (1 << USERDEF_VERTEX_ARRAYS_BIT)
+#define USERDEF_DISABLE_SOUND (1 << USERDEF_DISABLE_SOUND_BIT)
+#define USERDEF_DISABLE_MIPMAP (1 << USERDEF_DISABLE_MIPMAP_BIT)
+
+
+/* vrml flag */
+
+#define USERDEF_VRML_LAYERS 1
+#define USERDEF_VRML_AUTOSCALE 2
+#define USERDEF_VRML_TWOSIDED 4
+
+
+#endif
diff --git a/source/blender/makesdna/DNA_vec_types.h b/source/blender/makesdna/DNA_vec_types.h
new file mode 100644
index 00000000000..3df1691944b
--- /dev/null
+++ b/source/blender/makesdna/DNA_vec_types.h
@@ -0,0 +1,91 @@
+/**
+ * vec_types.h dec 2000 Nzc
+ *
+ * $Id$
+ *
+ * ***** BEGIN GPL/BL DUAL 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. The Blender
+ * Foundation also sells licenses for use in proprietary software under
+ * the Blender License. See http://www.blender.org/BL/ for information
+ * about this.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ *
+ */
+
+#ifndef DNA_VEC_TYPES_H
+#define DNA_VEC_TYPES_H
+
+/* types */
+
+typedef struct vec2s {
+ short x, y;
+} vec2s;
+
+typedef struct vec2i {
+ int x, y;
+} vec2i;
+
+typedef struct vec2f {
+ float x, y;
+} vec2f;
+
+typedef struct vec2d {
+ double x, y;
+} vec2d;
+
+typedef struct vec3i {
+ int x, y, z;
+} vec3i;
+
+typedef struct vec3f {
+ float x, y, z;
+} vec3f;
+
+typedef struct vec3d {
+ double x, y, z;
+} vec3d;
+
+typedef struct vec4i {
+ int x, y, z, w;
+} vec4i;
+
+typedef struct vec4f {
+ float x, y, z, w;
+} vec4f;
+
+typedef struct vec4d {
+ double x, y, z, w;
+} vec4d;
+
+typedef struct rcti {
+ int xmin, xmax;
+ int ymin, ymax;
+} rcti;
+
+typedef struct rctf {
+ float xmin, xmax;
+ float ymin, ymax;
+} rctf;
+
+#endif
diff --git a/source/blender/makesdna/DNA_vfont_types.h b/source/blender/makesdna/DNA_vfont_types.h
new file mode 100644
index 00000000000..bd50a7bd8c8
--- /dev/null
+++ b/source/blender/makesdna/DNA_vfont_types.h
@@ -0,0 +1,59 @@
+/**
+ * blenlib/DNA_vfont_types.h (mar-2001 nzc)
+ *
+ * $Id$
+ *
+ * ***** BEGIN GPL/BL DUAL 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. The Blender
+ * Foundation also sells licenses for use in proprietary software under
+ * the Blender License. See http://www.blender.org/BL/ for information
+ * about this.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_VFONT_TYPES_H
+#define DNA_VFONT_TYPES_H
+
+#include "DNA_ID.h"
+
+struct PackedFile;
+struct VFontData;
+
+typedef struct VFont {
+ ID id;
+
+ char name[256];
+ float scale, pad;
+
+ struct VFontData *data;
+ struct PackedFile * packedfile;
+} VFont;
+
+/* *************** FONT ****************** */
+
+#define FO_CURS 1
+#define FO_CURSUP 2
+#define FO_CURSDOWN 3
+#define FO_DUPLI 4
+
+#endif
diff --git a/source/blender/makesdna/DNA_view2d_types.h b/source/blender/makesdna/DNA_view2d_types.h
new file mode 100644
index 00000000000..5d97584a0a7
--- /dev/null
+++ b/source/blender/makesdna/DNA_view2d_types.h
@@ -0,0 +1,52 @@
+/**
+ * blenlib/DNA_view2d_types.h (mar-2001 nzc)
+ *
+ * $Id$
+ *
+ * ***** BEGIN GPL/BL DUAL 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. The Blender
+ * Foundation also sells licenses for use in proprietary software under
+ * the Blender License. See http://www.blender.org/BL/ for information
+ * about this.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_VIEW2D_TYPES_H
+#define DNA_VIEW2D_TYPES_H
+
+#include "DNA_vec_types.h"
+
+typedef struct View2D {
+ rctf tot, cur;
+ rcti vert, hor, mask;
+ float min[2], max[2];
+ float minzoom, maxzoom;
+ short scroll, keeptot;
+ short keepaspect, keepzoom;
+} View2D;
+
+#define V2D_KEEPZOOM 0x0001
+#define V2D_LOCKZOOM_X 0x0100
+#define V2D_LOCKZOOM_Y 0x0200
+
+#endif
diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h
new file mode 100644
index 00000000000..3dbe3978b15
--- /dev/null
+++ b/source/blender/makesdna/DNA_view3d_types.h
@@ -0,0 +1,127 @@
+/**
+ * blenlib/DNA_view3d_types.h (mar-2001 nzc)
+ *
+ * $Id$
+ *
+ * ***** BEGIN GPL/BL DUAL 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. The Blender
+ * Foundation also sells licenses for use in proprietary software under
+ * the Blender License. See http://www.blender.org/BL/ for information
+ * about this.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_VIEW3D_TYPES_H
+#define DNA_VIEW3D_TYPES_H
+
+struct Object;
+struct Image;
+struct Tex;
+struct SpaceLink;
+
+/* This is needed to not let VC choke on near and far... old
+ * proprietary MS extensions... */
+#ifdef WIN32
+#undef near
+#undef far
+#define near clipsta
+#define far clipend
+#endif
+
+/* The near/far thing is a Win EXCEPTION. Thus, leave near/far in the
+ * code, and patch for windows. */
+
+typedef struct BGpic {
+ struct Image *ima;
+ struct Tex *tex;
+ float xof, yof, size, zoom, blend;
+ short xim, yim;
+ unsigned int *rect;
+} BGpic;
+
+typedef struct View3D {
+ struct SpaceLink *next, *prev;
+ int spacetype, pad;
+ struct ScrArea *area;
+
+ float viewmat[4][4];
+ float viewinv[4][4];
+ float persmat[4][4];
+ float persinv[4][4];
+ float viewquat[4], dist;
+
+ /**
+ * 0 - ortho
+ * 1 - do 3d perspective
+ * 2 - use the camera
+ */
+ short persp;
+ short view;
+
+ struct Object *camera;
+ struct BGpic *bgpic;
+ struct View3D *localvd;
+
+ /**
+ * The drawing mode for the 3d display. Set to OB_WIRE, OB_SOLID,
+ * OB_SHADED or OB_TEXTURED */
+ short drawtype;
+ short localview;
+ int lay, layact;
+ short scenelock, around, camzoom, flag;
+
+ float lens, grid, near, far;
+ float ofs[3], cursor[3];
+
+ short mx, my; /* moeten achter elkaar blijven staan ivm als pointer doorgeven */
+ short mxo, myo;
+
+ short gridlines, viewbut;
+ int pad2, pad3;
+} View3D;
+
+/* View3D->flag */
+#define V3D_MODE (16+32+64+128+256+512)
+#define V3D_DISPIMAGE 1
+#define V3D_DISPBGPIC 2
+#define V3D_SETUPBUTS 4
+#define V3D_NEEDBACKBUFDRAW 8
+#define V3D_EDITMODE 16
+#define V3D_VERTEXPAINT 32
+#define V3D_FACESELECT 64
+#define V3D_POSEMODE 128
+#define V3D_TEXTUREPAINT 256
+#define V3D_WEIGHTPAINT 512
+
+/* View3D->around */
+#define V3D_CENTRE 0
+#define V3D_CENTROID 3
+#define V3D_CURSOR 1
+#define V3D_LOCAL 2
+
+/* View3d->persp */
+#define V3D_PERSP_ORTHO 0
+#define V3D_PERSP_DO_3D_PERSP 1
+#define V3D_PERSP_USE_THE_CAMERA 2
+
+#endif
diff --git a/source/blender/makesdna/DNA_wave_types.h b/source/blender/makesdna/DNA_wave_types.h
new file mode 100644
index 00000000000..8da044627bd
--- /dev/null
+++ b/source/blender/makesdna/DNA_wave_types.h
@@ -0,0 +1,48 @@
+/**
+ * blenlib/DNA_wave_types.h (mar-2001 nzc)
+ *
+ * $Id$
+ *
+ * ***** BEGIN GPL/BL DUAL 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. The Blender
+ * Foundation also sells licenses for use in proprietary software under
+ * the Blender License. See http://www.blender.org/BL/ for information
+ * about this.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_WAVE_TYPES_H
+#define DNA_WAVE_TYPES_H
+
+#include "DNA_ID.h"
+
+struct Ipo;
+
+typedef struct Wave {
+ ID id;
+
+ struct Ipo *ipo;
+
+} Wave;
+
+#endif
diff --git a/source/blender/makesdna/DNA_world_types.h b/source/blender/makesdna/DNA_world_types.h
new file mode 100644
index 00000000000..576c480bf24
--- /dev/null
+++ b/source/blender/makesdna/DNA_world_types.h
@@ -0,0 +1,119 @@
+/**
+ * blenlib/DNA_world_types.h (mar-2001 nzc)
+ *
+ * $Id$
+ *
+ * ***** BEGIN GPL/BL DUAL 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. The Blender
+ * Foundation also sells licenses for use in proprietary software under
+ * the Blender License. See http://www.blender.org/BL/ for information
+ * about this.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ */
+#ifndef DNA_WORLD_TYPES_H
+#define DNA_WORLD_TYPES_H
+
+#include "DNA_ID.h"
+#include "DNA_scriptlink_types.h"
+
+struct Ipo;
+struct MTex;
+
+
+/**
+ * World defines general modelling data such as a background fill,
+ * gravity, colour model, stars, etc. It mixes game-data, rendering
+ * data and modelling data. */
+typedef struct World {
+ ID id;
+
+ short colormodel, totex;
+ short texact, mistype;
+
+ float horr, horg, horb, hork;
+ float zenr, zeng, zenb, zenk;
+ float ambr, ambg, ambb, ambk;
+
+ unsigned int fastcol;
+
+ float exposure;
+
+ /**
+ * Gravitation constant for the game world
+ */
+ float gravity;
+
+ /**
+ * Radius of the activity bubble, in Manhattan length. Objects
+ * outside the box are activity-culled. */
+ float activityBoxRadius;
+
+ short skytype;
+ /**
+ * Some world modes
+ * bit 0: Do mist
+ * bit 1: Do stars
+ * bit 2: (reserved) depth of field
+ * bit 3: (gameengine): Activity culling is enabled.
+ */
+ short mode;
+
+ float misi, miststa, mistdist, misthi;
+
+ float starr, starg, starb, stark;
+ float starsize, starmindist;
+ float stardist, starcolnoise;
+
+ short dofsta, dofend, dofmin, dofmax;
+
+ int pad1;
+ struct Ipo *ipo;
+ struct MTex *mtex[8];
+
+ ScriptLink scriptlink;
+} World;
+
+/* **************** WORLD ********************* */
+
+/* skytype */
+#define WO_SKYBLEND 1
+#define WO_SKYREAL 2
+#define WO_SKYPAPER 4
+/* tijdens render: */
+#define WO_SKYTEX 8
+#define WO_ZENUP 16
+
+/* mode */
+#define WO_MIST 1
+#define WO_STARS 2
+#define WO_DOF 4
+#define WO_ACTIVITY_CULLING 8
+
+/* mapto */
+#define WOMAP_BLEND 1
+#define WOMAP_HORIZ 2
+#define WOMAP_ZENUP 4
+#define WOMAP_ZENDOWN 8
+
+#endif
diff --git a/source/blender/makesdna/Makefile b/source/blender/makesdna/Makefile
new file mode 100644
index 00000000000..f8274102b8c
--- /dev/null
+++ b/source/blender/makesdna/Makefile
@@ -0,0 +1,42 @@
+#
+# $Id$
+#
+# ***** BEGIN GPL/BL DUAL 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. The Blender
+# Foundation also sells licenses for use in proprietary software under
+# the Blender License. See http://www.blender.org/BL/ for information
+# about this.
+#
+# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+# All rights reserved.
+#
+# The Original Code is: all of this file.
+#
+# Contributor(s): none yet.
+#
+# ***** END GPL/BL DUAL LICENSE BLOCK *****
+#
+#
+# This module does not build normal .o's, but a DNA.c file, to be
+# compiled with the rest of the sources. To speed things up a little,
+# the compilation is done here.
+#
+# Bounces make to subdirectories.
+
+SOURCEDIR = source/blender/makesdna
+DIRS = intern
+
+include nan_subdirs.mk
diff --git a/source/blender/makesdna/intern/Makefile b/source/blender/makesdna/intern/Makefile
new file mode 100644
index 00000000000..d6a762156ca
--- /dev/null
+++ b/source/blender/makesdna/intern/Makefile
@@ -0,0 +1,86 @@
+#
+# $Id$
+#
+# ***** BEGIN GPL/BL DUAL 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. The Blender
+# Foundation also sells licenses for use in proprietary software under
+# the Blender License. See http://www.blender.org/BL/ for information
+# about this.
+#
+# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+# All rights reserved.
+#
+# The Original Code is: all of this file.
+#
+# Contributor(s): none yet.
+#
+# ***** END GPL/BL DUAL LICENSE BLOCK *****
+#
+#
+
+DIR = $(OCGDIR)/blender/makesdna
+CSRCS = $(wildcard *.c)
+
+ALLTARGETS = $(OBJS) $(DIR)/$(DEBUG_DIR)makesdna $(DIR)/$(SHARED_DIR)$(DEBUG_DIR)DNA.o
+
+include nan_compile.mk
+
+ifneq ($(OS),irix)
+ CFLAGS += -funsigned-char
+endif
+
+CFLAGS += $(LEVEL_1_C_WARNINGS)
+
+CPPFLAGS += -I$(OPENGL_HEADERS)
+CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
+CPPFLAGS += -I../../blenlib
+CPPFLAGS += -I..
+
+ifeq ($(OS),windows)
+ # Windows needs these extra libs because of winstuff... It is not
+ # _really_ needed, but it is the easiest fix for now. If you have
+ # some spare time, try to trace down the exact dep. Then again, you
+ # could also spend that time making the sdna system more robust.
+ WINLIBS = kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib
+ WINLIBS += advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib
+ WINLIBS += winmm.lib opengl32.lib glu32.lib largeint.lib
+ WINLIBS += /link /nodefaultlib:libc
+endif
+
+clean::
+ @$(RM) $(DIR)/makesdna* $(DIR)/DNA.c
+ @$(RM) $(DIR)/debug/makesdna* $(DIR)/debug/DNA.c
+
+# TODO include right .mk for ldflags
+
+# A small note: we do not use the debug version of the alloc lib. That
+# is done quite intentionally. If there is a bug in that lib, it needs
+# to be fixed by the module maintainer.
+$(DIR)/$(DEBUG_DIR)makesdna: $(OBJS) $(OCGDIR)/blender/blenlib/$(DEBUG_DIR)libblenlib.a
+ $(CC) $(LDFLAGS) -o $@ $(OBJS) \
+ $(NAN_GUARDEDALLOC)/lib/libguardedalloc.a $(WINLIBS)
+
+$(DIR)/$(DEBUG_DIR)DNA.c: $(DIR)/$(DEBUG_DIR)makesdna
+ ifeq ($(OS),windows)
+ $(SRCHOME)/tools/cygwin/cl_wrapper.pl - $(DIR)/$(DEBUG_DIR)makesdna \
+ $(DIR)/$(DEBUG_DIR)DNA.c
+ else
+ $(DIR)/$(DEBUG_DIR)makesdna $(DIR)/$(DEBUG_DIR)DNA.c
+ endif
+
+$(DIR)/$(SHARED_DIR)$(DEBUG_DIR)DNA.o: $(DIR)/$(DEBUG_DIR)DNA.c
+ $(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@
+
diff --git a/source/blender/makesdna/intern/dna.c b/source/blender/makesdna/intern/dna.c
new file mode 100644
index 00000000000..e4de70fbc34
--- /dev/null
+++ b/source/blender/makesdna/intern/dna.c
@@ -0,0 +1,874 @@
+unsigned char DNAstr[]= {
+83,68,78,65,78,65,77,69,219,3,0,0,42,110,101,120,116,0,42,112,
+114,101,118,0,42,102,105,114,115,116,0,42,108,97,115,116,0,120,0,121,
+0,122,0,119,0,120,109,105,110,0,120,109,97,120,0,121,109,105,110,0,
+121,109,97,120,0,42,110,101,119,105,100,0,42,108,105,98,0,110,97,109,
+101,91,50,52,93,0,117,115,0,102,108,97,103,0,112,97,100,0,105,100,
+0,42,105,100,98,108,111,99,107,0,42,102,105,108,101,100,97,116,97,0,
+110,97,109,101,91,49,54,48,93,0,116,111,116,0,99,117,114,118,101,0,
+99,117,114,0,98,108,111,99,107,116,121,112,101,0,115,104,111,119,107,101,
+121,0,112,111,115,0,116,111,116,101,108,101,109,0,116,121,112,101,0,114,
+116,0,42,100,97,116,97,0,42,114,101,102,107,101,121,0,101,108,101,109,
+115,116,114,91,51,50,93,0,101,108,101,109,115,105,122,101,0,99,117,114,
+118,97,108,0,98,108,111,99,107,0,42,105,112,111,0,42,102,114,111,109,
+0,116,111,116,107,101,121,0,115,108,117,114,112,104,0,97,99,116,107,101,
+121,0,42,42,115,99,114,105,112,116,115,0,42,102,108,97,103,0,97,99,
+116,115,99,114,105,112,116,0,116,111,116,115,99,114,105,112,116,0,42,108,
+105,110,101,0,108,101,110,0,98,108,101,110,0,42,110,97,109,101,0,102,
+108,97,103,115,0,110,108,105,110,101,115,0,108,105,110,101,115,0,42,99,
+117,114,108,0,42,115,101,108,108,0,99,117,114,99,0,115,101,108,99,0,
+42,117,110,100,111,95,98,117,102,0,117,110,100,111,95,112,111,115,0,117,
+110,100,111,95,108,101,110,0,42,99,111,109,112,105,108,101,100,0,115,105,
+122,101,0,115,101,101,107,0,100,114,97,119,122,111,111,109,0,104,111,108,
+100,0,99,108,105,112,115,116,97,0,99,108,105,112,101,110,100,0,110,101,
+116,115,116,97,0,110,101,116,101,110,100,0,108,101,110,115,0,100,114,97,
+119,115,105,122,101,0,104,111,108,111,108,101,110,0,104,111,108,111,108,101,
+110,49,0,115,99,114,105,112,116,108,105,110,107,0,42,97,110,105,109,0,
+42,105,98,117,102,0,42,109,105,112,109,97,112,91,49,48,93,0,111,107,
+0,108,97,115,116,102,114,97,109,101,0,108,97,115,116,113,117,97,108,105,
+116,121,0,116,112,97,103,101,102,108,97,103,0,116,111,116,98,105,110,100,
+0,120,114,101,112,0,121,114,101,112,0,116,119,115,116,97,0,116,119,101,
+110,100,0,98,105,110,100,99,111,100,101,0,42,114,101,112,98,105,110,100,
+0,42,112,97,99,107,101,100,102,105,108,101,0,108,97,115,116,117,112,100,
+97,116,101,0,97,110,105,109,115,112,101,101,100,0,114,101,115,101,114,118,
+101,100,49,0,116,101,120,99,111,0,109,97,112,116,111,0,109,97,112,116,
+111,110,101,103,0,98,108,101,110,100,116,121,112,101,0,42,111,98,106,101,
+99,116,0,42,116,101,120,0,112,114,111,106,120,0,112,114,111,106,121,0,
+112,114,111,106,122,0,109,97,112,112,105,110,103,0,111,102,115,91,51,93,
+0,115,105,122,101,91,51,93,0,116,101,120,102,108,97,103,0,99,111,108,
+111,114,109,111,100,101,108,0,114,0,103,0,98,0,107,0,100,101,102,95,
+118,97,114,0,99,111,108,102,97,99,0,110,111,114,102,97,99,0,118,97,
+114,102,97,99,0,42,104,97,110,100,108,101,0,42,112,110,97,109,101,0,
+42,115,116,110,97,109,101,115,0,115,116,121,112,101,115,0,118,97,114,115,
+0,42,118,97,114,115,116,114,0,42,114,101,115,117,108,116,0,42,99,102,
+114,97,0,100,97,116,97,91,51,50,93,0,40,42,100,111,105,116,41,40,
+41,0,40,42,99,97,108,108,98,97,99,107,41,40,41,0,118,101,114,115,
+105,111,110,0,97,0,105,112,111,116,121,112,101,0,100,97,116,97,91,49,
+54,93,0,42,105,109,97,0,42,99,117,98,101,91,54,93,0,105,109,97,
+116,91,52,93,91,52,93,0,115,116,121,112,101,0,110,111,116,108,97,121,
+0,99,117,98,101,114,101,115,0,110,111,105,115,101,115,105,122,101,0,116,
+117,114,98,117,108,0,98,114,105,103,104,116,0,99,111,110,116,114,97,115,
+116,0,114,102,97,99,0,103,102,97,99,0,98,102,97,99,0,102,105,108,
+116,101,114,115,105,122,101,0,110,111,105,115,101,100,101,112,116,104,0,110,
+111,105,115,101,116,121,112,101,0,105,109,97,102,108,97,103,0,99,114,111,
+112,120,109,105,110,0,99,114,111,112,121,109,105,110,0,99,114,111,112,120,
+109,97,120,0,99,114,111,112,121,109,97,120,0,120,114,101,112,101,97,116,
+0,121,114,101,112,101,97,116,0,101,120,116,101,110,100,0,102,114,97,109,
+101,115,0,111,102,102,115,101,116,0,115,102,114,97,0,102,105,101,95,105,
+109,97,0,42,110,111,114,0,42,112,108,117,103,105,110,0,42,99,111,98,
+97,0,42,101,110,118,0,102,114,97,100,117,114,91,52,93,91,50,93,0,
+109,111,100,101,0,116,111,116,101,120,0,101,110,101,114,103,121,0,100,105,
+115,116,0,115,112,111,116,115,105,122,101,0,115,112,111,116,98,108,101,110,
+100,0,104,97,105,110,116,0,97,116,116,49,0,97,116,116,50,0,98,117,
+102,115,105,122,101,0,115,97,109,112,0,115,104,97,100,115,112,111,116,115,
+105,122,101,0,98,105,97,115,0,115,111,102,116,0,116,101,120,97,99,116,
+0,115,104,97,100,104,97,108,111,115,116,101,112,0,42,109,116,101,120,91,
+56,93,0,108,97,121,0,115,112,101,99,114,0,115,112,101,99,103,0,115,
+112,101,99,98,0,109,105,114,114,0,109,105,114,103,0,109,105,114,98,0,
+97,109,98,114,0,97,109,98,98,0,97,109,98,103,0,97,109,98,0,101,
+109,105,116,0,97,110,103,0,115,112,101,99,116,114,97,0,97,108,112,104,
+97,0,114,101,102,0,115,112,101,99,0,122,111,102,102,115,0,97,100,100,
+0,107,102,97,99,0,104,97,114,0,115,101,101,100,49,0,115,101,101,100,
+50,0,109,111,100,101,50,0,102,108,97,114,101,99,0,115,116,97,114,99,
+0,108,105,110,101,99,0,114,105,110,103,99,0,104,97,115,105,122,101,0,
+102,108,97,114,101,115,105,122,101,0,115,117,98,115,105,122,101,0,102,108,
+97,114,101,98,111,111,115,116,0,114,103,98,115,101,108,0,112,114,95,116,
+121,112,101,0,115,101,112,116,101,120,0,112,114,95,98,97,99,107,0,112,
+114,95,108,97,109,112,0,112,97,100,49,0,42,114,101,110,0,102,114,105,
+99,116,105,111,110,0,102,104,0,114,101,102,108,101,99,116,0,102,104,100,
+105,115,116,0,120,121,102,114,105,99,116,0,100,121,110,97,109,111,100,101,
+0,110,97,109,101,91,50,53,54,93,0,115,99,97,108,101,0,115,101,108,
+99,111,108,0,101,120,112,120,0,101,120,112,121,0,101,120,112,122,0,114,
+97,100,0,114,97,100,50,0,115,0,109,97,120,114,97,100,50,0,42,109,
+97,116,0,42,105,109,97,116,0,42,98,98,0,101,108,101,109,115,0,100,
+105,115,112,0,42,42,109,97,116,0,116,111,116,99,111,108,0,108,111,99,
+91,51,93,0,114,111,116,91,51,93,0,119,105,114,101,115,105,122,101,0,
+114,101,110,100,101,114,115,105,122,101,0,116,104,114,101,115,104,0,118,101,
+99,91,51,93,91,51,93,0,97,108,102,97,0,115,91,51,93,91,50,93,
+0,104,49,0,104,50,0,102,49,0,102,50,0,102,51,0,104,105,100,101,
+0,118,101,99,91,52,93,0,115,91,50,93,0,109,97,116,95,110,114,0,
+112,110,116,115,117,0,112,110,116,115,118,0,114,101,115,111,108,117,0,114,
+101,115,111,108,118,0,111,114,100,101,114,117,0,111,114,100,101,114,118,0,
+102,108,97,103,117,0,102,108,97,103,118,0,42,107,110,111,116,115,117,0,
+42,107,110,111,116,115,118,0,42,98,112,0,42,98,101,122,116,0,110,117,
+114,98,0,42,98,101,118,111,98,106,0,42,116,101,120,116,111,110,99,117,
+114,118,101,0,42,112,97,116,104,0,42,107,101,121,0,98,101,118,0,42,
+111,114,99,111,0,112,97,116,104,108,101,110,0,98,101,118,114,101,115,111,
+108,0,119,105,100,116,104,0,101,120,116,49,0,101,120,116,50,0,115,112,
+97,99,101,109,111,100,101,0,115,112,97,99,105,110,103,0,108,105,110,101,
+100,105,115,116,0,115,104,101,97,114,0,102,115,105,122,101,0,120,111,102,
+0,121,111,102,0,42,115,116,114,0,102,97,109,105,108,121,91,50,52,93,
+0,42,118,102,111,110,116,0,109,97,120,114,99,116,0,116,111,116,114,99,
+116,0,97,100,114,99,111,100,101,0,118,97,114,116,121,112,101,0,116,111,
+116,118,101,114,116,0,105,112,111,0,101,120,116,114,97,112,0,98,105,116,
+109,97,115,107,0,118,49,0,118,50,0,118,51,0,118,52,0,112,117,110,
+111,0,101,100,99,111,100,101,0,42,116,112,97,103,101,0,117,118,91,52,
+93,91,50,93,0,99,111,108,91,52,93,0,116,114,97,110,115,112,0,116,
+105,108,101,0,100,101,102,95,110,114,0,119,101,105,103,104,116,0,42,100,
+119,0,116,111,116,119,101,105,103,104,116,0,99,111,91,51,93,0,110,111,
+91,51,93,0,99,111,91,50,93,0,101,102,102,101,99,116,0,42,109,102,
+97,99,101,0,42,100,102,97,99,101,0,42,116,102,97,99,101,0,42,109,
+118,101,114,116,0,42,100,118,101,114,116,0,42,109,99,111,108,0,42,109,
+115,116,105,99,107,121,0,42,116,101,120,99,111,109,101,115,104,0,42,111,
+99,0,42,115,117,109,111,104,97,110,100,108,101,0,116,111,116,102,97,99,
+101,0,115,109,111,111,116,104,114,101,115,104,0,115,117,98,100,105,118,0,
+115,117,98,100,105,118,114,0,114,101,115,101,114,118,101,100,50,0,114,101,
+115,101,114,118,101,100,51,0,99,117,98,101,109,97,112,115,105,122,101,0,
+114,116,102,0,112,110,116,115,119,0,116,121,112,101,117,0,116,121,112,101,
+118,0,116,121,112,101,119,0,42,100,101,102,0,110,97,109,101,91,51,50,
+93,0,112,97,114,116,121,112,101,0,112,97,114,49,0,112,97,114,50,0,
+112,97,114,51,0,112,97,114,115,117,98,115,116,114,91,51,50,93,0,42,
+112,97,114,100,97,116,97,0,42,112,97,114,101,110,116,0,42,116,114,97,
+99,107,0,42,97,99,116,105,111,110,0,42,112,111,115,101,0,42,97,99,
+116,105,118,101,99,111,110,0,99,111,110,115,116,114,97,105,110,116,67,104,
+97,110,110,101,108,115,0,110,101,116,119,111,114,107,0,100,101,102,98,97,
+115,101,0,100,108,111,99,91,51,93,0,111,114,105,103,91,51,93,0,100,
+115,105,122,101,91,51,93,0,100,114,111,116,91,51,93,0,113,117,97,116,
+91,52,93,0,100,113,117,97,116,91,52,93,0,111,98,109,97,116,91,52,
+93,91,52,93,0,112,97,114,101,110,116,105,110,118,91,52,93,91,52,93,
+0,99,111,108,98,105,116,115,0,116,114,97,110,115,102,108,97,103,0,105,
+112,111,102,108,97,103,0,116,114,97,99,107,102,108,97,103,0,117,112,102,
+108,97,103,0,105,112,111,119,105,110,0,115,99,97,102,108,97,103,0,115,
+99,97,118,105,115,102,108,97,103,0,98,111,117,110,100,116,121,112,101,0,
+100,117,112,111,110,0,100,117,112,111,102,102,0,100,117,112,115,116,97,0,
+100,117,112,101,110,100,0,115,102,0,99,116,105,109,101,0,109,97,115,115,
+0,100,97,109,112,105,110,103,0,105,110,101,114,116,105,97,0,102,111,114,
+109,102,97,99,116,111,114,0,100,117,109,109,121,95,49,0,114,100,97,109,
+112,105,110,103,0,115,105,122,101,102,97,99,0,100,116,0,100,116,120,0,
+97,99,116,99,111,108,0,112,114,111,112,0,115,101,110,115,111,114,115,0,
+99,111,110,116,114,111,108,108,101,114,115,0,97,99,116,117,97,116,111,114,
+115,0,98,98,115,105,122,101,91,51,93,0,100,102,114,97,115,0,97,99,
+116,100,101,102,0,103,97,109,101,102,108,97,103,0,103,97,109,101,102,108,
+97,103,50,0,97,110,105,115,111,116,114,111,112,105,99,70,114,105,99,116,
+105,111,110,91,51,93,0,99,111,110,115,116,114,97,105,110,116,115,0,110,
+108,97,115,116,114,105,112,115,0,109,105,115,116,121,112,101,0,104,111,114,
+114,0,104,111,114,103,0,104,111,114,98,0,104,111,114,107,0,122,101,110,
+114,0,122,101,110,103,0,122,101,110,98,0,122,101,110,107,0,97,109,98,
+107,0,102,97,115,116,99,111,108,0,101,120,112,111,115,117,114,101,0,103,
+114,97,118,105,116,121,0,97,99,116,105,118,105,116,121,66,111,120,82,97,
+100,105,117,115,0,115,107,121,116,121,112,101,0,109,105,115,105,0,109,105,
+115,116,115,116,97,0,109,105,115,116,100,105,115,116,0,109,105,115,116,104,
+105,0,115,116,97,114,114,0,115,116,97,114,103,0,115,116,97,114,98,0,
+115,116,97,114,107,0,115,116,97,114,115,105,122,101,0,115,116,97,114,109,
+105,110,100,105,115,116,0,115,116,97,114,100,105,115,116,0,115,116,97,114,
+99,111,108,110,111,105,115,101,0,100,111,102,115,116,97,0,100,111,102,101,
+110,100,0,100,111,102,109,105,110,0,100,111,102,109,97,120,0,104,101,109,
+105,114,101,115,0,109,97,120,105,116,101,114,0,100,114,97,119,116,121,112,
+101,0,115,117,98,115,104,111,111,116,112,0,115,117,98,115,104,111,111,116,
+101,0,110,111,100,101,108,105,109,0,109,97,120,115,117,98,108,97,109,112,
+0,112,97,109,97,0,112,97,109,105,0,101,108,109,97,0,101,108,109,105,
+0,109,97,120,110,111,100,101,0,99,111,110,118,101,114,103,101,110,99,101,
+0,114,97,100,102,97,99,0,103,97,109,109,97,0,115,120,0,115,121,0,
+42,108,112,70,111,114,109,97,116,0,42,108,112,80,97,114,109,115,0,99,
+98,70,111,114,109,97,116,0,99,98,80,97,114,109,115,0,102,99,99,84,
+121,112,101,0,102,99,99,72,97,110,100,108,101,114,0,100,119,75,101,121,
+70,114,97,109,101,69,118,101,114,121,0,100,119,81,117,97,108,105,116,121,
+0,100,119,66,121,116,101,115,80,101,114,83,101,99,111,110,100,0,100,119,
+70,108,97,103,115,0,100,119,73,110,116,101,114,108,101,97,118,101,69,118,
+101,114,121,0,42,97,118,105,99,111,100,101,99,100,97,116,97,0,99,102,
+114,97,0,101,102,114,97,0,105,109,97,103,101,115,0,102,114,97,109,97,
+112,116,111,0,102,114,97,109,101,108,101,110,0,98,108,117,114,102,97,99,
+0,101,100,103,101,82,0,101,100,103,101,71,0,101,100,103,101,66,0,102,
+117,108,108,115,99,114,101,101,110,0,120,112,108,97,121,0,121,112,108,97,
+121,0,102,114,101,113,112,108,97,121,0,100,101,112,116,104,0,97,116,116,
+114,105,98,0,114,116,49,0,114,116,50,0,115,116,101,114,101,111,109,111,
+100,101,0,112,97,100,91,51,93,0,109,97,120,105,109,115,105,122,101,0,
+120,115,99,104,0,121,115,99,104,0,120,97,115,112,0,121,97,115,112,0,
+120,112,97,114,116,115,0,121,112,97,114,116,115,0,115,97,102,101,116,121,
+0,98,111,114,100,101,114,0,119,105,110,112,111,115,0,112,108,97,110,101,
+115,0,105,109,116,121,112,101,0,98,117,102,102,108,97,103,0,113,117,97,
+108,105,116,121,0,115,99,101,109,111,100,101,0,97,108,112,104,97,109,111,
+100,101,0,100,111,103,97,109,109,97,0,111,115,97,0,102,114,115,95,115,
+101,99,0,101,100,103,101,105,110,116,0,115,97,109,101,95,109,97,116,95,
+114,101,100,117,120,0,112,97,100,95,51,91,51,93,0,112,111,115,116,109,
+117,108,0,112,111,115,116,103,97,109,109,97,0,112,111,115,116,97,100,100,
+0,112,111,115,116,105,103,97,109,109,97,0,98,97,99,107,98,117,102,91,
+49,54,48,93,0,112,105,99,91,49,54,48,93,0,102,116,121,112,101,91,
+49,54,48,93,0,99,111,108,91,51,93,0,112,97,100,50,0,112,97,100,
+51,0,42,99,97,109,101,114,97,0,42,119,111,114,108,100,0,42,115,101,
+116,0,98,97,115,101,0,42,98,97,115,97,99,116,0,42,103,114,111,117,
+112,0,99,117,114,115,111,114,91,51,93,0,42,102,99,97,109,0,42,101,
+100,0,42,114,97,100,105,111,0,102,114,97,109,105,110,103,0,122,111,111,
+109,0,98,108,101,110,100,0,120,105,109,0,121,105,109,0,42,114,101,99,
+116,0,115,112,97,99,101,116,121,112,101,0,42,97,114,101,97,0,118,105,
+101,119,109,97,116,91,52,93,91,52,93,0,118,105,101,119,105,110,118,91,
+52,93,91,52,93,0,112,101,114,115,109,97,116,91,52,93,91,52,93,0,
+112,101,114,115,105,110,118,91,52,93,91,52,93,0,118,105,101,119,113,117,
+97,116,91,52,93,0,112,101,114,115,112,0,118,105,101,119,0,42,98,103,
+112,105,99,0,42,108,111,99,97,108,118,100,0,108,111,99,97,108,118,105,
+101,119,0,108,97,121,97,99,116,0,115,99,101,110,101,108,111,99,107,0,
+97,114,111,117,110,100,0,99,97,109,122,111,111,109,0,103,114,105,100,0,
+110,101,97,114,0,102,97,114,0,109,120,0,109,121,0,109,120,111,0,109,
+121,111,0,103,114,105,100,108,105,110,101,115,0,118,105,101,119,98,117,116,
+0,118,101,114,116,0,104,111,114,0,109,97,115,107,0,109,105,110,91,50,
+93,0,109,97,120,91,50,93,0,109,105,110,122,111,111,109,0,109,97,120,
+122,111,111,109,0,115,99,114,111,108,108,0,107,101,101,112,116,111,116,0,
+107,101,101,112,97,115,112,101,99,116,0,107,101,101,112,122,111,111,109,0,
+114,111,119,98,117,116,0,118,50,100,0,42,101,100,105,116,105,112,111,0,
+105,112,111,107,101,121,0,116,111,116,105,112,111,0,112,105,110,0,98,117,
+116,111,102,115,0,99,104,97,110,110,101,108,0,109,101,110,117,110,114,0,
+108,111,99,107,0,99,117,114,115,101,110,115,0,99,117,114,97,99,116,0,
+109,97,105,110,98,0,109,97,105,110,98,111,0,42,108,111,99,107,112,111,
+105,110,0,116,101,120,110,114,0,116,101,120,102,114,111,109,0,115,104,111,
+119,103,114,111,117,112,0,114,101,99,116,120,0,114,101,99,116,121,0,99,
+117,114,121,0,109,111,100,101,108,116,121,112,101,0,115,99,114,105,112,116,
+98,108,111,99,107,0,112,97,100,51,91,55,93,0,42,97,110,105,109,95,
+108,105,110,107,101,100,95,115,105,112,111,0,42,102,105,108,101,108,105,115,
+116,0,116,111,116,102,105,108,101,0,116,105,116,108,101,91,50,52,93,0,
+100,105,114,91,49,54,48,93,0,102,105,108,101,91,56,48,93,0,111,102,
+115,0,115,111,114,116,0,109,97,120,110,97,109,101,108,101,110,0,99,111,
+108,108,117,109,115,0,42,108,105,98,102,105,108,101,100,97,116,97,0,114,
+101,116,118,97,108,0,109,101,110,117,0,97,99,116,0,40,42,114,101,116,
+117,114,110,102,117,110,99,41,40,41,0,42,109,101,110,117,112,0,111,111,
+112,115,0,118,105,115,105,102,108,97,103,0,42,105,109,97,103,101,0,105,
+109,97,110,114,0,99,117,114,116,105,108,101,0,42,116,101,120,116,0,116,
+111,112,0,118,105,101,119,108,105,110,101,115,0,102,111,110,116,95,105,100,
+0,108,104,101,105,103,104,116,0,108,101,102,116,0,112,105,120,95,112,101,
+114,95,108,105,110,101,0,116,120,116,115,99,114,111,108,108,0,116,120,116,
+98,97,114,0,42,112,121,95,100,114,97,119,0,42,112,121,95,101,118,101,
+110,116,0,42,112,121,95,98,117,116,116,111,110,0,42,112,121,95,103,108,
+111,98,97,108,100,105,99,116,0,116,105,116,108,101,91,50,56,93,0,102,
+97,115,101,0,115,117,98,102,97,115,101,0,109,111,117,115,101,95,109,111,
+118,101,95,114,101,100,114,97,119,0,105,109,97,102,97,115,101,0,100,105,
+114,115,108,105,0,100,105,114,115,108,105,95,108,105,110,101,115,0,100,105,
+114,115,108,105,95,115,120,0,100,105,114,115,108,105,95,101,121,0,100,105,
+114,115,108,105,95,101,120,0,100,105,114,115,108,105,95,104,0,105,109,97,
+115,108,105,0,102,105,108,101,115,101,108,109,101,110,117,105,116,101,109,0,
+105,109,97,115,108,105,95,115,120,0,105,109,97,115,108,105,95,101,121,0,
+105,109,97,115,108,105,95,101,120,0,105,109,97,115,108,105,95,104,0,100,
+115,115,120,0,100,115,115,121,0,100,115,101,120,0,100,115,101,121,0,100,
+101,115,120,0,100,101,115,121,0,100,101,101,120,0,100,101,101,121,0,102,
+115,115,120,0,102,115,115,121,0,102,115,101,120,0,102,115,101,121,0,100,
+115,100,104,0,102,115,100,104,0,102,101,115,120,0,102,101,115,121,0,102,
+101,101,120,0,102,101,101,121,0,105,110,102,115,120,0,105,110,102,115,121,
+0,105,110,102,101,120,0,105,110,102,101,121,0,100,110,115,120,0,100,110,
+115,121,0,100,110,119,0,100,110,104,0,102,110,115,120,0,102,110,115,121,
+0,102,110,119,0,102,110,104,0,102,111,108,101,91,49,50,56,93,0,100,
+111,114,91,49,50,56,93,0,102,105,108,101,91,49,50,56,93,0,100,105,
+114,91,49,50,56,93,0,42,102,105,114,115,116,100,105,114,0,42,102,105,
+114,115,116,102,105,108,101,0,116,111,112,100,105,114,0,116,111,116,97,108,
+100,105,114,115,0,104,105,108,105,116,101,0,116,111,112,102,105,108,101,0,
+116,111,116,97,108,102,105,108,101,115,0,105,109,97,103,101,95,115,108,105,
+100,101,114,0,115,108,105,100,101,114,95,104,101,105,103,104,116,0,115,108,
+105,100,101,114,95,115,112,97,99,101,0,116,111,112,105,109,97,0,116,111,
+116,97,108,105,109,97,0,99,117,114,105,109,97,120,0,99,117,114,105,109,
+97,121,0,42,102,105,114,115,116,95,115,101,108,95,105,109,97,0,42,104,
+105,108,105,116,101,95,105,109,97,0,116,111,116,97,108,95,115,101,108,101,
+99,116,101,100,0,105,109,97,95,114,101,100,114,97,119,0,42,99,109,97,
+112,0,42,97,114,103,49,0,100,117,112,102,108,97,103,0,115,97,118,101,
+116,105,109,101,0,116,101,109,112,100,105,114,91,54,52,93,0,102,111,110,
+116,100,105,114,91,54,52,93,0,114,101,110,100,101,114,100,105,114,91,54,
+52,93,0,116,101,120,116,117,100,105,114,91,54,52,93,0,112,108,117,103,
+116,101,120,100,105,114,91,54,52,93,0,112,108,117,103,115,101,113,100,105,
+114,91,54,52,93,0,112,121,116,104,111,110,100,105,114,91,54,52,93,0,
+115,111,117,110,100,100,105,114,91,54,52,93,0,118,101,114,115,105,111,110,
+115,0,118,114,109,108,102,108,97,103,0,103,97,109,101,102,108,97,103,115,
+0,118,101,114,116,98,97,115,101,0,101,100,103,101,98,97,115,101,0,97,
+114,101,97,98,97,115,101,0,42,115,99,101,110,101,0,115,116,97,114,116,
+120,0,101,110,100,120,0,115,116,97,114,116,121,0,101,110,100,121,0,115,
+105,122,101,120,0,115,105,122,101,121,0,115,99,101,110,101,110,114,0,115,
+99,114,101,101,110,110,114,0,102,117,108,108,0,109,97,105,110,119,105,110,
+0,119,105,110,97,107,116,0,42,110,101,119,118,0,118,101,99,0,42,118,
+49,0,42,118,50,0,42,118,51,0,42,118,52,0,42,102,117,108,108,0,
+119,105,110,109,97,116,91,52,93,91,52,93,0,104,101,97,100,114,99,116,
+0,119,105,110,114,99,116,0,104,101,97,100,119,105,110,0,119,105,110,0,
+104,101,97,100,101,114,116,121,112,101,0,98,117,116,115,112,97,99,101,116,
+121,112,101,0,119,105,110,120,0,119,105,110,121,0,104,101,97,100,95,115,
+119,97,112,0,104,101,97,100,95,101,113,117,97,108,0,119,105,110,95,115,
+119,97,112,0,119,105,110,95,101,113,117,97,108,0,104,101,97,100,98,117,
+116,108,101,110,0,104,101,97,100,98,117,116,111,102,115,0,99,117,114,115,
+111,114,0,115,112,97,99,101,100,97,116,97,0,117,105,98,108,111,99,107,
+115,0,42,99,117,114,115,99,114,101,101,110,0,100,105,115,112,108,97,121,
+109,111,100,101,0,102,105,108,101,102,108,97,103,115,0,110,97,109,101,91,
+52,48,93,0,42,115,101,49,0,42,115,101,50,0,42,115,101,51,0,110,
+114,0,100,111,110,101,0,42,115,116,114,105,112,100,97,116,97,0,100,105,
+114,91,56,48,93,0,111,114,120,0,111,114,121,0,110,97,109,101,91,56,
+48,93,0,42,110,101,119,115,101,113,0,115,116,97,114,116,0,115,116,97,
+114,116,111,102,115,0,101,110,100,111,102,115,0,115,116,97,114,116,115,116,
+105,108,108,0,101,110,100,115,116,105,108,108,0,109,97,99,104,105,110,101,
+0,115,116,97,114,116,100,105,115,112,0,101,110,100,100,105,115,112,0,109,
+117,108,0,104,97,110,100,115,105,122,101,0,42,115,116,114,105,112,0,42,
+99,117,114,101,108,101,109,0,102,97,99,102,48,0,102,97,99,102,49,0,
+42,115,101,113,49,0,42,115,101,113,50,0,42,115,101,113,51,0,115,101,
+113,98,97,115,101,0,42,115,101,113,98,97,115,101,112,0,109,101,116,97,
+115,116,97,99,107,0,98,117,116,116,121,112,101,0,115,116,97,0,101,110,
+100,0,108,105,102,101,116,105,109,101,0,116,111,116,112,97,114,116,0,115,
+101,101,100,0,110,111,114,109,102,97,99,0,111,98,102,97,99,0,114,97,
+110,100,102,97,99,0,116,101,120,102,97,99,0,114,97,110,100,108,105,102,
+101,0,102,111,114,99,101,91,51,93,0,100,97,109,112,0,110,97,98,108,
+97,0,118,101,99,116,115,105,122,101,0,100,101,102,118,101,99,91,51,93,
+0,109,117,108,116,91,52,93,0,108,105,102,101,91,52,93,0,99,104,105,
+108,100,91,52,93,0,109,97,116,91,52,93,0,116,101,120,109,97,112,0,
+99,117,114,109,117,108,116,0,115,116,97,116,105,99,115,116,101,112,0,42,
+107,101,121,115,0,104,101,105,103,104,116,0,110,97,114,114,111,119,0,115,
+112,101,101,100,0,109,105,110,102,97,99,0,116,105,109,101,111,102,102,115,
+0,42,111,98,0,112,114,101,109,97,116,91,52,93,91,52,93,0,112,111,
+115,116,109,97,116,91,52,93,91,52,93,0,118,101,99,91,51,93,0,102,
+97,99,0,108,101,110,111,0,97,108,112,104,97,111,0,101,102,102,91,50,
+93,0,105,116,101,114,0,108,97,115,116,102,114,97,0,108,105,109,98,98,
+97,115,101,0,101,102,102,91,51,93,0,101,102,102,103,91,51,93,0,101,
+102,102,110,91,51,93,0,109,101,109,0,115,108,111,119,0,116,111,116,121,
+0,116,111,116,120,0,120,121,99,111,110,115,116,114,97,105,110,116,0,116,
+111,116,100,101,102,0,100,101,102,95,115,99,114,111,108,108,0,108,105,109,
+98,95,115,99,114,111,108,108,0,100,120,0,100,121,0,42,105,100,0,108,
+105,110,107,0,111,116,121,112,101,0,100,97,116,97,0,111,108,100,0,42,
+112,111,105,110,0,42,111,108,100,112,111,105,110,0,114,101,115,101,116,100,
+105,115,116,0,108,97,115,116,118,97,108,0,42,109,97,0,107,101,121,0,
+113,117,97,108,0,113,117,97,108,50,0,116,97,114,103,101,116,78,97,109,
+101,91,51,50,93,0,116,111,103,103,108,101,78,97,109,101,91,51,50,93,
+0,118,97,108,117,101,91,51,50,93,0,109,97,120,118,97,108,117,101,91,
+51,50,93,0,109,97,116,101,114,105,97,108,78,97,109,101,91,51,50,93,
+0,100,97,109,112,116,105,109,101,114,0,97,110,103,108,101,0,114,97,110,
+103,101,0,97,120,105,115,0,100,101,108,97,121,0,112,114,111,112,110,97,
+109,101,91,51,50,93,0,109,97,116,110,97,109,101,91,51,50,93,0,97,
+120,105,115,102,108,97,103,0,42,102,114,111,109,79,98,106,101,99,116,0,
+115,117,98,106,101,99,116,91,51,50,93,0,98,111,100,121,91,51,50,93,
+0,112,117,108,115,101,0,102,114,101,113,0,116,111,116,108,105,110,107,115,
+0,42,42,108,105,110,107,115,0,105,110,118,101,114,116,0,102,114,101,113,
+50,0,115,116,114,91,49,50,56,93,0,42,109,121,110,101,119,0,105,110,
+112,117,116,115,0,116,111,116,115,108,105,110,107,115,0,42,42,115,108,105,
+110,107,115,0,118,97,108,0,118,97,108,111,0,112,97,100,53,0,116,105,
+109,101,0,42,97,99,116,0,98,108,101,110,100,105,110,0,112,114,105,111,
+114,105,116,121,0,115,116,114,105,100,101,108,101,110,103,116,104,0,115,116,
+114,105,100,101,97,120,105,115,0,115,110,100,110,114,0,42,115,111,117,110,
+100,0,109,97,107,101,99,111,112,121,0,99,111,112,121,109,97,100,101,0,
+112,97,100,91,49,93,0,116,114,97,99,107,0,118,111,108,117,109,101,0,
+42,109,101,0,108,105,110,86,101,108,111,99,105,116,121,91,51,93,0,108,
+111,99,97,108,102,108,97,103,0,102,111,114,99,101,108,111,99,91,51,93,
+0,102,111,114,99,101,114,111,116,91,51,93,0,108,105,110,101,97,114,118,
+101,108,111,99,105,116,121,91,51,93,0,97,110,103,117,108,97,114,118,101,
+108,111,99,105,116,121,91,51,93,0,97,100,100,101,100,108,105,110,101,97,
+114,118,101,108,111,99,105,116,121,91,51,93,0,97,110,111,116,104,101,114,
+112,97,100,91,52,93,0,98,117,116,115,116,97,0,98,117,116,101,110,100,
+0,109,105,110,0,109,97,120,0,118,105,115,105,102,97,99,0,109,105,110,
+108,111,99,91,51,93,0,109,97,120,108,111,99,91,51,93,0,109,105,110,
+114,111,116,91,51,93,0,109,97,120,114,111,116,91,51,93,0,100,105,115,
+116,114,105,98,117,116,105,111,110,0,105,110,116,95,97,114,103,95,49,0,
+105,110,116,95,97,114,103,95,50,0,102,108,111,97,116,95,97,114,103,95,
+49,0,102,108,111,97,116,95,97,114,103,95,50,0,116,111,80,114,111,112,
+78,97,109,101,91,51,50,93,0,42,116,111,79,98,106,101,99,116,0,98,
+111,100,121,84,121,112,101,0,102,105,108,101,110,97,109,101,91,54,52,93,
+0,108,111,97,100,97,110,105,110,97,109,101,91,54,52,93,0,103,111,0,
+97,99,99,101,108,108,101,114,97,116,105,111,110,0,109,97,120,115,112,101,
+101,100,0,109,97,120,114,111,116,115,112,101,101,100,0,109,97,120,116,105,
+108,116,115,112,101,101,100,0,114,111,116,100,97,109,112,0,116,105,108,116,
+100,97,109,112,0,115,112,101,101,100,100,97,109,112,0,42,115,97,109,112,
+108,101,0,42,110,101,119,112,97,99,107,101,100,102,105,108,101,0,42,115,
+110,100,95,115,111,117,110,100,0,112,97,110,110,105,110,103,0,97,116,116,
+101,110,117,97,116,105,111,110,0,112,105,116,99,104,0,109,105,110,95,103,
+97,105,110,0,109,97,120,95,103,97,105,110,0,100,105,115,116,97,110,99,
+101,0,108,111,111,112,115,116,97,114,116,0,108,111,111,112,101,110,100,0,
+99,104,97,110,110,101,108,115,0,104,105,103,104,112,114,105,111,0,112,97,
+100,91,54,93,0,103,97,105,110,0,100,111,112,112,108,101,114,102,97,99,
+116,111,114,0,100,111,112,112,108,101,114,118,101,108,111,99,105,116,121,0,
+110,117,109,115,111,117,110,100,115,98,108,101,110,100,101,114,0,110,117,109,
+115,111,117,110,100,115,103,97,109,101,101,110,103,105,110,101,0,42,103,107,
+101,121,0,112,97,100,102,0,111,107,101,121,0,103,111,98,106,101,99,116,
+0,103,107,101,121,0,42,97,99,116,105,118,101,0,99,104,105,108,100,98,
+97,115,101,0,114,111,108,108,0,104,101,97,100,91,51,93,0,116,97,105,
+108,91,51,93,0,112,97,114,109,97,116,91,52,93,91,52,93,0,100,101,
+102,109,97,116,91,52,93,91,52,93,0,105,114,101,115,116,109,97,116,91,
+52,93,91,52,93,0,112,111,115,101,109,97,116,91,52,93,91,52,93,0,
+98,111,110,101,98,97,115,101,0,99,104,97,105,110,98,97,115,101,0,114,
+101,115,49,0,114,101,115,50,0,114,101,115,51,0,99,104,97,110,98,97,
+115,101,0,42,97,99,104,97,110,0,42,112,99,104,97,110,0,97,99,116,
+110,114,0,110,97,109,101,91,51,48,93,0,101,110,102,111,114,99,101,0,
+111,102,102,115,101,116,91,51,93,0,111,114,105,101,110,116,91,51,93,0,
+114,111,108,108,91,51,93,0,42,116,97,114,0,116,111,108,101,114,97,110,
+99,101,0,105,116,101,114,97,116,105,111,110,115,0,115,117,98,116,97,114,
+103,101,116,91,51,50,93,0,99,97,99,104,101,101,102,102,91,51,93,0,
+99,97,99,104,101,109,97,116,91,52,93,91,52,93,0,122,109,105,110,0,
+122,109,97,120,0,97,99,116,115,116,97,114,116,0,97,99,116,101,110,100,
+0,115,116,114,105,100,101,108,101,110,0,114,101,112,101,97,116,0,98,108,
+101,110,100,111,117,116,0,0,84,89,80,69,174,0,0,0,99,104,97,114,
+0,117,99,104,97,114,0,115,104,111,114,116,0,117,115,104,111,114,116,0,
+105,110,116,0,108,111,110,103,0,117,108,111,110,103,0,102,108,111,97,116,
+0,100,111,117,98,108,101,0,118,111,105,100,0,76,105,110,107,0,76,105,
+115,116,66,97,115,101,0,118,101,99,50,115,0,118,101,99,50,105,0,118,
+101,99,50,102,0,118,101,99,50,100,0,118,101,99,51,105,0,118,101,99,
+51,102,0,118,101,99,51,100,0,118,101,99,52,105,0,118,101,99,52,102,
+0,118,101,99,52,100,0,114,99,116,105,0,114,99,116,102,0,73,68,0,
+76,105,98,114,97,114,121,0,70,105,108,101,68,97,116,97,0,73,112,111,
+0,75,101,121,66,108,111,99,107,0,75,101,121,0,83,99,114,105,112,116,
+76,105,110,107,0,84,101,120,116,76,105,110,101,0,84,101,120,116,0,80,
+97,99,107,101,100,70,105,108,101,0,67,97,109,101,114,97,0,73,109,97,
+103,101,0,97,110,105,109,0,73,109,66,117,102,0,77,84,101,120,0,79,
+98,106,101,99,116,0,84,101,120,0,80,108,117,103,105,110,84,101,120,0,
+67,66,68,97,116,97,0,67,111,108,111,114,66,97,110,100,0,69,110,118,
+77,97,112,0,76,97,109,112,0,87,97,118,101,0,77,97,116,101,114,105,
+97,108,0,86,70,111,110,116,0,86,70,111,110,116,68,97,116,97,0,77,
+101,116,97,69,108,101,109,0,77,101,116,97,66,97,108,108,0,66,111,117,
+110,100,66,111,120,0,66,101,122,84,114,105,112,108,101,0,66,80,111,105,
+110,116,0,78,117,114,98,0,67,117,114,118,101,0,80,97,116,104,0,73,
+112,111,67,117,114,118,101,0,77,70,97,99,101,0,77,70,97,99,101,73,
+110,116,0,84,70,97,99,101,0,77,68,101,102,111,114,109,87,101,105,103,
+104,116,0,66,111,110,101,0,77,68,101,102,111,114,109,86,101,114,116,0,
+77,86,101,114,116,0,77,67,111,108,0,77,83,116,105,99,107,121,0,77,
+101,115,104,0,79,99,73,110,102,111,0,76,97,116,116,105,99,101,0,98,
+68,101,102,111,114,109,71,114,111,117,112,0,98,65,99,116,105,111,110,0,
+98,80,111,115,101,0,98,67,111,110,115,116,114,97,105,110,116,67,104,97,
+110,110,101,108,0,87,111,114,108,100,0,82,97,100,105,111,0,66,97,115,
+101,0,65,118,105,67,111,100,101,99,68,97,116,97,0,82,101,110,100,101,
+114,68,97,116,97,0,71,97,109,101,70,114,97,109,105,110,103,0,83,99,
+101,110,101,0,71,114,111,117,112,0,70,114,101,101,67,97,109,101,114,97,
+0,66,71,112,105,99,0,86,105,101,119,51,68,0,83,112,97,99,101,76,
+105,110,107,0,83,99,114,65,114,101,97,0,86,105,101,119,50,68,0,83,
+112,97,99,101,73,110,102,111,0,83,112,97,99,101,73,112,111,0,83,112,
+97,99,101,66,117,116,115,0,83,112,97,99,101,83,101,113,0,83,112,97,
+99,101,70,105,108,101,0,100,105,114,101,110,116,114,121,0,66,108,101,110,
+100,72,97,110,100,108,101,0,83,112,97,99,101,79,111,112,115,0,83,112,
+97,99,101,73,109,97,103,101,0,83,112,97,99,101,78,108,97,0,83,112,
+97,99,101,84,101,120,116,0,83,112,97,99,101,73,109,97,83,101,108,0,
+73,109,97,68,105,114,0,79,110,101,83,101,108,101,99,116,97,98,108,101,
+73,109,97,0,85,115,101,114,68,101,102,0,98,83,99,114,101,101,110,0,
+83,99,114,86,101,114,116,0,83,99,114,69,100,103,101,0,70,105,108,101,
+71,108,111,98,97,108,0,83,116,114,105,112,69,108,101,109,0,83,116,114,
+105,112,0,80,108,117,103,105,110,83,101,113,0,83,101,113,117,101,110,99,
+101,0,69,100,105,116,105,110,103,0,69,102,102,101,99,116,0,66,117,105,
+108,100,69,102,102,0,80,97,114,116,69,102,102,0,80,97,114,116,105,99,
+108,101,0,87,97,118,101,69,102,102,0,68,101,102,111,114,109,0,76,105,
+109,98,0,73,107,97,0,79,111,112,115,0,98,80,114,111,112,101,114,116,
+121,0,98,78,101,97,114,83,101,110,115,111,114,0,98,77,111,117,115,101,
+83,101,110,115,111,114,0,98,84,111,117,99,104,83,101,110,115,111,114,0,
+98,75,101,121,98,111,97,114,100,83,101,110,115,111,114,0,98,80,114,111,
+112,101,114,116,121,83,101,110,115,111,114,0,98,67,111,108,108,105,115,105,
+111,110,83,101,110,115,111,114,0,98,82,97,100,97,114,83,101,110,115,111,
+114,0,98,82,97,110,100,111,109,83,101,110,115,111,114,0,98,82,97,121,
+83,101,110,115,111,114,0,98,77,101,115,115,97,103,101,83,101,110,115,111,
+114,0,98,83,101,110,115,111,114,0,98,67,111,110,116,114,111,108,108,101,
+114,0,98,69,120,112,114,101,115,115,105,111,110,67,111,110,116,0,98,80,
+121,116,104,111,110,67,111,110,116,0,98,65,99,116,117,97,116,111,114,0,
+98,65,100,100,79,98,106,101,99,116,65,99,116,117,97,116,111,114,0,98,
+65,99,116,105,111,110,65,99,116,117,97,116,111,114,0,98,83,111,117,110,
+100,65,99,116,117,97,116,111,114,0,98,83,111,117,110,100,0,98,67,68,
+65,99,116,117,97,116,111,114,0,98,69,100,105,116,79,98,106,101,99,116,
+65,99,116,117,97,116,111,114,0,98,83,99,101,110,101,65,99,116,117,97,
+116,111,114,0,98,80,114,111,112,101,114,116,121,65,99,116,117,97,116,111,
+114,0,98,79,98,106,101,99,116,65,99,116,117,97,116,111,114,0,98,73,
+112,111,65,99,116,117,97,116,111,114,0,98,67,97,109,101,114,97,65,99,
+116,117,97,116,111,114,0,98,67,111,110,115,116,114,97,105,110,116,65,99,
+116,117,97,116,111,114,0,98,71,114,111,117,112,65,99,116,117,97,116,111,
+114,0,98,82,97,110,100,111,109,65,99,116,117,97,116,111,114,0,98,77,
+101,115,115,97,103,101,65,99,116,117,97,116,111,114,0,98,71,97,109,101,
+65,99,116,117,97,116,111,114,0,98,86,105,115,105,98,105,108,105,116,121,
+65,99,116,117,97,116,111,114,0,98,83,97,109,112,108,101,0,98,83,111,
+117,110,100,76,105,115,116,101,110,101,114,0,83,112,97,99,101,83,111,117,
+110,100,0,71,114,111,117,112,75,101,121,0,79,98,106,101,99,116,75,101,
+121,0,71,114,111,117,112,79,98,106,101,99,116,0,98,65,114,109,97,116,
+117,114,101,0,98,80,111,115,101,67,104,97,110,110,101,108,0,98,65,99,
+116,105,111,110,67,104,97,110,110,101,108,0,83,112,97,99,101,65,99,116,
+105,111,110,0,98,67,111,110,115,116,114,97,105,110,116,0,98,75,105,110,
+101,109,97,116,105,99,67,111,110,115,116,114,97,105,110,116,0,98,84,114,
+97,99,107,84,111,67,111,110,115,116,114,97,105,110,116,0,98,82,111,116,
+97,116,101,76,105,107,101,67,111,110,115,116,114,97,105,110,116,0,98,76,
+111,99,97,116,101,76,105,107,101,67,111,110,115,116,114,97,105,110,116,0,
+98,65,99,116,105,111,110,67,111,110,115,116,114,97,105,110,116,0,98,70,
+111,108,108,111,119,80,97,116,104,67,111,110,115,116,114,97,105,110,116,0,
+98,82,111,116,97,116,105,111,110,67,111,110,115,116,114,97,105,110,116,0,
+98,65,99,116,105,111,110,83,116,114,105,112,0,0,0,0,84,76,69,78,
+1,0,1,0,2,0,2,0,4,0,4,0,4,0,4,0,8,0,0,0,
+8,0,8,0,4,0,8,0,8,0,16,0,12,0,12,0,24,0,16,0,
+16,0,32,0,16,0,16,0,48,0,224,0,0,0,80,0,28,0,116,0,
+16,0,20,0,100,0,20,0,108,0,40,1,0,0,0,0,80,0,168,2,
+168,0,80,1,24,0,136,1,120,0,180,0,52,0,16,1,64,1,0,0,
+72,0,132,0,0,0,60,0,28,0,48,0,232,0,0,0,80,0,12,0,
+20,0,60,0,12,0,236,1,12,0,20,0,4,0,8,0,196,0,0,0,
+76,0,44,0,64,0,8,0,44,0,236,0,40,0,28,0,48,0,132,2,
+16,0,20,3,68,0,40,0,36,0,136,1,20,0,180,0,112,0,20,0,
+200,0,184,0,140,0,68,1,0,0,0,0,152,0,160,0,132,0,104,0,
+224,2,0,0,0,0,20,2,100,0,20,0,24,0,12,0,64,0,108,0,
+240,0,148,0,28,0,16,0,24,0,156,0,0,0,56,0,236,0,40,0,
+156,0,44,0,64,0,48,0,8,0,44,0,72,0,104,0,72,0,44,0,
+40,0,108,0,68,0,76,0,80,0,128,0,4,0,60,0,12,0,60,0,
+20,0,20,1,16,0,64,0,16,0,76,0,120,0,48,0,28,0,56,0,
+52,0,56,0,108,0,136,0,4,0,0,0,64,0,152,0,48,0,112,1,
+20,0,80,0,160,0,60,0,152,0,96,0,124,0,44,0,44,0,44,0,
+56,0,4,0,24,0,56,0,83,84,82,67,151,0,0,0,10,0,2,0,
+10,0,0,0,10,0,1,0,11,0,2,0,9,0,2,0,9,0,3,0,
+12,0,2,0,2,0,4,0,2,0,5,0,13,0,2,0,4,0,4,0,
+4,0,5,0,14,0,2,0,7,0,4,0,7,0,5,0,15,0,2,0,
+8,0,4,0,8,0,5,0,16,0,3,0,4,0,4,0,4,0,5,0,
+4,0,6,0,17,0,3,0,7,0,4,0,7,0,5,0,7,0,6,0,
+18,0,3,0,8,0,4,0,8,0,5,0,8,0,6,0,19,0,4,0,
+4,0,4,0,4,0,5,0,4,0,6,0,4,0,7,0,20,0,4,0,
+7,0,4,0,7,0,5,0,7,0,6,0,7,0,7,0,21,0,4,0,
+8,0,4,0,8,0,5,0,8,0,6,0,8,0,7,0,22,0,4,0,
+4,0,8,0,4,0,9,0,4,0,10,0,4,0,11,0,23,0,4,0,
+7,0,8,0,7,0,9,0,7,0,10,0,7,0,11,0,24,0,8,0,
+9,0,0,0,9,0,1,0,24,0,12,0,25,0,13,0,0,0,14,0,
+2,0,15,0,2,0,16,0,4,0,17,0,25,0,6,0,24,0,18,0,
+24,0,19,0,26,0,20,0,0,0,21,0,4,0,22,0,4,0,17,0,
+27,0,6,0,24,0,18,0,11,0,23,0,23,0,24,0,2,0,25,0,
+2,0,26,0,4,0,17,0,28,0,9,0,28,0,0,0,28,0,1,0,
+7,0,27,0,2,0,16,0,2,0,28,0,2,0,29,0,2,0,30,0,
+4,0,17,0,9,0,31,0,29,0,12,0,24,0,18,0,28,0,32,0,
+0,0,33,0,4,0,34,0,7,0,35,0,11,0,36,0,27,0,37,0,
+24,0,38,0,2,0,29,0,2,0,39,0,2,0,40,0,2,0,41,0,
+30,0,5,0,24,0,42,0,2,0,43,0,2,0,44,0,2,0,45,0,
+4,0,17,0,31,0,5,0,31,0,0,0,31,0,1,0,0,0,46,0,
+4,0,47,0,4,0,48,0,32,0,13,0,24,0,18,0,0,0,49,0,
+4,0,50,0,4,0,51,0,11,0,52,0,31,0,53,0,31,0,54,0,
+4,0,55,0,4,0,56,0,0,0,57,0,4,0,58,0,4,0,59,0,
+9,0,60,0,33,0,5,0,4,0,61,0,4,0,62,0,4,0,50,0,
+4,0,17,0,9,0,31,0,34,0,15,0,24,0,18,0,2,0,29,0,
+2,0,16,0,2,0,63,0,2,0,64,0,7,0,65,0,7,0,66,0,
+7,0,67,0,7,0,68,0,7,0,69,0,7,0,70,0,7,0,71,0,
+7,0,72,0,27,0,37,0,30,0,73,0,35,0,21,0,24,0,18,0,
+0,0,21,0,36,0,74,0,37,0,75,0,37,0,76,0,2,0,77,0,
+2,0,16,0,2,0,78,0,2,0,79,0,2,0,80,0,2,0,81,0,
+2,0,82,0,2,0,83,0,2,0,84,0,2,0,85,0,4,0,86,0,
+4,0,87,0,33,0,88,0,7,0,89,0,2,0,90,0,2,0,91,0,
+38,0,22,0,2,0,92,0,2,0,93,0,2,0,94,0,2,0,95,0,
+39,0,96,0,40,0,97,0,0,0,98,0,0,0,99,0,0,0,100,0,
+0,0,101,0,7,0,102,0,7,0,103,0,2,0,104,0,2,0,105,0,
+7,0,106,0,7,0,107,0,7,0,108,0,7,0,109,0,7,0,110,0,
+7,0,111,0,7,0,112,0,7,0,113,0,41,0,14,0,0,0,21,0,
+9,0,114,0,0,0,115,0,0,0,116,0,4,0,117,0,4,0,118,0,
+9,0,119,0,7,0,120,0,7,0,121,0,7,0,122,0,4,0,123,0,
+9,0,124,0,4,0,125,0,4,0,17,0,42,0,6,0,7,0,106,0,
+7,0,107,0,7,0,108,0,7,0,126,0,7,0,27,0,4,0,24,0,
+43,0,5,0,2,0,16,0,2,0,22,0,2,0,24,0,2,0,127,0,
+42,0,128,0,44,0,12,0,39,0,96,0,35,0,129,0,35,0,130,0,
+7,0,131,0,2,0,29,0,2,0,132,0,7,0,65,0,7,0,66,0,
+4,0,133,0,4,0,134,0,2,0,77,0,2,0,78,0,40,0,35,0,
+24,0,18,0,7,0,135,0,7,0,136,0,7,0,137,0,7,0,138,0,
+7,0,139,0,7,0,140,0,7,0,141,0,7,0,142,0,2,0,143,0,
+2,0,144,0,2,0,145,0,2,0,16,0,2,0,29,0,2,0,132,0,
+7,0,146,0,7,0,147,0,7,0,148,0,7,0,149,0,2,0,150,0,
+2,0,151,0,2,0,152,0,2,0,47,0,2,0,153,0,2,0,154,0,
+2,0,155,0,2,0,156,0,7,0,112,0,7,0,157,0,27,0,37,0,
+35,0,129,0,41,0,158,0,43,0,159,0,44,0,160,0,2,0,161,0,
+45,0,28,0,24,0,18,0,2,0,29,0,2,0,162,0,2,0,105,0,
+2,0,163,0,7,0,106,0,7,0,107,0,7,0,108,0,7,0,109,0,
+7,0,164,0,7,0,165,0,7,0,166,0,7,0,167,0,7,0,168,0,
+7,0,169,0,7,0,170,0,2,0,171,0,2,0,172,0,7,0,65,0,
+7,0,66,0,7,0,173,0,7,0,174,0,7,0,175,0,2,0,176,0,
+2,0,177,0,38,0,178,0,27,0,37,0,30,0,73,0,46,0,2,0,
+24,0,18,0,27,0,37,0,47,0,58,0,24,0,18,0,2,0,105,0,
+2,0,179,0,7,0,106,0,7,0,107,0,7,0,108,0,7,0,180,0,
+7,0,181,0,7,0,182,0,7,0,183,0,7,0,184,0,7,0,185,0,
+7,0,186,0,7,0,187,0,7,0,188,0,7,0,189,0,7,0,190,0,
+7,0,191,0,7,0,192,0,7,0,193,0,7,0,194,0,7,0,195,0,
+7,0,196,0,7,0,197,0,7,0,198,0,2,0,199,0,0,0,200,0,
+0,0,201,0,4,0,162,0,4,0,202,0,2,0,203,0,2,0,204,0,
+2,0,205,0,2,0,206,0,7,0,207,0,7,0,208,0,7,0,209,0,
+7,0,210,0,0,0,211,0,0,0,176,0,0,0,212,0,0,0,213,0,
+2,0,214,0,2,0,215,0,4,0,216,0,2,0,92,0,2,0,93,0,
+38,0,178,0,27,0,37,0,47,0,217,0,7,0,218,0,7,0,219,0,
+7,0,220,0,7,0,221,0,7,0,222,0,2,0,223,0,2,0,17,0,
+30,0,73,0,48,0,6,0,24,0,18,0,0,0,224,0,7,0,225,0,
+7,0,17,0,49,0,31,0,33,0,88,0,50,0,20,0,50,0,0,0,
+50,0,1,0,2,0,29,0,2,0,179,0,2,0,16,0,2,0,226,0,
+7,0,4,0,7,0,5,0,7,0,6,0,7,0,227,0,7,0,228,0,
+7,0,229,0,7,0,230,0,7,0,231,0,7,0,232,0,7,0,47,0,
+7,0,233,0,4,0,17,0,7,0,234,0,7,0,235,0,51,0,15,0,
+24,0,18,0,52,0,236,0,11,0,237,0,11,0,238,0,27,0,37,0,
+47,0,239,0,2,0,16,0,2,0,240,0,4,0,104,0,7,0,241,0,
+7,0,103,0,7,0,242,0,7,0,243,0,7,0,244,0,7,0,245,0,
+53,0,9,0,7,0,246,0,7,0,247,0,2,0,248,0,2,0,249,0,
+2,0,250,0,0,0,251,0,0,0,252,0,0,0,253,0,0,0,254,0,
+54,0,5,0,7,0,255,0,7,0,247,0,2,0,0,1,2,0,251,0,
+2,0,254,0,55,0,18,0,55,0,0,0,55,0,1,0,2,0,29,0,
+2,0,1,1,2,0,254,0,2,0,16,0,2,0,2,1,2,0,3,1,
+2,0,4,1,2,0,5,1,2,0,6,1,2,0,7,1,2,0,8,1,
+2,0,9,1,7,0,10,1,7,0,11,1,54,0,12,1,53,0,13,1,
+56,0,38,0,24,0,18,0,52,0,236,0,11,0,14,1,11,0,238,0,
+39,0,15,1,39,0,16,1,27,0,37,0,57,0,17,1,29,0,18,1,
+47,0,239,0,11,0,19,1,7,0,20,1,7,0,241,0,7,0,103,0,
+7,0,242,0,4,0,104,0,2,0,21,1,2,0,240,0,2,0,16,0,
+2,0,22,1,7,0,23,1,7,0,24,1,7,0,25,1,2,0,4,1,
+2,0,5,1,2,0,47,0,2,0,52,0,2,0,27,0,2,0,26,1,
+7,0,27,1,7,0,28,1,7,0,29,1,7,0,30,1,7,0,31,1,
+7,0,32,1,0,0,33,1,0,0,34,1,48,0,35,1,58,0,18,0,
+58,0,0,0,58,0,1,0,54,0,12,1,53,0,13,1,23,0,36,1,
+23,0,37,1,2,0,25,0,2,0,38,1,2,0,39,1,2,0,40,1,
+2,0,41,1,2,0,42,1,2,0,16,0,2,0,30,0,7,0,10,0,
+7,0,11,0,4,0,43,1,7,0,35,0,59,0,8,0,3,0,44,1,
+3,0,45,1,3,0,46,1,3,0,47,1,0,0,48,1,0,0,1,1,
+0,0,49,1,0,0,16,0,60,0,8,0,4,0,44,1,4,0,45,1,
+4,0,46,1,4,0,47,1,0,0,48,1,0,0,1,1,0,0,49,1,
+0,0,16,0,61,0,8,0,9,0,50,1,7,0,51,1,4,0,52,1,
+0,0,16,0,0,0,53,1,2,0,162,0,2,0,54,1,2,0,17,0,
+62,0,3,0,4,0,55,1,7,0,56,1,63,0,31,0,64,0,3,0,
+62,0,57,1,4,0,58,1,4,0,91,0,65,0,4,0,7,0,59,1,
+2,0,60,1,0,0,16,0,0,0,1,1,66,0,4,0,0,0,126,0,
+0,0,106,0,0,0,107,0,0,0,108,0,67,0,1,0,7,0,61,1,
+68,0,34,0,24,0,18,0,52,0,236,0,11,0,62,1,11,0,238,0,
+27,0,37,0,29,0,18,1,47,0,239,0,9,0,63,1,9,0,64,1,
+9,0,65,1,65,0,66,1,64,0,67,1,66,0,68,1,67,0,69,1,
+68,0,70,1,7,0,20,1,69,0,71,1,9,0,72,1,4,0,40,1,
+4,0,73,1,4,0,104,0,7,0,241,0,7,0,103,0,7,0,242,0,
+2,0,74,1,2,0,16,0,2,0,75,1,2,0,76,1,2,0,240,0,
+2,0,91,0,2,0,77,1,2,0,78,1,7,0,79,1,7,0,80,1,
+70,0,13,0,24,0,18,0,2,0,2,1,2,0,3,1,2,0,81,1,
+2,0,16,0,0,0,82,1,0,0,83,1,0,0,84,1,0,0,29,0,
+4,0,17,0,54,0,85,1,27,0,37,0,29,0,18,1,71,0,4,0,
+71,0,0,0,71,0,1,0,0,0,86,1,9,0,31,0,39,0,79,0,
+24,0,18,0,2,0,29,0,2,0,87,1,4,0,88,1,4,0,89,1,
+4,0,90,1,0,0,91,1,9,0,92,1,39,0,93,1,39,0,94,1,
+27,0,37,0,57,0,17,1,52,0,236,0,72,0,95,1,73,0,96,1,
+9,0,31,0,74,0,97,1,11,0,98,1,11,0,62,1,11,0,99,1,
+11,0,238,0,11,0,100,1,47,0,239,0,7,0,241,0,7,0,101,1,
+7,0,102,1,7,0,103,0,7,0,103,1,7,0,242,0,7,0,104,1,
+7,0,105,1,7,0,106,1,7,0,107,1,7,0,108,1,7,0,131,0,
+4,0,179,0,2,0,16,0,2,0,109,1,0,0,110,1,0,0,111,1,
+0,0,112,1,0,0,113,1,2,0,114,1,2,0,115,1,2,0,116,1,
+2,0,117,1,2,0,118,1,2,0,119,1,2,0,120,1,2,0,121,1,
+7,0,122,1,7,0,123,1,7,0,124,1,7,0,125,1,7,0,126,1,
+7,0,127,1,7,0,128,1,7,0,129,1,7,0,130,1,0,0,131,1,
+0,0,132,1,0,0,240,0,0,0,133,1,30,0,73,0,11,0,134,1,
+11,0,135,1,11,0,136,1,11,0,137,1,9,0,72,1,7,0,138,1,
+2,0,139,1,2,0,140,1,7,0,52,1,4,0,141,1,4,0,142,1,
+4,0,17,0,7,0,143,1,11,0,144,1,11,0,145,1,75,0,43,0,
+24,0,18,0,2,0,105,0,2,0,163,0,2,0,176,0,2,0,146,1,
+7,0,147,1,7,0,148,1,7,0,149,1,7,0,150,1,7,0,151,1,
+7,0,152,1,7,0,153,1,7,0,154,1,7,0,186,0,7,0,188,0,
+7,0,187,0,7,0,155,1,4,0,156,1,7,0,157,1,7,0,158,1,
+7,0,159,1,2,0,160,1,2,0,162,0,7,0,161,1,7,0,162,1,
+7,0,163,1,7,0,164,1,7,0,165,1,7,0,166,1,7,0,167,1,
+7,0,168,1,7,0,169,1,7,0,170,1,7,0,171,1,7,0,172,1,
+2,0,173,1,2,0,174,1,2,0,175,1,2,0,176,1,4,0,216,0,
+27,0,37,0,38,0,178,0,30,0,73,0,76,0,16,0,2,0,177,1,
+2,0,178,1,2,0,179,1,2,0,16,0,2,0,180,1,2,0,181,1,
+2,0,182,1,2,0,183,1,2,0,184,1,2,0,185,1,2,0,186,1,
+2,0,187,1,4,0,188,1,7,0,189,1,7,0,190,1,7,0,191,1,
+77,0,8,0,77,0,0,0,77,0,1,0,4,0,179,0,4,0,226,0,
+4,0,16,0,2,0,192,1,2,0,193,1,39,0,96,0,78,0,12,0,
+9,0,194,1,9,0,195,1,4,0,196,1,4,0,197,1,4,0,198,1,
+4,0,199,1,4,0,200,1,4,0,201,1,4,0,202,1,4,0,203,1,
+4,0,204,1,4,0,17,0,79,0,55,0,78,0,205,1,2,0,206,1,
+2,0,155,0,2,0,207,1,2,0,208,1,2,0,209,1,2,0,16,0,
+7,0,123,1,7,0,210,1,7,0,211,1,7,0,212,1,7,0,213,1,
+7,0,214,1,2,0,215,1,2,0,216,1,2,0,217,1,2,0,218,1,
+2,0,219,1,2,0,220,1,2,0,221,1,2,0,222,1,2,0,223,1,
+2,0,224,1,2,0,61,0,2,0,225,1,2,0,226,1,2,0,227,1,
+2,0,228,1,2,0,229,1,2,0,230,1,2,0,231,1,23,0,232,1,
+23,0,233,1,2,0,234,1,2,0,235,1,2,0,236,1,2,0,237,1,
+2,0,238,1,2,0,239,1,2,0,162,0,2,0,240,1,2,0,241,1,
+2,0,242,1,2,0,243,1,2,0,244,1,2,0,245,1,2,0,246,1,
+7,0,191,1,7,0,247,1,7,0,248,1,7,0,249,1,7,0,250,1,
+0,0,251,1,0,0,252,1,0,0,253,1,80,0,5,0,7,0,254,1,
+0,0,29,0,0,0,216,0,0,0,255,1,0,0,0,2,81,0,17,0,
+24,0,18,0,39,0,1,2,75,0,2,2,81,0,3,2,35,0,129,0,
+11,0,4,2,77,0,5,2,82,0,6,2,7,0,7,2,4,0,179,0,
+83,0,8,2,9,0,9,2,76,0,10,2,9,0,72,1,80,0,11,2,
+79,0,106,0,30,0,73,0,84,0,10,0,35,0,129,0,40,0,97,0,
+7,0,31,1,7,0,32,1,7,0,61,0,7,0,12,2,7,0,13,2,
+2,0,14,2,2,0,15,2,4,0,16,2,85,0,38,0,86,0,0,0,
+86,0,1,0,4,0,17,2,4,0,17,0,87,0,18,2,7,0,19,2,
+7,0,20,2,7,0,21,2,7,0,22,2,7,0,23,2,7,0,165,0,
+2,0,24,2,2,0,25,2,39,0,1,2,84,0,26,2,85,0,27,2,
+2,0,179,1,2,0,28,2,4,0,179,0,4,0,29,2,2,0,30,2,
+2,0,31,2,2,0,32,2,2,0,16,0,7,0,69,0,7,0,33,2,
+7,0,34,2,7,0,35,2,7,0,102,0,7,0,7,2,2,0,36,2,
+2,0,37,2,2,0,38,2,2,0,39,2,2,0,40,2,2,0,41,2,
+4,0,255,1,4,0,0,2,88,0,13,0,23,0,22,0,23,0,24,0,
+22,0,42,2,22,0,43,2,22,0,44,2,7,0,45,2,7,0,46,2,
+7,0,47,2,7,0,48,2,2,0,49,2,2,0,50,2,2,0,51,2,
+2,0,52,2,86,0,5,0,86,0,0,0,86,0,1,0,4,0,17,2,
+4,0,17,0,87,0,18,2,89,0,5,0,86,0,0,0,86,0,1,0,
+4,0,17,2,4,0,216,0,87,0,18,2,90,0,23,0,86,0,0,0,
+86,0,1,0,4,0,17,2,4,0,216,0,87,0,18,2,4,0,53,2,
+4,0,255,1,88,0,54,2,9,0,55,2,11,0,56,2,27,0,37,0,
+24,0,38,0,2,0,57,2,2,0,58,2,2,0,59,2,2,0,60,2,
+2,0,26,0,2,0,25,0,2,0,61,2,2,0,62,2,4,0,16,0,
+4,0,91,0,23,0,22,0,91,0,27,0,86,0,0,0,86,0,1,0,
+4,0,17,2,4,0,216,0,87,0,18,2,2,0,63,2,2,0,64,2,
+4,0,255,1,88,0,54,2,2,0,65,2,2,0,61,2,2,0,58,2,
+2,0,66,2,9,0,67,2,2,0,68,2,0,0,69,2,0,0,70,2,
+2,0,71,2,2,0,72,2,4,0,16,2,2,0,73,2,2,0,74,2,
+2,0,75,2,2,0,115,1,0,0,176,0,0,0,76,2,90,0,77,2,
+92,0,9,0,86,0,0,0,86,0,1,0,4,0,17,2,4,0,17,0,
+87,0,18,2,88,0,54,2,2,0,65,2,2,0,12,2,4,0,255,1,
+93,0,23,0,86,0,0,0,86,0,1,0,4,0,17,2,4,0,17,0,
+87,0,18,2,94,0,78,2,4,0,79,2,0,0,80,2,0,0,81,2,
+0,0,82,2,2,0,29,0,2,0,83,2,2,0,16,0,2,0,84,2,
+2,0,85,2,2,0,86,2,95,0,87,2,2,0,88,2,2,0,127,0,
+2,0,89,2,2,0,90,2,9,0,91,2,2,0,92,2,96,0,12,0,
+86,0,0,0,86,0,1,0,4,0,17,2,4,0,17,0,87,0,18,2,
+88,0,54,2,11,0,93,2,2,0,58,2,2,0,94,2,2,0,16,0,
+2,0,30,0,9,0,67,2,97,0,17,0,86,0,0,0,86,0,1,0,
+4,0,17,2,4,0,17,0,87,0,18,2,88,0,54,2,35,0,95,2,
+7,0,12,2,7,0,255,1,2,0,162,0,2,0,58,2,2,0,96,2,
+2,0,97,2,2,0,31,1,2,0,32,1,2,0,16,0,2,0,62,2,
+98,0,6,0,86,0,0,0,86,0,1,0,4,0,17,2,4,0,62,2,
+87,0,18,2,88,0,54,2,99,0,21,0,86,0,0,0,86,0,1,0,
+4,0,17,2,4,0,17,0,87,0,18,2,32,0,98,2,4,0,99,2,
+4,0,100,2,2,0,50,0,2,0,61,2,4,0,101,2,4,0,102,2,
+4,0,103,2,4,0,255,1,7,0,104,2,22,0,105,2,22,0,106,2,
+9,0,107,2,9,0,108,2,9,0,109,2,9,0,110,2,100,0,81,0,
+86,0,0,0,86,0,1,0,4,0,17,2,4,0,216,0,87,0,18,2,
+0,0,111,2,4,0,112,2,2,0,162,0,2,0,113,2,2,0,114,2,
+2,0,115,2,2,0,36,2,2,0,37,2,2,0,116,2,2,0,117,2,
+2,0,118,2,2,0,119,2,2,0,120,2,2,0,121,2,2,0,122,2,
+2,0,123,2,2,0,124,2,2,0,125,2,2,0,126,2,2,0,127,2,
+2,0,128,2,2,0,129,2,2,0,130,2,2,0,131,2,2,0,132,2,
+2,0,133,2,2,0,134,2,2,0,135,2,2,0,136,2,2,0,137,2,
+2,0,138,2,2,0,139,2,2,0,140,2,2,0,141,2,2,0,142,2,
+2,0,143,2,2,0,144,2,2,0,145,2,2,0,146,2,2,0,147,2,
+2,0,148,2,2,0,149,2,2,0,150,2,2,0,151,2,2,0,152,2,
+2,0,153,2,2,0,154,2,2,0,155,2,2,0,156,2,2,0,157,2,
+0,0,158,2,0,0,159,2,0,0,160,2,0,0,161,2,101,0,162,2,
+101,0,163,2,4,0,164,2,4,0,165,2,4,0,166,2,4,0,167,2,
+4,0,168,2,7,0,169,2,7,0,170,2,7,0,171,2,2,0,172,2,
+2,0,173,2,2,0,174,2,2,0,175,2,102,0,176,2,102,0,177,2,
+2,0,178,2,2,0,179,2,4,0,255,1,37,0,180,2,9,0,91,2,
+9,0,181,2,103,0,15,0,2,0,16,0,2,0,182,2,4,0,183,2,
+0,0,184,2,0,0,185,2,0,0,186,2,0,0,187,2,0,0,188,2,
+0,0,189,2,0,0,190,2,0,0,191,2,2,0,192,2,2,0,193,2,
+4,0,194,2,4,0,128,1,104,0,17,0,24,0,18,0,11,0,195,2,
+11,0,196,2,11,0,197,2,81,0,198,2,2,0,199,2,2,0,200,2,
+2,0,201,2,2,0,202,2,2,0,203,2,2,0,204,2,2,0,205,2,
+2,0,206,2,2,0,207,2,2,0,30,0,2,0,208,2,2,0,209,2,
+105,0,5,0,105,0,0,0,105,0,1,0,105,0,210,2,12,0,211,2,
+4,0,16,0,106,0,7,0,106,0,0,0,106,0,1,0,105,0,212,2,
+105,0,213,2,2,0,233,1,2,0,16,0,4,0,17,0,87,0,28,0,
+87,0,0,0,87,0,1,0,105,0,212,2,105,0,213,2,105,0,214,2,
+105,0,215,2,104,0,216,2,7,0,217,2,22,0,37,1,22,0,218,2,
+22,0,219,2,2,0,220,2,2,0,221,2,2,0,222,2,0,0,17,2,
+0,0,223,2,2,0,224,2,2,0,225,2,0,0,226,2,0,0,227,2,
+0,0,228,2,0,0,229,2,2,0,230,2,2,0,231,2,2,0,232,2,
+2,0,30,0,11,0,233,2,11,0,234,2,107,0,4,0,9,0,235,2,
+2,0,236,2,2,0,234,1,4,0,237,2,108,0,8,0,0,0,238,2,
+37,0,75,0,108,0,239,2,108,0,240,2,108,0,241,2,2,0,77,0,
+2,0,242,2,4,0,17,0,109,0,11,0,109,0,0,0,109,0,1,0,
+2,0,30,0,2,0,47,0,2,0,15,0,2,0,243,2,108,0,244,2,
+0,0,245,2,2,0,246,2,2,0,247,2,4,0,17,0,110,0,10,0,
+0,0,248,2,9,0,114,0,0,0,115,0,4,0,118,0,4,0,125,0,
+9,0,119,0,7,0,121,0,7,0,122,0,9,0,123,0,9,0,124,0,
+111,0,32,0,111,0,0,0,111,0,1,0,111,0,249,2,9,0,13,0,
+0,0,14,0,2,0,16,0,2,0,29,0,4,0,47,0,4,0,250,2,
+4,0,251,2,4,0,252,2,4,0,253,2,4,0,254,2,4,0,255,2,
+4,0,219,1,4,0,0,3,4,0,1,3,7,0,2,3,7,0,3,3,
+4,0,155,0,109,0,4,3,108,0,5,3,27,0,37,0,81,0,198,2,
+36,0,74,0,7,0,6,3,7,0,7,3,110,0,158,0,111,0,8,3,
+111,0,9,3,111,0,10,3,11,0,11,3,112,0,6,0,11,0,12,3,
+11,0,11,3,11,0,13,3,2,0,16,0,2,0,30,0,4,0,17,0,
+113,0,6,0,113,0,0,0,113,0,1,0,2,0,29,0,2,0,16,0,
+2,0,14,3,2,0,30,0,114,0,8,0,114,0,0,0,114,0,1,0,
+2,0,29,0,2,0,16,0,2,0,14,3,2,0,30,0,7,0,47,0,
+7,0,155,0,115,0,31,0,115,0,0,0,115,0,1,0,2,0,29,0,
+2,0,16,0,2,0,14,3,2,0,132,0,7,0,15,3,7,0,16,3,
+7,0,17,3,4,0,18,3,4,0,39,0,4,0,19,3,7,0,20,3,
+7,0,21,3,7,0,22,3,7,0,23,3,7,0,24,3,7,0,25,3,
+7,0,26,3,7,0,27,3,7,0,28,3,7,0,29,3,7,0,30,3,
+7,0,31,3,2,0,32,3,2,0,33,3,2,0,34,3,2,0,35,3,
+2,0,36,3,2,0,17,0,116,0,37,3,117,0,16,0,117,0,0,0,
+117,0,1,0,2,0,29,0,2,0,16,0,2,0,14,3,2,0,132,0,
+7,0,199,2,7,0,201,2,7,0,38,3,7,0,23,1,7,0,39,3,
+7,0,40,3,7,0,41,3,7,0,26,3,7,0,42,3,7,0,17,3,
+118,0,13,0,39,0,43,3,2,0,16,0,2,0,87,1,4,0,88,1,
+4,0,89,1,4,0,90,1,7,0,131,0,7,0,44,3,7,0,45,3,
+7,0,46,3,7,0,47,3,7,0,165,0,7,0,17,0,119,0,9,0,
+119,0,0,0,119,0,1,0,7,0,47,0,7,0,48,3,7,0,47,3,
+7,0,193,0,7,0,49,3,7,0,17,0,7,0,50,3,120,0,23,0,
+24,0,18,0,2,0,87,1,2,0,16,0,2,0,51,3,2,0,52,3,
+11,0,53,3,7,0,54,3,7,0,55,3,7,0,56,3,7,0,57,3,
+7,0,58,3,7,0,59,3,7,0,60,3,7,0,61,3,27,0,37,0,
+39,0,93,1,4,0,88,1,4,0,89,1,4,0,90,1,4,0,62,3,
+118,0,85,1,4,0,63,3,4,0,64,3,121,0,12,0,121,0,0,0,
+121,0,1,0,2,0,29,0,2,0,16,0,2,0,131,1,2,0,254,0,
+7,0,4,0,7,0,5,0,7,0,65,3,7,0,66,3,24,0,67,3,
+11,0,68,3,122,0,11,0,122,0,0,0,122,0,1,0,0,0,86,1,
+2,0,29,0,2,0,69,3,4,0,70,3,4,0,71,3,2,0,16,0,
+2,0,17,0,9,0,72,3,9,0,73,3,123,0,5,0,0,0,86,1,
+7,0,165,0,7,0,74,3,4,0,75,3,4,0,17,0,124,0,4,0,
+2,0,29,0,2,0,16,0,2,0,216,0,2,0,255,1,125,0,4,0,
+0,0,86,1,47,0,76,3,7,0,165,0,7,0,17,0,126,0,6,0,
+2,0,77,3,2,0,78,3,2,0,29,0,2,0,79,3,0,0,80,3,
+0,0,81,3,127,0,5,0,4,0,29,0,4,0,17,0,0,0,86,1,
+0,0,82,3,0,0,83,3,128,0,6,0,0,0,86,1,0,0,84,3,
+2,0,85,3,2,0,26,3,2,0,162,0,2,0,255,1,129,0,5,0,
+0,0,86,1,7,0,86,3,7,0,87,3,2,0,16,0,2,0,88,3,
+130,0,3,0,0,0,86,1,4,0,19,3,4,0,89,3,131,0,7,0,
+0,0,86,1,7,0,87,3,0,0,90,3,0,0,91,3,2,0,162,0,
+2,0,216,0,4,0,92,3,132,0,3,0,39,0,93,3,0,0,94,3,
+0,0,95,3,133,0,17,0,133,0,0,0,133,0,1,0,2,0,29,0,
+2,0,69,3,2,0,16,0,2,0,96,3,2,0,97,3,2,0,98,3,
+2,0,216,0,2,0,255,1,0,0,86,1,9,0,31,0,134,0,99,3,
+39,0,43,3,2,0,100,3,2,0,101,3,4,0,17,0,135,0,1,0,
+0,0,102,3,136,0,1,0,32,0,98,2,134,0,18,0,134,0,0,0,
+134,0,1,0,134,0,103,3,2,0,29,0,2,0,16,0,2,0,104,3,
+2,0,98,3,2,0,69,3,2,0,105,3,2,0,255,1,2,0,0,2,
+0,0,86,1,9,0,31,0,137,0,99,3,133,0,106,3,2,0,107,3,
+2,0,108,3,4,0,109,3,138,0,3,0,4,0,110,3,4,0,17,0,
+39,0,43,3,139,0,13,0,72,0,111,3,2,0,29,0,2,0,16,0,
+2,0,15,3,2,0,16,3,0,0,86,1,2,0,112,3,2,0,113,3,
+7,0,114,3,2,0,115,3,2,0,91,0,2,0,77,1,2,0,78,1,
+140,0,9,0,2,0,16,0,2,0,116,3,2,0,15,3,2,0,16,3,
+141,0,117,3,2,0,29,0,2,0,118,3,2,0,119,3,2,0,120,3,
+142,0,7,0,2,0,16,0,2,0,116,3,2,0,15,3,2,0,16,3,
+2,0,29,0,2,0,121,3,7,0,122,3,143,0,9,0,4,0,110,3,
+2,0,29,0,2,0,16,0,39,0,43,3,68,0,123,3,0,0,86,1,
+7,0,124,3,2,0,125,3,2,0,17,0,144,0,5,0,2,0,29,0,
+2,0,16,0,4,0,17,0,81,0,198,2,39,0,1,2,145,0,5,0,
+4,0,16,0,4,0,29,0,0,0,86,1,0,0,82,3,39,0,43,3,
+146,0,12,0,4,0,16,0,4,0,29,0,7,0,126,3,7,0,127,3,
+7,0,241,0,7,0,242,0,7,0,101,1,7,0,104,1,7,0,128,3,
+7,0,129,3,7,0,130,3,0,0,131,3,147,0,9,0,2,0,16,0,
+2,0,29,0,2,0,15,3,2,0,16,3,0,0,86,1,2,0,216,0,
+2,0,24,0,2,0,132,3,2,0,133,3,148,0,8,0,39,0,43,3,
+7,0,38,3,7,0,134,3,7,0,135,3,7,0,47,3,2,0,16,0,
+2,0,88,3,7,0,136,3,149,0,7,0,2,0,16,0,2,0,26,3,
+7,0,58,3,7,0,137,3,7,0,138,3,7,0,139,3,7,0,140,3,
+150,0,10,0,2,0,16,0,2,0,29,0,2,0,15,3,2,0,16,3,
+0,0,86,1,2,0,216,0,2,0,24,0,2,0,132,3,2,0,133,3,
+82,0,6,2,151,0,7,0,4,0,19,3,4,0,141,3,4,0,142,3,
+4,0,143,3,7,0,144,3,7,0,145,3,0,0,90,3,152,0,7,0,
+0,0,146,3,39,0,147,3,0,0,94,3,2,0,148,3,2,0,216,0,
+4,0,255,1,0,0,95,3,153,0,6,0,2,0,16,0,2,0,29,0,
+2,0,15,3,2,0,16,3,0,0,149,3,0,0,150,3,154,0,1,0,
+4,0,16,0,137,0,10,0,137,0,0,0,137,0,1,0,137,0,103,3,
+2,0,29,0,2,0,16,0,2,0,69,3,2,0,151,3,0,0,86,1,
+9,0,31,0,39,0,43,3,83,0,10,0,7,0,124,1,7,0,152,3,
+7,0,153,3,7,0,154,3,7,0,155,3,4,0,16,0,7,0,156,3,
+7,0,157,3,7,0,158,3,7,0,17,0,141,0,20,0,24,0,18,0,
+0,0,21,0,155,0,159,3,33,0,88,0,33,0,160,3,9,0,161,3,
+27,0,37,0,7,0,122,3,7,0,162,3,7,0,163,3,7,0,164,3,
+7,0,165,3,7,0,166,3,7,0,167,3,4,0,50,0,4,0,168,3,
+4,0,169,3,0,0,170,3,0,0,171,3,0,0,172,3,156,0,6,0,
+24,0,18,0,7,0,173,3,7,0,174,3,7,0,175,3,2,0,176,3,
+2,0,177,3,157,0,14,0,86,0,0,0,86,0,1,0,4,0,17,2,
+4,0,17,0,87,0,18,2,88,0,54,2,141,0,117,3,2,0,162,0,
+2,0,116,3,2,0,31,1,2,0,32,1,2,0,16,0,2,0,62,2,
+4,0,255,1,158,0,6,0,158,0,0,0,158,0,1,0,2,0,155,0,
+2,0,207,1,7,0,206,1,0,0,86,1,159,0,31,0,159,0,0,0,
+159,0,1,0,158,0,178,3,2,0,87,1,2,0,17,0,4,0,88,1,
+4,0,89,1,4,0,90,1,39,0,93,1,39,0,94,1,27,0,37,0,
+7,0,241,0,7,0,101,1,7,0,102,1,7,0,103,0,7,0,103,1,
+7,0,242,0,7,0,104,1,7,0,105,1,7,0,106,1,7,0,107,1,
+7,0,108,1,7,0,131,0,4,0,179,0,0,0,110,1,0,0,111,1,
+0,0,112,1,0,0,113,1,7,0,122,1,7,0,123,1,7,0,179,3,
+160,0,4,0,160,0,0,0,160,0,1,0,39,0,43,3,11,0,180,3,
+82,0,4,0,24,0,18,0,11,0,181,3,11,0,182,3,158,0,183,3,
+63,0,22,0,63,0,0,0,63,0,1,0,63,0,93,1,11,0,184,3,
+0,0,86,1,7,0,185,3,7,0,186,3,7,0,187,3,4,0,16,0,
+7,0,165,0,7,0,56,1,7,0,241,0,7,0,101,1,7,0,103,0,
+7,0,103,1,7,0,105,1,7,0,106,1,7,0,107,1,7,0,188,3,
+7,0,189,3,7,0,190,3,7,0,191,3,161,0,7,0,24,0,18,0,
+11,0,192,3,11,0,193,3,4,0,16,0,4,0,194,3,4,0,195,3,
+4,0,196,3,162,0,10,0,162,0,0,0,162,0,1,0,11,0,144,1,
+4,0,16,0,7,0,241,0,7,0,103,0,7,0,105,1,7,0,107,1,
+0,0,86,1,4,0,91,0,73,0,1,0,11,0,197,3,163,0,7,0,
+163,0,0,0,163,0,1,0,27,0,37,0,11,0,98,1,4,0,16,0,
+0,0,86,1,4,0,91,0,72,0,4,0,24,0,18,0,11,0,197,3,
+163,0,198,3,162,0,199,3,164,0,13,0,86,0,0,0,86,0,1,0,
+4,0,17,2,4,0,17,0,87,0,18,2,88,0,54,2,72,0,95,1,
+4,0,16,0,2,0,58,2,2,0,91,0,2,0,200,3,2,0,62,2,
+4,0,255,1,74,0,5,0,74,0,0,0,74,0,1,0,27,0,37,0,
+2,0,16,0,0,0,201,3,165,0,14,0,165,0,0,0,165,0,1,0,
+9,0,31,0,27,0,37,0,0,0,29,0,0,0,69,3,2,0,16,0,
+2,0,91,0,0,0,201,3,7,0,202,3,7,0,110,3,7,0,203,3,
+7,0,204,3,7,0,205,3,166,0,7,0,39,0,206,3,7,0,207,3,
+4,0,208,3,0,0,209,3,7,0,210,3,4,0,91,0,7,0,211,3,
+167,0,4,0,39,0,206,3,4,0,91,0,4,0,77,1,0,0,209,3,
+168,0,4,0,39,0,206,3,4,0,16,0,4,0,91,0,0,0,209,3,
+169,0,4,0,39,0,206,3,4,0,16,0,4,0,91,0,0,0,209,3,
+170,0,8,0,39,0,206,3,4,0,29,0,2,0,250,2,2,0,16,3,
+7,0,134,3,7,0,135,3,72,0,111,3,0,0,209,3,171,0,1,0,
+39,0,206,3,172,0,6,0,7,0,8,0,7,0,9,0,7,0,10,0,
+7,0,11,0,7,0,212,3,7,0,213,3,173,0,15,0,173,0,0,0,
+173,0,1,0,2,0,16,0,2,0,162,0,4,0,91,0,27,0,37,0,
+72,0,111,3,7,0,250,2,7,0,16,3,7,0,214,3,7,0,215,3,
+7,0,216,3,7,0,217,3,7,0,112,3,7,0,218,3,};
+int DNAlen= sizeof(DNAstr);
diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c
new file mode 100644
index 00000000000..98a23472a9c
--- /dev/null
+++ b/source/blender/makesdna/intern/makesdna.c
@@ -0,0 +1,1121 @@
+/**
+ * $Id$
+ *
+ * ***** BEGIN GPL/BL DUAL 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. The Blender
+ * Foundation also sells licenses for use in proprietary software under
+ * the Blender License. See http://www.blender.org/BL/ for information
+ * about this.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ *
+ * Struct muncher for making SDNA
+ *
+ * Originally by Ton, some mods by Frank, and some cleaning and
+ * extension by Nzc.
+ *
+ * Makesdna creates a .c file with a long string of numbers that
+ * encode the Blender file format. It is fast, because it is basically
+ * a binary dump. There are some details to mind when reconstructing
+ * the file (endianness and byte-alignment).
+ *
+ * This little program scans all structs that need to be serialized,
+ * and determined the names and types of all members. It calculates
+ * how much memory (on disk or in ram) is needed to store that struct,
+ * and the offsets for reaching a particular one.
+ *
+ * There is a facility to get verbose output from sdna. Search for
+ * debugSDNA. This int can be set to 0 (no output) to some int. Higher
+ * numbers give more output.
+ * */
+
+#define DNA_VERSION_DATE "$Id$"
+
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+#include "MEM_guardedalloc.h"
+
+#include "DNA_sdna_types.h"
+
+#define SDNA_MAX_FILENAME_LENGTH 255
+
+
+/* Included the path relative from /source/blender/ here, so we can move */
+/* headers around with more freedom. */
+char *includefiles[] = {
+
+ // if you add files here, please add them at the end
+ // of makesdna.c (this file) as well
+
+ "DNA_listBase.h",
+ "DNA_vec_types.h",
+ "DNA_ID.h",
+ "DNA_ipo_types.h",
+ "DNA_key_types.h",
+ "DNA_scriptlink_types.h",
+ "DNA_text_types.h",
+ "DNA_packedFile_types.h",
+ "DNA_camera_types.h",
+ "DNA_image_types.h",
+ "DNA_texture_types.h",
+ "DNA_lamp_types.h",
+ "DNA_wave_types.h",
+ "DNA_material_types.h",
+ "DNA_vfont_types.h",
+ // if you add files here, please add them at the end
+ // of makesdna.c (this file) as well
+ "DNA_meta_types.h",
+ "DNA_curve_types.h",
+ "DNA_mesh_types.h",
+ "DNA_lattice_types.h",
+ "DNA_object_types.h",
+ "DNA_world_types.h",
+ "DNA_radio_types.h",
+ "DNA_scene_types.h",
+ "DNA_view3d_types.h",
+ "DNA_view2d_types.h",
+ "DNA_space_types.h",
+ "DNA_userdef_types.h",
+ "DNA_screen_types.h",
+ "DNA_sdna_types.h",
+ // if you add files here, please add them at the end
+ // of makesdna.c (this file) as well
+ "DNA_fileglobal_types.h",
+ "DNA_sequence_types.h",
+ "DNA_effect_types.h",
+ "DNA_ika_types.h",
+ "DNA_oops_types.h",
+ "DNA_property_types.h",
+ "DNA_sensor_types.h",
+ "DNA_controller_types.h",
+ "DNA_actuator_types.h",
+ "DNA_sound_types.h",
+ "DNA_group_types.h",
+ "DNA_armature_types.h",
+ "DNA_action_types.h",
+ "DNA_constraint_types.h",
+ "DNA_nla_types.h",
+ // if you add files here, please add them at the end
+ // of makesdna.c (this file) as well
+
+ // empty string to indicate end of includefiles
+ ""
+};
+
+int maxdata= 500000, maxnr= 50000;
+int nr_names=0;
+int nr_types=0;
+int nr_structs=0;
+char **names, *namedata; /* op adres names[a] staat string a */
+char **types, *typedata; /* op adres types[a] staat string a */
+short *typelens; /* op typelens[a] staat de lengte van type a */
+short *alphalens; /* contains sizes as they are calculated on the alpha */
+short **structs, *structdata; /* op sp= structs[a] staat eerste adres structdefinitie
+ sp[0] is typenummer
+ sp[1] is aantal elementen
+ sp[2] sp[3] is typenr, namenr (enz) */
+/*
+ * debugSDNA:
+ * - 0 = no output, except errors
+ * - 1 = detail actions
+ * - 2 = full trace, tell which names and types were found
+ * - 4 = full trace, plus all gritty details
+ */
+int debugSDNA = 0;
+int additional_slen_offset;
+
+/* ************************************************************************** */
+/* Functions */
+/* ************************************************************************** */
+
+/**
+ * Add type <str> to struct indexed by <len>, if it was not yet found.
+ */
+int add_type(char *str, int len);
+
+/**
+ * Add variable <str> to
+ */
+int add_name(char *str);
+
+/**
+ * Search whether this structure type was already found, and if not,
+ * add it.
+ */
+short *add_struct(int namecode);
+
+/**
+ * Remove comments from this buffer. Assumes that the buffer refers to
+ * ascii-code text.
+ */
+int preprocess_include(char *maindata, int len);
+
+/**
+ * Scan this file for serializable types.
+ */
+int convert_include(char *filename);
+
+/**
+ * Determine how many bytes are needed for an array.
+ */
+int arraysize(char *astr, int len);
+
+/**
+ * Determine how many bytes are needed for each struct.
+ */
+int calculate_structlens(void);
+
+/**
+ * Construct the DNA.c file
+ */
+void dna_write(FILE *file, void *pntr, int size);
+
+/**
+ * Report all structures found so far, and print their lenghts.
+ */
+void printStructLenghts(void);
+
+/**
+ *
+ */
+int make_structDNA(FILE *file);
+
+/**
+ *
+ */
+int main(int argc, char ** argv);
+
+
+
+/* ************************************************************************** */
+/* Implementation */
+/* ************************************************************************** */
+
+/* ************************* MAKEN DNA ********************** */
+
+int add_type(char *str, int len)
+{
+ int nr;
+ char *cp;
+
+ if(str[0]==0) return -1;
+
+ /* zoek typearray door */
+ for(nr=0; nr<nr_types; nr++) {
+ if(strcmp(str, types[nr])==0) {
+ if (len) {
+ typelens[nr]= len;
+ alphalens[nr] = len;
+ }
+ return nr;
+ }
+ }
+
+ /* nieuw type appenden */
+ if(nr_types==0) cp= typedata;
+ else {
+ cp= types[nr_types-1]+strlen(types[nr_types-1])+1;
+ }
+ strcpy(cp, str);
+ types[nr_types]= cp;
+ typelens[nr_types]= len;
+ alphalens[nr_types]= len;
+
+ if(nr_types>=maxnr) {
+ printf("too many types\n");
+ return nr_types-1;;
+ }
+ nr_types++;
+
+ return nr_types-1;
+}
+
+
+/**
+ *
+ * Because of the weird way of tokenizing, we have to 'cast' function
+ * pointers to ... (*f)(), whatever the original signature. In fact,
+ * we add name and type at the same time... There are two special
+ * cases, unfortunately. These are explicitly checked.
+ *
+ * */
+int add_name(char *str)
+{
+ int nr, i, j, k;
+ char *cp;
+ char buf[255]; /* stupid limit, change it :) */
+ char *name;
+
+ additional_slen_offset = 0;
+
+ if((str[0]==0) /* || (str[1]==0) */) return -1;
+
+ if (str[0] == '(' && str[1] == '*') {
+ if (debugSDNA > 3) printf("\t\t\t\t*** Function pointer found\n");
+ /* functionpointer: transform the type (sometimes) */
+ i = 0;
+ j = 0;
+
+ while (str[i] != ')') {
+ buf[i] = str[i];
+ i++;
+ }
+
+ /* Another number we need is the extra slen offset. This extra
+ * offset is the overshoot after a space. If there is no
+ * space, no overshoot should be calculated. */
+ j = i; /* j at first closing brace */
+
+ if (debugSDNA > 3) printf("first brace after offset %d\n", i);
+
+ j++; /* j beyond closing brace ? */
+ while ((str[j] != 0) && (str[j] != ')' )) {
+ if (debugSDNA > 3) printf("seen %c ( %d) \n", str[j], str[j]);
+ j++;
+ }
+ if (debugSDNA > 3) printf("seen %c ( %d) \n", str[j], str[j]);
+ if (debugSDNA > 3) printf("special after offset %d\n", j);
+
+ if (str[j] == 0 ) {
+ if (debugSDNA > 3) printf("offsetting for space\n");
+ /* get additional offset */
+ k = 0;
+ while (str[j] != ')') {
+ j++;
+ k++;
+ }
+ if (debugSDNA > 3) printf("extra offset %d\n", k);
+ additional_slen_offset = k;
+ } else if (str[j] == ')' ) {
+ if (debugSDNA > 3) printf("offsetting for brace\n");
+ ; /* don't get extra offset */
+ } else {
+ printf("Error during tokening function pointer argument list\n");
+ }
+
+ /*
+ * Put )(void) at the end? Maybe )(). Should check this with
+ * old sdna. Actually, sometimes )(), sometimes )(void...)
+ * Alas.. such is the nature of braindamage :(
+ *
+ * Sorted it out: always do )(), except for headdraw and
+ * windraw, part of ScrArea. This is important, because some
+ * linkers will treat different fp's differently when called
+ * !!! This has to do with interference in byte-alignment and
+ * the way args are pushed on the stack.
+ *
+ * */
+ buf[i] = 0;
+ if (debugSDNA > 3) printf("Name before chomping: %s\n", buf);
+ if ( (strncmp(buf,"(*headdraw", 10) == 0)
+ || (strncmp(buf,"(*windraw", 9) == 0) ) {
+ buf[i] = ')';
+ buf[i+1] = '(';
+ buf[i+2] = 'v';
+ buf[i+3] = 'o';
+ buf[i+4] = 'i';
+ buf[i+5] = 'd';
+ buf[i+6] = ')';
+ buf[i+7] = 0;
+ } else {
+ buf[i] = ')';
+ buf[i+1] = '(';
+ buf[i+2] = ')';
+ buf[i+3] = 0;
+ }
+ /* now precede with buf*/
+ if (debugSDNA > 3) printf("\t\t\t\t\tProposing fp name %s\n", buf);
+ name = buf;
+ } else {
+ /* normal field: old code */
+ name = str;
+ }
+
+ /* zoek name array door */
+ for(nr=0; nr<nr_names; nr++) {
+ if(strcmp(name, names[nr])==0) {
+ return nr;
+ }
+ }
+
+ /* nieuw type appenden */
+ if(nr_names==0) cp= namedata;
+ else {
+ cp= names[nr_names-1]+strlen(names[nr_names-1])+1;
+ }
+ strcpy(cp, name);
+ names[nr_names]= cp;
+
+ if(nr_names>=maxnr) {
+ printf("too many names\n");
+ return nr_names-1;
+ }
+ nr_names++;
+
+ return nr_names-1;
+}
+
+short *add_struct(int namecode)
+{
+ int len;
+ short *sp;
+
+ if(nr_structs==0) {
+ structs[0]= structdata;
+ }
+ else {
+ sp= structs[nr_structs-1];
+ len= sp[1];
+ structs[nr_structs]= sp+ 2*len+2;
+ }
+
+ sp= structs[nr_structs];
+ sp[0]= namecode;
+
+ if(nr_structs>=maxnr) {
+ printf("too many structs\n");
+ return sp;
+ }
+ nr_structs++;
+
+ return sp;
+}
+
+int preprocess_include(char *maindata, int len)
+{
+ int a, newlen, comment = 0;
+ char *cp, *temp, *md;
+
+ temp= MEM_mallocN(len, "preprocess_include");
+ memcpy(temp, maindata, len);
+
+ // remove all c++ comments
+ /* alle enters/tabs/etc vervangen door spaties */
+ cp= temp;
+ a= len;
+ comment = 0;
+ while(a--) {
+ if(cp[0]=='/' && cp[1]=='/') {
+ comment = 1;
+ } else if (*cp<32) {
+ comment = 0;
+ }
+ if (comment || *cp<32 || *cp>128 ) *cp= 32;
+ cp++;
+ }
+
+
+ /* data uit temp naar maindata kopieeren, verwijder commentaar en dubbele spaties */
+ cp= temp;
+ md= maindata;
+ newlen= 0;
+ comment= 0;
+ a= len;
+ while(a--) {
+
+ if(cp[0]=='/' && cp[1]=='*') {
+ comment= 1;
+ cp[0]=cp[1]= 32;
+ }
+ if(cp[0]=='*' && cp[1]=='/') {
+ comment= 0;
+ cp[0]=cp[1]= 32;
+ }
+
+ /* niet kopieeren als: */
+ if(comment);
+ else if( cp[0]==' ' && cp[1]==' ' );
+ else if( cp[-1]=='*' && cp[0]==' ' ); /* pointers met spatie */
+ else {
+ md[0]= cp[0];
+ md++;
+ newlen++;
+ }
+ cp++;
+ }
+
+ MEM_freeN(temp);
+ return newlen;
+}
+
+void *read_file_data(char *filename, int *len_r)
+{
+#ifdef WIN32
+ FILE *fp= fopen(filename, "rb");
+#else
+ FILE *fp= fopen(filename, "r");
+#endif
+ void *data;
+
+ if (!fp) {
+ *len_r= -1;
+ return NULL;
+ }
+
+ fseek(fp, 0L, SEEK_END);
+ *len_r= ftell(fp);
+ fseek(fp, 0L, SEEK_SET);
+
+ data= MEM_mallocN(*len_r, "read_file_data");
+ if (!data) {
+ *len_r= -1;
+ return NULL;
+ }
+
+ if (fread(data, *len_r, 1, fp)!=1) {
+ *len_r= -1;
+ MEM_freeN(data);
+ return NULL;
+ }
+
+ return data;
+}
+
+int convert_include(char *filename)
+{
+ /* lees includefile, sla structen over die op regel ervoor '#' hebben.
+ sla alle data op in tijdelijke arrays.
+ */
+ int filelen, count, overslaan, slen, type, name, strct;
+ short *structpoin, *sp;
+ char *maindata, *mainend, *md, *md1;
+
+ md= maindata= read_file_data(filename, &filelen);
+ if (filelen==-1) {
+ printf("Can't read file %s\n", filename);
+ return 1;
+ }
+
+ filelen= preprocess_include(maindata, filelen);
+ mainend= maindata+filelen-1;
+
+ /* we zoeken naar '{' en dan terug naar 'struct' */
+ count= 0;
+ overslaan= 0;
+ while(count<filelen) {
+
+ /* code voor struct overslaan: twee hekjes. (voor spatie zorgt preprocess) */
+ if(md[0]=='#' && md[1]==' ' && md[2]=='#') {
+ overslaan= 1;
+ }
+
+ if(md[0]=='{') {
+ md[0]= 0;
+ if(overslaan) {
+ overslaan= 0;
+ }
+ else {
+ if(md[-1]==' ') md[-1]= 0;
+ md1= md-2;
+ while( *md1!=32) md1--; /* naar begin woord */
+ md1++;
+
+ /* structnaam te pakken, als... */
+ if( strncmp(md1-7, "struct", 6)==0 ) {
+
+
+ strct= add_type(md1, 0);
+ structpoin= add_struct(strct);
+ sp= structpoin+2;
+
+ if (debugSDNA > 1) printf("\t|\t|-- detected struct %s\n", types[strct]);
+
+ /* eerst overal keurige strings van maken */
+ md1= md+1;
+ while(*md1 != '}') {
+ if( ((long)md1) > ((long)mainend) ) break;
+
+ if(*md1==',' || *md1==' ') *md1= 0;
+ md1++;
+ }
+
+ /* types en namen lezen tot eerste karakter niet '}' */
+ md1= md+1;
+ while( *md1 != '}' ) {
+ if( ((long)md1) > ((long)mainend) ) break;
+
+ /* als er 'struct' of 'unsigned' staat, overslaan */
+ if(*md1) {
+ if( strncmp(md1, "struct", 6)==0 ) md1+= 7;
+ if( strncmp(md1, "unsigned", 6)==0 ) md1+= 9;
+
+ /* type te pakken! */
+ type= add_type(md1, 0);
+
+ if (debugSDNA > 1) printf("\t|\t|\tfound type %s (", md1);
+
+ md1+= strlen(md1);
+
+
+ /* doorlezen tot ';' */
+ while( *md1 != ';' ) {
+ if( ((long)md1) > ((long)mainend) ) break;
+
+ if(*md1) {
+ /* Name te pakken. slen needs
+ * correction for function
+ * pointers! */
+ slen= strlen(md1);
+ if( md1[slen-1]==';' ) {
+ md1[slen-1]= 0;
+
+
+ name= add_name(md1);
+ slen += additional_slen_offset;
+ sp[0]= type;
+ sp[1]= name;
+
+ if ((debugSDNA>1) && (names[name] != 0 )) printf("%s |", names[name]);
+
+ structpoin[1]++;
+ sp+= 2;
+
+ md1+= slen;
+ break;
+ }
+
+
+ name= add_name(md1);
+ slen += additional_slen_offset;
+
+ sp[0]= type;
+ sp[1]= name;
+ if ((debugSDNA > 1) && (names[name] != 0 )) printf("%s ||", names[name]);
+
+ structpoin[1]++;
+ sp+= 2;
+
+ md1+= slen;
+ }
+ md1++;
+ }
+
+ if (debugSDNA > 1) printf(")\n");
+
+ }
+ md1++;
+ }
+ }
+ }
+ }
+ count++;
+ md++;
+ }
+
+ MEM_freeN(maindata);
+
+ return 0;
+}
+
+int arraysize(char *astr, int len)
+{
+ int a, mul=1;
+ char str[100], *cp=0;
+
+ memcpy(str, astr, len+1);
+
+ for(a=0; a<len; a++) {
+ if( str[a]== '[' ) {
+ cp= &(str[a+1]);
+ }
+ else if( str[a]==']' && cp) {
+ str[a]= 0;
+ mul*= atoi(cp);
+ }
+ }
+
+ return mul;
+}
+
+int calculate_structlens(void)
+{
+ int a, b, len, alphalen, unknown= nr_structs, lastunknown, structtype, type, mul, namelen;
+ short *sp, *structpoin;
+ char *cp;
+ int has_pointer, dna_error = 0;
+
+ while(unknown) {
+ lastunknown= unknown;
+ unknown= 0;
+
+ /* loop alle structen af... */
+ for(a=0; a<nr_structs; a++) {
+ structpoin= structs[a];
+ structtype= structpoin[0];
+
+ /* als lengte nog niet bekend */
+ if(typelens[structtype]==0) {
+
+ sp= structpoin+2;
+ len= 0;
+ alphalen = 0;
+ has_pointer = 0;
+
+ /* loop alle elementen in struct af */
+ for(b=0; b<structpoin[1]; b++, sp+=2) {
+ type= sp[0];
+ cp= names[sp[1]];
+
+ namelen= strlen(cp);
+ /* is het een pointer of functiepointer? */
+ if(cp[0]=='*' || cp[1]=='*') {
+ has_pointer = 1;
+ /* heeft de naam een extra lengte? (array) */
+ mul= 1;
+ if( cp[namelen-1]==']') mul= arraysize(cp, namelen);
+
+ /* 4-8 aligned/ */
+ if(sizeof(void *) == 4) {
+ if (len % 4) {
+ printf("Align pointer error in struct: %s %s\n", types[structtype], cp);
+ dna_error = 1;
+ }
+ } else {
+ if (len % 8) {
+ printf("Align pointer error in struct: %s %s\n", types[structtype], cp);
+ dna_error = 1;
+ }
+ }
+
+ if (alphalen % 8) {
+ printf("Align pointer error in struct: %s %s\n", types[structtype],cp);
+ dna_error = 1;
+ }
+
+ len += sizeof(void *) * mul;
+ alphalen += 8 * mul;
+
+ } else if( typelens[type] ) {
+ /* heeft de naam een extra lengte? (array) */
+ mul= 1;
+ if( cp[namelen-1]==']') mul= arraysize(cp, namelen);
+
+ /* 2-4 aligned/ */
+ if(typelens[type]>3 && (len % 4) ) {
+ printf("Align 4 error in struct: %s %s\n", types[structtype], cp);
+ }
+ else if(typelens[type]==2 && (len % 2) ) {
+ printf("Align 2 error in struct: %s %s\n", types[structtype], cp);
+ }
+
+ len += mul*typelens[type];
+ alphalen += mul * alphalens[type];
+
+ } else {
+ len= 0;
+ alphalen = 0;
+ break;
+ }
+ }
+
+ if (len==0) {
+ unknown++;
+ } else {
+ typelens[structtype]= len;
+ alphalens[structtype]= alphalen;
+ // two ways to detect if a struct contains a pointer:
+ // has_pointer is set or alphalen != len
+ if (has_pointer || alphalen != len) {
+ if (alphalen % 8) {
+ printf("Sizeerror in struct: %s\n", types[structtype]);
+ dna_error = 1;
+ }
+ }
+ }
+ }
+ }
+
+ if(unknown==lastunknown) break;
+ }
+
+ if(unknown) {
+ printf("ERROR: still %d structs unknown\n", unknown);
+
+ if (debugSDNA) {
+ printf("*** Known structs : \n");
+
+ for(a=0; a<nr_structs; a++) {
+ structpoin= structs[a];
+ structtype= structpoin[0];
+
+ /* lengte nog niet bekend */
+ if(typelens[structtype]!=0) {
+ printf(" %s\n", types[structtype]);
+ }
+ }
+ }
+
+
+ printf("*** Unknown structs : \n");
+
+ for(a=0; a<nr_structs; a++) {
+ structpoin= structs[a];
+ structtype= structpoin[0];
+
+ /* lengte nog niet bekend */
+ if(typelens[structtype]==0) {
+ printf(" %s\n", types[structtype]);
+ }
+ }
+ }
+
+ return(dna_error);
+}
+
+#define MAX_DNA_LINE_LENGTH 20
+
+void dna_write(FILE *file, void *pntr, int size)
+{
+ static int linelength = 0;
+ int i;
+ char *data;
+
+ data = (char *) pntr;
+
+ for (i = 0 ; i < size ; i++)
+ {
+ fprintf(file, "%d,", data[i]);
+ linelength++;
+ if (linelength >= MAX_DNA_LINE_LENGTH) {
+ fprintf(file, "\n");
+ linelength = 0;
+ }
+ }
+}
+
+void printStructLenghts(void)
+{
+ int a, unknown= nr_structs, lastunknown, structtype;
+ short *structpoin;
+ printf("\n\n*** All detected structs:\n");
+
+ while(unknown) {
+ lastunknown= unknown;
+ unknown= 0;
+
+ /* loop alle structen af... */
+ for(a=0; a<nr_structs; a++) {
+ structpoin= structs[a];
+ structtype= structpoin[0];
+ printf("\t%s\t:%d\n", types[structtype], typelens[structtype]);
+ }
+ }
+
+ printf("*** End of list\n");
+
+}
+
+
+int make_structDNA(FILE *file)
+{
+ int len, i;
+ short *sp;
+ /* str contains filenames. Since we now include paths, I stretched */
+ /* it a bit. Hope this is enough :) -nzc- */
+ char str[SDNA_MAX_FILENAME_LENGTH], *cp;
+ int firststruct;
+
+ if (debugSDNA > -1) {
+ fflush(stdout);
+ printf("Running makesdna at debug level %d\n", debugSDNA);
+ printf("\tProgram version: %s\n", DNA_VERSION_DATE);
+ }
+
+ /* de allerlangst bekende struct is 50k, 100k is ruimte genoeg! */
+ namedata= MEM_callocN(maxdata, "namedata");
+ typedata= MEM_callocN(maxdata, "typedata");
+ structdata= MEM_callocN(maxdata, "structdata");
+
+ /* maximaal 5000 variablen, vast voldoende? */
+ names= MEM_callocN(sizeof(char *)*maxnr, "names");
+ types= MEM_callocN(sizeof(char *)*maxnr, "types");
+ typelens= MEM_callocN(sizeof(short)*maxnr, "typelens");
+ alphalens= MEM_callocN(sizeof(short)*maxnr, "alphalens");
+ structs= MEM_callocN(sizeof(short)*maxnr, "structs");
+
+ /* inserten alle bekende types */
+ /* let op: uint komt niet voor! gebruik in structen unsigned int */
+ add_type("char", 1); /* 0 */
+ add_type("uchar", 1); /* 1 */
+ add_type("short", 2); /* 2 */
+ add_type("ushort", 2); /* 3 */
+ add_type("int", 4); /* 4 */
+ add_type("long", 4); /* 5 */
+ add_type("ulong", 4); /* 6 */
+ add_type("float", 4); /* 7 */
+ add_type("double", 8); /* 8 */
+ add_type("void", 0); /* 9 */
+
+ // the defines above shouldn't be output in the padding file...
+ firststruct = nr_types;
+
+#define BASE_HEADER "../"
+
+ /* add all include files defined in the global array */
+ /* Since the internal file+path name buffer has limited length, I do a */
+ /* little test first... */
+ /* Mind the breaking condition here! */
+ if (debugSDNA) printf("\tStart of header scan:\n");
+ for (i = 0; strlen(includefiles[i]); i++) {
+ if (debugSDNA) printf("\t|-- Converting %s%s\n", BASE_HEADER, includefiles[i]);
+ if (strlen(includefiles[i]) > SDNA_MAX_FILENAME_LENGTH) {
+ /* this would cause coredumps*/
+ printf("*** \tError in makesdna: the specified filenames is too long "
+ "for parsing.\n\tFile: %s%s\n", BASE_HEADER, includefiles[i]);
+ } else {
+ sprintf(str, "%s%s", BASE_HEADER, includefiles[i]);
+ if (convert_include(str)) {
+ return (1);
+ }
+ }
+ }
+ if (debugSDNA) printf("\tFinished scanning %d headers.\n", i);
+
+ if (calculate_structlens()) {
+ // error
+ return(1);
+ }
+
+ /* DIT DEEL VOOR DEBUG */
+ if (debugSDNA > 1)
+ {
+ int a,b;
+/* short *elem; */
+ short num_types;
+
+ printf("nr_names %d nr_types %d nr_structs %d\n", nr_names, nr_types, nr_structs);
+ for(a=0; a<nr_names; a++) {
+ printf(" %s \n", names[a]);
+ }
+ printf("\n");
+
+ sp= typelens;
+ for(a=0; a<nr_types; a++, sp++) {
+ printf(" %s %d\n", types[a], *sp);
+ }
+ printf("\n");
+
+ for(a=0; a<nr_structs; a++) {
+ sp= structs[a];
+ printf(" struct %s elems: %d size: %d\n", types[sp[0]], sp[1],typelens[sp[0]]);
+ num_types = sp[1];
+ sp+= 2;
+ /* ? num_types was elem? */
+ for(b=0; b< num_types; b++, sp+= 2) {
+ printf(" %s %s\n", types[sp[0]], names[sp[1]]);
+ }
+ }
+ }
+
+ /* file schrijven */
+
+ if (debugSDNA > -1) printf("Writing file ... ");
+
+ if(nr_names==0 || nr_structs==0);
+ else {
+ strcpy(str, "SDNA");
+ dna_write(file, str, 4);
+
+ /* SCHRIJF NAMEN */
+ strcpy(str, "NAME");
+ dna_write(file, str, 4);
+ len= nr_names;
+ dna_write(file, &len, 4);
+
+ /* lengte berekenen datablok met strings */
+ cp= names[nr_names-1];
+ cp+= strlen(names[nr_names-1]) + 1; /* +1: nul-terminator */
+ len= (long)cp - (long)(names[0]);
+ len= (len+3) & ~3;
+ dna_write(file, names[0], len);
+
+ /* SCHRIJF TYPES */
+ strcpy(str, "TYPE");
+ dna_write(file, str, 4);
+ len= nr_types;
+ dna_write(file, &len, 4);
+
+ /* lengte berekenen datablok */
+ cp= types[nr_types-1];
+ cp+= strlen(types[nr_types-1]) + 1; /* +1: nul-terminator */
+ len= (long)cp - (long)(types[0]);
+ len= (len+3) & ~3;
+
+ dna_write(file, types[0], len);
+
+ /* SCHRIJF TYPELENGTES */
+ strcpy(str, "TLEN");
+ dna_write(file, str, 4);
+
+ len= 2*nr_types;
+ if(nr_types & 1) len+= 2;
+ dna_write(file, typelens, len);
+
+ /* SCHRIJF STRUCTEN */
+ strcpy(str, "STRC");
+ dna_write(file, str, 4);
+ len= nr_structs;
+ dna_write(file, &len, 4);
+
+ /* lengte berekenen datablok */
+ sp= structs[nr_structs-1];
+ sp+= 2+ 2*( sp[1] );
+ len= (long)sp - (long)(structs[0]);
+ len= (len+3) & ~3;
+
+ dna_write(file, structs[0], len);
+
+ /* dna padding test */
+
+ if (0) {
+ FILE *fp;
+ int a;
+
+ fp= fopen("padding.c", "w");
+ if(fp==NULL);
+ else {
+
+ // add all include files defined in the global array
+ for (i = 0; strlen(includefiles[i]); i++) {
+ fprintf(fp, "#include \"%s\"\n", includefiles[i]);
+ }
+
+ fprintf(fp, "main(){\n");
+ sp = typelens;
+ sp += firststruct;
+ for(a=firststruct; a<nr_types; a++, sp++) {
+ fprintf(fp, "\tprintf(\" ");
+ fprintf(fp, "%%d %s %d ", types[a], *sp);
+ fprintf(fp, "\\n\", sizeof(struct %s) - %d);\n", types[a], *sp);
+ }
+ fprintf(fp, "}\n");
+ fclose(fp);
+ }
+ }
+ /* end end padding test */
+ }
+
+
+ MEM_freeN(namedata);
+ MEM_freeN(typedata);
+ MEM_freeN(structdata);
+ MEM_freeN(names);
+ MEM_freeN(types);
+ MEM_freeN(typelens);
+ MEM_freeN(structs);
+
+ if (debugSDNA > -1) printf("done.\n");
+
+ return(0);
+}
+
+/* ************************* END MAKEN DNA ********************** */
+
+void make_bad_file(char *file)
+{
+ FILE *fp= fopen(file, "w");
+ fprintf(fp, "NO NO NO! YOUR STUPID STUPID STUPID!\n");
+ fclose(fp);
+}
+
+int main(int argc, char ** argv)
+{
+ FILE *file;
+ int return_status = 0;
+
+ if (argc != 2) {
+ printf("Usage: %s outfile.c\n", argv[0]);
+ return_status = 1;
+ } else {
+ file = fopen(argv[1], "w");
+ if (!file) {
+ printf ("Unable to open file: %s\n", argv[1]);
+ return_status = 1;
+ } else {
+ fprintf (file, "unsigned char DNAstr[]= {\n");
+ if (make_structDNA(file)) {
+ // error
+ fclose(file);
+ make_bad_file(argv[1]);
+ return_status = 1;
+ } else {
+ fprintf(file, "};\n");
+ fprintf(file, "int DNAlen= sizeof(DNAstr);\n");
+
+ fclose(file);
+ }
+ }
+ }
+
+
+ return(return_status);
+}
+
+// include files for automatic dependancies
+#include "DNA_listBase.h"
+#include "DNA_vec_types.h"
+#include "DNA_ID.h"
+#include "DNA_ipo_types.h"
+#include "DNA_key_types.h"
+#include "DNA_scriptlink_types.h"
+#include "DNA_text_types.h"
+#include "DNA_packedFile_types.h"
+#include "DNA_camera_types.h"
+#include "DNA_image_types.h"
+#include "DNA_texture_types.h"
+#include "DNA_lamp_types.h"
+#include "DNA_wave_types.h"
+#include "DNA_material_types.h"
+#include "DNA_vfont_types.h"
+#include "DNA_meta_types.h"
+#include "DNA_curve_types.h"
+#include "DNA_mesh_types.h"
+#include "DNA_lattice_types.h"
+#include "DNA_object_types.h"
+#include "DNA_world_types.h"
+#include "DNA_radio_types.h"
+#include "DNA_scene_types.h"
+#include "DNA_view3d_types.h"
+#include "DNA_view2d_types.h"
+#include "DNA_space_types.h"
+#include "DNA_userdef_types.h"
+#include "DNA_screen_types.h"
+#include "DNA_sdna_types.h"
+#include "DNA_fileglobal_types.h"
+#include "DNA_sequence_types.h"
+#include "DNA_effect_types.h"
+#include "DNA_ika_types.h"
+#include "DNA_oops_types.h"
+#include "DNA_property_types.h"
+#include "DNA_sensor_types.h"
+#include "DNA_controller_types.h"
+#include "DNA_actuator_types.h"
+#include "DNA_sound_types.h"
+#include "DNA_group_types.h"
+#include "DNA_armature_types.h"
+#include "DNA_action_types.h"
+#include "DNA_constraint_types.h"
+#include "DNA_nla_types.h"
+/* end of list */