ScummVM API documentation
instruction.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 // Based on Phantasma code by Thomas Harte (2013),
23 // available at https://github.com/TomHarte/Phantasma/ (MIT)
24 
25 #ifndef FREESCAPE_INSTRUCTION_H
26 #define FREESCAPE_INSTRUCTION_H
27 
28 #include "common/array.h"
29 #include "freescape/language/token.h"
30 
31 namespace Freescape {
32 
33 class FCLInstruction;
34 typedef Common::Array<FCLInstruction> FCLInstructionVector;
35 
37 public:
39  FCLInstruction(Token::Type type);
40  void setSource(int32 source);
41  void setAdditional(int32 additional);
42  void setDestination(int32 destination);
43 
44  Token::Type getType();
45  void setBranches(FCLInstructionVector *thenBranch, FCLInstructionVector *elseBranch);
46 
47  FCLInstruction duplicate();
48 
49  int32 _source;
50  int32 _additional;
51  int32 _destination;
52 
53  FCLInstructionVector *_thenInstructions;
54  FCLInstructionVector *_elseInstructions;
55 
56 private:
57  enum Token::Type _type;
58 };
59 
60 } // End of namespace Freescape
61 
62 #endif // FREESCAPE_INSTRUCTION_H
Definition: area.h:36
Definition: instruction.h:36