File tree Expand file tree Collapse file tree 10 files changed +44
-14
lines changed Expand file tree Collapse file tree 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(
2948529485 if (gauge_value < 0) {
2948629486 gauge_value = 0; /* Counters are monotonically increasing */
2948729487 }
29488- flecs_gauge_record(m, t, value - prev );
29489- return value - prev ;
29488+ flecs_gauge_record(m, t, gauge_value );
29489+ return gauge_value ;
2949029490}
2949129491
2949229492static
Original file line number Diff line number Diff line change @@ -16289,7 +16289,7 @@ struct world {
1628916289
1629016290 /** Get current tick.
1629116291 */
16292- int32_t tick() const {
16292+ int64_t tick() const {
1629316293 const ecs_world_info_t *stats = ecs_get_world_info(m_world);
1629416294 return stats->frame_count_total;
1629516295 }
@@ -17205,7 +17205,7 @@ ecs_ftime_t get_time_scale() const;
1720517205/** Get tick
1720617206 * @return Monotonically increasing frame count.
1720717207 */
17208- int32_t get_tick() const;
17208+ int64_t get_tick() const;
1720917209
1721017210/** Set target FPS
1721117211 * @see ecs_set_target_fps
@@ -20941,7 +20941,6 @@ struct cpp_type_impl {
2094120941 ecs_assert(world != nullptr, ECS_COMPONENT_NOT_REGISTERED, name);
2094220942 } else {
2094320943 ecs_assert(!id || s_id == id, ECS_INCONSISTENT_COMPONENT_ID, NULL);
20944- ecs_assert(s_allow_tag == allow_tag, ECS_INVALID_PARAMETER, NULL);
2094520944 }
2094620945
2094720946 // 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 {
2406924068 return stats->time_scale;
2407024069}
2407124070
24072- inline int32_t world::get_tick() const {
24071+ inline int64_t world::get_tick() const {
2407324072 const ecs_world_info_t *stats = ecs_get_world_info(m_world);
2407424073 return stats->frame_count_total;
2407524074}
Original file line number Diff line number Diff line change @@ -157,7 +157,6 @@ struct cpp_type_impl {
157157 ecs_assert (world != nullptr , ECS_COMPONENT_NOT_REGISTERED, name);
158158 } else {
159159 ecs_assert (!id || s_id == id, ECS_INCONSISTENT_COMPONENT_ID, NULL );
160- ecs_assert (s_allow_tag == allow_tag, ECS_INVALID_PARAMETER, NULL );
161160 }
162161
163162 // 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 {
6060 return stats->time_scale ;
6161}
6262
63- inline int32_t world::get_tick () const {
63+ inline int64_t world::get_tick () const {
6464 const ecs_world_info_t *stats = ecs_get_world_info (m_world);
6565 return stats->frame_count_total ;
6666}
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ ecs_ftime_t get_time_scale() const;
5252/* * Get tick
5353 * @return Monotonically increasing frame count.
5454 */
55- int32_t get_tick () const ;
55+ int64_t get_tick () const ;
5656
5757/* * Set target FPS
5858 * @see ecs_set_target_fps
Original file line number Diff line number Diff line change @@ -162,7 +162,7 @@ struct world {
162162
163163 /* * Get current tick.
164164 */
165- int32_t tick () const {
165+ int64_t tick () const {
166166 const ecs_world_info_t *stats = ecs_get_world_info (m_world);
167167 return stats->frame_count_total ;
168168 }
Original file line number Diff line number Diff line change @@ -61,8 +61,8 @@ ecs_float_t flecs_counter_record(
6161 if (gauge_value < 0 ) {
6262 gauge_value = 0 ; /* Counters are monotonically increasing */
6363 }
64- flecs_gauge_record (m , t , value - prev );
65- return value - prev ;
64+ flecs_gauge_record (m , t , gauge_value );
65+ return gauge_value ;
6666}
6767
6868static
Original file line number Diff line number Diff line change 876876 " module_tag_on_namespace" ,
877877 " dtor_on_fini" ,
878878 " implicit_module" ,
879- " module_in_namespace_w_root_name"
879+ " module_in_namespace_w_root_name" ,
880+ " module_as_entity" ,
881+ " module_as_component"
880882 ]
881883 }, {
882884 "id" : " ImplicitComponents" ,
Original file line number Diff line number Diff line change @@ -236,3 +236,23 @@ void Module_module_in_namespace_w_root_name() {
236236 test_assert (p != 0 );
237237 test_assert (p == p_lookup);
238238}
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);
837837void Module_dtor_on_fini (void );
838838void Module_implicit_module (void );
839839void Module_module_in_namespace_w_root_name (void );
840+ void Module_module_as_entity (void );
841+ void Module_module_as_component (void );
840842
841843// Testsuite 'ImplicitComponents'
842844void ImplicitComponents_add (void );
@@ -4265,6 +4267,14 @@ bake_test_case Module_testcases[] = {
42654267 {
42664268 " module_in_namespace_w_root_name" ,
42674269 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
42684278 }
42694279};
42704280
@@ -5143,7 +5153,7 @@ static bake_test_suite suites[] = {
51435153 " Module" ,
51445154 NULL ,
51455155 NULL ,
5146- 9 ,
5156+ 11 ,
51475157 Module_testcases
51485158 },
51495159 {
You can’t perform that action at this time.
0 commit comments