├── .gitattributes ├── .gitignore ├── LICENSE ├── README.md ├── external └── discord-rpc │ ├── discord-rpc.h │ ├── x64 │ ├── debug │ │ ├── discord-rpc.lib │ │ └── discord-rpc.pdb │ └── discord-rpc.lib │ └── x86 │ └── discord-rpc.lib ├── vpDiscordRPCx64.sln └── vpDiscordRPCx64 ├── discord_integration.cpp ├── discord_integration.h ├── includes.h ├── vpDiscordRPCx64.vcxproj ├── vpDiscordRPCx64.vcxproj.filters ├── vpDiscordRPCx64.vcxproj.user └── vp_main.cpp /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .vs/ 2 | vpDiscordRPCx64/x86/ 3 | vpDiscordRPCx64/x64/ -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 ScriptedSnark 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | 11 | --------------------------------- 12 | discord-rpc 13 | Copyright 2017 Discord, Inc. 14 | 15 | Permission is hereby granted, free of charge, to any person obtaining a copy of 16 | this software and associated documentation files (the "Software"), to deal in 17 | the Software without restriction, including without limitation the rights to 18 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 19 | of the Software, and to permit persons to whom the Software is furnished to do 20 | so, subject to the following conditions: 21 | 22 | The above copyright notice and this permission notice shall be included in all 23 | copies or substantial portions of the Software. 24 | 25 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 26 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 27 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 28 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 29 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 30 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 31 | SOFTWARE. 32 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # vpDiscordRPCx64 2 | 3 | vpDiscordRPCx64 is unofficial plugin for [J.A.C.K](https://jack.hlfx.ru/en/). Achieved with reverse engineering. 4 | 5 | ## Installation 6 | 7 | 1. Download archive from [Releases](https://github.com/ScriptedSnark/vpDiscordRPCx64/releases/latest) 8 | 2. Unpack archive 9 | 3. If you use a 64-bit version of J.A.C.K, move `x64/vpDiscordRPCx64.dll` to `J.A.C.K/plugins` 10 | 11 | If you use a 32-bit version of J.A.C.K, move `x86/vpDiscordRPCx86.dll` to `J.A.C.K/plugins` 12 | 13 | 4. That's it! Run J.A.C.K and check that Discord RPC is working. 14 | 15 | ## Showcase 16 | ![image1](https://user-images.githubusercontent.com/51358194/209185900-95a19b28-81ce-4a8a-99bf-f8502f3b3086.png) 17 | ![image](https://user-images.githubusercontent.com/51358194/209185885-14b804d6-353e-4cda-8662-e540221ad561.png) 18 | -------------------------------------------------------------------------------- /external/discord-rpc/discord-rpc.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | // clang-format off 5 | 6 | #if defined(DISCORD_DYNAMIC_LIB) 7 | # if defined(_WIN32) 8 | # if defined(DISCORD_BUILDING_SDK) 9 | # define DISCORD_EXPORT __declspec(dllexport) 10 | # else 11 | # define DISCORD_EXPORT __declspec(dllimport) 12 | # endif 13 | # else 14 | # define DISCORD_EXPORT __attribute__((visibility("default"))) 15 | # endif 16 | #else 17 | # define DISCORD_EXPORT 18 | #endif 19 | 20 | // clang-format on 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | #define DISCORD_MAX_BUTTONS 2 27 | 28 | typedef struct DiscordRichPresence 29 | { 30 | const char* state; /* max 128 bytes */ 31 | const char* details; /* max 128 bytes */ 32 | int64_t startTimestamp; 33 | int64_t endTimestamp; 34 | const char* largeImageKey; /* max 32 bytes */ 35 | const char* largeImageText; /* max 128 bytes */ 36 | const char* smallImageKey; /* max 32 bytes */ 37 | const char* smallImageText; /* max 128 bytes */ 38 | const char* partyId; /* max 128 bytes */ 39 | int partySize; 40 | int partyMax; 41 | const char* matchSecret; /* max 128 bytes */ 42 | const char* joinSecret; /* max 128 bytes */ 43 | const char* spectateSecret; /* max 128 bytes */ 44 | int8_t instance; 45 | const char* buttonLabel[DISCORD_MAX_BUTTONS]; 46 | const char* buttonUrl[DISCORD_MAX_BUTTONS]; 47 | } DiscordRichPresence; 48 | 49 | typedef struct DiscordUser 50 | { 51 | const char* userId; 52 | const char* username; 53 | const char* discriminator; 54 | const char* avatar; 55 | } DiscordUser; 56 | 57 | typedef struct DiscordEventHandlers 58 | { 59 | void (*ready)(const DiscordUser* request); 60 | void (*disconnected)(int errorCode, const char* message); 61 | void (*errored)(int errorCode, const char* message); 62 | void (*joinGame)(const char* joinSecret); 63 | void (*spectateGame)(const char* spectateSecret); 64 | void (*joinRequest)(const DiscordUser* request); 65 | } DiscordEventHandlers; 66 | 67 | #define DISCORD_REPLY_NO 0 68 | #define DISCORD_REPLY_YES 1 69 | #define DISCORD_REPLY_IGNORE 2 70 | 71 | DISCORD_EXPORT void Discord_Initialize(const char* applicationId, 72 | DiscordEventHandlers* handlers, 73 | int autoRegister, 74 | const char* optionalSteamId); 75 | DISCORD_EXPORT void Discord_Shutdown(void); 76 | 77 | /* checks for incoming messages, dispatches callbacks */ 78 | DISCORD_EXPORT void Discord_RunCallbacks(void); 79 | 80 | /* If you disable the lib starting its own io thread, you'll need to call this from your own */ 81 | #ifdef DISCORD_DISABLE_IO_THREAD 82 | DISCORD_EXPORT void Discord_UpdateConnection(void); 83 | #endif 84 | 85 | DISCORD_EXPORT void Discord_UpdatePresence(const DiscordRichPresence* presence); 86 | DISCORD_EXPORT void Discord_ClearPresence(void); 87 | 88 | DISCORD_EXPORT void Discord_Respond(const char* userid, /* DISCORD_REPLY_ */ int reply); 89 | 90 | DISCORD_EXPORT void Discord_UpdateHandlers(DiscordEventHandlers* handlers); 91 | 92 | #ifdef __cplusplus 93 | } /* extern "C" */ 94 | #endif -------------------------------------------------------------------------------- /external/discord-rpc/x64/debug/discord-rpc.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptedSnark/vpDiscordRPCx64/d0f94f84508388a6ef2aaabc8671384a410ab21c/external/discord-rpc/x64/debug/discord-rpc.lib -------------------------------------------------------------------------------- /external/discord-rpc/x64/debug/discord-rpc.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptedSnark/vpDiscordRPCx64/d0f94f84508388a6ef2aaabc8671384a410ab21c/external/discord-rpc/x64/debug/discord-rpc.pdb -------------------------------------------------------------------------------- /external/discord-rpc/x64/discord-rpc.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptedSnark/vpDiscordRPCx64/d0f94f84508388a6ef2aaabc8671384a410ab21c/external/discord-rpc/x64/discord-rpc.lib -------------------------------------------------------------------------------- /external/discord-rpc/x86/discord-rpc.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptedSnark/vpDiscordRPCx64/d0f94f84508388a6ef2aaabc8671384a410ab21c/external/discord-rpc/x86/discord-rpc.lib -------------------------------------------------------------------------------- /vpDiscordRPCx64.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.4.33205.214 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vpDiscordRPCx64", "vpDiscordRPCx64\vpDiscordRPCx64.vcxproj", "{9C5F1E85-C7E7-4AC6-BAD1-BC67DCBE57C1}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Debug|x86 = Debug|x86 12 | Release|x64 = Release|x64 13 | Release|x86 = Release|x86 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {9C5F1E85-C7E7-4AC6-BAD1-BC67DCBE57C1}.Debug|x64.ActiveCfg = Debug|x64 17 | {9C5F1E85-C7E7-4AC6-BAD1-BC67DCBE57C1}.Debug|x64.Build.0 = Debug|x64 18 | {9C5F1E85-C7E7-4AC6-BAD1-BC67DCBE57C1}.Debug|x86.ActiveCfg = Debug|Win32 19 | {9C5F1E85-C7E7-4AC6-BAD1-BC67DCBE57C1}.Debug|x86.Build.0 = Debug|Win32 20 | {9C5F1E85-C7E7-4AC6-BAD1-BC67DCBE57C1}.Release|x64.ActiveCfg = Release|x64 21 | {9C5F1E85-C7E7-4AC6-BAD1-BC67DCBE57C1}.Release|x64.Build.0 = Release|x64 22 | {9C5F1E85-C7E7-4AC6-BAD1-BC67DCBE57C1}.Release|x86.ActiveCfg = Release|Win32 23 | {9C5F1E85-C7E7-4AC6-BAD1-BC67DCBE57C1}.Release|x86.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityGlobals) = postSolution 29 | SolutionGuid = {05EBEB47-84B0-4948-8D85-857BA6ECB82B} 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /vpDiscordRPCx64/discord_integration.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | by rogender & ScriptedSnark. 3 | discord_integration.cpp - implementation of Discord Rich Presence for J.A.C.K 4 | */ 5 | 6 | #include "includes.h" 7 | 8 | DiscordRPC_Mode mode = IDLE; 9 | HWND jack = NULL; 10 | std::string mapname, editing_map; 11 | bool dirty = false; 12 | 13 | bool IsEditing() // bad solution, you need to hook something from J.A.C.K to get map name! 14 | { 15 | char buffer[128]; 16 | GetWindowTextA(jack, buffer, sizeof(buffer)); 17 | 18 | std::string windowname = buffer; 19 | std::string defaultname = "J.A.C.K."; 20 | 21 | if (defaultname == windowname) 22 | return false; 23 | 24 | mapname = windowname.substr(12); 25 | mapname.erase(remove(mapname.begin(), mapname.end(), ']'), mapname.end()); // :skull: 26 | 27 | editing_map = "Editing " + mapname; 28 | 29 | return true; 30 | } 31 | 32 | bool IsInSettings() 33 | { 34 | HWND settings = FindWindow(0, "Configure J.A.C.K."); 35 | 36 | if (settings == NULL) 37 | return false; 38 | 39 | return true; 40 | } 41 | 42 | void handle_ready(const DiscordUser*) 43 | { 44 | printf("Connected to Discord.\n"); 45 | } 46 | 47 | void handle_errored(int error_code, const char* message) 48 | { 49 | printf("Discord error (%d): %s\n", error_code, message); 50 | } 51 | 52 | void handle_disconnected(int error_code, const char* message) 53 | { 54 | printf("Disconnected from Discord (%d): %s\n", error_code, message); 55 | } 56 | 57 | void set_state(DiscordRichPresence* presence, const char* state) 58 | { 59 | presence->state = state; 60 | dirty = true; 61 | } 62 | 63 | void set_details(DiscordRichPresence* presence, const char* details) 64 | { 65 | presence->details = details; 66 | dirty = true; 67 | } 68 | 69 | void update_presence(const DiscordRichPresence* presence) 70 | { 71 | if (dirty) 72 | Discord_UpdatePresence(presence); 73 | } 74 | 75 | void DiscordRPC_MainThread() 76 | { 77 | DiscordRichPresence presence; 78 | DiscordEventHandlers handlers; 79 | 80 | handlers.ready = handle_ready; 81 | handlers.errored = handle_errored; 82 | handlers.disconnected = handle_disconnected; 83 | 84 | Discord_Initialize(APPLICATION_ID, &handlers, 1, NULL); 85 | 86 | presence.largeImageKey = "jackhammer"; 87 | presence.largeImageText = "Just Another Creation Kit (J.A.C.K)"; 88 | presence.buttonLabel[0] = "Download J.A.C.K"; 89 | presence.buttonUrl[0] = "https://jack.hlfx.ru/en/download.html"; 90 | presence.buttonLabel[1] = "Download RPC plugin"; 91 | presence.buttonUrl[1] = "https://github.com/ScriptedSnark/vpDiscordRPCx64/releases"; 92 | presence.startTimestamp = time(0); 93 | 94 | jack = FindWindow("QWidget", "J.A.C.K."); 95 | 96 | while (true) 97 | { 98 | // Without Sleep CPU usage will be around 25% 99 | Sleep(200); // TODO: replace it with async, I think? 100 | 101 | dirty = false; 102 | 103 | if (IsInSettings()) // Settings needs to be first cause can't edit map with settings open 104 | mode = SETTINGS; 105 | else if (IsEditing()) 106 | mode = EDITING; 107 | else 108 | mode = IDLE; 109 | 110 | switch (mode) 111 | { 112 | default: 113 | break; 114 | 115 | case IDLE: 116 | set_state(&presence, "Idling"); 117 | set_details(&presence, NULL); 118 | break; 119 | 120 | case EDITING: 121 | set_state(&presence, editing_map.c_str()); 122 | break; 123 | 124 | case SETTINGS: 125 | set_state(&presence, "Configuring Settings"); 126 | break; 127 | } 128 | 129 | update_presence(&presence); 130 | Discord_RunCallbacks(); 131 | } 132 | } -------------------------------------------------------------------------------- /vpDiscordRPCx64/discord_integration.h: -------------------------------------------------------------------------------- 1 | #ifdef DISCORD_INTEGRATION_H_RECURSE_GUARD 2 | #error Recursive header files inclusion detected in discord_integration.h 3 | #else //DISCORD_INTEGRATION_H_RECURSE_GUARD 4 | 5 | #define DISCORD_INTEGRATION_H_RECURSE_GUARD 6 | 7 | #ifndef DISCORD_INTEGRATION_H_GUARD 8 | #define DISCORD_INTEGRATION_H_GUARD 9 | #pragma once 10 | 11 | constexpr char APPLICATION_ID[] = "967069834728849449"; 12 | 13 | enum DiscordRPC_Mode 14 | { 15 | IDLE, 16 | EDITING, 17 | SETTINGS, 18 | }; 19 | 20 | extern DiscordRPC_Mode mode; 21 | 22 | void DiscordRPC_MainThread(); 23 | 24 | #endif //DISCORD_INTEGRATION_H_GUARD 25 | 26 | #undef DISCORD_INTEGRATION_H_RECURSE_GUARD 27 | #endif //DISCORD_INTEGRATION_H_RECURSE_GUARD -------------------------------------------------------------------------------- /vpDiscordRPCx64/includes.h: -------------------------------------------------------------------------------- 1 | /** 2 | * by ScriptedSnark, 2022. 3 | * includes.h 4 | */ 5 | 6 | #ifdef INCLUDES_H_RECURSE_GUARD 7 | #error Recursive header files inclusion detected in includes.h 8 | #else //INCLUDES_H_RECURSE_GUARD 9 | 10 | #define INCLUDES_H_RECURSE_GUARD 11 | 12 | #ifndef INCLUDES_H_GUARD 13 | #define INCLUDES_H_GUARD 14 | #pragma once 15 | 16 | // WinAPI 17 | #include 18 | #include 19 | #include 20 | 21 | //STL 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | 29 | #include 30 | #include 31 | 32 | #include "discord-rpc.h" 33 | #include "discord_integration.h" 34 | 35 | #define EXPORT __declspec(dllexport) 36 | 37 | #endif //INCLUDES_H_GUARD 38 | 39 | #undef INCLUDES_H_RECURSE_GUARD 40 | #endif //INCLUDES_H_RECURSE_GUARD -------------------------------------------------------------------------------- /vpDiscordRPCx64/vpDiscordRPCx64.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Debug 10 | x64 11 | 12 | 13 | Release 14 | Win32 15 | 16 | 17 | Release 18 | x64 19 | 20 | 21 | Retail Release 22 | Win32 23 | 24 | 25 | Retail Release 26 | x64 27 | 28 | 29 | 30 | 16.0 31 | Win32Proj 32 | {9c5f1e85-c7e7-4ac6-bad1-bc67dcbe57c1} 33 | vpDiscordRPCx64 34 | 10.0 35 | 36 | 37 | 38 | DynamicLibrary 39 | true 40 | v142 41 | MultiByte 42 | 43 | 44 | DynamicLibrary 45 | false 46 | v142 47 | true 48 | MultiByte 49 | 50 | 51 | DynamicLibrary 52 | false 53 | v142 54 | true 55 | MultiByte 56 | 57 | 58 | v142 59 | DynamicLibrary 60 | MultiByte 61 | true 62 | 63 | 64 | v142 65 | DynamicLibrary 66 | MultiByte 67 | true 68 | 69 | 70 | v142 71 | DynamicLibrary 72 | MultiByte 73 | true 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | true 92 | .\x64\$(Configuration)\ 93 | .\x64\$(Configuration)\int\ 94 | vpDiscordRPCx64 95 | 96 | 97 | false 98 | .\x64\$(Configuration)\ 99 | .\x64\$(Configuration)\int\ 100 | vpDiscordRPCx64 101 | 102 | 103 | false 104 | .\x64\$(Configuration)\ 105 | .\x64\$(Configuration)\int\ 106 | vpDiscordRPCx64 107 | 108 | 109 | .\x86\$(Configuration)\ 110 | .\x86\$(Configuration)\int\ 111 | vpDiscordRPCx86 112 | 113 | 114 | .\x86\$(Configuration)\ 115 | .\x86\$(Configuration)\int\ 116 | vpDiscordRPCx86 117 | 118 | 119 | .\x86\$(Configuration)\ 120 | .\x86\$(Configuration)\int\ 121 | vpDiscordRPCx86 122 | 123 | 124 | 125 | Level3 126 | false 127 | _DEBUG;_CONSOLE;FREE;%(PreprocessorDefinitions) 128 | false 129 | true 130 | ../external;../external/discord-rpc 131 | stdcpp17 132 | 133 | 134 | Windows 135 | true 136 | ../external/discord-rpc/x64/debug/discord-rpc.lib;%(AdditionalDependencies) 137 | 138 | 139 | 140 | 141 | Level3 142 | true 143 | true 144 | false 145 | NDEBUG;_CONSOLE;FREE;%(PreprocessorDefinitions) 146 | false 147 | true 148 | ../external;../external/discord-rpc 149 | stdcpp17 150 | 151 | 152 | Windows 153 | true 154 | true 155 | true 156 | ../external/discord-rpc/x64/discord-rpc.lib;%(AdditionalDependencies) 157 | 158 | 159 | 160 | 161 | Level3 162 | true 163 | true 164 | false 165 | NDEBUG;_CONSOLE;RETAIL;%(PreprocessorDefinitions) 166 | false 167 | true 168 | ../external;../external/discord-rpc 169 | stdcpp17 170 | 171 | 172 | Windows 173 | true 174 | true 175 | true 176 | ../external/discord-rpc/x64/discord-rpc.lib;%(AdditionalDependencies) 177 | 178 | 179 | 180 | 181 | stdcpp17 182 | false 183 | ../external;../external/discord-rpc 184 | 185 | 186 | ../external/discord-rpc/x86/debug/discord-rpc.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) 187 | 188 | 189 | 190 | 191 | stdcpp17 192 | false 193 | ../external;../external/discord-rpc 194 | 195 | 196 | ../external/discord-rpc/x86/discord-rpc.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) 197 | 198 | 199 | 200 | 201 | stdcpp17 202 | false 203 | ../external;../external/discord-rpc 204 | 205 | 206 | ../external/discord-rpc/x86/discord-rpc.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | -------------------------------------------------------------------------------- /vpDiscordRPCx64/vpDiscordRPCx64.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {0ce2c61a-ef96-4926-bf5f-ae35ad2bd901} 6 | 7 | 8 | {a400206e-67db-4ae9-99c0-e7e78f7d0bd7} 9 | 10 | 11 | 12 | 13 | Sources 14 | 15 | 16 | Sources 17 | 18 | 19 | 20 | 21 | Headers 22 | 23 | 24 | Headers 25 | 26 | 27 | -------------------------------------------------------------------------------- /vpDiscordRPCx64/vpDiscordRPCx64.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | C:\Soft\J.A.C.K\jack.exe 5 | WindowsLocalDebugger 6 | 7 | 8 | C:\Soft\J.A.C.K\jack.exe 9 | WindowsLocalDebugger 10 | 11 | 12 | C:\Soft\J.A.C.K\jack.exe 13 | WindowsLocalDebugger 14 | 15 | 16 | C:\Soft\J.A.C.K-32bit\jack.exe 17 | WindowsLocalDebugger 18 | 19 | 20 | C:\Soft\J.A.C.K-32bit\jack.exe 21 | WindowsLocalDebugger 22 | 23 | 24 | C:\Soft\J.A.C.K-32bit\jack.exe 25 | WindowsLocalDebugger 26 | 27 | -------------------------------------------------------------------------------- /vpDiscordRPCx64/vp_main.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | by ScriptedSnark. 3 | vp_main.cpp - Plugin initialization 4 | */ 5 | 6 | #include "includes.h" 7 | 8 | //----------------------------------------------------------------------------- 9 | // Initialize Discord RPC 10 | //----------------------------------------------------------------------------- 11 | void InitPlugin() 12 | { 13 | // Do own things... 14 | 15 | CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)DiscordRPC_MainThread, NULL, NULL, NULL); // Discord RPC 16 | } 17 | 18 | //----------------------------------------------------------------------------- 19 | // Initialize our J.A.C.K plugin (REVERSE ENGINEERING INTENSIFIES) 20 | //----------------------------------------------------------------------------- 21 | #ifdef _M_X64 22 | extern "C" int EXPORT vpMain(unsigned long long* Src, int version) // 64-bit implementation 23 | { 24 | // TODO: memcpy(&unk_18001B4B0, Src, *Src); | other things for this 25 | 26 | setlocale(LC_ALL, "C"); 27 | 28 | InitPlugin(); 29 | 30 | return 0; // from IDA pseudocode 31 | } 32 | #else 33 | extern "C" int EXPORT vpMain(DWORD* Src, int version) // 32-bit implementation 34 | { 35 | if (*Src < 720u) // 0x2D0u -> 720u 36 | return -1; 37 | 38 | //memcpy(&unk_100170D8, Src, *Src); 39 | 40 | setlocale(LC_ALL, "C"); 41 | 42 | InitPlugin(); 43 | 44 | return 0; 45 | } 46 | #endif 47 | 48 | DWORD WINAPI DllMain(_In_ void* _DllHandle, _In_ unsigned long _Reason, _In_opt_ void* _Reserved) 49 | { 50 | if (_Reason == DLL_PROCESS_ATTACH) 51 | return 1; 52 | 53 | return 0; 54 | } 55 | --------------------------------------------------------------------------------