diff --git a/src/AFTModsShared/AFTModsShared.vcxproj b/src/AFTModsShared/AFTModsShared.vcxproj
index 620ec2d..ea522f3 100644
--- a/src/AFTModsShared/AFTModsShared.vcxproj
+++ b/src/AFTModsShared/AFTModsShared.vcxproj
@@ -165,7 +165,9 @@
+
+
diff --git a/src/AFTModsShared/auth_3d.cpp b/src/AFTModsShared/auth_3d.cpp
index 06737d3..5f57d6b 100644
--- a/src/AFTModsShared/auth_3d.cpp
+++ b/src/AFTModsShared/auth_3d.cpp
@@ -4,15 +4,8 @@
*/
#include "auth_3d.hpp"
-#include "../KKdLib/hash.hpp"
-#include "../AFTModsShared/canonical_properties.hpp"
-#include "../AFTModsShared/file_handler.hpp"
-#include "../AFTModsShared/types.hpp"
-#include "mdl/disp_manager.hpp"
-#include "rob/rob.hpp"
-#include "sprite.hpp"
-#include "texture.hpp"
-#include
+#include "canonical_properties.hpp"
+#include "file_handler.hpp"
struct struc_8 {
float_t max_frame;
@@ -283,7 +276,7 @@ void auth_3d_id::set_chara_id(int32_t value) {
}
}
-void auth_3d_id::set_chara_item(bool value) {
+void auth_3d_id::set_chara_item(bool value) { // X
if (id >= 0 && ((id & 0x7FFF) < AUTH_3D_DATA_COUNT)) {
auth_3d* auth = &auth_3d_data->data[id & 0x7FFF];
if (auth->id == id)
@@ -358,7 +351,7 @@ void auth_3d_id::set_pos(int32_t value) {
}
}
-void auth_3d_id::set_reflect(bool value) {
+void auth_3d_id::set_reflect(bool value) { // X
if (id >= 0 && ((id & 0x7FFF) < AUTH_3D_DATA_COUNT)) {
auth_3d* auth = &auth_3d_data->data[id & 0x7FFF];
if (auth->id == id)
diff --git a/src/AFTModsShared/auth_3d.hpp b/src/AFTModsShared/auth_3d.hpp
index c1952b4..bcb7a78 100644
--- a/src/AFTModsShared/auth_3d.hpp
+++ b/src/AFTModsShared/auth_3d.hpp
@@ -8,11 +8,11 @@
#include "../KKdLib/default.hpp"
#include "../KKdLib/mat.hpp"
#include "../KKdLib/vec.hpp"
-#include "../AFTModsShared/light_param/fog.hpp"
-#include "../AFTModsShared/light_param/light.hpp"
-#include "../AFTModsShared/mdl/disp_manager.hpp"
-#include "../AFTModsShared/rob/rob.hpp"
-#include "../AFTModsShared/frame_rate_control.hpp"
+#include "light_param/fog.hpp"
+#include "light_param/light.hpp"
+#include "mdl/disp_manager.hpp"
+#include "rob/rob.hpp"
+#include "frame_rate_control.hpp"
#include "object.hpp"
#include "types.hpp"
@@ -537,7 +537,7 @@ struct auth_3d_id {
void set_alpha_obj_flags(float_t alpha, mdl::ObjFlags obj_flags);
void set_camera_root_update(bool value);
void set_chara_id(int32_t value);
- void set_chara_item(bool value);
+ void set_chara_item(bool value); // X
void set_enable(bool value);
void set_frame_rate(FrameRateControl* value);
void set_last_frame(float_t value);
diff --git a/src/AFTModsShared/canonical_properties.hpp b/src/AFTModsShared/canonical_properties.hpp
index dfc2785..3b9dd77 100644
--- a/src/AFTModsShared/canonical_properties.hpp
+++ b/src/AFTModsShared/canonical_properties.hpp
@@ -5,7 +5,7 @@
#pragma once
-#include "../AFTModsShared/types.hpp"
+#include "types.hpp"
#include
struct CanonicalProperties {
diff --git a/src/AFTModsShared/dw.hpp b/src/AFTModsShared/dw.hpp
index 36e7744..5d06062 100644
--- a/src/AFTModsShared/dw.hpp
+++ b/src/AFTModsShared/dw.hpp
@@ -755,30 +755,6 @@ namespace dw {
bool round;
bool field_A5;
bool field_A6;
- __int64 field_A8;
- __int64 field_B0;
- __int64 field_B8;
- __int64 field_C0;
- __int64 field_C8;
- __int64 field_D0;
- __int64 field_D8;
- __int64 field_E0;
- __int64 field_E8;
- __int64 field_F0;
- __int64 field_F8;
- __int64 field_100;
- __int64 field_108;
- __int64 field_110;
- __int64 field_118;
- __int64 field_120;
- __int64 field_128;
- __int64 field_130;
- __int64 field_138;
- __int64 field_140;
- __int64 field_148;
- __int64 field_150;
- __int64 field_158;
- __int64 field_160;
ScrollBar(Control* parent, Flags flags);
virtual ~ScrollBar() override;
@@ -818,7 +794,7 @@ namespace dw {
}
};
- static_assert(sizeof(dw::ScrollBar) == 0x168, "\"dw::ScrollBar\" struct should have a size of 0x168");
+ static_assert(sizeof(dw::ScrollBar) == 0xA8, "\"dw::ScrollBar\" struct should have a size of 0xA8");
class ShellCloseButton : public Button {
public:
diff --git a/src/AFTModsShared/light_param/light.cpp b/src/AFTModsShared/light_param/light.cpp
index d66d69a..66563f9 100644
--- a/src/AFTModsShared/light_param/light.cpp
+++ b/src/AFTModsShared/light_param/light.cpp
@@ -5,7 +5,6 @@
#include "light.hpp"
#include "../../KKdLib/mat.hpp"
-#include "../../AFTModsShared/uniform.hpp"
light_set* light_set_data = (light_set*)0x00000001411A00A0;
diff --git a/src/AFTModsShared/mdl/disp_manager.hpp b/src/AFTModsShared/mdl/disp_manager.hpp
index 751808c..9405e91 100644
--- a/src/AFTModsShared/mdl/disp_manager.hpp
+++ b/src/AFTModsShared/mdl/disp_manager.hpp
@@ -48,6 +48,21 @@ namespace mdl {
};
}
+struct morph_struct {
+ object_info object;
+ float_t weight;
+
+ inline morph_struct() : weight() {
+
+ }
+
+ inline morph_struct(object_info object, float_t weight) : object(object), weight(weight) {
+
+ }
+};
+
+static_assert(sizeof(morph_struct) == 0x08, "\"morph_struct\" struct should have a size of 0x08");
+
struct texture_pattern_struct {
texture_id src;
texture_id dst;
diff --git a/src/AFTModsShared/object.cpp b/src/AFTModsShared/object.cpp
index d404c95..1b1811b 100644
--- a/src/AFTModsShared/object.cpp
+++ b/src/AFTModsShared/object.cpp
@@ -4,9 +4,6 @@
*/
#include "object.hpp"
-#include "../KKdLib/hash.hpp"
-#include "../AFTModsShared/file_handler.hpp"
-#include
void (FASTCALL* objset_info_storage_unload_set)(int32_t set)
= (void (FASTCALL*)(int32_t set))0x00000001404599B0;
diff --git a/src/AFTModsShared/shared.hpp b/src/AFTModsShared/shared.hpp
new file mode 100644
index 0000000..d053d68
--- /dev/null
+++ b/src/AFTModsShared/shared.hpp
@@ -0,0 +1,16 @@
+/*
+ by korenkonder
+ GitHub/GitLab: korenkonder
+*/
+
+#pragma once
+
+#include "../KKdLib/default.hpp"
+
+enum blur_filter_mode {
+ BLUR_FILTER_4 = 0x00,
+ BLUR_FILTER_9 = 0x01,
+ BLUR_FILTER_16 = 0x02,
+ BLUR_FILTER_32 = 0x03,
+ BLUR_FILTER_MAX = 0x04,
+};
diff --git a/src/AFTModsShared/stage.hpp b/src/AFTModsShared/stage.hpp
new file mode 100644
index 0000000..2f29e5d
--- /dev/null
+++ b/src/AFTModsShared/stage.hpp
@@ -0,0 +1,37 @@
+/*
+ by korenkonder
+ GitHub/GitLab: korenkonder
+*/
+
+#pragma once
+
+#include "../KKdLib/default.hpp"
+
+enum reflect_refract_resolution_mode {
+ REFLECT_REFRACT_RESOLUTION_256x256 = 0,
+ REFLECT_REFRACT_RESOLUTION_512x256,
+ REFLECT_REFRACT_RESOLUTION_512x512,
+ REFLECT_REFRACT_RESOLUTION_MAX,
+};
+
+enum stage_data_reflect_type {
+ STAGE_DATA_REFLECT_DISABLE = 0x00,
+ STAGE_DATA_REFLECT_NORMAL = 0x01,
+ STAGE_DATA_REFLECT_REFLECT_MAP = 0x02,
+};
+
+enum stage_data_blur_filter_mode {
+ STAGE_DATA_BLUR_FILTER_4 = 0x00,
+ STAGE_DATA_BLUR_FILTER_9 = 0x01,
+ STAGE_DATA_BLUR_FILTER_16 = 0x02,
+ STAGE_DATA_BLUR_FILTER_32 = 0x03,
+ STAGE_DATA_BLUR_FILTER_MAX = 0x03,
+};
+
+struct stage_data_reflect {
+ reflect_refract_resolution_mode mode;
+ int32_t blur_num;
+ stage_data_blur_filter_mode blur_filter;
+};
+
+extern size_t(FASTCALL*stage_data_handler_get_stage_data_count)();
diff --git a/src/DivaGL/Glitter/effect_group.cpp b/src/DivaGL/Glitter/effect_group.cpp
index 7674db5..9a0b07d 100644
--- a/src/DivaGL/Glitter/effect_group.cpp
+++ b/src/DivaGL/Glitter/effect_group.cpp
@@ -5,7 +5,6 @@
#include "glitter.hpp"
#include "../object.hpp"
-#include "../texture.hpp"
namespace Glitter {
EffectGroupX::EffectGroupX() : effects(), load_count(), resources(),
diff --git a/src/DivaGL/Glitter/glitter.hpp b/src/DivaGL/Glitter/glitter.hpp
index 2e4cfc1..117bf6f 100644
--- a/src/DivaGL/Glitter/glitter.hpp
+++ b/src/DivaGL/Glitter/glitter.hpp
@@ -13,12 +13,11 @@
#include "../../AFTModsShared/file_handler.hpp"
#include "../../AFTModsShared/frame_rate_control.hpp"
#include "../../AFTModsShared/task.hpp"
+#include "../../AFTModsShared/texture.hpp"
#include "../../AFTModsShared/types.hpp"
#include "../GL/array_buffer.hpp"
#include "../GL/element_array_buffer.hpp"
-#include "../gl.hpp"
#include "../object.hpp"
-#include "../texture.hpp"
#define SHARED_GLITTER_BUFFER (1)
diff --git a/src/DivaGL/auth_3d.cpp b/src/DivaGL/auth_3d.cpp
index 16e8b87..4e325ac 100644
--- a/src/DivaGL/auth_3d.cpp
+++ b/src/DivaGL/auth_3d.cpp
@@ -5,18 +5,12 @@
#include "auth_3d.hpp"
#include "../KKdLib/hash.hpp"
-#include "../AFTModsShared/light_param/fog.hpp"
-#include "../AFTModsShared/light_param/light.hpp"
#include "../AFTModsShared/canonical_properties.hpp"
-#include "../AFTModsShared/file_handler.hpp"
-#include "../AFTModsShared/frame_rate_control.hpp"
-#include "../AFTModsShared/types.hpp"
#include "mdl/disp_manager.hpp"
#include "pv_game/firstread.hpp"
#include "rob/rob.hpp"
#include "render_context.hpp"
#include "sprite.hpp"
-#include "texture.hpp"
#include
enum auth_3d_material_list_flags {
@@ -490,7 +484,7 @@ static bool auth_3d_material_list_parse(auth_3d_material_list* ml, struc_8* a2,
static void auth_3d_set_material_list(auth_3d* auth) {
int32_t mat_list_count = 0;
- material_list_struct mat_list[TEXTURE_PATTERN_COUNT];
+ material_list_struct mat_list[MATERIAL_LIST_COUNT];
for (auth_3d_curve& i : auth->curve) {
if (i.type != 1)
continue;
diff --git a/src/DivaGL/mdl/disp_manager.cpp b/src/DivaGL/mdl/disp_manager.cpp
index b409cd4..00cfe28 100644
--- a/src/DivaGL/mdl/disp_manager.cpp
+++ b/src/DivaGL/mdl/disp_manager.cpp
@@ -5,6 +5,7 @@
#include "disp_manager.hpp"
#include "../../KKdLib/hash.hpp"
+#include "../../AFTModsShared/camera.hpp"
#include "../../AFTModsShared/uniform.hpp"
#include "../Glitter/glitter.hpp"
#include "../rob/rob.hpp"
diff --git a/src/DivaGL/mdl/disp_manager.hpp b/src/DivaGL/mdl/disp_manager.hpp
index 747a893..3e79446 100644
--- a/src/DivaGL/mdl/disp_manager.hpp
+++ b/src/DivaGL/mdl/disp_manager.hpp
@@ -10,10 +10,10 @@
#include "../../KKdLib/vec.hpp"
#include "../../AFTModsShared/mdl/disp_manager.hpp"
#include "../../AFTModsShared/color.hpp"
+#include "../../AFTModsShared/shadow.hpp"
#include "../GL/array_buffer.hpp"
#include "../GL/element_array_buffer.hpp"
#include "../object.hpp"
-#include "../shadow.hpp"
#define MATERIAL_LIST_COUNT 24
#define TEXTURE_PATTERN_COUNT 24
@@ -98,13 +98,6 @@ struct material_list_struct {
vec4u8& has_blend_color, vec4& emission, vec4u8& has_emission);
};
-struct morph_struct {
- object_info object;
- float_t weight;
-};
-
-static_assert(sizeof(morph_struct) == 0x08, "\"morph_struct\" struct should have a size of 0x08");
-
namespace mdl {
struct ObjSubMeshArgs;
diff --git a/src/DivaGL/pv_game/firstread.hpp b/src/DivaGL/pv_game/firstread.hpp
index 27240fc..1527f43 100644
--- a/src/DivaGL/pv_game/firstread.hpp
+++ b/src/DivaGL/pv_game/firstread.hpp
@@ -6,9 +6,9 @@
#pragma once
#include "../../KKdLib/vec.hpp"
+#include "../../AFTModsShared/object.hpp"
+#include "../../AFTModsShared/stage.hpp"
#include "../../AFTModsShared/types.hpp"
-#include "../object.hpp"
-#include "../stage.hpp"
struct firstread_str_array_string {
int32_t id;
diff --git a/src/DivaGL/pv_game/pv_game.cpp b/src/DivaGL/pv_game/pv_game.cpp
index 116ec24..93cf486 100644
--- a/src/DivaGL/pv_game/pv_game.cpp
+++ b/src/DivaGL/pv_game/pv_game.cpp
@@ -5,12 +5,11 @@
#include "pv_game.hpp"
#include "../../KKdLib/io/memory_stream.hpp"
+#include "../../AFTModsShared/rob/rob.hpp"
#include "../../AFTModsShared/auth_2d.hpp"
+#include "../../AFTModsShared/auth_3d.hpp"
#include "../../AFTModsShared/print_work.hpp"
#include "../Glitter/glitter.hpp"
-#include "../rob/rob.hpp"
-#include "../auth_3d.hpp"
-#include "../render_texture.hpp"
#include "dsc.hpp"
#include "firstread.hpp"
#include "pvpp.hpp"
@@ -1422,8 +1421,13 @@ void x_pv_game_chara_effect::set_chara_effect(int32_t chara_id, int32_t index, i
length -= temp + 1;
}
+ int64_t next_change_field_time = -1;
if (key != change_fields->data() + change_fields->size())
- max_frame = (float_t)((double_t)std::abs(*key - auth_3d[index].time) * 0.000000001) * 60.0f - 1.0f;
+ next_change_field_time = *key;
+
+ if (next_change_field_time >= 0)
+ max_frame = (float_t)((double_t)std::abs(next_change_field_time
+ - auth_3d[index].time) * 0.000000001) * 60.0f - 1.0f;
}
id.set_max_frame(max_frame);
@@ -1767,8 +1771,13 @@ void x_pv_game_effect::set_song_effect_time_inner(int32_t index, int64_t time, b
length -= temp + 1;
}
+ int64_t next_change_field_time = -1;
if (key != change_fields->data() + change_fields->size())
- max_frame = (float_t)((double_t)std::abs(*key - song_effect.time) * 0.000000001) * 60.0f - 1.0f;
+ next_change_field_time = *key;
+
+ if (next_change_field_time >= 0)
+ max_frame = (float_t)((double_t)std::abs(next_change_field_time
+ - song_effect.time) * 0.000000001) * 60.0f - 1.0f;
}
for (x_pv_game_song_effect_auth_3d& i : song_effect.auth_3d) {
@@ -3942,38 +3951,6 @@ bool TaskPvGameX::dest() {
void TaskPvGameX::disp() {
data.disp();
-
- static bool reflect_show;
- if (reflect_full && reflect_show) {
- extern RenderTexture* reflect_tex;
- if (reflect_tex) {
- const float_t width = 1280.0f;
- const float_t height = 720.0f;
-
- const float_t reflection_quality = 1.0f;
-
- spr::put_sprite_rect({ 0.0f, 0.0f, width, height }, RESOLUTION_MODE_HD,
- spr::SPR_PRIO_DEFAULT, { 0x00, 0x00, 0x00, 0xFF }, 0);
-
- spr::SprArgs args;
- args.resolution_mode_screen = RESOLUTION_MODE_HD;
- args.resolution_mode_sprite = RESOLUTION_MODE_HD;
- args.SetSpriteSize({ width, height });
- args.SetTexturePosSize(0.0f,
- (float_t)reflect_tex->GetHeight() - (float_t)reflect_tex->GetHeight() * reflection_quality,
- (float_t)reflect_tex->GetWidth() * reflection_quality,
- (float_t)reflect_tex->GetHeight() * reflection_quality);
- args.texture = reflect_tex->color_texture;
- args.color = color4u8_bgra(0xFF, 0xFF, 0xFF, 0x3F);
- args.scale.x = 1.0f;
- args.scale.y = -1.0f;
- args.center.x = width * 0.5f;
- args.center.y = height * 0.5f;
- args.trans.x = width * 0.5f;
- args.trans.y = height * 0.5f;
- spr::put_sprite(args);
- }
- }
}
void TaskPvGameX::load(int32_t pv_id, int32_t modules[6]) {
diff --git a/src/DivaGL/shared.hpp b/src/DivaGL/shared.hpp
index 498efdf..7397039 100644
--- a/src/DivaGL/shared.hpp
+++ b/src/DivaGL/shared.hpp
@@ -5,17 +5,9 @@
#pragma once
-#include "../KKdLib/default.hpp"
+#include "../AFTModsShared/shared.hpp"
#include "wrap.hpp"
-enum blur_filter_mode {
- BLUR_FILTER_4 = 0x00,
- BLUR_FILTER_9 = 0x01,
- BLUR_FILTER_16 = 0x02,
- BLUR_FILTER_32 = 0x03,
- BLUR_FILTER_MAX = 0x04,
-};
-
extern void fbo_blit(GLuint src_fbo, GLuint dst_fbo,
GLint src_x, GLint src_y, GLint src_width, GLint src_height,
GLint dst_x, GLint dst_y, GLint dst_width, GLint dst_height, GLbitfield mask, GLenum filter);
diff --git a/src/DivaGL/stage.hpp b/src/DivaGL/stage.hpp
index 787b276..f8c5db2 100644
--- a/src/DivaGL/stage.hpp
+++ b/src/DivaGL/stage.hpp
@@ -5,35 +5,6 @@
#pragma once
-#include "../KKdLib/default.hpp"
-
-enum reflect_refract_resolution_mode {
- REFLECT_REFRACT_RESOLUTION_256x256 = 0,
- REFLECT_REFRACT_RESOLUTION_512x256,
- REFLECT_REFRACT_RESOLUTION_512x512,
- REFLECT_REFRACT_RESOLUTION_MAX,
-};
-
-enum stage_data_reflect_type {
- STAGE_DATA_REFLECT_DISABLE = 0x00,
- STAGE_DATA_REFLECT_NORMAL = 0x01,
- STAGE_DATA_REFLECT_REFLECT_MAP = 0x02,
-};
-
-enum stage_data_blur_filter_mode {
- STAGE_DATA_BLUR_FILTER_4 = 0x00,
- STAGE_DATA_BLUR_FILTER_9 = 0x01,
- STAGE_DATA_BLUR_FILTER_16 = 0x02,
- STAGE_DATA_BLUR_FILTER_32 = 0x03,
- STAGE_DATA_BLUR_FILTER_MAX = 0x03,
-};
-
-struct stage_data_reflect {
- reflect_refract_resolution_mode mode;
- int32_t blur_num;
- stage_data_blur_filter_mode blur_filter;
-};
-
-extern size_t(FASTCALL*stage_data_handler_get_stage_data_count)();
+#include "../AFTModsShared/stage.hpp"
extern void stage_patch();