summaryrefslogtreecommitdiff
path: root/BlockCondition.h
diff options
context:
space:
mode:
authorJapa2010-04-09 14:12:29 +0000
committerJapa2010-04-09 14:12:29 +0000
commit81aefc8e03ff3f647494012e18bcdc8f33f4de42 (patch)
tree4b825dc642cb6eb9a060e54bf8d69288fbee4904 /BlockCondition.h
parentc3d0b7d6778af46299901d959d589d6599afa21c (diff)
downloadstonesense-81aefc8e03ff3f647494012e18bcdc8f33f4de42.tar.gz
stonesense-81aefc8e03ff3f647494012e18bcdc8f33f4de42.tar.bz2
stonesense-81aefc8e03ff3f647494012e18bcdc8f33f4de42.tar.xz
There is no trunk
it is not the code that compiles, it is you.
Diffstat (limited to 'BlockCondition.h')
-rw-r--r--BlockCondition.h208
1 files changed, 0 insertions, 208 deletions
diff --git a/BlockCondition.h b/BlockCondition.h
deleted file mode 100644
index 8c7568d..0000000
--- a/BlockCondition.h
+++ /dev/null
@@ -1,208 +0,0 @@
-#pragma once
-#include "common.h"
-#include "Block.h"
-
-enum BlockConditionTypes{
- Cond_MaterialType,
- Cond_MaterialIndex,
- Cond_NeighbourWall,
- Cond_NeighbourSameBuilding,
- Cond_PositionIndex,
- Cond_NeighbourIdentical,
- Cond_BuildingOcc,
- Cond_NeighbourSameIndex,
-
-};
-
-// abstract base class
-class BlockCondition
-{
-public:
- BlockCondition(){};
- virtual ~BlockCondition(void){};
-
- virtual bool Matches(Block* b) = 0;
-};
-
-class ConditionalNode
-{
- public:
- ConditionalNode(){};
- virtual ~ConditionalNode(void){};
-
- //false on failure
- virtual bool addCondition(BlockCondition* cond) = 0;
-};
-
-//TODO: sort these (alpha order?)
-
-class NeighbourWallCondition : public BlockCondition
-{
- public:
- NeighbourWallCondition(const char* strValue);
- ~NeighbourWallCondition(void){};
-
- int value;
- bool Matches(Block* b);
-};
-
-
-class PositionIndexCondition : public BlockCondition
-{
- public:
- PositionIndexCondition(const char* strValue);
- ~PositionIndexCondition(void){};
-
- int value;
- bool Matches(Block* b);
-};
-
-
-class MaterialTypeCondition : public BlockCondition
-{
- public:
- MaterialTypeCondition(const char* strValue, const char* strSubtype);
- ~MaterialTypeCondition(void){};
-
- int value;
- int subtype;
- bool Matches(Block* b);
-};
-
-class AnimationFrameCondition : public BlockCondition
-{
- public:
- AnimationFrameCondition(const char* strValue);
- ~AnimationFrameCondition(void){};
-
- int value;
- bool Matches(Block* b);
-};
-
-
-class BuildingOccupancyCondition : public BlockCondition
-{
- public:
- BuildingOccupancyCondition(const char* strValue);
- ~BuildingOccupancyCondition(void){};
-
- int value;
- bool Matches(Block* b);
-};
-
-
-class NeighbourSameBuildingCondition : public BlockCondition
-{
- public:
- NeighbourSameBuildingCondition(const char* strValue);
- ~NeighbourSameBuildingCondition(void){};
-
- int value;
- bool Matches(Block* b);
-};
-
-
-class NeighbourIdenticalCondition : public BlockCondition
-{
- public:
- NeighbourIdenticalCondition(const char* strValue);
- ~NeighbourIdenticalCondition(void){};
-
- int value;
- bool Matches(Block* b);
-};
-
-
-class NeighbourOfTypeCondition : public BlockCondition
-{
- public:
- NeighbourOfTypeCondition(const char* strDir, const char* strValue);
- ~NeighbourOfTypeCondition(void){};
-
- int value;
- int direction;
- bool Matches(Block* b);
-};
-
-class NeighbourSameTypeCondition : public BlockCondition
-{
- public:
- NeighbourSameTypeCondition(const char* strDir);
- ~NeighbourSameTypeCondition(void){};
-
- int direction;
- bool Matches(Block* b);
-};
-
-class AndConditionalNode : public BlockCondition, public ConditionalNode
-{
- public:
- AndConditionalNode(){};
- ~AndConditionalNode(void);
-
- vector<BlockCondition*> children;
-
- bool Matches(Block* b);
- bool addCondition(BlockCondition* cond);
-};
-
-class OrConditionalNode : public BlockCondition, public ConditionalNode
-{
- public:
- OrConditionalNode(){};
- ~OrConditionalNode(void);
-
- vector<BlockCondition*> children;
-
- bool Matches(Block* b);
- bool addCondition(BlockCondition* cond);
-};
-
-class AlwaysCondition : public BlockCondition
-{
- public:
- AlwaysCondition(){};
- ~AlwaysCondition(void){};
-
- bool Matches(Block* b);
-};
-
-class NeverCondition : public BlockCondition
-{
- public:
- NeverCondition(){};
- ~NeverCondition(void){};
-
- bool Matches(Block* b);
-};
-
-class NotConditionalNode : public BlockCondition, public ConditionalNode
-{
- public:
- NotConditionalNode();
- ~NotConditionalNode(void);
- BlockCondition* childcond;
-
- bool Matches(Block* b);
- bool addCondition(BlockCondition* cond);
-};
-
-class HaveFloorCondition : public BlockCondition
-{
- public:
- HaveFloorCondition(){};
- ~HaveFloorCondition(void){};
-
- bool Matches(Block* b);
-};
-
-class FluidBelowCondition : public BlockCondition
-{
- public:
- FluidBelowCondition(const char* strValue);
- ~FluidBelowCondition(void){};
-
- int value;
- bool Matches(Block* b);
-};
-