//    Copyright 2025 Bill Rossi
//    
//    This file is part of Starship Futuretime
//
//    Starship Futuretime is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
//
//    Starship Futuretime is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
//
//    You should have received a copy of the GNU General Public License along with Starship Futuretime. If not, see <https://www.gnu.org/licenses/>. 

#ifndef ENTITY_H
#define ENTITY_H

#include <stdbool.h>
#include <stddef.h>

typedef struct Entity Entity;
typedef struct Entities Entities;

#include "game.h"

struct Entity {
  char *name;
  void *properties;
  float timer;
  void (*draw)(Entity *e);
  void (*tick)(Game *g, Entity *e, float dt);
  void (*free)(Entity *e);
};

struct Entities {
  Entity **entities;
  size_t count;
  size_t capacity;
};

bool entity_expired(Entity *e);

#endif