25 #ifndef FREESCAPE_INSTRUCTION_H 26 #define FREESCAPE_INSTRUCTION_H 28 #include "common/array.h" 29 #include "common/str.h" 30 #include "freescape/language/token.h" 35 kConditionalShot = 1 << 0,
36 kConditionalTimeout = 1 << 1,
37 kConditionalCollided = 1 << 2,
38 kConditionalActivated = 1 << 3,
39 kConditionalSensed = 1 << 4,
40 kConditionalFallen = 1 << 5,
41 kConditionalCrushed = 1 << 6,
47 FCLInstructionVector *duplicateCondition(
const FCLInstructionVector *condition);
53 void setSource(int32 source, Token::Type type = Token::CONSTANT);
54 void setAdditional(int32 additional, Token::Type type = Token::CONSTANT);
55 void setDestination(int32 destination, Token::Type type = Token::CONSTANT);
57 Token::Type getType()
const;
59 void setBranches(FCLInstructionVector *thenBranch, FCLInstructionVector *elseBranch);
69 Token::Type _sourceType;
70 Token::Type _additionalType;
71 Token::Type _destinationType;
74 FCLInstructionVector *_thenInstructions;
75 FCLInstructionVector *_elseInstructions;
83 #endif // FREESCAPE_INSTRUCTION_H
Definition: instruction.h:49