int SetImageSkin(lua_State *L) { GraphObject2D *Target = GetObjectFromState<GraphObject2D>(L, "Target"); std::string iName = luaL_checkstring(L, 1); Target->SetImage(ImageLoader::LoadSkin(iName)); return 0; }
void DoBMPEventList (GraphObject2D &Obj, std::vector<AutoplayBMP> &Events, ImageList &Images, double SongTime) { for (std::vector<AutoplayBMP>::iterator b = Events.begin(); b != Events.end(); b++) { if (b->Time <= SongTime) { Image* Img = Images.GetFromIndex(b->BMP); if (Img != NULL) Obj.SetImage(Img, false); b = Events.erase(b); if (b == Events.end()) break; } } }