MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / match_chunk_changed

Function match_chunk_changed

modules/engine/runtime/src/ecs/query.cpp:76–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74}
75
76bool match_chunk_changed(const sugoi_type_set_t& type, uint32_t* timestamp, const sugoi_meta_filter_t& filter)
77{
78 uint16_t i = 0, j = 0;
79 auto& changed = filter.changed;
80 if (changed.length == 0)
81 return true;
82 while (i < changed.length && j < type.length)
83 {
84 if (changed.data[i] > type.data[j])
85 j++;
86 else if (changed.data[i] < type.data[j])
87 i++;
88 else if (timestamp[j] - filter.timestamp > 0)
89 return true;
90 else
91 (j++, i++);
92 }
93 return false;
94}
95
96bool match_group_meta(const sugoi_entity_type_t& type, const sugoi_meta_filter_t& filter)
97{

Callers 1

queryMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected