X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FAnimation.cc;h=fead5cab1697f67682d5df9546f14f7308356779;hp=ba34bc5d9f95cae0bc86fa0aba1242cf73cf4626;hb=ed04ddaaa59dcc42e375ec492dbda77f693530e9;hpb=831f04d4bc19a390415ac0bbac4331c7a65509bc diff --git a/src/Animation.cc b/src/Animation.cc index ba34bc5..fead5ca 100644 --- a/src/Animation.cc +++ b/src/Animation.cc @@ -137,12 +137,12 @@ public: void init(const std::string& name) { moof::script script; - std::string path(name); + std::string path = moof::resource::find_file("animations/"+name, "lua"); - if (!Animation::find_path(path)) - { - throw std::runtime_error("cannot find resource " + name); - } + //if (!resource::find(path)) + //{ + //throw std::runtime_error("cannot find resource " + name); + //} script.import_base_library(); moof::log::import(script); @@ -214,7 +214,6 @@ public: std::map::iterator it; it = mData->mSequences.find(name); - if (it != mData->mSequences.end()) { mCurrentSequence = &(*it).second; @@ -306,14 +305,3 @@ unsigned Animation::getFrame() const return impl_->mFrameIndex; } - -/** - * Specialized search location for animation files. They can be found in - * the "animations" subdirectory of any of the search directories. - */ - -bool Animation::find_path(std::string& name) -{ - return moof::resource::find_path(name, "animations/", "lua"); -} -