Sat, 16 Mar 2013 00:35:36 +0200
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
0 | 1 | #include <vector> |
2 | ||
3 | #include "common.h" | |
4 | #include "io.h" | |
5 | #include "ldtypes.h" | |
6 | #include "misc.h" | |
4
758302636564
improve opening, don't auto-load 55966.dat (:P)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
0
diff
changeset
|
7 | #include "gui.h" |
758302636564
improve opening, don't auto-load 55966.dat (:P)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
0
diff
changeset
|
8 | #include "bbox.h" |
0 | 9 | |
10 | // ============================================================================= | |
11 | // IO_FindLoadedFile (str) | |
12 | // | |
13 | // Returns a pointer to the first found open file with the given name. | |
14 | // ============================================================================= | |
15 | OpenFile* IO_FindLoadedFile (str name) { | |
16 | OpenFile* file; | |
17 | ||
18 | for (uint i = 0; i < g_LoadedFiles.size(); i++) { | |
19 | file = g_LoadedFiles[i]; | |
7
098e3c4949c6
Set window title dynamically based on filename
Santeri Piippo <crimsondusk64@gmail.com>
parents:
4
diff
changeset
|
20 | if (!file->zFileName.icompare (name)) |
0 | 21 | return file; |
22 | } | |
23 | ||
24 | return NULL; | |
25 | } | |
26 | ||
27 | // ============================================================================= | |
4
758302636564
improve opening, don't auto-load 55966.dat (:P)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
0
diff
changeset
|
28 | // IO_OpenLDrawFile (str) |
0 | 29 | // |
30 | // Opens the given file and parses the LDraw code within. | |
31 | // ============================================================================= | |
4
758302636564
improve opening, don't auto-load 55966.dat (:P)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
0
diff
changeset
|
32 | OpenFile* IO_OpenLDrawFile (str path) { |
0 | 33 | FILE* fp = fopen (path.chars (), "r"); |
34 | ||
35 | if (!fp) { | |
36 | printf ("Couldn't open %s!\n", path.chars ()); | |
37 | return NULL; | |
38 | } | |
39 | ||
40 | OpenFile* load = new OpenFile; | |
7
098e3c4949c6
Set window title dynamically based on filename
Santeri Piippo <crimsondusk64@gmail.com>
parents:
4
diff
changeset
|
41 | load->zFileName = path; |
0 | 42 | |
43 | vector<str> lines; | |
44 | ||
45 | { | |
46 | char line[1024]; | |
47 | while (fgets (line, sizeof line, fp)) { | |
48 | // Trim the trailing newline | |
49 | str zLine = line; | |
50 | while (zLine[~zLine - 1] == '\n' || zLine[~zLine - 1] == '\r') | |
51 | zLine -= 1; | |
52 | ||
53 | lines.push_back (zLine); | |
54 | } | |
55 | } | |
56 | ||
57 | fclose (fp); | |
58 | ||
59 | for (ulong i = 0; i < lines.size(); ++i) | |
60 | load->objects.push_back (ParseLine (lines[i])); | |
61 | ||
62 | g_LoadedFiles.push_back (load); | |
4
758302636564
improve opening, don't auto-load 55966.dat (:P)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
0
diff
changeset
|
63 | g_CurrentFile = g_LoadedFiles[g_LoadedFiles.size() - 1]; |
758302636564
improve opening, don't auto-load 55966.dat (:P)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
0
diff
changeset
|
64 | |
758302636564
improve opening, don't auto-load 55966.dat (:P)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
0
diff
changeset
|
65 | // Recalculate the bounding box |
758302636564
improve opening, don't auto-load 55966.dat (:P)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
0
diff
changeset
|
66 | g_BBox.calculate(); |
758302636564
improve opening, don't auto-load 55966.dat (:P)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
0
diff
changeset
|
67 | |
758302636564
improve opening, don't auto-load 55966.dat (:P)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
0
diff
changeset
|
68 | // Rebuild the object tree view now. |
758302636564
improve opening, don't auto-load 55966.dat (:P)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
0
diff
changeset
|
69 | g_qWindow->buildObjList (); |
7
098e3c4949c6
Set window title dynamically based on filename
Santeri Piippo <crimsondusk64@gmail.com>
parents:
4
diff
changeset
|
70 | g_qWindow->setTitle (); |
4
758302636564
improve opening, don't auto-load 55966.dat (:P)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
0
diff
changeset
|
71 | |
758302636564
improve opening, don't auto-load 55966.dat (:P)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
0
diff
changeset
|
72 | return g_CurrentFile; |
0 | 73 | } |
74 | ||
75 | // ============================================================================= | |
12
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
76 | // isNumber (char*) |
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
77 | // |
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
78 | // Returns whether a given string represents a floating point number |
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
79 | // TODO: Does LDraw support scientific notation? |
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
80 | // ============================================================================= |
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
81 | static bool isNumber (char* sToken) { |
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
82 | char* sPointer = &sToken[0]; |
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
83 | bool bGotDot = false; |
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
84 | |
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
85 | // Allow leading hyphen for negatives |
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
86 | if (*sPointer == '-') |
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
87 | sPointer++; |
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
88 | |
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
89 | while (*sPointer != '\0') { |
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
90 | if (*sPointer == '.' && !bGotDot) { |
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
91 | // Decimal point |
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
92 | bGotDot = true; |
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
93 | sPointer++; |
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
94 | continue; |
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
95 | } |
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
96 | |
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
97 | if (*sPointer >= '0' && *sPointer <= '9') { |
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
98 | sPointer++; |
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
99 | continue; // Digit |
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
100 | } |
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
101 | |
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
102 | // If the above cases didn't catch this character, it was |
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
103 | // illegal and this is therefore not a number. |
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
104 | return false; |
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
105 | } |
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
106 | |
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
107 | return true; |
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
108 | } |
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
109 | |
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
110 | // ============================================================================= |
0 | 111 | // ParseLine (str) |
112 | // | |
113 | // Parses a string line containing an LDraw object and returns the object parsed. | |
114 | // ============================================================================= | |
12
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
115 | #define CHECK_TOKEN_COUNT(N) \ |
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
116 | if (tokens.size() != N) \ |
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
117 | return new LDGibberish (zLine, "Bad amount of tokens"); |
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
118 | |
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
119 | #define CHECK_TOKEN_NUMBERS(MIN,MAX) \ |
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
120 | for (ushort i = MIN; i <= MAX; ++i) \ |
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
121 | if (!isNumber (tokens[i])) \ |
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
122 | return new LDGibberish (zLine, str::mkfmt ("Token #%u was `%s`, expected a number", \ |
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
123 | (i + 1), tokens[i].chars())); |
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
124 | |
0 | 125 | LDObject* ParseLine (str zLine) { |
126 | str zNoWhitespace = zLine; | |
127 | StripWhitespace (zNoWhitespace); | |
128 | if (!~zNoWhitespace) { | |
129 | // Line was empty, or only consisted of whitespace | |
130 | return new LDEmpty; | |
131 | } | |
132 | ||
133 | char c = zLine[0]; | |
134 | vector<str> tokens = zLine / " "; | |
135 | ||
11
323390a03294
Color gibberish red. Check for line code length for gibberish (must be 1 to be valid)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
7
diff
changeset
|
136 | if (~tokens[0] != 1) |
323390a03294
Color gibberish red. Check for line code length for gibberish (must be 1 to be valid)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
7
diff
changeset
|
137 | return new LDGibberish (zLine, "Illogical line code"); |
323390a03294
Color gibberish red. Check for line code length for gibberish (must be 1 to be valid)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
7
diff
changeset
|
138 | |
0 | 139 | switch (c - '0') { |
140 | case 0: | |
141 | { | |
142 | // Comment | |
143 | LDComment* obj = new LDComment; | |
144 | obj->zText = zLine.substr (1, -1); | |
145 | return obj; | |
146 | } | |
147 | ||
148 | case 1: | |
149 | { | |
12
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
150 | CHECK_TOKEN_COUNT (15) |
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
151 | CHECK_TOKEN_NUMBERS (1, 13) |
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
152 | |
0 | 153 | // Subfile |
154 | LDSubfile* obj = new LDSubfile; | |
155 | obj->dColor = atoi (tokens[1]); | |
156 | obj->vPosition = ParseVertex (zLine, 2); // 2 - 4 | |
157 | ||
158 | for (short i = 0; i < 9; ++i) | |
159 | obj->faMatrix[i] = atof (tokens[i + 5]); // 5 - 13 | |
160 | ||
161 | obj->zFileName = tokens[14]; | |
162 | return obj; | |
163 | } | |
164 | ||
165 | case 2: | |
166 | { | |
12
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
167 | CHECK_TOKEN_COUNT (8) |
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
168 | CHECK_TOKEN_NUMBERS (1, 7) |
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
169 | |
0 | 170 | // Line |
171 | LDLine* obj = new LDLine; | |
172 | obj->dColor = GetWordInt (zLine, 1); | |
173 | for (short i = 0; i < 2; ++i) | |
174 | obj->vaCoords[i] = ParseVertex (zLine, 2 + (i * 3)); // 2 - 7 | |
175 | return obj; | |
176 | } | |
177 | ||
178 | case 3: | |
179 | { | |
12
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
180 | CHECK_TOKEN_COUNT (11) |
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
181 | CHECK_TOKEN_NUMBERS (1, 10) |
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
182 | |
0 | 183 | // Triangle |
184 | LDTriangle* obj = new LDTriangle; | |
185 | obj->dColor = GetWordInt (zLine, 1); | |
186 | ||
187 | for (short i = 0; i < 3; ++i) | |
188 | obj->vaCoords[i] = ParseVertex (zLine, 2 + (i * 3)); // 2 - 10 | |
189 | ||
190 | return obj; | |
191 | } | |
192 | ||
193 | case 4: | |
194 | { | |
12
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
195 | CHECK_TOKEN_COUNT (14) |
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
196 | CHECK_TOKEN_NUMBERS (1, 13) |
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
197 | |
0 | 198 | // Quadrilateral |
199 | LDQuad* obj = new LDQuad; | |
200 | obj->dColor = GetWordInt (zLine, 1); | |
201 | ||
202 | for (short i = 0; i < 4; ++i) | |
203 | obj->vaCoords[i] = ParseVertex (zLine, 2 + (i * 3)); // 2 - 13 | |
204 | ||
205 | return obj; | |
206 | } | |
207 | ||
208 | case 5: | |
209 | { | |
12
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
210 | CHECK_TOKEN_COUNT (14) |
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
211 | CHECK_TOKEN_NUMBERS (1, 13) |
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
212 | |
0 | 213 | // Conditional line |
214 | LDCondLine* obj = new LDCondLine; | |
215 | obj->dColor = GetWordInt (zLine, 1); | |
216 | ||
217 | for (short i = 0; i < 2; ++i) | |
218 | obj->vaCoords[i] = ParseVertex (zLine, 2 + (i * 3)); // 2 - 7 | |
219 | ||
220 | for (short i = 0; i < 2; ++i) | |
221 | obj->vaControl[i] = ParseVertex (zLine, 8 + (i * 3)); // 8 - 13 | |
222 | return obj; | |
223 | } | |
224 | ||
12
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
225 | default: // Strange line we couldn't parse |
8f6de46a27e2
Check whether the numeric arguments of lines really are numeric, and treat lines that don't pass this check as gibberish
Santeri Piippo <crimsondusk64@gmail.com>
parents:
11
diff
changeset
|
226 | return new LDGibberish (zLine, "Unknown line code number"); |
0 | 227 | } |
228 | } |