- Treballant en la ordenació de actors

This commit is contained in:
2023-03-01 18:57:45 +01:00
parent f54e5ebef5
commit 195fb39210
9 changed files with 194 additions and 7 deletions

38
source/actor.h Normal file
View File

@@ -0,0 +1,38 @@
#pragma once
#include <SDL2/SDL.h>
namespace actor
{
struct pos_t
{
int x, y, z;
};
struct size_t
{
int w, h, d;
};
struct actor_t
{
SDL_Rect bmp_rect;
SDL_Point bmp_offset;
pos_t pos;
size_t size;
actor_t *prev;
actor_t *next;
};
actor_t *getFirst();
actor_t *create(pos_t p, size_t s, SDL_Rect r, SDL_Point o);
void setDirty(actor_t *act);
void reorder();
void draw(actor_t *act, const bool draw_all=true);
}