| 1788 | } |
| 1789 | |
| 1790 | void 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 | |
| 1817 | void LoadMaterials() |
| 1818 | { |