| 243 | } |
| 244 | |
| 245 | static void CompleteRotations(int firsttileid, const char* basename, const char* getname, int numframes, int numrotations) |
| 246 | { |
| 247 | for (int rotation = numrotations; ; rotation++) |
| 248 | { |
| 249 | for (int frame = 0; frame < numframes; frame++) |
| 250 | { |
| 251 | FStringf str("%s@%c%x", getname, frame + 'A', rotation + 1); |
| 252 | auto texid = TexMan.CheckForTexture(str.GetChars(), ETextureType::Any); |
| 253 | if (frame == 0 && !texid.isValid()) |
| 254 | { |
| 255 | // rotation does not exist for the first frame -> we reached the end. |
| 256 | return; |
| 257 | } |
| 258 | str.Format("%s@%c%x", basename, frame + 'A', rotation + 1); |
| 259 | TexMan.AddAlias(str.GetChars(), texid); |
| 260 | } |
| 261 | } |
| 262 | } |
| 263 | |
| 264 | static void SubstituteRotations(int firsttileid, const char* basename, int numframes, int destrot, int srcrot) |
| 265 | { |
no test coverage detected