#include "make_nana_animation.hpp" #include "memcard/block.hpp" #include "memcard/icon_fetch.hpp" namespace duck { AnimationWithSize make_nana_animation (const ConstBlock& block, int width, int height, int fps) { nana::frameset fset; for (const auto& frame : icon_fetch(block, width, height)) { nana::paint::image img; img.open(frame.data(), frame.size()); fset.push_back(img); } AnimationWithSize retani(nana::size(width, height)); retani.fps(fps); retani.push_back(fset); retani.looped(true); retani.play(); return retani; } } //namespace duck