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

Function LoadMirrors

TombEngine/Specific/level.cpp:1790–1815  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1788}
1789
1790void LoadMirrors()
1791{
1792 int mirrorCount = ReadCount();
1793 TENLog("Mirror count: " + std::to_string(mirrorCount), LogLevel::Info);
1794 g_Level.Mirrors.reserve(mirrorCount);
1795
1796 for (int i = 0; i < mirrorCount; i++)
1797 {
1798 auto& mirror = g_Level.Mirrors.emplace_back();
1799
1800 mirror.RoomNumber = ReadInt16(); // TODO: Write Int32 to level instead. Short isn't used for room numbers anymore.
1801 mirror.Plane.x = ReadFloat();
1802 mirror.Plane.y = ReadFloat();
1803 mirror.Plane.z = ReadFloat();
1804 mirror.Plane.w = ReadFloat();
1805
1806 mirror.ReflectPlayer = ReadBool();
1807 mirror.ReflectMoveables = ReadBool();
1808 mirror.ReflectStatics = ReadBool();
1809 mirror.ReflectSprites = ReadBool();
1810 mirror.ReflectLights = ReadBool();
1811 mirror.Enabled = true;
1812
1813 mirror.ReflectionMatrix = Matrix::CreateReflection(mirror.Plane);
1814 }
1815}
1816
1817void LoadMaterials()
1818{

Callers 1

LoadLevelFunction · 0.85

Calls 8

ReadCountFunction · 0.85
TENLogFunction · 0.85
to_stringFunction · 0.85
ReadInt16Function · 0.85
ReadFloatFunction · 0.85
ReadBoolFunction · 0.85
emplace_backMethod · 0.80
reserveMethod · 0.45

Tested by

no test coverage detected