Redesign of animation queue for unreal, add get_tangibles_near to drivenengine

This commit is contained in:
2023-07-24 17:19:25 -04:00
parent 4da86e6f89
commit 87aa47b96d
19 changed files with 1406 additions and 980 deletions

View File

@@ -493,6 +493,15 @@ void print_id_vector(const IdVector &idv, std::ostream *os) {
first = false;
}
}
void print_id_vector(const std::vector<uint64_t> &idv, std::ostream *os) {
bool first = true;
for (int64_t id : idv) {
if (!first) (*os) << ",";
(*os) << id;
first = false;
}
}
eng::string id_vector_debug_string(const IdVector &idv) {
eng::ostringstream oss;
@@ -518,10 +527,17 @@ IdVector sort_union_id_vectors(const IdVector &v1, const IdVector &v2) {
return result;
}
HashValue hash_string(const eng::string &s) {
HashValue hash_string(std::string_view s) {
uint64_t hash1 = 0;
uint64_t hash2 = 0;
SpookyHash::ChainHash128(s.c_str(), s.size(), &hash1, &hash2);
SpookyHash::ChainHash128(s.data(), s.size(), &hash1, &hash2);
return util::HashValue(hash1, hash2);
}
HashValue hash_string(HashValue prev, std::string_view s) {
uint64_t hash1 = prev.first;
uint64_t hash2 = prev.second;
SpookyHash::ChainHash128(s.data(), s.size(), &hash1, &hash2);
return util::HashValue(hash1, hash2);
}
@@ -718,11 +734,6 @@ LuaSourcePtr make_lua_source(const eng::string &code) {
return result;
}
eng::string XYZ::debug_string() const {
eng::ostringstream oss;
oss << "(" << x << "," << y << "," << z << ")";
return oss.str();
}
void (*dprint_hook)(const char *oneline, size_t size);