]> git.localhorst.tv Git - l2e.git/blob - src/common/Script.h
removed useless comments
[l2e.git] / src / common / Script.h
1 #ifndef COMMON_SCRIPT_H_
2 #define COMMON_SCRIPT_H_
3
4 #include <SDL.h>
5
6 namespace common {
7
8 class Script {
9
10 public:
11         Script();
12         ~Script();
13
14         enum Command {
15                 COMMAND_NOOP,
16                 COMMAND_MOVE,
17                 COMMAND_ADD,
18                 COMMAND_MOD,
19                 COMMAND_RAND,
20                 COMMAND_CMP,
21                 COMMAND_JMP,
22                 COMMAND_JEQ,
23                 COMMAND_JNE,
24                 COMMAND_JL,
25                 COMMAND_JLE,
26                 COMMAND_JG,
27                 COMMAND_JGE,
28                 COMMAND_SYSC,
29         };
30
31         enum Type {
32                 TYPE_NONE,
33                 TYPE_ADDRESS,
34                 TYPE_INTEGER,
35                 TYPE_VECTOR,
36         };
37
38         struct Code {
39                 Command command : 6;
40                 unsigned int numParams : 2;
41                 Type type : 2;
42                 unsigned int reg1 : 3;
43                 unsigned int reg2 : 3;
44         };
45
46 public:
47         const char *text;
48         int textlen;
49
50 };
51
52 }
53
54 #endif