MCPcopy Create free account
hub / github.com/ZDoom/Raze / parseHighpalookup

Function parseHighpalookup

source/core/defparser.cpp:1207–1239  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1205//===========================================================================
1206
1207static 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
1242struct ModelStatics

Callers

nothing calls this directly

Calls 10

StartBracesMethod · 0.80
FoundEndBraceMethod · 0.80
MustGetStringMethod · 0.80
MessageMethod · 0.80
FileExistsMethod · 0.80
CompareMethod · 0.45
GetNumberMethod · 0.45
GetStringMethod · 0.45
IsEmptyMethod · 0.45
GetCharsMethod · 0.45

Tested by

no test coverage detected