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

Function CompleteRotations

source/core/textures/tilesetbuilder.cpp:245–262  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

243}
244
245static 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
264static void SubstituteRotations(int firsttileid, const char* basename, int numframes, int destrot, int srcrot)
265{

Callers 1

LoadAliasesFunction · 0.85

Calls 5

CheckForTextureMethod · 0.80
GetCharsMethod · 0.45
isValidMethod · 0.45
FormatMethod · 0.45
AddAliasMethod · 0.45

Tested by

no test coverage detected