Files
aee/sprite.h
Raimon Zamora 7e5318c501 - S'ha llevat la carpeta ".vscode" i la merdeta que estava dins
- Afegit mòdul jshader.
- Afegit shader al arxiu de dades
- Actualitzat makefile per a la ocasió
- Afegit lo de afegir caràcter 0 al final si es vol en jfile
- Llevat el flag d'executable que tenien tots els arxius, jo que se perqué
2024-06-28 11:12:50 +02:00

45 lines
526 B
C++

#pragma once
#include "jdraw8.h"
struct Frame {
Uint16 x;
Uint16 y;
Uint16 w;
Uint16 h;
};
struct Animacio {
Uint8 num_frames;
Uint8* frames;
};
struct Entitat {
Uint8 num_frames;
Frame* frames;
Uint8 num_animacions;
Animacio* animacions;
};
class Sprite {
public:
Sprite( JD8_Surface gfx );
~Sprite(void);
void draw();
Entitat* entitat;
Uint8 cur_frame;
Uint16 x;
Uint16 y;
Uint16 o;
protected:
JD8_Surface gfx;
Uint8 cycles_per_frame;
};