inline get_ani

This commit is contained in:
Andrei Alexeyev 2020-03-17 11:47:14 +02:00
parent a239d18cbe
commit 9aecad7aaa
No known key found for this signature in database
GPG key ID: 363707CD4C7FE8A4
2 changed files with 4 additions and 5 deletions

View file

@ -369,10 +369,6 @@ void unload_animation(void *vani) {
free(ani);
}
Animation *get_ani(const char *name) {
return get_resource(RES_ANIM, name, RESF_DEFAULT)->data;
}
AniSequence *get_ani_sequence(Animation *ani, const char *seqname) {
AniSequence *seq = ht_get(&ani->sequences, seqname, NULL);

View file

@ -32,7 +32,10 @@ void* load_animation_begin(const char *filename, uint flags);
void* load_animation_end(void *opaque, const char *filename, uint flags);
void unload_animation(void *vani);
Animation *get_ani(const char *name);
INLINE Animation *get_ani(const char *name) {
return get_resource(RES_ANIM, name, RESF_DEFAULT)->data;
}
AniSequence *get_ani_sequence(Animation *ani, const char *seqname);
// Returns a sprite for the specified frame from an animation sequence named seqname.