taisei/src/known_entities.h
Andrei Alexeyev e16e2184a3
Refactor entity system (#214)
* Smarter generic entity macros

The list of "core" entities is now defined in one macro, and hardcoded
_Generic dispatch tables are eliminated

* Get rid of "custom" entities

All entities are now "first-class". The list of known entity types has
been moved to known_entities.h. The system no longer needs to know the
definition of all entity structs.

* Refactor guts of ENT_BOX/ENT_UNBOX

Made the functions inline, Box::ent is now a proper pointer type (but
please don't use it directly), ENT_UNBOX returns NULL if the box is
"empty" (references NULL entity)

* Merge TASK_BIND_UNBOXED with TASK_BIND

* s/YoumuMyon/YoumuAMyon for consistency
2020-04-17 10:18:53 +03:00

28 lines
692 B
C

/*
* This software is licensed under the terms of the MIT License.
* See COPYING for further information.
* ---
* Copyright (c) 2011-2019, Lukas Weber <laochailan@web.de>.
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
*/
#ifndef IGUARD_known_entities_h
#define IGUARD_known_entities_h
#include "taisei.h"
#define ENTITIES_CORE(X, ...) \
X(Boss, __VA_ARGS__) \
X(Enemy, __VA_ARGS__) \
X(Item, __VA_ARGS__) \
X(Laser, __VA_ARGS__) \
X(Player, __VA_ARGS__) \
X(Projectile, __VA_ARGS__) \
#include "plrmodes/entities.h"
#define ENTITIES(X, ...) \
ENTITIES_CORE(X, __VA_ARGS__) \
ENTITIES_PLAYERMODES(X, __VA_ARGS__) \
#endif // IGUARD_known_entities_h