diff --git a/src/CRE/auth_2d.cpp b/src/CRE/auth_2d.cpp index 891784d2..1f57ae8b 100644 --- a/src/CRE/auth_2d.cpp +++ b/src/CRE/auth_2d.cpp @@ -185,6 +185,38 @@ AetArgs::~AetArgs() { } +AetArgs& AetArgs::operator=(const AetArgs& other) { + id = other.id; + layer_name = other.layer_name; + start_marker = other.start_marker; + end_marker = other.end_marker; + start_time = other.start_time; + end_time = other.end_time; + flags = other.flags; + index = other.index; + layer = other.layer; + prio = other.prio; + mode = other.mode; + pos = other.pos; + rot = other.rot; + scale = other.scale; + anchor = other.anchor; + frame_speed = other.frame_speed; + color = other.color; + layer_sprite = other.layer_sprite; + sound_path.assign(other.sound_path.begin(), other.sound_path.end()); + sound_replace = other.sound_replace; + sound_queue_index = other.sound_queue_index; + sprite_replace = other.sprite_replace; + sprite_texture = other.sprite_texture; + sprite_discard = other.sprite_discard; + frame_rate_control = other.frame_rate_control; + sound_voice = other.sound_voice; + + spr_db = other.spr_db; + return *this; +} + aet_layout_data::aet_layout_data() : width(), height() { mat = mat4_identity; opacity = 1.0f; diff --git a/src/CRE/auth_2d.hpp b/src/CRE/auth_2d.hpp index fedfe066..bfcf5e29 100644 --- a/src/CRE/auth_2d.hpp +++ b/src/CRE/auth_2d.hpp @@ -70,6 +70,8 @@ struct AetArgs { AetArgs(); ~AetArgs(); + + AetArgs& operator=(const AetArgs& other); }; struct aet_layout_data { diff --git a/src/CRE/rob/rob.cpp b/src/CRE/rob/rob.cpp index 10d34b13..15037215 100644 --- a/src/CRE/rob/rob.cpp +++ b/src/CRE/rob/rob.cpp @@ -881,6 +881,7 @@ public: bool CheckHasRobCharaLoad(rob_chara* rob_chr); void CheckTypeAppendInitCharaLists(std::list* rob_chr_list); void FreeLoadedCharaList(int8_t* chara_id); + bool GetFreeCharaListEmpty(); bool GetWait(rob_chara* rob_chr); }; @@ -1187,7 +1188,7 @@ static void rob_chara_bone_data_set_hand_r_anim_blend_duration(rob_chara_bone_da static void rob_chara_bone_data_set_hand_r_frame(rob_chara_bone_data* rob_bone_data, float_t frame); static void rob_chara_bone_data_set_hand_r_play_frame_step(rob_chara_bone_data* rob_bone_data, float_t step); static void rob_chara_bone_data_set_look_anim_param(rob_chara_bone_data* rob_bone_data, - const rob_chara_look_anim_eye_param* params, eyes_adjust* eyes_adjust); + const rob_chara_look_anim_eye_param* params, const eyes_adjust* eyes_adjust); static void rob_chara_bone_data_set_mats(rob_chara_bone_data* rob_bone_data, const std::vector* bones, const std::string* motion_bones); static void rob_chara_bone_data_set_motion_duration(rob_chara_bone_data* rob_bone_data, @@ -1494,7 +1495,7 @@ static const chara_init_data chara_init_data_array[] = { object_info(), object_info(), }, - 1, stru_140A24B50, stru_140A25090, off_140C9D068, + 1, 0, stru_140A24B50, stru_140A25090, off_140C9D068, 1, 0, { 0x01, 0x01, 0x1E, 0x1D }, { object_info(0x00F7, 0x0000), @@ -1543,7 +1544,7 @@ static const chara_init_data chara_init_data_array[] = { object_info(), object_info(), }, - 9, stru_140A24B50, stru_140A25090, off_140C9D068, + 9, 0, stru_140A24B50, stru_140A25090, off_140C9D068, 1, 0, { 0x02, 0x02, 0x01, 0x01 }, { object_info(0x004A, 0x0107), @@ -1592,7 +1593,7 @@ static const chara_init_data chara_init_data_array[] = { object_info(), object_info(), }, - 5, stru_140A24B50, stru_140A25090, off_140C9D068, + 5, 0, stru_140A24B50, stru_140A25090, off_140C9D068, 0, 0, { 0x02, 0x03, 0x01, 0x01 }, { object_info(0x0040, 0x0105), @@ -1641,7 +1642,7 @@ static const chara_init_data chara_init_data_array[] = { object_info(), object_info(), }, - 6, stru_140A24E00, stru_140A25340, off_140C9D068, + 6, 0, stru_140A24E00, stru_140A25340, off_140C9D068, 0, 0, { 0x01, 0x04, 0x01, 0x01 }, { object_info(0x004C, 0x0106), @@ -1690,7 +1691,7 @@ static const chara_init_data chara_init_data_array[] = { object_info(), object_info(), }, - 8, stru_140A24B50, stru_140A25090, off_140C9D068, + 8, 0, stru_140A24B50, stru_140A25090, off_140C9D068, 0, 0, { 0x02, 0x02, 0x02, 0x02 }, { object_info(0x0019, 0x0108), @@ -1739,7 +1740,7 @@ static const chara_init_data chara_init_data_array[] = { object_info(), object_info(), }, - 3, stru_140A24E00, stru_140A25340, off_140C9D068, + 3, 0, stru_140A24E00, stru_140A25340, off_140C9D068, 1, 0, { 0x01, 0x01, 0x02, 0x02 }, { object_info(0x001F, 0x0109), @@ -1788,7 +1789,7 @@ static const chara_init_data chara_init_data_array[] = { object_info(), object_info(), }, - 4, stru_140A24B50, stru_140A25090, off_140C9D068, + 4, 0, stru_140A24B50, stru_140A25090, off_140C9D068, 0, 0, { 0x00, 0x00, 0x01, 0x01 }, { object_info(0x003C, 0x010D), @@ -1837,7 +1838,7 @@ static const chara_init_data chara_init_data_array[] = { object_info(), object_info(), }, - 7, stru_140A24E00, stru_140A25340, off_140C9D068, + 7, 0, stru_140A24E00, stru_140A25340, off_140C9D068, 1, 0, { 0x00, 0x00, 0x01, 0x01 }, { object_info(0x0040, 0x010E), @@ -1886,7 +1887,7 @@ static const chara_init_data chara_init_data_array[] = { object_info(), object_info(), }, - 10, stru_140A24E00, stru_140A25340, off_140C9D068, + 10, 0, stru_140A24E00, stru_140A25340, off_140C9D068, 1, 0, { 0x01, 0x01, 0x02, 0x02 }, { object_info(0x001A, 0x010F), @@ -1935,7 +1936,7 @@ static const chara_init_data chara_init_data_array[] = { object_info(), object_info(), }, - 467, stru_140A24B50, stru_140A25090, off_140C9D068, + 467, 0, stru_140A24B50, stru_140A25090, off_140C9D068, 1, 0, { 0x01, 0x01, 0x02, 0x02 }, { object_info(0x0000, 0x063D), @@ -3783,7 +3784,7 @@ static void sub_140513C60(rob_chara_item_equip* rob_itm_equip, item_id id, bool rob_itm_equip->field_18[id] |= 0x04; } -void rob_chara::reset_data(rob_chara_pv_data* pv_data, +void rob_chara::reset_data(const rob_chara_pv_data* pv_data, const bone_database* bone_data, const motion_database* mot_db) { this->bone_data->reset(); rob_chara_bone_data_init_data(this->bone_data, @@ -10952,7 +10953,7 @@ static void rob_chara_bone_data_set_hand_r_play_frame_step(rob_chara_bone_data* } static void rob_chara_bone_data_set_look_anim_param(rob_chara_bone_data* rob_bone_data, - const rob_chara_look_anim_eye_param* param, eyes_adjust* eyes_adjust) { + const rob_chara_look_anim_eye_param* param, const eyes_adjust* eyes_adjust) { rob_bone_data->look_anim.param = *param; float_t v1_neg; @@ -11993,8 +11994,16 @@ bool task_rob_manager_check_task_ready() { return app::TaskWork::check_task_ready(task_rob_manager); } -bool task_rob_manager_hide_task() { - return task_rob_manager->hide(); +void task_rob_manager_free_all_chara() { + for (int32_t i = 0; i < ROB_CHARA_COUNT; i++) + if (rob_chara_array[i].type != ROB_CHARA_TYPE_NONE) { + task_rob_manager->AppendFreeCharaList(&rob_chara_array[i]); + rob_chara_array[i].type = ROB_CHARA_TYPE_NONE; + } +} + +bool task_rob_manager_get_free_chara_list_empty() { + return task_rob_manager->GetFreeCharaListEmpty(); } bool task_rob_manager_get_wait(int32_t chara_id) { @@ -12004,6 +12013,10 @@ bool task_rob_manager_get_wait(int32_t chara_id) { return task_rob_manager->GetWait(&rob_chara_array[chara_id]); } +bool task_rob_manager_hide_task() { + return task_rob_manager->hide(); +} + bool task_rob_manager_run_task() { return task_rob_manager->run(); } @@ -20370,6 +20383,15 @@ void TaskRobManager::FreeLoadedCharaList(int8_t* chara_id) { i++; } +bool TaskRobManager::GetFreeCharaListEmpty() { + if (!app::TaskWork::check_task_ready(this)) + return false; + + if (ctrl_state == 1 && !init_chara.size()) + return !!free_chara.size(); + return true; +} + bool TaskRobManager::GetWait(rob_chara* rob_chr) { if (!app::TaskWork::check_task_ready(this)) return false; diff --git a/src/CRE/rob/rob.hpp b/src/CRE/rob/rob.hpp index 03d4c0b8..25e5cb96 100644 --- a/src/CRE/rob/rob.hpp +++ b/src/CRE/rob/rob.hpp @@ -1456,6 +1456,7 @@ struct chara_init_data { object_info field_7E0; object_info field_7E4[14]; uint32_t motion_set; + int32_t field_820; const struc_218* field_828; const struc_218* field_830; const struc_870** field_838; @@ -3582,7 +3583,7 @@ struct rob_chara { bool osage_reset, const bone_database* bone_data, void* data, const object_database* obj_db); void rob_info_ctrl(); void rob_motion_modifier_ctrl(); - void reset_data(rob_chara_pv_data* pv_data, + void reset_data(const rob_chara_pv_data* pv_data, const bone_database* bone_data, const motion_database* mot_db); void reset_osage(); void set_bone_data_frame(float_t frame); @@ -3863,8 +3864,10 @@ extern bool task_rob_load_del_task(); extern bool task_rob_manager_add_task(); extern bool task_rob_manager_check_chara_loaded(int32_t chara_id); extern bool task_rob_manager_check_task_ready(); -extern bool task_rob_manager_hide_task(); +extern void task_rob_manager_free_all_chara(); +extern bool task_rob_manager_get_free_chara_list_empty(); extern bool task_rob_manager_get_wait(int32_t chara_id); +extern bool task_rob_manager_hide_task(); extern bool task_rob_manager_run_task(); extern bool task_rob_manager_del_task(); diff --git a/src/ReDIVA/data_test/auth_3d_test.cpp b/src/ReDIVA/data_test/auth_3d_test.cpp index 6b98a974..044a07a3 100644 --- a/src/ReDIVA/data_test/auth_3d_test.cpp +++ b/src/ReDIVA/data_test/auth_3d_test.cpp @@ -394,7 +394,11 @@ bool Auth3dTestTask::init() { shadow_ptr_get()->self_shadow = true; clear_color = 0x00999999; + auth_3d_test_window_init(); + if (auth_3d_test_window) + auth_3d_test_window->snap_shot->SetEnabled(false/*sub_140192E20()*/); + task_stage_add_task("A3D_STAGE"); objset_info_storage_load_set(aft_data, aft_obj_db, effcmn_obj_set); return true; @@ -1383,7 +1387,7 @@ Auth3dTestWindow::Auth3dTestWindow() { snap_shot = new dw::Button(v79, dw::CHECKBOX); snap_shot->SetText(snap_shot_text); - snap_shot->SetValue(snap_shot); + snap_shot->SetValue(::snap_shot); snap_shot->AddSelectionListener(&snap_shot_listener); dw::Composite* v97 = new dw::Composite(this); diff --git a/src/ReDIVA/pv_game/pv_game.cpp b/src/ReDIVA/pv_game/pv_game.cpp index ef0df727..68a1805d 100644 --- a/src/ReDIVA/pv_game/pv_game.cpp +++ b/src/ReDIVA/pv_game/pv_game.cpp @@ -4791,8 +4791,8 @@ bool pv_game::unload() { rend.reset_saturate_coeff(0, true); rend.set_dof_enable(false); rend.reset_scene_fade(0); - - rend.set_taa(1); + if (!false/*sub_140192E20()*/) + rend.set_taa(1); rend.update_res(0, -1); rctx_ptr->disp_manager->object_culling = true;