2010-10-12 10:55:23 +02:00
|
|
|
/*
|
2011-03-05 13:44:21 +01:00
|
|
|
* This software is licensed under the terms of the MIT-License
|
|
|
|
* See COPYING for further information.
|
|
|
|
* ---
|
|
|
|
* Copyright (C) 2011, Lukas Weber <laochailan@web.de>
|
2010-10-12 10:55:23 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef ANIMATION_H
|
|
|
|
#define ANIMATION_H
|
|
|
|
|
|
|
|
#include "texture.h"
|
|
|
|
|
2011-03-19 16:21:48 +01:00
|
|
|
struct Animation;
|
|
|
|
|
|
|
|
typedef struct Animation {
|
|
|
|
struct Animation *next;
|
|
|
|
struct Animation *prev;
|
|
|
|
|
2010-10-12 10:55:23 +02:00
|
|
|
int rows;
|
|
|
|
int cols;
|
|
|
|
|
|
|
|
int w,h;
|
|
|
|
|
|
|
|
int speed;
|
|
|
|
|
2011-03-19 16:21:48 +01:00
|
|
|
char *name;
|
|
|
|
Texture *tex;
|
2010-10-12 10:55:23 +02:00
|
|
|
} Animation;
|
|
|
|
|
2011-03-19 16:21:48 +01:00
|
|
|
Animation *init_animation(char *filename);
|
|
|
|
Animation *get_ani(char *name);
|
2012-08-10 22:08:51 +02:00
|
|
|
void delete_animations(void);
|
2011-03-19 16:21:48 +01:00
|
|
|
void draw_animation(float x, float y, int row, char *name);
|
|
|
|
void draw_animation_p(float x, float y, int row, Animation *ani);
|
2010-10-12 10:55:23 +02:00
|
|
|
|
2012-08-10 22:08:51 +02:00
|
|
|
#endif
|