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

Function parseTexture

source/core/defparser.cpp:443–461  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

441}
442
443static void parseTexture(FScanner& sc, FScriptPosition& pos)
444{
445 FScanner::SavedPos blockend;
446 int tile = -1;
447
448 if (!sc.GetNumber(tile, true)) return;
449 ValidateTilenum("texture", tile, pos); // do not abort, we still need to parse over the data.
450
451 if (sc.StartBraces(&blockend)) return;
452 while (!sc.FoundEndBrace(blockend))
453 {
454 sc.MustGetString();
455 if (sc.Compare("pal")) parseTexturePaletteBlock(sc, tile);
456 else if (sc.Compare("detail")) parseTextureSpecialBlock(sc, tile, DETAILPAL);
457 else if (sc.Compare("glow")) parseTextureSpecialBlock(sc, tile, GLOWPAL);
458 else if (sc.Compare("specular")) parseTextureSpecialBlock(sc, tile, SPECULARPAL);
459 else if (sc.Compare("normal")) parseTextureSpecialBlock(sc, tile, NORMALPAL);
460 }
461}
462
463//===========================================================================
464//

Callers

nothing calls this directly

Calls 8

ValidateTilenumFunction · 0.85
parseTexturePaletteBlockFunction · 0.85
parseTextureSpecialBlockFunction · 0.85
StartBracesMethod · 0.80
FoundEndBraceMethod · 0.80
MustGetStringMethod · 0.80
GetNumberMethod · 0.45
CompareMethod · 0.45

Tested by

no test coverage detected