- El actors tenen la seua propia surface

This commit is contained in:
2023-09-12 19:10:56 +02:00
parent 22b22504d9
commit 21a8d70900
2 changed files with 14 additions and 5 deletions

View File

@@ -1,6 +1,7 @@
#pragma once
#include <SDL2/SDL.h>
#include "misc.h"
#include "jdraw.h"
#define FLAG_NONE 0
#define FLAG_HERO 1
@@ -33,9 +34,10 @@ namespace actor
{
struct actor_t
{
char name[8];
SDL_Rect bmp_rect;
SDL_Point bmp_offset;
char name[8];
draw::surface *surface;
SDL_Rect bmp_rect;
SDL_Point bmp_offset;
vec3_t pos;
vec3_t size;
@@ -61,7 +63,7 @@ namespace actor
actor_t *getFirst();
actor_t *create(const char *name, vec3_t p, vec3_t s, SDL_Rect r, SDL_Point o);
actor_t *create(const char *name, vec3_t p, vec3_t s, const char *bmp, SDL_Rect r, SDL_Point o);
void setDirty(actor_t *act, const bool force=false);