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"
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
int rows;
|
|
|
|
int cols;
|
|
|
|
|
|
|
|
int w,h;
|
|
|
|
|
|
|
|
int speed;
|
|
|
|
|
|
|
|
Texture tex;
|
|
|
|
} Animation;
|
|
|
|
|
|
|
|
void init_animation(Animation *buf, int rows, int cols, int speed, const char *filename);
|
2010-11-28 12:54:13 +01:00
|
|
|
void draw_animation(int x, int y, int row, const Animation *ani);
|
2010-10-12 10:55:23 +02:00
|
|
|
|
|
|
|
#endif
|