46 #include "objwriter.h" |
46 #include "objwriter.h" |
47 #include "commands.h" |
47 #include "commands.h" |
48 |
48 |
49 #define MAX_FILESTACK 8 |
49 #define MAX_FILESTACK 8 |
50 #define MAX_STRUCTSTACK 32 |
50 #define MAX_STRUCTSTACK 32 |
|
51 #define MAX_CASE 64 |
51 |
52 |
52 class ScriptVar; |
53 class ScriptVar; |
53 |
54 |
54 // ============================================================================ |
55 // ============================================================================ |
55 // Meta-data about blocks |
56 // Meta-data about blocks |
56 struct BlockInformation { |
57 struct BlockInformation { |
57 unsigned int mark1; |
58 unsigned int mark1; |
58 unsigned int mark2; |
59 unsigned int mark2; |
59 unsigned int type; |
60 unsigned int type; |
60 DataBuffer* buffer1; |
61 DataBuffer* buffer1; |
|
62 |
|
63 // switch-related stuff |
|
64 // Which case are we at? |
|
65 short casecursor; |
|
66 |
|
67 // Marks to case-blocks |
|
68 int casemarks[MAX_CASE]; |
|
69 |
|
70 // actual case blocks |
|
71 DataBuffer* casebuffers[MAX_CASE]; |
|
72 |
|
73 // What is the current buffer of the block? |
|
74 DataBuffer* recordbuffer; |
61 }; |
75 }; |
62 |
76 |
63 // ============================================================================ |
77 // ============================================================================ |
64 // The script reader reads the script, parses it and tells the object writer |
78 // The script reader reads the script, parses it and tells the object writer |
65 // the bytecode it needs to write to file. |
79 // the bytecode it needs to write to file. |