| 1205 | //=========================================================================== |
| 1206 | |
| 1207 | static void parseHighpalookup(FScanner& sc, FScriptPosition& pos) |
| 1208 | { |
| 1209 | FScanner::SavedPos blockend; |
| 1210 | int basepal = -1, pal = -1; |
| 1211 | FString fn; |
| 1212 | |
| 1213 | if (sc.StartBraces(&blockend)) return; |
| 1214 | |
| 1215 | while (!sc.FoundEndBrace(blockend)) |
| 1216 | { |
| 1217 | sc.MustGetString(); |
| 1218 | if (sc.Compare("basepal")) sc.GetNumber(basepal); |
| 1219 | else if (sc.Compare("pal")) sc.GetNumber(pal); |
| 1220 | else if (sc.Compare("file")) sc.GetString(fn); |
| 1221 | } |
| 1222 | if ((unsigned)basepal >= MAXBASEPALS) |
| 1223 | { |
| 1224 | pos.Message(MSG_ERROR, "highpalookup: invalid base palette number %d", basepal); |
| 1225 | } |
| 1226 | else if ((unsigned)pal >= MAXREALPAL) |
| 1227 | { |
| 1228 | pos.Message(MSG_ERROR, "highpalookup: invalid palette number %d", pal); |
| 1229 | } |
| 1230 | else if (fn.IsEmpty()) |
| 1231 | { |
| 1232 | pos.Message(MSG_ERROR, "highpalookup: missing file name"); |
| 1233 | } |
| 1234 | else if (!fileSystem.FileExists(fn.GetChars())) |
| 1235 | { |
| 1236 | pos.Message(MSG_ERROR, "highpalookup: file %s not found", fn.GetChars()); |
| 1237 | } |
| 1238 | // todo |
| 1239 | } |
| 1240 | |
| 1241 | |
| 1242 | struct ModelStatics |
nothing calls this directly
no test coverage detected