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

Function processSetAnim

source/core/defparser.cpp:267–284  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

265}
266
267static void processSetAnim(const char* cmd, FScriptPosition& pos, SetAnim& imp)
268{
269 if (!ValidateTilenum(cmd, imp.tile1, pos) ||
270 !ValidateTilenum(cmd, imp.tile2, pos))
271 return;
272
273 if (imp.type < 0 || imp.type > 3)
274 {
275 pos.Message(MSG_ERROR, "%s: animation type must be 0-3, got %d", cmd, imp.type);
276 return;
277 }
278
279 int count = imp.tile2 - imp.tile1;
280 if (imp.type == (PICANM_ANIMTYPE_BACK >> PICANM_ANIMTYPE_SHIFT) && imp.tile1 > imp.tile2)
281 count = -count;
282
283 setAnim(imp.tile1, imp.type, imp.speed, count);
284}
285
286//==========================================================================
287//

Callers 1

parseAnimTileRangeFunction · 0.85

Calls 3

ValidateTilenumFunction · 0.85
setAnimFunction · 0.85
MessageMethod · 0.80

Tested by

no test coverage detected