MCPcopy Create free account
hub / github.com/EasyRPG/Player / open_generic

Function open_generic

src/filefinder.cpp:464–481  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

462}
463
464Filesystem_Stream::InputStream open_generic(std::string_view dir, std::string_view name, DirectoryTree::Args& args) {
465 if (!Tr::GetCurrentTranslationId().empty()) {
466 auto tr_fs = Tr::GetCurrentTranslationFilesystem();
467 auto is = tr_fs.OpenFile(args);
468 if (is) {
469 return is;
470 }
471 }
472
473 auto is = FileFinder::Game().OpenFile(args);
474 if (!is && Main_Data::filefinder_rtp) {
475 is = Main_Data::filefinder_rtp->Lookup(dir, name, args.exts);
476 if (!is) {
477 Output::Debug("Cannot find: {}/{}", dir, name);
478 }
479 }
480 return is;
481}
482
483Filesystem_Stream::InputStream open_generic_with_fallback(std::string_view dir, std::string_view name, DirectoryTree::Args& args) {
484 if (!Tr::GetCurrentTranslationId().empty()) {

Callers 5

OpenImageMethod · 0.85
OpenMusicMethod · 0.85
OpenSoundMethod · 0.85
OpenFontMethod · 0.85

Calls 4

GameClass · 0.85
OpenFileMethod · 0.80
LookupMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected