MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / LoadAnimatedTextures

Function LoadAnimatedTextures

TombEngine/Specific/level.cpp:1268–1299  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1266}
1267
1268void LoadAnimatedTextures()
1269{
1270 int animatedTextureCount = ReadCount();
1271 TENLog("Anim texture count: " + std::to_string(animatedTextureCount), LogLevel::Info);
1272
1273 for (int i = 0; i < animatedTextureCount; i++)
1274 {
1275 auto sequence = ANIMATED_TEXTURES_SEQUENCE{};
1276 sequence.Atlas = ReadInt32();
1277 sequence.Fps = ReadUInt8();
1278 sequence.Type = ReadUInt8();
1279 sequence.UVRotateDirection = ReadFloat();
1280 sequence.UVRotateSpeed = ReadFloat();
1281 sequence.NumFrames = ReadCount();
1282
1283 for (int j = 0; j < sequence.NumFrames; j++)
1284 {
1285 auto frame = ANIMATED_TEXTURES_FRAME{};
1286 frame.x1 = ReadFloat();
1287 frame.y1 = ReadFloat();
1288 frame.x2 = ReadFloat();
1289 frame.y2 = ReadFloat();
1290 frame.x3 = ReadFloat();
1291 frame.y3 = ReadFloat();
1292 frame.x4 = ReadFloat();
1293 frame.y4 = ReadFloat();
1294 sequence.Frames.push_back(frame);
1295 }
1296
1297 g_Level.AnimatedTexturesSequences.push_back(sequence);
1298 }
1299}
1300
1301void LoadAIObjects()
1302{

Callers 1

LoadLevelFunction · 0.85

Calls 7

ReadCountFunction · 0.85
TENLogFunction · 0.85
to_stringFunction · 0.85
ReadInt32Function · 0.85
ReadUInt8Function · 0.85
ReadFloatFunction · 0.85
push_backMethod · 0.45

Tested by

no test coverage detected