Renamed object_storage to objset_info_storage

This commit is contained in:
korenkonder
2024-06-09 00:30:26 +03:00
parent b06c8535ba
commit 2e5283842c
26 changed files with 267 additions and 267 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ namespace Glitter {
EffectGroup::~EffectGroup() {
for (Mesh& i : meshes)
if (i.object_set_hash != hash_murmurhash_empty) {
object_storage_unload_set(i.object_set_hash);
objset_info_storage_unload_set(i.object_set_hash);
i.load = false;
}
+8 -8
View File
@@ -395,11 +395,11 @@ namespace Glitter {
if (ext_anim->mesh_name) {
if (ext_anim->mesh_index == -1)
ext_anim->mesh_index = object_storage_get_obj_mesh_index(
ext_anim->mesh_index = objset_info_storage_get_obj_mesh_index(
ext_anim->object, ext_anim->mesh_name);
if (ext_anim->mesh_index != -1) {
obj_mesh* mesh = object_storage_get_obj_mesh_by_index(
obj_mesh* mesh = objset_info_storage_get_obj_mesh_by_index(
ext_anim->object, ext_anim->mesh_index);
if (mesh) {
mat4_mul(obj_mat, &mat, &mat);
@@ -425,12 +425,12 @@ namespace Glitter {
if (!ext_anim->mesh_name)
return;
ext_anim->mesh_index = object_storage_get_obj_mesh_index(
ext_anim->mesh_index = objset_info_storage_get_obj_mesh_index(
ext_anim->object, ext_anim->mesh_name);
}
if (ext_anim->mesh_index != -1) {
obj_mesh* mesh = object_storage_get_obj_mesh_by_index(ext_anim->object,
obj_mesh* mesh = objset_info_storage_get_obj_mesh_by_index(ext_anim->object,
ext_anim->mesh_index);
if (mesh) {
ext_anim->translation = mesh->bounding_sphere.center;
@@ -972,11 +972,11 @@ namespace Glitter {
if (ext_anim->mesh_name) {
if (ext_anim->mesh_index == -1)
ext_anim->mesh_index = object_storage_get_obj_mesh_index_by_hash(
ext_anim->mesh_index = objset_info_storage_get_obj_mesh_index_by_hash(
ext_anim->object_hash, ext_anim->mesh_name);
if (ext_anim->mesh_index != -1) {
obj_mesh* mesh = object_storage_get_obj_mesh_by_object_hash_index(
obj_mesh* mesh = objset_info_storage_get_obj_mesh_by_object_hash_index(
ext_anim->object_hash, ext_anim->mesh_index);
if (mesh) {
vec3* trans = &mesh->bounding_sphere.center;
@@ -993,12 +993,12 @@ namespace Glitter {
if (!ext_anim->mesh_name)
return;
ext_anim->mesh_index = object_storage_get_obj_mesh_index_by_hash(
ext_anim->mesh_index = objset_info_storage_get_obj_mesh_index_by_hash(
ext_anim->object_hash, ext_anim->mesh_name);
}
if (ext_anim->mesh_index != -1) {
obj_mesh* mesh = object_storage_get_obj_mesh_by_object_hash_index(
obj_mesh* mesh = objset_info_storage_get_obj_mesh_by_object_hash_index(
ext_anim->object_hash, ext_anim->mesh_index);
if (mesh) {
vec3* trans = &mesh->bounding_sphere.center;
+2 -2
View File
@@ -80,7 +80,7 @@ namespace Glitter {
if (type == Glitter::X)
for (Mesh& i : effect_group->meshes)
if (!i.ready && i.object_set_hash != hash_murmurhash_empty && i.object_set_hash != -1)
if (object_storage_load_obj_set_check_not_read(i.object_set_hash, obj_db, tex_db))
if (objset_info_storage_load_obj_set_check_not_read(i.object_set_hash, obj_db, tex_db))
ret = true;
else
i.ready = true;
@@ -237,7 +237,7 @@ namespace Glitter {
if (type == Glitter::X)
for (Mesh& i : eff_group->meshes)
if (i.object_set_hash != hash_murmurhash_empty) {
object_storage_load_set_hash(file_handler->ptr->ds, i.object_set_hash);
objset_info_storage_load_set_hash(file_handler->ptr->ds, i.object_set_hash);
i.load = true;
}
+1 -1
View File
@@ -1458,7 +1458,7 @@ namespace Glitter {
object_info object_info;
object_info.set_id = (uint32_t)particle->data.mesh.object_set_name_hash;
object_info.id = (uint32_t)particle->data.mesh.object_name_hash;
obj* obj = object_storage_get_obj(object_info);
obj* obj = objset_info_storage_get_obj(object_info);
if (!obj)
return;
+2 -2
View File
@@ -6630,7 +6630,7 @@ static void auth_3d_object_hrc_load(auth_3d* auth, auth_3d_object_hrc* oh,
oh->object_info = obj_db->get_object_info(oh->uid_name.c_str());
oh->object_hash = hash_string_murmurhash(oh->uid_name);
obj_skin* skin = object_storage_get_obj_skin(oh->object_info);
obj_skin* skin = objset_info_storage_get_obj_skin(oh->object_info);
if (!skin)
return;
@@ -6714,7 +6714,7 @@ static void auth_3d_object_instance_load(auth_3d* auth, auth_3d_object_instance*
oi->object_info = obj_db->get_object_info(oi->uid_name.c_str());
oi->object_hash = hash_string_murmurhash(oi->uid_name);
obj_skin* skin = object_storage_get_obj_skin(oi->object_info);
obj_skin* skin = objset_info_storage_get_obj_skin(oi->object_info);
if (!skin)
return;
+5 -5
View File
@@ -5348,7 +5348,7 @@ bool EffectManager::load() {
if (!modern) {
bool wait_load = false;
for (uint32_t i : obj_set_ids)
if (object_storage_load_obj_set_check_not_read(i))
if (objset_info_storage_load_obj_set_check_not_read(i))
wait_load |= true;
if (wait_load)
@@ -5391,7 +5391,7 @@ bool EffectManager::load() {
bool wait_load = false;
for (uint32_t i : obj_set_ids)
if (object_storage_load_obj_set_check_not_read(i, obj_db, tex_db))
if (objset_info_storage_load_obj_set_check_not_read(i, obj_db, tex_db))
wait_load = true;
if (wait_load)
@@ -5524,7 +5524,7 @@ void EffectManager::set_stage_hashes(const std::vector<uint32_t>& stage_hashes)
prj::sort_unique(obj_set_ids);
for (uint32_t i : obj_set_ids)
object_storage_load_set_hash(data, i);
objset_info_storage_load_set_hash(data, i);
state = 1;
}
@@ -5560,7 +5560,7 @@ void EffectManager::set_stage_indices(const std::vector<int32_t>& stage_indices)
prj::sort_unique(obj_set_ids);
for (uint32_t i : obj_set_ids)
object_storage_load_set(aft_data, aft_obj_db, i);
objset_info_storage_load_set(aft_data, aft_obj_db, i);
state = 1;
}
@@ -5575,7 +5575,7 @@ bool EffectManager::unload() {
return true;
for (uint32_t& i : obj_set_ids)
object_storage_unload_set(i);
objset_info_storage_unload_set(i);
reset_data();
return false;
+7 -7
View File
@@ -2759,19 +2759,19 @@ namespace mdl {
if (obj_info.id == -1 && obj_info.set_id == -1)
return false;
::obj* object = object_storage_get_obj(obj_info);
::obj* object = objset_info_storage_get_obj(obj_info);
if (!object)
return false;
std::vector<GLuint>* textures = object_storage_get_obj_set_textures(obj_info.set_id);
obj_mesh_vertex_buffer* obj_vertex_buffer = object_storage_get_obj_mesh_vertex_buffer(obj_info);
obj_mesh_index_buffer* obj_index_buffer = object_storage_get_obj_mesh_index_buffer(obj_info);
std::vector<GLuint>* textures = objset_info_storage_get_obj_set_textures(obj_info.set_id);
obj_mesh_vertex_buffer* obj_vertex_buffer = objset_info_storage_get_obj_mesh_vertex_buffer(obj_info);
obj_mesh_index_buffer* obj_index_buffer = objset_info_storage_get_obj_mesh_index_buffer(obj_info);
::obj* obj_morph = 0;
obj_mesh_vertex_buffer* obj_morph_vertex_buffer = 0;
if (morph.object.set_id != -1) {
obj_morph = object_storage_get_obj(morph.object);
obj_morph_vertex_buffer = object_storage_get_obj_mesh_vertex_buffer(morph.object);
obj_morph = objset_info_storage_get_obj(morph.object);
obj_morph_vertex_buffer = objset_info_storage_get_obj_mesh_vertex_buffer(morph.object);
}
return entry_obj(object, obj_vertex_buffer, obj_index_buffer,
@@ -2821,7 +2821,7 @@ namespace mdl {
const std::vector<texture_pattern_struct>* texture_pattern,
const texture_data_struct* texture_data, float_t alpha,
const mat4* matrices, const mat4* ex_data_matrices, const mat4* mat, const mat4* global_mat) {
obj_skin* skin = object_storage_get_obj_skin(obj_info);
obj_skin* skin = objset_info_storage_get_obj_skin(obj_info);
if (!skin)
return;
+93 -93
View File
@@ -41,8 +41,8 @@ static uint32_t obj_vertex_format_get_vertex_size(obj_vertex_format format);
static uint32_t obj_vertex_format_get_vertex_size_comp1(obj_vertex_format format);
static uint32_t obj_vertex_format_get_vertex_size_comp2(obj_vertex_format format);
std::map<uint32_t, ObjsetInfo> object_storage_data;
std::map<uint32_t, ObjsetInfo> object_storage_data_modern;
std::map<uint32_t, ObjsetInfo> objset_info_storage_data;
std::map<uint32_t, ObjsetInfo> objset_info_storage_data_modern;
obj_mesh_index_buffer::obj_mesh_index_buffer() : buffer() {
@@ -1603,19 +1603,19 @@ void object_material_msgpack_write(const char* path, const char* set_name, uint3
}
}
inline void object_storage_init(const object_database* obj_db) {
inline void objset_info_storage_init(const object_database* obj_db) {
for (const object_set_info& i : obj_db->object_set) {
ObjsetInfo info;
info.set_id = i.id;
info.name.assign(i.name);
object_storage_data.insert({ i.id, info });
objset_info_storage_data.insert({ i.id, info });
}
object_storage_data_modern.clear();
objset_info_storage_data_modern.clear();
}
inline obj* object_storage_get_obj(object_info obj_info) {
auto elem = object_storage_data.find(obj_info.set_id);
if (elem != object_storage_data.end()) {
inline obj* objset_info_storage_get_obj(object_info obj_info) {
auto elem = objset_info_storage_data.find(obj_info.set_id);
if (elem != objset_info_storage_data.end()) {
obj_set* set = elem->second.obj_set;
if (!set)
return 0;
@@ -1626,8 +1626,8 @@ inline obj* object_storage_get_obj(object_info obj_info) {
return 0;
}
auto elem_modern = object_storage_data_modern.find(obj_info.set_id);
if (elem_modern != object_storage_data_modern.end()) {
auto elem_modern = objset_info_storage_data_modern.find(obj_info.set_id);
if (elem_modern != objset_info_storage_data_modern.end()) {
obj_set* set = elem_modern->second.obj_set;
if (!set)
return 0;
@@ -1640,9 +1640,9 @@ inline obj* object_storage_get_obj(object_info obj_info) {
return 0;
}
inline obj* object_storage_get_obj_by_index(uint32_t set_id, uint32_t index) {
auto elem = object_storage_data.find(set_id);
if (elem != object_storage_data.end()) {
inline obj* objset_info_storage_get_obj_by_index(uint32_t set_id, uint32_t index) {
auto elem = objset_info_storage_data.find(set_id);
if (elem != objset_info_storage_data.end()) {
obj_set* set = elem->second.obj_set;
if (!set)
return 0;
@@ -1652,8 +1652,8 @@ inline obj* object_storage_get_obj_by_index(uint32_t set_id, uint32_t index) {
return 0;
}
auto elem_modern = object_storage_data_modern.find(set_id);
if (elem_modern != object_storage_data_modern.end()) {
auto elem_modern = objset_info_storage_data_modern.find(set_id);
if (elem_modern != objset_info_storage_data_modern.end()) {
obj_set* set = elem_modern->second.obj_set;
if (!set)
return 0;
@@ -1665,20 +1665,20 @@ inline obj* object_storage_get_obj_by_index(uint32_t set_id, uint32_t index) {
return 0;
}
inline ObjsetInfo* object_storage_get_objset_info(uint32_t set_id) {
auto elem = object_storage_data.find(set_id);
if (elem != object_storage_data.end())
inline ObjsetInfo* objset_info_storage_get_objset_info(uint32_t set_id) {
auto elem = objset_info_storage_data.find(set_id);
if (elem != objset_info_storage_data.end())
return &elem->second;
auto elem_modern = object_storage_data_modern.find(set_id);
if (elem_modern != object_storage_data_modern.end())
auto elem_modern = objset_info_storage_data_modern.find(set_id);
if (elem_modern != objset_info_storage_data_modern.end())
return &elem_modern->second;
return 0;
}
inline obj_mesh* object_storage_get_obj_mesh(object_info obj_info, const char* mesh_name) {
auto elem = object_storage_data.find(obj_info.set_id);
if (elem != object_storage_data.end()) {
inline obj_mesh* objset_info_storage_get_obj_mesh(object_info obj_info, const char* mesh_name) {
auto elem = objset_info_storage_data.find(obj_info.set_id);
if (elem != objset_info_storage_data.end()) {
obj_set* set = elem->second.obj_set;
if (!set)
return 0;
@@ -1689,8 +1689,8 @@ inline obj_mesh* object_storage_get_obj_mesh(object_info obj_info, const char* m
return 0;
}
auto elem_modern = object_storage_data_modern.find(obj_info.set_id);
if (elem_modern != object_storage_data_modern.end()) {
auto elem_modern = objset_info_storage_data_modern.find(obj_info.set_id);
if (elem_modern != objset_info_storage_data_modern.end()) {
obj_set* set = elem_modern->second.obj_set;
if (!set)
return 0;
@@ -1703,9 +1703,9 @@ inline obj_mesh* object_storage_get_obj_mesh(object_info obj_info, const char* m
return 0;
}
inline obj_mesh* object_storage_get_obj_mesh_by_index(object_info obj_info, uint32_t index) {
auto elem = object_storage_data.find(obj_info.set_id);
if (elem != object_storage_data.end()) {
inline obj_mesh* objset_info_storage_get_obj_mesh_by_index(object_info obj_info, uint32_t index) {
auto elem = objset_info_storage_data.find(obj_info.set_id);
if (elem != objset_info_storage_data.end()) {
obj_set* set = elem->second.obj_set;
if (!set)
return 0;
@@ -1719,8 +1719,8 @@ inline obj_mesh* object_storage_get_obj_mesh_by_index(object_info obj_info, uint
return 0;
}
auto elem_modern = object_storage_data_modern.find(obj_info.set_id);
if (elem_modern != object_storage_data_modern.end()) {
auto elem_modern = objset_info_storage_data_modern.find(obj_info.set_id);
if (elem_modern != objset_info_storage_data_modern.end()) {
obj_set* set = elem_modern->second.obj_set;
if (!set)
return 0;
@@ -1736,8 +1736,8 @@ inline obj_mesh* object_storage_get_obj_mesh_by_index(object_info obj_info, uint
return 0;
}
inline obj_mesh* object_storage_get_obj_mesh_by_object_hash(uint32_t hash, const char* mesh_name) {
for (auto& i : object_storage_data) {
inline obj_mesh* objset_info_storage_get_obj_mesh_by_object_hash(uint32_t hash, const char* mesh_name) {
for (auto& i : objset_info_storage_data) {
obj_set* set = i.second.obj_set;
if (!set)
continue;
@@ -1747,7 +1747,7 @@ inline obj_mesh* object_storage_get_obj_mesh_by_object_hash(uint32_t hash, const
return set->obj_data[j]->get_obj_mesh(mesh_name);
}
for (auto& i : object_storage_data_modern) {
for (auto& i : objset_info_storage_data_modern) {
obj_set* set = i.second.obj_set;
if (!set)
continue;
@@ -1759,8 +1759,8 @@ inline obj_mesh* object_storage_get_obj_mesh_by_object_hash(uint32_t hash, const
return 0;
}
inline obj_mesh* object_storage_get_obj_mesh_by_object_hash_index(uint32_t hash, uint32_t index) {
for (auto& i : object_storage_data) {
inline obj_mesh* objset_info_storage_get_obj_mesh_by_object_hash_index(uint32_t hash, uint32_t index) {
for (auto& i : objset_info_storage_data) {
obj_set* set = i.second.obj_set;
if (!set)
continue;
@@ -1776,7 +1776,7 @@ inline obj_mesh* object_storage_get_obj_mesh_by_object_hash_index(uint32_t hash,
}
}
for (auto& i : object_storage_data_modern) {
for (auto& i : objset_info_storage_data_modern) {
obj_set* set = i.second.obj_set;
if (!set)
continue;
@@ -1794,9 +1794,9 @@ inline obj_mesh* object_storage_get_obj_mesh_by_object_hash_index(uint32_t hash,
return 0;
}
inline uint32_t object_storage_get_obj_mesh_index(object_info obj_info, const char* mesh_name) {
auto elem = object_storage_data.find(obj_info.set_id);
if (elem != object_storage_data.end()) {
inline uint32_t objset_info_storage_get_obj_mesh_index(object_info obj_info, const char* mesh_name) {
auto elem = objset_info_storage_data.find(obj_info.set_id);
if (elem != objset_info_storage_data.end()) {
obj_set* set = elem->second.obj_set;
if (!set)
return -1;
@@ -1807,8 +1807,8 @@ inline uint32_t object_storage_get_obj_mesh_index(object_info obj_info, const ch
return 0;
}
auto elem_modern = object_storage_data_modern.find(obj_info.set_id);
if (elem_modern != object_storage_data_modern.end()) {
auto elem_modern = objset_info_storage_data_modern.find(obj_info.set_id);
if (elem_modern != objset_info_storage_data_modern.end()) {
obj_set* set = elem_modern->second.obj_set;
if (!set)
return -1;
@@ -1821,8 +1821,8 @@ inline uint32_t object_storage_get_obj_mesh_index(object_info obj_info, const ch
return -1;
}
inline uint32_t object_storage_get_obj_mesh_index_by_hash(uint32_t hash, const char* mesh_name) {
for (auto& i : object_storage_data) {
inline uint32_t objset_info_storage_get_obj_mesh_index_by_hash(uint32_t hash, const char* mesh_name) {
for (auto& i : objset_info_storage_data) {
obj_set* set = i.second.obj_set;
if (!set)
continue;
@@ -1832,7 +1832,7 @@ inline uint32_t object_storage_get_obj_mesh_index_by_hash(uint32_t hash, const c
return set->obj_data[j]->get_obj_mesh_index(mesh_name);
}
for (auto& i : object_storage_data_modern) {
for (auto& i : objset_info_storage_data_modern) {
obj_set* set = i.second.obj_set;
if (!set)
continue;
@@ -1844,42 +1844,42 @@ inline uint32_t object_storage_get_obj_mesh_index_by_hash(uint32_t hash, const c
return -1;
}
inline const char* object_storage_get_obj_name(object_info obj_info) {
obj* obj = object_storage_get_obj(obj_info);
inline const char* objset_info_storage_get_obj_name(object_info obj_info) {
obj* obj = objset_info_storage_get_obj(obj_info);
if (obj)
return obj->name;
return 0;
}
inline obj_set* object_storage_get_obj_set(uint32_t set_id) {
auto elem = object_storage_data.find(set_id);
if (elem != object_storage_data.end())
inline obj_set* objset_info_storage_get_obj_set(uint32_t set_id) {
auto elem = objset_info_storage_data.find(set_id);
if (elem != objset_info_storage_data.end())
return elem->second.obj_set;
auto elem_modern = object_storage_data_modern.find(set_id);
if (elem_modern != object_storage_data_modern.end())
auto elem_modern = objset_info_storage_data_modern.find(set_id);
if (elem_modern != objset_info_storage_data_modern.end())
return elem_modern->second.obj_set;
return 0;
}
inline size_t object_storage_get_obj_set_count() {
return object_storage_data.size() + object_storage_data_modern.size();
inline size_t objset_info_storage_get_obj_set_count() {
return objset_info_storage_data.size() + objset_info_storage_data_modern.size();
}
inline int32_t object_storage_get_obj_storage_load_count(uint32_t set_id) {
auto elem = object_storage_data.find(set_id);
if (elem != object_storage_data.end())
inline int32_t objset_info_storage_get_obj_storage_load_count(uint32_t set_id) {
auto elem = objset_info_storage_data.find(set_id);
if (elem != objset_info_storage_data.end())
return elem->second.load_count;
auto elem_modern = object_storage_data_modern.find(set_id);
if (elem_modern != object_storage_data_modern.end())
auto elem_modern = objset_info_storage_data_modern.find(set_id);
if (elem_modern != objset_info_storage_data_modern.end())
return elem_modern->second.load_count;
return 0;
}
inline obj_skin* object_storage_get_obj_skin(object_info obj_info) {
auto elem = object_storage_data.find(obj_info.set_id);
if (elem != object_storage_data.end()) {
inline obj_skin* objset_info_storage_get_obj_skin(object_info obj_info) {
auto elem = objset_info_storage_data.find(obj_info.set_id);
if (elem != objset_info_storage_data.end()) {
obj_set* set = elem->second.obj_set;
if (!set)
return 0;
@@ -1890,8 +1890,8 @@ inline obj_skin* object_storage_get_obj_skin(object_info obj_info) {
return 0;
}
auto elem_modern = object_storage_data_modern.find(obj_info.set_id);
if (elem_modern != object_storage_data_modern.end()) {
auto elem_modern = objset_info_storage_data_modern.find(obj_info.set_id);
if (elem_modern != objset_info_storage_data_modern.end()) {
obj_set* set = elem_modern->second.obj_set;
if (!set)
return 0;
@@ -1904,15 +1904,15 @@ inline obj_skin* object_storage_get_obj_skin(object_info obj_info) {
return 0;
}
inline obj_index_buffer* object_storage_get_obj_index_buffers(uint32_t set_id) {
ObjsetInfo* info = object_storage_get_objset_info(set_id);
inline obj_index_buffer* objset_info_storage_get_obj_index_buffers(uint32_t set_id) {
ObjsetInfo* info = objset_info_storage_get_objset_info(set_id);
if (info && info->objib)
return info->objib;
return 0;
}
inline obj_mesh_index_buffer* object_storage_get_obj_mesh_index_buffer(object_info obj_info) {
ObjsetInfo* info = object_storage_get_objset_info(obj_info.set_id);
inline obj_mesh_index_buffer* objset_info_storage_get_obj_mesh_index_buffer(object_info obj_info) {
ObjsetInfo* info = objset_info_storage_get_objset_info(obj_info.set_id);
if (info && info->obj_set && info->objib) {
auto elem = info->obj_id_data.find(obj_info.id);
if (elem != info->obj_id_data.end())
@@ -1921,15 +1921,15 @@ inline obj_mesh_index_buffer* object_storage_get_obj_mesh_index_buffer(object_in
return 0;
}
inline obj_vertex_buffer* object_storage_get_obj_vertex_buffers(uint32_t set_id) {
ObjsetInfo* info = object_storage_get_objset_info(set_id);
inline obj_vertex_buffer* objset_info_storage_get_obj_vertex_buffers(uint32_t set_id) {
ObjsetInfo* info = objset_info_storage_get_objset_info(set_id);
if (info && info->objvb)
return info->objvb;
return 0;
}
inline obj_mesh_vertex_buffer* object_storage_get_obj_mesh_vertex_buffer(object_info obj_info) {
ObjsetInfo* info = object_storage_get_objset_info(obj_info.set_id);
inline obj_mesh_vertex_buffer* objset_info_storage_get_obj_mesh_vertex_buffer(object_info obj_info) {
ObjsetInfo* info = objset_info_storage_get_objset_info(obj_info.set_id);
if (info && info->obj_set && info->objvb) {
auto elem = info->obj_id_data.find(obj_info.id);
if (elem != info->obj_id_data.end())
@@ -1938,12 +1938,12 @@ inline obj_mesh_vertex_buffer* object_storage_get_obj_mesh_vertex_buffer(object_
return 0;
}
GLuint object_storage_get_obj_set_texture(uint32_t set, uint32_t tex_id) {
std::vector<GLuint>* textures = object_storage_get_obj_set_textures(set);
GLuint objset_info_storage_get_obj_set_texture(uint32_t set, uint32_t tex_id) {
std::vector<GLuint>* textures = objset_info_storage_get_obj_set_textures(set);
if (!textures)
return 0;
ObjsetInfo* info = object_storage_get_objset_info(set);
ObjsetInfo* info = objset_info_storage_get_objset_info(set);
if (!info)
return 0;
@@ -1953,19 +1953,19 @@ GLuint object_storage_get_obj_set_texture(uint32_t set, uint32_t tex_id) {
return 0;
}
inline std::vector<GLuint>* object_storage_get_obj_set_textures(int32_t set) {
ObjsetInfo* info = object_storage_get_objset_info(set);
inline std::vector<GLuint>* objset_info_storage_get_obj_set_textures(int32_t set) {
ObjsetInfo* info = objset_info_storage_get_objset_info(set);
if (info)
return &info->gentex;
return 0;
}
int32_t object_storage_load_set(void* data, const object_database* obj_db, const char* name) {
int32_t objset_info_storage_load_set(void* data, const object_database* obj_db, const char* name) {
const object_set_info* set_info = obj_db->get_object_set_info(name);
if (!set_info)
return 1;
ObjsetInfo* info = object_storage_get_objset_info(set_info->id);
ObjsetInfo* info = objset_info_storage_get_objset_info(set_info->id);
if (!info)
return 1;
@@ -1997,12 +1997,12 @@ int32_t object_storage_load_set(void* data, const object_database* obj_db, const
return 0;
}
int32_t object_storage_load_set(void* data, const object_database* obj_db, uint32_t set_id) {
int32_t objset_info_storage_load_set(void* data, const object_database* obj_db, uint32_t set_id) {
const object_set_info* set_info = obj_db->get_object_set_info(set_id);
if (!set_info)
return 1;
ObjsetInfo* info = object_storage_get_objset_info(set_id);
ObjsetInfo* info = objset_info_storage_get_objset_info(set_id);
if (!info)
return 1;
@@ -2036,7 +2036,7 @@ int32_t object_storage_load_set(void* data, const object_database* obj_db, uint3
return 0;
}
int32_t object_storage_load_set_hash(void* data, uint32_t hash) {
int32_t objset_info_storage_load_set_hash(void* data, uint32_t hash) {
if (!hash || hash == hash_murmurhash_empty)
return 1;
@@ -2044,9 +2044,9 @@ int32_t object_storage_load_set_hash(void* data, uint32_t hash) {
if (!((data_struct*)data)->get_file("root+/objset/", hash, ".farc", file))
return 1;
ObjsetInfo* info = object_storage_get_objset_info(hash);
ObjsetInfo* info = objset_info_storage_get_objset_info(hash);
if (!info) {
info = &object_storage_data_modern.insert({ hash, {} }).first->second;
info = &objset_info_storage_data_modern.insert({ hash, {} }).first->second;
info->set_id = hash;
}
@@ -2065,9 +2065,9 @@ int32_t object_storage_load_set_hash(void* data, uint32_t hash) {
return 0;
}
bool object_storage_load_obj_set_check_not_read(uint32_t set_id,
bool objset_info_storage_load_obj_set_check_not_read(uint32_t set_id,
object_database* obj_db, texture_database* tex_db) {
ObjsetInfo* info = object_storage_get_objset_info(set_id);
ObjsetInfo* info = objset_info_storage_get_objset_info(set_id);
if (!info)
return true;
@@ -2226,12 +2226,12 @@ bool object_storage_load_obj_set_check_not_read(uint32_t set_id,
return true;
}
inline void object_storage_unload_set(const object_database* obj_db, const char* name) {
inline void objset_info_storage_unload_set(const object_database* obj_db, const char* name) {
const object_set_info* set_info = obj_db->get_object_set_info(name);
if (!set_info)
return;
ObjsetInfo* info = object_storage_get_objset_info(set_info->id);
ObjsetInfo* info = objset_info_storage_get_objset_info(set_info->id);
if (!info || info->load_count <= 0)
return;
@@ -2258,8 +2258,8 @@ inline void object_storage_unload_set(const object_database* obj_db, const char*
info->farc_file_handler.reset();
}
inline void object_storage_unload_set(uint32_t set_id) {
ObjsetInfo* info = object_storage_get_objset_info(set_id);
inline void objset_info_storage_unload_set(uint32_t set_id) {
ObjsetInfo* info = objset_info_storage_get_objset_info(set_id);
if (!info || info->load_count <= 0)
return;
@@ -2285,12 +2285,12 @@ inline void object_storage_unload_set(uint32_t set_id) {
info->obj_file_handler.reset();
info->farc_file_handler.reset();
if (info->modern)
object_storage_data_modern.erase(set_id);
objset_info_storage_data_modern.erase(set_id);
}
inline void object_storage_free() {
object_storage_data.clear();
object_storage_data_modern.clear();
inline void objset_info_storage_free() {
objset_info_storage_data.clear();
objset_info_storage_data_modern.clear();
}
static GLuint create_index_buffer(size_t size, const void* data) {
+28 -28
View File
@@ -120,32 +120,32 @@ extern void object_material_msgpack_read(const char* path, const char* set_name,
extern void object_material_msgpack_write(const char* path, const char* set_name, uint32_t set_id,
obj_set* obj_set, txp_set* txp_set, object_database* obj_db, texture_database* tex_db);
extern void object_storage_init(const object_database* obj_db);
extern obj* object_storage_get_obj(object_info obj_info);
extern obj* object_storage_get_obj_by_index(uint32_t set_id, uint32_t index);
extern ObjsetInfo* object_storage_get_objset_info(uint32_t set_id);
extern obj_mesh* object_storage_get_obj_mesh(object_info obj_info, const char* mesh_name);
extern obj_mesh* object_storage_get_obj_mesh_by_index(object_info obj_info, uint32_t index);
extern obj_mesh* object_storage_get_obj_mesh_by_object_hash(uint32_t hash, const char* mesh_name);
extern obj_mesh* object_storage_get_obj_mesh_by_object_hash_index(uint32_t hash, uint32_t index);
extern uint32_t object_storage_get_obj_mesh_index(object_info obj_info, const char* mesh_name);
extern uint32_t object_storage_get_obj_mesh_index_by_hash(uint32_t hash, const char* mesh_name);
extern const char* object_storage_get_obj_name(object_info obj_info);
extern obj_set* object_storage_get_obj_set(uint32_t set_id);
extern size_t object_storage_get_obj_set_count();
extern int32_t object_storage_get_obj_storage_load_count(uint32_t set_id);
extern obj_skin* object_storage_get_obj_skin(object_info obj_info);
extern obj_index_buffer* object_storage_get_obj_index_buffers(uint32_t set_id);
extern obj_mesh_index_buffer* object_storage_get_obj_mesh_index_buffer(object_info obj_info);
extern obj_vertex_buffer* object_storage_get_obj_vertex_buffers(uint32_t set_id);
extern obj_mesh_vertex_buffer* object_storage_get_obj_mesh_vertex_buffer(object_info obj_info);
extern GLuint object_storage_get_obj_set_texture(uint32_t set, uint32_t tex_id);
extern std::vector<GLuint>* object_storage_get_obj_set_textures(int32_t set);
extern int32_t object_storage_load_set(void* data, const object_database* obj_db, const char* name);
extern int32_t object_storage_load_set(void* data, const object_database* obj_db, uint32_t set_id);
extern int32_t object_storage_load_set_hash(void* data, uint32_t hash);
extern bool object_storage_load_obj_set_check_not_read(uint32_t set_id,
extern void objset_info_storage_init(const object_database* obj_db);
extern obj* objset_info_storage_get_obj(object_info obj_info);
extern obj* objset_info_storage_get_obj_by_index(uint32_t set_id, uint32_t index);
extern ObjsetInfo* objset_info_storage_get_objset_info(uint32_t set_id);
extern obj_mesh* objset_info_storage_get_obj_mesh(object_info obj_info, const char* mesh_name);
extern obj_mesh* objset_info_storage_get_obj_mesh_by_index(object_info obj_info, uint32_t index);
extern obj_mesh* objset_info_storage_get_obj_mesh_by_object_hash(uint32_t hash, const char* mesh_name);
extern obj_mesh* objset_info_storage_get_obj_mesh_by_object_hash_index(uint32_t hash, uint32_t index);
extern uint32_t objset_info_storage_get_obj_mesh_index(object_info obj_info, const char* mesh_name);
extern uint32_t objset_info_storage_get_obj_mesh_index_by_hash(uint32_t hash, const char* mesh_name);
extern const char* objset_info_storage_get_obj_name(object_info obj_info);
extern obj_set* objset_info_storage_get_obj_set(uint32_t set_id);
extern size_t objset_info_storage_get_obj_set_count();
extern int32_t objset_info_storage_get_obj_storage_load_count(uint32_t set_id);
extern obj_skin* objset_info_storage_get_obj_skin(object_info obj_info);
extern obj_index_buffer* objset_info_storage_get_obj_index_buffers(uint32_t set_id);
extern obj_mesh_index_buffer* objset_info_storage_get_obj_mesh_index_buffer(object_info obj_info);
extern obj_vertex_buffer* objset_info_storage_get_obj_vertex_buffers(uint32_t set_id);
extern obj_mesh_vertex_buffer* objset_info_storage_get_obj_mesh_vertex_buffer(object_info obj_info);
extern GLuint objset_info_storage_get_obj_set_texture(uint32_t set, uint32_t tex_id);
extern std::vector<GLuint>* objset_info_storage_get_obj_set_textures(int32_t set);
extern int32_t objset_info_storage_load_set(void* data, const object_database* obj_db, const char* name);
extern int32_t objset_info_storage_load_set(void* data, const object_database* obj_db, uint32_t set_id);
extern int32_t objset_info_storage_load_set_hash(void* data, uint32_t hash);
extern bool objset_info_storage_load_obj_set_check_not_read(uint32_t set_id,
object_database* obj_db = 0, texture_database* tex_db = 0);
extern void object_storage_unload_set(const object_database* obj_db, const char* name);
extern void object_storage_unload_set(uint32_t set_id);
extern void object_storage_free();
extern void objset_info_storage_unload_set(const object_database* obj_db, const char* name);
extern void objset_info_storage_unload_set(uint32_t set_id);
extern void objset_info_storage_free();
+1 -1
View File
@@ -380,7 +380,7 @@ namespace rndr {
if (!lens_flare_texture)
return;
GLuint tex = object_storage_get_obj_set_texture(5, 4549);
GLuint tex = objset_info_storage_get_obj_set_texture(5, 4549);
if (!tex)
return;
+7 -7
View File
@@ -1001,11 +1001,11 @@ void RobCloth::ColiSet(const mat4* transform) {
}
void RobCloth::Disp(const mat4* mat, render_context* rctx) {
obj* obj = object_storage_get_obj(itm_eq_obj->obj_info);
obj* obj = objset_info_storage_get_obj(itm_eq_obj->obj_info);
if (!obj)
return;
std::vector<GLuint>* tex = object_storage_get_obj_set_textures(itm_eq_obj->obj_info.set_id);
std::vector<GLuint>* tex = objset_info_storage_get_obj_set_textures(itm_eq_obj->obj_info.set_id);
vec3 center = (nodes.data()[0].trans + nodes.data()[root_count * nodes_count - 1].trans) * 0.5f;
@@ -1033,11 +1033,11 @@ void RobCloth::InitData(size_t root_count, size_t nodes_count, obj_skin_block_cl
obj_skin_block_cloth_node* nodes, mat4* mats, int32_t a7,
rob_chara_item_equip_object* itm_eq_obj, const bone_database* bone_data) {
this->itm_eq_obj = itm_eq_obj;
obj* obj = object_storage_get_obj(itm_eq_obj->obj_info);
obj* obj = objset_info_storage_get_obj(itm_eq_obj->obj_info);
if (!obj)
return;
obj_mesh_index_buffer* index_buffer = object_storage_get_obj_mesh_index_buffer(itm_eq_obj->obj_info);
obj_mesh_index_buffer* index_buffer = objset_info_storage_get_obj_mesh_index_buffer(itm_eq_obj->obj_info);
uint32_t mesh_name_index = obj->get_obj_mesh_index(cls_data->mesh_name);
uint32_t backface_mesh_name_index = obj->get_obj_mesh_index(cls_data->backface_mesh_name);
@@ -1117,7 +1117,7 @@ void RobCloth::InitData(size_t root_count, size_t nodes_count, obj_skin_block_cl
for (size_t i = 0; i < cls_data->num_mesh_index; i++)
index_array.data()[mesh_index_array[i]] = i;
obj_mesh* mesh = object_storage_get_obj_mesh(itm_eq_obj->obj_info, cls_data->mesh_name);
obj_mesh* mesh = objset_info_storage_get_obj_mesh(itm_eq_obj->obj_info, cls_data->mesh_name);
obj_vertex_format vertex_format = (obj_vertex_format)0;
obj_vertex_data* vertex_array = 0;
if (mesh) {
@@ -1351,8 +1351,8 @@ void RobCloth::UpdateDisp() {
UpdateNormals();
if (rob_cloth_update_vertices_flags & 0x02) {
obj_mesh* mesh = object_storage_get_obj_mesh(itm_eq_obj->obj_info, cls_data->mesh_name);
obj_mesh* backface_mesh = object_storage_get_obj_mesh(itm_eq_obj->obj_info, cls_data->backface_mesh_name);
obj_mesh* mesh = objset_info_storage_get_obj_mesh(itm_eq_obj->obj_info, cls_data->mesh_name);
obj_mesh* backface_mesh = objset_info_storage_get_obj_mesh(itm_eq_obj->obj_info, cls_data->backface_mesh_name);
if (cls_data->backface_mesh_name) {
UpdateVertexBuffer(mesh, &vertex_buffer[0], nodes.data(),
1.0f, cls_data->num_mesh_index, cls_data->mesh_index_array, false);
+18 -18
View File
@@ -13653,7 +13653,7 @@ void rob_chara_item_equip_object::load_object_info_ex_data(object_info obj_info,
ex_data_bone_mats.clear();
clear_ex_data();
obj_skin* skin = object_storage_get_obj_skin(this->obj_info);
obj_skin* skin = objset_info_storage_get_obj_skin(this->obj_info);
if (!skin)
return;
@@ -16133,7 +16133,7 @@ void OpdMaker::Data::ReadOpdiFiles(rob_chara* rob_chr, std::vector<uint32_t>& mo
continue;
object_info obj_info = itm_eq_obj->obj_info;
const char* object_name = object_storage_get_obj_name(obj_info);
const char* object_name = objset_info_storage_get_obj_name(obj_info);
if (!object_name)
continue;
@@ -16467,7 +16467,7 @@ bool OpdMakeWorker::ctrl() {
for (int32_t i = ITEM_KAMI; i < ITEM_MAX; i++) {
rob_chara_item_equip_object* itm_eq_obj = rob_chr->item_equip->get_item_equip_object((item_id)i);
if (!object_storage_get_obj_name(itm_eq_obj->obj_info) && itm_eq_obj->osage_nodes_count)
if (!objset_info_storage_get_obj_name(itm_eq_obj->obj_info) && itm_eq_obj->osage_nodes_count)
continue;
int32_t j = ITEM_ATAMA;
@@ -16869,7 +16869,7 @@ void opd_chara_data::encode_data() {
continue;
object_info obj_info = itm_eq_obj->obj_info;
const char* object_name = object_storage_get_obj_name(obj_info);
const char* object_name = objset_info_storage_get_obj_name(obj_info);
if (!object_name)
continue;
@@ -16952,7 +16952,7 @@ void opd_chara_data::encode_init_data(uint32_t motion_id) {
continue;
object_info obj_info = itm_eq_obj->obj_info;
const char* object_name = object_storage_get_obj_name(obj_info);
const char* object_name = objset_info_storage_get_obj_name(obj_info);
if (!object_name)
continue;
@@ -17077,7 +17077,7 @@ void opd_chara_data::open_opd_file() {
if (!path_check_directory_exists(chara_dir.c_str()))
path_create_directory(chara_dir.c_str());
const char* object_name = object_storage_get_obj_name(itm_eq_obj->obj_info);
const char* object_name = objset_info_storage_get_obj_name(itm_eq_obj->obj_info);
if (!object_name)
continue;
@@ -17107,7 +17107,7 @@ void opd_chara_data::open_opdi_file() {
if (!path_check_directory_exists(chara_dir.c_str()))
path_create_directory(chara_dir.c_str());
const char* object_name = object_storage_get_obj_name(itm_eq_obj->obj_info);
const char* object_name = objset_info_storage_get_obj_name(itm_eq_obj->obj_info);
if (!object_name)
continue;
@@ -17358,7 +17358,7 @@ void OsagePlayDataManager::LoadOpdFileList() {
if (elem != opd_file_data.end())
continue;
const char* object_name = object_storage_get_obj_name(i.first);
const char* object_name = objset_info_storage_get_obj_name(i.first);
if (!object_name)
continue;
@@ -18211,7 +18211,7 @@ void rob_chara_age_age_object::disp(render_context* rctx, size_t chara_index,
}
bool rob_chara_age_age_object::get_objset_info_obj_index(object_info obj_info) {
objset_info = object_storage_get_objset_info(obj_info.set_id);
objset_info = objset_info_storage_get_objset_info(obj_info.set_id);
if (!objset_info)
return false;
@@ -20020,7 +20020,7 @@ void TaskRobLoad::LoadCharaItem(chara_index chara_index,
for (uint32_t i : *item_objset)
if (i != (uint32_t)-1)
object_storage_load_set(data, obj_db, i);
objset_info_storage_load_set(data, obj_db, i);
}
bool TaskRobLoad::LoadCharaItemCheckNotRead(chara_index chara_index, int32_t item_no) {
@@ -20033,7 +20033,7 @@ bool TaskRobLoad::LoadCharaItemCheckNotRead(chara_index chara_index, int32_t ite
return true;
for (uint32_t i : *item_objset)
if (i != (uint32_t)-1 && object_storage_load_obj_set_check_not_read(i))
if (i != (uint32_t)-1 && objset_info_storage_load_obj_set_check_not_read(i))
return true;
return false;
}
@@ -20053,20 +20053,20 @@ bool TaskRobLoad::LoadCharaItemsCheckNotRead(chara_index chara_index, item_cos_d
bool TaskRobLoad::LoadCharaItemsCheckNotReadParent(chara_index chara_index, item_cos_data* cos) {
return TaskRobLoad::LoadCharaItemsCheckNotRead(chara_index, cos)
|| cos->data.kami == 649 && object_storage_load_obj_set_check_not_read(3291);
|| cos->data.kami == 649 && objset_info_storage_load_obj_set_check_not_read(3291);
}
void TaskRobLoad::LoadCharaItemsParent(chara_index chara_index,
item_cos_data* cos, void* data, const object_database* obj_db) {
LoadCharaItems(chara_index, cos, data, obj_db);
if (cos->data.kami == 649)
object_storage_load_set(data, obj_db, 3291);
objset_info_storage_load_set(data, obj_db, 3291);
}
void TaskRobLoad::LoadCharaObjSetMotionSet(chara_index chara_index,
void* data, const object_database* obj_db, const motion_database* mot_db) {
const chara_init_data* chr_init_data = chara_init_data_get(chara_index);
object_storage_load_set(data, obj_db, chr_init_data->object_set);
objset_info_storage_load_set(data, obj_db, chr_init_data->object_set);
motion_set_load_motion(cmn_set_id, "", mot_db);
motion_set_load_mothead(cmn_set_id, "", mot_db);
motion_set_load_motion(chr_init_data->motion_set, "", mot_db);
@@ -20074,7 +20074,7 @@ void TaskRobLoad::LoadCharaObjSetMotionSet(chara_index chara_index,
bool TaskRobLoad::LoadCharaObjSetMotionSetCheck(chara_index chara_index) {
const chara_init_data* chr_init_data = chara_init_data_get(chara_index);
if (object_storage_load_obj_set_check_not_read(chr_init_data->object_set)
if (objset_info_storage_load_obj_set_check_not_read(chr_init_data->object_set)
|| motion_storage_check_mot_file_not_ready(cmn_set_id)
|| mothead_storage_check_mhd_file_not_ready(cmn_set_id))
return true;
@@ -20106,7 +20106,7 @@ void TaskRobLoad::UnloadCharaItem(chara_index chara_index, int32_t item_no) {
for (uint32_t i : *item_objset)
if (i != (uint32_t)-1)
object_storage_unload_set(i);
objset_info_storage_unload_set(i);
}
void TaskRobLoad::UnloadCharaItems(chara_index chara_index, item_cos_data* cos) {
@@ -20116,13 +20116,13 @@ void TaskRobLoad::UnloadCharaItems(chara_index chara_index, item_cos_data* cos)
void TaskRobLoad::UnloadCharaItemsParent(chara_index chara_index, item_cos_data* cos) {
if (cos->data.kami == 649)
object_storage_unload_set(3291);
objset_info_storage_unload_set(3291);
UnloadCharaItems(chara_index, cos);
}
void TaskRobLoad::UnloadCharaObjSetMotionSet(chara_index chara_index) {
const chara_init_data* chr_init_data = chara_init_data_get(chara_index);
object_storage_unload_set(chr_init_data->object_set);
objset_info_storage_unload_set(chr_init_data->object_set);
motion_set_unload_motion(cmn_set_id);
motion_set_unload_mothead(cmn_set_id);
motion_set_unload_motion(chr_init_data->motion_set);
+3 -3
View File
@@ -789,11 +789,11 @@ void SkinParamManager::AddFiles() {
if (obj_info.is_null())
continue;
const char* obj_name = object_storage_get_obj_name(obj_info);
const char* obj_name = objset_info_storage_get_obj_name(obj_info);
if (!obj_name)
continue;
obj_skin* skin = object_storage_get_obj_skin(obj_info);
obj_skin* skin = objset_info_storage_get_obj_skin(obj_info);
if (!skin || !skin->ex_data)
return;
@@ -1238,7 +1238,7 @@ int32_t sp_skp_db::get_ext_skp_file(const osage_init_data& osage_init,
}
}
const char* obj_name = object_storage_get_obj_name(obj_info);
const char* obj_name = objset_info_storage_get_obj_name(obj_info);
std::string skp_file = sprintf_s_string("ext_skp_%s.txt", obj_name);
switch (type) {
+9 -9
View File
@@ -514,12 +514,12 @@ static void stage_disp(stage* s) {
if (s->stage_data->lens_flare_texture != -1 && s->lens_flare) {
int32_t object_set_id = s->stage_data->object_set_id;
rndr::Render* rend = &rctx_ptr->render;
rend->lens_flare_texture = object_storage_get_obj_set_texture(
rend->lens_flare_texture = objset_info_storage_get_obj_set_texture(
object_set_id, s->stage_data->lens_flare_texture);
if (rend->lens_flare_texture) {
rend->lens_shaft_texture = object_storage_get_obj_set_texture(
rend->lens_shaft_texture = objset_info_storage_get_obj_set_texture(
object_set_id, s->stage_data->lens_shaft_texture);
rend->lens_ghost_texture = object_storage_get_obj_set_texture(
rend->lens_ghost_texture = objset_info_storage_get_obj_set_texture(
object_set_id, s->stage_data->lens_ghost_texture);
rend->lens_ghost_count = 16;
rend->lens_shaft_inv_scale = s->stage_data->lens_shaft_inv_scale;
@@ -588,9 +588,9 @@ static void stage_free(stage* s) {
s->auth_3d_loaded = false;
}
object_storage_unload_set(s->stage_data->object_set_id);
objset_info_storage_unload_set(s->stage_data->object_set_id);
if (s->obj_set != -1)
object_storage_unload_set(s->obj_set);
objset_info_storage_unload_set(s->obj_set);
s->obj_set = -1;
s->index = -1;
@@ -602,17 +602,17 @@ static void stage_load(stage* s) {
if (s->state == 1) {
data_struct* aft_data = &data_list[DATA_AFT];
object_database* aft_obj_db = &aft_data->data_ft.obj_db;
object_storage_load_set(aft_data, aft_obj_db, s->obj_set);
objset_info_storage_load_set(aft_data, aft_obj_db, s->obj_set);
s->state = 2;
}
else if (s->state == 2) {
if (s->obj_set == -1 || !object_storage_load_obj_set_check_not_read(s->obj_set))
if (s->obj_set == -1 || !objset_info_storage_load_obj_set_check_not_read(s->obj_set))
s->state = 3;
}
else if (s->state == 3) {
data_struct* aft_data = &data_list[DATA_AFT];
object_database* aft_obj_db = &aft_data->data_ft.obj_db;
object_storage_load_set(aft_data, aft_obj_db, s->stage_data->object_set_id);
objset_info_storage_load_set(aft_data, aft_obj_db, s->stage_data->object_set_id);
auth_3d_data_load_category(s->stage_data->name.c_str());
auth_3d_data_load_category(s->stage_data->auth_3d_name.c_str());
@@ -620,7 +620,7 @@ static void stage_load(stage* s) {
s->state = 4;
}
else if (s->state == 4) {
if (object_storage_load_obj_set_check_not_read(s->stage_data->object_set_id)
if (objset_info_storage_load_obj_set_check_not_read(s->stage_data->object_set_id)
|| !auth_3d_data_check_category_loaded(s->stage_data->name.c_str())
|| !auth_3d_data_check_category_loaded(s->stage_data->auth_3d_name.c_str()))
return;
+6 -6
View File
@@ -585,9 +585,9 @@ static void stage_modern_free(stage_modern* s) {
s->auth_3d_loaded = false;
}
object_storage_unload_set(s->stage_data->hash);
objset_info_storage_unload_set(s->stage_data->hash);
if (s->obj_set_hash != -1 && s->obj_set_hash != hash_murmurhash_empty)
object_storage_unload_set(s->obj_set_hash);
objset_info_storage_unload_set(s->obj_set_hash);
s->obj_set_hash = -1;
s->hash = hash_murmurhash_empty;
@@ -597,16 +597,16 @@ static void stage_modern_free(stage_modern* s) {
static void stage_modern_load(stage_modern* s, void* data, object_database* obj_db, texture_database* tex_db) {
if (s->state == 1) {
object_storage_load_set_hash(data, s->obj_set_hash);
objset_info_storage_load_set_hash(data, s->obj_set_hash);
s->state = 2;
}
else if (s->state == 2) {
if (s->obj_set_hash == -1 || s->obj_set_hash == hash_murmurhash_empty
|| !object_storage_load_obj_set_check_not_read(s->obj_set_hash, obj_db, tex_db))
|| !objset_info_storage_load_obj_set_check_not_read(s->obj_set_hash, obj_db, tex_db))
s->state = 3;
}
else if (s->state == 3) {
object_storage_load_set_hash(data, s->stage_data->hash);
objset_info_storage_load_set_hash(data, s->stage_data->hash);
auth_3d_data_load_category(data, s->stage_data->auth_3d_name.c_str(),
s->stage_data->auth_3d_name_hash);
@@ -614,7 +614,7 @@ static void stage_modern_load(stage_modern* s, void* data, object_database* obj_
s->state = 4;
}
else if (s->state == 4) {
if (object_storage_load_obj_set_check_not_read(s->stage_data->hash, obj_db, tex_db)
if (objset_info_storage_load_obj_set_check_not_read(s->stage_data->hash, obj_db, tex_db)
|| !auth_3d_data_check_category_loaded(s->stage_data->auth_3d_name_hash))
return;
+3 -3
View File
@@ -599,7 +599,7 @@ static render_context* render_context_load() {
stru_140EDA5B0.ss_alpha_mask,
stru_140EDA5B0.screen_shot_4x == 1);*/
object_storage_init(aft_obj_db);
objset_info_storage_init(aft_obj_db);
stage_param_data_storage_init();
pv_expression_file_storage_init();
item_table_handler_array_init();
@@ -1245,7 +1245,7 @@ static void render_context_dispose(render_context* rctx) {
aet_database* aft_aet_db = &aft_data->data_ft.aet_db;
sprite_database* aft_spr_db = &aft_data->data_ft.spr_db;
object_storage_unload_set(dbg_set_id);
objset_info_storage_unload_set(dbg_set_id);
aet_manager_unload_set(aet_gam_loadsc_set_id, aft_aet_db);
sprite_manager_unload_set(spr_gam_loadsc_set_id, aft_spr_db);
aet_manager_unload_set(aet_cmn_all_set_id, aft_aet_db);
@@ -1310,7 +1310,7 @@ static void render_context_dispose(render_context* rctx) {
item_table_handler_array_free();
pv_expression_file_storage_free();
stage_param_data_storage_free();
object_storage_free();
objset_info_storage_free();
ogg_playback_data_free();
ogg_file_handler_storage_free();
+5 -5
View File
@@ -49,8 +49,8 @@ void data_view_object_imgui(class_data* data) {
return;
}
extern std::map<uint32_t, ObjsetInfo> object_storage_data;
for (auto& i : object_storage_data) {
extern std::map<uint32_t, ObjsetInfo> objset_info_storage_data;
for (auto& i : objset_info_storage_data) {
ObjsetInfo* info = &i.second;
if (!info->obj_set)
continue;
@@ -63,11 +63,11 @@ void data_view_object_imgui(class_data* data) {
ImGui::PopID();
}
extern std::map<uint32_t, ObjsetInfo> object_storage_data_modern;
if (object_storage_data_modern.size())
extern std::map<uint32_t, ObjsetInfo> objset_info_storage_data_modern;
if (objset_info_storage_data_modern.size())
ImGui::Selectable("Modern:", false, ImGuiSelectableFlags_Disabled);
for (auto& i : object_storage_data_modern) {
for (auto& i : objset_info_storage_data_modern) {
ObjsetInfo* info = &i.second;
if (!info->obj_set)
continue;
+4 -4
View File
@@ -340,7 +340,7 @@ void DataEdit::Auth3D::patch() {
void DataEdit::Auth3D::reset() {
auth_3d_data_unload_category(category.hash_murmurhash);
id.unload(rctx_ptr);
object_storage_unload_set(object_set.hash_murmurhash);
objset_info_storage_unload_set(object_set.hash_murmurhash);
category.clear();
file.clear();
@@ -405,15 +405,15 @@ bool DataEdit::ctrl() {
auth_3d.object_set.assign("EFFCHRPV826MIK001");
auth_3d_data_load_category(x_data, auth_3d.category.c_str(), auth_3d.category.hash_murmurhash);
object_storage_load_set_hash(x_data, auth_3d.object_set.hash_murmurhash);
objset_info_storage_load_set_hash(x_data, auth_3d.object_set.hash_murmurhash);
} break;
case 3: {
if (motion_storage_check_mot_file_not_ready(mot_set_id))
break;
if (!auth_3d_data_check_category_loaded(auth_3d.category.hash_murmurhash)
|| (object_storage_get_objset_info(auth_3d.object_set.hash_murmurhash)
&& object_storage_load_obj_set_check_not_read(
|| (objset_info_storage_get_objset_info(auth_3d.object_set.hash_murmurhash)
&& objset_info_storage_load_obj_set_check_not_read(
auth_3d.object_set.hash_murmurhash, &auth_3d.obj_db, &auth_3d.tex_db)))
break;
+2 -2
View File
@@ -101,7 +101,7 @@ bool TaskDataInit::ctrl() {
// break;
state = 8;
case 8:
object_storage_load_set(aft_data, aft_obj_db, dbg_set_id);
objset_info_storage_load_set(aft_data, aft_obj_db, dbg_set_id);
//bone_database_read();
item_table_handler_array_read();
sound_work_read_farc("rom/sound/se.farc");
@@ -135,7 +135,7 @@ bool TaskDataInit::ctrl() {
state = 9;
break;
case 9:
if (!object_storage_load_obj_set_check_not_read(dbg_set_id)
if (!objset_info_storage_load_obj_set_check_not_read(dbg_set_id)
//&& !bone_database_load()
&& !item_table_handler_array_load()
&& !sound_work_load_farc("rom/sound/se.farc")
+7 -7
View File
@@ -393,7 +393,7 @@ bool Auth3dTestTask::init() {
clear_color = 0x00999999;
auth_3d_test_window_init();
task_stage_add_task("A3D_STAGE");
object_storage_load_set(aft_data, aft_obj_db, effcmn_obj_set);
objset_info_storage_load_set(aft_data, aft_obj_db, effcmn_obj_set);
return true;
}
@@ -408,7 +408,7 @@ bool Auth3dTestTask::ctrl() {
//event_listener.data.sub_140247B60();
if (effcmn_obj_set_state == 1 && !object_storage_load_obj_set_check_not_read(effcmn_obj_set))
if (effcmn_obj_set_state == 1 && !objset_info_storage_load_obj_set_check_not_read(effcmn_obj_set))
effcmn_obj_set_state = 4;
if (state == 1 && auth_3d_id.check_loaded())
@@ -446,7 +446,7 @@ bool Auth3dTestTask::ctrl() {
bool Auth3dTestTask::dest() {
auth_3d_id.unload(rctx_ptr);
object_storage_unload_set(effcmn_obj_set);
objset_info_storage_unload_set(effcmn_obj_set);
task_stage_del_task();
auth_3d_test_window->Hide();
clear_color = color_black;
@@ -458,7 +458,7 @@ bool Auth3dTestTask::dest() {
load_category.clear();
load_category.shrink_to_fit();
for (uint32_t& i : obj_sets)
object_storage_unload_set(i);
objset_info_storage_unload_set(i);
obj_sets.clear();
obj_sets.shrink_to_fit();
return true;
@@ -500,7 +500,7 @@ void Auth3dTestTask::SetAuth3dId() {
if (category.size()) {
auth_3d_data_unload_category(category.c_str());
for (uint32_t& i : obj_sets)
object_storage_unload_set(i);
objset_info_storage_unload_set(i);
obj_sets.clear();
}
auth_3d_data_load_category(load_category.c_str());
@@ -520,13 +520,13 @@ void Auth3dTestTask::SetAuth3dId() {
auth_3d_data_get_obj_sets_from_category(category, obj_sets, aft_auth_3d_db, aft_obj_db);
for (uint32_t& i : obj_sets)
object_storage_load_set(aft_data, aft_obj_db, i);
objset_info_storage_load_set(aft_data, aft_obj_db, i);
load_state = 2;
}
else if (load_state == 2) {
bool wait_load = false;
for (uint32_t& i : obj_sets)
if (object_storage_load_obj_set_check_not_read(i))
if (objset_info_storage_load_obj_set_check_not_read(i))
wait_load = true;
if (!wait_load)
+6 -6
View File
@@ -707,7 +707,7 @@ bool DataTestMotA3d::ctrl() {
object_database* aft_obj_db = &aft_data->data_ft.obj_db;
for (uint32_t& i : obj_sets)
object_storage_load_set(aft_data, aft_obj_db, i);
objset_info_storage_load_set(aft_data, aft_obj_db, i);
state = 3;
} break;
@@ -715,7 +715,7 @@ bool DataTestMotA3d::ctrl() {
bool wait_load = false;
for (uint32_t& i : obj_sets)
if (object_storage_load_obj_set_check_not_read(i))
if (objset_info_storage_load_obj_set_check_not_read(i))
return false;
if (wait_load)
@@ -859,7 +859,7 @@ void DataTestMotA3d::Reset() {
auth_3d_ids.clear();
for (uint32_t& i : obj_sets)
object_storage_unload_set(i);
objset_info_storage_unload_set(i);
obj_sets.clear();
}
@@ -3000,7 +3000,7 @@ static void data_test_face_mot_dw_array_unload() {
static bool motion_test_objset_check_not_read() {
for (uint32_t i : motion_test_objset)
if (object_storage_load_obj_set_check_not_read(i))
if (objset_info_storage_load_obj_set_check_not_read(i))
return true;
return false;
}
@@ -3023,11 +3023,11 @@ static void motion_test_objset_load() {
object_database* aft_obj_db = &aft_data->data_ft.obj_db;
for (uint32_t i : motion_test_objset)
object_storage_load_set(aft_data, aft_obj_db, i);
objset_info_storage_load_set(aft_data, aft_obj_db, i);
}
static void motion_test_objset_unload() {
for (uint32_t i : motion_test_objset)
object_storage_unload_set(i);
objset_info_storage_unload_set(i);
motion_test_objset.clear();
}
+10 -10
View File
@@ -257,11 +257,11 @@ bool DataTestObjectManager::init() {
}
if (object_set_id != -1) {
object_storage_load_set(aft_data, aft_obj_db, object_set_id);
objset_info_storage_load_set(aft_data, aft_obj_db, object_set_id);
state = 1;
}
object_storage_load_set(aft_data, aft_obj_db, aft_obj_db->get_object_set_id(object_set_index));
objset_info_storage_load_set(aft_data, aft_obj_db, aft_obj_db->get_object_set_id(object_set_index));
return true;
}
@@ -271,13 +271,13 @@ bool DataTestObjectManager::ctrl() {
switch (state) {
case 1:
if (object_set_id == -1 || !object_storage_load_obj_set_check_not_read(object_set_id))
if (object_set_id == -1 || !objset_info_storage_load_obj_set_check_not_read(object_set_id))
state = 2;
break;
case 2: {
uint32_t obj_set_id = aft_obj_db->get_object_set_id(object_set_index);
if (!object_storage_load_obj_set_check_not_read(obj_set_id)) {
obj_num = object_storage_get_obj_set(obj_set_id)->obj_num;
if (!objset_info_storage_load_obj_set_check_not_read(obj_set_id)) {
obj_num = objset_info_storage_get_obj_set(obj_set_id)->obj_num;
state = 3;
}
} break;
@@ -289,10 +289,10 @@ bool DataTestObjectManager::dest() {
data_struct* aft_data = &data_list[DATA_AFT];
object_database* aft_obj_db = &aft_data->data_ft.obj_db;
object_storage_unload_set(aft_obj_db->get_object_set_id(object_set_index));
objset_info_storage_unload_set(aft_obj_db->get_object_set_id(object_set_index));
if (object_set_id != -1)
object_storage_unload_set(object_set_id);
objset_info_storage_unload_set(object_set_id);
return true;
}
@@ -304,7 +304,7 @@ void DataTestObjectManager::disp() {
object_database* aft_obj_db = &aft_data->data_ft.obj_db;
uint32_t obj_set_id = aft_obj_db->get_object_set_id(object_set_index);
uint32_t obj_id = object_storage_get_obj_by_index(obj_set_id, obj_index)->id;
uint32_t obj_id = objset_info_storage_get_obj_by_index(obj_set_id, obj_index)->id;
rctx_ptr->disp_manager->set_obj_flags((mdl::ObjFlags)(mdl::OBJ_40 | mdl::OBJ_20 | obj_flags));
mat4 mat;
@@ -338,7 +338,7 @@ const obj_bounding_sphere* DataTestObjectManager::get_object_bounding_sphere(int
object_database* aft_obj_db = &aft_data->data_ft.obj_db;
uint32_t obj_set_id = aft_obj_db->get_object_set_id(object_set_index);
const obj* obj = object_storage_get_obj_by_index(obj_set_id, obj_index);
const obj* obj = objset_info_storage_get_obj_by_index(obj_set_id, obj_index);
if (obj)
return &obj->bounding_sphere;
return 0;
@@ -352,7 +352,7 @@ const char* DataTestObjectManager::get_object_name(int32_t obj_index) {
object_database* aft_obj_db = &aft_data->data_ft.obj_db;
uint32_t obj_set_id = aft_obj_db->get_object_set_id(object_set_index);
const obj* obj = object_storage_get_obj_by_index(obj_set_id, obj_index);
const obj* obj = objset_info_storage_get_obj_by_index(obj_set_id, obj_index);
if (obj)
return obj->name;
return"NULL";
+2 -2
View File
@@ -469,7 +469,7 @@ bool RobOsageTest::ctrl() {
for (int32_t i = 0; i < ITEM_MAX; i++) {
rob_chara_item_equip_object* itm_eq_obj = rob_itm_equip->get_item_equip_object((::item_id)i);
obj* obj = object_storage_get_obj(itm_eq_obj->obj_info);
obj* obj = objset_info_storage_get_obj(itm_eq_obj->obj_info);
if (!obj || !itm_eq_obj->osage_blocks.size() && !itm_eq_obj->cloth_blocks.size())
continue;
@@ -624,7 +624,7 @@ bool RobOsageTest::ctrl() {
for (int32_t i = 0; i < ITEM_MAX; i++) {
rob_chara_item_equip_object* itm_eq_obj = rob_itm_equip->get_item_equip_object((::item_id)i);
obj* obj = object_storage_get_obj(itm_eq_obj->obj_info);
obj* obj = objset_info_storage_get_obj(itm_eq_obj->obj_info);
if (!obj || !itm_eq_obj->osage_blocks.size() && !itm_eq_obj->cloth_blocks.size())
continue;
+4 -4
View File
@@ -4426,10 +4426,10 @@ static void glitter_editor_property_particle(GlitterEditor* glt_edt) {
uint32_t set_id = (uint32_t)mesh->object_set_name_hash;
uint32_t obj_id = (uint32_t)mesh->object_name_hash;
ObjsetInfo* set_info = object_storage_get_objset_info(set_id);
ssize_t object_set_count = object_storage_get_obj_set_count();
ObjsetInfo* set_info = objset_info_storage_get_objset_info(set_id);
ssize_t object_set_count = objset_info_storage_get_obj_set_count();
extern std::map<uint32_t, ObjsetInfo> object_storage_data_modern;
extern std::map<uint32_t, ObjsetInfo> objset_info_storage_data_modern;
ImGui::StartPropertyColumn("Object Set");
if (ImGui::BeginCombo("##Object Set", set_info ? set_info->name.c_str() : "None", 0)) {
ImGui::PushID(-1);
@@ -4438,7 +4438,7 @@ static void glitter_editor_property_particle(GlitterEditor* glt_edt) {
set_info = 0;
ImGui::PopID();
for (auto& i : object_storage_data_modern) {
for (auto& i : objset_info_storage_data_modern) {
ObjsetInfo* info = &i.second;
if (!info || !info->obj_set)
continue;
+18 -18
View File
@@ -3066,7 +3066,7 @@ bool pv_game::load() {
prj::sort_unique(data.chreff_auth_3d_obj_set_ids);
for (uint32_t& i : data.chreff_auth_3d_obj_set_ids)
object_storage_load_set(aft_data, aft_obj_db, i);
objset_info_storage_load_set(aft_data, aft_obj_db, i);
char campv[0x40];
sprintf_s(campv, sizeof(campv), "CAMPV%03d", get_pv_db_pv()->id);
@@ -3112,7 +3112,7 @@ bool pv_game::load() {
prj::sort_unique(data.field_2D770);
for (uint32_t& i : data.field_2D770)
object_storage_load_set(aft_data, aft_obj_db, i);
objset_info_storage_load_set(aft_data, aft_obj_db, i);
data.ex_song_ex_auth_obj_set_ids.clear();
for (const pv_db_pv_ex_song& i : get_pv_db_pv()->ex_song.data)
@@ -3129,7 +3129,7 @@ bool pv_game::load() {
prj::sort_unique(data.ex_song_ex_auth_obj_set_ids);
for (uint32_t& i : data.ex_song_ex_auth_obj_set_ids)
object_storage_load_set(aft_data, aft_obj_db, i);
objset_info_storage_load_set(aft_data, aft_obj_db, i);
prj::sort_unique(data.stage_indices);
if (!data.stage_indices.size())
@@ -3154,7 +3154,7 @@ bool pv_game::load() {
prj::sort_unique(data.stgpvhrc_obj_set_ids);
for (uint32_t& i : data.stgpvhrc_obj_set_ids)
object_storage_load_set(aft_data, aft_obj_db, i);
objset_info_storage_load_set(aft_data, aft_obj_db, i);
data.has_frame_texture = false;
for (const pv_db_pv_frame_texture& i : get_pv_db_pv()->frame_texture)
@@ -3171,15 +3171,15 @@ bool pv_game::load() {
return false;
for (uint32_t& i : data.chreff_auth_3d_obj_set_ids)
if (object_storage_load_obj_set_check_not_read(i))
if (objset_info_storage_load_obj_set_check_not_read(i))
return false;
for (uint32_t& i : data.field_2D770)
if (object_storage_load_obj_set_check_not_read(i))
if (objset_info_storage_load_obj_set_check_not_read(i))
return false;
for (uint32_t& i : data.ex_song_ex_auth_obj_set_ids)
if (object_storage_load_obj_set_check_not_read(i))
if (objset_info_storage_load_obj_set_check_not_read(i))
return false;
state = 2;
@@ -3357,7 +3357,7 @@ bool pv_game::load() {
prj::sort_unique(data.obj_set_itmpv);
for (uint32_t& i : data.obj_set_itmpv)
object_storage_load_set(aft_data, aft_obj_db, i);
objset_info_storage_load_set(aft_data, aft_obj_db, i);
data.obj_set_handitem.clear();
if (diff) {
@@ -3381,7 +3381,7 @@ bool pv_game::load() {
prj::sort_unique(data.obj_set_handitem);
for (uint32_t& i : data.obj_set_handitem)
object_storage_load_set(aft_data, aft_obj_db, i);
objset_info_storage_load_set(aft_data, aft_obj_db, i);
skin_param_storage_load(hand_obj_infos, aft_data, aft_obj_db);
}
@@ -3410,19 +3410,19 @@ bool pv_game::load() {
wait_load |= true;
for (uint32_t& i : data.obj_set_itmpv)
if (object_storage_load_obj_set_check_not_read(i)) {
if (objset_info_storage_load_obj_set_check_not_read(i)) {
wait_load |= true;
break;
}
for (uint32_t& i : data.obj_set_handitem)
if (object_storage_load_obj_set_check_not_read(i)) {
if (objset_info_storage_load_obj_set_check_not_read(i)) {
wait_load |= true;
break;
}
for (uint32_t& i : data.stgpvhrc_obj_set_ids)
if (object_storage_load_obj_set_check_not_read(i)) {
if (objset_info_storage_load_obj_set_check_not_read(i)) {
wait_load |= true;
break;
}
@@ -4593,29 +4593,29 @@ bool pv_game::unload() {
pv_param::post_process_data_clear_data();
for (uint32_t& i : data.obj_set_itmpv)
object_storage_unload_set(i);
objset_info_storage_unload_set(i);
data.obj_set_itmpv.clear();
for (uint32_t& i : data.obj_set_handitem)
object_storage_unload_set(i);
objset_info_storage_unload_set(i);
data.obj_set_handitem.clear();
skin_param_storage_reset();
for (uint32_t& i : data.chreff_auth_3d_obj_set_ids)
object_storage_unload_set(i);
objset_info_storage_unload_set(i);
data.chreff_auth_3d_obj_set_ids.clear();
for (uint32_t& i : data.field_2D770)
object_storage_unload_set(i);
objset_info_storage_unload_set(i);
data.field_2D770.clear();
for (uint32_t& i : data.stgpvhrc_obj_set_ids)
object_storage_unload_set(i);
objset_info_storage_unload_set(i);
data.stgpvhrc_obj_set_ids.clear();
for (uint32_t& i : data.ex_song_ex_auth_obj_set_ids)
object_storage_unload_set(i);
objset_info_storage_unload_set(i);
data.ex_song_ex_auth_obj_set_ids.clear();
for (uint64_t& i : data.effect_rs_list_hashes)
+15 -15
View File
@@ -924,8 +924,8 @@ void x_pv_game_effect::ctrl(object_database* obj_db, texture_database* tex_db) {
wait_load |= true;
for (string_hash& i : pv_obj_set)
if (object_storage_get_objset_info(i.hash_murmurhash)
&& object_storage_load_obj_set_check_not_read(i.hash_murmurhash, obj_db, tex_db))
if (objset_info_storage_get_objset_info(i.hash_murmurhash)
&& objset_info_storage_load_obj_set_check_not_read(i.hash_murmurhash, obj_db, tex_db))
wait_load |= true;
if (wait_load)
@@ -1053,7 +1053,7 @@ void x_pv_game_effect::load_data(int32_t pv_id, object_database* obj_db, texture
data_struct* x_data = &data_list[DATA_X];
for (string_hash& i : pv_obj_set)
object_storage_load_set_hash(x_data, i.hash_murmurhash);
objset_info_storage_load_set_hash(x_data, i.hash_murmurhash);
for (string_hash& i : pv_auth_3d)
auth_3d_data_load_category(x_data, i.c_str(), i.hash_murmurhash);
@@ -1264,7 +1264,7 @@ void x_pv_game_effect::unload_data() {
auth_3d_data_unload_category(i.hash_murmurhash);
for (string_hash& i : pv_obj_set)
object_storage_unload_set(i.hash_murmurhash);
objset_info_storage_unload_set(i.hash_murmurhash);
for (string_hash& i : pv_glitter)
Glitter::glt_particle_manager->UnloadEffectGroup(i.hash_murmurhash);
@@ -1325,8 +1325,8 @@ void x_pv_game_chara_effect::ctrl(object_database* obj_db, texture_database* tex
if (!auth_3d_data_check_category_loaded(j.category.hash_murmurhash))
wait_load |= true;
if (object_storage_get_objset_info(j.object_set.hash_murmurhash)
&& object_storage_load_obj_set_check_not_read(j.object_set.hash_murmurhash, obj_db, tex_db))
if (objset_info_storage_get_objset_info(j.object_set.hash_murmurhash)
&& objset_info_storage_load_obj_set_check_not_read(j.object_set.hash_murmurhash, obj_db, tex_db))
wait_load |= true;
}
@@ -1564,7 +1564,7 @@ void x_pv_game_chara_effect::load_data() {
continue;
auth_3d_data_load_category(x_data, j.category.c_str(), j.category.hash_murmurhash);
object_storage_load_set_hash(x_data, j.object_set.hash_murmurhash);
objset_info_storage_load_set_hash(x_data, j.object_set.hash_murmurhash);
}
state = 20;
@@ -1700,7 +1700,7 @@ void x_pv_game_chara_effect::unload_data() {
j.id.unload(rctx_ptr);
auth_3d_data_unload_category(j.category.hash_murmurhash);
object_storage_unload_set(j.object_set.hash_murmurhash);
objset_info_storage_unload_set(j.object_set.hash_murmurhash);
}
state = 10;
@@ -5028,8 +5028,8 @@ void x_pv_game_stage_data::ctrl(object_database* obj_db, texture_database* tex_d
bool wait_load = false;
for (uint32_t& i : objhrc_hash)
if (object_storage_get_objset_info(i)
&& object_storage_load_obj_set_check_not_read(i, obj_db, tex_db))
if (objset_info_storage_get_objset_info(i)
&& objset_info_storage_load_obj_set_check_not_read(i, obj_db, tex_db))
wait_load |= true;
if (wait_load || task_stage_modern_check_not_loaded())
@@ -5093,7 +5093,7 @@ void x_pv_game_stage_data::load_objects(object_database* obj_db, texture_databas
effect_manager_set_data(x_data, obj_db, tex_db, &stg_db);
for (uint32_t& i : objhrc_hash)
object_storage_load_set_hash(x_data, i);
objset_info_storage_load_set_hash(x_data, i);
state = 1;
flags |= 0x01;
@@ -5151,7 +5151,7 @@ void x_pv_game_stage_data::set_stage(uint32_t hash) {
void x_pv_game_stage_data::unload() {
for (uint32_t& i : objhrc_hash)
object_storage_unload_set(i);
objset_info_storage_unload_set(i);
task_stage_modern_del_task();
@@ -7133,7 +7133,7 @@ bool x_pv_game::ctrl() {
prj::sort_unique(object_set_ids);
for (uint32_t& i : object_set_ids) {
ObjsetInfo* info = object_storage_get_objset_info(i);
ObjsetInfo* info = objset_info_storage_get_objset_info(i);
if (!info)
continue;
@@ -7194,7 +7194,7 @@ bool x_pv_game::ctrl() {
object_set_ids.clear();
for (uint32_t& i : pv_object_set_ids) {
ObjsetInfo* info = object_storage_get_objset_info(i);
ObjsetInfo* info = objset_info_storage_get_objset_info(i);
if (!info)
continue;
@@ -7204,7 +7204,7 @@ bool x_pv_game::ctrl() {
}
for (uint32_t& i : stage_object_set_ids) {
ObjsetInfo* info = object_storage_get_objset_info(i);
ObjsetInfo* info = objset_info_storage_get_objset_info(i);
if (!info)
continue;