/* Kitsune's Curse Copyright (C) 2020-2023 Juan J. Martinez This program 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. This program 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 this program. If not, see . */ #ifndef _ENTITIES_H #define _ENTITIES_H #include #ifndef LOCAL #define LOCAL extern #endif struct st_entity { uint8_t type; uint8_t id; uint8_t frame; uint8_t delay; uint8_t x; uint8_t ox; uint8_t y; uint8_t oy; uint8_t param; uint8_t extra; void (*update)(); void (*draw)(); struct st_entity *n; }; // entitiy structure size to *n #define ET_SIZE_PT 14 // define MAX_ENTITIES and entity types #include "et_config.h" void init_entities(); uint8_t new_entity(); void destroy_entity(); void free_entities(); uint8_t check_for_point(struct st_entity *s, uint8_t x, uint8_t y, uint8_t w, uint8_t h); void draw_entities(); void update_entities(); LOCAL struct st_entity *sp_used, *sp_new; LOCAL struct st_entity *sp_it, *sp_it2; LOCAL uint8_t sp_collect; LOCAL uint8_t *it_x, *it_y, *it_ox, *it_oy, *it_param, *it_frame, *it_delay, *it_extra, it_k; #undef LOCAL #endif // _ENTITIES_H