Part 2 of ? of massive overhaul of Rob

This commit is contained in:
korenkonder
2026-05-03 14:01:45 +03:00
parent d13a7c8d1c
commit b4dc132eb2
20 changed files with 2650 additions and 2227 deletions
+1 -1
View File
@@ -1097,7 +1097,7 @@ namespace Glitter {
ext_anim_scale.z = 0.0f;
enum_or(flags, EFFECT_INST_EXT_SCALE);
if (rob_chr->get_disp_flag() || !(data.ext_anim_x->flags & EFFECT_EXT_ANIM_NO_DRAW_IF_NO_DATA))
if (rob_chr->check_disp() || !(data.ext_anim_x->flags & EFFECT_EXT_ANIM_NO_DRAW_IF_NO_DATA))
set_flags = true;
else
set_flags = false;
+3 -11
View File
@@ -1314,18 +1314,14 @@ namespace auth_3d_detail {
void EventFilterTimeStop::Begin(auth_3d* auth, int32_t flags, render_context* rctx) {
for (auth_3d_chara& i : auth->chara) {
rob_chara* rob_chr = get_rob_management()->get_rob((ROB_ID)i.rob_id);
if (rob_chr)
rob_chr->disp->disable_update = true;
get_rob_management()->set_disp_freeze((ROB_ID)i.rob_id, true);
}
effect_manager_set_frame_rate_control(&frame_rate_time_stop);
}
void EventFilterTimeStop::End(auth_3d* auth, int32_t flags, render_context* rctx) {
for (auth_3d_chara& i : auth->chara) {
rob_chara* rob_chr = get_rob_management()->get_rob((ROB_ID)i.rob_id);
if (rob_chr)
rob_chr->disp->disable_update = true;
get_rob_management()->set_disp_freeze((ROB_ID)i.rob_id, false);
}
effect_manager_set_frame_rate_control(get_sys_frame_rate());
}
@@ -1379,10 +1375,6 @@ namespace auth_3d_detail {
}
static void sub_140532980(ROB_ID rob_id, const char* name) {
}
void EventSnd::Begin(auth_3d* auth, int32_t flags, render_context* rctx) {
float_t frame = auth->frame;
if (begin > frame || frame >= end || ((flags & 0x02) && fabsf(frame - begin) > 0.1f))
@@ -1393,7 +1385,7 @@ namespace auth_3d_detail {
rob_id = (ROB_ID)auth->chara.front().rob_id;
if (rob_id >= 0 && rob_id < ROB_ID_MAX)
sub_140532980(rob_id, param1.c_str());
get_rob_management()->play_auth3d_sound(rob_id, param1.c_str());
else if (sound_work_has_property(param1.c_str()))
sound_work_play_se(1, param1.c_str());
}
+7 -1
View File
@@ -88,7 +88,13 @@ RobItemHeader::~RobItemHeader() {
}
const RobItemTable* RobItemHeader::get_item(uint32_t item_no) {
// 0x14052BAF0
bool RobItemHeader::check_item(uint32_t item_no) const {
auto elem = table.find(item_no);
return elem != table.end();
}
const RobItemTable* RobItemHeader::get_item(uint32_t item_no) const {
auto elem = table.find(item_no);
if (elem != table.end() && elem->second.type != ROB_ITEM_TYPE_NONE)
return &elem->second;
+2 -1
View File
@@ -115,7 +115,8 @@ struct RobItemHeader {
RobItemHeader();
~RobItemHeader();
const RobItemTable* get_item(uint32_t item_no);
bool check_item(uint32_t item_no) const;
const RobItemTable* get_item(uint32_t item_no) const;
};
extern void item_table_handler_array_init();
+3 -2
View File
@@ -6,6 +6,7 @@
#include "pv_db.hpp"
#include "../KKdLib/hash.hpp"
#include "../KKdLib/str_utils.hpp"
#include "rob/rob.hpp"
#include "data.hpp"
#include "hand_item.hpp"
#include "mdata_manager.hpp"
@@ -761,9 +762,9 @@ int32_t pv_db_pv::get_pseudo_costume(pv_performer_type type, CHARA_NUM chara_num
case PV_PERFORMER_PSEUDO_SAME:
return costume;
case PV_PERFORMER_PSEUDO_SWIM:
return rob_data_get_swim_costume(chara_num);
return get_rob_data_swim_costume(chara_num);
case PV_PERFORMER_PSEUDO_SWIM_S:
return rob_data_get_swim_s_costume(chara_num);
return get_rob_data_swim_s_costume(chara_num);
case PV_PERFORMER_PSEUDO_MYCHARA:
return -1;
default:
+2 -2
View File
@@ -325,7 +325,7 @@ namespace rndr {
int32_t next_query_index = (query_index + 2) % 3;
for (int32_t i = 0; i < ROB_ID_MAX; i++, chara_data++) {
rob_chara* rob_chr = get_rob_management()->get_rob((ROB_ID)i);
if (!rob_chr || !rob_chr->get_disp_flag())
if (!rob_chr || !rob_chr->check_disp())
continue;
float_t max_face_depth = rob_chr->get_face_depth();
@@ -1890,7 +1890,7 @@ namespace rndr {
ExposureCharaData* chara_data = exposure_chara_data;
for (int32_t i = 0; i < ROB_ID_MAX; i++, chara_data++) {
rob_chara* rob_chr = get_rob_management()->get_rob((ROB_ID)i);
if (!rob_chr || !rob_chr->get_disp_flag())
if (!rob_chr || !rob_chr->check_disp())
continue;
vec4 v34 = { 0.05f, 0.0f, -0.04f, 1.0f };
+1 -1
View File
@@ -79,7 +79,7 @@ namespace renderer {
size_t rob_num = rob_man->get_rob_num();
for (int32_t i = 0; i < rob_num; i++) {
rob_chara* rob_chr = rob_man->get_rob((ROB_ID)i);
if (!rob_chr || !rob_chr->get_disp_flag())
if (!rob_chr || !rob_chr->check_disp())
continue;
mat4 mat = mat4_identity;
+354 -1975
View File
File diff suppressed because it is too large Load Diff
+54 -207
View File
@@ -20,6 +20,7 @@
#include "../render_context.hpp"
#include "../object.hpp"
#include "../static_var.hpp"
#include "rob_item.hpp"
enum ACT_NAME {
ROB_ACT_NONE = 0,
@@ -2679,7 +2680,7 @@ struct eyes_adjust {
eyes_adjust();
};
struct RobItemEquipInit {
struct RobInitItem {
uint32_t item_no[4];
};
@@ -2697,7 +2698,7 @@ struct RobInit {
uint32_t face_mot_slot[10];
int32_t chara_size_index;
bool height_adjust;
RobItemEquipInit item;
RobInitItem item;
eyes_adjust eyes_adjust;
RobInit();
@@ -3599,6 +3600,7 @@ public:
void add_motion_reset_data(const uint32_t& motnum, const float_t& frame, int32_t init_cnt);
void check_no_opd(std::vector<opd_blend_data>& opd_blend_data);
void dest();
void dest_ex_node();
void disp(const mat4& mat, render_context* rctx);
const RobNode* get_node(int32_t index) const;
@@ -3606,7 +3608,7 @@ public:
int32_t get_node_index(const char* name, const bone_database* bone_data) const;
const mat4* get_ex_data_bone_node_mat(const char* name);
RobJointNode* get_normal_ref_osage_node(const std::string& str, size_t* index);
void init_members(size_t index = 0xDEADBEEF);
void init(size_t idx = 0xDEADBEEF);
void pos_reset(int32_t init_cnt);
void reset_ex_force();
void reset_nodes_ex_force(rob_osage_parts_bit parts_bits);
@@ -3653,7 +3655,7 @@ public:
std::vector<TexChange> hyoutan_texchg_list;
object_info hyoutan_obj;
int32_t hyoutan_rpk;
bool disable_update;
bool freeze_flag;
HyoutanStat hyoutan_status;
vec4 skin_color;
float_t wet_cloth;
@@ -3682,10 +3684,10 @@ public:
const RobSkinDisp* get_skin_work(ROB_PARTS_KIND rpk) const;
const mat4* get_ex_data_bone_node_mat(ROB_PARTS_KIND rpk, const char* name);
ROB_PARTS_KIND get_free_item(ROB_PARTS_KIND rpk) const;
void dest();
void init(const RobNode* rob_node);
void pos_reset(uint8_t init_cnt);
void reset();
void reset_ex_force();
void reset_init_data(RobNode* mot_node);
void reset_nodes_ex_force(rob_osage_parts parts);
void set_alpha_obj_flags(float_t alpha, mdl::ObjFlags flags);
void set_base(ROB_PARTS_KIND rpk, object_info obj_uid, bool osage_reset,
@@ -3715,192 +3717,14 @@ public:
void set_osage_move_cancel(uint8_t id, const float_t& mv_ccl);
void set_reflect(ROB_PARTS_KIND rpk, bool flag);
void set_shadow(ROB_PARTS_KIND rpk, bool flag);
void set_shadow_group(int32_t rob_id);
void set_shadow_group(int32_t group);
void set_skin(object_info obj_uid, ROB_PARTS_KIND kind, bool osage_reset,
const bone_database* bone_data, void* data, const object_database* obj_db);
void set_tex_change(ROB_PARTS_KIND rpk, const TexChange* texchg, int32_t tex_num);
void skp_load(ROB_PARTS_KIND rpk, const skin_param_osage_root& skp_root, std::vector<skin_param_osage_node>& vec,
skin_param_file_data* skp_file_data, const bone_database* bone_data);
};
struct RobItemTXHD {
texture* src;
texture* dst;
bool dst_copy;
RobItemTXHD();
~RobItemTXHD();
};
struct RobItemHavePart {
std::vector<uint32_t> item_no;
RobItemHavePart() = default;
~RobItemHavePart() = default;
};
struct RobItemHave {
RobItemHavePart part[ROB_ITEM_EQUIP_ID_MAX];
RobItemHave() = default;
~RobItemHave() = default;
};
struct RobItemHaveSub {
RobItemHavePart part[ROB_ITEM_EQUIP_SUB_ID_MAX];
RobItemHaveSub() = default;
~RobItemHaveSub() = default;
};
typedef prj::vector_pair_combine<std::string, RobItemEquip> RobItemDbgSet;
class RobItem {
private:
CHARA_NUM m_cn;
CHARA_NUM m_cn_load;
RobItemEquip m_equip;
RobItemEquip m_equip_load;
std::map<uint32_t, std::vector<RobItemTXHD>> m_txhd_map;
std::map<ROB_PARTS_KIND, std::vector<uint32_t>> m_nude_attr_map;
std::map<object_info, ROB_PARTS_KIND> m_rpk_map;
std::map<int32_t, ROB_PARTS_KIND> m_rpk_sp_map;
std::vector<TexChange> m_texchg_list[RPK_MAX];
std::map<int32_t, object_info> m_head_map;
private:
void equip_phase0(RobItemEquip* item_set);
void equip_phase1(RobDisp* rdp,
const bone_database* bone_data, void* data, const object_database* obj_db);
void equip_phase2(RobDisp* rdp, RobItemEquip* item_set,
const bone_database* bone_data, void* data, const object_database* obj_db);
void equip_phase3(RobDisp* rdp, RobItemEquip* item_set,
const bone_database* bone_data, void* data, const object_database* obj_db);
void equip_phase4(RobDisp* rdp, RobItemEquip* item_set,
const bone_database* bone_data, void* data, const object_database* obj_db);
void equip_phase5(RobDisp* rdp, RobItemEquip* item_set);
void equip_phase6(RobDisp* rdp, RobItemEquip* item_set);
void equip_phase6(RobDisp* rdp, RobItemEquip* item_set, uint32_t item_no);
void equip_phase7();
ROB_PARTS_KIND get_rpk_item(ROB_ITEM_EQUIP_SUB_ID id) const;
void hide_rpk_sp(RobDisp* rdp, int32_t rpk_sp,
const bone_database* bone_data, void* data, const object_database* obj_db);
void make_chg_tex(uint32_t item_no, const RobItemTable* tbl);
void free_copy_texture_all();
void init_nude_attr_map();
void make_nude_attr_map(uint32_t item_no, const RobItemTable* tbl);
void set_obj_phase2(RobDisp* rdp, uint32_t item_no, const RobItemTable* tbl, ROB_ITEM_EQUIP_SUB_ID id,
const bone_database* bone_data, void* data, const object_database* obj_db);
void set_obj_phase3(RobDisp* rdp, uint32_t item_no, const RobItemTable* tbl,
const bone_database* bone_data, void* data, const object_database* obj_db);
void set_texture(RobDisp* rdp,
const std::vector<uint32_t>& item_nos, ROB_PARTS_KIND rpk, bool is_hyoutan = false);
void set_texture(RobDisp* rdp, uint32_t item_no, ROB_PARTS_KIND rpk, bool is_hyoutan = false);
void reset_texture(RobDisp* rdp, ROB_PARTS_KIND rpk, bool is_hyoutan = false);
void clear_texchg_list();
void disp_obj_internal(object_info obj_uid, mat4& mat, uint32_t item_no, render_context* rctx);
//static bool s_check_equip_exclusion(CHARA_NUM cn, RobItemEquip*);
//static bool s_check_equip_sub(CHARA_NUM cn, int32_t, const RobItemHeader*, RobItemEquip*, const PlayerInformation*);
//static bool s_check_equip_sub_phase0(uint32_t, const RobItemHeader*);
//static bool s_check_equip_sub_phase1(CHARA_NUM cn, uint32_t);
//static bool s_check_equip_sub_phase2(CHARA_NUM cn, uint32_t, int32_t);
//static bool s_check_equip_sub_phase3(CHARA_NUM cn, uint32_t, const pd::PlayerBitfield<2000>&);
//static bool s_check_equip_sub_phase4(CHARA_NUM cn, uint32_t, int32_t);
//static bool s_check_equip_sub_phase5(CHARA_NUM cn, int32_t, uint32_t);
//static bool s_check_equip_chara(CHARA_NUM, int32_t, RobItemEquip*);
//static bool s_check_equip_point(CHARA_NUM, const RobItemHeader*, const RobItemEquip*);
static bool s_repair_equip(CHARA_NUM, uint32_t, int32_t, RobItemEquip* item_set);
static int32_t s_have_dbg_ref;
static RobItemHave s_have_dbg[];
static int32_t s_have_sub_dbg_ref;
static RobItemHaveSub s_have_sub_dbg[];
public:
RobItem();
~RobItem();
void set_chara_num(CHARA_NUM cn);
void req_obj(uint32_t item_no, void* data, const object_database* obj_db);
bool wait_obj(uint32_t item_no);
void free_obj(uint32_t item_no);
void req_obj_all(void* data, const object_database* obj_db);
bool wait_obj_all();
void free_obj_all();
void free_obj_diff();
private:
void regist_item(ROB_ITEM_EQUIP_SUB_ID id, uint32_t item_no);
public:
void regist_item_one(uint32_t item_no);
void regist_item_all(const RobItemEquip* item_set);
void delete_item(uint32_t item_no);
void equip(int32_t rc, const bone_database* bone_data,
void* data, const object_database* obj_db);
ROB_ITEM_EQUIP_ID get_equip_id(uint32_t item_no) const;
ROB_ITEM_EQUIP_SUB_ID get_equip_sub_id(uint32_t item_no) const;
uint32_t check_exclusive_item(uint32_t item_no) const;
RobItemEquip* get_equip();
const RobItemEquip* get_equip() const;
bool is_equipped_item(uint32_t item_no) const;
//const char* get_name(uint32_t item_no) const;
//const char* get_name_asc(uint32_t item_no) const;
void init_disp_obj(uint32_t item_no);
void disp_obj(uint32_t item_no, render_context* rctx, const mat4& mat);
void get_item_texchange_list(uint32_t item_no, std::vector<TexChange>& tex_chg_list);
RobItemEquip* get_equip_load();
const RobItemEquip* get_equip_load() const;
void regist_item_all(const RobItemEquipInit* item_set);
void free_copy_texture(uint32_t item_no);
void free_copy_texture(std::map<uint32_t, std::vector<RobItemTXHD>>::iterator elem);
bool check_for_npr_flag() const;
object_info get_head_object_replace(int32_t head_object_id) const;
float_t get_face_depth() const;
static const char* s_get_equip_sub_id_str(ROB_ITEM_EQUIP_SUB_ID id);
//static bool s_check_equip(CHARA_NUM cn, int32_t, RobItemEquip*, const void*);
//static void s_get_objset(CHARA_NUM cn, uint32_t, int32_t*, size_t);
static const char* s_get_name(const CHARA_NUM& cn, uint32_t item_no);
static ROB_ITEM_EQUIP_ID s_get_equip_id(CHARA_NUM cn, uint32_t item_no);
static ROB_ITEM_EQUIP_SUB_ID s_get_equip_sub_id(CHARA_NUM cn, uint32_t item_no);
static void s_get_equip_sub_group(int32_t id, std::vector<int32_t>* sub_group);
static bool s_is_replace_part(CHARA_NUM cn, uint32_t item_no, ROB_ITEM_EQUIP_SUB_ID id);
static bool s_equip_ok(CHARA_NUM cn, uint32_t item_no, ROB_ITEM_EQUIP_SUB_ID id);
//static bool s_have_costume(CHARA_NUM cn, int32_t, const void*);
static uint32_t s_get_exclusion(CHARA_NUM cn, uint32_t item_no);
//static uint32_t s_get_set_item_no(CHARA_NUM cn, uint32_t item_no);
static uint32_t s_get_point(CHARA_NUM cn, uint32_t item_no);
static void s_get_offset_list(CHARA_NUM cn, uint32_t item_no, std::vector<RobItemDataOfs>& ofs_list, bool clear);
static ROB_ITEM_TYPE s_get_type(CHARA_NUM cn, uint32_t item_no);
static bool s_is_texorg(CHARA_NUM cn, uint32_t item_no);
static bool s_is_objorg(CHARA_NUM cn, uint32_t item_no);
//static void s_get_ng_item();
//static void s_get_ng_item_name();
//static void s_get_ng_item_point();
//static bool s_check_ng_item(CHARA_NUM cn, uint32_t item_no);
static std::string s_check_ng_item_name(CHARA_NUM cn, uint32_t item_no);
static int32_t s_check_ng_item_point(CHARA_NUM cn, uint32_t item_no);
static uint32_t get_dbgset_num(CHARA_NUM cn);
static const RobItemDbgSet* get_dbgset(CHARA_NUM cn);
static void init_have_dbg();
static void dest_have_dbg();
static void init_have_sub_dbg();
static void dest_have_sub_dbg();
static RobItemHave* get_have_dbg(CHARA_NUM cn);
static RobItemHaveSub* get_have_sub_dbg(CHARA_NUM cn);
static void s_req_obj(CHARA_NUM cn, uint32_t item_no, void* data, const object_database* obj_db);
static bool s_wait_obj(CHARA_NUM cn, uint32_t item_no);
static void s_free_obj(CHARA_NUM cn, uint32_t item_no);
static void s_req_obj_all(CHARA_NUM cn, const RobItemEquip* item_set, void* data, const object_database* obj_db);
static bool s_wait_obj_all(CHARA_NUM cn, const RobItemEquip* item_set);
static void s_free_obj_all(CHARA_NUM cn, const RobItemEquip* item_set);
static void s_regist_item_one(CHARA_NUM cn, uint32_t item_no, RobItem* rob_item);
static void s_regist_item_all(CHARA_NUM cn, const RobItemEquip* item_set, RobItem* rob_item);
static void s_delete_item(CHARA_NUM cn, uint32_t item_no, RobItem* rob_item);
static bool check_one_skin(int32_t costume);
};
union RobFlag {
@@ -3937,7 +3761,7 @@ union RobFlag {
int8_t rf_28 : 1;
int8_t rf_29 : 1;
int8_t rf_30 : 1;
int8_t no_ctrl : 1;
int8_t zero_disp : 1;
} bit;
};
@@ -5181,7 +5005,7 @@ public:
bool disp_pos_reset;
bool disp_pos_reset_forbidden;
CHARA_NUM chara_num;
int32_t cos_id;
int32_t costume;
float_t frame_speed;
rob_chara* enemy;
rob_chara_bone_data* bone_data;
@@ -5200,20 +5024,28 @@ public:
void autoblink_disable();
void autoblink_enable();
void calc_mot_adjust_scale();
void calc_rob_colli_matrix();
RobAngle calc_mot_yang(bool compel_flag) const;
bool check_disp_left() const;
bool check_for_ageageagain_module();
void check_rob_dummy_collision_ringout();
void disble_disp_pos_reset();
void enable_disp_pos_reset();
mat4* get_bone_data_mat(size_t index);
uint32_t get_common_mot(MOTTABLE_TYPE mottbl_type) const;
int32_t get_costume() const;
float_t get_frame() const;
float_t get_frame_max() const;
const vec3* get_gpos() const;
object_info get_rob_data_face_object(int32_t index);
float_t get_face_depth() const;
float_t get_pos_scale(ROB_COLLI_ID colli_id, vec3& center);
const RobData* get_rob_data() const;
const RobInit* get_rob_init() const;
void init_colli_every_frame();
void set_item(ROB_PARTS_KIND kind, object_info obj_uid,
const bone_database* bone_data, void* data, const object_database* obj_db);
void overwrite_disp_left(bool set_flag);
void pos_reset();
void rob_info_ctrl();
void rob_motion_modifier_ctrl();
@@ -5223,20 +5055,23 @@ public:
void req_frame_change(float_t frame);
void reset_rob(const RobInit& robinit,
const bone_database* bone_data, const motion_database* mot_db);
void reset_rob_zero_disp();
void reset_osage();
void reset_osage_pos();
void set_base(ROB_PARTS_KIND kind, object_info obj_uid, bool osage_reset,
const bone_database* bone_data, void* data, const object_database* obj_db);
void set_bone_data_frame(float_t frame);
void set_chara(ROB_ID id, CHARA_NUM cn, int32_t cos_id, const RobInit& ri);
void set_chara(ROB_ID id, CHARA_NUM cn, int32_t cos, const RobInit& ri);
void set_chara_color(bool value);
void set_chara_height_adjust(bool value);
void set_chara_pos_adjust(const vec3& value);
void set_chara_pos_adjust_y(float_t value);
void set_chara_size(float_t value);
void set_costume(int32_t cos);
void set_data_adjust_mat(RobAdjust* rob_chr_adj, bool pos_adjust = true);
void set_disable_collision(rob_osage_parts parts, bool disable);
void set_disp_flag(bool flag);
void set_disp_flag(bool fl);
void set_disp_freeze(bool fl);
void set_eyelid_mottbl_motion(int32_t type, MOTTABLE_TYPE mottbl_type,
float_t value, rob_partial_motion_playback_state playback_state, float_t blend_duration,
float_t play_duration, float_t step, rob_partial_motion_loop_state loop_state,
@@ -5291,18 +5126,23 @@ public:
void set_rob_pos(const vec3& pos);
void set_rob_sys_command(ACT_NAME name, int32_t motion_id, const ActParam* param, bool mirror);
void set_rob_yang(const RobAngle& ang);
void set_rob_zero_disp();
void set_shadow_cast(bool value);
void set_stage_data_ring(const int32_t& stage_index);
void set_step_motion_step(float_t value);
void set_time_up(bool flag);
void set_use_opd(bool value);
void set_wind_strength(float_t value);
inline bool get_disp_flag() {
return !!rob_base.flag.bit.disp;
inline bool check_disp() {
return rob_base.flag.bit.disp;
}
inline bool check_zero_disp() {
return rob_base.flag.bit.zero_disp;
}
void sub_1405070E0(const bone_database* bone_data, const motion_database* mot_db);
void sub_140509D30();
void sub_1405163C0(int32_t index, mat4& mat);
void sub_140551000();
};
@@ -5322,9 +5162,11 @@ public:
bool check_disp_left(ROB_ID id);
bool check_ringout_only_rob(ROB_ID id);
bool check_ringout_transit_rob(ROB_ID id);
ROB_ID create_rob(CHARA_NUM cn, const RobInit& ri, int32_t cos_id, bool can_set_default);
ROB_ID create_rob(CHARA_NUM cn, const RobInit& ri, int32_t cos, bool can_set_default);
void dest_all();
void dest_rob(ROB_ID id);
void disable_osage_reset(ROB_ID id);
void enable_osage_reset(ROB_ID id);
float_t get_adjust_scale(ROB_ID id) const;
CHARA_NUM get_chara(ROB_ID id) const;
bool get_colli_check_on() const;
@@ -5339,18 +5181,26 @@ public:
RobItem* get_rob_robitem_work(ROB_ID id);
const RobInit* get_rob_init(ROB_ID id) const;
bool is_init(ROB_ID id) const;
void overwrite_disp_left(ROB_ID id, bool fl);
void play_auth3d_sound(ROB_ID id, const char* in_name);
void reset_osage_pos(ROB_ID id);
void reset_rob(const RobInit& rob0, const RobInit& rob1,
const bone_database* bone_data, const motion_database* mot_db);
void reset_rob(ROB_ID id, const RobInit& ri,
const bone_database* bone_data, const motion_database* mot_db);
void set_colli_check_on(bool value);
void set_disp_on(ROB_ID id, bool value);
void reset_rob_time_up();
void reset_rob_zero_disp(ROB_ID id);
void rob_disp_init(ROB_ID id);
void set_colli_check_on(bool fl);
void set_costume(ROB_ID id, int32_t cos);
void set_disp_freeze(ROB_ID id, bool fl);
void set_disp_on(ROB_ID id, bool fl);
void set_mot_frame(ROB_ID id, float_t frame);
void set_motion(ROB_ID id, int32_t motnum);
void set_no_ctrl(ROB_ID id);
void set_rob_pos(ROB_ID id, const vec3& pos);
void set_rob_time_up();
void set_rob_yang(ROB_ID id, const RobAngle& ang);
void set_rob_zero_disp(ROB_ID id);
static void init();
};
@@ -5445,15 +5295,13 @@ struct OpdChecker {
extern RobManagement* get_rob_management();
extern const RobData* get_rob_data(CHARA_NUM cn);
extern int32_t rob_data_get_chara_size_index(CHARA_NUM cn);
extern int32_t rob_data_get_swim_costume(CHARA_NUM cn);
extern int32_t rob_data_get_swim_s_costume(CHARA_NUM cn);
extern int32_t get_rob_data_chara_size_index(CHARA_NUM cn);
extern int32_t get_rob_data_swim_costume(CHARA_NUM cn);
extern int32_t get_rob_data_swim_s_costume(CHARA_NUM cn);
extern float_t chara_pos_adjust_y_table_get_value(uint32_t index);
extern float_t chara_size_table_get_value(uint32_t index);
extern bool check_cos_id_is_501(int32_t cos_id);
const char* get_dev_ram_opdi_dir();
extern const float_t get_gravity();
@@ -5514,10 +5362,9 @@ extern void rob_chara_age_age_array_set_step(int32_t rob_id, int32_t part, float
extern void rob_chara_age_age_array_set_step_full(int32_t rob_id, int32_t part);
extern void rob_chara_array_reset_pv_data(ROB_ID id);
extern void rob_chara_array_reset_bone_data_item_equip(ROB_ID id);
extern void rob_chara_array_set_alpha_obj_flags(ROB_ID id, float_t alpha, mdl::ObjFlags flags);
extern bool rob_chara_check_for_ageageagain_module(CHARA_NUM cn, int32_t cos_id);
extern bool rob_chara_check_for_ageageagain_module(CHARA_NUM cn, int32_t cos);
extern void rob_sleeve_handler_data_get_sleeve_data(
CHARA_NUM cn, int32_t cos, rob_sleeve_data& l, rob_sleeve_data& r);
@@ -5535,9 +5382,9 @@ extern void pv_osage_manager_array_set_pv_set_motion(
extern bool task_rob_load_open();
extern bool task_rob_load_append_free_req_data(CHARA_NUM cn);
extern bool task_rob_load_append_free_req_data_obj(CHARA_NUM cn, const RobItemEquip* equip);
extern bool task_rob_load_append_free_req_data_obj(CHARA_NUM cn, const RobItemEquip* item_set);
extern bool task_rob_load_append_load_req_data(CHARA_NUM cn);
extern bool task_rob_load_append_load_req_data_obj(CHARA_NUM cn, const RobItemEquip* equip);
extern bool task_rob_load_append_load_req_data_obj(CHARA_NUM cn, const RobItemEquip* item_set);
extern bool task_rob_load_check_load_req_data();
extern bool task_rob_load_close();
@@ -5556,5 +5403,5 @@ extern MOTTABLE_TYPE look_anim_id_to_mottbl_type(int32_t id);
extern MOTTABLE_TYPE mouth_anim_id_to_mottbl_type(int32_t id);
inline bool rob_chara::check_for_ageageagain_module() {
return rob_chara_check_for_ageageagain_module(chara_num, cos_id);
return rob_chara_check_for_ageageagain_module(chara_num, costume);
}
+671
View File
@@ -0,0 +1,671 @@
/*
by korenkonder
GitHub/GitLab: korenkonder
*/
#include "rob.hpp"
static const RobCollisionData MIKU_cb_tbl[] = {
{ { 0.02f , -0.005f, 0.0f }, 0.09f , BONE_ID_KL_KOSI_ETC_WJ, 0 },
{ { 0.17f , -0.02f , 0.03f }, 0.09f , BONE_ID_CL_MUNE , 1 },
{ { 0.17f , -0.02f , -0.03f }, 0.09f , BONE_ID_CL_MUNE , 1 },
{ { 0.0f , 0.02f , 0.0f }, 0.04f , BONE_ID_KL_KUBI , 0 },
{ { 0.005f, 0.0f , 0.08f }, 0.12f , BONE_ID_CL_KAO , 1 },
{ { 0.03f , 0.0f , 0.015f }, 0.055f, BONE_ID_KATA_R_WJ_CU , 1 },
{ { 0.15f , 0.0f , 0.01f }, 0.05f , BONE_ID_KATA_R_WJ_CU , 0 },
{ { 0.05f , 0.0f , 0.01f }, 0.05f , BONE_ID_UDE_R_WJ , 0 },
{ { 0.17f , 0.0f , 0.015f }, 0.06f , BONE_ID_UDE_R_WJ , 0 },
{ { 0.08f , 0.0f , 0.0f }, 0.07f , BONE_ID_KL_TE_R_WJ , 1 },
{ { 0.03f , 0.0f , -0.015f }, 0.055f, BONE_ID_KATA_L_WJ_CU , 1 },
{ { 0.15f , 0.0f , -0.01f }, 0.05f , BONE_ID_KATA_L_WJ_CU , 0 },
{ { 0.05f , 0.0f , -0.01f }, 0.05f , BONE_ID_UDE_L_WJ , 0 },
{ { 0.17f , 0.0f , -0.015f }, 0.06f , BONE_ID_UDE_L_WJ , 0 },
{ { 0.08f , 0.0f , 0.0f }, 0.07f , BONE_ID_KL_TE_L_WJ , 1 },
{ { 0.04f , -0.02f , -0.02f }, 0.13f , BONE_ID_J_MOMO_R_WJ , 1 },
{ { 0.26f , -0.02f , -0.025f }, 0.09f , BONE_ID_J_MOMO_R_WJ , 0 },
{ { 0.08f , 0.0f , -0.02f }, 0.09f , BONE_ID_J_SUNE_R_WJ , 0 },
{ { 0.28f , 0.0f , -0.02f }, 0.09f , BONE_ID_J_SUNE_R_WJ , 0 },
{ { 0.03f , -0.02f , -0.01f }, 0.07f , BONE_ID_KL_ASI_R_WJ_CO, 0 },
{ { 0.02f , -0.02f , -0.02f }, 0.035f, BONE_ID_KL_TOE_R_WJ , 0 },
{ { 0.04f , -0.02f , 0.02f }, 0.13f , BONE_ID_J_MOMO_L_WJ , 1 },
{ { 0.26f , -0.02f , 0.025f }, 0.09f , BONE_ID_J_MOMO_L_WJ , 0 },
{ { 0.09f , 0.0f , 0.02f }, 0.09f , BONE_ID_J_SUNE_L_WJ , 0 },
{ { 0.28f , 0.0f , 0.02f }, 0.09f , BONE_ID_J_SUNE_L_WJ , 0 },
{ { 0.03f , -0.02f , 0.01f }, 0.07f , BONE_ID_KL_ASI_L_WJ_CO, 0 },
{ { 0.02f , -0.02f , 0.02f }, 0.035f, BONE_ID_KL_TOE_L_WJ , 0 },
};
static const RobCollisionData MIKU_cb_push_tbl[] = {
{ { -0.00391f, -0.08831f, 0.0f }, 0.09f , BONE_ID_KL_KOSI_ETC_WJ, 0 },
{ { 0.17f , -0.02f , 0.03f }, 0.09f , BONE_ID_CL_MUNE , 1 },
{ { 0.17f , -0.02f , -0.03f }, 0.09f , BONE_ID_CL_MUNE , 1 },
{ { 0.0f , 0.02f , 0.0f }, 0.04f , BONE_ID_KL_KUBI , 0 },
{ { 0.05025f, 0.0f , -0.00181f }, 0.12f , BONE_ID_CL_KAO , 1 },
{ { 0.03f , 0.0f , 0.015f }, 0.055f, BONE_ID_KATA_R_WJ_CU , 1 },
{ { 0.15f , 0.0f , 0.01f }, 0.05f , BONE_ID_KATA_R_WJ_CU , 0 },
{ { 0.05f , 0.0f , 0.01f }, 0.05f , BONE_ID_UDE_R_WJ , 0 },
{ { 0.17f , 0.0f , 0.015f }, 0.06f , BONE_ID_UDE_R_WJ , 0 },
{ { 0.08f , 0.0f , 0.0f }, 0.07f , BONE_ID_KL_TE_R_WJ , 1 },
{ { 0.03f , 0.0f , -0.015f }, 0.055f, BONE_ID_KATA_L_WJ_CU , 1 },
{ { 0.15f , 0.0f , -0.01f }, 0.05f , BONE_ID_KATA_L_WJ_CU , 0 },
{ { 0.05f , 0.0f , -0.01f }, 0.05f , BONE_ID_UDE_L_WJ , 0 },
{ { 0.17f , 0.0f , -0.015f }, 0.06f , BONE_ID_UDE_L_WJ , 0 },
{ { 0.08f , 0.0f , 0.0f }, 0.07f , BONE_ID_KL_TE_L_WJ , 1 },
{ { 0.04f , -0.02f , -0.02f }, 0.13f , BONE_ID_J_MOMO_R_WJ , 1 },
{ { 0.26f , -0.02f , -0.025f }, 0.09f , BONE_ID_J_MOMO_R_WJ , 0 },
{ { 0.08f , 0.0f , -0.02f }, 0.09f , BONE_ID_J_SUNE_R_WJ , 0 },
{ { 0.28f , 0.0f , -0.02f }, 0.09f , BONE_ID_J_SUNE_R_WJ , 0 },
{ { 0.03f , -0.02f , -0.01f }, 0.07f , BONE_ID_KL_ASI_R_WJ_CO, 0 },
{ { 0.02f , -0.02f , -0.02f }, 0.035f, BONE_ID_KL_TOE_R_WJ , 0 },
{ { 0.04f , -0.02f , 0.02f }, 0.13f , BONE_ID_J_MOMO_L_WJ , 1 },
{ { 0.26f , -0.02f , 0.025f }, 0.09f , BONE_ID_J_MOMO_L_WJ , 0 },
{ { 0.08f , 0.0f , 0.02f }, 0.09f , BONE_ID_J_SUNE_L_WJ , 0 },
{ { 0.28f , 0.0f , 0.02f }, 0.09f , BONE_ID_J_SUNE_L_WJ , 0 },
{ { 0.03f , -0.02f , 0.01f }, 0.07f , BONE_ID_KL_ASI_L_WJ_CO, 0 },
{ { 0.02f , -0.02f , 0.02f }, 0.035f, BONE_ID_KL_TOE_L_WJ , 0 },
};
static const RobCollisionData LUK_cb_tbl[] = {
{ { 0.02f , -0.005f, 0.0f }, 0.09f , BONE_ID_KL_KOSI_ETC_WJ, 0 },
{ { 0.165f , -0.02f , 0.015f }, 0.105f, BONE_ID_CL_MUNE , 1 },
{ { 0.165f , -0.02f , -0.015f }, 0.105f, BONE_ID_CL_MUNE , 1 },
{ { 0.0f , 0.02f , 0.0f }, 0.04f , BONE_ID_KL_KUBI , 0 },
{ { 0.005f , 0.0f , 0.08f }, 0.12f , BONE_ID_CL_KAO , 1 },
{ { 0.03f , 0.0f , 0.015f }, 0.055f, BONE_ID_KATA_R_WJ_CU , 1 },
{ { 0.15f , 0.0f , 0.01f }, 0.05f , BONE_ID_KATA_R_WJ_CU , 0 },
{ { 0.05f , 0.0f , 0.01f }, 0.05f , BONE_ID_UDE_R_WJ , 0 },
{ { 0.17f , 0.0f , 0.015f }, 0.06f , BONE_ID_UDE_R_WJ , 0 },
{ { 0.08f , 0.0f , 0.0f }, 0.07f , BONE_ID_KL_TE_R_WJ , 1 },
{ { 0.03f , 0.0f , -0.015f }, 0.055f, BONE_ID_KATA_L_WJ_CU , 1 },
{ { 0.15f , 0.0f , -0.01f }, 0.05f , BONE_ID_KATA_L_WJ_CU , 0 },
{ { 0.05f , 0.0f , -0.01f }, 0.05f , BONE_ID_UDE_L_WJ , 0 },
{ { 0.17f , 0.0f , -0.015f }, 0.06f , BONE_ID_UDE_L_WJ , 0 },
{ { 0.08f , 0.0f , 0.0f }, 0.07f , BONE_ID_KL_TE_L_WJ , 1 },
{ { 0.04f , -0.02f , -0.02f }, 0.13f , BONE_ID_J_MOMO_R_WJ , 1 },
{ { 0.26f , -0.02f , -0.025f }, 0.09f , BONE_ID_J_MOMO_R_WJ , 0 },
{ { 0.08f , 0.0f , -0.02f }, 0.09f , BONE_ID_J_SUNE_R_WJ , 0 },
{ { 0.28f , 0.0f , -0.02f }, 0.09f , BONE_ID_J_SUNE_R_WJ , 0 },
{ { 0.03f , -0.02f , -0.01f }, 0.07f , BONE_ID_KL_ASI_R_WJ_CO, 0 },
{ { 0.02f , -0.02f , -0.02f }, 0.035f, BONE_ID_KL_TOE_R_WJ , 0 },
{ { 0.04f , -0.02f , 0.02f }, 0.13f , BONE_ID_J_MOMO_L_WJ , 1 },
{ { 0.26f , -0.02f , 0.025f }, 0.09f , BONE_ID_J_MOMO_L_WJ , 0 },
{ { 0.08f , 0.0f , 0.02f }, 0.09f , BONE_ID_J_SUNE_L_WJ , 0 },
{ { 0.28f , 0.0f , 0.02f }, 0.09f , BONE_ID_J_SUNE_L_WJ , 0 },
{ { 0.03f , -0.02f , 0.01f }, 0.07f , BONE_ID_KL_ASI_L_WJ_CO, 0 },
{ { 0.02f , -0.02f , 0.02f }, 0.035f, BONE_ID_KL_TOE_L_WJ , 0 },
};
static const RobCollisionData LUK_cb_push_tbl[] = {
{ { -0.00391f, -0.08831f, 0.0f }, 0.09f , BONE_ID_KL_KOSI_ETC_WJ, 0 },
{ { 0.165f , -0.02f , 0.015f }, 0.105f, BONE_ID_CL_MUNE , 1 },
{ { 0.165f , -0.02f , -0.015f }, 0.105f, BONE_ID_CL_MUNE , 1 },
{ { 0.0f , 0.02f , 0.0f }, 0.04f , BONE_ID_KL_KUBI , 0 },
{ { 0.05025f, 0.0f , -0.00181f }, 0.12f , BONE_ID_CL_KAO , 1 },
{ { 0.03f , 0.0f , 0.015f }, 0.055f, BONE_ID_KATA_R_WJ_CU , 1 },
{ { 0.15f , 0.0f , 0.01f }, 0.05f , BONE_ID_KATA_R_WJ_CU , 0 },
{ { 0.05f , 0.0f , 0.01f }, 0.05f , BONE_ID_UDE_R_WJ , 0 },
{ { 0.17f , 0.0f , 0.015f }, 0.06f , BONE_ID_UDE_R_WJ , 0 },
{ { 0.08f , 0.0f , 0.0f }, 0.07f , BONE_ID_KL_TE_R_WJ , 1 },
{ { 0.03f , 0.0f , -0.015f }, 0.055f, BONE_ID_KATA_L_WJ_CU , 1 },
{ { 0.15f , 0.0f , -0.01f }, 0.05f , BONE_ID_KATA_L_WJ_CU , 0 },
{ { 0.05f , 0.0f , -0.01f }, 0.05f , BONE_ID_UDE_L_WJ , 0 },
{ { 0.17f , 0.0f , -0.015f }, 0.06f , BONE_ID_UDE_L_WJ , 0 },
{ { 0.08f , 0.0f , 0.0f }, 0.07f , BONE_ID_KL_TE_L_WJ , 1 },
{ { 0.04f , -0.02f , -0.02f }, 0.13f , BONE_ID_J_MOMO_R_WJ , 1 },
{ { 0.26f , -0.02f , -0.025f }, 0.09f , BONE_ID_J_MOMO_R_WJ , 0 },
{ { 0.08f , 0.0f , -0.02f }, 0.09f , BONE_ID_J_SUNE_R_WJ , 0 },
{ { 0.28f , 0.0f , -0.02f }, 0.09f , BONE_ID_J_SUNE_R_WJ , 0 },
{ { 0.03f , -0.02f , -0.01f }, 0.07f , BONE_ID_KL_ASI_R_WJ_CO, 0 },
{ { 0.02f , -0.02f , -0.02f }, 0.035f, BONE_ID_KL_TOE_R_WJ , 0 },
{ { 0.04f , -0.02f , 0.02f }, 0.13f , BONE_ID_J_MOMO_L_WJ , 1 },
{ { 0.26f , -0.02f , 0.025f }, 0.09f , BONE_ID_J_MOMO_L_WJ , 0 },
{ { 0.08f , 0.0f , 0.02f }, 0.09f , BONE_ID_J_SUNE_L_WJ , 0 },
{ { 0.28f , 0.0f , 0.02f }, 0.09f , BONE_ID_J_SUNE_L_WJ , 0 },
{ { 0.03f , -0.02f , 0.01f }, 0.07f , BONE_ID_KL_ASI_L_WJ_CO, 0 },
{ { 0.02f , -0.02f , 0.02f }, 0.035f, BONE_ID_KL_TOE_L_WJ , 0 },
};
static const RobKamae kamae_data_tbl = {
"COMMON_KAMAE",
1,
1,
1,
4,
0,
};
static const RobKamae* kamae_tbl_miku[] = {
&kamae_data_tbl,
};
static const RobData rob_data[] = {
{
0x0000, BONE_KIND_MIK,
{
object_info(0x0000, 0x0000),
object_info(0x00F7, 0x0000),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
},
1, 0, MIKU_cb_tbl, MIKU_cb_push_tbl, kamae_tbl_miku,
1, 0, { 0x01, 0x01, 0x1E, 0x1D },
{
object_info(0x00F7, 0x0000),
object_info(0x011D, 0x0000),
object_info(0x011E, 0x0000),
object_info(0x011F, 0x0000),
object_info(0x0120, 0x0000),
object_info(0x0121, 0x0000),
object_info(0x0122, 0x0000),
object_info(0x020F, 0x0000),
object_info(0x0251, 0x0000),
},
{
object_info(),
object_info(0x0124, 0x0000),
object_info(0x0123, 0x0000),
object_info(0x0125, 0x0000),
object_info(0x0126, 0x0000),
object_info(0x0127, 0x0000),
object_info(0x0128, 0x0000),
object_info(0x0259, 0x0000),
object_info(0x0254, 0x0000),
object_info(0x0252, 0x0000),
object_info(0x0253, 0x0000),
object_info(0x0255, 0x0000),
object_info(0x0256, 0x0000),
object_info(0x0258, 0x0000),
object_info(0x0257, 0x0000),
},
},
{
0x0107, BONE_KIND_RIN,
{
object_info(0x0000, 0x0000),
object_info(0x004A, 0x0107),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
},
9, 0, MIKU_cb_tbl, MIKU_cb_push_tbl, kamae_tbl_miku,
1, 0, { 0x02, 0x02, 0x01, 0x01 },
{
object_info(0x004A, 0x0107),
object_info(0x004E, 0x0107),
object_info(0x004F, 0x0107),
object_info(0x0050, 0x0107),
object_info(0x0051, 0x0107),
object_info(0x0052, 0x0107),
object_info(0x0053, 0x0107),
object_info(0x00A6, 0x0107),
object_info(0x00C3, 0x0107),
},
{
object_info(),
object_info(0x0055, 0x0107),
object_info(0x0054, 0x0107),
object_info(0x0056, 0x0107),
object_info(0x0057, 0x0107),
object_info(0x0058, 0x0107),
object_info(0x0059, 0x0107),
object_info(0x00CB, 0x0107),
object_info(0x00C6, 0x0107),
object_info(0x00C4, 0x0107),
object_info(0x00C5, 0x0107),
object_info(0x00C7, 0x0107),
object_info(0x00C8, 0x0107),
object_info(0x00CA, 0x0107),
object_info(0x00C9, 0x0107),
},
},
{
0x0105, BONE_KIND_LEN,
{
object_info(0x0000, 0x0000),
object_info(0x0040, 0x0105),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
},
5, 0, MIKU_cb_tbl, MIKU_cb_push_tbl, kamae_tbl_miku,
0, 0, { 0x02, 0x03, 0x01, 0x01 },
{
object_info(0x0040, 0x0105),
object_info(0x0041, 0x0105),
object_info(0x0042, 0x0105),
object_info(0x0043, 0x0105),
object_info(0x0044, 0x0105),
object_info(0x0045, 0x0105),
object_info(0x0046, 0x0105),
object_info(0x007F, 0x0105),
object_info(0x0098, 0x0105),
},
{
object_info(),
object_info(0x0048, 0x0105),
object_info(0x0047, 0x0105),
object_info(0x0049, 0x0105),
object_info(0x004A, 0x0105),
object_info(0x004B, 0x0105),
object_info(0x004C, 0x0105),
object_info(0x00A0, 0x0105),
object_info(0x009B, 0x0105),
object_info(0x0099, 0x0105),
object_info(0x009A, 0x0105),
object_info(0x009C, 0x0105),
object_info(0x009D, 0x0105),
object_info(0x009F, 0x0105),
object_info(0x009E, 0x0105),
},
},
{
0x0106, BONE_KIND_LUK,
{
object_info(0x0000, 0x0000),
object_info(0x004C, 0x0106),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
},
6, 0, LUK_cb_tbl, LUK_cb_push_tbl, kamae_tbl_miku,
0, 0, { 0x01, 0x04, 0x01, 0x01 },
{
object_info(0x004C, 0x0106),
object_info(0x004D, 0x0106),
object_info(0x004E, 0x0106),
object_info(0x004F, 0x0106),
object_info(0x0050, 0x0106),
object_info(0x0051, 0x0106),
object_info(0x0052, 0x0106),
object_info(0x008C, 0x0106),
object_info(0x00A1, 0x0106),
},
{
object_info(),
object_info(0x0054, 0x0106),
object_info(0x0053, 0x0106),
object_info(0x0055, 0x0106),
object_info(0x0056, 0x0106),
object_info(0x0057, 0x0106),
object_info(0x0058, 0x0106),
object_info(0x00A9, 0x0106),
object_info(0x00A4, 0x0106),
object_info(0x00A2, 0x0106),
object_info(0x00A3, 0x0106),
object_info(0x00A5, 0x0106),
object_info(0x00A6, 0x0106),
object_info(0x00A8, 0x0106),
object_info(0x00A7, 0x0106),
},
},
{
0x0108, BONE_KIND_NER,
{
object_info(0x0000, 0x0000),
object_info(0x0019, 0x0108),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
},
8, 0, MIKU_cb_tbl, MIKU_cb_push_tbl, kamae_tbl_miku,
0, 0, { 0x02, 0x02, 0x02, 0x02 },
{
object_info(0x0019, 0x0108),
object_info(0x001A, 0x0108),
object_info(0x001B, 0x0108),
object_info(0x001C, 0x0108),
object_info(0x001D, 0x0108),
object_info(0x001E, 0x0108),
object_info(0x001F, 0x0108),
object_info(0x002A, 0x0108),
object_info(0x002B, 0x0108),
},
{
object_info(),
object_info(0x0021, 0x0108),
object_info(0x0020, 0x0108),
object_info(0x0022, 0x0108),
object_info(0x0023, 0x0108),
object_info(0x0024, 0x0108),
object_info(0x0025, 0x0108),
object_info(0x0033, 0x0108),
object_info(0x002E, 0x0108),
object_info(0x002C, 0x0108),
object_info(0x002D, 0x0108),
object_info(0x002F, 0x0108),
object_info(0x0030, 0x0108),
object_info(0x0032, 0x0108),
object_info(0x0031, 0x0108),
},
},
{
0x0109, BONE_KIND_HAK,
{
object_info(0x0000, 0x0000),
object_info(0x001F, 0x0109),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
},
3, 0, LUK_cb_tbl, LUK_cb_push_tbl, kamae_tbl_miku,
1, 0, { 0x01, 0x01, 0x02, 0x02 },
{
object_info(0x001F, 0x0109),
object_info(0x0020, 0x0109),
object_info(0x0021, 0x0109),
object_info(0x0022, 0x0109),
object_info(0x0023, 0x0109),
object_info(0x0024, 0x0109),
object_info(0x0025, 0x0109),
object_info(0x0032, 0x0109),
object_info(0x0033, 0x0109),
},
{
object_info(),
object_info(0x0027, 0x0109),
object_info(0x0026, 0x0109),
object_info(0x0028, 0x0109),
object_info(0x0029, 0x0109),
object_info(0x002A, 0x0109),
object_info(0x002B, 0x0109),
object_info(0x003B, 0x0109),
object_info(0x0036, 0x0109),
object_info(0x0034, 0x0109),
object_info(0x0035, 0x0109),
object_info(0x0037, 0x0109),
object_info(0x0038, 0x0109),
object_info(0x003A, 0x0109),
object_info(0x0039, 0x0109),
},
},
{
0x010D, BONE_KIND_KAI,
{
object_info(0x0000, 0x0000),
object_info(0x003C, 0x010D),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
},
4, 0, MIKU_cb_tbl, MIKU_cb_push_tbl, kamae_tbl_miku,
0, 0, { 0x00, 0x00, 0x01, 0x01 },
{
object_info(0x003C, 0x010D),
object_info(0x0050, 0x010D),
object_info(0x003D, 0x010D),
object_info(0x003E, 0x010D),
object_info(0x003F, 0x010D),
object_info(0x0040, 0x010D),
object_info(0x0041, 0x010D),
object_info(0x006D, 0x010D),
object_info(0x0077, 0x010D),
},
{
object_info(),
object_info(0x0044, 0x010D),
object_info(0x0043, 0x010D),
object_info(0x0045, 0x010D),
object_info(0x0046, 0x010D),
object_info(0x0047, 0x010D),
object_info(0x0048, 0x010D),
object_info(0x007F, 0x010D),
object_info(0x007A, 0x010D),
object_info(0x0078, 0x010D),
object_info(0x0079, 0x010D),
object_info(0x007B, 0x010D),
object_info(0x007C, 0x010D),
object_info(0x007E, 0x010D),
object_info(0x007D, 0x010D),
},
},
{
0x010E, BONE_KIND_MEI,
{
object_info(0x0000, 0x0000),
object_info(0x0040, 0x010E),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
},
7, 0, LUK_cb_tbl, LUK_cb_push_tbl, kamae_tbl_miku,
1, 0, { 0x00, 0x00, 0x01, 0x01 },
{
object_info(0x0040, 0x010E),
object_info(0x0041, 0x010E),
object_info(0x0042, 0x010E),
object_info(0x0043, 0x010E),
object_info(0x0044, 0x010E),
object_info(0x0045, 0x010E),
object_info(0x0046, 0x010E),
object_info(0x007B, 0x010E),
object_info(0x0085, 0x010E),
},
{
object_info(),
object_info(0x0048, 0x010E),
object_info(0x0047, 0x010E),
object_info(0x0049, 0x010E),
object_info(0x004A, 0x010E),
object_info(0x004B, 0x010E),
object_info(0x004C, 0x010E),
object_info(0x008D, 0x010E),
object_info(0x0088, 0x010E),
object_info(0x0086, 0x010E),
object_info(0x0087, 0x010E),
object_info(0x0089, 0x010E),
object_info(0x008A, 0x010E),
object_info(0x008C, 0x010E),
object_info(0x008B, 0x010E),
},
},
{
0x010F, BONE_KIND_SAK,
{
object_info(0x0000, 0x0000),
object_info(0x001A, 0x010F),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
},
10, 0, LUK_cb_tbl, LUK_cb_push_tbl, kamae_tbl_miku,
1, 0, { 0x01, 0x01, 0x02, 0x02 },
{
object_info(0x001A, 0x010F),
object_info(0x001B, 0x010F),
object_info(0x001C, 0x010F),
object_info(0x001D, 0x010F),
object_info(0x001E, 0x010F),
object_info(0x001F, 0x010F),
object_info(0x0020, 0x010F),
object_info(0x0031, 0x010F),
object_info(0x0033, 0x010F),
},
{
object_info(),
object_info(0x0022, 0x010F),
object_info(0x0021, 0x010F),
object_info(0x0023, 0x010F),
object_info(0x0024, 0x010F),
object_info(0x0025, 0x010F),
object_info(0x0026, 0x010F),
object_info(0x003B, 0x010F),
object_info(0x0036, 0x010F),
object_info(0x0034, 0x010F),
object_info(0x0035, 0x010F),
object_info(0x0037, 0x010F),
object_info(0x0038, 0x010F),
object_info(0x003A, 0x010F),
object_info(0x0039, 0x010F),
},
},
{
0x063D, BONE_KIND_TET,
{
object_info(0x0000, 0x0000),
object_info(0x0000, 0x063D),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
object_info(),
},
467, 0, MIKU_cb_tbl, MIKU_cb_push_tbl, kamae_tbl_miku,
1, 0, { 0x01, 0x01, 0x02, 0x02 },
{
object_info(0x0000, 0x063D),
object_info(0x0001, 0x063D),
object_info(0x0002, 0x063D),
object_info(0x0003, 0x063D),
object_info(0x0004, 0x063D),
object_info(0x0005, 0x063D),
object_info(0x0006, 0x063D),
object_info(0x0012, 0x063D),
object_info(0x0013, 0x063D),
},
{
object_info(),
object_info(0x0008, 0x063D),
object_info(0x0007, 0x063D),
object_info(0x0009, 0x063D),
object_info(0x000A, 0x063D),
object_info(0x000B, 0x063D),
object_info(0x000C, 0x063D),
object_info(0x001B, 0x063D),
object_info(0x0016, 0x063D),
object_info(0x0014, 0x063D),
object_info(0x0015, 0x063D),
object_info(0x0017, 0x063D),
object_info(0x0018, 0x063D),
object_info(0x001A, 0x063D),
object_info(0x0019, 0x063D),
},
}
};
const RobData* get_rob_data(CHARA_NUM cn) {
if (cn >= 0 && cn < CN_MAX)
return &rob_data[cn];
return 0;
}
int32_t get_rob_data_chara_size_index(CHARA_NUM cn) {
const RobData* rob_data = get_rob_data(cn);
if (rob_data)
return rob_data->field_848.chara_size_index;
return 1;
}
int32_t get_rob_data_swim_costume(CHARA_NUM cn) {
const RobData* rob_data = get_rob_data(cn);
if (rob_data)
return rob_data->field_848.swim_costume;
return 0;
}
int32_t get_rob_data_swim_s_costume(CHARA_NUM cn) {
const RobData* rob_data = get_rob_data(cn);
if (rob_data)
return rob_data->field_848.swim_s_costume;
return 0;
}
File diff suppressed because it is too large Load Diff
+195
View File
@@ -0,0 +1,195 @@
/*
by korenkonder
GitHub/GitLab: korenkonder
*/
#pragma once
#include "../../KKdLib/default.hpp"
#include "../mdl/disp_manager.hpp"
#include "../item_table.hpp"
#include "../texture.hpp"
struct RobItemTXHD {
texture* src;
texture* dst;
bool dst_copy;
RobItemTXHD();
~RobItemTXHD();
};
struct RobItemHavePart {
std::vector<uint32_t> item_no;
RobItemHavePart() = default;
~RobItemHavePart() = default;
};
struct RobItemHave {
RobItemHavePart part[ROB_ITEM_EQUIP_ID_MAX];
RobItemHave() = default;
~RobItemHave() = default;
};
struct RobItemHaveSub {
RobItemHavePart part[ROB_ITEM_EQUIP_SUB_ID_MAX];
RobItemHaveSub() = default;
~RobItemHaveSub() = default;
};
typedef prj::vector_pair_combine<std::string, RobItemEquip> RobItemDbgSet;
struct bone_database;
struct render_context;
class RobDisp;
class RobItem {
private:
CHARA_NUM m_cn;
CHARA_NUM m_cn_load;
RobItemEquip m_equip;
RobItemEquip m_equip_load;
std::map<uint32_t, std::vector<RobItemTXHD>> m_txhd_map;
std::map<ROB_PARTS_KIND, std::vector<uint32_t>> m_nude_attr_map;
std::map<object_info, ROB_PARTS_KIND> m_rpk_map;
std::map<int32_t, ROB_PARTS_KIND> m_rpk_sp_map;
std::vector<TexChange> m_texchg_list[RPK_MAX];
std::map<int32_t, object_info> m_head_map;
private:
void equip_phase0(RobItemEquip* item_set);
void equip_phase1(RobDisp* rdp,
const bone_database* bone_data, void* data, const object_database* obj_db);
void equip_phase2(RobDisp* rdp, RobItemEquip* item_set,
const bone_database* bone_data, void* data, const object_database* obj_db);
void equip_phase3(RobDisp* rdp, RobItemEquip* item_set,
const bone_database* bone_data, void* data, const object_database* obj_db);
void equip_phase4(RobDisp* rdp, RobItemEquip* item_set,
const bone_database* bone_data, void* data, const object_database* obj_db);
void equip_phase5(RobDisp* rdp, RobItemEquip* item_set);
void equip_phase6(RobDisp* rdp, RobItemEquip* item_set);
void equip_phase6(RobDisp* rdp, RobItemEquip* item_set, uint32_t item_no);
void equip_phase7();
ROB_PARTS_KIND get_rpk_item(ROB_ITEM_EQUIP_SUB_ID id) const;
void hide_rpk_sp(RobDisp* rdp, int32_t rpk_sp,
const bone_database* bone_data, void* data, const object_database* obj_db);
void make_chg_tex(uint32_t item_no, const RobItemTable* tbl);
void free_copy_texture_all();
void init_nude_attr_map();
void make_nude_attr_map(uint32_t item_no, const RobItemTable* tbl);
void set_obj_phase2(RobDisp* rdp, uint32_t item_no, const RobItemTable* tbl, ROB_ITEM_EQUIP_SUB_ID id,
const bone_database* bone_data, void* data, const object_database* obj_db);
void set_obj_phase3(RobDisp* rdp, uint32_t item_no, const RobItemTable* tbl,
const bone_database* bone_data, void* data, const object_database* obj_db);
void set_texture(RobDisp* rdp,
const std::vector<uint32_t>& item_nos, ROB_PARTS_KIND rpk, bool is_hyoutan = false);
void set_texture(RobDisp* rdp, uint32_t item_no, ROB_PARTS_KIND rpk, bool is_hyoutan = false);
void reset_texture(RobDisp* rdp, ROB_PARTS_KIND rpk, bool is_hyoutan = false);
void clear_texchg_list();
void disp_obj_internal(object_info obj_uid, mat4& mat, uint32_t item_no, render_context* rctx);
static bool s_check_equip_exclusion(CHARA_NUM cn, RobItemEquip* item_set);
static bool s_check_equip_sub(CHARA_NUM cn, int32_t cos, const RobItemHeader* header, RobItemEquip* item_set);
static bool s_check_equip_sub_phase0(uint32_t, const RobItemHeader* header);
static bool s_check_equip_sub_phase1(CHARA_NUM cn, uint32_t item_no);
static bool s_check_equip_sub_phase2(CHARA_NUM cn, uint32_t item_no, int32_t id);
static bool s_check_equip_sub_phase3(CHARA_NUM cn, uint32_t, int32_t);
static bool s_check_equip_sub_phase4(CHARA_NUM cn, int32_t, uint32_t);
static bool s_check_equip_chara(CHARA_NUM cn, int32_t cos, RobItemEquip* item_set);
static bool s_check_equip_point(CHARA_NUM cn, const RobItemHeader* header, const RobItemEquip* item_set);
static bool s_repair_equip(CHARA_NUM cn, int32_t cos, int32_t id, RobItemEquip* in_item_set);
static int32_t s_have_dbg_ref;
static RobItemHave s_have_dbg[];
static int32_t s_have_sub_dbg_ref;
static RobItemHaveSub s_have_sub_dbg[];
public:
RobItem();
~RobItem();
void set_chara_num(CHARA_NUM cn);
void req_obj(uint32_t item_no, void* data, const object_database* obj_db);
bool wait_obj(uint32_t item_no);
void free_obj(uint32_t item_no);
void req_obj_all(void* data, const object_database* obj_db);
bool wait_obj_all();
void free_obj_all();
void free_obj_diff();
private:
void regist_item(ROB_ITEM_EQUIP_SUB_ID id, uint32_t item_no);
public:
void regist_item_one(uint32_t item_no);
void regist_item_all(const RobItemEquip* item_set);
void delete_item(uint32_t item_no);
void equip(int32_t rc, const bone_database* bone_data,
void* data, const object_database* obj_db);
ROB_ITEM_EQUIP_ID get_equip_id(uint32_t item_no) const;
ROB_ITEM_EQUIP_SUB_ID get_equip_sub_id(uint32_t item_no) const;
uint32_t check_exclusive_item(uint32_t item_no) const;
RobItemEquip* get_equip();
const RobItemEquip* get_equip() const;
bool is_equipped_item(uint32_t item_no) const;
const char* get_name(uint32_t item_no) const;
//const char* get_name_asc(uint32_t item_no) const;
void init_disp_obj(uint32_t item_no);
void disp_obj(uint32_t item_no, render_context* rctx, const mat4& mat);
void get_item_texchange_list(uint32_t item_no, std::vector<TexChange>& tex_chg_list);
RobItemEquip* get_equip_load();
const RobItemEquip* get_equip_load() const;
void regist_item_all(const struct RobInitItem* item_set);
void free_copy_texture(uint32_t item_no);
void free_copy_texture(std::map<uint32_t, std::vector<RobItemTXHD>>::iterator elem);
bool check_npr_flag() const;
object_info get_head_object_replace(int32_t head_object_id) const;
float_t get_face_depth() const;
static const char* s_get_equip_sub_id_str(ROB_ITEM_EQUIP_SUB_ID id);
static bool s_check_equip(CHARA_NUM cn, int32_t cos, RobItemEquip* item_set);
//static void s_get_objset(CHARA_NUM cn, uint32_t, int32_t*, size_t);
static const char* s_get_name(const CHARA_NUM& cn, uint32_t item_no);
static ROB_ITEM_EQUIP_ID s_get_equip_id(CHARA_NUM cn, uint32_t item_no);
static ROB_ITEM_EQUIP_SUB_ID s_get_equip_sub_id(CHARA_NUM cn, uint32_t item_no);
static void s_get_equip_sub_group(int32_t id, std::vector<int32_t>* sub_group);
static bool s_is_replace_part(CHARA_NUM cn, int32_t id);
static bool s_equip_ok(CHARA_NUM cn, uint32_t item_no, int32_t id);
static bool s_have_costume(CHARA_NUM cn, int32_t id);
static uint32_t s_get_exclusion(CHARA_NUM cn, uint32_t item_no);
//static uint32_t s_get_set_item_no(CHARA_NUM cn, uint32_t item_no);
static uint32_t s_get_point(CHARA_NUM cn, uint32_t item_no);
static void s_get_offset_list(CHARA_NUM cn, uint32_t item_no, std::vector<RobItemDataOfs>& ofs_list, bool clear);
static ROB_ITEM_TYPE s_get_type(CHARA_NUM cn, uint32_t item_no);
static bool s_is_texorg(CHARA_NUM cn, uint32_t item_no);
static bool s_is_objorg(CHARA_NUM cn, uint32_t item_no);
static void s_get_ng_item();
static void s_get_ng_item_name();
static void s_get_ng_item_point();
static bool s_check_ng_item(CHARA_NUM cn, uint32_t item_no);
static std::string s_check_ng_item_name(CHARA_NUM cn, uint32_t item_no);
static int32_t s_check_ng_item_point(CHARA_NUM cn, uint32_t item_no);
static uint32_t get_dbgset_num(CHARA_NUM cn);
static const RobItemDbgSet* get_dbgset(CHARA_NUM cn);
static void init_have_dbg();
static void dest_have_dbg();
static void init_have_sub_dbg();
static void dest_have_sub_dbg();
static RobItemHave* get_have_dbg(CHARA_NUM cn);
static RobItemHaveSub* get_have_sub_dbg(CHARA_NUM cn);
static void s_req_obj(CHARA_NUM cn, uint32_t item_no, void* data, const object_database* obj_db);
static bool s_wait_obj(CHARA_NUM cn, uint32_t item_no);
static void s_free_obj(CHARA_NUM cn, uint32_t item_no);
static void s_req_obj_all(CHARA_NUM cn, const RobItemEquip* item_set, void* data, const object_database* obj_db);
static bool s_wait_obj_all(CHARA_NUM cn, const RobItemEquip* item_set);
static void s_free_obj_all(CHARA_NUM cn, const RobItemEquip* item_set);
static void s_regist_item_one(CHARA_NUM cn, uint32_t item_no, RobItem* rob_item);
static void s_regist_item_all(CHARA_NUM cn, const RobItemEquip* item_set, RobItem* rob_item);
static void s_delete_item(CHARA_NUM cn, uint32_t item_no, RobItem* rob_item);
};
+2 -2
View File
@@ -188,7 +188,7 @@ bool DtmEqVs::ctrl() {
if (reload) {
if (rob_chr)
task_rob_load_append_free_req_data_obj(rob_chr->chara_num, &temp_equip);
rob_chara_array_reset_bone_data_item_equip((ROB_ID)m_rc);
get_rob_management()->rob_disp_init((ROB_ID)m_rc);
task_rob_manager_suspend();
m_mode = 1;
}
@@ -252,7 +252,7 @@ void DtmEqVs::CtrlChara() {
m_cn_pre = m_cn_cur;
m_cs_pre = m_cs_cur;
const RobItemEquip* item_set = get_default_costume_data((CHARA_NUM)m_cn_cur, m_cs_cur);
if (!check_cos_id_is_501(m_cs_pre) || !item_set) {
if (!RobDisp::check_one_skin(m_cs_pre) || !item_set) {
data_test_equip_dw_sub_140261520(m_rc);
data_test_equip_dw_set_chara_item_equip(m_rc, item_set);
}
+2 -1
View File
@@ -5,6 +5,7 @@
#include "motion_test.hpp"
#include "../../KKdLib/prj/algorithm.hpp"
#include "../../CRE/rob/rob.hpp"
#include "../../CRE/rob/motion.hpp"
#include "../../CRE/rob/skin_param.hpp"
#include "../../CRE/app_system_detail.hpp"
@@ -1247,7 +1248,7 @@ bool DtmMot::ctrl() {
rob_chr->adjust_ctrl();
rob_chr->set_data_adjust_mat(&rob_chr->rob_base.adjust);
rob_chr->rob_motion_modifier_ctrl();
rob_chr->sub_140509D30();
rob_chr->calc_rob_colli_matrix();
if (data_test_mot_dw_array_get(rctrl)) {
data_test_mot_dw_array_get(rctrl)->SetFrameSlider(GetFrame(),
+5 -5
View File
@@ -428,7 +428,7 @@ osage_index(), collision_index(), collision_update() {
rob_id = ROB_ID_NULL;
rob_id_load = ROB_ID_1P;
chara_num = CN_NONE;
cos_id = -1;
costume = -1;
rpk = RPK_NONE;
osage_index = -1;
collision_index = -1;
@@ -454,7 +454,7 @@ bool RobOsageTest::ctrl() {
if (!rob_chr)
return false;
if (chara_num != rob_chr->chara_num || cos_id != rob_chr->cos_id)
if (chara_num != rob_chr->chara_num || costume != rob_chr->costume)
load = true;
}
@@ -463,7 +463,7 @@ bool RobOsageTest::ctrl() {
rob_id = rob_id_load;
chara_num = CN_NONE;
cos_id = -1;
costume = -1;
objects.clear();
bocs.clear();
@@ -478,7 +478,7 @@ bool RobOsageTest::ctrl() {
return false;
chara_num = rob_chr->chara_num;
cos_id = rob_chr->cos_id;
costume = rob_chr->costume;
RobDisp* rob_disp = rob_chr->disp;
if (!rob_disp)
@@ -888,7 +888,7 @@ void RobOsageTest::disp() {
rob_chara* rob_chr = get_rob_management()->get_rob(rob_id);
if (rob_chr && !pv_osage_manager_array_get_disp(rob_id)
&& rob_chr->get_disp_flag() && !rob_chr->rob_base.flag.bit.no_ctrl) {
&& rob_chr->check_disp() && !rob_chr->check_zero_disp()) {
disp_coli();
disp_line();
}
+1 -1
View File
@@ -73,7 +73,7 @@ public:
ROB_ID rob_id;
ROB_ID rob_id_load;
CHARA_NUM chara_num;
int32_t cos_id;
int32_t costume;
ROB_PARTS_KIND rpk;
object_info obj_info;
size_t osage_index;
+7 -7
View File
@@ -118,7 +118,7 @@ struct pv_game_se_data {
struct struc_674 {
size_t performer;
int32_t module;
RobItemEquipInit item;
RobInitItem item;
bool field_1C;
const pv_db_pv* pv;
@@ -2626,10 +2626,10 @@ bool pv_game::load() {
j.rob_init.chara_size_index = 1;
break;
case PV_PERFORMER_PLAY_CHARA:
j.rob_init.chara_size_index = rob_data_get_chara_size_index(j.chara_num);
j.rob_init.chara_size_index = get_rob_data_chara_size_index(j.chara_num);
break;
case PV_PERFORMER_PV_CHARA:
j.rob_init.chara_size_index = rob_data_get_chara_size_index(data.pv->get_performer_chara(i));
j.rob_init.chara_size_index = get_rob_data_chara_size_index(data.pv->get_performer_chara(i));
break;
case PV_PERFORMER_SHORT:
j.rob_init.chara_size_index = 2;
@@ -4493,7 +4493,7 @@ void pv_game::set_eyes_adjust(pv_game_chara* chr) {
}
}
void pv_game::set_item(size_t performer, RobItemEquipInit& value) {
void pv_game::set_item(size_t performer, RobInitItem& value) {
items[performer] = value;
}
@@ -5049,8 +5049,8 @@ void pv_game::chara_item_alpha_callback(void* data, ROB_ID rob_id, int32_t type,
}
void pv_game::get_item_mask(pv_performer_type type,
RobItemEquipInit* src_item, pv_game_item_mask* src_mask,
RobItemEquipInit* dst_item, pv_game_item_mask* dst_mask) {
RobInitItem* src_item, pv_game_item_mask* src_mask,
RobInitItem* dst_item, pv_game_item_mask* dst_mask) {
if (!src_item || !src_mask || !dst_item || !dst_mask)
return;
@@ -5081,7 +5081,7 @@ void pv_game_init_data::reset() {
for (int32_t& i : modules)
i = 0;
for (RobItemEquipInit& i : items)
for (RobInitItem& i : items)
i = {};
for (pv_game_item_mask& i : items_mask)
+5 -5
View File
@@ -346,7 +346,7 @@ struct pv_game {
int32_t pv_id;
bool field_14;
int32_t modules[ROB_ID_MAX];
RobItemEquipInit items[ROB_ID_MAX];
RobInitItem items[ROB_ID_MAX];
pv_game_item_mask items_mask[ROB_ID_MAX];
pv_game_data data;
@@ -442,7 +442,7 @@ struct pv_game {
void set_data_itmpv_visibility(int32_t rob_id, int32_t index, bool value);
void set_edit_instrument(int32_t rob_id, bool disp, int32_t index, float_t frame, float_t frame_speed);
void set_eyes_adjust(pv_game_chara* chr);
void set_item(size_t performer, RobItemEquipInit& value);
void set_item(size_t performer, RobInitItem& value);
void set_item_mask(size_t performer, size_t item, bool value);
void set_lyric(int32_t lyric_index, color4u8 lyric_color);
void set_module(size_t performer, int32_t module);
@@ -470,8 +470,8 @@ struct pv_game {
static void chara_item_alpha_callback(void* data, ROB_ID rob_id, int32_t type, float_t alpha);
static void get_item_mask(pv_performer_type type,
RobItemEquipInit* src_item, pv_game_item_mask* src_mask,
RobItemEquipInit* dst_item, pv_game_item_mask* dst_mask);
RobInitItem* src_item, pv_game_item_mask* src_mask,
RobInitItem* dst_item, pv_game_item_mask* dst_mask);
};
struct pv_game_init_data {
@@ -483,7 +483,7 @@ struct pv_game_init_data {
int32_t life_gauge_border;
int32_t stage_index;
int32_t modules[ROB_ID_MAX];
RobItemEquipInit items[ROB_ID_MAX];
RobInitItem items[ROB_ID_MAX];
pv_game_item_mask items_mask[ROB_ID_MAX];
pv_game_init_data();
+2 -2
View File
@@ -1609,9 +1609,9 @@ bool pv_game_pv_data::dsc_ctrl(float_t delta_time, int64_t curr_time,
int32_t chara_size_index;
if (chara_size == 0)
chara_size_index = rob_data_get_chara_size_index(rob_chr->chara_num);
chara_size_index = get_rob_data_chara_size_index(rob_chr->chara_num);
else if (chara_size == 1)
chara_size_index = rob_data_get_chara_size_index(pv_game->data.pv->get_performer_chara(rob_id));
chara_size_index = get_rob_data_chara_size_index(pv_game->data.pv->get_performer_chara(rob_id));
else if (chara_size == 2)
chara_size_index = 1;
else if (chara_size == 3) {
+3 -3
View File
@@ -3462,7 +3462,7 @@ bool x_pv_game_pv_data::dsc_ctrl(float_t delta_time, int64_t curr_time,
int32_t chara_size_index;
if (chara_size == 0)
chara_size_index = rob_data_get_chara_size_index(rob_chr->chara_num);
chara_size_index = get_rob_data_chara_size_index(rob_chr->chara_num);
else if (chara_size == 1) {
CHARA_NUM chara_num = CN_MIKU;
if (rob_id < pv_game->get_data().play_param->chara.size())
@@ -3471,7 +3471,7 @@ bool x_pv_game_pv_data::dsc_ctrl(float_t delta_time, int64_t curr_time,
else if (pv_game->get_data().pv_id == 826 && false)
chara_num = get_rob_management()->get_rob(rob_id)->chara_num;
chara_size_index = rob_data_get_chara_size_index(chara_num);
chara_size_index = get_rob_data_chara_size_index(chara_num);
}
else if (chara_size == 2)
chara_size_index = 1;
@@ -6474,7 +6474,7 @@ bool x_pv_game::ctrl() {
for (pvpp_chara& i : pv_data.play_param->chara) {
if (i.motion.size() && rob_ids[chara] == ROB_ID_NULL) {
RobInit rob_init;
rob_init.chara_size_index = rob_data_get_chara_size_index(charas[chara]);
rob_init.chara_size_index = get_rob_data_chara_size_index(charas[chara]);
rob_sleeve_handler_data_get_sleeve_data(
charas[chara], modules[chara], rob_init.sleeve_l, rob_init.sleeve_r);