- Treballant en la ordenació de actors
This commit is contained in:
38
source/actor.h
Normal file
38
source/actor.h
Normal 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);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user