Resources::Resources()
{
- add_source(get_builtin_source());
+ init();
}
-Resources::Resources(const string &pack_name):
- ui_font(0),
- ui_text_technique(0)
+Resources::Resources(const string &pack_name)
{
- set_default_texture_anisotropy(8);
- set_srgb_conversion(true);
+ init();
+ init_sources(pack_name);
+}
+void Resources::init_sources(const string &pack_name)
+{
FS::Path data_dir = "data";
if(FS::exists(data_dir))
{
pack_source.add_pack_file(pack_name);
add_source(pack_source);
}
+}
+
+void Resources::init()
+{
+ ui_font = 0;
+ ui_text_technique = 0;
+
+ set_default_texture_anisotropy(8);
+ set_srgb_conversion(true);
add_source(get_builtin_source());
}
const Msp::GL::Font *ui_font;
const Msp::GL::Technique *ui_text_technique;
+protected:
Resources();
public:
Resources(const std::string &);
+protected:
+ void init_sources(const std::string &);
private:
+ void init();
static const DataFile::CollectionSource &get_builtin_source();
public:
static Resources &get_builtins();