| 265 | } |
| 266 | |
| 267 | static 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 | // |
no test coverage detected