From 2c9afc07fe5cc53fefb90540d5db2ca424c71a51 Mon Sep 17 00:00:00 2001 From: jbzdarkid Date: Sat, 27 Oct 2018 23:28:42 -0700 Subject: Major restructuring -- also set up for UI work tomorrow --- Installer/Installer.vdproj | 697 ++++++++++++++++++++ Source/Main.cpp | Bin 0 -> 9990 bytes Source/Main.h | Bin 0 -> 80 bytes Source/Memory.cpp | 80 +++ Source/Memory.h | 51 ++ Source/Panels.h | 681 +++++++++++++++++++ Source/Randomizer.cpp | 251 +++++++ Source/Randomizer.h | 157 +++++ Source/Resource.h | Bin 0 -> 1456 bytes Source/Source.ico | Bin 0 -> 46227 bytes Source/Source.rc | Bin 0 -> 6810 bytes Source/Source.vcxproj | 181 +++++ Source/Source.vcxproj.filters | 67 ++ Source/small.ico | Bin 0 -> 46227 bytes Source/stdafx.cpp | Bin 0 -> 44 bytes Source/stdafx.h | Bin 0 -> 1046 bytes Source/targetver.h | Bin 0 -> 630 bytes Test/OrderingTests.cpp | 7 + Test/Test.vcxproj | 124 ++++ Test/packages.config | 4 + WitnessRandomizer.sln | 38 +- WitnessRandomizer.vcxproj | 122 ++++ WitnessRandomizer.vcxproj.filters | 17 + WitnessRandomizer/Memory.cpp | 80 --- WitnessRandomizer/Memory.h | 51 -- WitnessRandomizer/Panels.h | 681 ------------------- WitnessRandomizer/WitnessRandomizer.cpp | 251 ------- WitnessRandomizer/WitnessRandomizer.h | 156 ----- WitnessRandomizer/WitnessRandomizer.vcxproj | 173 ----- .../WitnessRandomizer.vcxproj.filters | 36 - WitnessRandomizerInstaller.sln | 41 -- WitnessRandomizerInstaller.vdproj | 729 --------------------- 32 files changed, 2466 insertions(+), 2209 deletions(-) create mode 100644 Installer/Installer.vdproj create mode 100644 Source/Main.cpp create mode 100644 Source/Main.h create mode 100644 Source/Memory.cpp create mode 100644 Source/Memory.h create mode 100644 Source/Panels.h create mode 100644 Source/Randomizer.cpp create mode 100644 Source/Randomizer.h create mode 100644 Source/Resource.h create mode 100644 Source/Source.ico create mode 100644 Source/Source.rc create mode 100644 Source/Source.vcxproj create mode 100644 Source/Source.vcxproj.filters create mode 100644 Source/small.ico create mode 100644 Source/stdafx.cpp create mode 100644 Source/stdafx.h create mode 100644 Source/targetver.h create mode 100644 Test/OrderingTests.cpp create mode 100644 Test/Test.vcxproj create mode 100644 Test/packages.config create mode 100644 WitnessRandomizer.vcxproj create mode 100644 WitnessRandomizer.vcxproj.filters delete mode 100644 WitnessRandomizer/Memory.cpp delete mode 100644 WitnessRandomizer/Memory.h delete mode 100644 WitnessRandomizer/Panels.h delete mode 100644 WitnessRandomizer/WitnessRandomizer.cpp delete mode 100644 WitnessRandomizer/WitnessRandomizer.h delete mode 100644 WitnessRandomizer/WitnessRandomizer.vcxproj delete mode 100644 WitnessRandomizer/WitnessRandomizer.vcxproj.filters delete mode 100644 WitnessRandomizerInstaller.sln delete mode 100644 WitnessRandomizerInstaller.vdproj diff --git a/Installer/Installer.vdproj b/Installer/Installer.vdproj new file mode 100644 index 0000000..b86b787 --- /dev/null +++ b/Installer/Installer.vdproj @@ -0,0 +1,697 @@ +"DeployProject" +{ +"VSVersion" = "3:800" +"ProjectType" = "8:{978C614F-708E-4E1A-B201-565925725DBA}" +"IsWebType" = "8:FALSE" +"ProjectName" = "8:Installer" +"LanguageId" = "3:1033" +"CodePage" = "3:1252" +"UILanguageId" = "3:1033" +"SccProjectName" = "8:" +"SccLocalPath" = "8:" +"SccAuxPath" = "8:" +"SccProvider" = "8:" + "Hierarchy" + { + "Entry" + { + "MsmKey" = "8:_E86F0F0DE4B646B6956C8E30890951D2" + "OwnerKey" = "8:_UNDEFINED" + "MsmSig" = "8:_UNDEFINED" + } + } + "Configurations" + { + "Debug" + { + "DisplayName" = "8:Debug" + "IsDebugOnly" = "11:TRUE" + "IsReleaseOnly" = "11:FALSE" + "OutputFilename" = "8:Debug\\Installer.msi" + "PackageFilesAs" = "3:2" + "PackageFileSize" = "3:-2147483648" + "CabType" = "3:1" + "Compression" = "3:2" + "SignOutput" = "11:FALSE" + "CertificateFile" = "8:" + "PrivateKeyFile" = "8:" + "TimeStampServer" = "8:" + "InstallerBootstrapper" = "3:2" + } + "Release" + { + "DisplayName" = "8:Release" + "IsDebugOnly" = "11:FALSE" + "IsReleaseOnly" = "11:TRUE" + "OutputFilename" = "8:Installer.msi" + "PackageFilesAs" = "3:2" + "PackageFileSize" = "3:-2147483648" + "CabType" = "3:1" + "Compression" = "3:3" + "SignOutput" = "11:FALSE" + "CertificateFile" = "8:" + "PrivateKeyFile" = "8:" + "TimeStampServer" = "8:" + "InstallerBootstrapper" = "3:2" + } + } + "Deployable" + { + "CustomAction" + { + } + "DefaultFeature" + { + "Name" = "8:DefaultFeature" + "Title" = "8:" + "Description" = "8:" + } + "ExternalPersistence" + { + "LaunchCondition" + { + } + } + "File" + { + } + "FileType" + { + } + "Folder" + { + "{1525181F-901A-416C-8A58-119130FE478E}:_4D19640D10EA43E68046262546954A5E" + { + "Name" = "8:#1916" + "AlwaysCreate" = "11:FALSE" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "Property" = "8:DesktopFolder" + "Folders" + { + } + } + "{3C67513D-01DD-4637-8A68-80971EB9504F}:_5393EB12357E4BF29E8149058ABE909F" + { + "DefaultLocation" = "8:[ProgramFiles64Folder][Manufacturer]\\[ProductName]" + "Name" = "8:#1925" + "AlwaysCreate" = "11:FALSE" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "Property" = "8:TARGETDIR" + "Folders" + { + } + } + "{1525181F-901A-416C-8A58-119130FE478E}:_B2294C987D6245B881C99CC1494F9A53" + { + "Name" = "8:#1919" + "AlwaysCreate" = "11:FALSE" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "Property" = "8:ProgramMenuFolder" + "Folders" + { + } + } + } + "LaunchCondition" + { + } + "Locator" + { + } + "MsiBootstrapper" + { + "LangId" = "3:1033" + "RequiresElevation" = "11:FALSE" + } + "Product" + { + "Name" = "8:Microsoft Visual Studio" + "ProductName" = "8:Installer" + "ProductCode" = "8:{34868EC7-346B-490E-A881-16189741A4A1}" + "PackageCode" = "8:{5699DE4A-74E2-4F40-BEE5-B5518D72CA61}" + "UpgradeCode" = "8:{4CB5496B-A47E-41D3-B4A7-677E29AB7513}" + "AspNetVersion" = "8:2.0.50727.0" + "RestartWWWService" = "11:FALSE" + "RemovePreviousVersions" = "11:TRUE" + "DetectNewerInstalledVersion" = "11:TRUE" + "InstallAllUsers" = "11:FALSE" + "ProductVersion" = "8:2.0.0" + "Manufacturer" = "8:jbzdarkid" + "ARPHELPTELEPHONE" = "8:" + "ARPHELPLINK" = "8:https://www.github.com/jbzdarkid/witness-randomizer/issues" + "Title" = "8:Installer" + "Subject" = "8:" + "ARPCONTACT" = "8:jbzdarkid" + "Keywords" = "8:" + "ARPCOMMENTS" = "8:Randomizer for The Witness" + "ARPURLINFOABOUT" = "8:https://www.github.com/jbzdarkid/witness-randomizer" + "ARPPRODUCTICON" = "8:" + "ARPIconIndex" = "3:0" + "SearchPath" = "8:" + "UseSystemSearchPath" = "11:TRUE" + "TargetPlatform" = "3:1" + "PreBuildEvent" = "8:" + "PostBuildEvent" = "8:" + "RunPostBuildEvent" = "3:0" + } + "Registry" + { + "HKLM" + { + "Keys" + { + "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_3AE5560C1C264507AB6064EFD59C1D29" + { + "Name" = "8:Software" + "Condition" = "8:" + "AlwaysCreate" = "11:FALSE" + "DeleteAtUninstall" = "11:FALSE" + "Transitive" = "11:FALSE" + "Keys" + { + "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_63A12348E59E4B23AF4A320B583CE259" + { + "Name" = "8:[Manufacturer]" + "Condition" = "8:" + "AlwaysCreate" = "11:FALSE" + "DeleteAtUninstall" = "11:FALSE" + "Transitive" = "11:FALSE" + "Keys" + { + } + "Values" + { + } + } + } + "Values" + { + } + } + } + } + "HKCU" + { + "Keys" + { + "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_8B27FF000D99412E935E3A18279A2050" + { + "Name" = "8:Software" + "Condition" = "8:" + "AlwaysCreate" = "11:FALSE" + "DeleteAtUninstall" = "11:FALSE" + "Transitive" = "11:FALSE" + "Keys" + { + "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_4BF3DC672AFD411A93142B3B6422DB19" + { + "Name" = "8:[Manufacturer]" + "Condition" = "8:" + "AlwaysCreate" = "11:FALSE" + "DeleteAtUninstall" = "11:FALSE" + "Transitive" = "11:FALSE" + "Keys" + { + } + "Values" + { + } + } + } + "Values" + { + } + } + } + } + "HKCR" + { + "Keys" + { + } + } + "HKU" + { + "Keys" + { + } + } + "HKPU" + { + "Keys" + { + } + } + } + "Sequences" + { + } + "Shortcut" + { + "{970C0BB2-C7D0-45D7-ABFA-7EC378858BC0}:_B30BF820F5E14F0DA12BBD906ADF0C86" + { + "Name" = "8:WitnessRandomizer" + "Arguments" = "8:" + "Description" = "8:" + "ShowCmd" = "3:1" + "IconIndex" = "3:0" + "Transitive" = "11:FALSE" + "Target" = "8:_E86F0F0DE4B646B6956C8E30890951D2" + "Folder" = "8:_B2294C987D6245B881C99CC1494F9A53" + "WorkingFolder" = "8:_5393EB12357E4BF29E8149058ABE909F" + "Icon" = "8:" + "Feature" = "8:" + } + } + "UserInterface" + { + "{2479F3F5-0309-486D-8047-8187E2CE5BA0}:_38760CCB3C7C473E8E648E0E721B588D" + { + "UseDynamicProperties" = "11:FALSE" + "IsDependency" = "11:FALSE" + "SourcePath" = "8:\\VsdBasicDialogs.wim" + } + "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_3A89F4E5009C49478B393C505B87F9E1" + { + "Name" = "8:#1900" + "Sequence" = "3:2" + "Attributes" = "3:1" + "Dialogs" + { + "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_53574943921E4B3DB4C03DD3D6CA432C" + { + "Sequence" = "3:300" + "DisplayName" = "8:Confirm Installation" + "UseDynamicProperties" = "11:TRUE" + "IsDependency" = "11:FALSE" + "SourcePath" = "8:\\VsdAdminConfirmDlg.wid" + "Properties" + { + "BannerBitmap" + { + "Name" = "8:BannerBitmap" + "DisplayName" = "8:#1001" + "Description" = "8:#1101" + "Type" = "3:8" + "ContextData" = "8:Bitmap" + "Attributes" = "3:4" + "Setting" = "3:1" + "UsePlugInResources" = "11:TRUE" + } + } + } + "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_E1C9373AA1F84906A77B0A402FC41089" + { + "Sequence" = "3:200" + "DisplayName" = "8:Installation Folder" + "UseDynamicProperties" = "11:TRUE" + "IsDependency" = "11:FALSE" + "SourcePath" = "8:\\VsdAdminFolderDlg.wid" + "Properties" + { + "BannerBitmap" + { + "Name" = "8:BannerBitmap" + "DisplayName" = "8:#1001" + "Description" = "8:#1101" + "Type" = "3:8" + "ContextData" = "8:Bitmap" + "Attributes" = "3:4" + "Setting" = "3:1" + "UsePlugInResources" = "11:TRUE" + } + } + } + "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_E9B774D828F444DBB21D89182BC27A21" + { + "Sequence" = "3:100" + "DisplayName" = "8:Welcome" + "UseDynamicProperties" = "11:TRUE" + "IsDependency" = "11:FALSE" + "SourcePath" = "8:\\VsdAdminWelcomeDlg.wid" + "Properties" + { + "BannerBitmap" + { + "Name" = "8:BannerBitmap" + "DisplayName" = "8:#1001" + "Description" = "8:#1101" + "Type" = "3:8" + "ContextData" = "8:Bitmap" + "Attributes" = "3:4" + "Setting" = "3:1" + "UsePlugInResources" = "11:TRUE" + } + "CopyrightWarning" + { + "Name" = "8:CopyrightWarning" + "DisplayName" = "8:#1002" + "Description" = "8:#1102" + "Type" = "3:3" + "ContextData" = "8:" + "Attributes" = "3:0" + "Setting" = "3:1" + "Value" = "8:#1202" + "DefaultValue" = "8:#1202" + "UsePlugInResources" = "11:TRUE" + } + "Welcome" + { + "Name" = "8:Welcome" + "DisplayName" = "8:#1003" + "Description" = "8:#1103" + "Type" = "3:3" + "ContextData" = "8:" + "Attributes" = "3:0" + "Setting" = "3:1" + "Value" = "8:#1203" + "DefaultValue" = "8:#1203" + "UsePlugInResources" = "11:TRUE" + } + } + } + } + } + "{2479F3F5-0309-486D-8047-8187E2CE5BA0}:_525FC4F1C72C4EE3984593146DD26634" + { + "UseDynamicProperties" = "11:FALSE" + "IsDependency" = "11:FALSE" + "SourcePath" = "8:\\VsdUserInterface.wim" + } + "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_8808DD7C245240A9954C040BF06F2B9D" + { + "Name" = "8:#1902" + "Sequence" = "3:2" + "Attributes" = "3:3" + "Dialogs" + { + "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_F7031E39D9854967A8FBADF12A890B0B" + { + "Sequence" = "3:100" + "DisplayName" = "8:Finished" + "UseDynamicProperties" = "11:TRUE" + "IsDependency" = "11:FALSE" + "SourcePath" = "8:\\VsdAdminFinishedDlg.wid" + "Properties" + { + "BannerBitmap" + { + "Name" = "8:BannerBitmap" + "DisplayName" = "8:#1001" + "Description" = "8:#1101" + "Type" = "3:8" + "ContextData" = "8:Bitmap" + "Attributes" = "3:4" + "Setting" = "3:1" + "UsePlugInResources" = "11:TRUE" + } + } + } + } + } + "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_9359F122FC5E433F9E5A9EFF22C28425" + { + "Name" = "8:#1901" + "Sequence" = "3:1" + "Attributes" = "3:2" + "Dialogs" + { + "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_7B03CE8F39FF4BA2B82BFADB5CE02784" + { + "Sequence" = "3:100" + "DisplayName" = "8:Progress" + "UseDynamicProperties" = "11:TRUE" + "IsDependency" = "11:FALSE" + "SourcePath" = "8:\\VsdProgressDlg.wid" + "Properties" + { + "BannerBitmap" + { + "Name" = "8:BannerBitmap" + "DisplayName" = "8:#1001" + "Description" = "8:#1101" + "Type" = "3:8" + "ContextData" = "8:Bitmap" + "Attributes" = "3:4" + "Setting" = "3:1" + "UsePlugInResources" = "11:TRUE" + } + "ShowProgress" + { + "Name" = "8:ShowProgress" + "DisplayName" = "8:#1009" + "Description" = "8:#1109" + "Type" = "3:5" + "ContextData" = "8:1;True=1;False=0" + "Attributes" = "3:0" + "Setting" = "3:0" + "Value" = "3:1" + "DefaultValue" = "3:1" + "UsePlugInResources" = "11:TRUE" + } + } + } + } + } + "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_A1DF86A3EDDD44E594A0CDFC7F58D821" + { + "Name" = "8:#1900" + "Sequence" = "3:1" + "Attributes" = "3:1" + "Dialogs" + { + "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_19BB8ECC0C3A4153BF658C0F22142794" + { + "Sequence" = "3:200" + "DisplayName" = "8:Installation Folder" + "UseDynamicProperties" = "11:TRUE" + "IsDependency" = "11:FALSE" + "SourcePath" = "8:\\VsdFolderDlg.wid" + "Properties" + { + "BannerBitmap" + { + "Name" = "8:BannerBitmap" + "DisplayName" = "8:#1001" + "Description" = "8:#1101" + "Type" = "3:8" + "ContextData" = "8:Bitmap" + "Attributes" = "3:4" + "Setting" = "3:1" + "UsePlugInResources" = "11:TRUE" + } + "InstallAllUsersVisible" + { + "Name" = "8:InstallAllUsersVisible" + "DisplayName" = "8:#1059" + "Description" = "8:#1159" + "Type" = "3:5" + "ContextData" = "8:1;True=1;False=0" + "Attributes" = "3:0" + "Setting" = "3:0" + "Value" = "3:1" + "DefaultValue" = "3:1" + "UsePlugInResources" = "11:TRUE" + } + } + } + "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_3433DFF95F204C7B8A83783FA361BFCE" + { + "Sequence" = "3:100" + "DisplayName" = "8:Welcome" + "UseDynamicProperties" = "11:TRUE" + "IsDependency" = "11:FALSE" + "SourcePath" = "8:\\VsdWelcomeDlg.wid" + "Properties" + { + "BannerBitmap" + { + "Name" = "8:BannerBitmap" + "DisplayName" = "8:#1001" + "Description" = "8:#1101" + "Type" = "3:8" + "ContextData" = "8:Bitmap" + "Attributes" = "3:4" + "Setting" = "3:1" + "UsePlugInResources" = "11:TRUE" + } + "CopyrightWarning" + { + "Name" = "8:CopyrightWarning" + "DisplayName" = "8:#1002" + "Description" = "8:#1102" + "Type" = "3:3" + "ContextData" = "8:" + "Attributes" = "3:0" + "Setting" = "3:1" + "Value" = "8:#1202" + "DefaultValue" = "8:#1202" + "UsePlugInResources" = "11:TRUE" + } + "Welcome" + { + "Name" = "8:Welcome" + "DisplayName" = "8:#1003" + "Description" = "8:#1103" + "Type" = "3:3" + "ContextData" = "8:" + "Attributes" = "3:0" + "Setting" = "3:1" + "Value" = "8:#1203" + "DefaultValue" = "8:#1203" + "UsePlugInResources" = "11:TRUE" + } + } + } + "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_AF4B4DA9EB504C71B314DF4C68CE15EA" + { + "Sequence" = "3:300" + "DisplayName" = "8:Confirm Installation" + "UseDynamicProperties" = "11:TRUE" + "IsDependency" = "11:FALSE" + "SourcePath" = "8:\\VsdConfirmDlg.wid" + "Properties" + { + "BannerBitmap" + { + "Name" = "8:BannerBitmap" + "DisplayName" = "8:#1001" + "Description" = "8:#1101" + "Type" = "3:8" + "ContextData" = "8:Bitmap" + "Attributes" = "3:4" + "Setting" = "3:1" + "UsePlugInResources" = "11:TRUE" + } + } + } + } + } + "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_AAE51F7F58C64A4B996423B01E3D8921" + { + "Name" = "8:#1902" + "Sequence" = "3:1" + "Attributes" = "3:3" + "Dialogs" + { + "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_4AF1C2264E804EE9BA6E2E014EFACBD1" + { + "Sequence" = "3:100" + "DisplayName" = "8:Finished" + "UseDynamicProperties" = "11:TRUE" + "IsDependency" = "11:FALSE" + "SourcePath" = "8:\\VsdFinishedDlg.wid" + "Properties" + { + "BannerBitmap" + { + "Name" = "8:BannerBitmap" + "DisplayName" = "8:#1001" + "Description" = "8:#1101" + "Type" = "3:8" + "ContextData" = "8:Bitmap" + "Attributes" = "3:4" + "Setting" = "3:1" + "UsePlugInResources" = "11:TRUE" + } + "UpdateText" + { + "Name" = "8:UpdateText" + "DisplayName" = "8:#1058" + "Description" = "8:#1158" + "Type" = "3:15" + "ContextData" = "8:" + "Attributes" = "3:0" + "Setting" = "3:1" + "Value" = "8:#1258" + "DefaultValue" = "8:#1258" + "UsePlugInResources" = "11:TRUE" + } + } + } + } + } + "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_C45FE7F2B865461AB6313DD4AEB2833D" + { + "Name" = "8:#1901" + "Sequence" = "3:2" + "Attributes" = "3:2" + "Dialogs" + { + "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_640F85EA14454CEEAD495CDCCD0BCB76" + { + "Sequence" = "3:100" + "DisplayName" = "8:Progress" + "UseDynamicProperties" = "11:TRUE" + "IsDependency" = "11:FALSE" + "SourcePath" = "8:\\VsdAdminProgressDlg.wid" + "Properties" + { + "BannerBitmap" + { + "Name" = "8:BannerBitmap" + "DisplayName" = "8:#1001" + "Description" = "8:#1101" + "Type" = "3:8" + "ContextData" = "8:Bitmap" + "Attributes" = "3:4" + "Setting" = "3:1" + "UsePlugInResources" = "11:TRUE" + } + "ShowProgress" + { + "Name" = "8:ShowProgress" + "DisplayName" = "8:#1009" + "Description" = "8:#1109" + "Type" = "3:5" + "ContextData" = "8:1;True=1;False=0" + "Attributes" = "3:0" + "Setting" = "3:0" + "Value" = "3:1" + "DefaultValue" = "3:1" + "UsePlugInResources" = "11:TRUE" + } + } + } + } + } + } + "MergeModule" + { + } + "ProjectOutput" + { + "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_E86F0F0DE4B646B6956C8E30890951D2" + { + "SourcePath" = "8:..\\x64\\Release\\Source.exe" + "TargetName" = "8:" + "Tag" = "8:" + "Folder" = "8:_5393EB12357E4BF29E8149058ABE909F" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "Vital" = "11:TRUE" + "ReadOnly" = "11:FALSE" + "Hidden" = "11:FALSE" + "System" = "11:FALSE" + "Permanent" = "11:FALSE" + "SharedLegacy" = "11:FALSE" + "PackageAs" = "3:1" + "Register" = "3:1" + "Exclude" = "11:FALSE" + "IsDependency" = "11:FALSE" + "IsolateTo" = "8:" + "ProjectOutputGroupRegister" = "3:1" + "OutputConfiguration" = "8:" + "OutputGroupCanonicalName" = "8:Built" + "OutputProjectGuid" = "8:{CED79182-F36B-4D07-AD0E-249C15BFAD73}" + "ShowKeyOutput" = "11:TRUE" + "ExcludeFilters" + { + } + } + } + } +} diff --git a/Source/Main.cpp b/Source/Main.cpp new file mode 100644 index 0000000..0b9d8c5 Binary files /dev/null and b/Source/Main.cpp differ diff --git a/Source/Main.h b/Source/Main.h new file mode 100644 index 0000000..c4aafa3 Binary files /dev/null and b/Source/Main.h differ diff --git a/Source/Memory.cpp b/Source/Memory.cpp new file mode 100644 index 0000000..0afeded --- /dev/null +++ b/Source/Memory.cpp @@ -0,0 +1,80 @@ +#include "Memory.h" +#include +#include +#include + +#undef PROCESSENTRY32 +#undef Process32Next + +Memory::Memory(const std::string& processName) { + // First, get the handle of the process + PROCESSENTRY32 entry; + entry.dwSize = sizeof(entry); + HANDLE snapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0); + while (Process32Next(snapshot, &entry)) { + if (processName == entry.szExeFile) { + _handle = OpenProcess(PROCESS_ALL_ACCESS, FALSE, entry.th32ProcessID); + break; + } + } + if (!_handle) { + std::cout << "Couldn't find " << processName.c_str() << ", is it open?" << std::endl; + exit(EXIT_FAILURE); + } + + // Next, get the process base address + DWORD numModules; + std::vector moduleList(1024); + EnumProcessModulesEx(_handle, &moduleList[0], static_cast(moduleList.size()), &numModules, 3); + + std::string name(64, 0); + for (DWORD i = 0; i < numModules / sizeof(HMODULE); i++) { + GetModuleBaseNameA(_handle, moduleList[i], &name[0], sizeof(name)); + + // TODO: Filling with 0s still yeilds name.size() == 64... + if (strcmp(processName.c_str(), name.c_str()) == 0) { + _baseAddress = (uintptr_t)moduleList[i]; + break; + } + } + if (_baseAddress == 0) { + std::cout << "Couldn't find the base process address!" << std::endl; + exit(EXIT_FAILURE); + } +} + +Memory::~Memory() { + CloseHandle(_handle); +} + +void Memory::ThrowError() { + std::string message(256, '\0'); + FormatMessageA(4096, nullptr, GetLastError(), 1024, &message[0], static_cast(message.length()), nullptr); + std::cout << message.c_str() << std::endl; + exit(EXIT_FAILURE); +} + +void* Memory::ComputeOffset(std::vector offsets) +{ + // Leave off the last offset, since it will be either read/write, and may not be of type unitptr_t. + int final_offset = offsets.back(); + offsets.pop_back(); + + uintptr_t cumulativeAddress = _baseAddress; + for (const int offset : offsets) { + cumulativeAddress += offset; + + const auto search = _computedAddresses.find(cumulativeAddress); + if (search == std::end(_computedAddresses)) { + // If the address is not yet computed, then compute it. + uintptr_t computedAddress = 0; + if (!ReadProcessMemory(_handle, reinterpret_cast(cumulativeAddress), &computedAddress, sizeof(uintptr_t), NULL)) { + ThrowError(); + } + _computedAddresses[cumulativeAddress] = computedAddress; + } + + cumulativeAddress = _computedAddresses[cumulativeAddress]; + } + return reinterpret_cast(cumulativeAddress + final_offset); +} diff --git a/Source/Memory.h b/Source/Memory.h new file mode 100644 index 0000000..8e8bbc3 --- /dev/null +++ b/Source/Memory.h @@ -0,0 +1,51 @@ +#pragma once +#include +#include +#include + +// https://github.com/erayarslan/WriteProcessMemory-Example +// http://stackoverflow.com/q/32798185 +// http://stackoverflow.com/q/36018838 +// http://stackoverflow.com/q/1387064 +class Memory +{ +public: + Memory(const std::string& processName); + ~Memory(); + + Memory(const Memory& memory) = delete; + Memory& operator=(const Memory& other) = delete; + + template + std::vector ReadData(const std::vector& offsets, size_t numItems) { + std::vector data; + data.resize(numItems); + for (int i=0; i<5; i++) { + if (ReadProcessMemory(_handle, ComputeOffset(offsets), &data[0], sizeof(T) * numItems, nullptr)) + { + return data; + } + } + ThrowError(); + return {}; + } + + template + void WriteData(const std::vector& offsets, const std::vector& data) { + for (int i=0; i<5; i++) { + if (WriteProcessMemory(_handle, ComputeOffset(offsets), &data[0], sizeof(T) * data.size(), nullptr)) { + return; + } + } + ThrowError(); + } + +private: + void ThrowError(); + + void* ComputeOffset(std::vector offsets); + + std::map _computedAddresses; + uintptr_t _baseAddress = 0; + HANDLE _handle = nullptr; +}; \ No newline at end of file diff --git a/Source/Panels.h b/Source/Panels.h new file mode 100644 index 0000000..e070005 --- /dev/null +++ b/Source/Panels.h @@ -0,0 +1,681 @@ +#pragma once +#include + +// Some of these (the puzzle ones) are duplicated elsewhere +std::vector lasers = { + 0x0360D, // Symmetry + 0x03615, // Swamp + 0x09DE0, // Bunker + 0x17CA4, // Monastery + 0x032F5, // Town + 0x03613, // Treehouse + 0x0360E, // Keep Front Laser +// 0x03317, // Keep Back Laser +// 0x03608, // Desert + 0x03612, // Quarry + 0x03616, // Jungle + 0x19650, // Shadows +}; + +// Note: Some of these (non-desert) are duplicated elsewhere +std::vector burnablePanels = { + 0x17D9C, // Treehouse Yellow 7 + 0x17DC2, // Treehouse Yellow 8 + 0x17DC4, // Treehouse Yellow 9 + 0x00999, // Swamp Discontinuous 1 + 0x0099D, // Swamp Discontinuous 2 + 0x009A0, // Swamp Discontinuous 3 + 0x009A1, // Swamp Discontinuous 4 + 0x00007, // Swamp Rotation Tutorial 1 + 0x00008, // Swamp Rotation Tutorial 2 + 0x00009, // Swamp Rotation Tutorial 3 + 0x0000A, // Swamp Rotation Tutorial 4 + 0x28AC7, // Town Blue 1 + 0x28AC8, // Town Blue 2 + 0x28ACA, // Town Blue 3 + 0x28ACB, // Town Blue 4 + 0x28ACC, // Town Blue 5 + 0x17CF0, // Mill Discard + + 0x00698, // Desert Surface 1 + 0x0048F, // Desert Surface 2 + 0x09F92, // Desert Surface 3 + 0x0A036, // Desert Surface 4 + 0x09DA6, // Desert Surface 5 + 0x0A049, // Desert Surface 6 + 0x0A053, // Desert Surface 7 + 0x09F94, // Desert Surface 8 + 0x00422, // Desert Light 1 + 0x006E3, // Desert Light 2 + 0x0A02D, // Desert Light 3 + 0x00C72, // Desert Pond 1 + 0x0129D, // Desert Pond 2 + 0x008BB, // Desert Pond 3 + 0x0078D, // Desert Pond 4 + 0x18313, // Desert Pond 5 + 0x04D18, // Desert Flood 1 + 0x01205, // Desert Flood 2 + 0x181AB, // Desert Flood 3 + 0x0117A, // Desert Flood 4 + 0x17ECA, // Desert Flood 5 + 0x012D7, // Desert Final Far +}; + +// Note: Some of these (non-controls) are duplicated elsewhere +// TODO: Gave up +std::vector leftRightPanels = { + 0x01A54, // Glass Factory Entry + 0x00086, // Glass Factory Vertical Symmetry 1 + 0x00087, // Glass Factory Vertical Symmetry 2 + 0x00059, // Glass Factory Vertical Symmetry 3 + 0x00062, // Glass Factory Vertical Symmetry 4 + 0x00025, // Symmetry Island Black Dots 4 + 0x00026, // Symmetry Island Black Dots 5 + 0x00072, // Symmetry Island Fading Lines 3 + + 0x17D02, // Town Windmill Control +}; + +// These panels are very tall (aka not square) and can't take symmetry panels on them. +std::vector tallUpDownPanels = { + 0x335AB, // UTM In Elevator Control + 0x3369D, // UTM Lower Elevator Control + 0x335AC, // UTM Upper Elevator Control + 0x09EEB, // Mountain 2 Elevator +}; + +// Note: Some of these (non-controls) are duplicated elsewhere +std::vector upDownPanels = { + 0x0008D, // Glass Factory Rotational Symmetry 1 + 0x00081, // Glass Factory Rotational Symmetry 2 + 0x00083, // Glass Factory Rotational Symmetry 3 + 0x00084, // Glass Factory Melting 1 + 0x00070, // Symmetry Island Fading Lines 5 + 0x01E5A, // Mill Entry Door Left + 0x28AC7, // Town Blue 1 + 0x28AC8, // Town Blue 2 + 0x28ACA, // Town Blue 3 + 0x28ACB, // Town Blue 4 + 0x28ACC, // Town Blue 5 + 0x00029, // UTM Invisible Dots Symmetry 3 + + 0x0A3B5, // Tutorial Back Left + 0x17CC4, // Mill Elevator Control +}; + +// Note: Some of these (non-controls) are duplicated elsewhere +std::vector leftForwardRightPanels = { +// 0x00075, // Symmetry Island Colored Dots 3 +// 0x288EA, // UTM Perspective 1 +// 0x288FC, // UTM Perspective 2 +// 0x289E7, // UTM Perspective 3 + + 0x17DD1, // Treehouse Left Orange 9 + 0x17CE3, // Treehouse Right Orange 4 + 0x17DB7, // Treehouse Right Orange 10 + 0x17E52, // Treehouse Green 4 +}; + +std::vector pillars = { + 0x0383D, // Mountain 3 Left Pillar 1 + 0x0383F, // Mountain 3 Left Pillar 2 + 0x03859, // Mountain 3 Left Pillar 3 + 0x339BB, // Mountain 3 Left Pillar 4 + 0x0383A, // Mountain 3 Right Pillar 1 + 0x09E56, // Mountain 3 Right Pillar 2 + 0x09E5A, // Mountain 3 Right Pillar 3 + 0x33961, // Mountain 3 Right Pillar 4 + 0x09DD5, // UTM Challenge Pillar +// 0x1C31A, // Challenge Left Pillar +// 0x1C319, // Challenge Right Pillar +}; + +std::vector mountainMultipanel = { + 0x09FCC, // Mountain 2 Multipanel 1 + 0x09FCE, // Mountain 2 Multipanel 2 + 0x09FCF, // Mountain 2 Multipanel 3 + 0x09FD0, // Mountain 2 Multipanel 4 + 0x09FD1, // Mountain 2 Multipanel 5 + 0x09FD2, // Mountain 2 Multipanel 6 +}; + +std::vector squarePanels = { + 0x00064, // Tutorial Straight + 0x00182, // Tutorial Bend + 0x0A3B2, // Tutorial Back Right + 0x00295, // Tutorial Center Left + 0x00293, // Tutorial Front Center + 0x002C2, // Tutorial Front Left + 0x0005D, // Outside Tutorial Dots Tutorial 1 + 0x0005E, // Outside Tutorial Dots Tutorial 2 + 0x0005F, // Outside Tutorial Dots Tutorial 3 + 0x00060, // Outside Tutorial Dots Tutorial 4 + 0x00061, // Outside Tutorial Dots Tutorial 5 + 0x018AF, // Outside Tutorial Stones Tutorial 1 + 0x0001B, // Outside Tutorial Stones Tutorial 2 + 0x012C9, // Outside Tutorial Stones Tutorial 3 + 0x0001C, // Outside Tutorial Stones Tutorial 4 + 0x0001D, // Outside Tutorial Stones Tutorial 5 + 0x0001E, // Outside Tutorial Stones Tutorial 6 + 0x0001F, // Outside Tutorial Stones Tutorial 7 + 0x00020, // Outside Tutorial Stones Tutorial 8 + 0x00021, // Outside Tutorial Stones Tutorial 9 + 0x033D4, // Outside Tutorial Vault + 0x0A171, // Tutorial Optional Door 1 + 0x04CA4, // Tutorial Optional Door 2 + 0x17CFB, // Outside Tutorial Discard + 0x3C12B, // Glass Factory Discard + 0x01A54, // Glass Factory Entry + 0x00086, // Glass Factory Vertical Symmetry 1 + 0x00087, // Glass Factory Vertical Symmetry 2 + 0x00059, // Glass Factory Vertical Symmetry 3 + 0x00062, // Glass Factory Vertical Symmetry 4 + 0x0008D, // Glass Factory Rotational Symmetry 1 + 0x00081, // Glass Factory Rotational Symmetry 2 + 0x00083, // Glass Factory Rotational Symmetry 3 + 0x00084, // Glass Factory Melting 1 + 0x00082, // Glass Factory Melting 2 + 0x0343A, // Glass Factory Melting 3 + 0x000B0, // Symmetry Island Door 1 + 0x00022, // Symmetry Island Black Dots 1 + 0x00023, // Symmetry Island Black Dots 2 + 0x00024, // Symmetry Island Black Dots 3 + 0x00025, // Symmetry Island Black Dots 4 + 0x00026, // Symmetry Island Black Dots 5 + 0x0007C, // Symmetry Island Colored Dots 1 + 0x0007E, // Symmetry Island Colored Dots 2 + 0x00075, // Symmetry Island Colored Dots 3 + 0x00073, // Symmetry Island Colored Dots 4 + 0x00077, // Symmetry Island Colored Dots 5 + 0x00079, // Symmetry Island Colored Dots 6 + 0x00065, // Symmetry Island Fading Lines 1 + 0x0006D, // Symmetry Island Fading Lines 2 + 0x00072, // Symmetry Island Fading Lines 3 + 0x0006F, // Symmetry Island Fading Lines 4 + 0x00070, // Symmetry Island Fading Lines 5 + 0x00071, // Symmetry Island Fading Lines 6 + 0x00076, // Symmetry Island Fading Lines 7 + 0x00A52, // Symmetry Island Laser Yellow 1 + 0x00A57, // Symmetry Island Laser Yellow 2 + 0x00A5B, // Symmetry Island Laser Yellow 3 + 0x00A61, // Symmetry Island Laser Blue 1 + 0x00A64, // Symmetry Island Laser Blue 2 + 0x00A68, // Symmetry Island Laser Blue 3 + 0x17CE7, // Desert Discard + 0x0CC7B, // Desert Vault + 0x01E5A, // Mill Entry Door Left + 0x01E59, // Mill Entry Door Right + 0x00E0C, // Mill Lower Row 1 + 0x01489, // Mill Lower Row 2 + 0x0148A, // Mill Lower Row 3 + 0x014D9, // Mill Lower Row 4 + 0x014E7, // Mill Lower Row 5 + 0x014E8, // Mill Lower Row 6 + 0x00557, // Mill Upper Row 1 + 0x005F1, // Mill Upper Row 2 + 0x00620, // Mill Upper Row 3 + 0x009F5, // Mill Upper Row 4 + 0x0146C, // Mill Upper Row 5 + 0x3C12D, // Mill Upper Row 6 + 0x03686, // Mill Upper Row 7 + 0x014E9, // Mill Upper Row 8 + 0x0367C, // Mill Control Room 1 + 0x3C125, // Mill Control Room 2 + 0x03677, // Mill Stairs Control + 0x17CF0, // Mill Discard + 0x03612, // Quarry Laser + 0x021D5, // Boathouse Ramp Activation Shapers + 0x034D4, // Boathouse Ramp Activation Stars + 0x021B3, // Boathouse Erasers and Shapers 1 + 0x021B4, // Boathouse Erasers and Shapers 2 + 0x021B0, // Boathouse Erasers and Shapers 3 + 0x021AF, // Boathouse Erasers and Shapers 4 + 0x021AE, // Boathouse Erasers and Shapers 5 + 0x021B5, // Boathouse Erasers and Stars 1 + 0x021B6, // Boathouse Erasers and Stars 2 + 0x021B7, // Boathouse Erasers and Stars 3 + 0x021BB, // Boathouse Erasers and Stars 4 + 0x09DB5, // Boathouse Erasers and Stars 5 + 0x09DB1, // Boathouse Erasers and Stars 6 + 0x3C124, // Boathouse Erasers and Stars 7 + 0x09DB3, // Boathouse Erasers Shapers and Stars 1 + 0x09DB4, // Boathouse Erasers Shapers and Stars 2 + 0x0A3CB, // Boathouse Erasers Shapers and Stars 3 + 0x0A3CC, // Boathouse Erasers Shapers and Stars 4 + 0x0A3D0, // Boathouse Erasers Shapers and Stars 5 + 0x09E57, // Quarry Entry Gate 1 + 0x17C09, // Quarry Entry Gate 2 + 0x0288C, // Treehouse Door 1 + 0x02886, // Treehouse Door 2 + 0x17D72, // Treehouse Yellow 1 + 0x17D8F, // Treehouse Yellow 2 + 0x17D74, // Treehouse Yellow 3 + 0x17DAC, // Treehouse Yellow 4 + 0x17D9E, // Treehouse Yellow 5 + 0x17DB9, // Treehouse Yellow 6 + 0x17D9C, // Treehouse Yellow 7 + 0x17DC2, // Treehouse Yellow 8 + 0x17DC4, // Treehouse Yellow 9 + 0x0A182, // Treehouse Door 3 + 0x17DC8, // Treehouse First Purple 1 + 0x17DC7, // Treehouse First Purple 2 + 0x17CE4, // Treehouse First Purple 3 + 0x17D2D, // Treehouse First Purple 4 + 0x17D6C, // Treehouse First Purple 5 + 0x17D9B, // Treehouse Second Purple 1 + 0x17D99, // Treehouse Second Purple 2 + 0x17DAA, // Treehouse Second Purple 3 + 0x17D97, // Treehouse Second Purple 4 + 0x17BDF, // Treehouse Second Purple 5 + 0x17D91, // Treehouse Second Purple 6 + 0x17DC6, // Treehouse Second Purple 7 + 0x17DB3, // Treehouse Left Orange 1 + 0x17DB5, // Treehouse Left Orange 2 + 0x17DB6, // Treehouse Left Orange 3 + 0x17DC0, // Treehouse Left Orange 4 + 0x17DD7, // Treehouse Left Orange 5 + 0x17DD9, // Treehouse Left Orange 6 + 0x17DB8, // Treehouse Left Orange 7 + 0x17DDC, // Treehouse Left Orange 8 + 0x17DDE, // Treehouse Left Orange 10 + 0x17DE3, // Treehouse Left Orange 11 + 0x17DEC, // Treehouse Left Orange 12 + 0x17DAE, // Treehouse Left Orange 13 + 0x17DB0, // Treehouse Left Orange 14 + 0x17DDB, // Treehouse Left Orange 15 + 0x17D88, // Treehouse Right Orange 1 + 0x17DB4, // Treehouse Right Orange 2 + 0x17D8C, // Treehouse Right Orange 3 + 0x17DCD, // Treehouse Right Orange 5 + 0x17DB2, // Treehouse Right Orange 6 + 0x17DCC, // Treehouse Right Orange 7 + 0x17DCA, // Treehouse Right Orange 8 + 0x17D8E, // Treehouse Right Orange 9 + 0x17DB1, // Treehouse Right Orange 11 + 0x17DA2, // Treehouse Right Orange 12 + 0x17E3C, // Treehouse Green 1 + 0x17E4D, // Treehouse Green 2 + 0x17E4F, // Treehouse Green 3 + 0x17E5B, // Treehouse Green 5 + 0x17E5F, // Treehouse Green 6 + 0x17E61, // Treehouse Green 7 + 0x17FA9, // Treehouse Green Bridge Discard + 0x17FA0, // Treehouse Laser Discard + 0x00139, // Keep Hedges 1 + 0x019DC, // Keep Hedges 2 + 0x019E7, // Keep Hedges 3 + 0x01A0F, // Keep Hedges 4 + 0x0360E, // Keep Front Laser + 0x03317, // Keep Back Laser + 0x17D27, // Keep Discard + 0x17D28, // Shipwreck Discard + 0x00AFB, // Shipwreck Vault + 0x2899C, // Town 25 Dots 1 + 0x28A33, // Town 25 Dots 2 + 0x28ABF, // Town 25 Dots 3 + 0x28AC0, // Town 25 Dots 4 + 0x28AC1, // Town 25 Dots 5 + 0x28938, // Town Apple Tree + 0x28AC7, // Town Blue 1 + 0x28AC8, // Town Blue 2 + 0x28ACA, // Town Blue 3 + 0x28ACB, // Town Blue 4 + 0x28ACC, // Town Blue 5 + 0x28A0D, // Town Church Stars + 0x28AD9, // Town Eraser + 0x28998, // Town Green Door + 0x0A0C8, // Town Orange Crate + 0x17D01, // Town Orange Crate Discard + 0x03C08, // Town RGB Stars + 0x03C0C, // Town RGB Stones + 0x17C71, // Town Rooftop Discard + 0x17F5F, // Town Windmill Door + 0x17F89, // Theater Entrance + 0x17CF7, // Theater Discard + 0x33AB2, // Theater Corona Exit + 0x0A168, // Theater Sun Exit + 0x00B10, // Monastery Left Door + 0x00C92, // Monastery Right Door + 0x17C2E, // Bunker Entry Door + 0x0056E, // Swamp Entry + 0x00469, // Swamp Tutorial 1 + 0x00472, // Swamp Tutorial 2 + 0x00262, // Swamp Tutorial 3 + 0x00474, // Swamp Tutorial 4 + 0x00553, // Swamp Tutorial 5 + 0x0056F, // Swamp Tutorial 6 + 0x00390, // Swamp Tutorial 7 + 0x010CA, // Swamp Tutorial 8 + 0x00983, // Swamp Tutorial 9 + 0x00984, // Swamp Tutorial 10 + 0x00986, // Swamp Tutorial 11 + 0x00985, // Swamp Tutorial 12 + 0x00987, // Swamp Tutorial 13 + 0x181A9, // Swamp Tutorial 14 + 0x00982, // Swamp Red 1 + 0x0097F, // Swamp Red 2 + 0x0098F, // Swamp Red 3 + 0x00990, // Swamp Red 4 + 0x17C0D, // Swamp Red Shortcut 1 + 0x17C0E, // Swamp Red Shortcut 2 + 0x00999, // Swamp Discontinuous 1 + 0x0099D, // Swamp Discontinuous 2 + 0x009A0, // Swamp Discontinuous 3 + 0x009A1, // Swamp Discontinuous 4 + 0x00007, // Swamp Rotation Tutorial 1 + 0x00008, // Swamp Rotation Tutorial 2 + 0x00009, // Swamp Rotation Tutorial 3 + 0x0000A, // Swamp Rotation Tutorial 4 + 0x009AB, // Swamp Blue Underwater 1 + 0x009AD, // Swamp Blue Underwater 2 + 0x009AE, // Swamp Blue Underwater 3 + 0x009AF, // Swamp Blue Underwater 4 + 0x00006, // Swamp Blue Underwater 5 + 0x003B2, // Swamp Rotation Advanced 1 + 0x00A1E, // Swamp Rotation Advanced 2 + 0x00C2E, // Swamp Rotation Advanced 3 + 0x00E3A, // Swamp Rotation Advanced 4 + 0x009A6, // Swamp Purple Tetris + 0x00002, // Swamp Teal Underwater 1 + 0x00004, // Swamp Teal Underwater 2 + 0x00005, // Swamp Teal Underwater 3 + 0x013E6, // Swamp Teal Underwater 4 + 0x00596, // Swamp Teal Underwater 5 + 0x00001, // Swamp Red Underwater 1 + 0x014D2, // Swamp Red Underwater 2 + 0x014D4, // Swamp Red Underwater 3 + 0x014D1, // Swamp Red Underwater 4 + 0x17C05, // Swamp Laser Shortcut 1 + 0x17C02, // Swamp Laser Shortcut 2 + 0x17F9B, // Jungle Discard + 0x09E73, // Mountain 1 Orange 1 + 0x09E75, // Mountain 1 Orange 2 + 0x09E78, // Mountain 1 Orange 3 + 0x09E79, // Mountain 1 Orange 4 + 0x09E6C, // Mountain 1 Orange 5 + 0x09E6F, // Mountain 1 Orange 6 + 0x09E6B, // Mountain 1 Orange 7 + 0x09EAD, // Mountain 1 Purple 1 + 0x09EAF, // Mountain 1 Purple 2 + 0x09E7A, // Mountain 1 Green 1 + 0x09E71, // Mountain 1 Green 2 + 0x09E72, // Mountain 1 Green 3 + 0x09E69, // Mountain 1 Green 4 + 0x09E7B, // Mountain 1 Green 5 + 0x09FD3, // Mountain 2 Rainbow 1 + 0x09FD4, // Mountain 2 Rainbow 2 + 0x09FD6, // Mountain 2 Rainbow 3 + 0x09FD7, // Mountain 2 Rainbow 4 + 0x17F93, // Mountain 2 Discard + 0x17FA2, // Mountain 3 Secret Door + 0x17C42, // Mountainside Discard + 0x002A6, // Mountainside Vault + 0x0042D, // Mountaintop River + 0x00FF8, // UTM Entrance Door + 0x0A16B, // UTM Green Dots 1 + 0x0A2CE, // UTM Green Dots 2 + 0x0A2D7, // UTM Green Dots 3 + 0x0A2DD, // UTM Green Dots 4 + 0x0A2EA, // UTM Green Dots 5 + 0x17FB9, // UTM Green Dots 6 + 0x0008F, // UTM Invisible Dots 1 + 0x0006B, // UTM Invisible Dots 2 + 0x0008B, // UTM Invisible Dots 3 + 0x0008C, // UTM Invisible Dots 4 + 0x0008A, // UTM Invisible Dots 5 + 0x00089, // UTM Invisible Dots 6 + 0x0006A, // UTM Invisible Dots 7 + 0x0006C, // UTM Invisible Dots 8 + 0x00027, // UTM Invisible Dots Symmetry 1 + 0x00028, // UTM Invisible Dots Symmetry 2 + 0x00029, // UTM Invisible Dots Symmetry 3 + 0x021D7, // UTM Mountainside Shortcut + 0x00B71, // UTM Quarry + 0x01A31, // UTM Rainbow + 0x32962, // UTM Swamp + 0x32966, // UTM Treehouse + 0x17CF2, // UTM Waterfall Shortcut + 0x00A72, // UTM Blue Cave In + 0x009A4, // UTM Blue Discontinuous + 0x018A0, // UTM Blue Easy Symmetry + 0x01A0D, // UTM Blue Hard Symmetry + 0x008B8, // UTM Blue Left 1 + 0x00973, // UTM Blue Left 2 + 0x0097B, // UTM Blue Left 3 + 0x0097D, // UTM Blue Left 4 + 0x0097E, // UTM Blue Left 5 + 0x00994, // UTM Blue Right Far 1 + 0x334D5, // UTM Blue Right Far 2 + 0x00995, // UTM Blue Right Far 3 + 0x00996, // UTM Blue Right Far 4 + 0x00998, // UTM Blue Right Far 5 + 0x00190, // UTM Blue Right Near 1 + 0x00558, // UTM Blue Right Near 2 + 0x00567, // UTM Blue Right Near 3 + 0x006FE, // UTM Blue Right Near 4 + 0x0A16E, // UTM Challenge Entrance + 0x039B4, // Tunnels Theater Catwalk + 0x09E85, // Tunnels Town Shortcut +}; + +std::vector shadowsPanels = { + 0x198B5, // Shadows Tutorial 1 + 0x198BD, // Shadows Tutorial 2 + 0x198BF, // Shadows Tutorial 3 + 0x19771, // Shadows Tutorial 4 + 0x0A8DC, // Shadows Tutorial 5 + 0x0AC74, // Shadows Tutorial 6 + 0x0AC7A, // Shadows Tutorial 7 + 0x0A8E0, // Shadows Tutorial 8 + 0x386FA, // Shadows Avoid 1 + 0x1C33F, // Shadows Avoid 2 + 0x196E2, // Shadows Avoid 3 + 0x1972A, // Shadows Avoid 4 + 0x19809, // Shadows Avoid 5 + 0x19806, // Shadows Avoid 6 + 0x196F8, // Shadows Avoid 7 + 0x1972F, // Shadows Avoid 8 + 0x19797, // Shadows Follow 1 + 0x1979A, // Shadows Follow 2 + 0x197E0, // Shadows Follow 3 + 0x197E8, // Shadows Follow 4 + 0x197E5, // Shadows Follow 5 + 0x19650, // Shadows Laser +}; + +std::vector monasteryPanels = { + 0x00B10, // Monastery Left Door + 0x00290, // Monastery Exterior 1 + 0x00C92, // Monastery Right Door + 0x00038, // Monastery Exterior 2 + 0x00037, // Monastery Exterior 3 +// 0x09D9B, // Monastery Bonsai + 0x193A7, // Monastery Interior 1 + 0x193AA, // Monastery Interior 2 + 0x193AB, // Monastery Interior 3 + 0x193A6, // Monastery Interior 4 +// 0x03713, // Monastery Shortcut + 0x17CA4, // Monastery Laser +}; + +std::vector bunkerPanels = { + 0x09F7D, // Bunker Tutorial 1 + 0x09FDC, // Bunker Tutorial 2 + 0x09FF7, // Bunker Tutorial 3 + 0x09F82, // Bunker Tutorial 4 + 0x09FF8, // Bunker Tutorial 5 + 0x09D9F, // Bunker Advanced 1 + 0x09DA1, // Bunker Advanced 2 + 0x09DA2, // Bunker Advanced 3 + 0x09DAF, // Bunker Advanced 4 +// 0x0A099, // Bunker Glass Door + 0x0A010, // Bunker Glass 1 + 0x0A01B, // Bunker Glass 2 + 0x0A01F, // Bunker Glass 3 + 0x17E63, // Bunker Ultraviolet 1 + 0x17E67, // Bunker Ultraviolet 2 + 0x34BC5, // Bunker Open Ultraviolet + 0x34BC6, // Bunker Close Ultraviolet + 0x0A079, // Bunker Elevator +}; + +std::vector junglePanels = { + 0x002C4, // Jungle Waves 1 + 0x00767, // Jungle Waves 2 + 0x002C6, // Jungle Waves 3 + 0x0070E, // Jungle Waves 4 + 0x0070F, // Jungle Waves 5 + 0x0087D, // Jungle Waves 6 + 0x002C7, // Jungle Waves 7 +// 0x17CAB, // Jungle Pop-up Wall + 0x0026D, // Jungle Dots 1 + 0x0026E, // Jungle Dots 2 + 0x0026F, // Jungle Dots 3 + 0x00C3F, // Jungle Dots 4 + 0x00C41, // Jungle Dots 5 + 0x014B2, // Jungle Dots 6 + 0x03616, // Jungle Laser +}; + +// There might be something to do with these, I haven't decided yet. +std::vector nothingPanels = { +// Doors & Shortcuts & Shortcut doors & Door controls + 0x0C339, // Desert Surface Door + 0x0A249, // Desert Pond Exit Door + 0x275ED, // Mill EP Door + 0x17CAC, // Mill Stairs Shortcut Door + 0x38663, // Boathouse Shortcut + 0x09E49, // Keep Shadows Shortcut + 0x0361B, // Keep Tower Shortcut + 0x334DC, // Shadows Inner Door Control + 0x334DB, // Shadows Outer Door Control + 0x2700B, // Treehouse Exterior Door Control + 0x17CBC, // Treehouse Interior Door Control + 0x337FA, // Jungle Shortcut + +// Controls (?) + 0x09FA0, // Desert Surface 3 Control + 0x09F86, // Desert Surface 8 Control + 0x1C2DF, // Desert Flood Control Lower Far Left + 0x1831E, // Desert Flood Control Lower Far Right + 0x1C260, // Desert Flood Control Lower Near Left + 0x1831C, // Desert Flood Control Lower Near Right + 0x1C2F3, // Desert Flood Control Raise Far Left + 0x1831D, // Desert Flood Control Raise Far Right + 0x1C2B1, // Desert Flood Control Raise Near Left + 0x1831B, // Desert Flood Control Raise Near Right + 0x0A015, // Desert Final Far Control + 0x03678, // Mill Lower Ramp Contol + 0x03679, // Mill Lower Lift Control + 0x03675, // Mill Upper Lift Control + 0x03676, // Mill Upper Ramp Control + 0x03852, // Boathouse Ramp Angle Control + 0x03858, // Boathouse Ramp Position Control + 0x275FA, // Boathouse Hook Control + 0x037FF, // Treehouse Drawbridge Control + 0x09F98, // Town Laser Redirect Control + 0x334D8, // Town RGB Light Control + 0x17E2B, // Swamp Flood Gate Control + 0x00609, // Swamp Surface Sliding Bridge Control + 0x18488, // Swamp Underwater Sliding Bridge Control + 0x17C0A, // Swamp Island Control 1 + 0x17E07, // Swamp Island Control 2 + 0x181F5, // Swamp Rotating Bridge Control + +// Vault Boxes + 0x03481, // Outside Tutorial Vault Box + 0x0339E, // Desert Vault Box + 0x03535, // Shipwreck Vault Box + 0x03702, // Jungle Vault Box + 0x03542, // Mountainside Vault Box + 0x2FAF6, // Tunnels Vault Box + +// Boat Summons + 0x17CC8, // Glass Factory Summon Boat + 0x17CA6, // Boathouse Summon Boat + 0x17C95, // Treehouse Summon Boat + 0x0A054, // Town Summon Boat + 0x09DB8, // Swamp Summon Boat + 0x17CDF, // Jungle Summon Boat + +// Identical sets + 0x00143, // Orchard Apple Tree 1 + 0x0003B, // Orchard Apple Tree 2 + 0x00055, // Orchard Apple Tree 3 + 0x032F7, // Orchard Apple Tree 4 + 0x032FF, // Orchard Apple Tree 5 + 0x009B8, // Symmetry Island Transparent 1 + 0x003E8, // Symmetry Island Transparent 2 + 0x00A15, // Symmetry Island Transparent 3 + 0x00B53, // Symmetry Island Transparent 4 + 0x00B8D, // Symmetry Island Transparent 5 + +// Misc + 0x03629, // Tutorial Gate Open + 0x09FAA, // Desert Lightswitch + 0x0C335, // Tutorial Pillar + 0x0C373, // Tutorial Patio floor + 0x1C349, // Symmetry Island Door 2 - Collision fails here, sadly + 0x18076, // Desert Flood Exit - I am doing something with this -- but it's a very unique panel. + 0x0A15C, // Desert Final Left Convex + 0x09FFF, // Desert Final Left Concave + 0x0A15F, // Desert Final Near + 0x033EA, // Keep Yellow Pressure Plates + 0x0A3A8, // Keep Yellow Reset + 0x01BE9, // Keep Purple Pressure Plates + 0x0A3B9, // Keep Purple Reset + 0x01CD3, // Keep Green Pressure Plates + 0x0A3BB, // Keep Green Reset + 0x01D3F, // Keep Blue Pressure Plates + 0x0A3AD, // Keep Blue Reset + 0x2896A, // Town Bridge + 0x28A69, // Town Lattice + 0x28A79, // Town Maze + 0x28B39, // Town Red Hexagonal + 0x034E3, // Town Soundproof Dots + 0x034E4, // Town Soundproof Waves + 0x079DF, // Town Triple + 0x00815, // Theater Video Input + 0x03553, // Theater Tutorial Video + 0x03552, // Theater Desert Video + 0x0354E, // Theater Jungle Video + 0x03549, // Theater Challenge Video + 0x0354F, // Theater Shipwreck Video + 0x03545, // Theater Mountain Video + 0x18590, // Town Transparent + 0x28AE3, // Town Wire + + + 0x09E39, // Mountain 1 Purple Pathway +// 0x33AF5, // Mountain 1 Blue 1 +// 0x33AF7, // Mountain 1 Blue 2 +// 0x09F6E, // Mountain 1 Blue 3 +// 0x09FD8, // Mountain 2 Rainbow 5 + 0x09E86, // Mountain 2 Blue Pathway + 0x09ED8, // Mountain 2 Orange Pathway + 0x09F8E, // Mountain 3 Near Right Floor + 0x09FC1, // Mountain 3 Near Left Floor + 0x09F01, // Mountain 3 Far Right Floor + 0x09EFF, // Mountain 3 Far Left Floor + 0x09FDA, // Mountain 3 Giant Floor +// 0x01983, // Mountain 3 Left Peekaboo +// 0x01987, // Mountain 3 Right Peekaboo +// 0x3D9A6, // Mountain 3 Left Close Door +// 0x3D9A7, // Mountain 3 Right Close Door +// 0x3D9AA, // Mountain 3 Left Activate Elevator +// 0x3D9A8, // Mountain 3 Right Activate Elevator +// 0x3D9A9, // Mountain 3 Launch Elevator +// 0x3C113, // Mountain 3 Left Open Door +// 0x3C114, // Mountain 3 Right Open Door + 0x09F7F, // Mountaintop Laser Box + 0x17C34, // Mountaintop Perspective +// 0x334E1, // UTM Secret Door Control +// 0x2773D, // Tunnels Desert Shortcut +// 0x27732, // Tunnels Theater Shortcut +// 0x0A099, // Bunker Glass Door +// 0x15ADD, // Jungle Vault +// 0x17CAA, // Jungle Courtyard Gate + 0x0005C, // Glass Factory Vertical Symmetry 5 + 0x17C31, // Desert Final Transparent + 0x19650, // Shadows Laser +}; diff --git a/Source/Randomizer.cpp b/Source/Randomizer.cpp new file mode 100644 index 0000000..75b3cf7 --- /dev/null +++ b/Source/Randomizer.cpp @@ -0,0 +1,251 @@ +/* + * TODO: Split out main() logic into another file, and move into separate functions for easier testing. Then write tests. + * BUGS: + * Shipwreck vault fails, possibly because of dot_reflection? Sometimes? + * Treehouse pivots *should* work, but I need to not copy style_flags. + This seems to cause crashes when pivots appear elsewhere in the world. + * Some panels are impossible casually: (idc, I think) + ** Town Stars, Invisible dots + * Shadows burn marks are not appearing + * Something is wrong with jungle re: softlocks + * FEATURES: + * SWAP_TARGETS should still require the full panel sequence (and have ways to prevent softlocks?) + ** Think about: Jungle + ** Hard: Monastery + ** Do: Challenge + * Randomize audio logs + * Swap sounds in jungle (along with panels) -- maybe impossible + * Make orange 7 (all of oranges?) hard. Like big = hard. + * Start the game if it isn't running? + * UI for the randomizer :( + * Increase odds of mountain oranges garbage on other panels? +*/ +#include "Memory.h" +#include "Randomizer.h" +#include "Panels.h" +#include +#include +#include +#include + +template +size_t find(const std::vector &data, T search, size_t startIndex = 0) { + for (size_t i=startIndex ; i(time(nullptr))); + int seed = rand() % (1 << 16); // Seed from the time in milliseconds + std::cout << "Selected seed: " << seed << std::endl; + srand(seed); + } + + // Content swaps -- must happen before squarePanels + randomizer.Randomize(tallUpDownPanels, SWAP_LINES | SWAP_STYLE); + randomizer.Randomize(upDownPanels, SWAP_LINES | SWAP_STYLE); + randomizer.Randomize(leftForwardRightPanels, SWAP_LINES); + + randomizer.Randomize(squarePanels, SWAP_LINES | SWAP_STYLE); + + // Frame swaps -- must happen after squarePanels + randomizer.Randomize(burnablePanels, SWAP_LINES | SWAP_STYLE); + + // Target swaps, can happen whenever + randomizer.Randomize(lasers, SWAP_TARGETS); + // Read the target of keep front laser, and write it to keep back laser. + std::vector keepFrontLaserTarget = randomizer.ReadPanelData(0x0360E, TARGET, 1); + randomizer.WritePanelData(0x03317, TARGET, keepFrontLaserTarget); + + std::vector randomOrder; + + /* Jungle + randomOrder = std::vector(junglePanels.size(), 0); + std::iota(randomOrder.begin(), randomOrder.end(), 0); + // Randomize Waves 2-7 + // Waves 1 cannot be randomized, since no other panel can start on + randomizer.RandomizeRange(randomOrder, SWAP_NONE, 1, 7); + // Randomize Pitches 1-6 onto themselves + randomizer.RandomizeRange(randomOrder, SWAP_NONE, 7, 13); + randomizer.ReassignTargets(junglePanels, randomOrder); + */ + + /* Bunker */ + randomOrder = std::vector(bunkerPanels.size(), 0); + std::iota(randomOrder.begin(), randomOrder.end(), 0); + // Randomize Tutorial 2-Advanced Tutorial 4 + Glass 1 + // Tutorial 1 cannot be randomized, since no other panel can start on + // Glass 1 will become door + glass 1, due to the targetting system + randomizer.RandomizeRange(randomOrder, SWAP_NONE, 1, 10); + // Randomize Glass 1-3 into everything after the door + const size_t glassDoorIndex = find(randomOrder, 9) + 1; + randomizer.RandomizeRange(randomOrder, SWAP_NONE, glassDoorIndex, 12); + randomizer.ReassignTargets(bunkerPanels, randomOrder); + + /* Shadows */ + randomOrder = std::vector(shadowsPanels.size(), 0); + std::iota(randomOrder.begin(), randomOrder.end(), 0); + randomizer.RandomizeRange(randomOrder, SWAP_NONE, 0, 8); // Tutorial + randomizer.RandomizeRange(randomOrder, SWAP_NONE, 8, 16); // Avoid + randomizer.RandomizeRange(randomOrder, SWAP_NONE, 16, 21); // Follow + randomizer.ReassignTargets(shadowsPanels, randomOrder); + // Turn off original starting panel + randomizer.WritePanelData(shadowsPanels[0], POWER, {0.0f, 0.0f}); + // Turn on new starting panel + randomizer.WritePanelData(shadowsPanels[randomOrder[0]], POWER, {1.0f, 1.0f}); + + /* Monastery + randomOrder = std::vector(monasteryPanels.size(), 0); + std::iota(randomOrder.begin(), randomOrder.end(), 0); + randomizer.RandomizeRange(randomOrder, SWAP_NONE, 2, 6); // outer 2 & 3, inner 1 + // Once outer 3 and right door are solved, inner 2-4 are accessible + int innerPanelsIndex = max(find(randomOrder, 2), find(randomOrder, 4)); + randomizer.RandomizeRange(randomOrder, SWAP_NONE, innerPanelsIndex, 9); // Inner 2-4 + + randomizer.ReassignTargets(monasteryPanels, randomOrder); + */ +} + +Randomizer::Randomizer() +{ + // Turn off desert surface 8 + WritePanelData(0x09F94, POWER, {0.0, 0.0}); + // Turn off desert flood final + WritePanelData(0x18076, POWER, {0.0, 0.0}); + // Change desert floating target to desert flood final + WritePanelData(0x17ECA, TARGET, {0x18077}); + + // Distance-gate shadows laser to prevent sniping through the bars + WritePanelData(0x19650, MAX_BROADCAST_DISTANCE, {2.5}); + // Change the shadows tutorial cable to only activate avoid + WritePanelData(0x319A8, CABLE_TARGET_2, {0}); + // Change shadows avoid 8 to power shadows follow + WritePanelData(0x1972F, TARGET, {0x1C34C}); + + // Distance-gate swamp snipe 1 to prevent RNG swamp snipe + WritePanelData(0x17C05, MAX_BROADCAST_DISTANCE, {5.0}); + + // Disable tutorial cursor speed modifications (not working?) + WritePanelData(0x00295, CURSOR_SPEED_SCALE, {1.0}); + WritePanelData(0x0C373, CURSOR_SPEED_SCALE, {1.0}); + WritePanelData(0x00293, CURSOR_SPEED_SCALE, {1.0}); + WritePanelData(0x002C2, CURSOR_SPEED_SCALE, {1.0}); +} + +void Randomizer::Randomize(std::vector& panels, int flags) { + return RandomizeRange(panels, flags, 0, panels.size()); +} + +// Range is [start, end) +void Randomizer::RandomizeRange(std::vector &panels, int flags, size_t startIndex, size_t endIndex) { + if (panels.size() == 0) return; + if (startIndex >= endIndex) return; + if (endIndex >= panels.size()) endIndex = panels.size(); + for (size_t i = endIndex-1; i > startIndex+1; i--) { + const size_t target = rand() % (i - startIndex) + startIndex; + if (i != target) { + // std::cout << "Swapping panels " << std::hex << panels[i] << " and " << std::hex << panels[target] << std::endl; + SwapPanels(panels[i], panels[target], flags); + std::swap(panels[i], panels[target]); // Panel indices in the array + } + } +} + +void Randomizer::SwapPanels(int panel1, int panel2, int flags) { + std::map offsets; + + if (flags & SWAP_TARGETS) { + offsets[TARGET] = sizeof(int); + } + if (flags & SWAP_STYLE) { + offsets[STYLE_FLAGS] = sizeof(int); + } + if (flags & SWAP_LINES) { + offsets[PATH_COLOR] = 16; + offsets[REFLECTION_PATH_COLOR] = 16; + offsets[DOT_COLOR] = 16; + offsets[ACTIVE_COLOR] = 16; + offsets[BACKGROUND_REGION_COLOR] = 16; + offsets[SUCCESS_COLOR_A] = 16; + offsets[SUCCESS_COLOR_B] = 16; + offsets[STROBE_COLOR_A] = 16; + offsets[STROBE_COLOR_B] = 16; + offsets[ERROR_COLOR] = 16; + offsets[PATTERN_POINT_COLOR] = 16; + offsets[PATTERN_POINT_COLOR_A] = 16; + offsets[PATTERN_POINT_COLOR_B] = 16; + offsets[SYMBOL_A] = 16; + offsets[SYMBOL_B] = 16; + offsets[SYMBOL_C] = 16; + offsets[SYMBOL_D] = 16; + offsets[SYMBOL_E] = 16; + offsets[PUSH_SYMBOL_COLORS] = sizeof(int); + offsets[OUTER_BACKGROUND] = 16; + offsets[OUTER_BACKGROUND_MODE] = sizeof(int); + offsets[TRACED_EDGES] = 16; + offsets[AUDIO_PREFIX] = sizeof(void*); +// offsets[IS_CYLINDER] = sizeof(int); +// offsets[CYLINDER_Z0] = sizeof(float); +// offsets[CYLINDER_Z1] = sizeof(float); +// offsets[CYLINDER_RADIUS] = sizeof(float); + offsets[SPECULAR_ADD] = sizeof(float); + offsets[SPECULAR_POWER] = sizeof(int); + offsets[PATH_WIDTH_SCALE] = sizeof(float); + offsets[STARTPOINT_SCALE] = sizeof(float); + offsets[NUM_DOTS] = sizeof(int); + offsets[NUM_CONNECTIONS] = sizeof(int); + offsets[DOT_POSITIONS] = sizeof(void*); + offsets[DOT_FLAGS] = sizeof(void*); + offsets[DOT_CONNECTION_A] = sizeof(void*); + offsets[DOT_CONNECTION_B] = sizeof(void*); + offsets[DECORATIONS] = sizeof(void*); + offsets[DECORATION_FLAGS] = sizeof(void*); + offsets[DECORATION_COLORS] = sizeof(void*); + offsets[NUM_DECORATIONS] = sizeof(int); + offsets[REFLECTION_DATA] = sizeof(void*); + offsets[GRID_SIZE_X] = sizeof(int); + offsets[GRID_SIZE_Y] = sizeof(int); + offsets[SEQUENCE_LEN] = sizeof(int); + offsets[SEQUENCE] = sizeof(void*); + offsets[DOT_SEQUENCE_LEN] = sizeof(int); + offsets[DOT_SEQUENCE] = sizeof(void*); + offsets[DOT_SEQUENCE_LEN_REFLECTION] = sizeof(int); + offsets[DOT_SEQUENCE_REFLECTION] = sizeof(void*); + offsets[NUM_COLORED_REGIONS] = sizeof(int); + offsets[COLORED_REGIONS] = sizeof(void*); + offsets[PANEL_TARGET] = sizeof(void*); + offsets[SPECULAR_TEXTURE] = sizeof(void*); + } + + for (auto const& [offset, size] : offsets) { + std::vector panel1data = ReadPanelData(panel1, offset, size); + std::vector panel2data = ReadPanelData(panel2, offset, size); + WritePanelData(panel2, offset, panel1data); + WritePanelData(panel1, offset, panel2data); + } +} + +void Randomizer::ReassignTargets(const std::vector& panels, const std::vector& order) { + // This list is offset by 1, so the target of the Nth panel is in position N (aka the N+1th element) + // The first panel may not have a wire to power it, so we use the panel ID itself. + std::vector targetToActivatePanel = {panels[0] + 1}; + for (const int panel : panels) { + int target = ReadPanelData(panel, TARGET, 1)[0]; + targetToActivatePanel.push_back(target); + } + + for (size_t i=0; i(panels[order[i]], TARGET, {panelTarget}); + } +} diff --git a/Source/Randomizer.h b/Source/Randomizer.h new file mode 100644 index 0000000..b644a1d --- /dev/null +++ b/Source/Randomizer.h @@ -0,0 +1,157 @@ +#pragma once +#include "Memory.h" + +// #define GLOBALS 0x5B28C0 +#define GLOBALS 0x62A080 + +__declspec(selectany) int SWAP_NONE = 0x0; +__declspec(selectany) int SWAP_TARGETS = 0x1; +__declspec(selectany) int SWAP_LINES = 0x2; +__declspec(selectany) int SWAP_STYLE = 0x4; + +class Randomizer { +public: + Randomizer(); + + void Randomize(std::vector& panels, int flags); + void RandomizeRange(std::vector &panels, int flags, size_t startIndex, size_t endIndex); + void SwapPanels(int panel1, int panel2, int flags); + void ReassignTargets(const std::vector& panels, const std::vector& order); + + template + std::vector ReadPanelData(int panel, int offset, size_t size) { + return _memory.ReadData({GLOBALS, 0x18, panel*8, offset}, size); + } + + template + void WritePanelData(int panel, int offset, const std::vector& data) { + _memory.WriteData({GLOBALS, 0x18, panel*8, offset}, data); + } + +private: + Memory _memory = Memory("witness64_d3d11.exe"); +}; + +#if GLOBALS == 0x5B28C0 +#define PATH_COLOR 0xC8 +#define REFLECTION_PATH_COLOR 0xD8 +#define DOT_COLOR 0xF8 +#define ACTIVE_COLOR 0x108 +#define BACKGROUND_REGION_COLOR 0x118 +#define SUCCESS_COLOR_A 0x128 +#define SUCCESS_COLOR_B 0x138 +#define STROBE_COLOR_A 0x148 +#define STROBE_COLOR_B 0x158 +#define ERROR_COLOR 0x168 +#define PATTERN_POINT_COLOR 0x188 +#define PATTERN_POINT_COLOR_A 0x198 +#define PATTERN_POINT_COLOR_B 0x1A8 +#define SYMBOL_A 0x1B8 +#define SYMBOL_B 0x1C8 +#define SYMBOL_C 0x1D8 +#define SYMBOL_D 0x1E8 +#define SYMBOL_E 0x1F8 +#define PUSH_SYMBOL_COLORS 0x208 +#define OUTER_BACKGROUND 0x20C +#define OUTER_BACKGROUND_MODE 0x21C +#define TRACED_EDGES 0x230 +#define AUDIO_PREFIX 0x278 +#define POWER 0x2A8 +#define TARGET 0x2BC +#define IS_CYLINDER 0x2FC +#define CYLINDER_Z0 0x300 +#define CYLINDER_Z1 0x304 +#define CYLINDER_RADIUS 0x308 +#define CURSOR_SPEED_SCALE 0x358 +#define SPECULAR_ADD 0x398 +#define SPECULAR_POWER 0x39C +#define PATH_WIDTH_SCALE 0x3A4 +#define STARTPOINT_SCALE 0x3A8 +#define NUM_DOTS 0x3B8 +#define NUM_CONNECTIONS 0x3BC +#define MAX_BROADCAST_DISTANCE 0x3C0 +#define DOT_POSITIONS 0x3C8 +#define DOT_FLAGS 0x3D0 +#define DOT_CONNECTION_A 0x3D8 +#define DOT_CONNECTION_B 0x3E0 +#define DECORATIONS 0x420 +#define DECORATION_FLAGS 0x428 +#define DECORATION_COLORS 0x430 +#define NUM_DECORATIONS 0x438 +#define REFLECTION_DATA 0x440 +#define GRID_SIZE_X 0x448 +#define GRID_SIZE_Y 0x44C +#define STYLE_FLAGS 0x450 +#define SEQUENCE_LEN 0x45C +#define SEQUENCE 0x460 +#define DOT_SEQUENCE_LEN 0x468 +#define DOT_SEQUENCE 0x470 +#define DOT_SEQUENCE_LEN_REFLECTION 0x478 +#define DOT_SEQUENCE_REFLECTION 0x480 +#define NUM_COLORED_REGIONS 0x4A0 +#define COLORED_REGIONS 0x4A8 +#define PANEL_TARGET 0x4B0 +#define SPECULAR_TEXTURE 0x4D8 +#define CABLE_TARGET_2 0xD8 +#elif GLOBALS == 0x62A080 +#define PATH_COLOR 0xC0 +#define REFLECTION_PATH_COLOR 0xD0 +#define DOT_COLOR 0xF0 +#define ACTIVE_COLOR 0x100 +#define BACKGROUND_REGION_COLOR 0x110 +#define SUCCESS_COLOR_A 0x120 +#define SUCCESS_COLOR_B 0x130 +#define STROBE_COLOR_A 0x140 +#define STROBE_COLOR_B 0x150 +#define ERROR_COLOR 0x160 +#define PATTERN_POINT_COLOR 0x180 +#define PATTERN_POINT_COLOR_A 0x190 +#define PATTERN_POINT_COLOR_B 0x1A0 +#define SYMBOL_A 0x1B0 +#define SYMBOL_B 0x1C0 +#define SYMBOL_C 0x1D0 +#define SYMBOL_D 0x1E0 +#define SYMBOL_E 0x1F0 +#define PUSH_SYMBOL_COLORS 0x200 +#define OUTER_BACKGROUND 0x204 +#define OUTER_BACKGROUND_MODE 0x214 +#define TRACED_EDGES 0x228 +#define AUDIO_PREFIX 0x270 +#define POWER 0x2A0 +#define TARGET 0x2B4 +#define IS_CYLINDER 0x2F4 +#define CYLINDER_Z0 0x2F8 +#define CYLINDER_Z1 0x2FC +#define CYLINDER_RADIUS 0x300 +#define CURSOR_SPEED_SCALE 0x350 +#define SPECULAR_ADD 0x38C +#define SPECULAR_POWER 0x390 +#define PATH_WIDTH_SCALE 0x39C +#define STARTPOINT_SCALE 0x3A0 +#define NUM_DOTS 0x3B4 +#define NUM_CONNECTIONS 0x3B8 +#define MAX_BROADCAST_DISTANCE 0x3BC +#define DOT_POSITIONS 0x3C0 +#define DOT_FLAGS 0x3C8 +#define DOT_CONNECTION_A 0x3D0 +#define DOT_CONNECTION_B 0x3D8 +#define DECORATIONS 0x418 +#define DECORATION_FLAGS 0x420 +#define DECORATION_COLORS 0x428 +#define NUM_DECORATIONS 0x430 +#define REFLECTION_DATA 0x438 +#define GRID_SIZE_X 0x440 +#define GRID_SIZE_Y 0x444 +#define STYLE_FLAGS 0x448 +#define SEQUENCE_LEN 0x454 +#define SEQUENCE 0x458 +#define DOT_SEQUENCE_LEN 0x460 +#define DOT_SEQUENCE 0x468 +#define DOT_SEQUENCE_LEN_REFLECTION 0x470 +#define DOT_SEQUENCE_REFLECTION 0x478 +#define NUM_COLORED_REGIONS 0x498 +#define COLORED_REGIONS 0x4A0 +#define PANEL_TARGET 0x4A8 +#define SPECULAR_TEXTURE 0x4D0 +#define CABLE_TARGET_2 0xD0 +#endif \ No newline at end of file diff --git a/Source/Resource.h b/Source/Resource.h new file mode 100644 index 0000000..c26455a Binary files /dev/null and b/Source/Resource.h differ diff --git a/Source/Source.ico b/Source/Source.ico new file mode 100644 index 0000000..b3ec03b Binary files /dev/null and b/Source/Source.ico differ diff --git a/Source/Source.rc b/Source/Source.rc new file mode 100644 index 0000000..a26e599 Binary files /dev/null and b/Source/Source.rc differ diff --git a/Source/Source.vcxproj b/Source/Source.vcxproj new file mode 100644 index 0000000..8a6c8eb --- /dev/null +++ b/Source/Source.vcxproj @@ -0,0 +1,181 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 15.0 + {CED79182-F36B-4D07-AD0E-249C15BFAD73} + Win32Proj + Source + 10.0.17134.0 + + + + Application + true + v141 + Unicode + + + Application + false + v141 + true + Unicode + + + Application + true + v141 + Unicode + + + StaticLibrary + false + v141 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + + + true + + + false + + + false + + + + Use + Level3 + Disabled + true + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + + + Windows + true + + + + + Use + Level3 + Disabled + true + _DEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + + + Windows + true + + + + + Use + Level3 + MaxSpeed + true + true + true + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + + + Windows + true + true + true + + + + + NotUsing + Level3 + MaxSpeed + true + true + true + NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + true + stdcpp17 + + + Windows + true + true + true + + + + + + + + + + + + + + + + + Create + Create + Create + Create + + + + + + + + + + + + + \ No newline at end of file diff --git a/Source/Source.vcxproj.filters b/Source/Source.vcxproj.filters new file mode 100644 index 0000000..aad417a --- /dev/null +++ b/Source/Source.vcxproj.filters @@ -0,0 +1,67 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Resource Files + + + + + Resource Files + + + Resource Files + + + \ No newline at end of file diff --git a/Source/small.ico b/Source/small.ico new file mode 100644 index 0000000..b3ec03b Binary files /dev/null and b/Source/small.ico differ diff --git a/Source/stdafx.cpp b/Source/stdafx.cpp new file mode 100644 index 0000000..08343af Binary files /dev/null and b/Source/stdafx.cpp differ diff --git a/Source/stdafx.h b/Source/stdafx.h new file mode 100644 index 0000000..345292c Binary files /dev/null and b/Source/stdafx.h differ diff --git a/Source/targetver.h b/Source/targetver.h new file mode 100644 index 0000000..567cd34 Binary files /dev/null and b/Source/targetver.h differ diff --git a/Test/OrderingTests.cpp b/Test/OrderingTests.cpp new file mode 100644 index 0000000..79163d6 --- /dev/null +++ b/Test/OrderingTests.cpp @@ -0,0 +1,7 @@ +#include "gtest/gtest.h" +#include "../Source/Randomizer.h" +#include "../Source/Memory.h" + +TEST(OrderingTests, TestJungleOrder) { + Randomizer _randomizer; +} \ No newline at end of file diff --git a/Test/Test.vcxproj b/Test/Test.vcxproj new file mode 100644 index 0000000..6905605 --- /dev/null +++ b/Test/Test.vcxproj @@ -0,0 +1,124 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + {98bc35b9-ee1a-4d77-85f2-adaa72db16f7} + Win32Proj + 10.0.17134.0 + Application + v141 + Unicode + + + + + + + + + + + + + {ced79182-f36b-4d07-ad0e-249c15bfad73} + + + + + + + + + + + + + Use + pch.h + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level3 + + + true + Console + + + + + Use + pch.h + Disabled + X64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level3 + + + true + Console + + + + + Use + pch.h + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + Level3 + ProgramDatabase + + + true + Console + true + true + + + + + NotUsing + pch.h + X64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + Level3 + ProgramDatabase + + + 4996 + + + true + Console + true + true + + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + \ No newline at end of file diff --git a/Test/packages.config b/Test/packages.config new file mode 100644 index 0000000..0acd30a --- /dev/null +++ b/Test/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/WitnessRandomizer.sln b/WitnessRandomizer.sln index 35f5c09..bc19048 100644 --- a/WitnessRandomizer.sln +++ b/WitnessRandomizer.sln @@ -1,9 +1,13 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.28010.2046 +VisualStudioVersion = 15.0.28010.2048 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WitnessRandomizer", "WitnessRandomizer\WitnessRandomizer.vcxproj", "{1563D1E2-0A18-4AFC-8D6F-9F8D9A433F31}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Source", "Source\Source.vcxproj", "{CED79182-F36B-4D07-AD0E-249C15BFAD73}" +EndProject +Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "Installer", "Installer\Installer.vdproj", "{90113AEC-8765-4A8D-B7A1-6C9BE730E5D5}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Test", "Test\Test.vcxproj", "{98BC35B9-EE1A-4D77-85F2-ADAA72DB16F7}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -13,19 +17,31 @@ Global Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {1563D1E2-0A18-4AFC-8D6F-9F8D9A433F31}.Debug|x64.ActiveCfg = Debug|x64 - {1563D1E2-0A18-4AFC-8D6F-9F8D9A433F31}.Debug|x64.Build.0 = Debug|x64 - {1563D1E2-0A18-4AFC-8D6F-9F8D9A433F31}.Debug|x86.ActiveCfg = Debug|Win32 - {1563D1E2-0A18-4AFC-8D6F-9F8D9A433F31}.Debug|x86.Build.0 = Debug|Win32 - {1563D1E2-0A18-4AFC-8D6F-9F8D9A433F31}.Release|x64.ActiveCfg = Release|x64 - {1563D1E2-0A18-4AFC-8D6F-9F8D9A433F31}.Release|x64.Build.0 = Release|x64 - {1563D1E2-0A18-4AFC-8D6F-9F8D9A433F31}.Release|x86.ActiveCfg = Release|Win32 - {1563D1E2-0A18-4AFC-8D6F-9F8D9A433F31}.Release|x86.Build.0 = Release|Win32 + {CED79182-F36B-4D07-AD0E-249C15BFAD73}.Debug|x64.ActiveCfg = Debug|x64 + {CED79182-F36B-4D07-AD0E-249C15BFAD73}.Debug|x64.Build.0 = Debug|x64 + {CED79182-F36B-4D07-AD0E-249C15BFAD73}.Debug|x86.ActiveCfg = Release|x64 + {CED79182-F36B-4D07-AD0E-249C15BFAD73}.Debug|x86.Build.0 = Release|x64 + {CED79182-F36B-4D07-AD0E-249C15BFAD73}.Release|x64.ActiveCfg = Release|x64 + {CED79182-F36B-4D07-AD0E-249C15BFAD73}.Release|x64.Build.0 = Release|x64 + {CED79182-F36B-4D07-AD0E-249C15BFAD73}.Release|x86.ActiveCfg = Release|Win32 + {CED79182-F36B-4D07-AD0E-249C15BFAD73}.Release|x86.Build.0 = Release|Win32 + {90113AEC-8765-4A8D-B7A1-6C9BE730E5D5}.Debug|x64.ActiveCfg = Debug + {90113AEC-8765-4A8D-B7A1-6C9BE730E5D5}.Debug|x86.ActiveCfg = Release + {90113AEC-8765-4A8D-B7A1-6C9BE730E5D5}.Release|x64.ActiveCfg = Release + {90113AEC-8765-4A8D-B7A1-6C9BE730E5D5}.Release|x86.ActiveCfg = Release + {98BC35B9-EE1A-4D77-85F2-ADAA72DB16F7}.Debug|x64.ActiveCfg = Debug|x64 + {98BC35B9-EE1A-4D77-85F2-ADAA72DB16F7}.Debug|x64.Build.0 = Debug|x64 + {98BC35B9-EE1A-4D77-85F2-ADAA72DB16F7}.Debug|x86.ActiveCfg = Release|x64 + {98BC35B9-EE1A-4D77-85F2-ADAA72DB16F7}.Debug|x86.Build.0 = Release|x64 + {98BC35B9-EE1A-4D77-85F2-ADAA72DB16F7}.Release|x64.ActiveCfg = Release|x64 + {98BC35B9-EE1A-4D77-85F2-ADAA72DB16F7}.Release|x64.Build.0 = Release|x64 + {98BC35B9-EE1A-4D77-85F2-ADAA72DB16F7}.Release|x86.ActiveCfg = Release|Win32 + {98BC35B9-EE1A-4D77-85F2-ADAA72DB16F7}.Release|x86.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {16A86E99-24E8-45C7-A6E2-1FA2C179A898} + SolutionGuid = {FA6FC0F4-9C3E-4A88-91BD-BB64F7455207} EndGlobalSection EndGlobal diff --git a/WitnessRandomizer.vcxproj b/WitnessRandomizer.vcxproj new file mode 100644 index 0000000..e70c453 --- /dev/null +++ b/WitnessRandomizer.vcxproj @@ -0,0 +1,122 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 15.0 + {B1AF0C99-EDE5-464E-9092-7817365235F1} + WitnessRandomizer + 10.0.17134.0 + + + + Application + true + v141 + MultiByte + + + Application + false + v141 + true + MultiByte + + + Application + true + v141 + MultiByte + + + Application + false + v141 + true + MultiByte + + + + + + + + + + + + + + + + + + + + + + + Level3 + Disabled + true + true + + + + + Level3 + Disabled + true + true + + + + + Level3 + MaxSpeed + true + true + true + true + + + true + true + + + + + Level3 + MaxSpeed + true + true + true + true + + + true + true + + + + + + + + \ No newline at end of file diff --git a/WitnessRandomizer.vcxproj.filters b/WitnessRandomizer.vcxproj.filters new file mode 100644 index 0000000..4863ddb --- /dev/null +++ b/WitnessRandomizer.vcxproj.filters @@ -0,0 +1,17 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + \ No newline at end of file diff --git a/WitnessRandomizer/Memory.cpp b/WitnessRandomizer/Memory.cpp deleted file mode 100644 index 0afeded..0000000 --- a/WitnessRandomizer/Memory.cpp +++ /dev/null @@ -1,80 +0,0 @@ -#include "Memory.h" -#include -#include -#include - -#undef PROCESSENTRY32 -#undef Process32Next - -Memory::Memory(const std::string& processName) { - // First, get the handle of the process - PROCESSENTRY32 entry; - entry.dwSize = sizeof(entry); - HANDLE snapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0); - while (Process32Next(snapshot, &entry)) { - if (processName == entry.szExeFile) { - _handle = OpenProcess(PROCESS_ALL_ACCESS, FALSE, entry.th32ProcessID); - break; - } - } - if (!_handle) { - std::cout << "Couldn't find " << processName.c_str() << ", is it open?" << std::endl; - exit(EXIT_FAILURE); - } - - // Next, get the process base address - DWORD numModules; - std::vector moduleList(1024); - EnumProcessModulesEx(_handle, &moduleList[0], static_cast(moduleList.size()), &numModules, 3); - - std::string name(64, 0); - for (DWORD i = 0; i < numModules / sizeof(HMODULE); i++) { - GetModuleBaseNameA(_handle, moduleList[i], &name[0], sizeof(name)); - - // TODO: Filling with 0s still yeilds name.size() == 64... - if (strcmp(processName.c_str(), name.c_str()) == 0) { - _baseAddress = (uintptr_t)moduleList[i]; - break; - } - } - if (_baseAddress == 0) { - std::cout << "Couldn't find the base process address!" << std::endl; - exit(EXIT_FAILURE); - } -} - -Memory::~Memory() { - CloseHandle(_handle); -} - -void Memory::ThrowError() { - std::string message(256, '\0'); - FormatMessageA(4096, nullptr, GetLastError(), 1024, &message[0], static_cast(message.length()), nullptr); - std::cout << message.c_str() << std::endl; - exit(EXIT_FAILURE); -} - -void* Memory::ComputeOffset(std::vector offsets) -{ - // Leave off the last offset, since it will be either read/write, and may not be of type unitptr_t. - int final_offset = offsets.back(); - offsets.pop_back(); - - uintptr_t cumulativeAddress = _baseAddress; - for (const int offset : offsets) { - cumulativeAddress += offset; - - const auto search = _computedAddresses.find(cumulativeAddress); - if (search == std::end(_computedAddresses)) { - // If the address is not yet computed, then compute it. - uintptr_t computedAddress = 0; - if (!ReadProcessMemory(_handle, reinterpret_cast(cumulativeAddress), &computedAddress, sizeof(uintptr_t), NULL)) { - ThrowError(); - } - _computedAddresses[cumulativeAddress] = computedAddress; - } - - cumulativeAddress = _computedAddresses[cumulativeAddress]; - } - return reinterpret_cast(cumulativeAddress + final_offset); -} diff --git a/WitnessRandomizer/Memory.h b/WitnessRandomizer/Memory.h deleted file mode 100644 index 8e8bbc3..0000000 --- a/WitnessRandomizer/Memory.h +++ /dev/null @@ -1,51 +0,0 @@ -#pragma once -#include -#include -#include - -// https://github.com/erayarslan/WriteProcessMemory-Example -// http://stackoverflow.com/q/32798185 -// http://stackoverflow.com/q/36018838 -// http://stackoverflow.com/q/1387064 -class Memory -{ -public: - Memory(const std::string& processName); - ~Memory(); - - Memory(const Memory& memory) = delete; - Memory& operator=(const Memory& other) = delete; - - template - std::vector ReadData(const std::vector& offsets, size_t numItems) { - std::vector data; - data.resize(numItems); - for (int i=0; i<5; i++) { - if (ReadProcessMemory(_handle, ComputeOffset(offsets), &data[0], sizeof(T) * numItems, nullptr)) - { - return data; - } - } - ThrowError(); - return {}; - } - - template - void WriteData(const std::vector& offsets, const std::vector& data) { - for (int i=0; i<5; i++) { - if (WriteProcessMemory(_handle, ComputeOffset(offsets), &data[0], sizeof(T) * data.size(), nullptr)) { - return; - } - } - ThrowError(); - } - -private: - void ThrowError(); - - void* ComputeOffset(std::vector offsets); - - std::map _computedAddresses; - uintptr_t _baseAddress = 0; - HANDLE _handle = nullptr; -}; \ No newline at end of file diff --git a/WitnessRandomizer/Panels.h b/WitnessRandomizer/Panels.h deleted file mode 100644 index e070005..0000000 --- a/WitnessRandomizer/Panels.h +++ /dev/null @@ -1,681 +0,0 @@ -#pragma once -#include - -// Some of these (the puzzle ones) are duplicated elsewhere -std::vector lasers = { - 0x0360D, // Symmetry - 0x03615, // Swamp - 0x09DE0, // Bunker - 0x17CA4, // Monastery - 0x032F5, // Town - 0x03613, // Treehouse - 0x0360E, // Keep Front Laser -// 0x03317, // Keep Back Laser -// 0x03608, // Desert - 0x03612, // Quarry - 0x03616, // Jungle - 0x19650, // Shadows -}; - -// Note: Some of these (non-desert) are duplicated elsewhere -std::vector burnablePanels = { - 0x17D9C, // Treehouse Yellow 7 - 0x17DC2, // Treehouse Yellow 8 - 0x17DC4, // Treehouse Yellow 9 - 0x00999, // Swamp Discontinuous 1 - 0x0099D, // Swamp Discontinuous 2 - 0x009A0, // Swamp Discontinuous 3 - 0x009A1, // Swamp Discontinuous 4 - 0x00007, // Swamp Rotation Tutorial 1 - 0x00008, // Swamp Rotation Tutorial 2 - 0x00009, // Swamp Rotation Tutorial 3 - 0x0000A, // Swamp Rotation Tutorial 4 - 0x28AC7, // Town Blue 1 - 0x28AC8, // Town Blue 2 - 0x28ACA, // Town Blue 3 - 0x28ACB, // Town Blue 4 - 0x28ACC, // Town Blue 5 - 0x17CF0, // Mill Discard - - 0x00698, // Desert Surface 1 - 0x0048F, // Desert Surface 2 - 0x09F92, // Desert Surface 3 - 0x0A036, // Desert Surface 4 - 0x09DA6, // Desert Surface 5 - 0x0A049, // Desert Surface 6 - 0x0A053, // Desert Surface 7 - 0x09F94, // Desert Surface 8 - 0x00422, // Desert Light 1 - 0x006E3, // Desert Light 2 - 0x0A02D, // Desert Light 3 - 0x00C72, // Desert Pond 1 - 0x0129D, // Desert Pond 2 - 0x008BB, // Desert Pond 3 - 0x0078D, // Desert Pond 4 - 0x18313, // Desert Pond 5 - 0x04D18, // Desert Flood 1 - 0x01205, // Desert Flood 2 - 0x181AB, // Desert Flood 3 - 0x0117A, // Desert Flood 4 - 0x17ECA, // Desert Flood 5 - 0x012D7, // Desert Final Far -}; - -// Note: Some of these (non-controls) are duplicated elsewhere -// TODO: Gave up -std::vector leftRightPanels = { - 0x01A54, // Glass Factory Entry - 0x00086, // Glass Factory Vertical Symmetry 1 - 0x00087, // Glass Factory Vertical Symmetry 2 - 0x00059, // Glass Factory Vertical Symmetry 3 - 0x00062, // Glass Factory Vertical Symmetry 4 - 0x00025, // Symmetry Island Black Dots 4 - 0x00026, // Symmetry Island Black Dots 5 - 0x00072, // Symmetry Island Fading Lines 3 - - 0x17D02, // Town Windmill Control -}; - -// These panels are very tall (aka not square) and can't take symmetry panels on them. -std::vector tallUpDownPanels = { - 0x335AB, // UTM In Elevator Control - 0x3369D, // UTM Lower Elevator Control - 0x335AC, // UTM Upper Elevator Control - 0x09EEB, // Mountain 2 Elevator -}; - -// Note: Some of these (non-controls) are duplicated elsewhere -std::vector upDownPanels = { - 0x0008D, // Glass Factory Rotational Symmetry 1 - 0x00081, // Glass Factory Rotational Symmetry 2 - 0x00083, // Glass Factory Rotational Symmetry 3 - 0x00084, // Glass Factory Melting 1 - 0x00070, // Symmetry Island Fading Lines 5 - 0x01E5A, // Mill Entry Door Left - 0x28AC7, // Town Blue 1 - 0x28AC8, // Town Blue 2 - 0x28ACA, // Town Blue 3 - 0x28ACB, // Town Blue 4 - 0x28ACC, // Town Blue 5 - 0x00029, // UTM Invisible Dots Symmetry 3 - - 0x0A3B5, // Tutorial Back Left - 0x17CC4, // Mill Elevator Control -}; - -// Note: Some of these (non-controls) are duplicated elsewhere -std::vector leftForwardRightPanels = { -// 0x00075, // Symmetry Island Colored Dots 3 -// 0x288EA, // UTM Perspective 1 -// 0x288FC, // UTM Perspective 2 -// 0x289E7, // UTM Perspective 3 - - 0x17DD1, // Treehouse Left Orange 9 - 0x17CE3, // Treehouse Right Orange 4 - 0x17DB7, // Treehouse Right Orange 10 - 0x17E52, // Treehouse Green 4 -}; - -std::vector pillars = { - 0x0383D, // Mountain 3 Left Pillar 1 - 0x0383F, // Mountain 3 Left Pillar 2 - 0x03859, // Mountain 3 Left Pillar 3 - 0x339BB, // Mountain 3 Left Pillar 4 - 0x0383A, // Mountain 3 Right Pillar 1 - 0x09E56, // Mountain 3 Right Pillar 2 - 0x09E5A, // Mountain 3 Right Pillar 3 - 0x33961, // Mountain 3 Right Pillar 4 - 0x09DD5, // UTM Challenge Pillar -// 0x1C31A, // Challenge Left Pillar -// 0x1C319, // Challenge Right Pillar -}; - -std::vector mountainMultipanel = { - 0x09FCC, // Mountain 2 Multipanel 1 - 0x09FCE, // Mountain 2 Multipanel 2 - 0x09FCF, // Mountain 2 Multipanel 3 - 0x09FD0, // Mountain 2 Multipanel 4 - 0x09FD1, // Mountain 2 Multipanel 5 - 0x09FD2, // Mountain 2 Multipanel 6 -}; - -std::vector squarePanels = { - 0x00064, // Tutorial Straight - 0x00182, // Tutorial Bend - 0x0A3B2, // Tutorial Back Right - 0x00295, // Tutorial Center Left - 0x00293, // Tutorial Front Center - 0x002C2, // Tutorial Front Left - 0x0005D, // Outside Tutorial Dots Tutorial 1 - 0x0005E, // Outside Tutorial Dots Tutorial 2 - 0x0005F, // Outside Tutorial Dots Tutorial 3 - 0x00060, // Outside Tutorial Dots Tutorial 4 - 0x00061, // Outside Tutorial Dots Tutorial 5 - 0x018AF, // Outside Tutorial Stones Tutorial 1 - 0x0001B, // Outside Tutorial Stones Tutorial 2 - 0x012C9, // Outside Tutorial Stones Tutorial 3 - 0x0001C, // Outside Tutorial Stones Tutorial 4 - 0x0001D, // Outside Tutorial Stones Tutorial 5 - 0x0001E, // Outside Tutorial Stones Tutorial 6 - 0x0001F, // Outside Tutorial Stones Tutorial 7 - 0x00020, // Outside Tutorial Stones Tutorial 8 - 0x00021, // Outside Tutorial Stones Tutorial 9 - 0x033D4, // Outside Tutorial Vault - 0x0A171, // Tutorial Optional Door 1 - 0x04CA4, // Tutorial Optional Door 2 - 0x17CFB, // Outside Tutorial Discard - 0x3C12B, // Glass Factory Discard - 0x01A54, // Glass Factory Entry - 0x00086, // Glass Factory Vertical Symmetry 1 - 0x00087, // Glass Factory Vertical Symmetry 2 - 0x00059, // Glass Factory Vertical Symmetry 3 - 0x00062, // Glass Factory Vertical Symmetry 4 - 0x0008D, // Glass Factory Rotational Symmetry 1 - 0x00081, // Glass Factory Rotational Symmetry 2 - 0x00083, // Glass Factory Rotational Symmetry 3 - 0x00084, // Glass Factory Melting 1 - 0x00082, // Glass Factory Melting 2 - 0x0343A, // Glass Factory Melting 3 - 0x000B0, // Symmetry Island Door 1 - 0x00022, // Symmetry Island Black Dots 1 - 0x00023, // Symmetry Island Black Dots 2 - 0x00024, // Symmetry Island Black Dots 3 - 0x00025, // Symmetry Island Black Dots 4 - 0x00026, // Symmetry Island Black Dots 5 - 0x0007C, // Symmetry Island Colored Dots 1 - 0x0007E, // Symmetry Island Colored Dots 2 - 0x00075, // Symmetry Island Colored Dots 3 - 0x00073, // Symmetry Island Colored Dots 4 - 0x00077, // Symmetry Island Colored Dots 5 - 0x00079, // Symmetry Island Colored Dots 6 - 0x00065, // Symmetry Island Fading Lines 1 - 0x0006D, // Symmetry Island Fading Lines 2 - 0x00072, // Symmetry Island Fading Lines 3 - 0x0006F, // Symmetry Island Fading Lines 4 - 0x00070, // Symmetry Island Fading Lines 5 - 0x00071, // Symmetry Island Fading Lines 6 - 0x00076, // Symmetry Island Fading Lines 7 - 0x00A52, // Symmetry Island Laser Yellow 1 - 0x00A57, // Symmetry Island Laser Yellow 2 - 0x00A5B, // Symmetry Island Laser Yellow 3 - 0x00A61, // Symmetry Island Laser Blue 1 - 0x00A64, // Symmetry Island Laser Blue 2 - 0x00A68, // Symmetry Island Laser Blue 3 - 0x17CE7, // Desert Discard - 0x0CC7B, // Desert Vault - 0x01E5A, // Mill Entry Door Left - 0x01E59, // Mill Entry Door Right - 0x00E0C, // Mill Lower Row 1 - 0x01489, // Mill Lower Row 2 - 0x0148A, // Mill Lower Row 3 - 0x014D9, // Mill Lower Row 4 - 0x014E7, // Mill Lower Row 5 - 0x014E8, // Mill Lower Row 6 - 0x00557, // Mill Upper Row 1 - 0x005F1, // Mill Upper Row 2 - 0x00620, // Mill Upper Row 3 - 0x009F5, // Mill Upper Row 4 - 0x0146C, // Mill Upper Row 5 - 0x3C12D, // Mill Upper Row 6 - 0x03686, // Mill Upper Row 7 - 0x014E9, // Mill Upper Row 8 - 0x0367C, // Mill Control Room 1 - 0x3C125, // Mill Control Room 2 - 0x03677, // Mill Stairs Control - 0x17CF0, // Mill Discard - 0x03612, // Quarry Laser - 0x021D5, // Boathouse Ramp Activation Shapers - 0x034D4, // Boathouse Ramp Activation Stars - 0x021B3, // Boathouse Erasers and Shapers 1 - 0x021B4, // Boathouse Erasers and Shapers 2 - 0x021B0, // Boathouse Erasers and Shapers 3 - 0x021AF, // Boathouse Erasers and Shapers 4 - 0x021AE, // Boathouse Erasers and Shapers 5 - 0x021B5, // Boathouse Erasers and Stars 1 - 0x021B6, // Boathouse Erasers and Stars 2 - 0x021B7, // Boathouse Erasers and Stars 3 - 0x021BB, // Boathouse Erasers and Stars 4 - 0x09DB5, // Boathouse Erasers and Stars 5 - 0x09DB1, // Boathouse Erasers and Stars 6 - 0x3C124, // Boathouse Erasers and Stars 7 - 0x09DB3, // Boathouse Erasers Shapers and Stars 1 - 0x09DB4, // Boathouse Erasers Shapers and Stars 2 - 0x0A3CB, // Boathouse Erasers Shapers and Stars 3 - 0x0A3CC, // Boathouse Erasers Shapers and Stars 4 - 0x0A3D0, // Boathouse Erasers Shapers and Stars 5 - 0x09E57, // Quarry Entry Gate 1 - 0x17C09, // Quarry Entry Gate 2 - 0x0288C, // Treehouse Door 1 - 0x02886, // Treehouse Door 2 - 0x17D72, // Treehouse Yellow 1 - 0x17D8F, // Treehouse Yellow 2 - 0x17D74, // Treehouse Yellow 3 - 0x17DAC, // Treehouse Yellow 4 - 0x17D9E, // Treehouse Yellow 5 - 0x17DB9, // Treehouse Yellow 6 - 0x17D9C, // Treehouse Yellow 7 - 0x17DC2, // Treehouse Yellow 8 - 0x17DC4, // Treehouse Yellow 9 - 0x0A182, // Treehouse Door 3 - 0x17DC8, // Treehouse First Purple 1 - 0x17DC7, // Treehouse First Purple 2 - 0x17CE4, // Treehouse First Purple 3 - 0x17D2D, // Treehouse First Purple 4 - 0x17D6C, // Treehouse First Purple 5 - 0x17D9B, // Treehouse Second Purple 1 - 0x17D99, // Treehouse Second Purple 2 - 0x17DAA, // Treehouse Second Purple 3 - 0x17D97, // Treehouse Second Purple 4 - 0x17BDF, // Treehouse Second Purple 5 - 0x17D91, // Treehouse Second Purple 6 - 0x17DC6, // Treehouse Second Purple 7 - 0x17DB3, // Treehouse Left Orange 1 - 0x17DB5, // Treehouse Left Orange 2 - 0x17DB6, // Treehouse Left Orange 3 - 0x17DC0, // Treehouse Left Orange 4 - 0x17DD7, // Treehouse Left Orange 5 - 0x17DD9, // Treehouse Left Orange 6 - 0x17DB8, // Treehouse Left Orange 7 - 0x17DDC, // Treehouse Left Orange 8 - 0x17DDE, // Treehouse Left Orange 10 - 0x17DE3, // Treehouse Left Orange 11 - 0x17DEC, // Treehouse Left Orange 12 - 0x17DAE, // Treehouse Left Orange 13 - 0x17DB0, // Treehouse Left Orange 14 - 0x17DDB, // Treehouse Left Orange 15 - 0x17D88, // Treehouse Right Orange 1 - 0x17DB4, // Treehouse Right Orange 2 - 0x17D8C, // Treehouse Right Orange 3 - 0x17DCD, // Treehouse Right Orange 5 - 0x17DB2, // Treehouse Right Orange 6 - 0x17DCC, // Treehouse Right Orange 7 - 0x17DCA, // Treehouse Right Orange 8 - 0x17D8E, // Treehouse Right Orange 9 - 0x17DB1, // Treehouse Right Orange 11 - 0x17DA2, // Treehouse Right Orange 12 - 0x17E3C, // Treehouse Green 1 - 0x17E4D, // Treehouse Green 2 - 0x17E4F, // Treehouse Green 3 - 0x17E5B, // Treehouse Green 5 - 0x17E5F, // Treehouse Green 6 - 0x17E61, // Treehouse Green 7 - 0x17FA9, // Treehouse Green Bridge Discard - 0x17FA0, // Treehouse Laser Discard - 0x00139, // Keep Hedges 1 - 0x019DC, // Keep Hedges 2 - 0x019E7, // Keep Hedges 3 - 0x01A0F, // Keep Hedges 4 - 0x0360E, // Keep Front Laser - 0x03317, // Keep Back Laser - 0x17D27, // Keep Discard - 0x17D28, // Shipwreck Discard - 0x00AFB, // Shipwreck Vault - 0x2899C, // Town 25 Dots 1 - 0x28A33, // Town 25 Dots 2 - 0x28ABF, // Town 25 Dots 3 - 0x28AC0, // Town 25 Dots 4 - 0x28AC1, // Town 25 Dots 5 - 0x28938, // Town Apple Tree - 0x28AC7, // Town Blue 1 - 0x28AC8, // Town Blue 2 - 0x28ACA, // Town Blue 3 - 0x28ACB, // Town Blue 4 - 0x28ACC, // Town Blue 5 - 0x28A0D, // Town Church Stars - 0x28AD9, // Town Eraser - 0x28998, // Town Green Door - 0x0A0C8, // Town Orange Crate - 0x17D01, // Town Orange Crate Discard - 0x03C08, // Town RGB Stars - 0x03C0C, // Town RGB Stones - 0x17C71, // Town Rooftop Discard - 0x17F5F, // Town Windmill Door - 0x17F89, // Theater Entrance - 0x17CF7, // Theater Discard - 0x33AB2, // Theater Corona Exit - 0x0A168, // Theater Sun Exit - 0x00B10, // Monastery Left Door - 0x00C92, // Monastery Right Door - 0x17C2E, // Bunker Entry Door - 0x0056E, // Swamp Entry - 0x00469, // Swamp Tutorial 1 - 0x00472, // Swamp Tutorial 2 - 0x00262, // Swamp Tutorial 3 - 0x00474, // Swamp Tutorial 4 - 0x00553, // Swamp Tutorial 5 - 0x0056F, // Swamp Tutorial 6 - 0x00390, // Swamp Tutorial 7 - 0x010CA, // Swamp Tutorial 8 - 0x00983, // Swamp Tutorial 9 - 0x00984, // Swamp Tutorial 10 - 0x00986, // Swamp Tutorial 11 - 0x00985, // Swamp Tutorial 12 - 0x00987, // Swamp Tutorial 13 - 0x181A9, // Swamp Tutorial 14 - 0x00982, // Swamp Red 1 - 0x0097F, // Swamp Red 2 - 0x0098F, // Swamp Red 3 - 0x00990, // Swamp Red 4 - 0x17C0D, // Swamp Red Shortcut 1 - 0x17C0E, // Swamp Red Shortcut 2 - 0x00999, // Swamp Discontinuous 1 - 0x0099D, // Swamp Discontinuous 2 - 0x009A0, // Swamp Discontinuous 3 - 0x009A1, // Swamp Discontinuous 4 - 0x00007, // Swamp Rotation Tutorial 1 - 0x00008, // Swamp Rotation Tutorial 2 - 0x00009, // Swamp Rotation Tutorial 3 - 0x0000A, // Swamp Rotation Tutorial 4 - 0x009AB, // Swamp Blue Underwater 1 - 0x009AD, // Swamp Blue Underwater 2 - 0x009AE, // Swamp Blue Underwater 3 - 0x009AF, // Swamp Blue Underwater 4 - 0x00006, // Swamp Blue Underwater 5 - 0x003B2, // Swamp Rotation Advanced 1 - 0x00A1E, // Swamp Rotation Advanced 2 - 0x00C2E, // Swamp Rotation Advanced 3 - 0x00E3A, // Swamp Rotation Advanced 4 - 0x009A6, // Swamp Purple Tetris - 0x00002, // Swamp Teal Underwater 1 - 0x00004, // Swamp Teal Underwater 2 - 0x00005, // Swamp Teal Underwater 3 - 0x013E6, // Swamp Teal Underwater 4 - 0x00596, // Swamp Teal Underwater 5 - 0x00001, // Swamp Red Underwater 1 - 0x014D2, // Swamp Red Underwater 2 - 0x014D4, // Swamp Red Underwater 3 - 0x014D1, // Swamp Red Underwater 4 - 0x17C05, // Swamp Laser Shortcut 1 - 0x17C02, // Swamp Laser Shortcut 2 - 0x17F9B, // Jungle Discard - 0x09E73, // Mountain 1 Orange 1 - 0x09E75, // Mountain 1 Orange 2 - 0x09E78, // Mountain 1 Orange 3 - 0x09E79, // Mountain 1 Orange 4 - 0x09E6C, // Mountain 1 Orange 5 - 0x09E6F, // Mountain 1 Orange 6 - 0x09E6B, // Mountain 1 Orange 7 - 0x09EAD, // Mountain 1 Purple 1 - 0x09EAF, // Mountain 1 Purple 2 - 0x09E7A, // Mountain 1 Green 1 - 0x09E71, // Mountain 1 Green 2 - 0x09E72, // Mountain 1 Green 3 - 0x09E69, // Mountain 1 Green 4 - 0x09E7B, // Mountain 1 Green 5 - 0x09FD3, // Mountain 2 Rainbow 1 - 0x09FD4, // Mountain 2 Rainbow 2 - 0x09FD6, // Mountain 2 Rainbow 3 - 0x09FD7, // Mountain 2 Rainbow 4 - 0x17F93, // Mountain 2 Discard - 0x17FA2, // Mountain 3 Secret Door - 0x17C42, // Mountainside Discard - 0x002A6, // Mountainside Vault - 0x0042D, // Mountaintop River - 0x00FF8, // UTM Entrance Door - 0x0A16B, // UTM Green Dots 1 - 0x0A2CE, // UTM Green Dots 2 - 0x0A2D7, // UTM Green Dots 3 - 0x0A2DD, // UTM Green Dots 4 - 0x0A2EA, // UTM Green Dots 5 - 0x17FB9, // UTM Green Dots 6 - 0x0008F, // UTM Invisible Dots 1 - 0x0006B, // UTM Invisible Dots 2 - 0x0008B, // UTM Invisible Dots 3 - 0x0008C, // UTM Invisible Dots 4 - 0x0008A, // UTM Invisible Dots 5 - 0x00089, // UTM Invisible Dots 6 - 0x0006A, // UTM Invisible Dots 7 - 0x0006C, // UTM Invisible Dots 8 - 0x00027, // UTM Invisible Dots Symmetry 1 - 0x00028, // UTM Invisible Dots Symmetry 2 - 0x00029, // UTM Invisible Dots Symmetry 3 - 0x021D7, // UTM Mountainside Shortcut - 0x00B71, // UTM Quarry - 0x01A31, // UTM Rainbow - 0x32962, // UTM Swamp - 0x32966, // UTM Treehouse - 0x17CF2, // UTM Waterfall Shortcut - 0x00A72, // UTM Blue Cave In - 0x009A4, // UTM Blue Discontinuous - 0x018A0, // UTM Blue Easy Symmetry - 0x01A0D, // UTM Blue Hard Symmetry - 0x008B8, // UTM Blue Left 1 - 0x00973, // UTM Blue Left 2 - 0x0097B, // UTM Blue Left 3 - 0x0097D, // UTM Blue Left 4 - 0x0097E, // UTM Blue Left 5 - 0x00994, // UTM Blue Right Far 1 - 0x334D5, // UTM Blue Right Far 2 - 0x00995, // UTM Blue Right Far 3 - 0x00996, // UTM Blue Right Far 4 - 0x00998, // UTM Blue Right Far 5 - 0x00190, // UTM Blue Right Near 1 - 0x00558, // UTM Blue Right Near 2 - 0x00567, // UTM Blue Right Near 3 - 0x006FE, // UTM Blue Right Near 4 - 0x0A16E, // UTM Challenge Entrance - 0x039B4, // Tunnels Theater Catwalk - 0x09E85, // Tunnels Town Shortcut -}; - -std::vector shadowsPanels = { - 0x198B5, // Shadows Tutorial 1 - 0x198BD, // Shadows Tutorial 2 - 0x198BF, // Shadows Tutorial 3 - 0x19771, // Shadows Tutorial 4 - 0x0A8DC, // Shadows Tutorial 5 - 0x0AC74, // Shadows Tutorial 6 - 0x0AC7A, // Shadows Tutorial 7 - 0x0A8E0, // Shadows Tutorial 8 - 0x386FA, // Shadows Avoid 1 - 0x1C33F, // Shadows Avoid 2 - 0x196E2, // Shadows Avoid 3 - 0x1972A, // Shadows Avoid 4 - 0x19809, // Shadows Avoid 5 - 0x19806, // Shadows Avoid 6 - 0x196F8, // Shadows Avoid 7 - 0x1972F, // Shadows Avoid 8 - 0x19797, // Shadows Follow 1 - 0x1979A, // Shadows Follow 2 - 0x197E0, // Shadows Follow 3 - 0x197E8, // Shadows Follow 4 - 0x197E5, // Shadows Follow 5 - 0x19650, // Shadows Laser -}; - -std::vector monasteryPanels = { - 0x00B10, // Monastery Left Door - 0x00290, // Monastery Exterior 1 - 0x00C92, // Monastery Right Door - 0x00038, // Monastery Exterior 2 - 0x00037, // Monastery Exterior 3 -// 0x09D9B, // Monastery Bonsai - 0x193A7, // Monastery Interior 1 - 0x193AA, // Monastery Interior 2 - 0x193AB, // Monastery Interior 3 - 0x193A6, // Monastery Interior 4 -// 0x03713, // Monastery Shortcut - 0x17CA4, // Monastery Laser -}; - -std::vector bunkerPanels = { - 0x09F7D, // Bunker Tutorial 1 - 0x09FDC, // Bunker Tutorial 2 - 0x09FF7, // Bunker Tutorial 3 - 0x09F82, // Bunker Tutorial 4 - 0x09FF8, // Bunker Tutorial 5 - 0x09D9F, // Bunker Advanced 1 - 0x09DA1, // Bunker Advanced 2 - 0x09DA2, // Bunker Advanced 3 - 0x09DAF, // Bunker Advanced 4 -// 0x0A099, // Bunker Glass Door - 0x0A010, // Bunker Glass 1 - 0x0A01B, // Bunker Glass 2 - 0x0A01F, // Bunker Glass 3 - 0x17E63, // Bunker Ultraviolet 1 - 0x17E67, // Bunker Ultraviolet 2 - 0x34BC5, // Bunker Open Ultraviolet - 0x34BC6, // Bunker Close Ultraviolet - 0x0A079, // Bunker Elevator -}; - -std::vector junglePanels = { - 0x002C4, // Jungle Waves 1 - 0x00767, // Jungle Waves 2 - 0x002C6, // Jungle Waves 3 - 0x0070E, // Jungle Waves 4 - 0x0070F, // Jungle Waves 5 - 0x0087D, // Jungle Waves 6 - 0x002C7, // Jungle Waves 7 -// 0x17CAB, // Jungle Pop-up Wall - 0x0026D, // Jungle Dots 1 - 0x0026E, // Jungle Dots 2 - 0x0026F, // Jungle Dots 3 - 0x00C3F, // Jungle Dots 4 - 0x00C41, // Jungle Dots 5 - 0x014B2, // Jungle Dots 6 - 0x03616, // Jungle Laser -}; - -// There might be something to do with these, I haven't decided yet. -std::vector nothingPanels = { -// Doors & Shortcuts & Shortcut doors & Door controls - 0x0C339, // Desert Surface Door - 0x0A249, // Desert Pond Exit Door - 0x275ED, // Mill EP Door - 0x17CAC, // Mill Stairs Shortcut Door - 0x38663, // Boathouse Shortcut - 0x09E49, // Keep Shadows Shortcut - 0x0361B, // Keep Tower Shortcut - 0x334DC, // Shadows Inner Door Control - 0x334DB, // Shadows Outer Door Control - 0x2700B, // Treehouse Exterior Door Control - 0x17CBC, // Treehouse Interior Door Control - 0x337FA, // Jungle Shortcut - -// Controls (?) - 0x09FA0, // Desert Surface 3 Control - 0x09F86, // Desert Surface 8 Control - 0x1C2DF, // Desert Flood Control Lower Far Left - 0x1831E, // Desert Flood Control Lower Far Right - 0x1C260, // Desert Flood Control Lower Near Left - 0x1831C, // Desert Flood Control Lower Near Right - 0x1C2F3, // Desert Flood Control Raise Far Left - 0x1831D, // Desert Flood Control Raise Far Right - 0x1C2B1, // Desert Flood Control Raise Near Left - 0x1831B, // Desert Flood Control Raise Near Right - 0x0A015, // Desert Final Far Control - 0x03678, // Mill Lower Ramp Contol - 0x03679, // Mill Lower Lift Control - 0x03675, // Mill Upper Lift Control - 0x03676, // Mill Upper Ramp Control - 0x03852, // Boathouse Ramp Angle Control - 0x03858, // Boathouse Ramp Position Control - 0x275FA, // Boathouse Hook Control - 0x037FF, // Treehouse Drawbridge Control - 0x09F98, // Town Laser Redirect Control - 0x334D8, // Town RGB Light Control - 0x17E2B, // Swamp Flood Gate Control - 0x00609, // Swamp Surface Sliding Bridge Control - 0x18488, // Swamp Underwater Sliding Bridge Control - 0x17C0A, // Swamp Island Control 1 - 0x17E07, // Swamp Island Control 2 - 0x181F5, // Swamp Rotating Bridge Control - -// Vault Boxes - 0x03481, // Outside Tutorial Vault Box - 0x0339E, // Desert Vault Box - 0x03535, // Shipwreck Vault Box - 0x03702, // Jungle Vault Box - 0x03542, // Mountainside Vault Box - 0x2FAF6, // Tunnels Vault Box - -// Boat Summons - 0x17CC8, // Glass Factory Summon Boat - 0x17CA6, // Boathouse Summon Boat - 0x17C95, // Treehouse Summon Boat - 0x0A054, // Town Summon Boat - 0x09DB8, // Swamp Summon Boat - 0x17CDF, // Jungle Summon Boat - -// Identical sets - 0x00143, // Orchard Apple Tree 1 - 0x0003B, // Orchard Apple Tree 2 - 0x00055, // Orchard Apple Tree 3 - 0x032F7, // Orchard Apple Tree 4 - 0x032FF, // Orchard Apple Tree 5 - 0x009B8, // Symmetry Island Transparent 1 - 0x003E8, // Symmetry Island Transparent 2 - 0x00A15, // Symmetry Island Transparent 3 - 0x00B53, // Symmetry Island Transparent 4 - 0x00B8D, // Symmetry Island Transparent 5 - -// Misc - 0x03629, // Tutorial Gate Open - 0x09FAA, // Desert Lightswitch - 0x0C335, // Tutorial Pillar - 0x0C373, // Tutorial Patio floor - 0x1C349, // Symmetry Island Door 2 - Collision fails here, sadly - 0x18076, // Desert Flood Exit - I am doing something with this -- but it's a very unique panel. - 0x0A15C, // Desert Final Left Convex - 0x09FFF, // Desert Final Left Concave - 0x0A15F, // Desert Final Near - 0x033EA, // Keep Yellow Pressure Plates - 0x0A3A8, // Keep Yellow Reset - 0x01BE9, // Keep Purple Pressure Plates - 0x0A3B9, // Keep Purple Reset - 0x01CD3, // Keep Green Pressure Plates - 0x0A3BB, // Keep Green Reset - 0x01D3F, // Keep Blue Pressure Plates - 0x0A3AD, // Keep Blue Reset - 0x2896A, // Town Bridge - 0x28A69, // Town Lattice - 0x28A79, // Town Maze - 0x28B39, // Town Red Hexagonal - 0x034E3, // Town Soundproof Dots - 0x034E4, // Town Soundproof Waves - 0x079DF, // Town Triple - 0x00815, // Theater Video Input - 0x03553, // Theater Tutorial Video - 0x03552, // Theater Desert Video - 0x0354E, // Theater Jungle Video - 0x03549, // Theater Challenge Video - 0x0354F, // Theater Shipwreck Video - 0x03545, // Theater Mountain Video - 0x18590, // Town Transparent - 0x28AE3, // Town Wire - - - 0x09E39, // Mountain 1 Purple Pathway -// 0x33AF5, // Mountain 1 Blue 1 -// 0x33AF7, // Mountain 1 Blue 2 -// 0x09F6E, // Mountain 1 Blue 3 -// 0x09FD8, // Mountain 2 Rainbow 5 - 0x09E86, // Mountain 2 Blue Pathway - 0x09ED8, // Mountain 2 Orange Pathway - 0x09F8E, // Mountain 3 Near Right Floor - 0x09FC1, // Mountain 3 Near Left Floor - 0x09F01, // Mountain 3 Far Right Floor - 0x09EFF, // Mountain 3 Far Left Floor - 0x09FDA, // Mountain 3 Giant Floor -// 0x01983, // Mountain 3 Left Peekaboo -// 0x01987, // Mountain 3 Right Peekaboo -// 0x3D9A6, // Mountain 3 Left Close Door -// 0x3D9A7, // Mountain 3 Right Close Door -// 0x3D9AA, // Mountain 3 Left Activate Elevator -// 0x3D9A8, // Mountain 3 Right Activate Elevator -// 0x3D9A9, // Mountain 3 Launch Elevator -// 0x3C113, // Mountain 3 Left Open Door -// 0x3C114, // Mountain 3 Right Open Door - 0x09F7F, // Mountaintop Laser Box - 0x17C34, // Mountaintop Perspective -// 0x334E1, // UTM Secret Door Control -// 0x2773D, // Tunnels Desert Shortcut -// 0x27732, // Tunnels Theater Shortcut -// 0x0A099, // Bunker Glass Door -// 0x15ADD, // Jungle Vault -// 0x17CAA, // Jungle Courtyard Gate - 0x0005C, // Glass Factory Vertical Symmetry 5 - 0x17C31, // Desert Final Transparent - 0x19650, // Shadows Laser -}; diff --git a/WitnessRandomizer/WitnessRandomizer.cpp b/WitnessRandomizer/WitnessRandomizer.cpp deleted file mode 100644 index cf98a3a..0000000 --- a/WitnessRandomizer/WitnessRandomizer.cpp +++ /dev/null @@ -1,251 +0,0 @@ -/* - * TODO: Split out main() logic into another file, and move into separate functions for easier testing. Then write tests. - * BUGS: - * Shipwreck vault fails, possibly because of dot_reflection? Sometimes? - * Treehouse pivots *should* work, but I need to not copy style_flags. - This seems to cause crashes when pivots appear elsewhere in the world. - * Some panels are impossible casually: (idc, I think) - ** Town Stars, Invisible dots - * Shadows burn marks are not appearing - * Something is wrong with jungle re: softlocks - * FEATURES: - * SWAP_TARGETS should still require the full panel sequence (and have ways to prevent softlocks?) - ** Think about: Jungle - ** Hard: Monastery - ** Do: Challenge - * Randomize audio logs - * Swap sounds in jungle (along with panels) -- maybe impossible - * Make orange 7 (all of oranges?) hard. Like big = hard. - * Start the game if it isn't running? - * UI for the randomizer :( - * Increase odds of mountain oranges garbage on other panels? -*/ -#include "Memory.h" -#include "WitnessRandomizer.h" -#include "Panels.h" -#include -#include -#include -#include - -template -size_t find(const std::vector &data, T search, size_t startIndex = 0) { - for (size_t i=startIndex ; i(time(nullptr))); - int seed = rand() % (1 << 16); // Seed from the time in milliseconds - std::cout << "Selected seed: " << seed << std::endl; - srand(seed); - } - - // Content swaps -- must happen before squarePanels - randomizer.Randomize(tallUpDownPanels, SWAP_LINES | SWAP_STYLE); - randomizer.Randomize(upDownPanels, SWAP_LINES | SWAP_STYLE); - randomizer.Randomize(leftForwardRightPanels, SWAP_LINES); - - randomizer.Randomize(squarePanels, SWAP_LINES | SWAP_STYLE); - - // Frame swaps -- must happen after squarePanels - randomizer.Randomize(burnablePanels, SWAP_LINES | SWAP_STYLE); - - // Target swaps, can happen whenever - randomizer.Randomize(lasers, SWAP_TARGETS); - // Read the target of keep front laser, and write it to keep back laser. - std::vector keepFrontLaserTarget = randomizer.ReadPanelData(0x0360E, TARGET, 1); - randomizer.WritePanelData(0x03317, TARGET, keepFrontLaserTarget); - - std::vector randomOrder; - - /* Jungle - randomOrder = std::vector(junglePanels.size(), 0); - std::iota(randomOrder.begin(), randomOrder.end(), 0); - // Randomize Waves 2-7 - // Waves 1 cannot be randomized, since no other panel can start on - randomizer.RandomizeRange(randomOrder, SWAP_NONE, 1, 7); - // Randomize Pitches 1-6 onto themselves - randomizer.RandomizeRange(randomOrder, SWAP_NONE, 7, 13); - randomizer.ReassignTargets(junglePanels, randomOrder); - */ - - /* Bunker */ - randomOrder = std::vector(bunkerPanels.size(), 0); - std::iota(randomOrder.begin(), randomOrder.end(), 0); - // Randomize Tutorial 2-Advanced Tutorial 4 + Glass 1 - // Tutorial 1 cannot be randomized, since no other panel can start on - // Glass 1 will become door + glass 1, due to the targetting system - randomizer.RandomizeRange(randomOrder, SWAP_NONE, 1, 10); - // Randomize Glass 1-3 into everything after the door - const size_t glassDoorIndex = find(randomOrder, 9) + 1; - randomizer.RandomizeRange(randomOrder, SWAP_NONE, glassDoorIndex, 12); - randomizer.ReassignTargets(bunkerPanels, randomOrder); - - /* Shadows */ - randomOrder = std::vector(shadowsPanels.size(), 0); - std::iota(randomOrder.begin(), randomOrder.end(), 0); - randomizer.RandomizeRange(randomOrder, SWAP_NONE, 0, 8); // Tutorial - randomizer.RandomizeRange(randomOrder, SWAP_NONE, 8, 16); // Avoid - randomizer.RandomizeRange(randomOrder, SWAP_NONE, 16, 21); // Follow - randomizer.ReassignTargets(shadowsPanels, randomOrder); - // Turn off original starting panel - randomizer.WritePanelData(shadowsPanels[0], POWER, {0.0f, 0.0f}); - // Turn on new starting panel - randomizer.WritePanelData(shadowsPanels[randomOrder[0]], POWER, {1.0f, 1.0f}); - - /* Monastery - randomOrder = std::vector(monasteryPanels.size(), 0); - std::iota(randomOrder.begin(), randomOrder.end(), 0); - randomizer.RandomizeRange(randomOrder, SWAP_NONE, 2, 6); // outer 2 & 3, inner 1 - // Once outer 3 and right door are solved, inner 2-4 are accessible - int innerPanelsIndex = max(find(randomOrder, 2), find(randomOrder, 4)); - randomizer.RandomizeRange(randomOrder, SWAP_NONE, innerPanelsIndex, 9); // Inner 2-4 - - randomizer.ReassignTargets(monasteryPanels, randomOrder); - */ -} - -WitnessRandomizer::WitnessRandomizer() -{ - // Turn off desert surface 8 - WritePanelData(0x09F94, POWER, {0.0, 0.0}); - // Turn off desert flood final - WritePanelData(0x18076, POWER, {0.0, 0.0}); - // Change desert floating target to desert flood final - WritePanelData(0x17ECA, TARGET, {0x18077}); - - // Distance-gate shadows laser to prevent sniping through the bars - WritePanelData(0x19650, MAX_BROADCAST_DISTANCE, {2.5}); - // Change the shadows tutorial cable to only activate avoid - WritePanelData(0x319A8, CABLE_TARGET_2, {0}); - // Change shadows avoid 8 to power shadows follow - WritePanelData(0x1972F, TARGET, {0x1C34C}); - - // Distance-gate swamp snipe 1 to prevent RNG swamp snipe - WritePanelData(0x17C05, MAX_BROADCAST_DISTANCE, {5.0}); - - // Disable tutorial cursor speed modifications (not working?) - WritePanelData(0x00295, CURSOR_SPEED_SCALE, {1.0}); - WritePanelData(0x0C373, CURSOR_SPEED_SCALE, {1.0}); - WritePanelData(0x00293, CURSOR_SPEED_SCALE, {1.0}); - WritePanelData(0x002C2, CURSOR_SPEED_SCALE, {1.0}); -} - -void WitnessRandomizer::Randomize(std::vector& panels, int flags) { - return RandomizeRange(panels, flags, 0, panels.size()); -} - -// Range is [start, end) -void WitnessRandomizer::RandomizeRange(std::vector &panels, int flags, size_t startIndex, size_t endIndex) { - if (panels.size() == 0) return; - if (startIndex >= endIndex) return; - if (endIndex >= panels.size()) endIndex = panels.size(); - for (size_t i = endIndex-1; i > startIndex+1; i--) { - const size_t target = rand() % (i - startIndex) + startIndex; - if (i != target) { - // std::cout << "Swapping panels " << std::hex << panels[i] << " and " << std::hex << panels[target] << std::endl; - SwapPanels(panels[i], panels[target], flags); - std::swap(panels[i], panels[target]); // Panel indices in the array - } - } -} - -void WitnessRandomizer::SwapPanels(int panel1, int panel2, int flags) { - std::map offsets; - - if (flags & SWAP_TARGETS) { - offsets[TARGET] = sizeof(int); - } - if (flags & SWAP_STYLE) { - offsets[STYLE_FLAGS] = sizeof(int); - } - if (flags & SWAP_LINES) { - offsets[PATH_COLOR] = 16; - offsets[REFLECTION_PATH_COLOR] = 16; - offsets[DOT_COLOR] = 16; - offsets[ACTIVE_COLOR] = 16; - offsets[BACKGROUND_REGION_COLOR] = 16; - offsets[SUCCESS_COLOR_A] = 16; - offsets[SUCCESS_COLOR_B] = 16; - offsets[STROBE_COLOR_A] = 16; - offsets[STROBE_COLOR_B] = 16; - offsets[ERROR_COLOR] = 16; - offsets[PATTERN_POINT_COLOR] = 16; - offsets[PATTERN_POINT_COLOR_A] = 16; - offsets[PATTERN_POINT_COLOR_B] = 16; - offsets[SYMBOL_A] = 16; - offsets[SYMBOL_B] = 16; - offsets[SYMBOL_C] = 16; - offsets[SYMBOL_D] = 16; - offsets[SYMBOL_E] = 16; - offsets[PUSH_SYMBOL_COLORS] = sizeof(int); - offsets[OUTER_BACKGROUND] = 16; - offsets[OUTER_BACKGROUND_MODE] = sizeof(int); - offsets[TRACED_EDGES] = 16; - offsets[AUDIO_PREFIX] = sizeof(void*); -// offsets[IS_CYLINDER] = sizeof(int); -// offsets[CYLINDER_Z0] = sizeof(float); -// offsets[CYLINDER_Z1] = sizeof(float); -// offsets[CYLINDER_RADIUS] = sizeof(float); - offsets[SPECULAR_ADD] = sizeof(float); - offsets[SPECULAR_POWER] = sizeof(int); - offsets[PATH_WIDTH_SCALE] = sizeof(float); - offsets[STARTPOINT_SCALE] = sizeof(float); - offsets[NUM_DOTS] = sizeof(int); - offsets[NUM_CONNECTIONS] = sizeof(int); - offsets[DOT_POSITIONS] = sizeof(void*); - offsets[DOT_FLAGS] = sizeof(void*); - offsets[DOT_CONNECTION_A] = sizeof(void*); - offsets[DOT_CONNECTION_B] = sizeof(void*); - offsets[DECORATIONS] = sizeof(void*); - offsets[DECORATION_FLAGS] = sizeof(void*); - offsets[DECORATION_COLORS] = sizeof(void*); - offsets[NUM_DECORATIONS] = sizeof(int); - offsets[REFLECTION_DATA] = sizeof(void*); - offsets[GRID_SIZE_X] = sizeof(int); - offsets[GRID_SIZE_Y] = sizeof(int); - offsets[SEQUENCE_LEN] = sizeof(int); - offsets[SEQUENCE] = sizeof(void*); - offsets[DOT_SEQUENCE_LEN] = sizeof(int); - offsets[DOT_SEQUENCE] = sizeof(void*); - offsets[DOT_SEQUENCE_LEN_REFLECTION] = sizeof(int); - offsets[DOT_SEQUENCE_REFLECTION] = sizeof(void*); - offsets[NUM_COLORED_REGIONS] = sizeof(int); - offsets[COLORED_REGIONS] = sizeof(void*); - offsets[PANEL_TARGET] = sizeof(void*); - offsets[SPECULAR_TEXTURE] = sizeof(void*); - } - - for (auto const& [offset, size] : offsets) { - std::vector panel1data = ReadPanelData(panel1, offset, size); - std::vector panel2data = ReadPanelData(panel2, offset, size); - WritePanelData(panel2, offset, panel1data); - WritePanelData(panel1, offset, panel2data); - } -} - -void WitnessRandomizer::ReassignTargets(const std::vector& panels, const std::vector& order) { - // This list is offset by 1, so the target of the Nth panel is in position N (aka the N+1th element) - // The first panel may not have a wire to power it, so we use the panel ID itself. - std::vector targetToActivatePanel = {panels[0] + 1}; - for (const int panel : panels) { - int target = ReadPanelData(panel, TARGET, 1)[0]; - targetToActivatePanel.push_back(target); - } - - for (size_t i=0; i(panels[order[i]], TARGET, {panelTarget}); - } -} diff --git a/WitnessRandomizer/WitnessRandomizer.h b/WitnessRandomizer/WitnessRandomizer.h deleted file mode 100644 index d65cce3..0000000 --- a/WitnessRandomizer/WitnessRandomizer.h +++ /dev/null @@ -1,156 +0,0 @@ -#pragma once - -// #define GLOBALS 0x5B28C0 -#define GLOBALS 0x62A080 - -int SWAP_NONE = 0x0; -int SWAP_TARGETS = 0x1; -int SWAP_LINES = 0x2; -int SWAP_STYLE = 0x4; - -class WitnessRandomizer { -public: - WitnessRandomizer(); - - void Randomize(std::vector& panels, int flags); - void RandomizeRange(std::vector &panels, int flags, size_t startIndex, size_t endIndex); - void SwapPanels(int panel1, int panel2, int flags); - void ReassignTargets(const std::vector& panels, const std::vector& order); - - template - std::vector ReadPanelData(int panel, int offset, size_t size) { - return _memory.ReadData({GLOBALS, 0x18, panel*8, offset}, size); - } - - template - void WritePanelData(int panel, int offset, const std::vector& data) { - _memory.WriteData({GLOBALS, 0x18, panel*8, offset}, data); - } - -private: - Memory _memory = Memory("witness64_d3d11.exe"); -}; - -#if GLOBALS == 0x5B28C0 -#define PATH_COLOR 0xC8 -#define REFLECTION_PATH_COLOR 0xD8 -#define DOT_COLOR 0xF8 -#define ACTIVE_COLOR 0x108 -#define BACKGROUND_REGION_COLOR 0x118 -#define SUCCESS_COLOR_A 0x128 -#define SUCCESS_COLOR_B 0x138 -#define STROBE_COLOR_A 0x148 -#define STROBE_COLOR_B 0x158 -#define ERROR_COLOR 0x168 -#define PATTERN_POINT_COLOR 0x188 -#define PATTERN_POINT_COLOR_A 0x198 -#define PATTERN_POINT_COLOR_B 0x1A8 -#define SYMBOL_A 0x1B8 -#define SYMBOL_B 0x1C8 -#define SYMBOL_C 0x1D8 -#define SYMBOL_D 0x1E8 -#define SYMBOL_E 0x1F8 -#define PUSH_SYMBOL_COLORS 0x208 -#define OUTER_BACKGROUND 0x20C -#define OUTER_BACKGROUND_MODE 0x21C -#define TRACED_EDGES 0x230 -#define AUDIO_PREFIX 0x278 -#define POWER 0x2A8 -#define TARGET 0x2BC -#define IS_CYLINDER 0x2FC -#define CYLINDER_Z0 0x300 -#define CYLINDER_Z1 0x304 -#define CYLINDER_RADIUS 0x308 -#define CURSOR_SPEED_SCALE 0x358 -#define SPECULAR_ADD 0x398 -#define SPECULAR_POWER 0x39C -#define PATH_WIDTH_SCALE 0x3A4 -#define STARTPOINT_SCALE 0x3A8 -#define NUM_DOTS 0x3B8 -#define NUM_CONNECTIONS 0x3BC -#define MAX_BROADCAST_DISTANCE 0x3C0 -#define DOT_POSITIONS 0x3C8 -#define DOT_FLAGS 0x3D0 -#define DOT_CONNECTION_A 0x3D8 -#define DOT_CONNECTION_B 0x3E0 -#define DECORATIONS 0x420 -#define DECORATION_FLAGS 0x428 -#define DECORATION_COLORS 0x430 -#define NUM_DECORATIONS 0x438 -#define REFLECTION_DATA 0x440 -#define GRID_SIZE_X 0x448 -#define GRID_SIZE_Y 0x44C -#define STYLE_FLAGS 0x450 -#define SEQUENCE_LEN 0x45C -#define SEQUENCE 0x460 -#define DOT_SEQUENCE_LEN 0x468 -#define DOT_SEQUENCE 0x470 -#define DOT_SEQUENCE_LEN_REFLECTION 0x478 -#define DOT_SEQUENCE_REFLECTION 0x480 -#define NUM_COLORED_REGIONS 0x4A0 -#define COLORED_REGIONS 0x4A8 -#define PANEL_TARGET 0x4B0 -#define SPECULAR_TEXTURE 0x4D8 -#define CABLE_TARGET_2 0xD8 -#elif GLOBALS == 0x62A080 -#define PATH_COLOR 0xC0 -#define REFLECTION_PATH_COLOR 0xD0 -#define DOT_COLOR 0xF0 -#define ACTIVE_COLOR 0x100 -#define BACKGROUND_REGION_COLOR 0x110 -#define SUCCESS_COLOR_A 0x120 -#define SUCCESS_COLOR_B 0x130 -#define STROBE_COLOR_A 0x140 -#define STROBE_COLOR_B 0x150 -#define ERROR_COLOR 0x160 -#define PATTERN_POINT_COLOR 0x180 -#define PATTERN_POINT_COLOR_A 0x190 -#define PATTERN_POINT_COLOR_B 0x1A0 -#define SYMBOL_A 0x1B0 -#define SYMBOL_B 0x1C0 -#define SYMBOL_C 0x1D0 -#define SYMBOL_D 0x1E0 -#define SYMBOL_E 0x1F0 -#define PUSH_SYMBOL_COLORS 0x200 -#define OUTER_BACKGROUND 0x204 -#define OUTER_BACKGROUND_MODE 0x214 -#define TRACED_EDGES 0x228 -#define AUDIO_PREFIX 0x270 -#define POWER 0x2A0 -#define TARGET 0x2B4 -#define IS_CYLINDER 0x2F4 -#define CYLINDER_Z0 0x2F8 -#define CYLINDER_Z1 0x2FC -#define CYLINDER_RADIUS 0x300 -#define CURSOR_SPEED_SCALE 0x350 -#define SPECULAR_ADD 0x38C -#define SPECULAR_POWER 0x390 -#define PATH_WIDTH_SCALE 0x39C -#define STARTPOINT_SCALE 0x3A0 -#define NUM_DOTS 0x3B4 -#define NUM_CONNECTIONS 0x3B8 -#define MAX_BROADCAST_DISTANCE 0x3BC -#define DOT_POSITIONS 0x3C0 -#define DOT_FLAGS 0x3C8 -#define DOT_CONNECTION_A 0x3D0 -#define DOT_CONNECTION_B 0x3D8 -#define DECORATIONS 0x418 -#define DECORATION_FLAGS 0x420 -#define DECORATION_COLORS 0x428 -#define NUM_DECORATIONS 0x430 -#define REFLECTION_DATA 0x438 -#define GRID_SIZE_X 0x440 -#define GRID_SIZE_Y 0x444 -#define STYLE_FLAGS 0x448 -#define SEQUENCE_LEN 0x454 -#define SEQUENCE 0x458 -#define DOT_SEQUENCE_LEN 0x460 -#define DOT_SEQUENCE 0x468 -#define DOT_SEQUENCE_LEN_REFLECTION 0x470 -#define DOT_SEQUENCE_REFLECTION 0x478 -#define NUM_COLORED_REGIONS 0x498 -#define COLORED_REGIONS 0x4A0 -#define PANEL_TARGET 0x4A8 -#define SPECULAR_TEXTURE 0x4D0 -#define CABLE_TARGET_2 0xD0 -#endif \ No newline at end of file diff --git a/WitnessRandomizer/WitnessRandomizer.vcxproj b/WitnessRandomizer/WitnessRandomizer.vcxproj deleted file mode 100644 index 80a7f0c..0000000 --- a/WitnessRandomizer/WitnessRandomizer.vcxproj +++ /dev/null @@ -1,173 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - 15.0 - {1563D1E2-0A18-4AFC-8D6F-9F8D9A433F31} - Win32Proj - WitnessRandomizer - 10.0.17134.0 - - - - Application - true - v141 - Unicode - - - Application - false - v141 - true - Unicode - - - Application - true - v141 - Unicode - - - Application - false - v141 - true - Unicode - - - - - - - - - - - - - - - - - - - - - true - - - true - - - false - - - false - NativeRecommendedRules.ruleset - true - - - - Use - Level3 - Disabled - true - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - pch.h - - - Console - true - - - - - NotUsing - Level3 - Disabled - true - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - pch.h - stdcpp17 - - - Console - true - - - - - Use - Level3 - MaxSpeed - true - true - true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - pch.h - - - Console - true - true - true - - - - - NotUsing - Level3 - MaxSpeed - true - true - true - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - pch.h - stdcpp17 - true - true - 26451 - MultiThreaded - - - Console - true - true - true - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/WitnessRandomizer/WitnessRandomizer.vcxproj.filters b/WitnessRandomizer/WitnessRandomizer.vcxproj.filters deleted file mode 100644 index 30ef78f..0000000 --- a/WitnessRandomizer/WitnessRandomizer.vcxproj.filters +++ /dev/null @@ -1,36 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;hm;inl;inc;ipp;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - \ No newline at end of file diff --git a/WitnessRandomizerInstaller.sln b/WitnessRandomizerInstaller.sln deleted file mode 100644 index 005650d..0000000 --- a/WitnessRandomizerInstaller.sln +++ /dev/null @@ -1,41 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.28010.2046 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "WitnessRandomizerInstaller", "WitnessRandomizerInstaller.vdproj", "{BBF9ED06-A4A7-4574-A15A-CF12489F45B8}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WitnessRandomizer", "WitnessRandomizer\WitnessRandomizer.vcxproj", "{1563D1E2-0A18-4AFC-8D6F-9F8D9A433F31}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|x64 = Release|x64 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {BBF9ED06-A4A7-4574-A15A-CF12489F45B8}.Debug|x64.ActiveCfg = Debug - {BBF9ED06-A4A7-4574-A15A-CF12489F45B8}.Debug|x64.Build.0 = Debug - {BBF9ED06-A4A7-4574-A15A-CF12489F45B8}.Debug|x86.ActiveCfg = Debug - {BBF9ED06-A4A7-4574-A15A-CF12489F45B8}.Debug|x86.Build.0 = Debug - {BBF9ED06-A4A7-4574-A15A-CF12489F45B8}.Release|x64.ActiveCfg = Release - {BBF9ED06-A4A7-4574-A15A-CF12489F45B8}.Release|x64.Build.0 = Release - {BBF9ED06-A4A7-4574-A15A-CF12489F45B8}.Release|x86.ActiveCfg = Release - {BBF9ED06-A4A7-4574-A15A-CF12489F45B8}.Release|x86.Build.0 = Release - {1563D1E2-0A18-4AFC-8D6F-9F8D9A433F31}.Debug|x64.ActiveCfg = Debug|x64 - {1563D1E2-0A18-4AFC-8D6F-9F8D9A433F31}.Debug|x64.Build.0 = Debug|x64 - {1563D1E2-0A18-4AFC-8D6F-9F8D9A433F31}.Debug|x86.ActiveCfg = Debug|Win32 - {1563D1E2-0A18-4AFC-8D6F-9F8D9A433F31}.Debug|x86.Build.0 = Debug|Win32 - {1563D1E2-0A18-4AFC-8D6F-9F8D9A433F31}.Release|x64.ActiveCfg = Release|x64 - {1563D1E2-0A18-4AFC-8D6F-9F8D9A433F31}.Release|x64.Build.0 = Release|x64 - {1563D1E2-0A18-4AFC-8D6F-9F8D9A433F31}.Release|x86.ActiveCfg = Release|Win32 - {1563D1E2-0A18-4AFC-8D6F-9F8D9A433F31}.Release|x86.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {16A86E99-24E8-45C7-A6E2-1FA2C179A898} - EndGlobalSection -EndGlobal diff --git a/WitnessRandomizerInstaller.vdproj b/WitnessRandomizerInstaller.vdproj deleted file mode 100644 index 922b7d1..0000000 --- a/WitnessRandomizerInstaller.vdproj +++ /dev/null @@ -1,729 +0,0 @@ -"DeployProject" -{ -"VSVersion" = "3:800" -"ProjectType" = "8:{978C614F-708E-4E1A-B201-565925725DBA}" -"IsWebType" = "8:FALSE" -"ProjectName" = "8:WitnessRandomizerInstaller" -"LanguageId" = "3:1033" -"CodePage" = "3:1252" -"UILanguageId" = "3:1033" -"SccProjectName" = "8:" -"SccLocalPath" = "8:" -"SccAuxPath" = "8:" -"SccProvider" = "8:" - "Hierarchy" - { - "Entry" - { - "MsmKey" = "8:_99BCB0A7745940D890C011AEB10ED05F" - "OwnerKey" = "8:_UNDEFINED" - "MsmSig" = "8:_UNDEFINED" - } - } - "Configurations" - { - "Debug" - { - "DisplayName" = "8:Debug" - "IsDebugOnly" = "11:TRUE" - "IsReleaseOnly" = "11:FALSE" - "OutputFilename" = "8:Debug\\WitnessRandomizerInstaller.msi" - "PackageFilesAs" = "3:2" - "PackageFileSize" = "3:-2147483648" - "CabType" = "3:1" - "Compression" = "3:2" - "SignOutput" = "11:FALSE" - "CertificateFile" = "8:" - "PrivateKeyFile" = "8:" - "TimeStampServer" = "8:" - "InstallerBootstrapper" = "3:2" - "BootstrapperCfg:{63ACBE69-63AA-4F98-B2B6-99F9E24495F2}" - { - "Enabled" = "11:TRUE" - "PromptEnabled" = "11:TRUE" - "PrerequisitesLocation" = "2:1" - "Url" = "8:" - "ComponentsUrl" = "8:" - "Items" - { - "{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:.NETFramework,Version=v4.6.1" - { - "Name" = "8:Microsoft .NET Framework 4.6.1 (x86 and x64)" - "ProductCode" = "8:.NETFramework,Version=v4.6.1" - } - } - } - } - "Release" - { - "DisplayName" = "8:Release" - "IsDebugOnly" = "11:FALSE" - "IsReleaseOnly" = "11:TRUE" - "OutputFilename" = "8:Release\\WitnessRandomizer.msi" - "PackageFilesAs" = "3:2" - "PackageFileSize" = "3:-2147483648" - "CabType" = "3:1" - "Compression" = "3:3" - "SignOutput" = "11:FALSE" - "CertificateFile" = "8:" - "PrivateKeyFile" = "8:" - "TimeStampServer" = "8:" - "InstallerBootstrapper" = "3:2" - "BootstrapperCfg:{63ACBE69-63AA-4F98-B2B6-99F9E24495F2}" - { - "Enabled" = "11:TRUE" - "PromptEnabled" = "11:TRUE" - "PrerequisitesLocation" = "2:1" - "Url" = "8:" - "ComponentsUrl" = "8:" - "Items" - { - "{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:.NETFramework,Version=v4.6.1" - { - "Name" = "8:Microsoft .NET Framework 4.6.1 (x86 and x64)" - "ProductCode" = "8:.NETFramework,Version=v4.6.1" - } - } - } - } - } - "Deployable" - { - "CustomAction" - { - } - "DefaultFeature" - { - "Name" = "8:DefaultFeature" - "Title" = "8:" - "Description" = "8:" - } - "ExternalPersistence" - { - "LaunchCondition" - { - } - } - "File" - { - } - "FileType" - { - } - "Folder" - { - "{3C67513D-01DD-4637-8A68-80971EB9504F}:_D9D31B4A38DF41E78ABAD33DDC72CD52" - { - "DefaultLocation" = "8:[ProgramFiles64Folder][Manufacturer]\\[ProductName]" - "Name" = "8:#1925" - "AlwaysCreate" = "11:FALSE" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Property" = "8:TARGETDIR" - "Folders" - { - } - } - "{1525181F-901A-416C-8A58-119130FE478E}:_E6EFC2A563B94B588E829ED15D2EE070" - { - "Name" = "8:#1916" - "AlwaysCreate" = "11:FALSE" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Property" = "8:DesktopFolder" - "Folders" - { - } - } - "{1525181F-901A-416C-8A58-119130FE478E}:_EC75B6D2E5304ADCACB28DC7CA4365A2" - { - "Name" = "8:#1919" - "AlwaysCreate" = "11:FALSE" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Property" = "8:ProgramMenuFolder" - "Folders" - { - } - } - } - "LaunchCondition" - { - } - "Locator" - { - } - "MsiBootstrapper" - { - "LangId" = "3:1033" - "RequiresElevation" = "11:FALSE" - } - "Product" - { - "Name" = "8:Microsoft Visual Studio" - "ProductName" = "8:WitnessRandomizer" - "ProductCode" = "8:{CFA35C1B-207B-4F9A-AF67-3D3FC8B47530}" - "PackageCode" = "8:{EB510A81-D971-401F-BCA1-03DB37ED9F10}" - "UpgradeCode" = "8:{B2AF0F34-4917-4AEC-B892-FE4FD4B9584A}" - "AspNetVersion" = "8:2.0.50727.0" - "RestartWWWService" = "11:FALSE" - "RemovePreviousVersions" = "11:TRUE" - "DetectNewerInstalledVersion" = "11:TRUE" - "InstallAllUsers" = "11:FALSE" - "ProductVersion" = "8:1.0.3" - "Manufacturer" = "8:jbzdarkid" - "ARPHELPTELEPHONE" = "8:" - "ARPHELPLINK" = "8:" - "Title" = "8:Witness Randomizer" - "Subject" = "8:" - "ARPCONTACT" = "8:jbzdarkid" - "Keywords" = "8:" - "ARPCOMMENTS" = "8:Randomizer for The Witness" - "ARPURLINFOABOUT" = "8:www.github.com/jbzdarkid/witness-randomizer" - "ARPPRODUCTICON" = "8:" - "ARPIconIndex" = "3:0" - "SearchPath" = "8:" - "UseSystemSearchPath" = "11:TRUE" - "TargetPlatform" = "3:1" - "PreBuildEvent" = "8:" - "PostBuildEvent" = "8:" - "RunPostBuildEvent" = "3:0" - } - "Registry" - { - "HKLM" - { - "Keys" - { - "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_99D49F6F3FDE47E6A28761F01AF578E1" - { - "Name" = "8:Software" - "Condition" = "8:" - "AlwaysCreate" = "11:FALSE" - "DeleteAtUninstall" = "11:FALSE" - "Transitive" = "11:FALSE" - "Keys" - { - "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_3A41D7EF5BF942FAA46261A8C8A6A3E9" - { - "Name" = "8:[Manufacturer]" - "Condition" = "8:" - "AlwaysCreate" = "11:FALSE" - "DeleteAtUninstall" = "11:FALSE" - "Transitive" = "11:FALSE" - "Keys" - { - } - "Values" - { - } - } - } - "Values" - { - } - } - } - } - "HKCU" - { - "Keys" - { - "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_AF03DAE7450641EF9CB1A71C5F7E4DAF" - { - "Name" = "8:Software" - "Condition" = "8:" - "AlwaysCreate" = "11:FALSE" - "DeleteAtUninstall" = "11:FALSE" - "Transitive" = "11:FALSE" - "Keys" - { - "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_2FE61CAEC5F04B44B9B356786AA5650E" - { - "Name" = "8:[Manufacturer]" - "Condition" = "8:" - "AlwaysCreate" = "11:FALSE" - "DeleteAtUninstall" = "11:FALSE" - "Transitive" = "11:FALSE" - "Keys" - { - } - "Values" - { - } - } - } - "Values" - { - } - } - } - } - "HKCR" - { - "Keys" - { - } - } - "HKU" - { - "Keys" - { - } - } - "HKPU" - { - "Keys" - { - } - } - } - "Sequences" - { - } - "Shortcut" - { - "{970C0BB2-C7D0-45D7-ABFA-7EC378858BC0}:_17BDAE346F194FD0B84D3B6F64454455" - { - "Name" = "8:WitnessRandomizer" - "Arguments" = "8:" - "Description" = "8:" - "ShowCmd" = "3:1" - "IconIndex" = "3:0" - "Transitive" = "11:FALSE" - "Target" = "8:_99BCB0A7745940D890C011AEB10ED05F" - "Folder" = "8:_EC75B6D2E5304ADCACB28DC7CA4365A2" - "WorkingFolder" = "8:_D9D31B4A38DF41E78ABAD33DDC72CD52" - "Icon" = "8:" - "Feature" = "8:" - } - } - "UserInterface" - { - "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_1D0761940F3446ECB1BF115230EEBAAD" - { - "Name" = "8:#1901" - "Sequence" = "3:2" - "Attributes" = "3:2" - "Dialogs" - { - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_246CF02A71224692AE1FCD645D0C550C" - { - "Sequence" = "3:100" - "DisplayName" = "8:Progress" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdAdminProgressDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - "ShowProgress" - { - "Name" = "8:ShowProgress" - "DisplayName" = "8:#1009" - "Description" = "8:#1109" - "Type" = "3:5" - "ContextData" = "8:1;True=1;False=0" - "Attributes" = "3:0" - "Setting" = "3:0" - "Value" = "3:1" - "DefaultValue" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - } - } - } - } - "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_1F1DB42220714DF3AD764FE81693D17B" - { - "Name" = "8:#1901" - "Sequence" = "3:1" - "Attributes" = "3:2" - "Dialogs" - { - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_3BB25E5F9B10409982B7C4A22029DABC" - { - "Sequence" = "3:100" - "DisplayName" = "8:Progress" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdProgressDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - "ShowProgress" - { - "Name" = "8:ShowProgress" - "DisplayName" = "8:#1009" - "Description" = "8:#1109" - "Type" = "3:5" - "ContextData" = "8:1;True=1;False=0" - "Attributes" = "3:0" - "Setting" = "3:0" - "Value" = "3:1" - "DefaultValue" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - } - } - } - } - "{2479F3F5-0309-486D-8047-8187E2CE5BA0}:_315683E864204DC28444A9A6E1235D0F" - { - "UseDynamicProperties" = "11:FALSE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdUserInterface.wim" - } - "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_31D3A86D6A484695A7AB5AB54D880CCB" - { - "Name" = "8:#1902" - "Sequence" = "3:1" - "Attributes" = "3:3" - "Dialogs" - { - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_96ED40E6C3E94DC3944345555DAC2381" - { - "Sequence" = "3:100" - "DisplayName" = "8:Finished" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdFinishedDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - "UpdateText" - { - "Name" = "8:UpdateText" - "DisplayName" = "8:#1058" - "Description" = "8:#1158" - "Type" = "3:15" - "ContextData" = "8:" - "Attributes" = "3:0" - "Setting" = "3:1" - "Value" = "8:#1258" - "DefaultValue" = "8:#1258" - "UsePlugInResources" = "11:TRUE" - } - } - } - } - } - "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_43BD3ADF347E4D599B648929E79D2905" - { - "Name" = "8:#1902" - "Sequence" = "3:2" - "Attributes" = "3:3" - "Dialogs" - { - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_17CF2961248B47F1BE9F048C2821F5AA" - { - "Sequence" = "3:100" - "DisplayName" = "8:Finished" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdAdminFinishedDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - } - } - } - } - "{2479F3F5-0309-486D-8047-8187E2CE5BA0}:_75C34DD0EF274A3C961526CAE494EB05" - { - "UseDynamicProperties" = "11:FALSE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdBasicDialogs.wim" - } - "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_94854F44F47B4AB68C268B55F9272AC8" - { - "Name" = "8:#1900" - "Sequence" = "3:2" - "Attributes" = "3:1" - "Dialogs" - { - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_91CB7820557245A78F2BEC28E128F5A6" - { - "Sequence" = "3:200" - "DisplayName" = "8:Installation Folder" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdAdminFolderDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - } - } - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_F03A13F3FD82442D9A60ABA8F387556D" - { - "Sequence" = "3:300" - "DisplayName" = "8:Confirm Installation" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdAdminConfirmDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - } - } - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_F767EFBE51C14BEEBDDDE4EE34194C2F" - { - "Sequence" = "3:100" - "DisplayName" = "8:Welcome" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdAdminWelcomeDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - "CopyrightWarning" - { - "Name" = "8:CopyrightWarning" - "DisplayName" = "8:#1002" - "Description" = "8:#1102" - "Type" = "3:3" - "ContextData" = "8:" - "Attributes" = "3:0" - "Setting" = "3:1" - "Value" = "8:#1202" - "DefaultValue" = "8:#1202" - "UsePlugInResources" = "11:TRUE" - } - "Welcome" - { - "Name" = "8:Welcome" - "DisplayName" = "8:#1003" - "Description" = "8:#1103" - "Type" = "3:3" - "ContextData" = "8:" - "Attributes" = "3:0" - "Setting" = "3:1" - "Value" = "8:#1203" - "DefaultValue" = "8:#1203" - "UsePlugInResources" = "11:TRUE" - } - } - } - } - } - "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_ADBB7C7C5F1C44A5BDF8196F2B399117" - { - "Name" = "8:#1900" - "Sequence" = "3:1" - "Attributes" = "3:1" - "Dialogs" - { - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_12ABE080AB25431587017EA259F5EE77" - { - "Sequence" = "3:100" - "DisplayName" = "8:Welcome" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdWelcomeDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - "CopyrightWarning" - { - "Name" = "8:CopyrightWarning" - "DisplayName" = "8:#1002" - "Description" = "8:#1102" - "Type" = "3:3" - "ContextData" = "8:" - "Attributes" = "3:0" - "Setting" = "3:1" - "Value" = "8:#1202" - "DefaultValue" = "8:#1202" - "UsePlugInResources" = "11:TRUE" - } - "Welcome" - { - "Name" = "8:Welcome" - "DisplayName" = "8:#1003" - "Description" = "8:#1103" - "Type" = "3:3" - "ContextData" = "8:" - "Attributes" = "3:0" - "Setting" = "3:1" - "Value" = "8:#1203" - "DefaultValue" = "8:#1203" - "UsePlugInResources" = "11:TRUE" - } - } - } - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_342FF2D8B1B84AEF99509E470D61F8DB" - { - "Sequence" = "3:200" - "DisplayName" = "8:Installation Folder" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdFolderDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - "InstallAllUsersVisible" - { - "Name" = "8:InstallAllUsersVisible" - "DisplayName" = "8:#1059" - "Description" = "8:#1159" - "Type" = "3:5" - "ContextData" = "8:1;True=1;False=0" - "Attributes" = "3:0" - "Setting" = "3:0" - "Value" = "3:1" - "DefaultValue" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - } - } - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_7FA0E634601A4E15A45B2B6BB4AE5C39" - { - "Sequence" = "3:300" - "DisplayName" = "8:Confirm Installation" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdConfirmDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - } - } - } - } - } - "MergeModule" - { - } - "ProjectOutput" - { - "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_99BCB0A7745940D890C011AEB10ED05F" - { - "SourcePath" = "8:x64\\Release\\WitnessRandomizer.exe" - "TargetName" = "8:" - "Tag" = "8:" - "Folder" = "8:_D9D31B4A38DF41E78ABAD33DDC72CD52" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:FALSE" - "IsolateTo" = "8:" - "ProjectOutputGroupRegister" = "3:1" - "OutputConfiguration" = "8:" - "OutputGroupCanonicalName" = "8:Built" - "OutputProjectGuid" = "8:{1563D1E2-0A18-4AFC-8D6F-9F8D9A433F31}" - "ShowKeyOutput" = "11:TRUE" - "ExcludeFilters" - { - } - } - } - } -} -- cgit 1.4.1