1 #include <msp/core/application.h>
2 #include <msp/fs/dir.h>
3 #include <msp/fs/stat.h>
11 Resources::Resources()
13 add_type<CameraSetup>().suffix(".camera.setup");
17 ApplicationResources::ApplicationResources()
19 FS::Path data_dir = FS::get_sys_data_dir()/"data";
21 if(FS::exists(data_dir))
26 FS::Path main_pack = FS::get_sys_data_dir()/(Application::get_name()+".mdp");
27 if(FS::exists(main_pack))
28 pack_src.add_pack_file(main_pack.str());
29 if(FS::exists(data_dir))
31 for(const string &f: FS::list_filtered(data_dir, "\\.mdp$"))
32 pack_src.add_pack_file((data_dir/f).str());
37 void ApplicationResources::add_dir(const FS::Path &path)
39 dir_src.add_directory(path);
40 for(const string &f: FS::list_files(path))
48 } // namespace Msp::Game