X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Fresources.cpp;h=7415beb5473312e57fcabb29d6691114aa733fc1;hb=0af3c2393bd00f39db3bfaf5b78a7a44f0fd5ff1;hp=01426a20ced22d8911c587ab21338201c8d02c1d;hpb=1a6d9006d0a85d8b8266266a4fc5e135f07448ae;p=libs%2Fgltk.git diff --git a/source/resources.cpp b/source/resources.cpp index 01426a2..7415beb 100644 --- a/source/resources.cpp +++ b/source/resources.cpp @@ -24,9 +24,9 @@ Resources::Resources(): add_creator(&Resources::create_texture); } -void Resources::set_path(const Path &p) +void Resources::set_path(const FS::Path &p) { - path=p; + path = p; } const GL::Font &Resources::get_default_font() const @@ -39,16 +39,16 @@ const GL::Font &Resources::get_default_font() const GL::Font *Resources::create_font(const string &name) { - RefPtr fnt=new GL::Font; - DataFile::load(*fnt, (path/name).str(), *this); + RefPtr fnt = new GL::Font; + DataFile::load(*fnt, (path/name).str(), *this); if(!default_font) - default_font=fnt.get(); + default_font = fnt.get(); return fnt.release(); } GL::Texture2D *Resources::create_texture(const string &name) { - RefPtr tex=new GL::Texture2D; + RefPtr tex = new GL::Texture2D; tex->load_image((path/name).str()); tex->set_min_filter(GL::LINEAR); return tex.release(); @@ -66,22 +66,22 @@ Resources::Loader::Loader(Resources &r): void Resources::Loader::default_font(const string &name) { - res.default_font=res.get(name); + res.default_font = res.get(name); } void Resources::Loader::font(const string &name) { - RefPtr fnt=new GL::Font; + RefPtr fnt = new GL::Font; load_sub(*fnt, res); res.add(name, fnt.get()); if(!res.default_font) - res.default_font=fnt.get(); + res.default_font = fnt.get(); fnt.release(); } void Resources::Loader::style(const string &name) { - RefPtr