mirror of
https://github.com/korenkonder/ReDIVA.git
synced 2026-10-03 20:28:10 +03:00
Eye rotation fix
This commit is contained in:
@@ -44,7 +44,7 @@ namespace GL {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
inline void Create(size_t size, const void* data) {
|
||||
if (buffer)
|
||||
return;
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace Glitter {
|
||||
this->value = value;
|
||||
this->random_range = random_range;
|
||||
}
|
||||
|
||||
|
||||
Curve::Key::Key(KeyType type, int32_t frame, float_t value,
|
||||
float_t tangent1, float_t tangent2, float_t random_range) {
|
||||
this->type = type;
|
||||
|
||||
@@ -206,8 +206,8 @@ namespace Glitter {
|
||||
rend_elem->rot_z_sin = 0.0f;
|
||||
rend_elem->rotation.z = random->F2GetFloat(GLT_VAL, ptcl_inst_data->data.rotation_random.z)
|
||||
+ ptcl_inst_data->data.rotation.z;
|
||||
rend_elem->rotation_add.z = random->F2GetFloat(GLT_VAL,
|
||||
ptcl_inst_data->data.rotation_add_random.z) + ptcl_inst_data->data.rotation_add.z;
|
||||
rend_elem->rotation_add.z = random->F2GetFloat(GLT_VAL, ptcl_inst_data->data.rotation_add_random.z)
|
||||
+ ptcl_inst_data->data.rotation_add.z;
|
||||
rend_elem->uv_scroll = 0.0f;
|
||||
rend_elem->uv_scroll_2nd = 0.0f;
|
||||
rend_elem->scale = 1.0f;
|
||||
@@ -220,7 +220,7 @@ namespace Glitter {
|
||||
rend_elem->scale_particle.y = rend_elem->scale_particle.x;
|
||||
else
|
||||
rend_elem->scale_particle.y = random->F2GetFloat(GLT_VAL, ptcl_inst_data->data.scale_random.y)
|
||||
+ ptcl_inst_data->data.scale.y;
|
||||
+ ptcl_inst_data->data.scale.y;
|
||||
|
||||
int32_t max_uv = ptcl_inst_data->data.split_u * ptcl_inst_data->data.split_v;
|
||||
if (max_uv > 1 && ptcl_inst_data->data.uv_index_count > 1) {
|
||||
@@ -693,7 +693,7 @@ namespace Glitter {
|
||||
}
|
||||
else
|
||||
rend_elem->scale_particle.y = random->XGetFloat(ptcl_inst_data->data.scale_random.y)
|
||||
+ ptcl_inst_data->data.scale.y;
|
||||
+ ptcl_inst_data->data.scale.y;
|
||||
|
||||
int32_t max_uv = ptcl_inst_data->data.split_u * ptcl_inst_data->data.split_v;
|
||||
if (max_uv > 1 && ptcl_inst_data->data.uv_index_count > 1) {
|
||||
|
||||
+3
-3
@@ -916,7 +916,7 @@ void AetObj::Init(AetArgs& args, const aet_scene* scene, const aet_comp* comp, c
|
||||
const aet_marker* start_marker, const aet_marker* end_marker, resolution_mode mode) {
|
||||
start_time = scene->start_time;
|
||||
end_time = scene->end_time - 1.0f;
|
||||
|
||||
|
||||
if (layer) {
|
||||
start_time = layer->start_time;
|
||||
end_time = layer->end_time - 1.0f;
|
||||
@@ -1196,7 +1196,7 @@ void AetObj::CtrlLayer(const aet_layer* layer, float_t frame) {
|
||||
|
||||
if (frame != 0.0f)
|
||||
return;
|
||||
|
||||
|
||||
std::string file(layer->name);
|
||||
auto elem = sound_replace.find(file);
|
||||
if (elem != sound_replace.end())
|
||||
@@ -1505,7 +1505,7 @@ AetLyo::~AetLyo() {
|
||||
}
|
||||
|
||||
void AetLyo::CtrlLayer(const aet_layer* layer, float_t frame) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
void AetLyo::DispLayer(const mat4& mat, const aet_layer* layer,
|
||||
|
||||
+2
-2
@@ -796,7 +796,7 @@ struct auth_3d_id {
|
||||
inline auth_3d_id() {
|
||||
id = -1;
|
||||
}
|
||||
|
||||
|
||||
inline auth_3d_id(int32_t id) {
|
||||
this->id = id;
|
||||
}
|
||||
@@ -804,7 +804,7 @@ struct auth_3d_id {
|
||||
inline bool is_null() {
|
||||
return id == -1;
|
||||
}
|
||||
|
||||
|
||||
inline bool not_null() {
|
||||
return id != -1;
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ bool hand_item_handler::load() {
|
||||
i = 0;
|
||||
}
|
||||
file_handlers.clear();
|
||||
|
||||
|
||||
loaded = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -135,7 +135,7 @@ bool item_table_handler_array_load() {
|
||||
bool ret = false;
|
||||
for (int32_t i = CHARA_MIKU; i < CHARA_MAX; i++)
|
||||
ret |= item_table_handler_array[i].load();
|
||||
return ret;
|
||||
return ret;
|
||||
}
|
||||
|
||||
void item_table_handler_array_read() {
|
||||
@@ -187,7 +187,7 @@ bool item_table_handler::load() {
|
||||
i = 0;
|
||||
}
|
||||
file_handlers.clear();
|
||||
|
||||
|
||||
loaded = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -345,7 +345,7 @@ void light_set::data_set(face& face, light_set_id id) {
|
||||
lights[LIGHT_CHARA].get_diffuse(obj_scene.g_light_env_chara_diffuse);
|
||||
lights[LIGHT_CHARA].get_ambient(obj_scene.g_light_env_chara_ambient);
|
||||
lights[LIGHT_CHARA].get_specular(obj_scene.g_light_env_chara_specular);
|
||||
|
||||
|
||||
lights[LIGHT_REFLECT].get_diffuse(obj_scene.g_light_env_reflect_diffuse);
|
||||
lights[LIGHT_REFLECT].get_ambient(obj_scene.g_light_env_reflect_ambient);
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace mdl {
|
||||
OBJ_KIND_TRANSLUCENT,
|
||||
OBJ_KIND_MAX,
|
||||
};
|
||||
|
||||
|
||||
enum ObjFlags : uint32_t {
|
||||
OBJ_SHADOW = 0x00000001,
|
||||
OBJ_2 = 0x00000002,
|
||||
@@ -357,10 +357,10 @@ namespace mdl {
|
||||
vec4 color;
|
||||
bool fog;
|
||||
Data data;
|
||||
|
||||
|
||||
void init(EtcObjType type);
|
||||
};
|
||||
|
||||
|
||||
typedef void(*UserArgsFunc)(render_context* rctx, void* data);
|
||||
|
||||
struct UserArgs {
|
||||
@@ -372,7 +372,7 @@ namespace mdl {
|
||||
uint32_t count;
|
||||
ObjSubMeshArgs* sub_mesh[40];
|
||||
};
|
||||
|
||||
|
||||
struct ObjData {
|
||||
union Args {
|
||||
ObjSubMeshArgs sub_mesh;
|
||||
|
||||
@@ -841,7 +841,7 @@ namespace rndr {
|
||||
gl_state_enable_depth_test();
|
||||
gl_state_disable_blend();
|
||||
}
|
||||
|
||||
|
||||
void RenderManager::pass_sprite_fg_surf(render_context* rctx) {
|
||||
if (!sprite_manager_get_reqlist_count(1))
|
||||
return;
|
||||
@@ -1555,7 +1555,7 @@ static void blur_filter_apply(render_context* rctx, GLuint dst, GLuint src,
|
||||
filter_scene.g_transform = { w, h, 0.0f, 0.0f };
|
||||
filter_scene.g_texcoord = { 1.0f, 1.0f, 0.0f, 0.0f };
|
||||
rctx->filter_scene_ubo.WriteMapMemory(filter_scene);
|
||||
|
||||
|
||||
imgfilter_batch_shader_data imgfilter_batch = {};
|
||||
if (filter == BLUR_FILTER_32)
|
||||
imgfilter_batch.g_color_scale = scale * (float_t)(1.0 / 8.0);
|
||||
|
||||
+16
-12
@@ -329,7 +329,7 @@ struct rob_chara_age_age_object {
|
||||
void load(object_info obj_info, int32_t count);
|
||||
void reset();
|
||||
void update(rob_chara_age_age_data* data, int32_t count, float_t alpha);
|
||||
|
||||
|
||||
static obj_bounding_sphere combine_bounding_spheres(
|
||||
obj_bounding_sphere* src0, obj_bounding_sphere* src1);
|
||||
};
|
||||
@@ -2263,7 +2263,7 @@ void rob_free() {
|
||||
delete[] rob_chara_age_age_array;
|
||||
rob_chara_age_age_array = 0;
|
||||
}
|
||||
|
||||
|
||||
if (pv_osage_manager_array) {
|
||||
delete[] pv_osage_manager_array;
|
||||
pv_osage_manager_array = 0;
|
||||
@@ -6937,21 +6937,24 @@ static void sub_1405077D0(rob_chara* rob_chr, bone_database* bone_data, motion_d
|
||||
}
|
||||
}
|
||||
|
||||
static bool sub_140419E90(rob_chara_bone_data* rob_bone_data) {
|
||||
mot_play_data* v2 = &rob_bone_data->motion_loaded.front()->mot_play_data;
|
||||
if (v2->loop_frames_enabled)
|
||||
return v2->loop_frames <= 0.0f;
|
||||
else if (v2->frame_data.loop_state >= MOT_PLAY_FRAME_DATA_LOOP_ONCE
|
||||
&& v2->frame_data.loop_state <= MOT_PLAY_FRAME_DATA_LOOP_REVERSE)
|
||||
static bool sub_140413710(mot_play_data* a1) {
|
||||
if (a1->loop_frames_enabled)
|
||||
return a1->loop_frames <= 0.0f;
|
||||
else if (a1->frame_data.loop_state >= MOT_PLAY_FRAME_DATA_LOOP_ONCE
|
||||
&& a1->frame_data.loop_state <= MOT_PLAY_FRAME_DATA_LOOP_REVERSE)
|
||||
return false;
|
||||
else if (v2->frame_data.playback_state == MOT_PLAY_FRAME_DATA_PLAYBACK_FORWARD)
|
||||
return v2->frame_data.last_frame < v2->frame_data.frame;
|
||||
else if (v2->frame_data.playback_state == MOT_PLAY_FRAME_DATA_PLAYBACK_BACKWARD)
|
||||
return v2->frame_data.frame < 0.0f;
|
||||
else if (a1->frame_data.playback_state == MOT_PLAY_FRAME_DATA_PLAYBACK_FORWARD)
|
||||
return a1->frame_data.last_frame < a1->frame_data.frame;
|
||||
else if (a1->frame_data.playback_state == MOT_PLAY_FRAME_DATA_PLAYBACK_BACKWARD)
|
||||
return a1->frame_data.frame < 0.0f;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool sub_140419E90(rob_chara_bone_data* rob_bone_data) {
|
||||
return sub_140413710(&rob_bone_data->motion_loaded.front()->mot_play_data);
|
||||
}
|
||||
|
||||
static void sub_140505310(rob_chara* rob_chr, bone_database* bone_data, motion_database* mot_db) {
|
||||
switch (rob_chr->data.field_1588.field_0.field_58) {
|
||||
case -1: {
|
||||
@@ -9826,6 +9829,7 @@ static void sub_14041B1C0(struc_313* a1) {
|
||||
|
||||
for (uint32_t i = MOTION_BONE_N_EYELID_L_A; i <= MOTION_BONE_TL_EYELID_R_B_WJ; i++)
|
||||
bitfield[i >> 5] &= ~(1 << (i & 0x1F));
|
||||
sub_14041B440(a1);
|
||||
}
|
||||
|
||||
static void sub_14041B6B0(struc_313* a1) {
|
||||
|
||||
+2
-2
@@ -868,14 +868,14 @@ namespace spr {
|
||||
if (set)
|
||||
set->ReadFile(file, mdata_dir, data);
|
||||
}
|
||||
|
||||
|
||||
void SpriteManager::ReadFile(int32_t index,
|
||||
const char* file, std::string&& mdata_dir, void* data) {
|
||||
SprSet* set = GetSet(index);
|
||||
if (set)
|
||||
set->ReadFile(file, mdata_dir, data);
|
||||
}
|
||||
|
||||
|
||||
void SpriteManager::ResetIndex() {
|
||||
index = 0;
|
||||
}
|
||||
|
||||
+1
-1
@@ -122,7 +122,7 @@ namespace app {
|
||||
Task_set_request(this, Task::Request::Run);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool Task::SuspendTask() {
|
||||
if (!TaskWork::HasTask(this) || !Task_check_request(this, Task::Request::Suspend))
|
||||
return false;
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@ namespace app {
|
||||
Hide,
|
||||
Run,
|
||||
};
|
||||
|
||||
|
||||
enum class State {
|
||||
None = 0,
|
||||
Running,
|
||||
|
||||
@@ -1477,7 +1477,7 @@ void TaskEffectLitproj::SetStageIndices(std::vector<int32_t>& stage_indices) {
|
||||
texture_database* aft_tex_db = &aft_data->data_ft.tex_db;
|
||||
|
||||
stage_param_data_litproj_current = litproj;
|
||||
|
||||
|
||||
light_proj* _litproj = new light_proj(width, height);
|
||||
rctx_ptr->litproj = _litproj;
|
||||
_litproj->enable = true;
|
||||
@@ -2491,7 +2491,7 @@ void TaskEffectParent::SetStageIndices(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);
|
||||
state = 1;
|
||||
|
||||
@@ -253,7 +253,7 @@ int32_t interpolate_chs_reverse_sequence(std::vector<float_t>& values_src, std::
|
||||
}
|
||||
|
||||
values.push_back({ (float_t)(int32_t)(start_time + (count - 1)), arr[count - 1], t2_old, 0.0f });
|
||||
|
||||
|
||||
kft3* keys = values.data();
|
||||
size_t length = values.size();
|
||||
for (size_t i = 0; i < count; i++) {
|
||||
|
||||
+1
-1
@@ -598,7 +598,7 @@ static void mot_modern_read_inner(mot_set* ms, prj::shared_ptr<prj::stack_alloca
|
||||
uint32_t key_set_count = m->key_set_count;
|
||||
mot_key_set_data* key_set_array = alloc->allocate<mot_key_set_data>(key_set_count);
|
||||
m->key_set_array = key_set_array;
|
||||
|
||||
|
||||
s_motc.set_position(mh.key_set_types_offset, SEEK_SET);
|
||||
for (uint32_t j = 0, b = 0; j < key_set_count; j++) {
|
||||
if (j % 8 == 0)
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace prj {
|
||||
sort();
|
||||
unique();
|
||||
}
|
||||
|
||||
|
||||
inline typename auto find(T key) {
|
||||
auto k = this->begin();
|
||||
size_t l = this->size();
|
||||
|
||||
@@ -99,7 +99,7 @@ namespace prj {
|
||||
inline typename auto begin() {
|
||||
return data.begin();
|
||||
}
|
||||
|
||||
|
||||
inline typename auto begin() const {
|
||||
return data.begin();
|
||||
}
|
||||
@@ -111,7 +111,7 @@ namespace prj {
|
||||
inline typename auto end() {
|
||||
return data.end();
|
||||
}
|
||||
|
||||
|
||||
inline typename auto end() const {
|
||||
return data.end();
|
||||
}
|
||||
@@ -123,7 +123,7 @@ namespace prj {
|
||||
inline typename auto rbegin() {
|
||||
return data.rbegin();
|
||||
}
|
||||
|
||||
|
||||
inline typename auto rbegin() const {
|
||||
return data.rbegin();
|
||||
}
|
||||
@@ -135,7 +135,7 @@ namespace prj {
|
||||
inline typename auto rend() {
|
||||
return data.rend();
|
||||
}
|
||||
|
||||
|
||||
inline typename auto rend() const {
|
||||
return data.rend();
|
||||
}
|
||||
|
||||
@@ -4345,9 +4345,11 @@ static bool glitter_editor_property_particle_texture(GlitterEditor* glt_edt,
|
||||
case Glitter::UV_INDEX_INITIAL_RANDOM_REVERSE: {
|
||||
LARGE_INTEGER time;
|
||||
QueryPerformanceCounter(&time);
|
||||
uv_index += time.LowPart % particle->data.uv_index_count;
|
||||
uv_index = particle->data.uv_index_start
|
||||
+ time.LowPart % particle->data.uv_index_count;
|
||||
} break;
|
||||
}
|
||||
uv_index = min_def(uv_index, particle->data.uv_index_end);
|
||||
}
|
||||
}
|
||||
else if (particle->data.uv_index_type == Glitter::UV_INDEX_INITIAL_RANDOM_FIXED) {
|
||||
|
||||
@@ -402,15 +402,15 @@ DtwAet::DtwAet() : Shell(0) {
|
||||
frame->AddSelectionListener(new dw::SelectionListenerOnHook(DtwAet::FrameCallback));
|
||||
|
||||
(new dw::Label(this))->SetName("SWITCH");
|
||||
|
||||
|
||||
dw::Button* lock = new dw::Button(this, dw::CHECKBOX);
|
||||
lock->SetName("LOCK");
|
||||
lock->callback = DtwAet::LockCallback;
|
||||
|
||||
|
||||
dw::Button* loop = new dw::Button(this, dw::CHECKBOX);
|
||||
loop->SetName("LOOP");
|
||||
loop->callback = DtwAet::LoopCallback;
|
||||
|
||||
|
||||
dw::Button* centering = new dw::Button(this, dw::CHECKBOX);
|
||||
centering->SetName("CENTERING");
|
||||
centering->callback = DtwAet::CenteringCallback;
|
||||
|
||||
@@ -555,7 +555,7 @@ void Auth3dTestWindow::Window() {
|
||||
|
||||
if (ImGui::Checkbox("Left Right Reverse", &auth_3d_test_task->left_right_reverse))
|
||||
_frame = 0.0f;
|
||||
|
||||
|
||||
ImGui::Checkbox("pos", &auth_3d_test_task->pos);
|
||||
|
||||
if (_frame != frame) {
|
||||
|
||||
+13
-13
@@ -41,7 +41,7 @@ namespace dw_gui_detail {
|
||||
|
||||
Display();
|
||||
~Display();
|
||||
|
||||
|
||||
void AddShell(dw::Shell* value);
|
||||
void CheckShells();
|
||||
void Ctrl();
|
||||
@@ -128,15 +128,15 @@ namespace dw {
|
||||
SelectionListener::SelectionListener() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
SelectionListener::~SelectionListener() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
SelectionAdapter::SelectionAdapter() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
SelectionAdapter::~SelectionAdapter() {
|
||||
|
||||
}
|
||||
@@ -152,11 +152,11 @@ namespace dw {
|
||||
SelectionListenerOnHook::SelectionListenerOnHook() : callback() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
SelectionListenerOnHook::SelectionListenerOnHook(Widget::Callback callback) {
|
||||
this->callback = callback;
|
||||
}
|
||||
|
||||
|
||||
SelectionListenerOnHook::~SelectionListenerOnHook() {
|
||||
|
||||
}
|
||||
@@ -169,7 +169,7 @@ namespace dw {
|
||||
callback_data(), free_callback(), parent() {
|
||||
this->flags = flags;
|
||||
}
|
||||
|
||||
|
||||
Widget::~Widget() {
|
||||
|
||||
}
|
||||
@@ -232,7 +232,7 @@ namespace dw {
|
||||
parent_shell = parent->parent_shell;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Control::~Control() {
|
||||
|
||||
}
|
||||
@@ -307,7 +307,7 @@ namespace dw {
|
||||
v_bar->SetName("v_bar");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Scrollable::~Scrollable() {
|
||||
|
||||
}
|
||||
@@ -328,7 +328,7 @@ namespace dw {
|
||||
Layout::~Layout() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
FillLayout::FillLayout(int32_t a2) {
|
||||
field_8 = a2;
|
||||
}
|
||||
@@ -490,7 +490,7 @@ namespace dw {
|
||||
Composite::Composite(Composite* parent, Flags flags) : Scrollable(parent, flags), layout() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
Composite::~Composite() {
|
||||
|
||||
}
|
||||
@@ -528,7 +528,7 @@ namespace dw {
|
||||
Button::Button(Composite* parent, Flags flags) : Control(parent, flags), value(), callback() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
Button::~Button() {
|
||||
|
||||
}
|
||||
@@ -635,7 +635,7 @@ namespace dw {
|
||||
|
||||
for (Widget* i : vec)
|
||||
i->Free();
|
||||
|
||||
|
||||
/*for (Menu* i : menus)
|
||||
i->Free();
|
||||
menus.clear();*/
|
||||
|
||||
+2
-2
@@ -310,7 +310,7 @@ namespace dw {
|
||||
virtual ~ShellCloseButton() override;
|
||||
|
||||
virtual void Draw() override;
|
||||
|
||||
|
||||
static void Callback(dw::Widget* data);
|
||||
};
|
||||
|
||||
@@ -363,7 +363,7 @@ namespace dw {
|
||||
void ResetSetSelectedItem(size_t index);
|
||||
void SetSelectedItem(size_t index);
|
||||
};
|
||||
|
||||
|
||||
class ListBox : public Composite {
|
||||
public:
|
||||
List* list;
|
||||
|
||||
+1
-1
@@ -417,7 +417,7 @@ void compile_shaders(farc* f, farc* of, const shader_table* shaders_table, const
|
||||
|
||||
strcpy_s(frag_bin_buf, sizeof(frag_bin_buf), sub_table->fp);
|
||||
strcat_s(frag_bin_buf, sizeof(frag_bin_buf), ".frag.bin");
|
||||
|
||||
|
||||
bool has_vert_bin = of->has_file(vert_bin_buf);
|
||||
bool has_frag_bin = of->has_file(frag_bin_buf);
|
||||
|
||||
|
||||
@@ -413,12 +413,12 @@ void render_data::load_common_data() {
|
||||
|
||||
void render_data::unload_common_data() {
|
||||
common_data_ubo.Destroy();
|
||||
|
||||
|
||||
if (grid_vbo) {
|
||||
glDeleteBuffers(1, &grid_vbo);
|
||||
grid_vbo = 0;
|
||||
}
|
||||
|
||||
|
||||
if (grid_vao) {
|
||||
glDeleteVertexArrays(1, &grid_vao);
|
||||
grid_vao = 0;
|
||||
|
||||
Reference in New Issue
Block a user