[ecs] Implement hierarchies as components

The main goal of this change was to make it easier to tell when a
hierarchy has been deleted, but as a side benefit, it got rid of the use
of PR_RESMAP. Also, it's easy to track the number of hierarchies.

Unfortunately, it showed how brittle the component side of the ECS is
(scene and canvas registries assumed their components were the first (no
long the case), thus the sweeping changes).

Centerprint doesn't work (but it hasn't for a while).
This commit is contained in:
Bill Currie 2024-01-01 20:21:07 +09:00
parent fc9c2fa544
commit 35eec0b2e5
77 changed files with 1196 additions and 979 deletions

View file

@ -21,7 +21,7 @@ extern vid_render_funcs_t *vid_render_funcs;
#define vr_funcs vid_render_funcs
extern refdef_t r_refdef;
#define SW_COMP(comp, id) ((void *)((byte *)r_refdef.registry->comp_pools[comp].data + (id) * r_refdef.registry->components.a[comp].size))
#define SW_COMP(comp, id) ((void *)((byte *)r_refdef.registry->comp_pools[r_refdef.scene->base + comp].data + (id) * r_refdef.registry->components.a[r_refdef.scene->base + comp].size))
extern int r_viewsize;
void R_LineGraph (int x, int y, int *h_vals, int count, int height);