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

Function ValidateTileRange

source/core/defparser.cpp:98–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96//===========================================================================
97
98bool ValidateTileRange(const char* cmd, int& begin, int& end, FScriptPosition pos, bool allowswap = true)
99{
100 if (end < begin)
101 {
102 pos.Message(MSG_WARNING, "%s: tile range [%d..%d] is backwards. Indices were swapped.", cmd, begin, end);
103 std::swap(begin, end);
104 }
105
106 if ((unsigned)begin >= MAXUSERTILES || (unsigned)end >= MAXUSERTILES)
107 {
108 pos.Message(MSG_ERROR, "%s: Invalid tile range [%d..%d]", cmd, begin, end);
109 return false;
110 }
111
112 return true;
113}
114
115bool ValidateTilenum(const char* cmd, int tile, FScriptPosition pos)
116{

Callers 11

parseUndefTextureRangeFunction · 0.85
parseDummyTileRangeFunction · 0.85
parseUndefineTileRangeFunction · 0.85
parseSetupTileRangeFunction · 0.85
parseAlphahackRangeFunction · 0.85
parseDefineVoxelTilesFunction · 0.85
parseVoxelFunction · 0.85
parseDefineModelFrameFunction · 0.85
parseUndefModelRangeFunction · 0.85
parseModelFrameBlockFunction · 0.85
parseModelHudBlockFunction · 0.85

Calls 2

swapFunction · 0.85
MessageMethod · 0.80

Tested by

no test coverage detected