MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / ReadObjectLegacy

Function ReadObjectLegacy

src/openrct2/object/ObjectFactory.cpp:240–255  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

238 }
239
240 static void ReadObjectLegacy(Object& object, IReadObjectContext* context, IStream* stream)
241 {
242 try
243 {
244 object.ReadLegacy(context, stream);
245 }
246 catch (const IOException&)
247 {
248 // TODO check that ex is really EOF and not some other error
249 context->LogError(ObjectError::unexpectedEOF, "Unexpectedly reached end of file.");
250 }
251 catch (const std::exception&)
252 {
253 context->LogError(ObjectError::unknown, nullptr);
254 }
255 }
256
257 std::unique_ptr<Object> CreateObjectFromFile(u8string_view path, bool loadImages)
258 {

Callers 2

Calls 2

ReadLegacyMethod · 0.45
LogErrorMethod · 0.45

Tested by

no test coverage detected