MCPcopy Create free account
hub / github.com/InoriRus/Kyty / SystemContentLoadParamSfo

Function SystemContentLoadParamSfo

source/emulator/src/Loader/SystemContent.cpp:351–389  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

349}
350
351void SystemContentLoadParamSfo(const String& file_name)
352{
353 auto* sc = Core::Singleton<SystemContent>::Instance();
354
355 if (!Core::File::IsFileExisting(file_name))
356 {
357 EXIT("Can't find file: %s\n", file_name.C_Str());
358 }
359
360 sc->psf.Open(file_name);
361
362 if (!sc->psf.IsValid())
363 {
364 EXIT("invalid file: %s\n", file_name.C_Str());
365 }
366
367 sc->psf_path = file_name;
368 sc->psf.DbgPrint();
369
370 sc->icon_path = file_name.DirectoryWithoutFilename() + U"icon0.png";
371 delete sc->icon;
372
373 if (Core::File::IsFileExisting(sc->icon_path))
374 {
375 sc->icon = new Libs::Graphics::Image(sc->icon_path);
376 sc->icon->Load();
377 } else
378 {
379 sc->icon = nullptr;
380 }
381
382 sc->playgo_path = file_name.DirectoryWithoutFilename() + U"playgo-chunk.dat";
383 sc->playgo.Open(sc->playgo_path);
384
385 if (sc->playgo.IsValid())
386 {
387 sc->playgo.DbgPrint();
388 }
389}
390
391bool SystemContentParamSfoGetInt(const char* name, int32_t* value)
392{

Callers 1

KYTY_SCRIPT_FUNCFunction · 0.85

Calls 5

OpenMethod · 0.45
IsValidMethod · 0.45
DbgPrintMethod · 0.45
LoadMethod · 0.45

Tested by

no test coverage detected