- [NEW] Càrrega i pintat d'enemics en l'habitació

This commit is contained in:
2025-11-01 11:58:43 +01:00
parent a000c66dd2
commit 94cc7d9242
5 changed files with 237 additions and 74 deletions

26
source/enemies.h Normal file
View File

@@ -0,0 +1,26 @@
#pragma once
#include "images.h"
#include <string>
#include <vector>
namespace enemies
{
struct animation_t
{
std::string name {""};
float speed {0.0f};
uint8_t loop {0};
std::vector<uint8_t> frames;
};
struct enemy_t
{
draw::surface *tileSetFile {nullptr};
uint8_t frame_width {0};
uint8_t frame_height {0};
std::vector<animation_t> animations;
};
void load();
enemy_t &get(std::string name);
}