X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgraphic.cpp;h=5fc27ef3d153e5c2061ff5e891bab10a2eea5f0c;hb=5e8285302c1d04b631682a82d56c5afc46d20ad5;hp=0b0ba0e6ef055ee23251b3b40338479f34674a65;hpb=51fd0d0fe7ad8a617de8f71985e0c4cb60fec3a9;p=libs%2Fgltk.git diff --git a/source/graphic.cpp b/source/graphic.cpp index 0b0ba0e..5fc27ef 100644 --- a/source/graphic.cpp +++ b/source/graphic.cpp @@ -73,8 +73,7 @@ void Graphic::create_texcoords(float low, float high, float brd1, float brd2, fl Graphic::Loader::Loader(Graphic &g, Resources &r): - graph(g), - res(r) + DataFile::CollectionObjectLoader(g, &r) { add("texture", &Loader::texture); add("slice", &Loader::slice); @@ -85,23 +84,23 @@ Graphic::Loader::Loader(Graphic &g, Resources &r): void Graphic::Loader::texture(const string &n) { - graph.texture = &res.get(n); - graph.slice = Geometry(0, 0, graph.texture->get_width(), graph.texture->get_height()); + obj.texture = &get_collection().get(n); + obj.slice = Geometry(0, 0, obj.texture->get_width(), obj.texture->get_height()); } void Graphic::Loader::slice(unsigned x, unsigned y, unsigned w, unsigned h) { - graph.slice = Geometry(x, y, w, h); + obj.slice = Geometry(x, y, w, h); } void Graphic::Loader::border() { - load_sub(graph.border); + load_sub(obj.border); } void Graphic::Loader::shadow() { - load_sub(graph.shadow); + load_sub(obj.shadow); } } // namespace GLtk