taisei/src/resource/animation.h

40 lines
782 B
C
Raw Normal View History

/*
* This software is licensed under the terms of the MIT-License
* See COPYING for further information.
* ---
* Copyright (C) 2011, Lukas Weber <laochailan@web.de>
*/
#ifndef ANIMATION_H
#define ANIMATION_H
#include "texture.h"
struct Animation;
typedef struct Animation {
int rows;
int cols;
2017-02-28 18:47:47 +01:00
int w;
int h;
int speed;
Texture *tex;
} Animation;
char* animation_path(const char *name);
bool check_animation_path(const char *path);
void* load_animation(const char *filename, unsigned int flags);
char* animation_name(const char *filename);
2017-02-28 18:47:47 +01:00
Animation *get_ani(const char *name);
2017-02-28 18:47:47 +01:00
void draw_animation(float x, float y, int row, const char *name);
void draw_animation_p(float x, float y, int row, Animation *ani);
#define ANI_PATH_PREFIX TEX_PATH_PREFIX
#endif