mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-19 07:20:50 +00:00
[scene,ui] Be more consistent with component enum names
Actual registry component counts are *_comp_count while hierarchy type component counts are *_type_count.
This commit is contained in:
parent
bb677a1a7c
commit
1a56376f98
4 changed files with 6 additions and 6 deletions
|
@ -56,7 +56,7 @@ enum scene_components {
|
|||
scene_sw_frame, // animation frame
|
||||
scene_sw_brush, // brush model data pointer
|
||||
|
||||
scene_num_components
|
||||
scene_comp_count
|
||||
};
|
||||
|
||||
typedef struct scene_s {
|
||||
|
|
|
@ -97,7 +97,7 @@ enum {
|
|||
// harfbuzz font features for the text object
|
||||
text_features,
|
||||
|
||||
text_type_count
|
||||
text_comp_count
|
||||
};
|
||||
|
||||
typedef struct featureset_s DARRAY_TYPE (hb_feature_t) featureset_t;
|
||||
|
|
|
@ -96,7 +96,7 @@ sw_null_brush (void *_brush)
|
|||
*brush = 0;
|
||||
}
|
||||
|
||||
static const component_t scene_components[] = {
|
||||
static const component_t scene_components[scene_comp_count] = {
|
||||
[scene_href] = {
|
||||
.size = sizeof (hierref_t),
|
||||
.create = 0,//create_href,
|
||||
|
@ -212,7 +212,7 @@ Scene_NewScene (void)
|
|||
scene_t *scene = calloc (1, sizeof (scene_t));
|
||||
|
||||
scene->reg = ECS_NewRegistry ();
|
||||
ECS_RegisterComponents (scene->reg, scene_components, scene_num_components);
|
||||
ECS_RegisterComponents (scene->reg, scene_components, scene_comp_count);
|
||||
|
||||
scene_resources_t *res = calloc (1, sizeof (scene_resources_t));
|
||||
*(scene_resources_t **)&scene->resources = res;
|
||||
|
|
|
@ -57,7 +57,7 @@ text_features_destroy (void *_features)
|
|||
DARRAY_CLEAR (features);
|
||||
}
|
||||
|
||||
static const component_t text_components[text_type_count] = {
|
||||
static const component_t text_components[text_comp_count] = {
|
||||
[text_href] = {
|
||||
.size = sizeof (hierref_t),
|
||||
.name = "href",
|
||||
|
@ -91,7 +91,7 @@ void
|
|||
Text_Init (void)
|
||||
{
|
||||
text_reg = ECS_NewRegistry ();
|
||||
ECS_RegisterComponents (text_reg, text_components, text_type_count);
|
||||
ECS_RegisterComponents (text_reg, text_components, text_comp_count);
|
||||
}
|
||||
|
||||
typedef struct glyphnode_s {
|
||||
|
|
Loading…
Reference in a new issue