Commit 435827a 1 parent 7837410 commit 435827a Copy full SHA for 435827a
File tree 10 files changed +44
-14
lines changed
10 files changed +44
-14
lines changed Original file line number Diff line number Diff line change @@ -29485,8 +29485,8 @@ ecs_float_t flecs_counter_record(
29485
29485
if (gauge_value < 0) {
29486
29486
gauge_value = 0; /* Counters are monotonically increasing */
29487
29487
}
29488
- flecs_gauge_record(m, t, value - prev );
29489
- return value - prev ;
29488
+ flecs_gauge_record(m, t, gauge_value );
29489
+ return gauge_value ;
29490
29490
}
29491
29491
29492
29492
static
Original file line number Diff line number Diff line change @@ -16289,7 +16289,7 @@ struct world {
16289
16289
16290
16290
/** Get current tick.
16291
16291
*/
16292
- int32_t tick() const {
16292
+ int64_t tick() const {
16293
16293
const ecs_world_info_t *stats = ecs_get_world_info(m_world);
16294
16294
return stats->frame_count_total;
16295
16295
}
@@ -17205,7 +17205,7 @@ ecs_ftime_t get_time_scale() const;
17205
17205
/** Get tick
17206
17206
* @return Monotonically increasing frame count.
17207
17207
*/
17208
- int32_t get_tick() const;
17208
+ int64_t get_tick() const;
17209
17209
17210
17210
/** Set target FPS
17211
17211
* @see ecs_set_target_fps
@@ -20941,7 +20941,6 @@ struct cpp_type_impl {
20941
20941
ecs_assert(world != nullptr, ECS_COMPONENT_NOT_REGISTERED, name);
20942
20942
} else {
20943
20943
ecs_assert(!id || s_id == id, ECS_INCONSISTENT_COMPONENT_ID, NULL);
20944
- ecs_assert(s_allow_tag == allow_tag, ECS_INVALID_PARAMETER, NULL);
20945
20944
}
20946
20945
20947
20946
// If no id has been registered yet for the component (indicating the
@@ -24069,7 +24068,7 @@ inline ecs_ftime_t world::get_time_scale() const {
24069
24068
return stats->time_scale;
24070
24069
}
24071
24070
24072
- inline int32_t world::get_tick() const {
24071
+ inline int64_t world::get_tick() const {
24073
24072
const ecs_world_info_t *stats = ecs_get_world_info(m_world);
24074
24073
return stats->frame_count_total;
24075
24074
}
Original file line number Diff line number Diff line change @@ -157,7 +157,6 @@ struct cpp_type_impl {
157
157
ecs_assert (world != nullptr , ECS_COMPONENT_NOT_REGISTERED, name);
158
158
} else {
159
159
ecs_assert (!id || s_id == id, ECS_INCONSISTENT_COMPONENT_ID, NULL );
160
- ecs_assert (s_allow_tag == allow_tag, ECS_INVALID_PARAMETER, NULL );
161
160
}
162
161
163
162
// If no id has been registered yet for the component (indicating the
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ inline ecs_ftime_t world::get_time_scale() const {
60
60
return stats->time_scale ;
61
61
}
62
62
63
- inline int32_t world::get_tick () const {
63
+ inline int64_t world::get_tick () const {
64
64
const ecs_world_info_t *stats = ecs_get_world_info (m_world);
65
65
return stats->frame_count_total ;
66
66
}
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ ecs_ftime_t get_time_scale() const;
52
52
/* * Get tick
53
53
* @return Monotonically increasing frame count.
54
54
*/
55
- int32_t get_tick () const ;
55
+ int64_t get_tick () const ;
56
56
57
57
/* * Set target FPS
58
58
* @see ecs_set_target_fps
Original file line number Diff line number Diff line change @@ -162,7 +162,7 @@ struct world {
162
162
163
163
/* * Get current tick.
164
164
*/
165
- int32_t tick () const {
165
+ int64_t tick () const {
166
166
const ecs_world_info_t *stats = ecs_get_world_info (m_world);
167
167
return stats->frame_count_total ;
168
168
}
Original file line number Diff line number Diff line change @@ -61,8 +61,8 @@ ecs_float_t flecs_counter_record(
61
61
if (gauge_value < 0 ) {
62
62
gauge_value = 0 ; /* Counters are monotonically increasing */
63
63
}
64
- flecs_gauge_record (m , t , value - prev );
65
- return value - prev ;
64
+ flecs_gauge_record (m , t , gauge_value );
65
+ return gauge_value ;
66
66
}
67
67
68
68
static
Original file line number Diff line number Diff line change 876
876
" module_tag_on_namespace" ,
877
877
" dtor_on_fini" ,
878
878
" implicit_module" ,
879
- " module_in_namespace_w_root_name"
879
+ " module_in_namespace_w_root_name" ,
880
+ " module_as_entity" ,
881
+ " module_as_component"
880
882
]
881
883
}, {
882
884
"id" : " ImplicitComponents" ,
Original file line number Diff line number Diff line change @@ -236,3 +236,23 @@ void Module_module_in_namespace_w_root_name() {
236
236
test_assert (p != 0 );
237
237
test_assert (p == p_lookup);
238
238
}
239
+
240
+ void Module_module_as_entity () {
241
+ flecs::world world;
242
+
243
+ auto m = world.import <ns::SimpleModule>();
244
+ test_assert (m != 0 );
245
+
246
+ auto e = world.entity <ns::SimpleModule>();
247
+ test_assert (m == e);
248
+ }
249
+
250
+ void Module_module_as_component () {
251
+ flecs::world world;
252
+
253
+ auto m = world.import <ns::SimpleModule>();
254
+ test_assert (m != 0 );
255
+
256
+ auto e = world.component <ns::SimpleModule>();
257
+ test_assert (m == e);
258
+ }
Original file line number Diff line number Diff line change @@ -837,6 +837,8 @@ void Module_module_tag_on_namespace(void);
837
837
void Module_dtor_on_fini (void );
838
838
void Module_implicit_module (void );
839
839
void Module_module_in_namespace_w_root_name (void );
840
+ void Module_module_as_entity (void );
841
+ void Module_module_as_component (void );
840
842
841
843
// Testsuite 'ImplicitComponents'
842
844
void ImplicitComponents_add (void );
@@ -4265,6 +4267,14 @@ bake_test_case Module_testcases[] = {
4265
4267
{
4266
4268
" module_in_namespace_w_root_name" ,
4267
4269
Module_module_in_namespace_w_root_name
4270
+ },
4271
+ {
4272
+ " module_as_entity" ,
4273
+ Module_module_as_entity
4274
+ },
4275
+ {
4276
+ " module_as_component" ,
4277
+ Module_module_as_component
4268
4278
}
4269
4279
};
4270
4280
@@ -5143,7 +5153,7 @@ static bake_test_suite suites[] = {
5143
5153
" Module" ,
5144
5154
NULL ,
5145
5155
NULL ,
5146
- 9 ,
5156
+ 11 ,
5147
5157
Module_testcases
5148
5158
},
5149
5159
{
You can’t perform that action at this time.
0 commit comments