Auto Databank, hide status icons checkbox

This commit is contained in:
nastys
2025-03-05 20:11:49 +01:00
parent 3d422e4743
commit cf26061123
14 changed files with 628 additions and 262 deletions
+91 -91
View File
@@ -1,91 +1,91 @@
 
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16 # Visual Studio Version 17
VisualStudioVersion = 16.0.28922.388 VisualStudioVersion = 17.12.35527.113
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PD-Loader", "source\PD-Loader\PD-Loader.vcxproj", "{CA479467-D518-46A2-AC86-3098ADA99FE5}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PD-Loader", "source\PD-Loader\PD-Loader.vcxproj", "{CA479467-D518-46A2-AC86-3098ADA99FE5}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TLAC", "source\plugins\TLAC\TLAC.vcxproj", "{2B5533BB-04A1-424F-9BCA-1CA963B46B7F}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TLAC", "source\plugins\TLAC\TLAC.vcxproj", "{2B5533BB-04A1-424F-9BCA-1CA963B46B7F}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Patches", "source\plugins\Patches\Patches.vcxproj", "{3FD6ACA9-E613-4FD6-BDA2-55A91C2CF65C}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Patches", "source\plugins\Patches\Patches.vcxproj", "{3FD6ACA9-E613-4FD6-BDA2-55A91C2CF65C}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Launcher", "source\plugins\Launcher\Launcher.vcxproj", "{60D5E9F4-335F-402B-9A07-D78674DFFC9B}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Launcher", "source\plugins\Launcher\Launcher.vcxproj", "{60D5E9F4-335F-402B-9A07-D78674DFFC9B}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Render", "source\plugins\Render\Render.vcxproj", "{89F87459-768F-4638-9267-0F90CD74452D}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Render", "source\plugins\Render\Render.vcxproj", "{89F87459-768F-4638-9267-0F90CD74452D}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fakedll", "source\fakedll\fakedll.vcxproj", "{B49C6ABE-931C-4F91-9A94-21A41A305FEE}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fakedll", "source\fakedll\fakedll.vcxproj", "{B49C6ABE-931C-4F91-9A94-21A41A305FEE}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DivaSound", "source\plugins\DivaSound\DivaSound.vcxproj", "{EE1A551A-49A0-40F2-8C2E-862D0AE55B43}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DivaSound", "source\plugins\DivaSound\DivaSound.vcxproj", "{EE1A551A-49A0-40F2-8C2E-862D0AE55B43}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DivaMovie", "source\plugins\DivaMovie\DivaMovie.vcxproj", "{1994C586-F73B-4EF2-BA3E-2A0FC3034B1A}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DivaMovie", "source\plugins\DivaMovie\DivaMovie.vcxproj", "{1994C586-F73B-4EF2-BA3E-2A0FC3034B1A}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ShaderPatch", "source\plugins\ShaderPatch\ShaderPatch.vcxproj", "{C07E495E-A16F-48FA-80E4-0296B5234F0B}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ShaderPatch", "source\plugins\ShaderPatch\ShaderPatch.vcxproj", "{C07E495E-A16F-48FA-80E4-0296B5234F0B}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DivaWig", "source\plugins\DivaWig\DivaWig.vcxproj", "{2394C586-F73B-4EF2-BA3E-2A0FC3034B1A}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DivaWig", "source\plugins\DivaWig\DivaWig.vcxproj", "{2394C586-F73B-4EF2-BA3E-2A0FC3034B1A}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DSCRemote", "source\plugins\DSCRemote\DSCRemote.vcxproj", "{8544C599-F73B-4EF2-BA3E-2A0FC3034B1A}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DSCRemote", "source\plugins\DSCRemote\DSCRemote.vcxproj", "{8544C599-F73B-4EF2-BA3E-2A0FC3034B1A}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Novidia", "source\plugins\Novidia\Novidia.vcxproj", "{47181A1D-C22C-4C9C-B4E0-CB6CE886A1D8}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Novidia", "source\plugins\Novidia\Novidia.vcxproj", "{47181A1D-C22C-4C9C-B4E0-CB6CE886A1D8}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64 Debug|x64 = Debug|x64
Release|x64 = Release|x64 Release|x64 = Release|x64
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{CA479467-D518-46A2-AC86-3098ADA99FE5}.Debug|x64.ActiveCfg = Debug|x64 {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}.Debug|x64.Build.0 = Debug|x64
{CA479467-D518-46A2-AC86-3098ADA99FE5}.Release|x64.ActiveCfg = Release|x64 {CA479467-D518-46A2-AC86-3098ADA99FE5}.Release|x64.ActiveCfg = Release|x64
{CA479467-D518-46A2-AC86-3098ADA99FE5}.Release|x64.Build.0 = 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.ActiveCfg = Debug|x64
{2B5533BB-04A1-424F-9BCA-1CA963B46B7F}.Debug|x64.Build.0 = 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.ActiveCfg = Release|x64
{2B5533BB-04A1-424F-9BCA-1CA963B46B7F}.Release|x64.Build.0 = 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.ActiveCfg = Debug|x64
{3FD6ACA9-E613-4FD6-BDA2-55A91C2CF65C}.Debug|x64.Build.0 = 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.ActiveCfg = Release|x64
{3FD6ACA9-E613-4FD6-BDA2-55A91C2CF65C}.Release|x64.Build.0 = 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.ActiveCfg = Debug|x64
{60D5E9F4-335F-402B-9A07-D78674DFFC9B}.Debug|x64.Build.0 = 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.ActiveCfg = Release|x64
{60D5E9F4-335F-402B-9A07-D78674DFFC9B}.Release|x64.Build.0 = 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.ActiveCfg = Debug|x64
{89F87459-768F-4638-9267-0F90CD74452D}.Debug|x64.Build.0 = 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.ActiveCfg = Release|x64
{89F87459-768F-4638-9267-0F90CD74452D}.Release|x64.Build.0 = 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.ActiveCfg = Debug|x64
{B49C6ABE-931C-4F91-9A94-21A41A305FEE}.Debug|x64.Build.0 = 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.ActiveCfg = Release|x64
{B49C6ABE-931C-4F91-9A94-21A41A305FEE}.Release|x64.Build.0 = 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.ActiveCfg = Debug|x64
{EE1A551A-49A0-40F2-8C2E-862D0AE55B43}.Debug|x64.Build.0 = 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.ActiveCfg = Release|x64
{EE1A551A-49A0-40F2-8C2E-862D0AE55B43}.Release|x64.Build.0 = 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.ActiveCfg = Debug|x64
{1994C586-F73B-4EF2-BA3E-2A0FC3034B1A}.Debug|x64.Build.0 = 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.ActiveCfg = Release|x64
{1994C586-F73B-4EF2-BA3E-2A0FC3034B1A}.Release|x64.Build.0 = 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.ActiveCfg = Debug|x64
{C07E495E-A16F-48FA-80E4-0296B5234F0B}.Debug|x64.Build.0 = 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.ActiveCfg = Release|x64
{C07E495E-A16F-48FA-80E4-0296B5234F0B}.Release|x64.Build.0 = 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.ActiveCfg = Debug|x64
{2394C586-F73B-4EF2-BA3E-2A0FC3034B1A}.Debug|x64.Build.0 = 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.ActiveCfg = Release|x64
{2394C586-F73B-4EF2-BA3E-2A0FC3034B1A}.Release|x64.Build.0 = 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.ActiveCfg = Debug|x64
{8544C599-F73B-4EF2-BA3E-2A0FC3034B1A}.Debug|x64.Build.0 = 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.ActiveCfg = Release|x64
{8544C599-F73B-4EF2-BA3E-2A0FC3034B1A}.Release|x64.Build.0 = 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.ActiveCfg = Debug|x64
{47181A1D-C22C-4C9C-B4E0-CB6CE886A1D8}.Debug|x64.Build.0 = 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.ActiveCfg = Release|x64
{47181A1D-C22C-4C9C-B4E0-CB6CE886A1D8}.Release|x64.Build.0 = Release|x64 {47181A1D-C22C-4C9C-B4E0-CB6CE886A1D8}.Release|x64.Build.0 = Release|x64
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {F5AD7464-338F-4150-9DDC-85AD115BA616} SolutionGuid = {F5AD7464-338F-4150-9DDC-85AD115BA616}
EndGlobalSection EndGlobalSection
EndGlobal EndGlobal
@@ -35,6 +35,8 @@ Stereo=1
Quick_Start=0 Quick_Start=0
#Disable the scrolling sound effect #Disable the scrolling sound effect
No_Scrolling_SFX=0 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") #Enhanced Stage Manager (sets a custom number of stages; "stage_manager" should be disabled in "components.ini")
#Number of stages (0 = disabled) #Number of stages (0 = disabled)
Enhanced_Stage_Manager=0 Enhanced_Stage_Manager=0
@@ -60,6 +62,8 @@ Hide_Volume=0
No_PV_UI=0 No_PV_UI=0
#Hide the watermark that's usually shown in PV viewing mode #Hide the watermark that's usually shown in PV viewing mode
Hide_PV_Watermark=0 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 #Set the card reader and network status icons -- 0=default, 1=hidden, 2=error, 3=OK, 4=partial OK
Status_Icons=0 Status_Icons=0
#Disable showing lyrics #Disable showing lyrics
@@ -212,6 +212,7 @@ ConfigOptionBase* optionsArray[] = {
new OptionMetaSpacer(8), new OptionMetaSpacer(8),
new OptionMetaSectionLabel(L"Stages/Songs"), 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 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"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), 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"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"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 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<LPCWSTR>({ 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<LPCWSTR>({ 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_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"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), 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),
+2 -2
View File
@@ -1192,8 +1192,8 @@ divagl_freeglut:
return true; return true;
divagl_novidia: divagl_novidia:
SkinnedMessageBox::Show(this, "Plugins: Novidia and ShaderPatch must be disabled if DivaGL is enabled.", "PD Launcher", MessageBoxButtons::OK, MessageBoxIcon::Error); 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; return true;
divagl_divaimguiold: 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); 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);
@@ -161,12 +161,18 @@ class PatchApplier600 : public PatchApplier {
printf("[Patches] Cursor enabled\n");*/ printf("[Patches] Cursor enabled\n");*/
} }
// Override status icon states to be invalid (hides them) // Override status icon states to be invalid (hides them)
if (nStatusIcons > 0) if (nHideStatusIcons || nStatusIcons > 0)
{ {
std::vector<uint8_t> cardIcon = { 0xFD, 0x0A }; std::vector<uint8_t> cardIcon = { 0xFD, 0x0A };
std::vector<uint8_t> networkIcon = { 0x9E, 0x1E }; std::vector<uint8_t> 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 }; cardIcon = { 0xFA, 0x0A };
networkIcon = { 0x9F, 0x1E }; networkIcon = { 0x9F, 0x1E };
@@ -184,12 +190,6 @@ class PatchApplier600 : public PatchApplier {
networkIcon = { 0xA1, 0x1E }; networkIcon = { 0xA1, 0x1E };
printf("[Patches] Status icons set to partial OK state\n"); 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 // card icon
InjectCode((void*)0x00000001403A0C9E, cardIcon); // error state InjectCode((void*)0x00000001403A0C9E, cardIcon); // error state
@@ -180,12 +180,18 @@ class PatchApplier710 : public PatchApplier {
printf("[Patches] Cursor enabled\n"); printf("[Patches] Cursor enabled\n");
} }
// Override status icon states to be invalid (hides them) // Override status icon states to be invalid (hides them)
if (nStatusIcons > 0) if (nHideStatusIcons || nStatusIcons > 0)
{ {
std::vector<uint8_t> cardIcon = { 0xFD, 0x0A }; std::vector<uint8_t> cardIcon = { 0xFD, 0x0A };
std::vector<uint8_t> networkIcon = { 0x9E, 0x1E }; std::vector<uint8_t> 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 }; cardIcon = { 0xFA, 0x0A };
networkIcon = { 0x9F, 0x1E }; networkIcon = { 0x9F, 0x1E };
@@ -203,12 +209,6 @@ class PatchApplier710 : public PatchApplier {
networkIcon = { 0xA1, 0x1E }; networkIcon = { 0xA1, 0x1E };
printf("[Patches] Status icons set to partial OK state\n"); 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 // card icon
InjectCode((void*)0x00000001403B9D6E, cardIcon); // error state InjectCode((void*)0x00000001403B9D6E, cardIcon); // error state
+117 -113
View File
@@ -1,114 +1,118 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations"> <ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|x64"> <ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration> <Configuration>Debug</Configuration>
<Platform>x64</Platform> <Platform>x64</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Release|x64"> <ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration> <Configuration>Release</Configuration>
<Platform>x64</Platform> <Platform>x64</Platform>
</ProjectConfiguration> </ProjectConfiguration>
</ItemGroup> </ItemGroup>
<PropertyGroup Label="Globals"> <PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion> <VCProjectVersion>16.0</VCProjectVersion>
<ProjectGuid>{3FD6ACA9-E613-4FD6-BDA2-55A91C2CF65C}</ProjectGuid> <ProjectGuid>{3FD6ACA9-E613-4FD6-BDA2-55A91C2CF65C}</ProjectGuid>
<Keyword>Win32Proj</Keyword> <Keyword>Win32Proj</Keyword>
<RootNamespace>Patches</RootNamespace> <RootNamespace>Patches</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion> <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType> <ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries> <UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset> <PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType> <ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset> <PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings"> <ImportGroup Label="ExtensionSettings">
</ImportGroup> </ImportGroup>
<ImportGroup Label="Shared"> <ImportGroup Label="Shared">
</ImportGroup> </ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<PropertyGroup Label="UserMacros" /> <PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental> <LinkIncremental>false</LinkIncremental>
<TargetExt>.dva</TargetExt> <TargetExt>.dva</TargetExt>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental> <LinkIncremental>true</LinkIncremental>
<TargetExt>.dva</TargetExt> <TargetExt>.dva</TargetExt>
</PropertyGroup> </PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile> <ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader> <PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck> <SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;PATCHES_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>NDEBUG;PATCHES_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode> <ConformanceMode>true</ConformanceMode>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile> <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<LanguageStandard>stdcpp17</LanguageStandard> <LanguageStandard>stdcpp17</LanguageStandard>
<AdditionalIncludeDirectories>..\..\..\dependencies\PluginConfigApi;..\..\..\dependencies\freeglut\include;..\..\..\dependencies\freeglut\include;..\..\..\dependencies\detours\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\..\..\dependencies\PluginConfigApi;..\..\..\dependencies\freeglut\include;..\..\..\dependencies\freeglut\include;..\..\..\dependencies\detours\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<AdditionalOptions>-d2FH4- %(AdditionalOptions)</AdditionalOptions> <AdditionalOptions>-d2FH4- %(AdditionalOptions)</AdditionalOptions>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding> <EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<EnableUAC>false</EnableUAC> <EnableUAC>false</EnableUAC>
<AdditionalLibraryDirectories>..\..\..\dependencies\detours\lib;..\..\..\dependencies\freeglut\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>..\..\..\dependencies\detours\lib;..\..\..\dependencies\freeglut\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalOptions>-d2:-FH4- %(AdditionalOptions)</AdditionalOptions> <AdditionalOptions>-d2:-FH4- %(AdditionalOptions)</AdditionalOptions>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile> <ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader> <PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck> <SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;PATCHES_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_DEBUG;PATCHES_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode> <ConformanceMode>true</ConformanceMode>
<PrecompiledHeaderFile> <PrecompiledHeaderFile>
</PrecompiledHeaderFile> </PrecompiledHeaderFile>
<AdditionalIncludeDirectories>..\..\..\dependencies\PluginConfigApi;..\..\..\dependencies\freeglut\include;..\..\..\dependencies\freeglut\include;..\..\..\dependencies\detours\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\..\..\dependencies\PluginConfigApi;..\..\..\dependencies\freeglut\include;..\..\..\dependencies\freeglut\include;..\..\..\dependencies\detours\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<LanguageStandard>stdcpp17</LanguageStandard> <LanguageStandard>stdcpp17</LanguageStandard>
<AdditionalOptions>-d2FH4- %(AdditionalOptions)</AdditionalOptions> <AdditionalOptions>-d2FH4- %(AdditionalOptions)</AdditionalOptions>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<EnableUAC>false</EnableUAC> <EnableUAC>false</EnableUAC>
<AdditionalLibraryDirectories>..\..\..\dependencies\detours\lib;..\..\..\dependencies\freeglut\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>..\..\..\dependencies\detours\lib;..\..\..\dependencies\freeglut\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalOptions>-d2:-FH4- %(AdditionalOptions)</AdditionalOptions> <AdditionalOptions>-d2:-FH4- %(AdditionalOptions)</AdditionalOptions>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="dllmain.cpp" /> <ClCompile Include="databank.cpp" />
</ItemGroup> <ClCompile Include="dllmain.cpp" />
<ItemGroup> </ItemGroup>
<ClInclude Include="framework.h" /> <ItemGroup>
<ClInclude Include="PatchApplier.h" /> <ClInclude Include="databank.h" />
<ClInclude Include="PatchApplier600.h" /> <ClInclude Include="framework.h" />
<ClInclude Include="PatchApplier710.h" /> <ClInclude Include="PatchApplier.h" />
</ItemGroup> <ClInclude Include="PatchApplier600.h" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ClInclude Include="PatchApplier710.h" />
<ImportGroup Label="ExtensionTargets"> <ClInclude Include="storage.h" />
</ImportGroup> <ClInclude Include="urlutil.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project> </Project>
@@ -1,36 +1,48 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup> <ItemGroup>
<Filter Include="Source Files"> <Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter> </Filter>
<Filter Include="Header Files"> <Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions> <Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions>
</Filter> </Filter>
<Filter Include="Resource Files"> <Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier> <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions> <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter> </Filter>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="dllmain.cpp"> <ClCompile Include="dllmain.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
</ItemGroup> <ClCompile Include="databank.cpp">
<ItemGroup> <Filter>Source Files</Filter>
<ClInclude Include="framework.h"> </ClCompile>
<Filter>Header Files</Filter> </ItemGroup>
</ClInclude> <ItemGroup>
<ClInclude Include="PatchApplier.h"> <ClInclude Include="framework.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="PatchApplier600.h"> <ClInclude Include="PatchApplier.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="PatchApplier710.h"> <ClInclude Include="PatchApplier600.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
</ItemGroup> <ClInclude Include="PatchApplier710.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="databank.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="storage.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="urlutil.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project> </Project>
@@ -0,0 +1,137 @@
#include <iostream>
#include <fstream>
#include <sstream>
#include "databank.h"
#include "urlutil.h"
namespace Databank
{
bool PvList::readFromStr(std::string& str)
{
std::string decoded = urlDecode(urlDecode(str));
std::vector<std::string> 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<char>(file)), std::istreambuf_iterator<char>());
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);
}
}
}
@@ -0,0 +1,39 @@
#pragma once
#include <chrono>
#include <set>
#include <vector>
#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<PvEntry> 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();
};
}
+60 -4
View File
@@ -7,13 +7,16 @@
#include <filesystem> #include <filesystem>
#include <sstream> #include <sstream>
#include <iomanip> #include <iomanip>
#include <regex>
#include <detours.h>
#include "PluginConfigApi.h" #include "PluginConfigApi.h"
#include "PatchApplier.h" #include "PatchApplier.h"
#include "PatchApplier600.h" #include "PatchApplier600.h"
#include "PatchApplier710.h" #include "PatchApplier710.h"
#include <detours.h>
#include "framework.h" #include "framework.h"
#include "storage.h"
#include "databank.h"
#pragma comment(lib, "detours.lib") #pragma comment(lib, "detours.lib")
unsigned short game_version = 710; unsigned short game_version = 710;
@@ -22,7 +25,9 @@ void InjectCode(void* address, const std::vector<uint8_t> data);
void ApplyPatches(); void ApplyPatches();
void ApplyCustomPatches(std::wstring CPATCH_FILE_STRING); 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; HMODULE *hModulePtr;
@@ -98,6 +103,11 @@ void ApplyPatches() {
std::cout << "[Patches] All custom patches applied\n"; 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; if (echo) std::cout << std::endl;
else if (comment_string.length() > 0) else if (comment_string.length() > 0)
{ {
std::cout << "[Patches]";; std::cout << "[Patches]";
if (comment_string.at(0) != ' ') std::cout << ' '; if (comment_string.at(0) != ' ') std::cout << ' ';
std::cout << comment_string << std::endl; std::cout << comment_string << std::endl;
} }
@@ -254,6 +264,52 @@ void ApplyCustomPatches(std::wstring CPATCH_FILE_STRING)
fileStream.close(); 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; using namespace PluginConfig;
@@ -3,6 +3,14 @@
#include <string> #include <string>
#include <vector> #include <vector>
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) std::string TrimString(const std::string& str, const std::string& whitespace)
{ {
const size_t strBegin = str.find_first_not_of(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 nHideFreeplay = GetPrivateProfileIntW(L"patches", L"hide_freeplay", FALSE, CONFIG_FILE);
auto nFreeplay = GetPrivateProfileIntW(L"patches", L"freeplay", TRUE, CONFIG_FILE); auto nFreeplay = GetPrivateProfileIntW(L"patches", L"freeplay", TRUE, CONFIG_FILE);
auto nPDLoaderText = GetPrivateProfileIntW(L"patches", L"pdloadertext", 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 nStatusIcons = GetPrivateProfileIntW(L"patches", L"status_icons", 0, CONFIG_FILE);
auto nHidePVWatermark = GetPrivateProfileIntW(L"patches", L"hide_pv_watermark", FALSE, 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); 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 nNoError = GetPrivateProfileIntW(L"patches", L"no_error", FALSE, CONFIG_FILE);
auto nNoTimer = GetPrivateProfileIntW(L"patches", L"no_timer", TRUE, 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 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 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 nEStageManagerEncore = GetPrivateProfileIntW(L"patches", L"enhanced_stage_manager_encore", TRUE, CONFIG_FILE);
auto nUnlockPseudo = GetPrivateProfileIntW(L"patches", L"unlock_pseudo", FALSE, CONFIG_FILE); auto nUnlockPseudo = GetPrivateProfileIntW(L"patches", L"unlock_pseudo", FALSE, CONFIG_FILE);
@@ -0,0 +1,46 @@
#pragma once
#include <cstdint>
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;
}
}
};
@@ -0,0 +1,56 @@
#pragma once
#include <string>
#include <sstream>
#include <iomanip>
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<char>(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<int>(c);
}
}
return escaped.str();
}