58 Commits
Author SHA1 Message Date
nastys ef43d22686 Auto Databank: support Extra Extreme 2025-05-01 12:52:26 +02:00
nastys 6ba220cc29 Add Blackwell and Volta info 2025-05-01 12:50:14 +02:00
nastys b20fc255dc Optimize Auto Databank code 2025-03-05 21:49:41 +01:00
nastys cf26061123 Auto Databank, hide status icons checkbox 2025-03-05 20:11:49 +01:00
korenkonder 3d422e4743 [ShaderPatch] Fix for Toon_Lines_Improve 2025-01-11 22:50:53 +01:00
nastys a4216507d6 [ShaderPatch] GB = NVIDIA Blackwell 2025-01-08 20:18:47 +01:00
nastys 4fc2af2878 Update reflection resolution options 2024-09-23 08:38:30 +02:00
hiki8man 87d453081b Update DualShock4.h
add HORI HATSUNE MIKU 39S CONTROLLER guid to suooprt switch hori controller
2024-08-04 14:26:11 +02:00
nastys 158c90ef84 Merge pull request #17 from korenkonder/dev
[TLAC]: Pause patches. Fix of stuff moving 1 frame after pause
2024-05-01 21:46:59 +02:00
korenkonder a766413a5d [TLAC]: Pause patches. Fix of stuff moving 1 frame after pause 2024-05-01 22:28:30 +03:00
nastys 430e650d0d Improve GPU checks 2024-04-23 19:08:28 +02:00
nastys be29f090f3 Update and move DivaGL plugin conflict checks to launcher 2024-04-10 20:00:12 +02:00
nastys c6ceb61636 Attempt to fix DivaGL detection code crashing 2024-03-30 22:14:38 +01:00
nastys 232ac31190 DivaGL, glut32, and conflict detection in Launcher 2024-03-30 21:07:17 +01:00
nastys eb6964d0b9 Launcher DivaGL detection fixes 2024-03-29 05:40:08 +01:00
nastys b6fc62bbf1 Change DivaGL detection method, fix non_nv_name 2024-03-26 20:16:40 +01:00
nastys 2c10f27ab0 DivaGL detection, Ada Lovelace "support" 2024-03-26 00:25:30 +01:00
nastys 360305357b Fix lag compensation triggering ConfigChanged every time 2024-03-20 22:37:47 +01:00
nastys 26c6dc76c7 Merge pull request #16 from korenkonder/dev
Fixed -wqhd behaviour for 7.10 and restored old behaviour for 6.00
2024-03-19 14:27:08 +01:00
korenkonder b746ddf001 Fixed -wqhd behaviour for 7.10 and restored old behaviour for 6.00 2024-03-19 16:23:03 +03:00
nastys 4cfd925af4 Merge pull request #15 from korenkonder/dev
Fixed Auth3D not appearing when disabling Reflections
2024-03-19 13:38:27 +01:00
korenkonder d70e20496a Fixed Auth3D not appearing when disabling Reflections 2024-03-19 15:35:09 +03:00
somewhatlurker 0b7083edad new hook for UpdateDraw2D (should be compatible with DivaGL) 2024-02-04 01:21:18 +11:00
nastys 60958cc3c1 Cleanup 2024-02-03 13:48:22 +01:00
nastys 3b6bd03c49 Render.dva: don't force WQHD 2024-02-03 13:46:52 +01:00
nastys d7dfc57192 Warn when using AMD driver > 22.6.x 2022-07-27 23:35:58 +02:00
nastys af017ecc4e Update appveyor.yml 2022-07-10 23:43:53 +02:00
nastys 902f0c3421 Update appveyor.yml 2022-07-10 23:37:11 +02:00
nastys 501bb2de61 Merge pull request #7 from TinkoLiu/dev
[TLAC] DIVALLER WinUSB mode support
2022-06-25 16:28:53 +02:00
Tinko Liu f498fee877 chore: format code 2022-06-25 17:25:45 +08:00
Tinko Liu 5a72210023 [TLAC]: add DIVALLER binding 2022-06-25 17:19:54 +08:00
Tinko Liu 49c69de847 [TLAC]: add DIVALLER support 2022-06-25 17:17:00 +08:00
Tinko Liu 5652879f74 [TLAC]: add WinUSB as dependency 2022-06-25 17:13:29 +08:00
nastys 0a3b41977e Add shadow res option (thanks to koren), move databank, remove legacy options 2022-05-21 18:03:21 +02:00
nastys 057a267fe8 [Launcher] Specific warning for AMD 21.5 2022-05-14 12:59:57 +02:00
nastys ede1039f43 Replace databank with korenkonder's 2022-05-07 21:31:26 +02:00
nastys 2bac4de81d [DivaMovie] Clarify DXVA message 2022-05-07 19:14:53 +02:00
nastys 74e2c9a31d Fix Turing GPU typo 2022-05-07 18:39:32 +02:00
nastys 25a2a5f6f6 [TLAC] Backport wireframe and extra keyboard bindings 2022-05-07 18:28:42 +02:00
nastys 1c026e2661 Update repo URL 2022-01-27 14:00:28 +01:00
nastys bef5d481a5 Launcher hotfix 2021-11-10 22:47:21 +01:00
nastys ea159ed465 Update mdata SFV 2021-10-27 18:14:45 +02:00
nastys 8b5b514368 2.6.5a: [DivaMovie] Change "hardware decoding" to "hybrid decoding" to avoid confusion 2021-10-08 12:34:17 +02:00
nastys 66db5deb2b 2.6.5a: Fix PlayerData, auto-disable DivaMovie if DXVA-HW is available (unless forced - fixes random black backgrounds) 2021-10-07 23:10:40 +02:00
nastys e8c2ac672a 2.6.5a: DivaMovie enabled by default again, but warns the user if it should be disabled 2021-10-07 19:04:48 +02:00
nastys 7df98ea648 2.6.5: macOS and Linux fixes, fix refl/refr patches 2021-10-07 16:31:11 +02:00
nastys 162cc52c6b 2.6.4: forgot to move termination byte (oops) 2021-09-29 19:29:03 +02:00
nastys c2343f79f2 2.6.4: PD Loader version text fix 2021-09-29 19:24:07 +02:00
nastys ea968b1762 2.6.4: replace refl/refr default option with 512x256 and restore uint type 2021-09-29 19:13:21 +02:00
nastys 4149a3c8e9 2.6.3: fix reflect/refract data type pt3 2021-09-29 19:05:08 +02:00
nastys d8693781ba 2.6.3: fix reflect/refract data type pt2 2021-09-29 19:03:57 +02:00
nastys 49e2b03159 2.6.2: fix reflect/refract data type 2021-09-29 19:01:44 +02:00
nastys bc925fd514 2.6.2: maximum hand size 100X, pv customization toggle, fix typo in Credits, option for disabling custom refract/refrect res, version in-game 2021-09-29 18:13:11 +02:00
nastys b511bf64c3 2.6b: fix display resolution combobox 2021-09-23 22:13:40 +02:00
nastys db159fde81 2.6a: bug fixes 2021-09-23 00:28:00 +02:00
nastys 4ebc4b3f85 2.6: start.bat, quick start warning, fully fix hand size, gamma control, fix coin, customizable toon key, rumble intensity, error 998 explaination, divawig enum, launcher option tab cleanup, gpu driver version detection, precise lag compensation, 7.10 check 2021-09-20 22:12:41 +02:00
nastys f93dab0b9a (2.5.3) Fix hand size 2021-09-04 23:18:23 +02:00
nastys eb17a30a06 (2.5.2) Fix manual Turing GPU; work around hand size upgrade error 2021-09-04 20:34:52 +02:00
70 changed files with 11725 additions and 26912 deletions
+63 -63
View File
@@ -1,63 +1,63 @@
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto
###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs diff=csharp
###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary
###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg binary
#*.png binary
#*.gif binary
###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc diff=astextplain
#*.DOC diff=astextplain
#*.docx diff=astextplain
#*.DOCX diff=astextplain
#*.dot diff=astextplain
#*.DOT diff=astextplain
#*.pdf diff=astextplain
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* binary
###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs diff=csharp
###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary
###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg binary
#*.png binary
#*.gif binary
###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc diff=astextplain
#*.DOC diff=astextplain
#*.docx diff=astextplain
#*.DOCX diff=astextplain
#*.dot diff=astextplain
#*.DOT diff=astextplain
#*.pdf diff=astextplain
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain
+4 -1
View File
@@ -1,3 +1,6 @@
._*
.DS_Store
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
@@ -341,4 +344,4 @@ healthchecksdb
# Exclude data folder
!data/*
!data/debug/*
!data/debug/*
+2 -2
View File
@@ -15000,8 +15000,8 @@ source code}{}}}\rtlch\dbch\af8\hich\af5 \ltrch\fs22\lang16\ulnone\ulc0\b0\loch\
\par \pard\plain \s0\dbch\af6\langfe1081\dbch\af7\afs24\alang1081\ql\nowidctlpar\hyphpar0\ltrpar\cf0\loch\f3\fs24\lang1040\kerning1\sl276\slmult1\ql\sb0\sa200{\rtlch\dbch\af8\hich\af5 \ltrch\fs22\lang16\ulnone\ulc0\b0\loch\f5\loch
For information on getting and installing the latest release,}
\par \pard\plain \s0\dbch\af6\langfe1081\dbch\af7\afs24\alang1081\ql\nowidctlpar\hyphpar0\ltrpar\cf0\loch\f3\fs24\lang1040\kerning1\sl276\slmult1\ql\sb0\sa200{\rtlch\dbch\af8\hich\af5 \ltrch\fs22\lang16\ulnone\ulc0\b0\loch\f5\loch
please read the wiki at }{{\field{\*\fldinst HYPERLINK "https://notabug.org/PDModdingCommunity/PD-Loader/wiki" }{\fldrslt {\rtlch\dbch\af8\hich\af5 \ltrch\langfe255\cf9\lang255\ul\ulc0\fs22\lang16\ulnone\ulc0\b0\loch\f5\loch
https://notabug.org/PDModdingCommunity/PD-Loader/wiki}}}}
please read the wiki at }{{\field{\*\fldinst HYPERLINK "https://github.com/PDModdingCommunity/PD-Loader/wiki" }{\fldrslt {\rtlch\dbch\af8\hich\af5 \ltrch\langfe255\cf9\lang255\ul\ulc0\fs22\lang16\ulnone\ulc0\b0\loch\f5\loch
https://github.com/PDModdingCommunity/PD-Loader/wiki}}}}
\par \pard\plain \s0\dbch\af6\langfe1081\dbch\af7\afs24\alang1081\ql\nowidctlpar\hyphpar0\ltrpar\cf0\loch\f3\fs24\lang1040\kerning1\sl276\slmult1\ql\sb0\sa200{\rtlch\dbch\af8\hich\af5 \ltrch\fs22\lang16\ulnone\ulc0\b0\loch\f5\loch
If you've already read it, pay more attention and you'll find the right link.}
\par \pard\plain \s0\dbch\af6\langfe1081\dbch\af7\afs24\alang1081\ql\nowidctlpar\hyphpar0\ltrpar\cf0\loch\f3\fs24\lang1040\kerning1\sl276\slmult1\ql\sb0\sa200\rtlch\dbch\af8\hich\af5 \ltrch\fs22\lang16\ulnone\ulc0\b0\loch\f5\loch
+1 -1
View File
@@ -3,7 +3,7 @@ If you just wanted to play the game, you downloaded the wrong thing.
Do not click the download button next to the git URL, that's for the source code.
For information on getting and installing the latest release,
please read the wiki at https://notabug.org/nastys/PD-Loader/wiki
please read the wiki at https://github.com/nastys/PD-Loader/wiki
If you've already read it, pay more attention and you'll find the right link.
You should also read the wiki if you have any issues, before asking questions.
+2 -8
View File
@@ -18,7 +18,7 @@ after_build:
md %TMP%\full\ram\
md %TMP%\full\ram\databank_template\
md %TMP%\full\ram\databank_template_v2\
@@ -30,19 +30,13 @@ after_build:
copy %APPVEYOR_BUILD_FOLDER%\source-code\data\verify_base_game.sfv %TMP%\full\
copy %APPVEYOR_BUILD_FOLDER%\source-code\data\verify_base_game.md5 %TMP%\full\
copy %APPVEYOR_BUILD_FOLDER%\source-code\data\verify_mount_data.sfv %TMP%\full\
copy %APPVEYOR_BUILD_FOLDER%\source-code\data\verify_mount_data.md5 %TMP%\full\
copy %APPVEYOR_BUILD_FOLDER%\source-code\data\glut32.dll %TMP%\full\
copy %APPVEYOR_BUILD_FOLDER%\source-code\data\plugins\*.* %TMP%\full\plugins\
copy "%APPVEYOR_BUILD_FOLDER%\source-code\data\plugins\Novidia Shaders\*.*" "%TMP%\full\plugins\Novidia Shaders\"
copy %APPVEYOR_BUILD_FOLDER%\source-code\data\ram\databank_template\*.dat %TMP%\full\ram\databank_template\
copy %APPVEYOR_BUILD_FOLDER%\source-code\data\ram\databank_template_v2\*.dat %TMP%\full\ram\databank_template_v2\
copy %APPVEYOR_BUILD_FOLDER%\source-code\data\patches\custom_freeplay_text_example.p %TMP%\full\patches\
+91 -91
View File
@@ -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
@@ -0,0 +1,2 @@
[InternetShortcut]
URL=https://dotnet.microsoft.com/download/dotnet-framework/net48
+2
View File
@@ -0,0 +1,2 @@
[InternetShortcut]
URL=https://www.quicksfv.org/qsfv236x64.exe
@@ -0,0 +1,2 @@
[InternetShortcut]
URL=https://aka.ms/vs/16/release/vc_redist.x64.exe
+1 -1
View File
@@ -2,5 +2,5 @@
Prop3=19,11
[InternetShortcut]
IDList=
URL=https://notabug.org/PDModdingCommunity/PD-Loader/wiki
URL=https://github.com/PDModdingCommunity/PD-Loader/wiki
HotKey=0
Binary file not shown.
+16 -12
View File
@@ -25,25 +25,28 @@ Toon_Hair_Improve=0
Toon_Hair_Improve_Val1=1.25
# Lyb's toon shader improvements (24 sept 2019)
# Fixes by korenkonder (11 jan 2025)
# Toon_Lines_Improve: Adjusts toon shader outlines
Toon_Lines_Improve=0
# ???
Toon_Lines_Improve_Val1=0.75
# Thickness Multiplier(?)
Toon_Lines_Improve_Val2=0.75
# Thickness Offset(?)
Toon_Lines_Improve_Val3=0.75
# Skin Shadow Strength
Toon_Lines_Improve_Val1=0.05
# Skin Outline Strength
Toon_Lines_Improve_Val2=0.9
# Outline Strength Multiplier
Toon_Lines_Improve_Val3=0.7
# Outline Strength Offset
Toon_Lines_Improve_Val4=0.25
[Patches]
# Compatibility patches:
# Star Story (and etc.) stage corruption (Maxwell+)
blinn_per_vert\.0010010[23]00[01]\.fp=arch:GA,TU,GP,GV,GM||cfg:compat||from:TEX tex_col, a_tex_color0, texture\[0\], 2D; ALIAS||to:TEX tex_col, a_tex_color0, texture[0], 2D; MUL tex_col, 1, tex_col; ALIAS
blinn_per_vert\.0010010[23]00[01]\.fp=arch:GB,AD,GA,GV,TU,GP,GM||cfg:compat||from:TEX tex_col, a_tex_color0, texture\[0\], 2D; ALIAS||to:TEX tex_col, a_tex_color0, texture[0], 2D; MUL tex_col, 1, tex_col; ALIAS
# Turing shading lines (new patch by samyuu, hopefully ported to here correctly)
.*=arch:GA,TU||cfg:compat||from:SHORT ||to:
.*=arch:GB,AD,GA,GV,TU||cfg:compat||from:SHORT ||to:
# Turing NPR cloth noise
cloth_npr1.*=arch:GA,TU||cfg:compat||from:SSG _tmp0.yw, ybr.xxzz;||to:TEMP _tmpForSSG; SGE _tmpForSSG.xz, ybr.xxzz, 0; SUB _tmpForSSG.xz, _tmpForSSG.xxzz, 1; SGT _tmpForSSG.yw, ybr.xxzz, 0; ADD _tmp0.yw, _tmpForSSG.xxzz, _tmpForSSG.yyww;
cloth_npr1.*=arch:GB,AD,GA,GV,TU||cfg:compat||from:SSG _tmp0.yw, ybr.xxzz;||to:TEMP _tmpForSSG; SGE _tmpForSSG.xz, ybr.xxzz, 0; SUB _tmpForSSG.xz, _tmpForSSG.xxzz, 1; SGT _tmpForSSG.yw, ybr.xxzz, 0; ADD _tmp0.yw, _tmpForSSG.xxzz, _tmpForSSG.yyww;
# Turing auto-exposure fix by samyuu
stage_blinn.*\.fp=arch:GA,TU||cfg:compat||from:NRMH normal, a_normal;||to:NRM normal, a_normal;
stage_blinn.*\.fp=arch:GB,AD,GA,GV,TU||cfg:compat||from:NRMH normal, a_normal;||to:NRM normal, a_normal;
# Lyb's toon shader improvements:
cloth_npr1.*=cfg:toon_improve||from:MAD tmp.y, lc.z, 1.2, -0.5;||to:MAD tmp.y, lc.z, <val1>, <val2>;
@@ -51,8 +54,9 @@ skin_default.*=cfg:toon_improve||from:MAD diff.xyz, spec, spec_ratio, diff;||to:
.*eye.*=cfg:toon_eyes_improve||from:ADD o_color_f0.w, diff.x, diff.y;||to:
.*eye.*=cfg:toon_eyes_improve||from:ADD result.color.w, diff.x, diff.y;||to:
hair_npr1.*=cfg:toon_hair_improve||from:MUL spec.x, tmp.x, 0.7;||to:MUL spec.x, tmp.x, 0.7; MUL diff, diff, <val1>;
tone_map_npr1.*=cfg:toon_lines_improve||from:MUL density.y, density.y, 0.25;||to:MUL density.y, density.y, <val1>;
tone_map_npr1.*=cfg:toon_lines_improve||from:MAD density.w, density.x, 0.7, 0.25;||to:MAD density.w, density.x, <val2>, <val3>;
tone_map_npr1.*=cfg:toon_lines_improve||from:MUL density.y, density.y, 0.05;||to:MUL density.y, density.y, <val1>;
tone_map_npr1.*=cfg:toon_lines_improve||from:MUL density.y, density.y, 0.9;||to:MUL density.y, density.y, <val2>;
tone_map_npr1.*=cfg:toon_lines_improve||from:MAD density.w, density.x, 0.7, 0.25;||to:MAD density.w, density.x, <val3>, <val4>;
# Intel related patches
(?:movie|sprite|imgfilter).*=cfg:intel||from:; ||to:;\n
@@ -22,14 +22,17 @@ Toon_Hair_Improve=0
Toon_Hair_Improve_Val1=1.25
# Lyb's toon shader improvements (24 sept 2019)
# Fixes by korenkonder (11 jan 2025)
# Toon_Lines_Improve: Adjusts toon shader outlines
Toon_Lines_Improve=0
# ???
Toon_Lines_Improve_Val1=0.75
# Thickness Multiplier(?)
Toon_Lines_Improve_Val2=0.75
# Thickness Offset(?)
Toon_Lines_Improve_Val3=0.75
# Skin Shadow Strength
Toon_Lines_Improve_Val1=0.05
# Skin Outline Strength
Toon_Lines_Improve_Val2=0.9
# Outline Strength Multiplier
Toon_Lines_Improve_Val3=0.7
# Outline Strength Offset
Toon_Lines_Improve_Val4=0.25
# Debug patches:
# Nametags
+154 -154
View File
@@ -1,154 +1,154 @@
#########################################
# /!\ WARNING: DO NOT EDIT WITH NOTEPAD!#
#########################################
[Global]
# Load plugins including below options
Enable=1
[GPU]
# Force GPU model -- -1=auto, 0=Kepler, 1=Maxwell, 2=Turing, 3=Ampere
Model=-1
[Launcher]
# Forces the launcher to be skipped, you can use the --launch parameter instead of this.
Skip=0
# Disables unsupported GPU warning dialogs.
No_GPU_Dialog=0
# Sets the dark colour scheme in the launcher.
Dark_Launcher=0
# Enables acrylic blur in the launcher on Windows 10 20H2 or later.
Acrylic_Blur=0
#Ignores some OpenGL-related errors. Don't use both patches at the same time unless you're know what you're doing
OpenGL_Patch_A=0
#Ignores some OpenGL-related errors. Don't use both patches at the same time unless you're know what you're doing
OpenGL_Patch_B=0
# Command line arguments
Command_Line=
# Launches divahook.bat intead of diva.exe.
Use_divahook_bat=0
[Patches]
#Disable movies (enable this if the game hangs when loading certain PVs)
No_Movies=0
#Enable custom MP4 adv movies (experimental)
MP4_Movies=1
#Enable or disable mouse cursor
Cursor=1
#Use 2 channels instead of 4 (when not using DivaSound)
Stereo=1
#Skip one or more menus -- 0=disabled, 1=guest, 2=guest+normal
Quick_Start=1
#Disable the scrolling sound effect
No_Scrolling_SFX=0
#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
#Use encore stages or not
Enhanced_Stage_Manager_Encore=1
#Change the mouth animations -- 0=default, 1=force PDA, 2=force FT
Force_Mouth=0
#Change the expressions -- 0=default, 1=force PDA, 2=force FT
Force_Expressions=0
#Change the look animations -- 0=default, 1=force PDA, 2=force FT
Force_Look=0
#Disable hand scaling
No_Hand_Scaling=0
#Default hand size -- -1=default, 12200=PDA
Default_Hand_Size=-1
#Sing missed notes
Sing_Missed=0
#Hide the volume and SE control buttons
Hide_Volume=0
#Remove the photo controls during PV playback
No_PV_UI=0
#Hide the watermark that's usually shown in PV viewing mode
Hide_PV_Watermark=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
No_Lyrics=0
#Disable the error banner
No_Error=1
#Hide "CREDIT(S)"/"FREE PLAY"
Hide_Freeplay=0
#Show "FREE PLAY" instead of "CREDIT(S)" and don't require credits
Freeplay=1
#Show "PD Loader" instead of "FREE PLAY"
PDLoaderText=1
#Freeze the timer
No_Timer=1
#Disable the timer sprite
No_Timer_Sprite=1
#Unlock PSEUDO modules (incomplete, will default to Miku)
Unlock_Pseudo=0
#Enable the card menu (incomplete, it doesn't bypass the card prompt)
Card=0
#Allow using a real arcade slider attached to COM11 (or PS4 official FT controller)
Hardware_Slider=0
#Enable custom patches
Custom_Patches=1
#Prevent data deletion
Prevent_Data_Deletion=0
[Graphics]
# Lag Compensation
Lag_Compensation = 0
# Set to -1 to unlock the frame rate.
FPS.Limit=60
# Reduces FPS Limiter CPU usage
# (may have less consistent performance)
FPS.Limit.LightMode=1
# Enable debug warnings for lightweight limiter
FPS.Limit.Verbose=0
# Temporal Anti-Aliasing
TAA=1
# Morphological Anti-Aliasing
MLAA=1
# MAG Filter -- 0=default (bilinear), 1=nearest-neighbour, 2=sharpen, 3=cone (smooth)
MAG=0
# Depth of Field
DOF=1
# Reflections
Reflections=1
# Shadows
Shadows=1
# Transparent Meshes
Punchthrough=1
# Glare
Glare=1
# Shader
Shader=1
# Toon shader (press F9 to toggle) -- 0=default, 1=force on, 2=force off
NPR1=0
# Disable all 3D passes. WARNING: The extended data will be deleted unless Prevent Data Deletion is enabled.
2D=0
# FrameRateManager motion rate (fps)
FRM.Motion.Rate=400
[Resolution]
# 0 = Windowed, 1 = Fast, 2 = Exclusive, 3 = Safe
# For same as screen res: -1x-1
Display=1
Width=-1
Height=-1
# Fullscreen only options
BitDepth=32
RefreshRate=60
# Set a custom internal render resolution
# Same as window: -1x-1
# HD : 1280x720
# FHD : 1920x1080
# WQHD : 2560x1440
# 4K UHD: 3840x2160
# 5K UHD: 5120x2880
# 8K UHD: 7680x4320
r.Enable=0
r.Width=1920
r.Height=1080
[plugins]
DivaWig.dva=0
DSCRemote.dva=0
custom_freeplay_text_example.p=0
#########################################
# /!\ WARNING: DO NOT EDIT WITH NOTEPAD!#
#########################################
[Global]
# Load plugins including below options
Enable=1
[GPU]
# Force GPU model -- -1=auto, 0=Kepler, 1=Maxwell/Pascal, 2=Turing, 3=Ampere, 4=Ada Lovelace, 5=Blackwell
Model=-1
[Launcher]
# Forces the launcher to be skipped, you can use the --launch parameter instead of this.
Skip=0
# Disables unsupported GPU warning dialogs.
No_GPU_Dialog=0
# Sets the dark colour scheme in the launcher.
Dark_Launcher=0
# Command line arguments
Command_Line=
# Launches divahook.bat/start.bat intead of diva.exe.
Use_divahook_bat=0
[Patches]
#Disable movies (enable this if the game hangs when loading certain PVs)
No_Movies=0
#Enable custom MP4 adv movies (experimental)
MP4_Movies=1
#Enable or disable mouse cursor
Cursor=1
#Use 2 channels instead of 4 (when not using DivaSound)
Stereo=1
#Skip one or more menus -- 0=disabled, 1=guest, 2=guest+normal
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
#Use encore stages or not
Enhanced_Stage_Manager_Encore=1
#Enable PV Customization below
Enable_PV_Customization=0
#Change the mouth animations -- 0=default, 1=force PDA, 2=force FT
Force_Mouth=0
#Change the expressions -- 0=default, 1=force PDA, 2=force FT
Force_Expressions=0
#Change the look animations -- 0=default, 1=force PDA, 2=force FT
Force_Look=0
#Disable hand scaling
No_Hand_Scaling=0
#Default hand size -- 0-10000=default, 12200=PDA, 1000000=maximum
Default_Hand_Size_uint=0
#Sing missed notes
Sing_Missed=0
#Hide the volume and SE control buttons
Hide_Volume=0
#Remove the photo controls during PV playback
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
No_Lyrics=0
#Disable the error banner
No_Error=1
#Hide "CREDIT(S)"/"FREE PLAY"
Hide_Freeplay=0
#Show "FREE PLAY" instead of "CREDIT(S)" and don't require credits
Freeplay=1
#Show "PD Loader" instead of "FREE PLAY"
PDLoaderText=1
#Freeze the timer
No_Timer=1
#Disable the timer sprite
No_Timer_Sprite=1
#Unlock PSEUDO modules (incomplete, will default to Miku)
Unlock_Pseudo=0
#Enable the card menu (incomplete, it doesn't bypass the card prompt)
Card=0
#Allow using a real arcade slider attached to COM11 (or PS4 official FT controller)
Hardware_Slider=0
#Enable custom patches
Custom_Patches=1
[Graphics]
# Lag Compensation
Lag_Compensation = 0
# Set to -1 to unlock the frame rate.
FPS.Limit=60
# Reduces FPS Limiter CPU usage
# (may have less consistent performance)
FPS.Limit.LightMode=1
# Enable debug warnings for lightweight limiter
FPS.Limit.Verbose=0
# Temporal Anti-Aliasing
TAA=1
# Morphological Anti-Aliasing
MLAA=1
# MAG Filter -- 0=default (bilinear), 1=nearest-neighbour, 2=sharpen, 3=cone (smooth)
MAG=0
# Depth of Field
DOF=1
# Reflections
Reflections=1
# Gamma -- 0 or 100=default, 125=console-like
Gamma=100
# Shadows
Shadows=1
# Transparent Meshes
Punchthrough=1
# Glare
Glare=1
# Shader
Shader=1
# Toon shader (press F9 to toggle) -- 0=default, 1=force on, 2=force off
NPR1=0
# Disable all 3D passes. WARNING: The extended data will be deleted unless Prevent Data Deletion is enabled.
2D=0
# FrameRateManager motion rate (fps)
FRM.Motion.Rate=400
[Resolution]
# 0 = Windowed, 1 = Fast, 2 = Exclusive, 3 = Safe
# For same as screen res: -1x-1
Display=1
Width=-1
Height=-1
# Fullscreen only options
BitDepth=32
RefreshRate=60
# Set a custom internal render resolution
# Same as window: -1x-1
# HD : 1280x720
# FHD : 1920x1080
# WQHD : 2560x1440
# 4K UHD: 3840x2160
# 5K UHD: 5120x2880
# 8K UHD: 7680x4320
r.Enable=0
r.Width=1920
r.Height=1080
[plugins]
DivaWig.dva=0
DSCRemote.dva=0
custom_freeplay_text_example.p=0
@@ -24,7 +24,9 @@ VID = 046D
PID = C216
# Rumble (Xinput)
rumble =true
rumble = true
xinput_rumble_intensity_left = 8000
xinput_rumble_intensity_right = 4000
# Pause when focus is lost
autopause =true
@@ -59,7 +61,9 @@ MENU_L = Left, Up, Ds4_L1, XINPUT_LS, Ds4_DPad_Left, Ds4_DPad_Up, XINPUT_LEFT, X
MENU_R = Right, Down, Ds4_R1, XINPUT_RS, Ds4_DPad_Right, Ds4_DPad_Down, XINPUT_RIGHT, XINPUT_DOWN, E, O, Ds4_L_Stick_Right, XINPUT_LRIGHT, Ds4_L_Stick_Down, XINPUT_LDOWN, Ds4_R_Stick_Right, XINPUT_RRIGHT, Ds4_R_Stick_Down, XINPUT_RDOWN
MENU_CIRCLE = Spacebar
TOON = F9
COIN = F10
WIREFRAME = Backspace
# Touch Slider:
LEFT_SIDE_SLIDE_LEFT = Q, Ds4_L_Stick_Left, XINPUT_LLEFT
@@ -91,6 +95,7 @@ RIGHT_SIDE_SLIDE_RIGHT = O, Ds4_R_Stick_Right, XINPUT_RRIGHT
# - Special Keys
# "Enter", "Tab", "Backspace", "Spacebar", "Insert", "Delete", "Home", "End", "PageUp", "PageDown", "Escape"
# "Comma", "Period", "Colon", "Slash", "Tilde", "LeftBracket", "Backslash", "RightBracket", "SingleDoubleQuote", "OEM_8"
# --- MOUSE BUTTON NAMES: ---
# "MouseLeft", "MouseMiddle", "MouseRight", "MouseX1", "MouseX2"
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+9 -3
View File
@@ -34,9 +34,9 @@ namespace GPUModel
// note that the used GL context may differ
std::string getGpuName()
{
// detected model can be overridden -- 0: Kepler, 1: Maxwell, 2: Turing, 3: Ampere
// detected model can be overridden -- 0: Kepler, 1: Maxwell, 2: Turing, 3: Ampere, 4: Ada Lovelace, 5: Blackwell
int nGPUModel = GetPrivateProfileIntW(L"gpu", L"model", -1, CONFIG_FILE);
if (nGPUModel >= 0 && nGPUModel <= 2)
if (nGPUModel >= 0 && nGPUModel <= 4)
{
std::string arch;
switch (nGPUModel)
@@ -53,6 +53,12 @@ namespace GPUModel
case 3:
arch = "GA000";
break;
case 4:
arch = "AD000";
break;
case 5:
arch = "GB000";
break;
}
printf("[GPUModel] GPU Model override: %s\n", arch.c_str());
@@ -65,7 +71,7 @@ namespace GPUModel
//DWORD dwAttrib = GetFileAttributesW(L"amdgfxinfo64.dll");
//if (dwAttrib != INVALID_FILE_ATTRIBUTES && !(dwAttrib & FILE_ATTRIBUTE_DIRECTORY))
struct stat buffer; // for some reason winapi version wasn't working
if (stat("amdgfxinfo64.dll", &buffer) == 0);
if (stat("amdgfxinfo64.dll", &buffer) == 0)
{
non_nv_name = "AMD";
}
File diff suppressed because it is too large Load Diff
@@ -1,98 +1,98 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion>
<ProjectGuid>{1994C586-F73B-4EF2-BA3E-2A0FC3034B1A}</ProjectGuid>
<RootNamespace>DivaMovie</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<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" />
</ImportGroup>
<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" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<TargetExt>.dva</TargetExt>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<TargetExt>.dva</TargetExt>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>..\..\..\dependencies\detours\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalOptions>-d2FH4- %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<AdditionalLibraryDirectories>..\..\..\dependencies\detours\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>detours.lib;evr.lib;mfplat.lib;mfuuid.lib;strmiids.lib;syelog.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalOptions>-d2:-FH4- %(AdditionalOptions)</AdditionalOptions>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>..\..\..\dependencies\detours\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<AdditionalOptions>-d2FH4- %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>detours.lib;evr.lib;mfplat.lib;mfuuid.lib;syelog.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>..\..\..\dependencies\detours\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalOptions>-d2:-FH4- %(AdditionalOptions)</AdditionalOptions>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="dllmain.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="framework.h" />
<ClInclude Include="PluginConfigApi.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion>
<ProjectGuid>{1994C586-F73B-4EF2-BA3E-2A0FC3034B1A}</ProjectGuid>
<RootNamespace>DivaMovie</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<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" />
</ImportGroup>
<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" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<TargetExt>.dva</TargetExt>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<TargetExt>.dva</TargetExt>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>..\..\..\dependencies\simpleini;..\..\..\dependencies\detours\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalOptions>-d2FH4- %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<AdditionalLibraryDirectories>..\..\..\dependencies\detours\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>detours.lib;evr.lib;mfplat.lib;mfuuid.lib;strmiids.lib;syelog.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalOptions>-d2:-FH4- %(AdditionalOptions)</AdditionalOptions>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>..\..\..\dependencies\simpleini;..\..\..\dependencies\detours\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<AdditionalOptions>-d2FH4- %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>detours.lib;evr.lib;mfplat.lib;mfuuid.lib;syelog.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>..\..\..\dependencies\detours\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalOptions>-d2:-FH4- %(AdditionalOptions)</AdditionalOptions>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="dllmain.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="framework.h" />
<ClInclude Include="PluginConfigApi.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
+231 -212
View File
@@ -1,213 +1,232 @@
#include "framework.h"
#include "PluginConfigApi.h"
#include <evr.h>
#include <d3d9.h>
#include <dvdmedia.h>
#include <dxva2api.h>
#include <mfapi.h>
#include <mferror.h>
#include <mftransform.h>
bool forceSoftwareDecoding = false, debug = false;
IDirect3DDeviceManager9* deviceManager;
IMFTransform* mfTransform;
int width;
int height;
unsigned long samplesize;
unsigned long subtype;
IMFSample* dstSample;
IDirect3DSurface9* dstSurface;
IMFSample* srcSample;
IMFMediaBuffer* srcBuffer;
HRESULT initialize(IMFTransform* transform)
{
HRESULT result = S_OK;
IMFMediaType* type = NULL;
IMFMediaBuffer* buffer = NULL;
HANDLE hDevice = NULL;
IDirectXVideoAccelerationService* service = NULL;
AM_MEDIA_TYPE* format = NULL;
VIDEOINFOHEADER2* header = NULL;
// Release what we already had beforehand
SAFE_RELEASE(mfTransform);
SAFE_RELEASE(dstSample);
SAFE_RELEASE(dstSurface);
SAFE_RELEASE(srcSample);
SAFE_RELEASE(srcBuffer);
ASSERT(transform->GetOutputCurrentType(0, &type));
ASSERT(type->GetRepresentation(AM_MEDIA_TYPE_REPRESENTATION, (void**)&format));
header = (VIDEOINFOHEADER2*)format->pbFormat;
width = header->bmiHeader.biWidth;
height = header->bmiHeader.biHeight;
samplesize = format->lSampleSize;
subtype = format->subtype.Data1;
// System memory sample
ASSERT(MFCreateSample(&srcSample));
ASSERT(MFCreateMemoryBuffer(format->lSampleSize, &buffer));
ASSERT(srcSample->AddBuffer(buffer));
ASSERT(buffer->QueryInterface(&srcBuffer));
// Video memory sample
ASSERT(deviceManager->OpenDeviceHandle(&hDevice));
ASSERT(deviceManager->GetVideoService(hDevice, __uuidof(IDirectXVideoAccelerationService), (void**)& service));
ASSERT(service->CreateSurface(width, height, 0, (D3DFORMAT)subtype, D3DPOOL_DEFAULT, 0, DXVA2_VideoSoftwareRenderTarget, &dstSurface, NULL));
ASSERT(MFCreateVideoSampleFromSurface(dstSurface, &dstSample));
ASSERT(deviceManager->CloseDeviceHandle(hDevice));
mfTransform = transform;
mfTransform->AddRef();
end:
if (format)
type->FreeRepresentation(AM_MEDIA_TYPE_REPRESENTATION, format);
SAFE_RELEASE(service);
SAFE_RELEASE(buffer);
SAFE_RELEASE(type);
return result;
}
VTABLE_HOOK(HRESULT, IMFTransform, ProcessOutput, DWORD dwFlags, DWORD cOutputBufferCount,
MFT_OUTPUT_DATA_BUFFER* pOutputSamples, DWORD* pdwStatus)
{
if (pOutputSamples->pSample != NULL || deviceManager == NULL || cOutputBufferCount != 1)
return originalProcessOutput(This, dwFlags, cOutputBufferCount, pOutputSamples, pdwStatus);
HRESULT result = S_OK;
if (mfTransform != This)
ASSERT(initialize(This));
pOutputSamples->pSample = srcSample;
pOutputSamples->pSample->AddRef();
ASSERT(originalProcessOutput(This, dwFlags, cOutputBufferCount, pOutputSamples, pdwStatus));
D3DLOCKED_RECT rect;
BYTE* buf;
ASSERT(srcBuffer->Lock(&buf, NULL, NULL));
ASSERT(dstSurface->LockRect(&rect, NULL, NULL));
ASSERT(MFCopyImage((BYTE*)rect.pBits, rect.Pitch, buf, samplesize, samplesize, 1));
ASSERT(dstSurface->UnlockRect());
ASSERT(srcBuffer->Unlock());
LONGLONG duration;
ASSERT(srcSample->GetSampleDuration(&duration));
ASSERT(dstSample->SetSampleDuration(duration));
LONGLONG time;
ASSERT(srcSample->GetSampleTime(&time));
ASSERT(dstSample->SetSampleTime(time));
DWORD flags;
ASSERT(srcSample->GetSampleFlags(&flags));
ASSERT(dstSample->SetSampleFlags(flags));
pOutputSamples->pSample->Release();
pOutputSamples->pSample = dstSample;
pOutputSamples->pSample->AddRef();
end:
return result;
}
VTABLE_HOOK(HRESULT, IMFTransform, ProcessMessage, MFT_MESSAGE_TYPE eMessage, ULONG_PTR ulParam)
{
if (forceSoftwareDecoding)
{
if (eMessage == MFT_MESSAGE_SET_D3D_MANAGER) {
PRINT("[DivaMovie] Force Software Decoding enabled\n");
INSTALL_VTABLE_HOOK(This, ProcessOutput, 25);
return S_OK;
}
return originalProcessMessage(This, eMessage, ulParam);
}
else
{
HRESULT result = originalProcessMessage(This, eMessage, ulParam);
if (eMessage == MFT_MESSAGE_SET_D3D_MANAGER && result == MF_E_UNSUPPORTED_D3D_TYPE)
{
PRINT("[DivaMovie] This system does not support DXVA hardware decoding\n");
result = originalProcessMessage(This, eMessage, NULL);
if (SUCCEEDED(result))
INSTALL_VTABLE_HOOK(This, ProcessOutput, 25);
}
return result;
}
}
HOOK(void*, IMFTransformInitializer, 0x140420B90, void* a1, void* a2, IMFTransform** transform)
{
void* result = originalIMFTransformInitializer(a1, a2, transform);
INSTALL_VTABLE_HOOK(*transform, ProcessMessage, 23);
return result;
}
HOOK(HRESULT, DXVA2CreateDirect3DDeviceManager, PROC_ADDRESS("dxva2.dll", "DXVA2CreateDirect3DDeviceManager9"),
UINT* pResetToken, IDirect3DDeviceManager9** ppDeviceManager)
{
HRESULT result = originalDXVA2CreateDirect3DDeviceManager(pResetToken, ppDeviceManager);
if (FAILED(result))
return result;
if (deviceManager)
deviceManager->Release();
deviceManager = *ppDeviceManager;
deviceManager->AddRef();
return result;
}
void loadConfig() {
forceSoftwareDecoding = GetPrivateProfileIntW(L"general", L"force_software_decoding", 0, CONFIG_FILE) > 0 ? true : false;
debug = GetPrivateProfileIntW(L"general", L"debug", 0, CONFIG_FILE) > 0 ? true : false;
}
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
{
if (ul_reason_for_call == DLL_PROCESS_ATTACH)
{
loadConfig();
INSTALL_HOOK(DXVA2CreateDirect3DDeviceManager);
INSTALL_HOOK(IMFTransformInitializer);
}
return TRUE;
}
PluginConfig::PluginConfigOption config[] = {
{ PluginConfig::CONFIG_BOOLEAN, new PluginConfig::PluginConfigBooleanData{ L"force_software_decoding", L"general", CONFIG_FILE, L"Force Software Decoding", L"Use software decoding even on systems that support DXVA hardware decoding.", false } },
{ PluginConfig::CONFIG_BOOLEAN, new PluginConfig::PluginConfigBooleanData{ L"debug", L"general", CONFIG_FILE, L"Debug", L"Enable PRINT (possibly at the cost of performance).", false } },
};
extern "C" __declspec(dllexport) LPCWSTR GetPluginName(void)
{
return L"DivaMovie";
}
extern "C" __declspec(dllexport) LPCWSTR GetPluginDescription(void)
{
return L"DivaMovie Plugin by Skyth\n\nDivaMovie enables movies on systems that does not support DXVA hardware decoding.";
}
extern "C" __declspec(dllexport) PluginConfig::PluginConfigArray GetPluginOptions(void)
{
return PluginConfig::PluginConfigArray{ _countof(config), config };
#include "framework.h"
#include "PluginConfigApi.h"
#include <evr.h>
#include <d3d9.h>
#include <dvdmedia.h>
#include <dxva2api.h>
#include <mfapi.h>
#include <mferror.h>
#include <mftransform.h>
#include <SimpleIni.h>
bool forceSoftwareDecoding = false, forceHybridDecoding = false, debug = false;
IDirect3DDeviceManager9* deviceManager;
IMFTransform* mfTransform;
int width;
int height;
unsigned long samplesize;
unsigned long subtype;
IMFSample* dstSample;
IDirect3DSurface9* dstSurface;
IMFSample* srcSample;
IMFMediaBuffer* srcBuffer;
HRESULT initialize(IMFTransform* transform)
{
HRESULT result = S_OK;
IMFMediaType* type = NULL;
IMFMediaBuffer* buffer = NULL;
HANDLE hDevice = NULL;
IDirectXVideoAccelerationService* service = NULL;
AM_MEDIA_TYPE* format = NULL;
VIDEOINFOHEADER2* header = NULL;
// Release what we already had beforehand
SAFE_RELEASE(mfTransform);
SAFE_RELEASE(dstSample);
SAFE_RELEASE(dstSurface);
SAFE_RELEASE(srcSample);
SAFE_RELEASE(srcBuffer);
ASSERT(transform->GetOutputCurrentType(0, &type));
ASSERT(type->GetRepresentation(AM_MEDIA_TYPE_REPRESENTATION, (void**)&format));
header = (VIDEOINFOHEADER2*)format->pbFormat;
width = header->bmiHeader.biWidth;
height = header->bmiHeader.biHeight;
samplesize = format->lSampleSize;
subtype = format->subtype.Data1;
// System memory sample
ASSERT(MFCreateSample(&srcSample));
ASSERT(MFCreateMemoryBuffer(format->lSampleSize, &buffer));
ASSERT(srcSample->AddBuffer(buffer));
ASSERT(buffer->QueryInterface(&srcBuffer));
// Video memory sample
ASSERT(deviceManager->OpenDeviceHandle(&hDevice));
ASSERT(deviceManager->GetVideoService(hDevice, __uuidof(IDirectXVideoAccelerationService), (void**)& service));
ASSERT(service->CreateSurface(width, height, 0, (D3DFORMAT)subtype, D3DPOOL_DEFAULT, 0, DXVA2_VideoSoftwareRenderTarget, &dstSurface, NULL));
ASSERT(MFCreateVideoSampleFromSurface(dstSurface, &dstSample));
ASSERT(deviceManager->CloseDeviceHandle(hDevice));
mfTransform = transform;
mfTransform->AddRef();
end:
if (format)
type->FreeRepresentation(AM_MEDIA_TYPE_REPRESENTATION, format);
SAFE_RELEASE(service);
SAFE_RELEASE(buffer);
SAFE_RELEASE(type);
return result;
}
VTABLE_HOOK(HRESULT, IMFTransform, ProcessOutput, DWORD dwFlags, DWORD cOutputBufferCount,
MFT_OUTPUT_DATA_BUFFER* pOutputSamples, DWORD* pdwStatus)
{
if (pOutputSamples->pSample != NULL || deviceManager == NULL || cOutputBufferCount != 1)
return originalProcessOutput(This, dwFlags, cOutputBufferCount, pOutputSamples, pdwStatus);
HRESULT result = S_OK;
if (mfTransform != This)
ASSERT(initialize(This));
pOutputSamples->pSample = srcSample;
pOutputSamples->pSample->AddRef();
ASSERT(originalProcessOutput(This, dwFlags, cOutputBufferCount, pOutputSamples, pdwStatus));
D3DLOCKED_RECT rect;
BYTE* buf;
ASSERT(srcBuffer->Lock(&buf, NULL, NULL));
ASSERT(dstSurface->LockRect(&rect, NULL, NULL));
ASSERT(MFCopyImage((BYTE*)rect.pBits, rect.Pitch, buf, samplesize, samplesize, 1));
ASSERT(dstSurface->UnlockRect());
ASSERT(srcBuffer->Unlock());
LONGLONG duration;
ASSERT(srcSample->GetSampleDuration(&duration));
ASSERT(dstSample->SetSampleDuration(duration));
LONGLONG time;
ASSERT(srcSample->GetSampleTime(&time));
ASSERT(dstSample->SetSampleTime(time));
DWORD flags;
ASSERT(srcSample->GetSampleFlags(&flags));
ASSERT(dstSample->SetSampleFlags(flags));
pOutputSamples->pSample->Release();
pOutputSamples->pSample = dstSample;
pOutputSamples->pSample->AddRef();
end:
return result;
}
VTABLE_HOOK(HRESULT, IMFTransform, ProcessMessage, MFT_MESSAGE_TYPE eMessage, ULONG_PTR ulParam)
{
if (forceSoftwareDecoding)
{
if (eMessage == MFT_MESSAGE_SET_D3D_MANAGER) {
PRINT("[DivaMovie] Force Software Decoding enabled\n");
INSTALL_VTABLE_HOOK(This, ProcessOutput, 25);
return S_OK;
}
return originalProcessMessage(This, eMessage, ulParam);
}
else
{
HRESULT result = originalProcessMessage(This, eMessage, ulParam);
if (eMessage == MFT_MESSAGE_SET_D3D_MANAGER && result == MF_E_UNSUPPORTED_D3D_TYPE)
{
PRINT("[DivaMovie] This system does not support DXVA hardware decoding\n");
result = originalProcessMessage(This, eMessage, NULL);
if (SUCCEEDED(result))
INSTALL_VTABLE_HOOK(This, ProcessOutput, 25);
}
else if (!forceHybridDecoding && eMessage == MFT_MESSAGE_SET_D3D_MANAGER && result == 0)
{
static bool warn = false;
if (!warn)
{
MessageBoxW(0, L"Your system supports DXVA hardware decoding and Force Hybrid Decoding is disabled.\nDivaMovie will be disabled.\n\nIt is HIGHLY recommended to restart the game now.", L"DivaMovie", MB_ICONINFORMATION);
CSimpleIniW ini_reader;
ini_reader.SetUnicode(false);
ini_reader.LoadFile(MASTER_CONFIG_FILE);
ini_reader.SetValue(L"plugins", L"DivaMovie.dva", L"0");
ini_reader.SaveFile(MASTER_CONFIG_FILE);
warn = true;
}
}
return result;
}
}
HOOK(void*, IMFTransformInitializer, 0x140420B90, void* a1, void* a2, IMFTransform** transform)
{
void* result = originalIMFTransformInitializer(a1, a2, transform);
INSTALL_VTABLE_HOOK(*transform, ProcessMessage, 23);
return result;
}
HOOK(HRESULT, DXVA2CreateDirect3DDeviceManager, PROC_ADDRESS("dxva2.dll", "DXVA2CreateDirect3DDeviceManager9"),
UINT* pResetToken, IDirect3DDeviceManager9** ppDeviceManager)
{
HRESULT result = originalDXVA2CreateDirect3DDeviceManager(pResetToken, ppDeviceManager);
if (FAILED(result))
return result;
if (deviceManager)
deviceManager->Release();
deviceManager = *ppDeviceManager;
deviceManager->AddRef();
return result;
}
void loadConfig() {
forceSoftwareDecoding = GetPrivateProfileIntW(L"general", L"force_software_decoding", 0, CONFIG_FILE) > 0 ? true : false;
forceHybridDecoding = GetPrivateProfileIntW(L"general", L"force_hybrid_decoding", 0, CONFIG_FILE) > 0 ? true : false;
debug = GetPrivateProfileIntW(L"general", L"debug", 0, CONFIG_FILE) > 0 ? true : false;
}
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
{
if (ul_reason_for_call == DLL_PROCESS_ATTACH)
{
loadConfig();
INSTALL_HOOK(DXVA2CreateDirect3DDeviceManager);
INSTALL_HOOK(IMFTransformInitializer);
}
return TRUE;
}
PluginConfig::PluginConfigOption config[] = {
{ PluginConfig::CONFIG_BOOLEAN, new PluginConfig::PluginConfigBooleanData{ L"force_software_decoding", L"general", CONFIG_FILE, L"Force Software Decoding", L"Use software decoding even on systems that support DXVA hardware decoding.", false } },
{ PluginConfig::CONFIG_BOOLEAN, new PluginConfig::PluginConfigBooleanData{ L"force_hybrid_decoding", L"general", CONFIG_FILE, L"Force Hybrid Decoding", L"Do not disable DivaMovie on systems that support DXVA hardware decoding.\nCan cause issues on recent drivers.", false } },
{ PluginConfig::CONFIG_BOOLEAN, new PluginConfig::PluginConfigBooleanData{ L"debug", L"general", CONFIG_FILE, L"Debug (slow!)", L"Enable PRINT (possibly at the cost of performance).", false } },
};
extern "C" __declspec(dllexport) LPCWSTR GetPluginName(void)
{
return L"DivaMovie";
}
extern "C" __declspec(dllexport) LPCWSTR GetPluginDescription(void)
{
return L"DivaMovie Plugin by Skyth\n\nDivaMovie enables movies on systems that do not support DXVA hardware decoding.";
}
extern "C" __declspec(dllexport) PluginConfig::PluginConfigArray GetPluginOptions(void)
{
return PluginConfig::PluginConfigArray{ _countof(config), config };
}
@@ -1,74 +1,77 @@
#pragma once
#define WIN32_LEAN_AND_MEAN
#include <cstdio>
#include <windows.h>
#include <detours.h>
#include <string>
std::wstring ExePath() {
WCHAR buffer[MAX_PATH];
GetModuleFileNameW(NULL, buffer, MAX_PATH);
return std::wstring(buffer);
}
std::wstring DirPath() {
std::wstring exepath = ExePath();
std::wstring::size_type pos = exepath.find_last_of(L"\\/");
return exepath.substr(0, pos);
}
std::wstring CONFIG_FILE_STRING = DirPath() + L"\\plugins\\DivaMovie.ini";
LPCWSTR CONFIG_FILE = CONFIG_FILE_STRING.c_str();
#define PRINT(value, ...) if (debug) printf(value, __VA_ARGS__);
#define PROC_ADDRESS(libraryName, procName) \
GetProcAddress(LoadLibrary(TEXT(libraryName)), procName)
#define SAFE_RELEASE(object) if (object) { object->Release(); object = NULL; }
#define VTABLE_HOOK(returnType, className, functionName, ...) \
typedef returnType functionName(className* This, __VA_ARGS__); \
functionName* original##functionName; \
returnType implOf##functionName(className* This, __VA_ARGS__)
#define INSTALL_VTABLE_HOOK(object, functionName, functionIndex) \
{ \
void** addr = &(*(void***)object)[functionIndex]; \
if (*addr != implOf##functionName) \
{ \
PRINT("[DivaMovie] Installing %s hook...\n", #functionName); \
original##functionName = (functionName*)*addr; \
DWORD oldProtect; \
VirtualProtect(addr, sizeof(void*), PAGE_EXECUTE_READWRITE, &oldProtect); \
*addr = implOf##functionName; \
VirtualProtect(addr, sizeof(void*), oldProtect, NULL); \
} \
}
#define HOOK(returnType, function, location, ...) \
typedef returnType function(__VA_ARGS__); \
function* original##function = (function*)location; \
returnType implOf##function(__VA_ARGS__)
#define INSTALL_HOOK(functionName) \
{ \
PRINT("[DivaMovie] Installing %s hook...\n", #functionName); \
DetourTransactionBegin(); \
DetourUpdateThread(GetCurrentThread()); \
DetourAttach((void**)&original##functionName, implOf##functionName); \
DetourTransactionCommit(); \
}
#define ASSERT(function) \
if (FAILED(result = (function))) \
{ \
PRINT("[DivaMovie] %s failed (error code: 0x%08x)\n", #function, (unsigned int)result); \
goto end; \
} /*\
else \
{ \
PRINT("[DivaMovie] %s succeeded\n", #function); \
}*/
#pragma once
#define WIN32_LEAN_AND_MEAN
#include <cstdio>
#include <windows.h>
#include <detours.h>
#include <string>
std::wstring ExePath() {
WCHAR buffer[MAX_PATH];
GetModuleFileNameW(NULL, buffer, MAX_PATH);
return std::wstring(buffer);
}
std::wstring DirPath() {
std::wstring exepath = ExePath();
std::wstring::size_type pos = exepath.find_last_of(L"\\/");
return exepath.substr(0, pos);
}
std::wstring CONFIG_FILE_STRING = DirPath() + L"\\plugins\\DivaMovie.ini";
LPCWSTR CONFIG_FILE = CONFIG_FILE_STRING.c_str();
std::wstring MASTER_CONFIG_FILE_STRING = DirPath() + L"\\plugins\\config.ini";
LPCWSTR MASTER_CONFIG_FILE = MASTER_CONFIG_FILE_STRING.c_str();
#define PRINT(value, ...) if (debug) printf(value, __VA_ARGS__);
#define PROC_ADDRESS(libraryName, procName) \
GetProcAddress(LoadLibrary(TEXT(libraryName)), procName)
#define SAFE_RELEASE(object) if (object) { object->Release(); object = NULL; }
#define VTABLE_HOOK(returnType, className, functionName, ...) \
typedef returnType functionName(className* This, __VA_ARGS__); \
functionName* original##functionName; \
returnType implOf##functionName(className* This, __VA_ARGS__)
#define INSTALL_VTABLE_HOOK(object, functionName, functionIndex) \
{ \
void** addr = &(*(void***)object)[functionIndex]; \
if (*addr != implOf##functionName) \
{ \
PRINT("[DivaMovie] Installing %s hook...\n", #functionName); \
original##functionName = (functionName*)*addr; \
DWORD oldProtect; \
VirtualProtect(addr, sizeof(void*), PAGE_EXECUTE_READWRITE, &oldProtect); \
*addr = implOf##functionName; \
VirtualProtect(addr, sizeof(void*), oldProtect, NULL); \
} \
}
#define HOOK(returnType, function, location, ...) \
typedef returnType function(__VA_ARGS__); \
function* original##function = (function*)location; \
returnType implOf##function(__VA_ARGS__)
#define INSTALL_HOOK(functionName) \
{ \
PRINT("[DivaMovie] Installing %s hook...\n", #functionName); \
DetourTransactionBegin(); \
DetourUpdateThread(GetCurrentThread()); \
DetourAttach((void**)&original##functionName, implOf##functionName); \
DetourTransactionCommit(); \
}
#define ASSERT(function) \
if (FAILED(result = (function))) \
{ \
PRINT("[DivaMovie] %s failed (error code: 0x%08x)\n", #function, (unsigned int)result); \
goto end; \
} /*\
else \
{ \
PRINT("[DivaMovie] %s succeeded\n", #function); \
}*/
+30 -27
View File
@@ -7,33 +7,36 @@
#include <tchar.h>
#include <thread>
#define HEAD_ACCESSORY 0
#define HAIR 1
#define UNKNOWN_1 2
#define UNKNOWN_2 3
#define FACE_ACCESSORY 4
#define UNKNOWN_3 5
#define FACE_TEXTURES 6
#define UNKNOWN_4 7
#define CHEST_ACCESSORY 8
#define UNKNOWN_5 9
#define BODY 10
#define UNKNOWN_6 11
#define UNKNOWN_7 12
#define UNKNOWN_8 13
#define HANDS 14,
#define UNKNOWN_9 15
#define BACK_ACCESSORY 16
#define UNKNOWN_10 17
#define UNKNOWN_11 18
#define UNKNOWN_12 19
#define UNKNOWN_13 20
#define UNKNOWN_14 21
#define UNKNOWN_15 22
#define UNKNOWN_16 23
#define HEAD 24
#define ALL -1
#define NONE -2
static const enum module_part
{
HEAD_ACCESSORY,
HAIR,
UNKNOWN_1,
UNKNOWN_2,
FACE_ACCESSORY,
UNKNOWN_3,
FACE_TEXTURES,
UNKNOWN_4,
CHEST_ACCESSORY,
UNKNOWN_5,
BODY,
UNKNOWN_6,
UNKNOWN_7,
UNKNOWN_8,
HANDS,
UNKNOWN_9,
BACK_ACCESSORY,
UNKNOWN_10,
UNKNOWN_11,
UNKNOWN_12,
UNKNOWN_13,
UNKNOWN_14,
UNKNOWN_15,
UNKNOWN_16,
HEAD,
ALL = -1,
NONE = -2
};
using namespace std;
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -1,8 +1,13 @@
#pragma once
#include "glStuff.h"
//#define WIN32_LEAN_AND_MEAN
//#include <windows.h>
//#include <psapi.h>
#include <vector>
#include "glStuff.h"
// use this as a hook to perform initialisation
void(__cdecl* glutSetCursor)(int cursor) = *(void(__cdecl**)(int))0x140966068;
void(__cdecl* uploadModelTransformBuf)(DWORD* a1, int a2) = (void(__cdecl*)(DWORD * a1, int a2))0x140444fa0;
@@ -112,4 +117,38 @@ void InjectCode(void* address, const std::vector<uint8_t> data)
VirtualProtect(address, byteCount, PAGE_EXECUTE_READWRITE, &oldProtect);
memcpy(address, data.data(), byteCount);
VirtualProtect(address, byteCount, oldProtect, nullptr);
}
}
//bool hasConflicts()
//{
// printf("[Novidia] Checking for conflicts...\n");
//
// HMODULE* hModules = new HMODULE[USHRT_MAX];
// HANDLE hProcess;
// DWORD cbNeeded;
//
// hProcess = GetCurrentProcess();
//
// if (EnumProcessModules(hProcess, hModules, sizeof(hModules), &cbNeeded)) {
// for (unsigned long long i = 0; i < (cbNeeded / sizeof(HMODULE)); i++) {
// auto pNameFunc = (LPCWSTR(*)())GetProcAddress(hModules[i], "GetPluginName");
// if (pNameFunc) {
// LPCWSTR name = pNameFunc();
// if (name && lstrcmpW(name, L"DivaGL") == 0)
// {
// // detected DivaGL
// printf("[Novidia] Detected DivaGL! Quitting!\n");
//#ifdef _DEBUG
// MessageBoxExW(NULL, L"Detected DivaGL! Quitting!\n", L"Novidia", MB_OK, 0);
//#endif
// delete[] hModules;
// return true;
// }
// }
// }
// }
//
// printf("[Novidia] No conflicts found.\n");
// delete[] hModules;
// return false;
//}
@@ -149,7 +149,7 @@ class PatchApplier600 : public PatchApplier {
if (nPDLoaderText && !nHideFreeplay)
{
InjectCode((void*)0x00000001409BC188, { 0x50, 0x44, 0x20, 0x4C, 0x6F, 0x61, 0x64, 0x65, 0x72, 0x20, 0x00 });
InjectCode((void*)0x00000001409BC188, { 'U', 'N', 'S', 'U', 'P', 'P', 'O', 'R', 'T', 'E', 'D', '\0' });
printf("[Patches] Show PD Loader text\n");
}
}
@@ -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<uint8_t> cardIcon = { 0xFD, 0x0A };
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 };
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
@@ -308,16 +308,16 @@ class PatchApplier600 : public PatchApplier {
printf("[Patches] Enhanced Stage Manager enabled\n");
}
// OpenGL Patches
if (nOGLPatchA)
{
// (call cs:glGetError) -> (xor eax, eax); (nop); (nop); (nop); (nop);
InjectCode((void*)0x000000014067842D, { 0x31, 0xC0, 0x90, 0x90, 0x90, 0x90 });
}
if (nOGLPatchB)
{
// (js loc_14069BC32) -> (nop)...
InjectCode((void*)0x0000000140676D04, { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 });
}
//if (nOGLPatchA)
//{
// // (call cs:glGetError) -> (xor eax, eax); (nop); (nop); (nop); (nop);
// InjectCode((void*)0x000000014067842D, { 0x31, 0xC0, 0x90, 0x90, 0x90, 0x90 });
//}
//if (nOGLPatchB)
//{
// // (js loc_14069BC32) -> (nop)...
// InjectCode((void*)0x0000000140676D04, { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 });
//}
// Unlock PSEUDO modules (which will all default to Miku, unless we also patch them to match the first performer)
if (nUnlockPseudo)
{
File diff suppressed because it is too large Load Diff
+117 -113
View File
@@ -1,114 +1,118 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion>
<ProjectGuid>{3FD6ACA9-E613-4FD6-BDA2-55A91C2CF65C}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>Patches</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<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" />
</ImportGroup>
<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" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<TargetExt>.dva</TargetExt>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<TargetExt>.dva</TargetExt>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;PATCHES_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<LanguageStandard>stdcpp17</LanguageStandard>
<AdditionalIncludeDirectories>..\..\..\dependencies\PluginConfigApi;..\..\..\dependencies\freeglut\include;..\..\..\dependencies\freeglut\include;..\..\..\dependencies\detours\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<AdditionalOptions>-d2FH4- %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
<AdditionalLibraryDirectories>..\..\..\dependencies\detours\lib;..\..\..\dependencies\freeglut\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalOptions>-d2:-FH4- %(AdditionalOptions)</AdditionalOptions>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;PATCHES_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeaderFile>
</PrecompiledHeaderFile>
<AdditionalIncludeDirectories>..\..\..\dependencies\PluginConfigApi;..\..\..\dependencies\freeglut\include;..\..\..\dependencies\freeglut\include;..\..\..\dependencies\detours\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<LanguageStandard>stdcpp17</LanguageStandard>
<AdditionalOptions>-d2FH4- %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
<AdditionalLibraryDirectories>..\..\..\dependencies\detours\lib;..\..\..\dependencies\freeglut\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalOptions>-d2:-FH4- %(AdditionalOptions)</AdditionalOptions>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="dllmain.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="framework.h" />
<ClInclude Include="PatchApplier.h" />
<ClInclude Include="PatchApplier600.h" />
<ClInclude Include="PatchApplier710.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion>
<ProjectGuid>{3FD6ACA9-E613-4FD6-BDA2-55A91C2CF65C}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>Patches</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<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" />
</ImportGroup>
<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" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<TargetExt>.dva</TargetExt>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<TargetExt>.dva</TargetExt>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;PATCHES_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<LanguageStandard>stdcpp17</LanguageStandard>
<AdditionalIncludeDirectories>..\..\..\dependencies\PluginConfigApi;..\..\..\dependencies\freeglut\include;..\..\..\dependencies\freeglut\include;..\..\..\dependencies\detours\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<AdditionalOptions>-d2FH4- %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
<AdditionalLibraryDirectories>..\..\..\dependencies\detours\lib;..\..\..\dependencies\freeglut\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalOptions>-d2:-FH4- %(AdditionalOptions)</AdditionalOptions>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;PATCHES_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeaderFile>
</PrecompiledHeaderFile>
<AdditionalIncludeDirectories>..\..\..\dependencies\PluginConfigApi;..\..\..\dependencies\freeglut\include;..\..\..\dependencies\freeglut\include;..\..\..\dependencies\detours\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<LanguageStandard>stdcpp17</LanguageStandard>
<AdditionalOptions>-d2FH4- %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
<AdditionalLibraryDirectories>..\..\..\dependencies\detours\lib;..\..\..\dependencies\freeglut\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalOptions>-d2:-FH4- %(AdditionalOptions)</AdditionalOptions>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="databank.cpp" />
<ClCompile Include="dllmain.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="databank.h" />
<ClInclude Include="framework.h" />
<ClInclude Include="PatchApplier.h" />
<ClInclude Include="PatchApplier600.h" />
<ClInclude Include="PatchApplier710.h" />
<ClInclude Include="storage.h" />
<ClInclude Include="urlutil.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
@@ -1,36 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<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>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="dllmain.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="framework.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="PatchApplier.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="PatchApplier600.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="PatchApplier710.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<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>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="dllmain.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="databank.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="framework.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="PatchApplier.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="PatchApplier600.h">
<Filter>Header Files</Filter>
</ClInclude>
<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>
@@ -0,0 +1,132 @@
#include <iostream>
#include <fstream>
#include <sstream>
#include <vector>
#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;
std::tuple<int, int> id(std::stoi(tokens[i]), std::stoi(tokens[i + 2]));
entry.unk1 = std::stoi(tokens[i + 1]);
entry.advStart = tokens[i + 3];
entry.advEnd = tokens[i + 4];
entry.start = tokens[i + 5];
entry.end = tokens[i + 6];
entries.insert({ id, 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;
}
}
void PvList::addEntry(int id, int extra, PvEntry& entry)
{
entries.insert({ std::tuple<int, int>(id, extra), entry });
}
void PvList::generateMissingEntries()
{
PvEntry entry = PvEntry();
for (int i = 0; i <= 999; i++)
{
entry.advStart = "2000-01-01";
entry.advEnd = "2029-01-01";
entry.start = "2000-01-01";
entry.end = "2029-01-01";
entries.insert({ std::tuple<int, int>(i, 0), entry });
entries.insert({ std::tuple<int, int>(i, 1), entry });
}
}
std::string PvList::finalize()
{
std::ostringstream csvStream;
if (entries.empty())
{
return "%2A%2A%2A"; // ***
//checksum = "5341";
}
else
{
bool first = true;
for (const auto& entryMap : entries)
{
std::ostringstream entryStream;
if (!first)
{
csvStream << ",";
}
first = false;
const PvEntry& entry = entryMap.second;
entryStream << std::get<0>(entryMap.first) << ","
<< entry.unk1 << ","
<< std::get<1>(entryMap.first) << ","
<< entry.advStart << ","
<< entry.advEnd << ","
<< entry.start << ","
<< entry.end;
csvStream << urlEncode(entryStream.str());
}
return urlEncode(csvStream.str());
//checksum = std::to_string(crc16_ccitt(finalString));
}
}
}
@@ -0,0 +1,26 @@
#pragma once
#include <map>
#include "databank.h"
namespace Databank
{
struct PvEntry
{
int unk1 = 1;
std::string advStart, advEnd, start, end;
};
class PvList
{
protected:
std::map<std::tuple<int, int>, PvEntry> entries;
public:
bool readFromStr(std::string& str);
bool readFromFile(const std::string& filename);
void addEntry(int id, int extra, PvEntry& entry);
void generateMissingEntries();
std::string finalize();
};
}
+323 -254
View File
@@ -1,255 +1,324 @@
#include "windows.h"
#include "vector"
#include <tchar.h>
#include <GL/freeglut.h>
#include <iostream>
#include <fstream>
#include <filesystem>
#include <sstream>
#include <iomanip>
#include "PluginConfigApi.h"
#include "PatchApplier.h"
#include "PatchApplier600.h"
#include "PatchApplier710.h"
#include <detours.h>
#include "framework.h"
#pragma comment(lib, "detours.lib")
unsigned short game_version = 710;
void InjectCode(void* address, const std::vector<uint8_t> data);
void ApplyPatches();
void ApplyCustomPatches(std::wstring CPATCH_FILE_STRING);
HMODULE *hModulePtr;
BOOL APIENTRY DllMain(HMODULE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
hModulePtr = &hModule;
if (*(char*)0x140A570F0 == '6') game_version = 600;
ApplyPatches();
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
void ApplyPatches() {
std::string version_string = std::to_string(game_version);
version_string.insert(version_string.begin()+1, '.');
std::cout << "[Patches] Game version " + version_string << std::endl;
PatchApplier* pa;
switch (game_version)
{
case 600:
pa = new PatchApplier600;
break;
default:
pa = new PatchApplier710;
}
pa->ApplyPatches();
printf("[Patches] Patches applied\n");
if (nCustomPatches)
{
std::cout << "[Patches] Reading custom patches...\n";
try {
for (std::filesystem::path p : std::filesystem::directory_iterator("../patches"))
{
std::string extension = std::filesystem::path(p).extension().string();
if ((extension == ".p" || extension == ".P" || extension == ".p2" || extension == ".P2") &&
GetPrivateProfileIntW(L"plugins", std::filesystem::path(p).filename().c_str(), TRUE, CONFIG_FILE))
{
std::cout << "[Patches] Reading custom patch file: " << std::filesystem::path(p).filename().string() << std::endl;
ApplyCustomPatches(std::filesystem::path(p).wstring());
}
}
}
catch (const std::filesystem::filesystem_error &e) {
std::cout << "[Patches] File system error " << e.what() << " " << e.path1() << " " << e.path2() << " " << e.code() << std::endl;
}
std::cout << "[Patches] All custom patches applied\n";
}
}
void ApplyCustomPatches(std::wstring CPATCH_FILE_STRING)
{
LPCWSTR CPATCH_FILE = CPATCH_FILE_STRING.c_str();
std::ifstream fileStream(CPATCH_FILE_STRING);
if (!fileStream.is_open())
return;
std::string line;
// check for BOM
std::getline(fileStream, line);
if (line.size() >= 3 && line.rfind("\xEF\xBB\xBF", 0) == 0)
fileStream.seekg(3);
else
fileStream.seekg(0);
while (std::getline(fileStream, line))
{
if (line[0] == '#')
{
std::cout << "[Patches]" << line.substr(1, line.size()-1) << std::endl;
continue;
}
if (line == "IGNORE") break;
if (line.find(':') == std::string::npos || (line[0] == '/' && line[1] == '/')) continue;
std::vector<std::string> commentHSplit = SplitString(line, "#");
std::vector<std::string> commentDSSplit = SplitString(commentHSplit[0], "//");
std::vector<std::string> colonSplit = SplitString(commentDSSplit[0], ":");
if (colonSplit.size() != 2) continue;
bool echo = true;
if (colonSplit[0].at(0) == '@')
{
echo = false;
colonSplit[0].at(0) = ' ';
}
long long int address;
std::istringstream iss(colonSplit[0]);
iss >> std::setbase(16) >> address;
if (address == 0) std::cout << "[Patches] Custom patch address wrong: " << std::hex << address << std::endl;
if (colonSplit[1].at(0) == '!')
{
if (echo) std::cout << "[Patches] Patching: " << std::hex << address << ":!";
std::vector<std::string> fullColonSplit = SplitString(line, ":");
for (int i = 1; i < fullColonSplit[1].size(); i++)
{
unsigned char byte_u = fullColonSplit[1].at(i);
if(byte_u=='\\' && i<fullColonSplit[1].size())
{
switch (fullColonSplit[1].at(i + 1))
{
case '0':
byte_u = '\0';
i++;
break;
case 'n':
byte_u = '\n';
i++;
break;
case 't':
byte_u = '\t';
i++;
break;
case 'r':
byte_u = '\r';
i++;
break;
case 'b':
byte_u = '\b';
i++;
break;
case 'a':
byte_u = '\a';
i++;
break;
case 'f':
byte_u = '\f';
i++;
break;
case 'v':
byte_u = '\v';
i++;
break;
case '\\':
byte_u = '\\';
i++;
break;
}
}
if (echo) std::cout << byte_u;
std::vector<uint8_t> patch = { byte_u };
InjectCode((void*)address, patch);
address++;
}
if (echo) std::cout << std::endl;
}
else
{
std::vector<std::string> bytes = SplitString(colonSplit[1], " ");
if (bytes.size() < 1) continue;
std::string comment_string = "";
int comment_counter = 0;
if (commentHSplit.size() > 1)
{
bool ignore = 1;
for (std::string comment : commentHSplit)
{
if (ignore)
{
ignore = 0;
continue;
}
comment_string = comment_string + comment;
}
}
if (echo) std::cout << "[Patches] Patching: " << std::hex << address << ":";
for (std::string bytestring : bytes)
{
int byte;
std::istringstream issb(bytestring);
issb >> std::setbase(16) >> byte;
unsigned char byte_u = byte;
if (echo)
{
std::cout << std::hex << byte << " ";
if (comment_counter < comment_string.length())
{
std::cout << "(" << comment_string.at(comment_counter) << ") ";
comment_counter++;
}
}
std::vector<uint8_t> patch = { byte_u };
InjectCode((void*)address, patch);
address++;
}
if (echo) std::cout << std::endl;
else if (comment_string.length() > 0)
{
std::cout << "[Patches]";;
if (comment_string.at(0) != ' ') std::cout << ' ';
std::cout << comment_string << std::endl;
}
}
}
fileStream.close();
}
using namespace PluginConfig;
extern "C" __declspec(dllexport) LPCWSTR GetPluginName(void)
{
return L"Patches";
}
extern "C" __declspec(dllexport) LPCWSTR GetPluginDescription(void)
{
return L"Applies patches/tweaks to the game before it starts.\nThis plugin is required.";
#include "windows.h"
#include "vector"
#include <tchar.h>
#include <GL/freeglut.h>
#include <iostream>
#include <fstream>
#include <filesystem>
#include <sstream>
#include <iomanip>
#include <regex>
#include <detours.h>
#include "PluginConfigApi.h"
#include "PatchApplier.h"
#include "PatchApplier600.h"
#include "PatchApplier710.h"
#include "framework.h"
#include "storage.h"
#include "databank.h"
#pragma comment(lib, "detours.lib")
unsigned short game_version = 710;
void InjectCode(void* address, const std::vector<uint8_t> 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;
BOOL APIENTRY DllMain(HMODULE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
hModulePtr = &hModule;
if (*(char*)0x140A570F0 == '6') game_version = 600;
ApplyPatches();
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
void ApplyPatches() {
if (game_version == 710)
{
const char* exe_ver_string = (const char*)0x140A92CB8;
if (strcmp(exe_ver_string, "7.10.00") != 0)
{
MessageBoxW(nullptr, L"Game version not 7.10. Please verify your files.", L"Patches", MB_ICONERROR);
exit(1);
}
}
std::string version_string = std::to_string(game_version);
version_string.insert(version_string.begin()+1, '.');
std::cout << "[Patches] Game version " + version_string << std::endl;
PatchApplier* pa;
switch (game_version)
{
case 600:
pa = new PatchApplier600;
break;
default:
pa = new PatchApplier710;
}
pa->ApplyPatches();
printf("[Patches] Patches applied\n");
if (nCustomPatches)
{
std::cout << "[Patches] Reading custom patches...\n";
try {
for (std::filesystem::path p : std::filesystem::directory_iterator("../patches"))
{
if (std::filesystem::path(p).filename().string()._Starts_with("._")) continue; // exclude macOS metadata
std::string extension = std::filesystem::path(p).extension().string();
if ((extension == ".p" || extension == ".P" || extension == ".p2" || extension == ".P2") &&
GetPrivateProfileIntW(L"plugins", std::filesystem::path(p).filename().c_str(), TRUE, CONFIG_FILE))
{
std::cout << "[Patches] Reading custom patch file: " << std::filesystem::path(p).filename().string() << std::endl;
ApplyCustomPatches(std::filesystem::path(p).wstring());
}
else std::cout << "[Patches] Skipping disabled patch file: " << std::filesystem::path(p).filename().string() << std::endl;
}
}
catch (const std::filesystem::filesystem_error &e) {
std::cout << "[Patches] File system error " << e.what() << " " << e.path1() << " " << e.path2() << " " << e.code() << std::endl;
}
std::cout << "[Patches] All custom patches applied\n";
}
if (nAutoDatabank)
{
initPvListContainerHook();
}
}
void ApplyCustomPatches(std::wstring CPATCH_FILE_STRING)
{
LPCWSTR CPATCH_FILE = CPATCH_FILE_STRING.c_str();
std::ifstream fileStream(CPATCH_FILE_STRING);
if (!fileStream.is_open())
return;
std::string line;
// check for BOM
std::getline(fileStream, line);
if (line.size() >= 3 && line.rfind("\xEF\xBB\xBF", 0) == 0)
fileStream.seekg(3);
else
fileStream.seekg(0);
while (std::getline(fileStream, line))
{
if (line[0] == '#')
{
std::cout << "[Patches]" << line.substr(1, line.size()-1) << std::endl;
continue;
}
if (line == "IGNORE") break;
if (line.find(':') == std::string::npos || (line[0] == '/' && line[1] == '/')) continue;
std::vector<std::string> commentHSplit = SplitString(line, "#");
std::vector<std::string> commentDSSplit = SplitString(commentHSplit[0], "//");
std::vector<std::string> colonSplit = SplitString(commentDSSplit[0], ":");
if (colonSplit.size() != 2) continue;
bool echo = true;
if (colonSplit[0].at(0) == '@')
{
echo = false;
colonSplit[0].at(0) = ' ';
}
long long int address;
std::istringstream iss(colonSplit[0]);
iss >> std::setbase(16) >> address;
if (address == 0) std::cout << "[Patches] Custom patch address wrong: " << std::hex << address << std::endl;
if (colonSplit[1].at(0) == '!')
{
if (echo) std::cout << "[Patches] Patching: " << std::hex << address << ":!";
std::vector<std::string> fullColonSplit = SplitString(line, ":");
for (int i = 1; i < fullColonSplit[1].size(); i++)
{
unsigned char byte_u = fullColonSplit[1].at(i);
if(byte_u=='\\' && i<fullColonSplit[1].size())
{
switch (fullColonSplit[1].at(i + 1))
{
case '0':
byte_u = '\0';
i++;
break;
case 'n':
byte_u = '\n';
i++;
break;
case 't':
byte_u = '\t';
i++;
break;
case 'r':
byte_u = '\r';
i++;
break;
case 'b':
byte_u = '\b';
i++;
break;
case 'a':
byte_u = '\a';
i++;
break;
case 'f':
byte_u = '\f';
i++;
break;
case 'v':
byte_u = '\v';
i++;
break;
case '\\':
byte_u = '\\';
i++;
break;
}
}
if (echo) std::cout << byte_u;
std::vector<uint8_t> patch = { byte_u };
InjectCode((void*)address, patch);
address++;
}
if (echo) std::cout << std::endl;
}
else
{
std::vector<std::string> bytes = SplitString(colonSplit[1], " ");
if (bytes.size() < 1) continue;
std::string comment_string = "";
int comment_counter = 0;
if (commentHSplit.size() > 1)
{
bool ignore = 1;
for (std::string comment : commentHSplit)
{
if (ignore)
{
ignore = 0;
continue;
}
comment_string = comment_string + comment;
}
}
if (echo) std::cout << "[Patches] Patching: " << std::hex << address << ":";
for (std::string bytestring : bytes)
{
int byte;
std::istringstream issb(bytestring);
issb >> std::setbase(16) >> byte;
unsigned char byte_u = byte;
if (echo)
{
std::cout << std::hex << byte << " ";
if (comment_counter < comment_string.length())
{
std::cout << "(" << comment_string.at(comment_counter) << ") ";
comment_counter++;
}
}
std::vector<uint8_t> patch = { byte_u };
InjectCode((void*)address, patch);
address++;
}
if (echo) std::cout << std::endl;
else if (comment_string.length() > 0)
{
std::cout << "[Patches]";
if (comment_string.at(0) != ' ') std::cout << ' ';
std::cout << comment_string << std::endl;
}
}
}
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();
std::string finalString = lists[i].finalize();
Storage::customAddStringContainer(&records[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;
extern "C" __declspec(dllexport) LPCWSTR GetPluginName(void)
{
return L"Patches";
}
extern "C" __declspec(dllexport) LPCWSTR GetPluginDescription(void)
{
return L"Applies patches/tweaks to the game before it starts.\nThis plugin is required.";
}
+149 -129
View File
@@ -1,129 +1,149 @@
#pragma once
#include "windows.h"
#include <string>
#include <vector>
std::string TrimString(const std::string& str, const std::string& whitespace)
{
const size_t strBegin = str.find_first_not_of(whitespace);
if (strBegin == std::string::npos)
return "";
const size_t strEnd = str.find_last_not_of(whitespace);
const size_t strRange = strEnd - strBegin + 1;
return str.substr(strBegin, strRange);
}
std::vector<std::string> SplitString(const std::string& str, const std::string& delim)
{
std::vector<std::string> tokens;
size_t prev = 0, pos = 0;
do
{
pos = str.find(delim, prev);
if (pos == std::string::npos)
pos = str.length();
std::string token = str.substr(prev, pos - prev);
if (!token.empty())
tokens.push_back(token);
prev = pos + delim.length();
} while (pos < str.length() && prev < str.length());
return tokens;
}
void InjectCode(void* address, const std::vector<uint8_t> data)
{
const size_t byteCount = data.size() * sizeof(uint8_t);
DWORD oldProtect;
VirtualProtect(address, byteCount, PAGE_EXECUTE_READWRITE, &oldProtect);
memcpy(address, data.data(), byteCount);
VirtualProtect(address, byteCount, oldProtect, nullptr);
}
// patchMovieExt will modify an extension to mp4 only if the file exists on disk as an mp4
void patchMovieExt(std::string moviefile, void* address)
{
bool isinmdata = 0;
try {
for (std::filesystem::path p : std::filesystem::directory_iterator("../mdata"))
{
if (std::filesystem::path(p).filename().string().at(0) != 'M' || std::filesystem::path(p).filename().string().length() > 4) continue;
if (std::filesystem::exists(p.string() + "/rom/movie/" + moviefile + ".mp4"))
{
isinmdata = 1;
//std::cout << "[Patches] Movie " << moviefile << ".mp4 found in M" << ss.str() << std::endl;
break;
}
}
}
catch (const std::filesystem::filesystem_error& e) {
std::cout << "[Patches] File system error " << e.what() << " " << e.path1() << " " << e.path2() << " " << e.code() << std::endl;
}
if (isinmdata || std::filesystem::exists("../rom/movie/" + moviefile + ".mp4"))
{
InjectCode(address, { 0x6D, 0x70, 0x34 });
std::cout << "[Patches] Movie " << moviefile << " patched to mp4\n";
return;
}
//std::cout << "[Patches] Movie " << moviefile << " NOT patched to mp4\n";
return;
}
const LPCWSTR CONFIG_FILE = L".\\config.ini";
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 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);
auto nHideVolCtrl = GetPrivateProfileIntW(L"patches", L"hide_volume", FALSE, CONFIG_FILE);
auto nNoLyrics = GetPrivateProfileIntW(L"patches", L"no_lyrics", FALSE, CONFIG_FILE);
auto nNoMovies = GetPrivateProfileIntW(L"patches", L"no_movies", FALSE, CONFIG_FILE);
auto nMP4Movies = GetPrivateProfileIntW(L"patches", L"mp4_movies", 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 nNoTimerSprite = GetPrivateProfileIntW(L"patches", L"no_timer_sprite", 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);
auto nCard = GetPrivateProfileIntW(L"patches", L"card", TRUE, CONFIG_FILE);
auto nHardwareSlider = GetPrivateProfileIntW(L"patches", L"hardware_slider", FALSE, CONFIG_FILE);
auto nOGLPatchA = GetPrivateProfileIntW(L"patches", L"opengl_patch_a", FALSE, CONFIG_FILE);
auto nOGLPatchB = GetPrivateProfileIntW(L"patches", L"opengl_patch_b", FALSE, CONFIG_FILE);
auto nTAA = GetPrivateProfileIntW(L"graphics", L"taa", TRUE, CONFIG_FILE);
auto nMLAA = GetPrivateProfileIntW(L"graphics", L"mlaa", TRUE, CONFIG_FILE);
auto nDoF = GetPrivateProfileIntW(L"graphics", L"dof", TRUE, CONFIG_FILE);
auto nMAG = GetPrivateProfileIntW(L"graphics", L"mag", 0, CONFIG_FILE);
auto nStereo = GetPrivateProfileIntW(L"patches", L"stereo", TRUE, CONFIG_FILE);
auto nCustomPatches = GetPrivateProfileIntW(L"patches", L"custom_patches", TRUE, CONFIG_FILE);
auto nQuickStart = GetPrivateProfileIntW(L"patches", L"quick_start", 1, CONFIG_FILE);
auto nNoScrollingSfx = GetPrivateProfileIntW(L"patches", L"no_scrolling_sfx", FALSE, CONFIG_FILE);
auto nNoHandScaling = GetPrivateProfileIntW(L"patches", L"no_hand_scaling", FALSE, CONFIG_FILE);
auto nDefaultHandSize = GetPrivateProfileIntW(L"patches", L"default_hand_size", -1, CONFIG_FILE);
auto nSingMissed = GetPrivateProfileIntW(L"patches", L"sing_missed", FALSE, CONFIG_FILE);
auto nForceMouth = GetPrivateProfileIntW(L"patches", L"force_mouth", 0, CONFIG_FILE);
auto nForceExpressions = GetPrivateProfileIntW(L"patches", L"force_expressions", 0, CONFIG_FILE);
auto nForceLook = GetPrivateProfileIntW(L"patches", L"force_look", 0, CONFIG_FILE);
auto nNpr1 = GetPrivateProfileIntW(L"graphics", L"npr1", 0, CONFIG_FILE);
auto nReflections = GetPrivateProfileIntW(L"graphics", L"reflections", TRUE, CONFIG_FILE);
auto nShadows = GetPrivateProfileIntW(L"graphics", L"shadows", TRUE, CONFIG_FILE);
auto nPunchthrough = GetPrivateProfileIntW(L"graphics", L"punchthrough", TRUE, CONFIG_FILE);
auto nGlare = GetPrivateProfileIntW(L"graphics", L"glare", TRUE, CONFIG_FILE);
auto nShader = GetPrivateProfileIntW(L"graphics", L"shader", TRUE, CONFIG_FILE);
auto n2D = GetPrivateProfileIntW(L"graphics", L"2D", FALSE, CONFIG_FILE);
auto nNoDelete = GetPrivateProfileIntW(L"patches", L"prevent_data_deletion", FALSE, CONFIG_FILE);
auto nReflectResWidth = GetPrivateProfileIntW(L"graphics", L"reflect_res_width", 512, CONFIG_FILE);
auto nReflectResHeight = GetPrivateProfileIntW(L"graphics", L"reflect_res_height", 256, CONFIG_FILE);
auto nRefractResWidth = GetPrivateProfileIntW(L"graphics", L"refract_res_width", 512, CONFIG_FILE);
auto nRefractResHeight = GetPrivateProfileIntW(L"graphics", L"refract_res_height", 256, CONFIG_FILE);
auto nLagCompensation = GetPrivateProfileIntW(L"graphics", L"lag_compensation", 0, CONFIG_FILE);
#pragma once
#include "windows.h"
#include <string>
#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)
{
const size_t strBegin = str.find_first_not_of(whitespace);
if (strBegin == std::string::npos)
return "";
const size_t strEnd = str.find_last_not_of(whitespace);
const size_t strRange = strEnd - strBegin + 1;
return str.substr(strBegin, strRange);
}
std::vector<std::string> SplitString(const std::string& str, const std::string& delim)
{
std::vector<std::string> tokens;
size_t prev = 0, pos = 0;
do
{
pos = str.find(delim, prev);
if (pos == std::string::npos)
pos = str.length();
std::string token = str.substr(prev, pos - prev);
if (!token.empty())
tokens.push_back(token);
prev = pos + delim.length();
} while (pos < str.length() && prev < str.length());
return tokens;
}
void InjectCode(void* address, const std::vector<uint8_t> data)
{
const size_t byteCount = data.size() * sizeof(uint8_t);
DWORD oldProtect;
VirtualProtect(address, byteCount, PAGE_EXECUTE_READWRITE, &oldProtect);
memcpy(address, data.data(), byteCount);
VirtualProtect(address, byteCount, oldProtect, nullptr);
}
void InjectUint(void* address, const uint32_t data)
{
DWORD oldProtect;
VirtualProtect(address, 4, PAGE_EXECUTE_READWRITE, &oldProtect);
memcpy(address, &data, 4);
VirtualProtect(address, 4, oldProtect, nullptr);
}
// patchMovieExt will modify an extension to mp4 only if the file exists on disk as an mp4
void patchMovieExt(std::string moviefile, void* address)
{
bool isinmdata = 0;
try {
for (std::filesystem::path p : std::filesystem::directory_iterator("../mdata"))
{
if (std::filesystem::path(p).filename().string().at(0) != 'M' || std::filesystem::path(p).filename().string().length() > 4) continue;
if (std::filesystem::exists(p.string() + "/rom/movie/" + moviefile + ".mp4"))
{
isinmdata = 1;
//std::cout << "[Patches] Movie " << moviefile << ".mp4 found in M" << ss.str() << std::endl;
break;
}
}
}
catch (const std::filesystem::filesystem_error& e) {
std::cout << "[Patches] File system error " << e.what() << " " << e.path1() << " " << e.path2() << " " << e.code() << std::endl;
}
if (isinmdata || std::filesystem::exists("../rom/movie/" + moviefile + ".mp4"))
{
InjectCode(address, { 0x6D, 0x70, 0x34 });
std::cout << "[Patches] Movie " << moviefile << " patched to mp4\n";
return;
}
//std::cout << "[Patches] Movie " << moviefile << " NOT patched to mp4\n";
return;
}
const LPCWSTR CONFIG_FILE = L".\\config.ini";
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);
auto nHideVolCtrl = GetPrivateProfileIntW(L"patches", L"hide_volume", FALSE, CONFIG_FILE);
auto nNoLyrics = GetPrivateProfileIntW(L"patches", L"no_lyrics", FALSE, CONFIG_FILE);
auto nNoMovies = GetPrivateProfileIntW(L"patches", L"no_movies", FALSE, CONFIG_FILE);
auto nMP4Movies = GetPrivateProfileIntW(L"patches", L"mp4_movies", 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 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);
auto nCard = GetPrivateProfileIntW(L"patches", L"card", TRUE, CONFIG_FILE);
auto nHardwareSlider = GetPrivateProfileIntW(L"patches", L"hardware_slider", FALSE, CONFIG_FILE);
auto nTAA = GetPrivateProfileIntW(L"graphics", L"taa", TRUE, CONFIG_FILE);
auto nMLAA = GetPrivateProfileIntW(L"graphics", L"mlaa", TRUE, CONFIG_FILE);
auto nDoF = GetPrivateProfileIntW(L"graphics", L"dof", TRUE, CONFIG_FILE);
auto nMAG = GetPrivateProfileIntW(L"graphics", L"mag", 0, CONFIG_FILE);
auto nGamma = GetPrivateProfileIntW(L"graphics", L"gamma", 100, CONFIG_FILE);
auto nStereo = GetPrivateProfileIntW(L"patches", L"stereo", TRUE, CONFIG_FILE);
auto nCustomPatches = GetPrivateProfileIntW(L"patches", L"custom_patches", TRUE, CONFIG_FILE);
auto nQuickStart = GetPrivateProfileIntW(L"patches", L"quick_start", 0, CONFIG_FILE);
auto nNoScrollingSfx = GetPrivateProfileIntW(L"patches", L"no_scrolling_sfx", FALSE, CONFIG_FILE);
auto nEnablePvCustomization = GetPrivateProfileIntW(L"patches", L"enable_pv_customization", FALSE, CONFIG_FILE);
auto nNoHandScaling = GetPrivateProfileIntW(L"patches", L"no_hand_scaling", FALSE, CONFIG_FILE);
auto nDefaultHandSize = GetPrivateProfileIntW(L"patches", L"default_hand_size_uint", 0, CONFIG_FILE);
auto nSingMissed = GetPrivateProfileIntW(L"patches", L"sing_missed", FALSE, CONFIG_FILE);
auto nForceMouth = GetPrivateProfileIntW(L"patches", L"force_mouth", 0, CONFIG_FILE);
auto nForceExpressions = GetPrivateProfileIntW(L"patches", L"force_expressions", 0, CONFIG_FILE);
auto nForceLook = GetPrivateProfileIntW(L"patches", L"force_look", 0, CONFIG_FILE);
auto nNpr1 = GetPrivateProfileIntW(L"graphics", L"npr1", 0, CONFIG_FILE);
auto nReflections = GetPrivateProfileIntW(L"graphics", L"reflections", TRUE, CONFIG_FILE);
auto nShadows = GetPrivateProfileIntW(L"graphics", L"shadows", TRUE, CONFIG_FILE);
auto nPunchthrough = GetPrivateProfileIntW(L"graphics", L"punchthrough", TRUE, CONFIG_FILE);
auto nGlare = GetPrivateProfileIntW(L"graphics", L"glare", TRUE, CONFIG_FILE);
auto nShader = GetPrivateProfileIntW(L"graphics", L"shader", TRUE, CONFIG_FILE);
auto n2D = GetPrivateProfileIntW(L"graphics", L"2D", FALSE, CONFIG_FILE);
auto nReflectResWidth = GetPrivateProfileIntW(L"graphics", L"reflect_res_width", 512, CONFIG_FILE);
auto nReflectResHeight = GetPrivateProfileIntW(L"graphics", L"reflect_res_height", 256, CONFIG_FILE);
auto nRefractResWidth = GetPrivateProfileIntW(L"graphics", L"refract_res_width", 512, CONFIG_FILE);
auto nRefractResHeight = GetPrivateProfileIntW(L"graphics", L"refract_res_height", 256, CONFIG_FILE);
auto nShadowResWidth = GetPrivateProfileIntW(L"graphics", L"shadow_res_width", 2048, CONFIG_FILE);
auto nShadowResHeight = GetPrivateProfileIntW(L"graphics", L"shadow_res_height", 2048, CONFIG_FILE);
auto nLagCompensation = GetPrivateProfileIntW(L"graphics", L"lag_compensation", 0, CONFIG_FILE);
auto nUseDivahookBat = GetPrivateProfileIntW(L"launcher", L"use_divahook_bat", 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();
}
+51 -42
View File
@@ -135,8 +135,8 @@ __int64 hookedParseParameters(int a1, __int64* a2)
case 600:
*resolutionType_600 = 15;
break;
default:
*resolutionType_710 = 15;
//default:
// *resolutionType_710 = 15;
}
// Return to the original function
switch (game_version)
@@ -144,8 +144,8 @@ __int64 hookedParseParameters(int a1, __int64* a2)
case 600:
return divaParseParameters_600(a1, a2);
break;
default:
return divaParseParameters_710(a1, a2);
//default:
// return divaParseParameters_710(a1, a2);
}
}
@@ -231,6 +231,40 @@ __int64 __fastcall limiterFuncLight(__int64 a1)
}
}
#define WRITE_MEMORY_INT(address, data) \
{ \
DWORD oldProtect, bck; \
VirtualProtect((BYTE*)(address), 4, PAGE_EXECUTE_READWRITE, &oldProtect); \
*((int*)(address)) = (data); \
VirtualProtect((BYTE*)(address), 4, oldProtect, &bck); \
}
void __fastcall hookedInitRender(int ssaa, int hd_res, int ss_alpha_mask, __int8 npr) {
if (nIntRes)
{
const __int64 widthAddress = 0x0000000140EDA8B0 + 0x0C;
const __int64 heightAddress = 0x0000000140EDA8B0 + 0x10;
const __int64 intWidthAddress = 0x0000000140EDA8D8 + 0x0C;
const __int64 intHeightAddress = 0x0000000140EDA8D8 + 0x10;
int originalWidth = *(int*)widthAddress;
int originalHeight = *(int*)heightAddress;
int originalIntWidth = *(int*)intWidthAddress;
int originalIntHeight = *(int*)intHeightAddress;
WRITE_MEMORY_INT(widthAddress, nIntResWidth);
WRITE_MEMORY_INT(heightAddress, nIntResHeight);
WRITE_MEMORY_INT(intWidthAddress, nIntResWidth);
WRITE_MEMORY_INT(intHeightAddress, nIntResHeight);
divaInitRender_710(ssaa, hd_res, ss_alpha_mask, npr);
WRITE_MEMORY_INT(widthAddress, originalWidth);
WRITE_MEMORY_INT(heightAddress, originalHeight);
WRITE_MEMORY_INT(intWidthAddress, originalIntWidth);
WRITE_MEMORY_INT(intHeightAddress, originalIntHeight);
}
else
divaInitRender_710(ssaa, hd_res, ss_alpha_mask, npr);
}
__int64 __fastcall hookedEngineUpdate(__int64 a1)
{
if (nFpsLimit < 1)
@@ -284,17 +318,17 @@ BOOL APIENTRY DllMain(HMODULE hModule,
}
DetourTransactionCommit();
DetourTransactionBegin();
DetourUpdateThread(GetCurrentThread());
switch (game_version)
{
case 600:
DetourTransactionBegin();
DetourUpdateThread(GetCurrentThread());
DetourAttach(&(PVOID&)divaParseParameters_600, hookedParseParameters);
DetourTransactionCommit();
break;
default:
DetourAttach(&(PVOID&)divaParseParameters_710, hookedParseParameters);
//default:
// DetourAttach(&(PVOID&)divaParseParameters_710, hookedParseParameters);
}
DetourTransactionCommit();
// set sleep time resolution to 2ms or device minimum (whichever's lower)
@@ -340,39 +374,14 @@ BOOL APIENTRY DllMain(HMODULE hModule,
switch (game_version)
{
case 600:
{
DWORD oldProtect, bck;
VirtualProtect((BYTE*)0x0000000140980954, 4, PAGE_EXECUTE_READWRITE, &oldProtect);
*((int*)0x0000000140980954) = nIntResWidth;
VirtualProtect((BYTE*)0x0000000140980954, 6, oldProtect, &bck);
}
{
DWORD oldProtect, bck;
VirtualProtect((BYTE*)0x0000000140980958, 4, PAGE_EXECUTE_READWRITE, &oldProtect);
*((int*)0x0000000140980958) = nIntResHeight;
VirtualProtect((BYTE*)0x0000000140980958, 6, oldProtect, &bck);
}
break;
WRITE_MEMORY_INT(0x0000000140980954, nIntResWidth);
WRITE_MEMORY_INT(0x0000000140980958, nIntResWidth);
break;
default:
{
DWORD oldProtect, bck;
VirtualProtect((BYTE*)0x00000001409B8B68, 4, PAGE_EXECUTE_READWRITE, &oldProtect);
*((int*)0x00000001409B8B68) = nIntResWidth;
VirtualProtect((BYTE*)0x00000001409B8B68, 6, oldProtect, &bck);
}
{
DWORD oldProtect, bck;
VirtualProtect((BYTE*)0x00000001409B8B6C, 4, PAGE_EXECUTE_READWRITE, &oldProtect);
*((int*)0x00000001409B8B6C) = nIntResHeight;
VirtualProtect((BYTE*)0x00000001409B8B6C, 6, oldProtect, &bck);
}
//*((int*)0x00000001409B8B6C) = maxHeight;
//*((int*)0x00000001409B8B14) = maxWidth;
//*((int*)0x00000001409B8B18) = maxHeight;
//*((int*)0x00000001409B8B1C) = maxWidth; // No parameters width?
//*((int*)0x00000001409B8B20) = maxHeight; // No parameters height?
DetourTransactionBegin();
DetourUpdateThread(GetCurrentThread());
DetourAttach(&(PVOID&)divaInitRender_710, hookedInitRender);
DetourTransactionCommit();
}
}
}
@@ -390,4 +399,4 @@ extern "C" __declspec(dllexport) LPCWSTR GetPluginName(void)
extern "C" __declspec(dllexport) LPCWSTR GetPluginDescription(void)
{
return L"Applies window mode/size and FPS limiting.";
}
}
@@ -6,11 +6,12 @@
#include <string>
static int(__cdecl* divaCreateWindow_710)(const char* title, void(__cdecl* exitfunc)(int)) = (int(__cdecl*)(const char* title, void(__cdecl * exitfunc)(int)))0x140194D00;
__int64 (__fastcall* divaParseParameters_710)(int a1, __int64* a2) = (__int64(__fastcall*)(int a1, __int64* a2))0x140193630;
void(__fastcall* divaInitRender_710)(int ssaa, int hd_res, int ss_alpha_mask, __int8 npr) = (void(__fastcall *)(int ssaa, int hd_res, int ss_alpha_mask, __int8 npr))0x0000000140502A10;
//__int64 (__fastcall* divaParseParameters_710)(int a1, __int64* a2) = (__int64(__fastcall*)(int a1, __int64* a2))0x140193630;
__int64(__fastcall* divaEngineUpdate_710)(__int64 a1) = (__int64(__fastcall*)(__int64 a1))0x140194CD0;
uint8_t* fullScreenFlag_710 = (uint8_t*)0x140EDA5D1;
DWORD* resolutionType_710 = (DWORD*)0x140EDA5D4;
//DWORD* resolutionType_710 = (DWORD*)0x140EDA5D4;
static int(__cdecl* divaCreateWindow_600)(const char* title, void(__cdecl* exitfunc)(int)) = (int(__cdecl*)(const char* title, void(__cdecl * exitfunc)(int)))0x14018CD00;
@@ -1,6 +1,7 @@
#pragma once
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#include <windows.h>
//#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
//#include <windows.h>
//#include <psapi.h>
#include <string>
#include <vector>
#include <map>
@@ -127,3 +128,36 @@ LPCWSTR DATA_FILE = DATA_FILE_STRING.c_str();
std::wstring CONFIG_FILE_STRING = DirPath() + L"\\plugins\\ShaderPatchConfig.ini";
LPCWSTR CONFIG_FILE = CONFIG_FILE_STRING.c_str();
//bool hasConflicts()
//{
// printf("[ShaderPatch] Checking for conflicts...\n");
//
// HMODULE* hModules = new HMODULE[USHRT_MAX];
// HANDLE hProcess;
// DWORD cbNeeded;
//
// hProcess = GetCurrentProcess();
//
// if (EnumProcessModules(hProcess, hModules, sizeof(hModules), &cbNeeded)) {
// for (unsigned long long i = 0; i < (cbNeeded / sizeof(HMODULE)); i++) {
// auto pNameFunc = (LPCWSTR(*)())GetProcAddress(hModules[i], "GetPluginName");
// if (pNameFunc) {
// LPCWSTR name = pNameFunc();
// if (name && lstrcmpW(name, L"DivaGL") == 0)
// {
// // detected DivaGL
// printf("[ShaderPatch] Detected DivaGL! Quitting!\n");
//#ifdef _DEBUG
// MessageBoxExW(NULL, L"Detected DivaGL! Quitting!\n", L"ShaderPatch", MB_OK, 0);
//#endif
// delete[] hModules;
// return true;
// }
// }
// }
// }
//
// printf("[ShaderPatch] No conflicts found.\n");
// delete[] hModules;
// return false;
//}
@@ -8,6 +8,7 @@
#include "../../Input/Bindings/XinputBinding.h"
#include "../../Input/Bindings/MouseBinding.h"
#include "../../Input/Bindings/Ds4Binding.h"
#include "../../Input/Bindings/DVLBinding.h"
#include "../../Input/KeyConfig/Config.h"
#include "../../Utilities/Operations.h"
#include "../../Utilities/EnumBitwiseOperations.h"
@@ -82,6 +83,8 @@ namespace TLAC::Components
MenuCircleBinding = new Binding();
CoinBinding = new Binding();
ToonBinding = new Binding();
WireframeBinding = new Binding();
FileSystem::ConfigFile configFile(framework::GetModuleDirectory(), KEY_CONFIG_FILE_NAME);
configFile.OpenRead();
@@ -100,9 +103,20 @@ namespace TLAC::Components
Config::BindConfigKeys(configFile.ConfigMap, "MENU_L", *MenuLBinding, { "Left", "Up" });
Config::BindConfigKeys(configFile.ConfigMap, "MENU_R", *MenuRBinding, { "Down", "Right" });
Config::BindConfigKeys(configFile.ConfigMap, "MENU_CIRCLE", *MenuCircleBinding, { "D", "L", "Spacebar" });
Config::BindConfigKeys(configFile.ConfigMap, "TOON", *ToonBinding, { "F9" });
Config::BindConfigKeys(configFile.ConfigMap, "COIN", *CoinBinding, { "F10" });
Config::BindConfigKeys(configFile.ConfigMap, "WIREFRAME", *WireframeBinding, { "Backspace" });
mouseScrollPvSelection = configFile.GetBooleanValue("mouse_scroll_pv_selection");
TestBinding->AddBinding(new DivallerBinding(DivallerButton::DVL_L3));
ServiceBinding->AddBinding(new DivallerBinding(DivallerButton::DVL_L2));
CoinBinding->AddBinding(new DivallerBinding(DivallerButton::DVL_L1));
StartBinding->AddBinding(new DivallerBinding(DivallerButton::DVL_FN));
SankakuBinding->AddBinding(new DivallerBinding(DivallerButton::DVL_TRIANGLE));
ShikakuBinding->AddBinding(new DivallerBinding(DivallerButton::DVL_SQUARE));
BatsuBinding->AddBinding(new DivallerBinding(DivallerButton::DVL_CROSS));
MaruBinding->AddBinding(new DivallerBinding(DivallerButton::DVL_CIRCLE));
}
void InputEmulator::Update()
@@ -168,6 +182,15 @@ namespace TLAC::Components
// repress held down buttons to not block input
//inputState->Down.Buttons ^= inputState->Tapped.Buttons;
if (CoinBinding->AnyTapped())
addCoin();
if (ToonBinding->AnyTapped())
toggleNpr1();
if (WireframeBinding->AnyTapped())
toggleWireframe();
}
HoldState InputEmulator::GetHoldState()
@@ -299,9 +322,6 @@ namespace TLAC::Components
if (buttonTestFunc(RightBinding))
buttons |= JVS_R;
if (buttonTestFunc(CoinBinding))
addCoin();
return buttons;
}
@@ -345,9 +365,6 @@ namespace TLAC::Components
if (keyboard->IsIntervalTapped(VK_SPACE))
inputKey = 0x20;
if (keyboard->IsIntervalTapped(VK_F9))
toggleNpr1();
if (keyboard->IsDoubleTapped(VK_ESCAPE))
*(bool*)SHOULD_EXIT_BOOL_ADDRESS = true;
@@ -465,4 +482,28 @@ namespace TLAC::Components
printf("[TLAC] NPR1 restored\n");
}
}
void InputEmulator::toggleWireframe()
{
static bool wireframeEnabled = false;
if (!wireframeEnabled)
{
// inject samyuu's wireframe code
InjectCode((void*)0x00000000140500BE6, { 0xBA, 0x01, 0x1B, 0x00, 0x00, // mov edx,00001B01
0xB9, 0x08, 0x04, 0x00, 0x00, // mov ecx,00000408
0xE8, 0xE1, 0x5A, 0x3B, 0x00, // call 1408B66D6
0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 });
wireframeEnabled = true;
printf("[TLAC] Wireframe enabled\n");
}
else
{
InjectCode((void*)0x00000000140500BE6, { 0xB9, 0x1C, 0x00, 0x00, 0x00, 0xE8, 0x30, 0x7C, 0xF3, 0xFF, 0xB9, 0x1B, 0x00, 0x00, 0x00, 0x8B, 0xD8, 0xE8, 0x24, 0x7C, 0xF3, 0xFF, 0xB9, 0x1A, 0x00, 0x00, 0x00 });
wireframeEnabled = false;
printf("[TLAC] Wireframe disabled\n");
}
}
}
@@ -39,6 +39,8 @@ namespace TLAC::Components
Input::Binding* MenuCircleBinding;
Input::Binding* CoinBinding;
Input::Binding* ToonBinding;
Input::Binding* WireframeBinding;
InputEmulator();
~InputEmulator();
@@ -111,5 +113,6 @@ namespace TLAC::Components
void addCoin();
void toggleNpr1();
void toggleWireframe();
};
}
@@ -7,6 +7,7 @@
#include "../../Input/Bindings/KeyboardBinding.h"
#include "../../Input/KeyConfig/Config.h"
#include "../../Input/DirectInput/Ds4/DualShock4.h"
#include "../../Input/Divaller/Divaller.h"
#include "../../FileSystem/ConfigFile.h"
#include "../../Utilities/Math.h"
#include <algorithm>
@@ -100,7 +101,11 @@ namespace TLAC::Components
if (!componentsManager->GetUpdateGameInput() || componentsManager->IsDwGuiActive() || (!enableInMenus && !(*(GameState*)CURRENT_GAME_STATE_ADDRESS == GS_GAME && *(SubGameState*)CURRENT_GAME_SUB_STATE_ADDRESS == SUB_GAME_MAIN)))
return;
if (usePs4OfficialSlider)
if (Input::Divaller::GetInstance() != nullptr)
{
ApplyBitfieldState(Input::Divaller::GetInstance()->GetSlider());
}
else if (usePs4OfficialSlider)
{
DualShock4* ds4 = DualShock4::GetInstance();
if (ds4 == nullptr)
@@ -140,7 +145,7 @@ namespace TLAC::Components
void TouchSliderEmulator::OnFocusLost()
{
if (usePs4OfficialSlider)
if (usePs4OfficialSlider || Input::Divaller::GetInstance() != nullptr)
sliderState->ResetSensors(TouchSliderState::SENSOR_SET_MODE_RAW);
else
sliderState->ResetSensors(TouchSliderState::SENSOR_SET_MODE_SECTIONS);
@@ -32,9 +32,13 @@ namespace TLAC::Components
Pause::menusets Pause::curMenuSet = MENUSET_MAIN;
std::chrono::time_point<std::chrono::high_resolution_clock> Pause::menuItemMoveTime;
std::vector<uint8_t> Pause::origAetMovOp;
float_t Pause::origDeltaFrameHistory = 0.0f;
int32_t Pause::origDeltaFrameHistoryInt = 0;
uint8_t* Pause::aetMovPatchAddress = (uint8_t*)0x1401703b3;
std::vector<uint8_t> Pause::origFramespeedOp;
uint8_t* Pause::framespeedPatchAddress = (uint8_t*)0x140192D50;
float_t* Pause::deltaFrameHistoryAddress = (float_t*)0x140EDA6C0;
int32_t* Pause::deltaFrameHistoryIntAddress = (int32_t*)0x140EDA6C4;
std::vector<uint8_t> Pause::origAgeageHairOp;
uint8_t* Pause::ageageHairPatchAddress = (uint8_t*)0x14054352c;
std::vector<bool> Pause::streamPlayStates;
@@ -136,6 +140,12 @@ namespace TLAC::Components
InjectCode(framespeedPatchAddress, { 0x0f, 0x57, 0xc0, 0xc3 }); // XORPS XMM0,XMM0; RET
InjectCode(ageageHairPatchAddress, { 0x0f, 0x57, 0xdb }); // XORPS XMM3,XMM3
origDeltaFrameHistory = *deltaFrameHistoryAddress;
origDeltaFrameHistoryInt = *deltaFrameHistoryIntAddress;
*deltaFrameHistoryAddress = 0.0f;
*deltaFrameHistoryIntAddress = 0;
uint64_t audioMixerAddr = *(uint64_t*)(AUDIO_MAIN_CLASS_ADDRESS + 0x70);
uint64_t audioStreamsAddress = *(uint64_t*)(audioMixerAddr + 0x18);
int nAudioStreams = *(uint64_t*)(audioMixerAddr + 0x20);
@@ -279,6 +289,9 @@ namespace TLAC::Components
InjectCode(framespeedPatchAddress, origFramespeedOp);
InjectCode(ageageHairPatchAddress, origAgeageHairOp);
*deltaFrameHistoryAddress = origDeltaFrameHistory;
*deltaFrameHistoryIntAddress = origDeltaFrameHistoryInt;
uint64_t audioMixerAddr = *(uint64_t*)(AUDIO_MAIN_CLASS_ADDRESS + 0x70);
uint64_t audioStreamsAddress = *(uint64_t*)(audioMixerAddr + 0x18);
int nAudioStreams = *(uint64_t*)(audioMixerAddr + 0x20);
@@ -47,6 +47,10 @@ namespace TLAC::Components
static std::vector<uint8_t> origFramespeedOp;
static uint8_t* framespeedPatchAddress;
static float_t origDeltaFrameHistory;
static int32_t origDeltaFrameHistoryInt;
static float_t* deltaFrameHistoryAddress;
static int32_t* deltaFrameHistoryIntAddress;
static std::vector<uint8_t> origAgeageHairOp;
static uint8_t* ageageHairPatchAddress;
+1 -1
View File
@@ -8,7 +8,7 @@ constexpr uint8_t JNE_OPCODE = 0x85;
//constexpr uint64_t ENGINE_UPDATE_HOOK_TARGET_ADDRESS = 0x000000014018CC40;
constexpr uint64_t ENGINE_UPDATE_INPUT_ADDRESS = 0x000000014018CBB0;
constexpr uint64_t ENGINE_DRAW_2D_ADDRESS = 0x0000000140501F70;
constexpr uint64_t ENGINE_STAGE_DISP_SHADOW_ADDRESS = 0x0000000140649840;
constexpr uint64_t ENGINE_FINISH_DRAW_ADDRESS = 0x0000000140192730;
constexpr uint64_t CURRENT_GAME_STATE_ADDRESS = 0x0000000140EDA810;
@@ -23,12 +23,12 @@ namespace TLAC::FileSystem
return found;
}
int ConfigFile::GetIntegerValue(const std::string& key)
int ConfigFile::GetIntegerValue(const std::string& key, int defaultval)
{
auto pair = ConfigMap.find(key);
bool found = pair != ConfigMap.end();
return found ? atoi(pair->second.c_str()) : 0;
return found ? atoi(pair->second.c_str()) : defaultval;
}
bool ConfigFile::GetBooleanValue(const std::string& key)
@@ -14,7 +14,7 @@ namespace TLAC::FileSystem
std::unordered_map<std::string, std::string> ConfigMap;
bool TryGetValue(const std::string &key, std::string **value);
int GetIntegerValue(const std::string& key);
int GetIntegerValue(const std::string& key, int defaultval = 0);
bool GetBooleanValue(const std::string& key);
float GetFloatValue(const std::string& key);
std::string GetStringValue(const std::string& key);
@@ -0,0 +1,29 @@
#include "DVLBinding.h"
namespace TLAC::Input
{
#define DivallerInstanceCheckDefault(checkFunc) (Divaller::InstanceInitialized() ? Divaller::GetInstance()->checkFunc : false)
DivallerBinding::DivallerBinding(DivallerButton button) : Button(button)
{
}
DivallerBinding::~DivallerBinding()
{
}
bool DivallerBinding::IsDown()
{
return DivallerInstanceCheckDefault(IsDown(Button));
}
bool DivallerBinding::IsTapped()
{
return DivallerInstanceCheckDefault(IsTapped(Button));
}
bool DivallerBinding::IsReleased()
{
return DivallerInstanceCheckDefault(IsReleased(Button));
}
}
@@ -0,0 +1,19 @@
#pragma once
#include "IInputBinding.h"
#include "../Divaller/Divaller.h"
namespace TLAC::Input
{
class DivallerBinding : public IInputBinding
{
public:
DivallerButton Button;
DivallerBinding(DivallerButton button);
~DivallerBinding();
bool IsDown() override;
bool IsTapped() override;
bool IsReleased() override;
};
}
@@ -21,7 +21,9 @@ namespace TLAC::Input
// Hori F2nd Miniboard (Hatsune Miku Sho): {00490F0D-0000-0000-0000-504944564944}
{ 0x00490F0D, 0x0000, 0x0000, { 0x00, 0x00, 0x50, 0x49, 0x44, 0x56, 0x49, 0x44 } },
// Hori FT Senyou: {013C0F0D-0000-0000-0000-504944564944}
{ 0x013C0F0D, 0x0000, 0x0000, { 0x00, 0x00, 0x50, 0x49, 0x44, 0x56, 0x49, 0x44 } }
{ 0x013C0F0D, 0x0000, 0x0000, { 0x00, 0x00, 0x50, 0x49, 0x44, 0x56, 0x49, 0x44 } },
// HORI HATSUNE MIKU 39S CONTROLLER: {00FB0F0D-0000-0000-0000-504944564944}
{ 0x00FB0F0D, 0x0000, 0x0000, { 0x00, 0x00, 0x50, 0x49, 0x44, 0x56, 0x49, 0x44 } }
};
class DualShock4 : public Controller, public IInputDevice
@@ -72,4 +74,4 @@ namespace TLAC::Input
bool MatchesDirection(Joystick joystick, Direction directionEnum, float threshold);
bool GetButtonState(Ds4State &state, Ds4Button button);
};
}
}
@@ -0,0 +1,272 @@
#include "Divaller.h"
#include "../../framework.h"
#include "DivallerButton.h"
#include "DivallerState.h"
#include <stdio.h>
#include <string>
#include <iostream>
namespace TLAC::Input
{
Divaller *Divaller::instance;
Divaller::Divaller()
{
memset(outputBuffer, 0, sizeof(outputBuffer));
outputBuffer[0] = 0x44;
outputBuffer[1] = 0x4c;
outputBuffer[2] = 0x61;
}
Divaller::~Divaller()
{
CloseHandle(hDeviceHandle);
}
bool Divaller::TryInitializeInstance()
{
if (InstanceInitialized())
return true;
Divaller *divaller = new Divaller();
BOOL success = divaller->Initialize();
instance = success ? divaller : nullptr;
if (!success)
delete divaller;
return success;
}
bool Divaller::Initialize()
{
HDEVINFO hDevInfo = SetupDiGetClassDevs(&GUID_DEVINTERFACE_USB_DEVICE, NULL, NULL, DIGCF_PRESENT | DIGCF_DEVICEINTERFACE);
if (hDevInfo == INVALID_HANDLE_VALUE)
{
printf("[TLAC] Divaller::Initialize(): SetupDiGetClassDevs returned INVALID_HANDLE_VALUE\n");
return false;
}
LPCWSTR devPath = NULL;
for (size_t i = 0;; i++)
{
SP_DEVICE_INTERFACE_DATA device_interface_data = {0};
device_interface_data.cbSize = sizeof(SP_DEVICE_INTERFACE_DATA);
BOOL success = SetupDiEnumDeviceInterfaces(
hDevInfo,
NULL,
&GUID_DEVINTERFACE_USB_DEVICE,
(DWORD)i,
&device_interface_data);
if (!success)
{
break;
}
ULONG required_length = 0;
success = SetupDiGetDeviceInterfaceDetail(
hDevInfo,
&device_interface_data,
NULL,
0,
&required_length,
NULL);
UINT8 *interface_data = (UINT8 *)calloc(required_length, sizeof(UINT8));
PSP_DEVICE_INTERFACE_DETAIL_DATA device_interface_detail_data = (PSP_DEVICE_INTERFACE_DETAIL_DATA)interface_data;
device_interface_detail_data->cbSize = sizeof(SP_DEVICE_INTERFACE_DETAIL_DATA);
ULONG actual_length = required_length;
success = SetupDiGetDeviceInterfaceDetail(
hDevInfo,
&device_interface_data,
device_interface_detail_data,
actual_length,
&required_length,
NULL);
if (!success)
{
continue;
}
if (
wcsstr(device_interface_detail_data->DevicePath, L"vid_0e8f") == 0 ||
wcsstr(device_interface_detail_data->DevicePath, L"pid_2213") == 0)
{
continue;
}
devPath = device_interface_detail_data->DevicePath;
break;
}
if (devPath == NULL)
{
SetupDiDestroyDeviceInfoList(hDevInfo);
return false;
}
hDeviceHandle = CreateFile(
devPath,
GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_READ | FILE_SHARE_WRITE,
NULL,
OPEN_EXISTING,
FILE_FLAG_OVERLAPPED,
NULL);
if (hDeviceHandle == INVALID_HANDLE_VALUE)
{
printf("[TLAC] Divaller::Initialize(): Open device failed.\n");
SetupDiDestroyDeviceInfoList(hDevInfo);
return false;
}
if (!WinUsb_Initialize(hDeviceHandle, &hInterfaceHandle))
{
printf("[TLAC] Divaller::Initialize(): WinUsb_Initialize failed.\n");
std::cout << GetLastError() << std::endl;
SetupDiDestroyDeviceInfoList(hDevInfo);
CloseHandle(hDeviceHandle);
return false;
}
USB_INTERFACE_DESCRIPTOR USBInterfaceDescriptor;
if (!WinUsb_QueryInterfaceSettings(hInterfaceHandle, 0, &USBInterfaceDescriptor))
{
std::cout << GetLastError() << std::endl;
SetupDiDestroyDeviceInfoList(hDevInfo);
CloseHandle(hDeviceHandle);
return false;
}
SetupDiDestroyDeviceInfoList(hDevInfo);
return true;
}
bool Divaller::PollInput()
{
lastState = currentState;
ULONG len = 0;
memset(currentState.state, 0, sizeof(currentState.state));
BOOL bResult = WinUsb_ReadPipe(hInterfaceHandle, (UCHAR)132, currentState.state, _countof(currentState.state), &len, nullptr);
if (!bResult || currentState.state[0] != 0x42 || currentState.state[1] != 0x56 || currentState.state[2] != 0x5a)
{
printf("[TLAC] Divaller::PollInput(): WinUsb_ReadPipe failed.\n");
std::cout << GetLastError() << std::endl;
}
SetLED();
return bResult;
}
bool Divaller::SetLED()
{
outputBuffer[3] &= 0x0F; // Reset Button LED
outputBuffer[3] |= (!(*buttonLed >> 1 & 0x0001)) << 4; // SQUARE
outputBuffer[3] |= (!(*buttonLed >> 3 & 0x0001)) << 5; // CIRCLE
outputBuffer[3] |= (!(*buttonLed & 0x0001)) << 6; // TRIANGLE
outputBuffer[3] |= (!(*buttonLed >> 2 & 0x0001)) << 7; // CROSS
if (*sliderLedInit && !sliderLedData)
{
sliderLedData = reinterpret_cast<UCHAR *>(*(uint64_t *)(0x14cc5de40 + 0x68) + 0x189c);
}
if (sliderLedData)
{
for (int n = 0; n < 32; n++)
{
// LED number + 3 bytes header + color offset
outputBuffer[(31 - n) * 3 + 3 + 3] = sliderLedData[n * 3 + 1]; // BLUE
outputBuffer[(31 - n) * 3 + 3 + 2] = sliderLedData[n * 3 + 2]; // RED
outputBuffer[(31 - n) * 3 + 3 + 1] = sliderLedData[n * 3 + 3]; // GREEN
}
}
ULONG len = 0;
BOOL bResult = WinUsb_WritePipe(hInterfaceHandle, (UCHAR)0x03, outputBuffer, 100, &len, NULL);
if (!bResult)
{
printf("[TLAC] Divaller::SetLED(): WinUsb_WritePipe failed.\n");
std::cout << GetLastError() << std::endl;
}
return bResult;
}
bool Divaller::IsDown(DivallerButton button)
{
switch (button)
{
case DivallerButton::DVL_L1:
return (currentState.state[5] >> 0) & 1;
case DivallerButton::DVL_L2:
return (currentState.state[4] >> 7) & 1;
case DivallerButton::DVL_L3:
return (currentState.state[4] >> 6) & 1;
case DivallerButton::DVL_FN:
return (currentState.state[3] >> 1) & 1;
case DivallerButton::DVL_TRIANGLE:
return (currentState.state[3] >> 4) & 1;
case DivallerButton::DVL_SQUARE:
return (currentState.state[3] >> 2) & 1;
case DivallerButton::DVL_CROSS:
return (currentState.state[3] >> 5) & 1;
case DivallerButton::DVL_CIRCLE:
return (currentState.state[3] >> 3) & 1;
}
return false;
}
bool Divaller::IsUp(DivallerButton button)
{
return !IsDown(button);
}
bool Divaller::IsTapped(DivallerButton button)
{
return IsDown(button) && WasUp(button);
}
bool Divaller::IsReleased(DivallerButton button)
{
return IsUp(button) && WasDown(button);
}
bool Divaller::WasDown(DivallerButton button)
{
switch (button)
{
case DivallerButton::DVL_L1:
return (lastState.state[5] >> 0) & 1;
case DivallerButton::DVL_L2:
return (lastState.state[4] >> 7) & 1;
case DivallerButton::DVL_L3:
return (lastState.state[4] >> 6) & 1;
case DivallerButton::DVL_FN:
return (lastState.state[3] >> 1) & 1;
case DivallerButton::DVL_TRIANGLE:
return (lastState.state[3] >> 4) & 1;
case DivallerButton::DVL_SQUARE:
return (lastState.state[3] >> 2) & 1;
case DivallerButton::DVL_CROSS:
return (lastState.state[3] >> 5) & 1;
case DivallerButton::DVL_CIRCLE:
return (lastState.state[3] >> 3) & 1;
}
return false;
}
bool Divaller::WasUp(DivallerButton button)
{
return !WasDown(button);
}
uint32_t Divaller::GetSlider()
{
uint32_t i = 0;
i |= currentState.state[5] >> 4;
i |= currentState.state[6] << 4;
i |= currentState.state[7] << 12;
i |= currentState.state[8] << 20;
i |= currentState.state[9] << 28;
// Reverse the bit order of uint32
i = (i & 0xaaaaaaaa) >> 1 | (i & 0x55555555) << 1;
i = (i & 0xcccccccc) >> 2 | (i & 0x33333333) << 2;
i = (i & 0xf0f0f0f0) >> 4 | (i & 0x0f0f0f0f) << 4;
i = (i & 0xff00ff00) >> 8 | (i & 0x00ff00ff) << 8;
return i >> 16 | i << 16;
};
}
@@ -0,0 +1,52 @@
#pragma once
#include "../IInputDevice.h"
#include "DivallerState.h"
#include "DivallerButton.h"
#include <SetupAPI.h>
#include <initguid.h>
#include <usbiodef.h>
#include <winusb.h>
namespace TLAC::Input
{
class Divaller : public IInputDevice
{
public:
Divaller();
~Divaller();
static bool TryInitializeInstance();
bool Initialize();
bool PollInput() override;
bool SetLED();
bool IsDown(DivallerButton button);
bool IsUp(DivallerButton button);
bool IsTapped(DivallerButton button);
bool IsReleased(DivallerButton button);
bool WasDown(DivallerButton button);
bool WasUp(DivallerButton button);
uint32_t GetSlider();
static inline bool InstanceInitialized() { return instance != nullptr; };
static inline Divaller *GetInstance() { return instance; };
static inline void DeleteInstance()
{
delete instance;
instance = nullptr;
};
private:
static Divaller *instance;
DivallerState lastState;
DivallerState currentState;
WINUSB_INTERFACE_HANDLE hInterfaceHandle;
HANDLE hDeviceHandle;
UCHAR outputBuffer[100];
int *buttonLed = reinterpret_cast<int *>(0x14119b950);
uint64_t *partionLed = reinterpret_cast<uint64_t *>(*(uint64_t *)0x140eda330 + 0xc9);
uint64_t *sliderLedInit = reinterpret_cast<uint64_t *>((uint64_t *)0x14cc5dea8);
UCHAR *sliderLedData = nullptr;
};
}
@@ -0,0 +1,32 @@
#pragma once
namespace TLAC::Input
{
enum DivallerButton : int
{
DVL_SQUARE = 0,
DVL_CROSS = 1,
DVL_CIRCLE = 2,
DVL_TRIANGLE = 3,
DVL_FN = 4,
DVL_L1 = 5,
DVL_L2 = 6,
DVL_L3 = 7,
DVL_R1 = 8,
DVL_R2 = 9,
DVL_R3 = 10,
DVL_UP = 11,
DVL_LEFT = 12,
DVL_DOWN = 13,
DVL_RIGHT = 14,
DVL_PAD = 11,
DVL_SHARE = 12,
DVL_HOME = 13,
DVL_OPTION = 14
};
}
@@ -0,0 +1,10 @@
#pragma once
#include "../../framework.h"
namespace TLAC::Input
{
struct DivallerState
{
uint8_t state[24];
};
}
@@ -26,9 +26,6 @@ namespace TLAC::Input::KeyConfig
{ "Minus", VK_SUBTRACT },
{ "Divide", VK_DIVIDE },
{ "Multiply", VK_MULTIPLY },
{ "Comma", VK_OEM_COMMA },
{ "Period", VK_OEM_PERIOD },
{ "Slash", VK_OEM_2 },
// F-Keys
{ "F1", VK_F1 },
{ "F2", VK_F2 },
@@ -91,7 +88,14 @@ namespace TLAC::Input::KeyConfig
{ "Escape", VK_ESCAPE },
{ "Comma", VK_OEM_COMMA },
{ "Period", VK_OEM_PERIOD },
{ "Colon", VK_OEM_1 },
{ "Slash", VK_OEM_2 },
{ "Tilde", VK_OEM_3 },
{ "LeftBracket", VK_OEM_4 },
{ "Backslash", VK_OEM_5 },
{ "RightBracket", VK_OEM_6 },
{ "SingleDoubleQuote", VK_OEM_7 },
{ "OEM_8", VK_OEM_8 },
// Mouse buttons
{ "MouseLeft", VK_LBUTTON },
{ "MouseMiddle", VK_MBUTTON },
@@ -16,6 +16,8 @@ namespace TLAC::Input
config.OpenRead();
xinput_num = config.GetIntegerValue("xinput_preferred");
rumble = config.GetBooleanValue("rumble");
rumble_left = config.GetIntegerValue("xinput_rumble_intensity_left", 8000);
rumble_right = config.GetIntegerValue("xinput_rumble_intensity_right", 4000);
}
Xinput* Xinput::GetInstance()
@@ -256,8 +258,8 @@ namespace TLAC::Input
{
XINPUT_VIBRATION vibration;
ZeroMemory(&vibration, sizeof(XINPUT_VIBRATION));
vibration.wLeftMotorSpeed = 8000; // use any value between 0-65535 here
vibration.wRightMotorSpeed = 4000; // use any value between 0-65535 here
vibration.wLeftMotorSpeed = rumble_left; // use any value between 0-65535 here
vibration.wRightMotorSpeed = rumble_right; // use any value between 0-65535 here
XInputSetState(xc_pref, &vibration);
}
else
@@ -48,7 +48,7 @@ namespace TLAC::Input
void SetTapStates(BYTE keycode, float elapsed);
int xinput_num;
int xinput_num, rumble_left, rumble_right;
bool rumble;
};
}
+236 -230
View File
@@ -1,231 +1,237 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion>
<ProjectGuid>{2B5533BB-04A1-424F-9BCA-1CA963B46B7F}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>TLAC</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<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" />
</ImportGroup>
<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" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<TargetName>$(ProjectName)</TargetName>
<TargetExt>.dva</TargetExt>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<TargetName>$(ProjectName)</TargetName>
<TargetExt>.dva</TargetExt>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;TLAC_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeaderFile>
</PrecompiledHeaderFile>
<LanguageStandard>stdcpp17</LanguageStandard>
<AdditionalIncludeDirectories>..\..\..\dependencies\PluginConfigApi;..\..\..\dependencies\detours\include;..\..\..\dependencies\freeglut\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<AdditionalOptions>-d2FH4- %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
<AdditionalDependencies>XINPUT9_1_0.LIB;dinput8.lib;dxguid.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreSpecificDefaultLibraries>Xinput.h</IgnoreSpecificDefaultLibraries>
<AdditionalLibraryDirectories>..\..\..\dependencies\detours\lib;..\..\..\dependencies\freeglut\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalOptions>-d2:-FH4- %(AdditionalOptions)</AdditionalOptions>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;TLAC_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeaderFile>
</PrecompiledHeaderFile>
<LanguageStandard>stdcpp17</LanguageStandard>
<AdditionalIncludeDirectories>..\..\..\dependencies\PluginConfigApi;..\..\..\dependencies\detours\include;..\..\..\dependencies\freeglut\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalOptions>-d2FH4- %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
<AdditionalLibraryDirectories>..\..\..\dependencies\detours\lib;..\..\..\dependencies\freeglut\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>XINPUT9_1_0.LIB;dinput8.lib;dxguid.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreSpecificDefaultLibraries>Xinput.h</IgnoreSpecificDefaultLibraries>
<AdditionalOptions>-d2:-FH4- %(AdditionalOptions)</AdditionalOptions>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="Components\CameraController.h" />
<ClInclude Include="Components\ComponentsManager.h" />
<ClInclude Include="Components\CustomPlayerData.h" />
<ClInclude Include="Components\DebugComponent.h" />
<ClInclude Include="Components\EmulatorComponent.h" />
<ClInclude Include="Components\FastLoader.h" />
<ClInclude Include="Components\FrameRateManager.h" />
<ClInclude Include="Components\GameState.h" />
<ClInclude Include="Components\GameTargets\HoldState.h" />
<ClInclude Include="Components\GameTargets\TargetHitStates.h" />
<ClInclude Include="Components\GameTargets\TargetInspector.h" />
<ClInclude Include="Components\GameTargets\TargetState.h" />
<ClInclude Include="Components\GameTargets\TargetTypes.h" />
<ClInclude Include="Components\Input\InputBufferType.h" />
<ClInclude Include="Components\Input\InputEmulator.h" />
<ClInclude Include="Components\Input\InputState.h" />
<ClInclude Include="Components\Input\JvsButtons.h" />
<ClInclude Include="Components\Input\TouchPanelEmulator.h" />
<ClInclude Include="Components\Input\TouchPanelState.h" />
<ClInclude Include="Components\Input\TouchSliderEmulator.h" />
<ClInclude Include="Components\Input\TouchSliderState.h" />
<ClInclude Include="Components\Pause.h" />
<ClInclude Include="Components\PlayerData.h" />
<ClInclude Include="Components\PlayerDataManager.h" />
<ClInclude Include="Components\ScaleComponent.h" />
<ClInclude Include="Components\ScoreSaver.h" />
<ClInclude Include="Constants.h" />
<ClInclude Include="FileSystem\ConfigFile.h" />
<ClInclude Include="FileSystem\TextFile.h" />
<ClInclude Include="framework.h" />
<ClInclude Include="Input\Bindings\Binding.h" />
<ClInclude Include="Input\Bindings\Ds4Binding.h" />
<ClInclude Include="Input\Bindings\GuBinding.h" />
<ClInclude Include="Input\Bindings\IInputBinding.h" />
<ClInclude Include="Input\Bindings\KeyboardBinding.h" />
<ClInclude Include="Input\Bindings\MouseBinding.h" />
<ClInclude Include="Input\Bindings\XinputBinding.h" />
<ClInclude Include="Input\DirectInput\Controller.h" />
<ClInclude Include="Input\DirectInput\DirectInput.h" />
<ClInclude Include="Input\DirectInput\DirectInputDevice.h" />
<ClInclude Include="Input\DirectInput\DirectInputMouse.h" />
<ClInclude Include="Input\DirectInput\Ds4\Ds4Button.h" />
<ClInclude Include="Input\DirectInput\Ds4\Ds4State.h" />
<ClInclude Include="Input\DirectInput\Ds4\DualShock4.h" />
<ClInclude Include="Input\DirectInput\GenericUsb\GenericUsbInput.h" />
<ClInclude Include="Input\DirectInput\GenericUsb\GuButton.h" />
<ClInclude Include="Input\DirectInput\GenericUsb\GuState.h" />
<ClInclude Include="Input\IInputDevice.h" />
<ClInclude Include="Input\Keyboard\Keyboard.h" />
<ClInclude Include="Input\Keyboard\KeyboardState.h" />
<ClInclude Include="Input\KeyConfig\Config.h" />
<ClInclude Include="Input\KeyConfig\KeyString.h" />
<ClInclude Include="Input\KeyConfig\KeyStringHash.h" />
<ClInclude Include="Input\Mouse\Mouse.h" />
<ClInclude Include="Input\Mouse\MouseState.h" />
<ClInclude Include="Input\Xinput\Xinput.h" />
<ClInclude Include="Input\Xinput\XinputState.h" />
<ClInclude Include="pluginconfig.h" />
<ClInclude Include="Utilities\Drawing.h" />
<ClInclude Include="Utilities\EnumBitwiseOperations.h" />
<ClInclude Include="Utilities\Math.h" />
<ClInclude Include="Utilities\Operations.h" />
<ClInclude Include="Utilities\Stopwatch.h" />
<ClInclude Include="Utilities\Vec2.h" />
<ClInclude Include="Utilities\Vec3.h" />
<ClInclude Include="Utils.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="Components\CameraController.cpp" />
<ClCompile Include="Components\ComponentsManager.cpp" />
<ClCompile Include="Components\DebugComponent.cpp" />
<ClCompile Include="Components\EmulatorComponent.cpp" />
<ClCompile Include="Components\FastLoader.cpp" />
<ClCompile Include="Components\FrameRateManager.cpp" />
<ClCompile Include="Components\GameTargets\TargetInspector.cpp" />
<ClCompile Include="Components\Input\InputEmulator.cpp" />
<ClCompile Include="Components\Input\InputState.cpp" />
<ClCompile Include="Components\Input\TouchPanelEmulator.cpp" />
<ClCompile Include="Components\Input\TouchSliderEmulator.cpp" />
<ClCompile Include="Components\Input\TouchSliderState.cpp" />
<ClCompile Include="Components\Pause.cpp" />
<ClCompile Include="Components\PlayerDataManager.cpp" />
<ClCompile Include="Components\ScaleComponent.cpp" />
<ClCompile Include="Components\ScoreSaver.cpp" />
<ClCompile Include="dllmain.cpp" />
<ClCompile Include="FileSystem\ConfigFile.cpp" />
<ClCompile Include="FileSystem\TextFile.cpp" />
<ClCompile Include="framework.cpp" />
<ClCompile Include="Input\Bindings\Binding.cpp" />
<ClCompile Include="Input\Bindings\Ds4Binding.cpp" />
<ClCompile Include="Input\Bindings\GuBinding.cpp" />
<ClCompile Include="Input\Bindings\KeyboardBinding.cpp" />
<ClCompile Include="Input\Bindings\MouseBinding.cpp" />
<ClCompile Include="Input\Bindings\XinputBinding.cpp" />
<ClCompile Include="Input\DirectInput\Controller.cpp" />
<ClCompile Include="Input\DirectInput\DirectInput.cpp" />
<ClCompile Include="Input\DirectInput\DirectInputDevice.cpp" />
<ClCompile Include="Input\DirectInput\DirectInputMouse.cpp" />
<ClCompile Include="Input\DirectInput\Ds4\Ds4State.cpp" />
<ClCompile Include="Input\DirectInput\Ds4\DualShock4.cpp" />
<ClCompile Include="Input\DirectInput\GenericUsb\GenericUsbInput.cpp" />
<ClCompile Include="Input\DirectInput\GenericUsb\GuState.cpp" />
<ClCompile Include="Input\Keyboard\Keyboard.cpp" />
<ClCompile Include="Input\Keyboard\KeyboardState.cpp" />
<ClCompile Include="Input\KeyConfig\Config.cpp" />
<ClCompile Include="Input\KeyConfig\KeyString.cpp" />
<ClCompile Include="Input\KeyConfig\KeyStringHash.cpp" />
<ClCompile Include="Input\Mouse\Mouse.cpp" />
<ClCompile Include="Input\Xinput\Xinput.cpp" />
<ClCompile Include="Input\Xinput\XinputState.cpp" />
<ClCompile Include="Utilities\Drawing.cpp" />
<ClCompile Include="Utilities\Math.cpp" />
<ClCompile Include="Utilities\Operations.cpp" />
<ClCompile Include="Utilities\Stopwatch.cpp" />
<ClCompile Include="Utilities\Vec2.cpp" />
<ClCompile Include="Utilities\Vec3.cpp" />
<ClCompile Include="Utils.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion>
<ProjectGuid>{2B5533BB-04A1-424F-9BCA-1CA963B46B7F}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>TLAC</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<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" />
</ImportGroup>
<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" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<TargetName>$(ProjectName)</TargetName>
<TargetExt>.dva</TargetExt>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<TargetName>$(ProjectName)</TargetName>
<TargetExt>.dva</TargetExt>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;TLAC_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeaderFile>
</PrecompiledHeaderFile>
<LanguageStandard>stdcpp17</LanguageStandard>
<AdditionalIncludeDirectories>..\..\..\dependencies\PluginConfigApi;..\..\..\dependencies\detours\include;..\..\..\dependencies\freeglut\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<AdditionalOptions>-d2FH4- %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
<AdditionalDependencies>XINPUT9_1_0.LIB;dinput8.lib;dxguid.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Winusb.lib;Setupapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreSpecificDefaultLibraries>Xinput.h</IgnoreSpecificDefaultLibraries>
<AdditionalLibraryDirectories>..\..\..\dependencies\detours\lib;..\..\..\dependencies\freeglut\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalOptions>-d2:-FH4- %(AdditionalOptions)</AdditionalOptions>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;TLAC_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeaderFile>
</PrecompiledHeaderFile>
<LanguageStandard>stdcpp17</LanguageStandard>
<AdditionalIncludeDirectories>..\..\..\dependencies\PluginConfigApi;..\..\..\dependencies\detours\include;..\..\..\dependencies\freeglut\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalOptions>-d2FH4- %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
<AdditionalLibraryDirectories>..\..\..\dependencies\detours\lib;..\..\..\dependencies\freeglut\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>XINPUT9_1_0.LIB;dinput8.lib;dxguid.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreSpecificDefaultLibraries>Xinput.h</IgnoreSpecificDefaultLibraries>
<AdditionalOptions>-d2:-FH4- %(AdditionalOptions)</AdditionalOptions>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="Components\CameraController.h" />
<ClInclude Include="Components\ComponentsManager.h" />
<ClInclude Include="Components\CustomPlayerData.h" />
<ClInclude Include="Components\DebugComponent.h" />
<ClInclude Include="Components\EmulatorComponent.h" />
<ClInclude Include="Components\FastLoader.h" />
<ClInclude Include="Components\FrameRateManager.h" />
<ClInclude Include="Components\GameState.h" />
<ClInclude Include="Components\GameTargets\HoldState.h" />
<ClInclude Include="Components\GameTargets\TargetHitStates.h" />
<ClInclude Include="Components\GameTargets\TargetInspector.h" />
<ClInclude Include="Components\GameTargets\TargetState.h" />
<ClInclude Include="Components\GameTargets\TargetTypes.h" />
<ClInclude Include="Components\Input\InputBufferType.h" />
<ClInclude Include="Components\Input\InputEmulator.h" />
<ClInclude Include="Components\Input\InputState.h" />
<ClInclude Include="Components\Input\JvsButtons.h" />
<ClInclude Include="Components\Input\TouchPanelEmulator.h" />
<ClInclude Include="Components\Input\TouchPanelState.h" />
<ClInclude Include="Components\Input\TouchSliderEmulator.h" />
<ClInclude Include="Components\Input\TouchSliderState.h" />
<ClInclude Include="Components\Pause.h" />
<ClInclude Include="Components\PlayerData.h" />
<ClInclude Include="Components\PlayerDataManager.h" />
<ClInclude Include="Components\ScaleComponent.h" />
<ClInclude Include="Components\ScoreSaver.h" />
<ClInclude Include="Constants.h" />
<ClInclude Include="FileSystem\ConfigFile.h" />
<ClInclude Include="FileSystem\TextFile.h" />
<ClInclude Include="framework.h" />
<ClInclude Include="Input\Bindings\Binding.h" />
<ClInclude Include="Input\Bindings\Ds4Binding.h" />
<ClInclude Include="Input\Bindings\DVLBinding.h" />
<ClInclude Include="Input\Bindings\GuBinding.h" />
<ClInclude Include="Input\Bindings\IInputBinding.h" />
<ClInclude Include="Input\Bindings\KeyboardBinding.h" />
<ClInclude Include="Input\Bindings\MouseBinding.h" />
<ClInclude Include="Input\Bindings\XinputBinding.h" />
<ClInclude Include="Input\DirectInput\Controller.h" />
<ClInclude Include="Input\DirectInput\DirectInput.h" />
<ClInclude Include="Input\DirectInput\DirectInputDevice.h" />
<ClInclude Include="Input\DirectInput\DirectInputMouse.h" />
<ClInclude Include="Input\DirectInput\Ds4\Ds4Button.h" />
<ClInclude Include="Input\DirectInput\Ds4\Ds4State.h" />
<ClInclude Include="Input\DirectInput\Ds4\DualShock4.h" />
<ClInclude Include="Input\DirectInput\GenericUsb\GenericUsbInput.h" />
<ClInclude Include="Input\DirectInput\GenericUsb\GuButton.h" />
<ClInclude Include="Input\DirectInput\GenericUsb\GuState.h" />
<ClInclude Include="Input\Divaller\Divaller.h" />
<ClInclude Include="Input\Divaller\DivallerButton.h" />
<ClInclude Include="Input\Divaller\DivallerState.h" />
<ClInclude Include="Input\IInputDevice.h" />
<ClInclude Include="Input\Keyboard\Keyboard.h" />
<ClInclude Include="Input\Keyboard\KeyboardState.h" />
<ClInclude Include="Input\KeyConfig\Config.h" />
<ClInclude Include="Input\KeyConfig\KeyString.h" />
<ClInclude Include="Input\KeyConfig\KeyStringHash.h" />
<ClInclude Include="Input\Mouse\Mouse.h" />
<ClInclude Include="Input\Mouse\MouseState.h" />
<ClInclude Include="Input\Xinput\Xinput.h" />
<ClInclude Include="Input\Xinput\XinputState.h" />
<ClInclude Include="pluginconfig.h" />
<ClInclude Include="Utilities\Drawing.h" />
<ClInclude Include="Utilities\EnumBitwiseOperations.h" />
<ClInclude Include="Utilities\Math.h" />
<ClInclude Include="Utilities\Operations.h" />
<ClInclude Include="Utilities\Stopwatch.h" />
<ClInclude Include="Utilities\Vec2.h" />
<ClInclude Include="Utilities\Vec3.h" />
<ClInclude Include="Utils.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="Components\CameraController.cpp" />
<ClCompile Include="Components\ComponentsManager.cpp" />
<ClCompile Include="Components\DebugComponent.cpp" />
<ClCompile Include="Components\EmulatorComponent.cpp" />
<ClCompile Include="Components\FastLoader.cpp" />
<ClCompile Include="Components\FrameRateManager.cpp" />
<ClCompile Include="Components\GameTargets\TargetInspector.cpp" />
<ClCompile Include="Components\Input\InputEmulator.cpp" />
<ClCompile Include="Components\Input\InputState.cpp" />
<ClCompile Include="Components\Input\TouchPanelEmulator.cpp" />
<ClCompile Include="Components\Input\TouchSliderEmulator.cpp" />
<ClCompile Include="Components\Input\TouchSliderState.cpp" />
<ClCompile Include="Components\Pause.cpp" />
<ClCompile Include="Components\PlayerDataManager.cpp" />
<ClCompile Include="Components\ScaleComponent.cpp" />
<ClCompile Include="Components\ScoreSaver.cpp" />
<ClCompile Include="dllmain.cpp" />
<ClCompile Include="FileSystem\ConfigFile.cpp" />
<ClCompile Include="FileSystem\TextFile.cpp" />
<ClCompile Include="framework.cpp" />
<ClCompile Include="Input\Bindings\Binding.cpp" />
<ClCompile Include="Input\Bindings\Ds4Binding.cpp" />
<ClCompile Include="Input\Bindings\DVLBinding.cpp" />
<ClCompile Include="Input\Bindings\GuBinding.cpp" />
<ClCompile Include="Input\Bindings\KeyboardBinding.cpp" />
<ClCompile Include="Input\Bindings\MouseBinding.cpp" />
<ClCompile Include="Input\Bindings\XinputBinding.cpp" />
<ClCompile Include="Input\DirectInput\Controller.cpp" />
<ClCompile Include="Input\DirectInput\DirectInput.cpp" />
<ClCompile Include="Input\DirectInput\DirectInputDevice.cpp" />
<ClCompile Include="Input\DirectInput\DirectInputMouse.cpp" />
<ClCompile Include="Input\DirectInput\Ds4\Ds4State.cpp" />
<ClCompile Include="Input\DirectInput\Ds4\DualShock4.cpp" />
<ClCompile Include="Input\DirectInput\GenericUsb\GenericUsbInput.cpp" />
<ClCompile Include="Input\DirectInput\GenericUsb\GuState.cpp" />
<ClCompile Include="Input\Divaller\Divaller.cpp" />
<ClCompile Include="Input\Keyboard\Keyboard.cpp" />
<ClCompile Include="Input\Keyboard\KeyboardState.cpp" />
<ClCompile Include="Input\KeyConfig\Config.cpp" />
<ClCompile Include="Input\KeyConfig\KeyString.cpp" />
<ClCompile Include="Input\KeyConfig\KeyStringHash.cpp" />
<ClCompile Include="Input\Mouse\Mouse.cpp" />
<ClCompile Include="Input\Xinput\Xinput.cpp" />
<ClCompile Include="Input\Xinput\XinputState.cpp" />
<ClCompile Include="Utilities\Drawing.cpp" />
<ClCompile Include="Utilities\Math.cpp" />
<ClCompile Include="Utilities\Operations.cpp" />
<ClCompile Include="Utilities\Stopwatch.cpp" />
<ClCompile Include="Utilities\Vec2.cpp" />
<ClCompile Include="Utilities\Vec3.cpp" />
<ClCompile Include="Utils.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
@@ -1,366 +1,384 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<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>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="framework.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Constants.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Components\CameraController.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Components\ComponentsManager.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Components\CustomPlayerData.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Components\DebugComponent.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Components\EmulatorComponent.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Components\FastLoader.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Components\FrameRateManager.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Components\GameState.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Components\PlayerData.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Components\PlayerDataManager.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Components\Input\InputBufferType.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Components\Input\InputEmulator.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Components\Input\InputState.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Components\Input\JvsButtons.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Components\Input\TouchPanelEmulator.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Components\Input\TouchPanelState.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Components\Input\TouchSliderEmulator.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Components\Input\TouchSliderState.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="FileSystem\ConfigFile.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="FileSystem\TextFile.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Input\Bindings\Binding.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Input\Bindings\Ds4Binding.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Input\Bindings\IInputBinding.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Input\Bindings\KeyboardBinding.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Input\Bindings\MouseBinding.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Input\DirectInput\Ds4\Ds4Button.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Input\DirectInput\Ds4\Ds4State.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Input\DirectInput\Ds4\DualShock4.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Input\DirectInput\Controller.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Input\DirectInput\DirectInput.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Input\DirectInput\DirectInputDevice.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Input\DirectInput\DirectInputMouse.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Input\Keyboard\Keyboard.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Input\Keyboard\KeyboardState.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Input\KeyConfig\Config.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Input\KeyConfig\KeyString.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Input\KeyConfig\KeyStringHash.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Input\Mouse\Mouse.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Input\Mouse\MouseState.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Input\IInputDevice.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Utilities\EnumBitwiseOperations.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Utilities\Math.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Utilities\Operations.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Utilities\Stopwatch.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Utilities\Vec2.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Utilities\Vec3.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Components\ScaleComponent.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Input\Bindings\XinputBinding.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Input\Xinput\Xinput.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Input\Xinput\XinputState.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Components\GameTargets\HoldState.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Components\GameTargets\TargetHitStates.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Components\GameTargets\TargetInspector.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Components\GameTargets\TargetState.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Components\GameTargets\TargetTypes.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Components\ScoreSaver.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="pluginconfig.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Components\Pause.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Utilities\Drawing.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Input\DirectInput\GenericUsb\GuButton.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Input\DirectInput\GenericUsb\GuState.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Input\DirectInput\GenericUsb\GenericUsbInput.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Input\Bindings\GuBinding.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Utils.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="dllmain.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="framework.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Components\CameraController.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Components\ComponentsManager.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Components\DebugComponent.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Components\EmulatorComponent.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Components\FastLoader.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Components\FrameRateManager.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Components\PlayerDataManager.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Components\Input\InputEmulator.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Components\Input\InputState.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Components\Input\TouchPanelEmulator.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Components\Input\TouchSliderEmulator.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Components\Input\TouchSliderState.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="FileSystem\ConfigFile.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="FileSystem\TextFile.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Input\Bindings\Binding.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Input\Bindings\Ds4Binding.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Input\Bindings\KeyboardBinding.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Input\Bindings\MouseBinding.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Input\DirectInput\Ds4\Ds4State.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Input\DirectInput\Ds4\DualShock4.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Input\DirectInput\Controller.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Input\DirectInput\DirectInput.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Input\DirectInput\DirectInputDevice.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Input\DirectInput\DirectInputMouse.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Input\Keyboard\Keyboard.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Input\Keyboard\KeyboardState.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Input\KeyConfig\Config.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Input\KeyConfig\KeyString.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Input\KeyConfig\KeyStringHash.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Input\Mouse\Mouse.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Utilities\Math.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Utilities\Operations.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Utilities\Stopwatch.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Utilities\Vec2.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Utilities\Vec3.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Components\ScaleComponent.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Input\Bindings\XinputBinding.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Input\Xinput\Xinput.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Input\Xinput\XinputState.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Components\GameTargets\TargetInspector.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Components\ScoreSaver.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Components\Pause.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Utilities\Drawing.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Input\DirectInput\GenericUsb\GuState.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Input\DirectInput\GenericUsb\GenericUsbInput.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Input\Bindings\GuBinding.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Utils.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<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>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="framework.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Constants.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Components\CameraController.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Components\ComponentsManager.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Components\CustomPlayerData.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Components\DebugComponent.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Components\EmulatorComponent.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Components\FastLoader.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Components\FrameRateManager.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Components\GameState.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Components\PlayerData.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Components\PlayerDataManager.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Components\Input\InputBufferType.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Components\Input\InputEmulator.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Components\Input\InputState.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Components\Input\JvsButtons.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Components\Input\TouchPanelEmulator.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Components\Input\TouchPanelState.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Components\Input\TouchSliderEmulator.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Components\Input\TouchSliderState.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="FileSystem\ConfigFile.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="FileSystem\TextFile.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Input\Bindings\Binding.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Input\Bindings\Ds4Binding.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Input\Bindings\IInputBinding.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Input\Bindings\KeyboardBinding.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Input\Bindings\MouseBinding.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Input\DirectInput\Ds4\Ds4Button.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Input\DirectInput\Ds4\Ds4State.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Input\DirectInput\Ds4\DualShock4.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Input\DirectInput\Controller.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Input\DirectInput\DirectInput.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Input\DirectInput\DirectInputDevice.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Input\DirectInput\DirectInputMouse.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Input\Keyboard\Keyboard.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Input\Keyboard\KeyboardState.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Input\KeyConfig\Config.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Input\KeyConfig\KeyString.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Input\KeyConfig\KeyStringHash.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Input\Mouse\Mouse.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Input\Mouse\MouseState.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Input\IInputDevice.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Utilities\EnumBitwiseOperations.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Utilities\Math.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Utilities\Operations.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Utilities\Stopwatch.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Utilities\Vec2.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Utilities\Vec3.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Components\ScaleComponent.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Input\Bindings\XinputBinding.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Input\Xinput\Xinput.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Input\Xinput\XinputState.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Components\GameTargets\HoldState.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Components\GameTargets\TargetHitStates.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Components\GameTargets\TargetInspector.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Components\GameTargets\TargetState.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Components\GameTargets\TargetTypes.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Components\ScoreSaver.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="pluginconfig.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Components\Pause.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Utilities\Drawing.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Input\DirectInput\GenericUsb\GuButton.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Input\DirectInput\GenericUsb\GuState.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Input\DirectInput\GenericUsb\GenericUsbInput.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Input\Bindings\GuBinding.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Utils.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Input\Divaller\Divaller.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Input\Divaller\DivallerButton.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Input\Divaller\DivallerState.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Input\Bindings\DVLBinding.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="dllmain.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="framework.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Components\CameraController.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Components\ComponentsManager.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Components\DebugComponent.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Components\EmulatorComponent.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Components\FastLoader.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Components\FrameRateManager.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Components\PlayerDataManager.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Components\Input\InputEmulator.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Components\Input\InputState.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Components\Input\TouchPanelEmulator.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Components\Input\TouchSliderEmulator.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Components\Input\TouchSliderState.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="FileSystem\ConfigFile.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="FileSystem\TextFile.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Input\Bindings\Binding.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Input\Bindings\Ds4Binding.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Input\Bindings\KeyboardBinding.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Input\Bindings\MouseBinding.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Input\DirectInput\Ds4\Ds4State.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Input\DirectInput\Ds4\DualShock4.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Input\DirectInput\Controller.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Input\DirectInput\DirectInput.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Input\DirectInput\DirectInputDevice.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Input\DirectInput\DirectInputMouse.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Input\Keyboard\Keyboard.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Input\Keyboard\KeyboardState.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Input\KeyConfig\Config.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Input\KeyConfig\KeyString.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Input\KeyConfig\KeyStringHash.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Input\Mouse\Mouse.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Utilities\Math.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Utilities\Operations.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Utilities\Stopwatch.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Utilities\Vec2.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Utilities\Vec3.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Components\ScaleComponent.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Input\Bindings\XinputBinding.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Input\Xinput\Xinput.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Input\Xinput\XinputState.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Components\GameTargets\TargetInspector.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Components\ScoreSaver.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Components\Pause.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Utilities\Drawing.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Input\DirectInput\GenericUsb\GuState.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Input\DirectInput\GenericUsb\GenericUsbInput.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Input\Bindings\GuBinding.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Utils.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Input\Divaller\Divaller.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Input\Bindings\DVLBinding.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>
+29 -4
View File
@@ -12,6 +12,7 @@
#include "Input/DirectInput/DirectInput.h"
#include "Input/DirectInput/Ds4/DualShock4.h"
#include "Input/DirectInput/GenericUsb/GenericUsbInput.h"
#include "Input/Divaller/Divaller.h"
#include "Components/ComponentsManager.h"
#include <tchar.h>
#include <GL/freeglut.h>
@@ -21,7 +22,7 @@
#pragma comment(lib, "detours.lib")
void(__cdecl* divaEngineUpdate)() = (void(__cdecl*)())0x14018CC40;
void(__cdecl* divaEngineDraw2D)(void* addr) = (void(__cdecl*)(void* addr))ENGINE_DRAW_2D_ADDRESS;
void(__cdecl* divaEngineStageDispShadow)() = (void(__cdecl*)())ENGINE_STAGE_DISP_SHADOW_ADDRESS;
LRESULT CALLBACK MessageWindowProcessCallback(HWND, UINT, WPARAM, LPARAM);
DWORD WINAPI WindowMessageDispatcher(LPVOID);
@@ -81,6 +82,12 @@ namespace TLAC
if (Input::GenericUsbInput::TryInitializeInstance())
printf("[TLAC] UpdateTick(): GenericUsbInput connected and initialized\n");
}
if (!Input::Divaller::InstanceInitialized())
{
if (Input::Divaller::TryInitializeInstance())
printf("[TLAC] UpdateTick(): Divaller connected and initialized\n");
}
}
ComponentsManager.Update();
@@ -112,6 +119,15 @@ namespace TLAC
}
}
if (Input::Divaller::GetInstance() != nullptr)
{
if (!Input::Divaller::GetInstance()->PollInput())
{
Input::Divaller::DeleteInstance();
printf("[TLAC] UpdateTick(): Divaller connection lost\n");
}
}
ComponentsManager.UpdateInput();
}
@@ -140,6 +156,15 @@ namespace TLAC
printf("[TLAC] UpdateTick(): GenericUsbInput connection lost\n");
}
}
if (Input::Divaller::GetInstance() != nullptr)
{
if (!Input::Divaller::GetInstance()->PollInput())
{
Input::Divaller::DeleteInstance();
printf("[TLAC] UpdateTick(): Divaller connection lost\n");
}
}
}
if (HasWindowFocus && !HadWindowFocus)
@@ -371,10 +396,10 @@ void hookedEngineUpdate()
//divaEngineUpdate();
}
void hookedEngineDraw2D(void* addr)
void hookedEngineStageDispShadow()
{
divaEngineStageDispShadow();
TLAC::UpdateDraw2D();
divaEngineDraw2D(addr);
}
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
@@ -400,7 +425,7 @@ BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReser
DetourTransactionBegin();
DetourUpdateThread(GetCurrentThread());
DetourAttach(&(PVOID&)divaEngineDraw2D, hookedEngineDraw2D);
DetourAttach(&(PVOID&)divaEngineStageDispShadow, hookedEngineStageDispShadow);
DetourTransactionCommit();
//TLAC::InitializeExtraSettings();