diff --git a/source-code/PD-Loader.sln b/source-code/PD-Loader.sln index baa3962..9e2e857 100644 --- a/source-code/PD-Loader.sln +++ b/source-code/PD-Loader.sln @@ -1,91 +1,91 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.28922.388 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PD-Loader", "source\PD-Loader\PD-Loader.vcxproj", "{CA479467-D518-46A2-AC86-3098ADA99FE5}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TLAC", "source\plugins\TLAC\TLAC.vcxproj", "{2B5533BB-04A1-424F-9BCA-1CA963B46B7F}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Patches", "source\plugins\Patches\Patches.vcxproj", "{3FD6ACA9-E613-4FD6-BDA2-55A91C2CF65C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Launcher", "source\plugins\Launcher\Launcher.vcxproj", "{60D5E9F4-335F-402B-9A07-D78674DFFC9B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Render", "source\plugins\Render\Render.vcxproj", "{89F87459-768F-4638-9267-0F90CD74452D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fakedll", "source\fakedll\fakedll.vcxproj", "{B49C6ABE-931C-4F91-9A94-21A41A305FEE}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DivaSound", "source\plugins\DivaSound\DivaSound.vcxproj", "{EE1A551A-49A0-40F2-8C2E-862D0AE55B43}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DivaMovie", "source\plugins\DivaMovie\DivaMovie.vcxproj", "{1994C586-F73B-4EF2-BA3E-2A0FC3034B1A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ShaderPatch", "source\plugins\ShaderPatch\ShaderPatch.vcxproj", "{C07E495E-A16F-48FA-80E4-0296B5234F0B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DivaWig", "source\plugins\DivaWig\DivaWig.vcxproj", "{2394C586-F73B-4EF2-BA3E-2A0FC3034B1A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DSCRemote", "source\plugins\DSCRemote\DSCRemote.vcxproj", "{8544C599-F73B-4EF2-BA3E-2A0FC3034B1A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Novidia", "source\plugins\Novidia\Novidia.vcxproj", "{47181A1D-C22C-4C9C-B4E0-CB6CE886A1D8}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x64 = Debug|x64 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {CA479467-D518-46A2-AC86-3098ADA99FE5}.Debug|x64.ActiveCfg = Debug|x64 - {CA479467-D518-46A2-AC86-3098ADA99FE5}.Debug|x64.Build.0 = Debug|x64 - {CA479467-D518-46A2-AC86-3098ADA99FE5}.Release|x64.ActiveCfg = Release|x64 - {CA479467-D518-46A2-AC86-3098ADA99FE5}.Release|x64.Build.0 = Release|x64 - {2B5533BB-04A1-424F-9BCA-1CA963B46B7F}.Debug|x64.ActiveCfg = Debug|x64 - {2B5533BB-04A1-424F-9BCA-1CA963B46B7F}.Debug|x64.Build.0 = Debug|x64 - {2B5533BB-04A1-424F-9BCA-1CA963B46B7F}.Release|x64.ActiveCfg = Release|x64 - {2B5533BB-04A1-424F-9BCA-1CA963B46B7F}.Release|x64.Build.0 = Release|x64 - {3FD6ACA9-E613-4FD6-BDA2-55A91C2CF65C}.Debug|x64.ActiveCfg = Debug|x64 - {3FD6ACA9-E613-4FD6-BDA2-55A91C2CF65C}.Debug|x64.Build.0 = Debug|x64 - {3FD6ACA9-E613-4FD6-BDA2-55A91C2CF65C}.Release|x64.ActiveCfg = Release|x64 - {3FD6ACA9-E613-4FD6-BDA2-55A91C2CF65C}.Release|x64.Build.0 = Release|x64 - {60D5E9F4-335F-402B-9A07-D78674DFFC9B}.Debug|x64.ActiveCfg = Debug|x64 - {60D5E9F4-335F-402B-9A07-D78674DFFC9B}.Debug|x64.Build.0 = Debug|x64 - {60D5E9F4-335F-402B-9A07-D78674DFFC9B}.Release|x64.ActiveCfg = Release|x64 - {60D5E9F4-335F-402B-9A07-D78674DFFC9B}.Release|x64.Build.0 = Release|x64 - {89F87459-768F-4638-9267-0F90CD74452D}.Debug|x64.ActiveCfg = Debug|x64 - {89F87459-768F-4638-9267-0F90CD74452D}.Debug|x64.Build.0 = Debug|x64 - {89F87459-768F-4638-9267-0F90CD74452D}.Release|x64.ActiveCfg = Release|x64 - {89F87459-768F-4638-9267-0F90CD74452D}.Release|x64.Build.0 = Release|x64 - {B49C6ABE-931C-4F91-9A94-21A41A305FEE}.Debug|x64.ActiveCfg = Debug|x64 - {B49C6ABE-931C-4F91-9A94-21A41A305FEE}.Debug|x64.Build.0 = Debug|x64 - {B49C6ABE-931C-4F91-9A94-21A41A305FEE}.Release|x64.ActiveCfg = Release|x64 - {B49C6ABE-931C-4F91-9A94-21A41A305FEE}.Release|x64.Build.0 = Release|x64 - {EE1A551A-49A0-40F2-8C2E-862D0AE55B43}.Debug|x64.ActiveCfg = Debug|x64 - {EE1A551A-49A0-40F2-8C2E-862D0AE55B43}.Debug|x64.Build.0 = Debug|x64 - {EE1A551A-49A0-40F2-8C2E-862D0AE55B43}.Release|x64.ActiveCfg = Release|x64 - {EE1A551A-49A0-40F2-8C2E-862D0AE55B43}.Release|x64.Build.0 = Release|x64 - {1994C586-F73B-4EF2-BA3E-2A0FC3034B1A}.Debug|x64.ActiveCfg = Debug|x64 - {1994C586-F73B-4EF2-BA3E-2A0FC3034B1A}.Debug|x64.Build.0 = Debug|x64 - {1994C586-F73B-4EF2-BA3E-2A0FC3034B1A}.Release|x64.ActiveCfg = Release|x64 - {1994C586-F73B-4EF2-BA3E-2A0FC3034B1A}.Release|x64.Build.0 = Release|x64 - {C07E495E-A16F-48FA-80E4-0296B5234F0B}.Debug|x64.ActiveCfg = Debug|x64 - {C07E495E-A16F-48FA-80E4-0296B5234F0B}.Debug|x64.Build.0 = Debug|x64 - {C07E495E-A16F-48FA-80E4-0296B5234F0B}.Release|x64.ActiveCfg = Release|x64 - {C07E495E-A16F-48FA-80E4-0296B5234F0B}.Release|x64.Build.0 = Release|x64 - {2394C586-F73B-4EF2-BA3E-2A0FC3034B1A}.Debug|x64.ActiveCfg = Debug|x64 - {2394C586-F73B-4EF2-BA3E-2A0FC3034B1A}.Debug|x64.Build.0 = Debug|x64 - {2394C586-F73B-4EF2-BA3E-2A0FC3034B1A}.Release|x64.ActiveCfg = Release|x64 - {2394C586-F73B-4EF2-BA3E-2A0FC3034B1A}.Release|x64.Build.0 = Release|x64 - {8544C599-F73B-4EF2-BA3E-2A0FC3034B1A}.Debug|x64.ActiveCfg = Debug|x64 - {8544C599-F73B-4EF2-BA3E-2A0FC3034B1A}.Debug|x64.Build.0 = Debug|x64 - {8544C599-F73B-4EF2-BA3E-2A0FC3034B1A}.Release|x64.ActiveCfg = Release|x64 - {8544C599-F73B-4EF2-BA3E-2A0FC3034B1A}.Release|x64.Build.0 = Release|x64 - {47181A1D-C22C-4C9C-B4E0-CB6CE886A1D8}.Debug|x64.ActiveCfg = Debug|x64 - {47181A1D-C22C-4C9C-B4E0-CB6CE886A1D8}.Debug|x64.Build.0 = Debug|x64 - {47181A1D-C22C-4C9C-B4E0-CB6CE886A1D8}.Release|x64.ActiveCfg = Release|x64 - {47181A1D-C22C-4C9C-B4E0-CB6CE886A1D8}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {F5AD7464-338F-4150-9DDC-85AD115BA616} - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.12.35527.113 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PD-Loader", "source\PD-Loader\PD-Loader.vcxproj", "{CA479467-D518-46A2-AC86-3098ADA99FE5}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TLAC", "source\plugins\TLAC\TLAC.vcxproj", "{2B5533BB-04A1-424F-9BCA-1CA963B46B7F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Patches", "source\plugins\Patches\Patches.vcxproj", "{3FD6ACA9-E613-4FD6-BDA2-55A91C2CF65C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Launcher", "source\plugins\Launcher\Launcher.vcxproj", "{60D5E9F4-335F-402B-9A07-D78674DFFC9B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Render", "source\plugins\Render\Render.vcxproj", "{89F87459-768F-4638-9267-0F90CD74452D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fakedll", "source\fakedll\fakedll.vcxproj", "{B49C6ABE-931C-4F91-9A94-21A41A305FEE}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DivaSound", "source\plugins\DivaSound\DivaSound.vcxproj", "{EE1A551A-49A0-40F2-8C2E-862D0AE55B43}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DivaMovie", "source\plugins\DivaMovie\DivaMovie.vcxproj", "{1994C586-F73B-4EF2-BA3E-2A0FC3034B1A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ShaderPatch", "source\plugins\ShaderPatch\ShaderPatch.vcxproj", "{C07E495E-A16F-48FA-80E4-0296B5234F0B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DivaWig", "source\plugins\DivaWig\DivaWig.vcxproj", "{2394C586-F73B-4EF2-BA3E-2A0FC3034B1A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DSCRemote", "source\plugins\DSCRemote\DSCRemote.vcxproj", "{8544C599-F73B-4EF2-BA3E-2A0FC3034B1A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Novidia", "source\plugins\Novidia\Novidia.vcxproj", "{47181A1D-C22C-4C9C-B4E0-CB6CE886A1D8}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {CA479467-D518-46A2-AC86-3098ADA99FE5}.Debug|x64.ActiveCfg = Debug|x64 + {CA479467-D518-46A2-AC86-3098ADA99FE5}.Debug|x64.Build.0 = Debug|x64 + {CA479467-D518-46A2-AC86-3098ADA99FE5}.Release|x64.ActiveCfg = Release|x64 + {CA479467-D518-46A2-AC86-3098ADA99FE5}.Release|x64.Build.0 = Release|x64 + {2B5533BB-04A1-424F-9BCA-1CA963B46B7F}.Debug|x64.ActiveCfg = Debug|x64 + {2B5533BB-04A1-424F-9BCA-1CA963B46B7F}.Debug|x64.Build.0 = Debug|x64 + {2B5533BB-04A1-424F-9BCA-1CA963B46B7F}.Release|x64.ActiveCfg = Release|x64 + {2B5533BB-04A1-424F-9BCA-1CA963B46B7F}.Release|x64.Build.0 = Release|x64 + {3FD6ACA9-E613-4FD6-BDA2-55A91C2CF65C}.Debug|x64.ActiveCfg = Debug|x64 + {3FD6ACA9-E613-4FD6-BDA2-55A91C2CF65C}.Debug|x64.Build.0 = Debug|x64 + {3FD6ACA9-E613-4FD6-BDA2-55A91C2CF65C}.Release|x64.ActiveCfg = Release|x64 + {3FD6ACA9-E613-4FD6-BDA2-55A91C2CF65C}.Release|x64.Build.0 = Release|x64 + {60D5E9F4-335F-402B-9A07-D78674DFFC9B}.Debug|x64.ActiveCfg = Debug|x64 + {60D5E9F4-335F-402B-9A07-D78674DFFC9B}.Debug|x64.Build.0 = Debug|x64 + {60D5E9F4-335F-402B-9A07-D78674DFFC9B}.Release|x64.ActiveCfg = Release|x64 + {60D5E9F4-335F-402B-9A07-D78674DFFC9B}.Release|x64.Build.0 = Release|x64 + {89F87459-768F-4638-9267-0F90CD74452D}.Debug|x64.ActiveCfg = Debug|x64 + {89F87459-768F-4638-9267-0F90CD74452D}.Debug|x64.Build.0 = Debug|x64 + {89F87459-768F-4638-9267-0F90CD74452D}.Release|x64.ActiveCfg = Release|x64 + {89F87459-768F-4638-9267-0F90CD74452D}.Release|x64.Build.0 = Release|x64 + {B49C6ABE-931C-4F91-9A94-21A41A305FEE}.Debug|x64.ActiveCfg = Debug|x64 + {B49C6ABE-931C-4F91-9A94-21A41A305FEE}.Debug|x64.Build.0 = Debug|x64 + {B49C6ABE-931C-4F91-9A94-21A41A305FEE}.Release|x64.ActiveCfg = Release|x64 + {B49C6ABE-931C-4F91-9A94-21A41A305FEE}.Release|x64.Build.0 = Release|x64 + {EE1A551A-49A0-40F2-8C2E-862D0AE55B43}.Debug|x64.ActiveCfg = Debug|x64 + {EE1A551A-49A0-40F2-8C2E-862D0AE55B43}.Debug|x64.Build.0 = Debug|x64 + {EE1A551A-49A0-40F2-8C2E-862D0AE55B43}.Release|x64.ActiveCfg = Release|x64 + {EE1A551A-49A0-40F2-8C2E-862D0AE55B43}.Release|x64.Build.0 = Release|x64 + {1994C586-F73B-4EF2-BA3E-2A0FC3034B1A}.Debug|x64.ActiveCfg = Debug|x64 + {1994C586-F73B-4EF2-BA3E-2A0FC3034B1A}.Debug|x64.Build.0 = Debug|x64 + {1994C586-F73B-4EF2-BA3E-2A0FC3034B1A}.Release|x64.ActiveCfg = Release|x64 + {1994C586-F73B-4EF2-BA3E-2A0FC3034B1A}.Release|x64.Build.0 = Release|x64 + {C07E495E-A16F-48FA-80E4-0296B5234F0B}.Debug|x64.ActiveCfg = Debug|x64 + {C07E495E-A16F-48FA-80E4-0296B5234F0B}.Debug|x64.Build.0 = Debug|x64 + {C07E495E-A16F-48FA-80E4-0296B5234F0B}.Release|x64.ActiveCfg = Release|x64 + {C07E495E-A16F-48FA-80E4-0296B5234F0B}.Release|x64.Build.0 = Release|x64 + {2394C586-F73B-4EF2-BA3E-2A0FC3034B1A}.Debug|x64.ActiveCfg = Debug|x64 + {2394C586-F73B-4EF2-BA3E-2A0FC3034B1A}.Debug|x64.Build.0 = Debug|x64 + {2394C586-F73B-4EF2-BA3E-2A0FC3034B1A}.Release|x64.ActiveCfg = Release|x64 + {2394C586-F73B-4EF2-BA3E-2A0FC3034B1A}.Release|x64.Build.0 = Release|x64 + {8544C599-F73B-4EF2-BA3E-2A0FC3034B1A}.Debug|x64.ActiveCfg = Debug|x64 + {8544C599-F73B-4EF2-BA3E-2A0FC3034B1A}.Debug|x64.Build.0 = Debug|x64 + {8544C599-F73B-4EF2-BA3E-2A0FC3034B1A}.Release|x64.ActiveCfg = Release|x64 + {8544C599-F73B-4EF2-BA3E-2A0FC3034B1A}.Release|x64.Build.0 = Release|x64 + {47181A1D-C22C-4C9C-B4E0-CB6CE886A1D8}.Debug|x64.ActiveCfg = Debug|x64 + {47181A1D-C22C-4C9C-B4E0-CB6CE886A1D8}.Debug|x64.Build.0 = Debug|x64 + {47181A1D-C22C-4C9C-B4E0-CB6CE886A1D8}.Release|x64.ActiveCfg = Release|x64 + {47181A1D-C22C-4C9C-B4E0-CB6CE886A1D8}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {F5AD7464-338F-4150-9DDC-85AD115BA616} + EndGlobalSection +EndGlobal diff --git a/source-code/data/plugins/config_template.bin b/source-code/data/plugins/config_template.bin index bf1f8ce..4695e01 100644 --- a/source-code/data/plugins/config_template.bin +++ b/source-code/data/plugins/config_template.bin @@ -35,6 +35,8 @@ Stereo=1 Quick_Start=0 #Disable the scrolling sound effect No_Scrolling_SFX=0 +#Automatically generate databank for missing entries and allow multiple PVList files to be used +Auto_Databank=1 #Enhanced Stage Manager (sets a custom number of stages; "stage_manager" should be disabled in "components.ini") #Number of stages (0 = disabled) Enhanced_Stage_Manager=0 @@ -60,6 +62,8 @@ Hide_Volume=0 No_PV_UI=0 #Hide the watermark that's usually shown in PV viewing mode Hide_PV_Watermark=0 +#Hide the top-right corner status icons +Hide_Status_Icons=0 #Set the card reader and network status icons -- 0=default, 1=hidden, 2=error, 3=OK, 4=partial OK Status_Icons=0 #Disable showing lyrics diff --git a/source-code/source/plugins/Launcher/framework.h b/source-code/source/plugins/Launcher/framework.h index ef5c195..5c9b9d4 100644 --- a/source-code/source/plugins/Launcher/framework.h +++ b/source-code/source/plugins/Launcher/framework.h @@ -212,6 +212,7 @@ ConfigOptionBase* optionsArray[] = { new OptionMetaSpacer(8), new OptionMetaSectionLabel(L"Stages/Songs"), + new BooleanOption(L"Auto_Databank", PATCHES_SECTION, CONFIG_FILE, L"Auto Databank", L"Automatically generate databank for missing entries and allow multiple PvList files to be used.", true, false), new NumericOption(L"Enhanced_Stage_Manager", PATCHES_SECTION, CONFIG_FILE, L"Number of Stages:", L"Set the number of stages (0 = default).", 0, 0, INT_MAX), new BooleanOption(L"Enhanced_Stage_Manager_Encore", PATCHES_SECTION, CONFIG_FILE, L"Encore", L"Enable encore stages.", true, false), new BooleanOption(L"sing_missed", PATCHES_SECTION, CONFIG_FILE, L"Sing Missed", L"Sing missed notes.", false, false), @@ -233,7 +234,8 @@ ConfigOptionBase* optionsArray[] = { new BooleanOption(L"hide_volume", PATCHES_SECTION, CONFIG_FILE, L"Hide Volume Buttons", L"Hide the volume and SE control buttons.", false, false), new BooleanOption(L"no_pv_ui", PATCHES_SECTION, CONFIG_FILE, L"Disable PV UI", L"Remove the photo controls during PV playback.", false, false), new BooleanOption(L"hide_pv_watermark", PATCHES_SECTION, CONFIG_FILE, L"Hide PV Watermark", L"Hide the watermark that's usually shown in PV viewing mode.", false, false), - new DropdownOption(L"status_icons", PATCHES_SECTION, CONFIG_FILE, L"Top-Right Network Icons:", L"Set the state of card reader and network status icons.", 3, std::vector({ L"Default", L"Hidden", L"Error", L"OK", L"Partial OK" })), + new BooleanOption(L"hide_status_icons", PATCHES_SECTION, CONFIG_FILE, L"Hide Network Icons", L"Hide the top-right corner status icons.", false, false), // technically reduntant, but somehow a lot of users miss the dropdown + new DropdownOption(L"status_icons", PATCHES_SECTION, CONFIG_FILE, L"Network Icons Status:", L"Set the state of card reader and network status icons.", 3, std::vector({ L"Default", L"Hidden", L"Error", L"OK", L"Partial OK" })), new BooleanOption(L"no_lyrics", PATCHES_SECTION, CONFIG_FILE, L"Disable Lyrics", L"Disable showing lyrics.", false, false), new BooleanOption(L"no_error", PATCHES_SECTION, CONFIG_FILE, L"Disable Error Banner", L"Disable the error banner on the attract screen.", true, false), new BooleanOption(L"hide_freeplay", PATCHES_SECTION, CONFIG_FILE, L"Hide \"FREE PLAY\"/\"CREDIT(S)\"", L"Hide the \"FREE PLAY\"/\"CREDIT(S)\" text.", false, false), diff --git a/source-code/source/plugins/Launcher/ui.h b/source-code/source/plugins/Launcher/ui.h index 43ae3cc..c37b156 100644 --- a/source-code/source/plugins/Launcher/ui.h +++ b/source-code/source/plugins/Launcher/ui.h @@ -1192,8 +1192,8 @@ divagl_freeglut: return true; divagl_novidia: - SkinnedMessageBox::Show(this, "Plugins: Novidia and ShaderPatch must be disabled if DivaGL is enabled.", "PD Launcher", MessageBoxButtons::OK, MessageBoxIcon::Error); - return true; + if (SkinnedMessageBox::Show(this, "Plugins: Novidia and ShaderPatch should be disabled if DivaGL is enabled.\n\nLaunch anyway?", "PD Launcher", MessageBoxButtons::YesNo, MessageBoxIcon::Error) != System::Windows::Forms::DialogResult::Yes) + return true; divagl_divaimguiold: SkinnedMessageBox::Show(this, "Plugins: Your version of DivaImGui is too old for DivaGL; please either update or disable it.", "PD Launcher", MessageBoxButtons::OK, MessageBoxIcon::Error); diff --git a/source-code/source/plugins/Patches/PatchApplier600.h b/source-code/source/plugins/Patches/PatchApplier600.h index c5376f1..1ebe570 100644 --- a/source-code/source/plugins/Patches/PatchApplier600.h +++ b/source-code/source/plugins/Patches/PatchApplier600.h @@ -161,12 +161,18 @@ class PatchApplier600 : public PatchApplier { printf("[Patches] Cursor enabled\n");*/ } // Override status icon states to be invalid (hides them) - if (nStatusIcons > 0) + if (nHideStatusIcons || nStatusIcons > 0) { std::vector cardIcon = { 0xFD, 0x0A }; std::vector networkIcon = { 0x9E, 0x1E }; - if (nStatusIcons == 2) // 2 for error icons + if (nHideStatusIcons || nStatusIcons == 1 || nStatusIcons >= 5) // 1 or invalid for hidden + { + cardIcon = { 0xFD, 0x0A }; + networkIcon = { 0x9E, 0x1E }; + printf("[Patches] Status icons hidden\n"); + } + else if (nStatusIcons == 2) // 2 for error icons { cardIcon = { 0xFA, 0x0A }; networkIcon = { 0x9F, 0x1E }; @@ -184,12 +190,6 @@ class PatchApplier600 : public PatchApplier { networkIcon = { 0xA1, 0x1E }; printf("[Patches] Status icons set to partial OK state\n"); } - else // 1 or invalid for hidden - { - cardIcon = { 0xFD, 0x0A }; - networkIcon = { 0x9E, 0x1E }; - printf("[Patches] Status icons hidden\n"); - } // card icon InjectCode((void*)0x00000001403A0C9E, cardIcon); // error state diff --git a/source-code/source/plugins/Patches/PatchApplier710.h b/source-code/source/plugins/Patches/PatchApplier710.h index 2a24f70..bf104e8 100644 --- a/source-code/source/plugins/Patches/PatchApplier710.h +++ b/source-code/source/plugins/Patches/PatchApplier710.h @@ -180,12 +180,18 @@ class PatchApplier710 : public PatchApplier { printf("[Patches] Cursor enabled\n"); } // Override status icon states to be invalid (hides them) - if (nStatusIcons > 0) + if (nHideStatusIcons || nStatusIcons > 0) { std::vector cardIcon = { 0xFD, 0x0A }; std::vector networkIcon = { 0x9E, 0x1E }; - if (nStatusIcons == 2) // 2 for error icons + if (nHideStatusIcons || nStatusIcons == 1 || nStatusIcons >= 5) // 1 or invalid for hidden + { + cardIcon = { 0xFD, 0x0A }; + networkIcon = { 0x9E, 0x1E }; + printf("[Patches] Status icons hidden\n"); + } + else if (nStatusIcons == 2) // 2 for error icons { cardIcon = { 0xFA, 0x0A }; networkIcon = { 0x9F, 0x1E }; @@ -203,12 +209,6 @@ class PatchApplier710 : public PatchApplier { networkIcon = { 0xA1, 0x1E }; printf("[Patches] Status icons set to partial OK state\n"); } - else // 1 or invalid for hidden - { - cardIcon = { 0xFD, 0x0A }; - networkIcon = { 0x9E, 0x1E }; - printf("[Patches] Status icons hidden\n"); - } // card icon InjectCode((void*)0x00000001403B9D6E, cardIcon); // error state diff --git a/source-code/source/plugins/Patches/Patches.vcxproj b/source-code/source/plugins/Patches/Patches.vcxproj index 3c1de16..a100950 100644 --- a/source-code/source/plugins/Patches/Patches.vcxproj +++ b/source-code/source/plugins/Patches/Patches.vcxproj @@ -1,114 +1,118 @@ - - - - - Debug - x64 - - - Release - x64 - - - - 16.0 - {3FD6ACA9-E613-4FD6-BDA2-55A91C2CF65C} - Win32Proj - Patches - 10.0 - - - - DynamicLibrary - true - v142 - Unicode - - - DynamicLibrary - false - v142 - true - Unicode - - - - - - - - - - - - - - - false - .dva - - - true - .dva - - - - NotUsing - Level3 - MaxSpeed - true - true - true - NDEBUG;PATCHES_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - true - pch.h - stdcpp17 - ..\..\..\dependencies\PluginConfigApi;..\..\..\dependencies\freeglut\include;..\..\..\dependencies\freeglut\include;..\..\..\dependencies\detours\include;%(AdditionalIncludeDirectories) - MultiThreadedDLL - -d2FH4- %(AdditionalOptions) - - - Windows - true - true - true - false - ..\..\..\dependencies\detours\lib;..\..\..\dependencies\freeglut\lib;%(AdditionalLibraryDirectories) - -d2:-FH4- %(AdditionalOptions) - - - - - NotUsing - Level3 - Disabled - true - _DEBUG;PATCHES_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - true - - - ..\..\..\dependencies\PluginConfigApi;..\..\..\dependencies\freeglut\include;..\..\..\dependencies\freeglut\include;..\..\..\dependencies\detours\include;%(AdditionalIncludeDirectories) - stdcpp17 - -d2FH4- %(AdditionalOptions) - - - Windows - true - false - ..\..\..\dependencies\detours\lib;..\..\..\dependencies\freeglut\lib;%(AdditionalLibraryDirectories) - -d2:-FH4- %(AdditionalOptions) - - - - - - - - - - - - - - + + + + + Debug + x64 + + + Release + x64 + + + + 16.0 + {3FD6ACA9-E613-4FD6-BDA2-55A91C2CF65C} + Win32Proj + Patches + 10.0 + + + + DynamicLibrary + true + v142 + Unicode + + + DynamicLibrary + false + v142 + true + Unicode + + + + + + + + + + + + + + + false + .dva + + + true + .dva + + + + NotUsing + Level3 + MaxSpeed + true + true + true + NDEBUG;PATCHES_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + pch.h + stdcpp17 + ..\..\..\dependencies\PluginConfigApi;..\..\..\dependencies\freeglut\include;..\..\..\dependencies\freeglut\include;..\..\..\dependencies\detours\include;%(AdditionalIncludeDirectories) + MultiThreadedDLL + -d2FH4- %(AdditionalOptions) + + + Windows + true + true + true + false + ..\..\..\dependencies\detours\lib;..\..\..\dependencies\freeglut\lib;%(AdditionalLibraryDirectories) + -d2:-FH4- %(AdditionalOptions) + + + + + NotUsing + Level3 + Disabled + true + _DEBUG;PATCHES_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + + + ..\..\..\dependencies\PluginConfigApi;..\..\..\dependencies\freeglut\include;..\..\..\dependencies\freeglut\include;..\..\..\dependencies\detours\include;%(AdditionalIncludeDirectories) + stdcpp17 + -d2FH4- %(AdditionalOptions) + + + Windows + true + false + ..\..\..\dependencies\detours\lib;..\..\..\dependencies\freeglut\lib;%(AdditionalLibraryDirectories) + -d2:-FH4- %(AdditionalOptions) + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source-code/source/plugins/Patches/Patches.vcxproj.filters b/source-code/source/plugins/Patches/Patches.vcxproj.filters index 9a14ed3..ac9ad2c 100644 --- a/source-code/source/plugins/Patches/Patches.vcxproj.filters +++ b/source-code/source/plugins/Patches/Patches.vcxproj.filters @@ -1,36 +1,48 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;hm;inl;inc;ipp;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + \ No newline at end of file diff --git a/source-code/source/plugins/Patches/databank.cpp b/source-code/source/plugins/Patches/databank.cpp new file mode 100644 index 0000000..9fa5462 --- /dev/null +++ b/source-code/source/plugins/Patches/databank.cpp @@ -0,0 +1,137 @@ +#include +#include +#include + +#include "databank.h" +#include "urlutil.h" + +namespace Databank +{ + bool PvList::readFromStr(std::string& str) + { + std::string decoded = urlDecode(urlDecode(str)); + + std::vector tokens; + std::stringstream ss(decoded); + std::string token; + while (std::getline(ss, token, ',')) + { + if (!token.empty()) + { + tokens.push_back(token); + } + } + + if (tokens.size() % 7 != 0) + { + std::cerr << "[Patches] Databank error: Token count (" << tokens.size() << ") is not a multiple of 7." << std::endl; + return false; + } + + for (size_t i = 0; i < tokens.size(); i += 7) + { + try + { + PvEntry entry; + entry.id = std::stoi(tokens[i]); + entry.unk1 = std::stoi(tokens[i + 1]); + entry.unk2 = std::stoi(tokens[i + 2]); + entry.advStart = tokens[i + 3]; + entry.advEnd = tokens[i + 4]; + entry.start = tokens[i + 5]; + entry.end = tokens[i + 6]; + entries.insert(entry); + } + catch (const std::exception& e) + { + std::cerr << "[Patches] Databank parse error: " << e.what() << std::endl; + return false; + } + } + return true; + } + + bool PvList::readFromFile(const std::string& filename) + { + try + { + std::ifstream file(filename, std::ios::in | std::ios::binary); + if (!file) + { + std::cerr << "[Patches] Failed to open databank " + filename << std::endl; + return false; + } + + std::string contents = std::string((std::istreambuf_iterator(file)), std::istreambuf_iterator()); + + return readFromStr(contents); + } + catch (const std::exception& e) + { + std::cerr << "[Patches] Databank file read error: " << e.what() << std::endl; + return false; + } + } + + bool PvList::finalize() + { + std::ostringstream csvStream; + if (entries.empty()) + { + finalString = "%2A%2A%2A"; // *** + //checksum = "5341"; + } + else + { + bool first = true; + + for (const auto& entry : entries) + { + std::ostringstream entryStream; + if (!first) + { + csvStream << ","; + } + first = false; + entryStream << entry.id << "," + << entry.unk1 << "," + << entry.unk2 << "," + << entry.advStart << "," + << entry.advEnd << "," + << entry.start << "," + << entry.end; + csvStream << urlEncode(entryStream.str()); + } + + finalString = urlEncode(csvStream.str()); + //checksum = std::to_string(crc16_ccitt(finalString)); + } + return true; + } + + void PvList::copyCstrData(char* dst) + { + strcpy_s((char*)dst, finalString.size(), finalString.c_str()); + } + + void PvList::addEntry(PvEntry& entry) + { + entries.insert(entry); + } + + void PvList::generateMissingEntries() + { + PvEntry entry = PvEntry(); + + for (int i = 0; i <= 999; i++) + { + entry.id = i; + entry.advStart = "2000-01-01"; + entry.advEnd = "2029-01-01"; + entry.start = "2000-01-01"; + entry.end = "2029-01-01"; + + entries.insert(entry); + } + } +} diff --git a/source-code/source/plugins/Patches/databank.h b/source-code/source/plugins/Patches/databank.h new file mode 100644 index 0000000..b18fbac --- /dev/null +++ b/source-code/source/plugins/Patches/databank.h @@ -0,0 +1,39 @@ +#pragma once +#include +#include +#include + +#include "databank.h" + +namespace Databank +{ + struct PvEntry + { + int id = -1; + int unk1 = 1; + int unk2 = 0; + std::string advStart, advEnd, start, end; + + bool operator<(const PvEntry& other) const + { + return id < other.id; + } + }; + + class PvList + { + protected: + std::set entries; + + public: + std::string finalString = std::string(); + //std::string checksum = std::string(); + + bool readFromStr(std::string& str); + bool readFromFile(const std::string& filename); + bool finalize(); + void copyCstrData(char* dst); + void addEntry(PvEntry& entry); + void generateMissingEntries(); + }; +} diff --git a/source-code/source/plugins/Patches/dllmain.cpp b/source-code/source/plugins/Patches/dllmain.cpp index 2683d7c..da0c7bf 100644 --- a/source-code/source/plugins/Patches/dllmain.cpp +++ b/source-code/source/plugins/Patches/dllmain.cpp @@ -7,13 +7,16 @@ #include #include #include +#include +#include + #include "PluginConfigApi.h" #include "PatchApplier.h" #include "PatchApplier600.h" #include "PatchApplier710.h" - -#include #include "framework.h" +#include "storage.h" +#include "databank.h" #pragma comment(lib, "detours.lib") unsigned short game_version = 710; @@ -22,7 +25,9 @@ void InjectCode(void* address, const std::vector data); void ApplyPatches(); void ApplyCustomPatches(std::wstring CPATCH_FILE_STRING); - +constexpr uint64_t PVLIST_INIT_ADDRESS = 0x000000014001EC80; +void(__fastcall* divaPvListInitializer)(void* pvListContainer) = (void(__fastcall*)(void* pvListContainer))PVLIST_INIT_ADDRESS; +void initPvListContainerHook(); HMODULE *hModulePtr; @@ -98,6 +103,11 @@ void ApplyPatches() { std::cout << "[Patches] All custom patches applied\n"; } + + if (nAutoDatabank) + { + initPvListContainerHook(); + } } @@ -244,7 +254,7 @@ void ApplyCustomPatches(std::wstring CPATCH_FILE_STRING) if (echo) std::cout << std::endl; else if (comment_string.length() > 0) { - std::cout << "[Patches]";; + std::cout << "[Patches]"; if (comment_string.at(0) != ' ') std::cout << ' '; std::cout << comment_string << std::endl; } @@ -254,6 +264,52 @@ void ApplyCustomPatches(std::wstring CPATCH_FILE_STRING) fileStream.close(); } +Databank::PvList lists[5] = {}; +void hookedPvListInitializer(void* pvListContainer) +{ + Storage::FileRecord* records = (Storage::FileRecord*)((uint64_t)pvListContainer + 0xA0); + + for (int i = 0; i <= 4; i++) + { + std::regex pattern("(PvList" + std::to_string(i) +"_SBZV_7.10_.*_.*\\.dat)"); + try + { + for (const auto& entry : std::filesystem::directory_iterator("ram/databank/")) + { + if (entry.is_regular_file() && std::regex_match(entry.path().filename().string(), pattern)) + { + std::string path = entry.path().string(); + std::cout << "[Patches] Reading databank: " << path << std::endl; + lists[i].readFromFile(path); + } + } + } + catch (const std::filesystem::filesystem_error& e) + { + std::cerr << "[Patches] Databank filesystem error: " << e.what() << std::endl; + } + + if (i != 4) lists[i].generateMissingEntries(); + lists[i].finalize(); + + Storage::customAddStringContainer(&records[i], lists[i].finalString.c_str()); + } + + *(uint8_t*)(0x140CDB1D9) = 0x01; // enables databank +} + +void initPvListContainerHook() +{ + if (game_version != 710) return; + + DetourTransactionBegin(); + DetourUpdateThread(GetCurrentThread()); + DetourAttach(&(PVOID&)divaPvListInitializer, (PVOID)(hookedPvListInitializer)); + DetourTransactionCommit(); + std::cout << "[Patch] Auto Databank enabled" << std::endl; +} + + using namespace PluginConfig; diff --git a/source-code/source/plugins/Patches/framework.h b/source-code/source/plugins/Patches/framework.h index 6bfd676..f423ac2 100644 --- a/source-code/source/plugins/Patches/framework.h +++ b/source-code/source/plugins/Patches/framework.h @@ -3,6 +3,14 @@ #include #include +typedef uint16_t(__fastcall* p_crc16_ccitt)(void* data, int len); +p_crc16_ccitt o_crc16_ccitt = (p_crc16_ccitt)0x140011A90; + +uint16_t crc16_ccitt(std::string& str) +{ + return o_crc16_ccitt(str.data(), str.size()); +} + std::string TrimString(const std::string& str, const std::string& whitespace) { const size_t strBegin = str.find_first_not_of(whitespace); @@ -91,6 +99,7 @@ auto nCursor = GetPrivateProfileIntW(L"patches", L"cursor", TRUE, CONFIG_FILE); auto nHideFreeplay = GetPrivateProfileIntW(L"patches", L"hide_freeplay", FALSE, CONFIG_FILE); auto nFreeplay = GetPrivateProfileIntW(L"patches", L"freeplay", TRUE, CONFIG_FILE); auto nPDLoaderText = GetPrivateProfileIntW(L"patches", L"pdloadertext", TRUE, CONFIG_FILE); +auto nHideStatusIcons = GetPrivateProfileIntW(L"patches", L"hide_status_icons", FALSE, CONFIG_FILE); auto nStatusIcons = GetPrivateProfileIntW(L"patches", L"status_icons", 0, CONFIG_FILE); auto nHidePVWatermark = GetPrivateProfileIntW(L"patches", L"hide_pv_watermark", FALSE, CONFIG_FILE); auto nNoPVUi = GetPrivateProfileIntW(L"patches", L"no_pv_ui", FALSE, CONFIG_FILE); @@ -101,6 +110,7 @@ auto nMP4Movies = GetPrivateProfileIntW(L"patches", L"mp4_movies", FALSE, CONFIG auto nNoError = GetPrivateProfileIntW(L"patches", L"no_error", FALSE, CONFIG_FILE); auto nNoTimer = GetPrivateProfileIntW(L"patches", L"no_timer", TRUE, CONFIG_FILE); auto nNoTimerSprite = GetPrivateProfileIntW(L"patches", L"no_timer_sprite", TRUE, CONFIG_FILE); +auto nAutoDatabank = GetPrivateProfileIntW(L"patches", L"auto_databank", TRUE, CONFIG_FILE); auto nEStageManager = GetPrivateProfileIntW(L"patches", L"enhanced_stage_manager", 0, CONFIG_FILE); auto nEStageManagerEncore = GetPrivateProfileIntW(L"patches", L"enhanced_stage_manager_encore", TRUE, CONFIG_FILE); auto nUnlockPseudo = GetPrivateProfileIntW(L"patches", L"unlock_pseudo", FALSE, CONFIG_FILE); diff --git a/source-code/source/plugins/Patches/storage.h b/source-code/source/plugins/Patches/storage.h new file mode 100644 index 0000000..4adeab4 --- /dev/null +++ b/source-code/source/plugins/Patches/storage.h @@ -0,0 +1,46 @@ +#pragma once +#include + +namespace Storage +{ + struct FileRecord + { + union + { + void* pData; // used if allocSize is >= 16 + char inlineData[16]; // used if allocSize is < 16; [8-15] not normally cleared when expanded + }; + uint64_t dataLength = 0; + uint64_t allocSize = 15; + }; + + //void(__fastcall* divaAddStringContainer)(void*, void**) = (void(__fastcall*)(void* container, void** src))0x01400C0A40; + + void customAddStringContainer(void* container, const char* str) + { + uint64_t addr = (uint64_t)container; + + while (*(uint64_t*)addr != 0) + { + addr += sizeof(FileRecord); + } + + FileRecord* record = (FileRecord*)addr; + size_t length = strlen(str) + 1; + + if (length > 0 && length < 16) + { + memcpy_s(record->inlineData, length, str, length); + record->dataLength = length; + record->allocSize = 0; + } + else if (length >= 16) + { + char* alloc = (char*)malloc(length); + memcpy_s(alloc, length, str, length); + record->pData = alloc; + record->dataLength = length; + record->allocSize = length; + } + } +}; \ No newline at end of file diff --git a/source-code/source/plugins/Patches/urlutil.h b/source-code/source/plugins/Patches/urlutil.h new file mode 100644 index 0000000..4b140b4 --- /dev/null +++ b/source-code/source/plugins/Patches/urlutil.h @@ -0,0 +1,56 @@ +#pragma once +#include +#include +#include + +std::string urlDecode(const std::string& encoded) +{ + std::string decoded; + char ch; + for (size_t i = 0; i < encoded.length(); i++) + { + if (encoded[i] == '%') + { + if (i + 2 < encoded.length()) + { + std::string hex = encoded.substr(i + 1, 2); + ch = static_cast(std::strtol(hex.c_str(), nullptr, 16)); + decoded.push_back(ch); + i += 2; + } + else + { + decoded.push_back('%'); + } + } + else if (encoded[i] == '+') + { + decoded.push_back(' '); + } + else + { + decoded.push_back(encoded[i]); + } + } + return decoded; +} + +std::string urlEncode(const std::string& str) +{ + std::ostringstream escaped; + escaped.fill('0'); + escaped << std::hex; + + for (unsigned char c : str) + { + if (std::isalnum(c) || c == '-' || c == '_' || c == '.' || c == '~') + { + escaped << c; + } + else + { + escaped << '%' << std::setw(2) << std::uppercase << static_cast(c); + } + } + return escaped.str(); +}