From 7605514a96963858bb65e415922cea8a77e6fb07 Mon Sep 17 00:00:00 2001 From: korenkonder Date: Mon, 15 Jul 2024 10:44:07 +0300 Subject: [PATCH] Renamed `object` to `obj` in some places --- src/DivaGL/Glitter/effect_inst.cpp | 4 ++-- src/DivaGL/Glitter/render_scene.cpp | 2 +- src/DivaGL/data_test/rob_osage_test.cpp | 4 ++-- src/DivaGL/mdl/disp_manager.cpp | 4 ++-- src/DivaGL/object.cpp | 32 ++++++++++++------------- src/DivaGL/object.hpp | 6 ++--- 6 files changed, 26 insertions(+), 26 deletions(-) diff --git a/src/DivaGL/Glitter/effect_inst.cpp b/src/DivaGL/Glitter/effect_inst.cpp index 3fab1aa..5876ec2 100644 --- a/src/DivaGL/Glitter/effect_inst.cpp +++ b/src/DivaGL/Glitter/effect_inst.cpp @@ -458,7 +458,7 @@ namespace Glitter { 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_info_get_mesh_by_index(ext_anim->object, ext_anim->mesh_index); + obj_mesh* mesh = objset_info_storage_get_obj_mesh_by_index(ext_anim->object, ext_anim->mesh_index); if (mesh) { vec3* trans = &mesh->bounding_sphere.center; SetExtAnim(&mat, obj_mat, trans, true); @@ -478,7 +478,7 @@ namespace Glitter { } if (ext_anim->mesh_index != -1) { - obj_mesh* mesh = object_info_get_mesh_by_index(ext_anim->object, ext_anim->mesh_index); + obj_mesh* mesh = objset_info_storage_get_obj_mesh_by_index(ext_anim->object, ext_anim->mesh_index); if (mesh) { vec3* trans = &mesh->bounding_sphere.center; SetExtAnim(0, 0, trans, true); diff --git a/src/DivaGL/Glitter/render_scene.cpp b/src/DivaGL/Glitter/render_scene.cpp index 70d5ecd..51609f0 100644 --- a/src/DivaGL/Glitter/render_scene.cpp +++ b/src/DivaGL/Glitter/render_scene.cpp @@ -1370,7 +1370,7 @@ namespace Glitter { ParticleX* particle = rend_group->particle->data.particle; - obj* obj = objset_info_storage_get_object(rend_group->object); + obj* obj = objset_info_storage_get_obj(rend_group->object); if (!obj) return; diff --git a/src/DivaGL/data_test/rob_osage_test.cpp b/src/DivaGL/data_test/rob_osage_test.cpp index 7495b34..aaff0d5 100644 --- a/src/DivaGL/data_test/rob_osage_test.cpp +++ b/src/DivaGL/data_test/rob_osage_test.cpp @@ -467,7 +467,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 = objset_info_storage_get_object(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; @@ -647,7 +647,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 = objset_info_storage_get_object(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; diff --git a/src/DivaGL/mdl/disp_manager.cpp b/src/DivaGL/mdl/disp_manager.cpp index 59602e4..c4ff36a 100644 --- a/src/DivaGL/mdl/disp_manager.cpp +++ b/src/DivaGL/mdl/disp_manager.cpp @@ -2770,7 +2770,7 @@ namespace mdl { if (obj_info.id == (uint16_t)-1 && obj_info.set_id == (uint16_t)-1) return false; - ::obj* object = objset_info_storage_get_object(obj_info); + ::obj* object = objset_info_storage_get_obj(obj_info); if (!object) return false; @@ -2781,7 +2781,7 @@ namespace mdl { ::obj* obj_morph = 0; obj_mesh_vertex_buffer* obj_morph_vertex_buffer = 0; if (morph.object.set_id != (uint16_t)-1) { - obj_morph = objset_info_storage_get_object(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, 0); } diff --git a/src/DivaGL/object.cpp b/src/DivaGL/object.cpp index 779c06b..5341d74 100644 --- a/src/DivaGL/object.cpp +++ b/src/DivaGL/object.cpp @@ -51,15 +51,15 @@ static_assert(sizeof(ObjsetInfo) == 0xD8, "\"ObjsetInfo\" struct should have a s void (FASTCALL* objset_info_storage_unload_set)(int32_t set) = (void (FASTCALL*)(int32_t set))0x00000001404599B0; -obj_mesh* (FASTCALL* object_info_get_mesh_by_index)(object_info object, int32_t mesh_index) - = (obj_mesh * (FASTCALL*)(object_info object, int32_t mesh_index))0x0000000140459D40; -int32_t(FASTCALL* objset_info_storage_get_obj_mesh_index)(object_info object, const char* mesh_name) - = (int32_t(FASTCALL*)(object_info object, const char* mesh_name))0x0000000140459DE0; +obj_mesh* (FASTCALL* objset_info_storage_get_obj_mesh_by_index)(object_info obj_info, int32_t mesh_index) + = (obj_mesh * (FASTCALL*)(object_info obj_info, int32_t mesh_index))0x0000000140459D40; +int32_t(FASTCALL* objset_info_storage_get_obj_mesh_index)(object_info obj_info, const char* mesh_name) + = (int32_t(FASTCALL*)(object_info obj_info, const char* mesh_name))0x0000000140459DE0; const char* (FASTCALL* object_database_get_object_name)(object_info obj_info) = (const char* (FASTCALL*)(object_info obj_info))0x0000000140459F20; uint32_t(FASTCALL* object_database_get_object_info)(const char* name) = (uint32_t(FASTCALL*)(const char* name))0x0000000140459F80; -obj* (FASTCALL* objset_info_storage_get_object)(object_info obj_info) +obj* (FASTCALL* objset_info_storage_get_obj)(object_info obj_info) = (obj * (FASTCALL*)(object_info obj_info))0x000000014045A140; obj_mesh_index_buffer* (FASTCALL* objset_info_storage_get_obj_mesh_index_buffer)(object_info obj_info, int32_t a2) = (obj_mesh_index_buffer * (FASTCALL*)(object_info obj_info, int32_t a2))0x000000014045A250; @@ -992,7 +992,7 @@ HOOK(void, FASTCALL, ObjsetInfo__vertex_buffer_free, 0x0000000140459C70, ObjsetI HOOK(obj_mesh_index_buffer*, FASTCALL, objset_info_storage_get_obj_mesh_index_buffer, 0x000000014045A250, object_info obj_info, int32_t a2) { bool(FASTCALL * objset_info_storage_check_set)(int32_t set) = (bool(FASTCALL*)(int32_t set))0x00000001404577D0; - int32_t(FASTCALL * objset_info_storage_get_object_index)(int32_t set, uint32_t object_id) + int32_t(FASTCALL * objset_info_storage_get_obj_index)(int32_t set, uint32_t object_id) = (int32_t(FASTCALL*)(int32_t set, uint32_t object_id))0x000000014045A7A0; ObjsetInfo* (FASTCALL * objset_info_storage_get_objset_info)(int32_t set) = (ObjsetInfo * (FASTCALL*)(int32_t set))0x000000014045AC00; @@ -1004,12 +1004,12 @@ HOOK(obj_mesh_index_buffer*, FASTCALL, objset_info_storage_get_obj_mesh_index_bu if (!info || !info->objvb) return 0; - int32_t object_index = objset_info_storage_get_object_index(obj_info.set_id, obj_info.id); - if (object_index >= 0) { + int32_t obj_index = objset_info_storage_get_obj_index(obj_info.set_id, obj_info.id); + if (obj_index >= 0) { if (!a2) - return info->objib[object_index].mesh_data; + return info->objib[obj_index].mesh_data; else if (info->field_C8) - return info->field_C8[object_index].mesh_data; + return info->field_C8[obj_index].mesh_data; } return 0; } @@ -1017,8 +1017,8 @@ HOOK(obj_mesh_index_buffer*, FASTCALL, objset_info_storage_get_obj_mesh_index_bu HOOK(obj_mesh_vertex_buffer*, FASTCALL, objset_info_storage_get_obj_mesh_vertex_buffer, 0x000000014045A480, object_info obj_info, int32_t a2) { bool(FASTCALL * objset_info_storage_check_set)(int32_t set) = (bool(FASTCALL*)(int32_t set))0x00000001404577D0; - int32_t(FASTCALL * objset_info_storage_get_object_index)(int32_t set, uint32_t object_id) - = (int32_t(FASTCALL*)(int32_t set, uint32_t object_id))0x000000014045A7A0; + int32_t(FASTCALL * objset_info_storage_get_obj_index)(int32_t set, uint32_t obj_id) + = (int32_t(FASTCALL*)(int32_t set, uint32_t obj_id))0x000000014045A7A0; ObjsetInfo* (FASTCALL * objset_info_storage_get_objset_info)(int32_t set) = (ObjsetInfo * (FASTCALL*)(int32_t set))0x000000014045AC00; @@ -1029,12 +1029,12 @@ HOOK(obj_mesh_vertex_buffer*, FASTCALL, objset_info_storage_get_obj_mesh_vertex_ if (!info || !info->objvb) return 0; - int32_t object_index = objset_info_storage_get_object_index(obj_info.set_id, obj_info.id); - if (object_index >= 0) { + int32_t obj_index = objset_info_storage_get_obj_index(obj_info.set_id, obj_info.id); + if (obj_index >= 0) { if (!a2) - return info->objvb[object_index].mesh_data; + return info->objvb[obj_index].mesh_data; else if (info->field_C0) - return info->field_C0[object_index].mesh_data; + return info->field_C0[obj_index].mesh_data; } return 0; } diff --git a/src/DivaGL/object.hpp b/src/DivaGL/object.hpp index 4455e11..98107aa 100644 --- a/src/DivaGL/object.hpp +++ b/src/DivaGL/object.hpp @@ -583,11 +583,11 @@ static_assert(sizeof(obj_vertex_buffer) == 0x10, "\"obj_vertex_buffer\" struct s #endif extern void (FASTCALL* objset_info_storage_unload_set)(int32_t set); -extern obj_mesh* (FASTCALL* object_info_get_mesh_by_index)(object_info object, int32_t mesh_index); -extern int32_t(FASTCALL* objset_info_storage_get_obj_mesh_index)(object_info object, const char* mesh_name); +extern obj_mesh* (FASTCALL* objset_info_storage_get_obj_mesh_by_index)(object_info obj_info, int32_t mesh_index); +extern int32_t(FASTCALL* objset_info_storage_get_obj_mesh_index)(object_info obj_info, const char* mesh_name); extern const char* (FASTCALL* object_database_get_object_name)(object_info obj_info); extern uint32_t(FASTCALL* object_database_get_object_info)(const char* name); -extern obj* (FASTCALL* objset_info_storage_get_object)(object_info obj_info); +extern obj* (FASTCALL* objset_info_storage_get_obj)(object_info obj_info); extern obj_mesh_index_buffer* (FASTCALL* objset_info_storage_get_obj_mesh_index_buffer)(object_info obj_info, int32_t a2); extern obj_skin* (FASTCALL* objset_info_storage_get_obj_skin)(object_info obj_info); extern obj_mesh_vertex_buffer* (FASTCALL* objset_info_storage_get_obj_mesh_vertex_buffer)(object_info obj_info, int32_t a2);