| 96 | //=========================================================================== |
| 97 | |
| 98 | bool 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 | |
| 115 | bool ValidateTilenum(const char* cmd, int tile, FScriptPosition pos) |
| 116 | { |
no test coverage detected