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:
authorBenoit Bolsee <benoit.bolsee@online.be>2008-06-24 00:41:18 +0400
committerBenoit Bolsee <benoit.bolsee@online.be>2008-06-24 00:41:18 +0400
commit02132de7aadee611c8641f01fa44efdf43f54cc4 (patch)
treece6314b7c61fe1758383876b6cc2f9f8c5a2b6b0 /source/blender/src
parent10c57fd86e0d42fe5e9f1928598e4642aa778e89 (diff)
BGE patch: Add NAND, NOR, XOR, XNOR controllers.
NAND controller is an inverted AND controller: the output is 1 if any of the input is 0. NOR controller is an inverted OR controller: the output is 0 if any of the input is 1. XOR controller is an exclusive OR: the output is 1 if and only if one input is 1 and all the other inputs are 0. XNOR controller is an inverted XOR: the output is 0 if and only if one input is 0 and all the other inputs are 0. The NAND, NORT and XNOR controllers are very usefull to create complementary outputs to start and stop actuators synchronously. MSCV project files updated.
Diffstat (limited to 'source/blender/src')
-rw-r--r--source/blender/src/buttons_logic.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/source/blender/src/buttons_logic.c b/source/blender/src/buttons_logic.c
index e7933c10162..bfa451428c3 100644
--- a/source/blender/src/buttons_logic.c
+++ b/source/blender/src/buttons_logic.c
@@ -740,6 +740,14 @@ static char *controller_name(int type)
return "AND";
case CONT_LOGIC_OR:
return "OR";
+ case CONT_LOGIC_NAND:
+ return "NAND";
+ case CONT_LOGIC_NOR:
+ return "NOR";
+ case CONT_LOGIC_XOR:
+ return "XOR";
+ case CONT_LOGIC_XNOR:
+ return "XNOR";
case CONT_EXPRESSION:
return "Expression";
case CONT_PYTHON:
@@ -750,7 +758,7 @@ static char *controller_name(int type)
static char *controller_pup(void)
{
- return "Controllers %t|AND %x0|OR %x1|Expression %x2|Python %x3";
+ return "Controllers %t|AND %x0|OR %x1|XOR %x6|NAND %x4|NOR %x5|XNOR %x7|Expression %x2|Python %x3";
}
static char *actuator_name(int type)
@@ -1066,6 +1074,10 @@ static void draw_default_sensor_header(bSensor *sens,
(short)(x + 10 + 0.85 * (w-20)), (short)(y - 19), (short)(0.15 * (w-20)), 19,
&sens->invert, 0.0, 0.0, 0, 0,
"Invert the level (output) of this sensor");
+ uiDefButS(block, TOG, 1, "Lvl",
+ (short)(x + 10 + 0.70 * (w-20)), (short)(y - 19), (short)(0.15 * (w-20)), 19,
+ &sens->level, 0.0, 0.0, 0, 0,
+ "Level detector versus edge detector (only applicable in case of logic state transition)");
}
static short draw_sensorbuttons(bSensor *sens, uiBlock *block, short xco, short yco, short width,char* objectname)