|
Blender
V2.59
|
00001 /* 00002 * $Id: DNA_controller_types.h 34941 2011-02-17 20:48:12Z jesterking $ 00003 * 00004 * ***** BEGIN GPL LICENSE BLOCK ***** 00005 * 00006 * This program is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU General Public License 00008 * as published by the Free Software Foundation; either version 2 00009 * of the License, or (at your option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with this program; if not, write to the Free Software Foundation, 00018 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00019 * 00020 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. 00021 * All rights reserved. 00022 * 00023 * The Original Code is: all of this file. 00024 * 00025 * Contributor(s): none yet. 00026 * 00027 * ***** END GPL LICENSE BLOCK ***** 00028 */ 00029 #ifndef DNA_CONTROLLER_TYPES_H 00030 #define DNA_CONTROLLER_TYPES_H 00031 00036 struct bActuator; 00037 struct Text; 00038 struct bSensor; 00039 00040 /* ****************** CONTROLLERS ********************* */ 00041 00042 typedef struct bExpressionCont { 00043 char str[128]; 00044 } bExpressionCont; 00045 00046 typedef struct bPythonCont { 00047 struct Text *text; 00048 char module[64]; 00049 int mode; 00050 int flag; /* only used for debug now */ 00051 } bPythonCont; 00052 00053 typedef struct bController { 00054 struct bController *next, *prev, *mynew; 00055 short type, flag, inputs, totlinks; 00056 short otype, totslinks, pad2, pad3; 00057 00058 char name[32]; 00059 void *data; 00060 00061 struct bActuator **links; 00062 00063 struct bSensor **slinks; 00064 short val, valo; 00065 unsigned int state_mask; 00066 00067 } bController; 00068 00069 /* controller->type */ 00070 #define CONT_LOGIC_AND 0 00071 #define CONT_LOGIC_OR 1 00072 #define CONT_EXPRESSION 2 00073 #define CONT_PYTHON 3 00074 #define CONT_LOGIC_NAND 4 00075 #define CONT_LOGIC_NOR 5 00076 #define CONT_LOGIC_XOR 6 00077 #define CONT_LOGIC_XNOR 7 00078 00079 /* controller->flag */ 00080 #define CONT_SHOW 1 00081 #define CONT_DEL 2 00082 #define CONT_NEW 4 00083 #define CONT_MASK 8 00084 #define CONT_PRIO 16 00085 00086 /* pyctrl->flag */ 00087 #define CONT_PY_DEBUG 1 00088 00089 /* pyctrl->mode */ 00090 #define CONT_PY_SCRIPT 0 00091 #define CONT_PY_MODULE 1 00092 00093 #endif 00094