Animations that are missing from the animation map now auto-generate after animations have been defined.
This commit is contained in:
@@ -208,6 +208,16 @@ void sig::Animation::InitializeAnimations(){
|
||||
CreateStillAnimation("charged_shot_arrow.png",{48,48});
|
||||
CreateStillAnimation("laser.png",{5,1});
|
||||
CreateStillAnimation("range_indicator.png",{24,24});
|
||||
|
||||
for(auto&dat:GFX){
|
||||
std::string imgFile=dat.first;
|
||||
if(!ANIMATION_DATA.count(imgFile)){
|
||||
std::cout<<"WARNING! Animation data for "<<imgFile<<" not found! Auto-generating..."<<std::endl;
|
||||
CreateStillAnimation(imgFile,GFX[imgFile].Sprite()->Size());
|
||||
std::map<int,int>test;
|
||||
test.begin();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sig::Animation::SetupPlayerAnimations(){
|
||||
|
||||
Reference in New Issue
Block a user