ecsnet
Loading...
Searching...
No Matches
config.h
1#pragma once
2
12
16// #define ECSNET_API
17
18#if defined(_WIN32)
19 #if defined(ECSNET_STATIC)
20 // Estamos compilando/consumiendo la versión estática → no export/import
21 #define ECSNET_API
22 #elif defined(ECSNET_EXPORTS)
23 // Estamos construyendo la DLL → exportamos símbolos
24 #define ECSNET_API __declspec(dllexport)
25 #else
26 // Estamos consumiendo la DLL → importamos símbolos
27 #define ECSNET_API __declspec(dllimport)
28 #endif
29#else
30 // En Linux/macOS normalmente no hace falta, pero si quieres podrías usar __attribute__((visibility("default")))
31 #define ECSNET_API
32#endif
33
34/* ========================= ECS CONFIGURATION ========================= */
35
45#define INITIAL_ENTITY_CAPACITY 1024
46
52#define INITIAL_COMPONENT_CAPACITY 32
53
54/* -------------------------------------------------------------------------
55 * Compatibility macros
56 *
57 * The original implementation relied on compile‑time constants MAX_ENTITIES
58 * and MAX_COMPONENTS. To avoid extensive refactoring of all modules at
59 * once, these macros are defined in terms of the initial capacities.
60 * Network and legacy code can still refer to MAX_ENTITIES or MAX_COMPONENTS
61 * without causing compilation errors. Dynamic growth is implemented in
62 * the ECS core and can exceed these values; network modules should be
63 * updated to use ecs->entity_capacity for correctness.
64 */
65#ifndef MAX_ENTITIES
66#define MAX_ENTITIES INITIAL_ENTITY_CAPACITY
67#endif
68#ifndef MAX_COMPONENTS
69#define MAX_COMPONENTS INITIAL_COMPONENT_CAPACITY
70#endif
71
75#define MAX_SYSTEMS 64
76
77
78
79/* ========================= NET CONFIGURATION ========================= */