Skip to content

Commit

Permalink
feat: Switched to LoadLibrary
Browse files Browse the repository at this point in the history
  • Loading branch information
Taiga74164 committed Apr 3, 2024
1 parent 533b2d9 commit b55312f
Show file tree
Hide file tree
Showing 17 changed files with 65 additions and 2,668 deletions.
17 changes: 5 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,9 @@ This project is created and shared for educational purposes only. I do not condo

## Usage

#### DLL Proxy
The DLL will automatically be loaded by the game itself if the dll is in the game directory. You may only rename the dll to `version.dll`, `winhttp.dll` or `winmm.dll`.

#### How to Run
**Note:** If you're [building](#building), skip to #2
1. Move `winhttp.dll` into the game directory in `/sololv`
2. Start the game
3. Press insert to show the menu
### How to Run
1. Inject the DLL to the game with your preferred injector.
2. Press insert to show the menu

## Features
- No Cooldown
Expand All @@ -30,10 +25,8 @@ The DLL will automatically be loaded by the game itself if the dll is in the gam
![menu](src/res/Solo_Leveling_ARISE_4BRSUmbeJd.png)

## Building
- Clone the repository: `git clone --recurse-submodules https://github.com/Taiga74164/SLA-Cheeto`.
- If you encounter the error depicted in the [screenshot](src/res/error.png), replace **{PATH_TO_GAME}** with the actual path to your game in `PostBuildEvent.cmd`.
- **_OR_** before building, you can initially create a `PostBuildEvent.cmd` with: `xcopy /f /y "{PROJECT_PATH}\x64\Release\winhttp.dll" "{PATH_TO_GAME}\winhttp.dll*"`.
- Remember to replace the placeholders with your own paths.
1. Clone the repository: `git clone --recurse-submodules https://github.com/Taiga74164/SLA-Cheeto`.
2. Build with your preferred IDE.

## Contributing
1. Fork the repo (<https://github.com/Taiga74164/SLA-Cheeto/fork>).
Expand Down
36 changes: 10 additions & 26 deletions src/SoloLevelling.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<TargetName>winhttp</TargetName>
<TargetName>SLA_Cheeto</TargetName>
<OutDir>$(SolutionDir)bin\$(Configuration)-$(Platform)</OutDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
Expand All @@ -57,22 +58,17 @@
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>false</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
<ModuleDefinitionFile>$(ProjectDir)game\Exports\Exports.def</ModuleDefinitionFile>
<ModuleDefinitionFile>
</ModuleDefinitionFile>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PostBuildEvent>
<Command>findstr "{PATH_TO_GAME}" "$(SolutionDir)PostBuildEvent.cmd"
if %errorlevel% == 0 (
echo Error: PostBuildEvent.cmd still contains the placeholder "{PATH_TO_GAME}". Please replace it to the path to Solo Leveling.
exit 1
) else (
cmd /c "$(SolutionDir)PostBuildEvent.cmd"
)</Command>
<Command>
</Command>
</PostBuildEvent>
<PreBuildEvent>
<Command>if not exist "$(SolutionDir)PostBuildEvent.cmd" (
echo xcopy /f /y "$(TargetDir)$(TargetName).dll" "{PATH_TO_GAME}\winhttp.dll*" &gt; "$(SolutionDir)PostBuildEvent.cmd"
)</Command>
<Command>
</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
Expand Down Expand Up @@ -102,7 +98,6 @@ if %errorlevel% == 0 (
<ClInclude Include="game\cheat\vars.h" />
<ClInclude Include="game\ConfigEntry.hpp" />
<ClInclude Include="game\ConfigManager.hpp" />
<ClInclude Include="game\Core\Core.h" />
<ClInclude Include="game\events.h" />
<ClInclude Include="game\events\event.hpp" />
<ClInclude Include="game\events\handlers\abstracteventhandler.hpp" />
Expand All @@ -118,11 +113,10 @@ if %errorlevel% == 0 (
<ClInclude Include="game\events\joins\eventjoinwrapper.hpp" />
<ClInclude Include="game\events\joins\handlereventjoin.h" />
<ClInclude Include="game\events\joins\handlereventjoin.hpp" />
<ClInclude Include="game\Exports\Exports.h" />
<ClInclude Include="game\Exports\Resources.h" />
<ClInclude Include="game\game-utils.hpp" />
<ClInclude Include="game\global.h" />
<ClInclude Include="game\HookManager.h" />
<ClInclude Include="game\main.h" />
<ClInclude Include="game\Memory.h" />
<ClInclude Include="game\Module.h" />
<ClInclude Include="game\ModuleManager.h" />
Expand Down Expand Up @@ -178,12 +172,11 @@ if %errorlevel% == 0 (
<ClCompile Include="game\cheat\features\PlayerSpeed.cpp" />
<ClCompile Include="game\cheat\features\SkipIntroMovie.cpp" />
<ClCompile Include="game\cheat\features\TimeScale.cpp" />
<ClCompile Include="game\Core\Core.cpp" />
<ClCompile Include="game\dllmain.cpp" />
<ClCompile Include="game\events.cpp" />
<ClCompile Include="game\events\joins\abstracteventjoin.cpp" />
<ClCompile Include="game\events\joins\eventjoinwrapper.cpp" />
<ClCompile Include="game\Exports\Exports.cpp" />
<ClCompile Include="game\main.cpp" />
<ClCompile Include="game\Memory.cpp" />
<ClCompile Include="game\Render\Backend\DX11Hook.cpp" />
<ClCompile Include="game\Render\Backend\DX12Hook.cpp" />
Expand All @@ -206,15 +199,6 @@ if %errorlevel% == 0 (
<ClCompile Include="vendor\imgui\imgui_widgets.cpp" />
<ClCompile Include="vendor\imgui\misc\cpp\imgui_stdlib.cpp" />
</ItemGroup>
<ItemGroup>
<None Include="game\Exports\Exports.def" />
</ItemGroup>
<ItemGroup>
<MASM Include="game\Exports\psapi.asm" />
<MASM Include="game\Exports\version.asm" />
<MASM Include="game\Exports\winhttp.asm" />
<MASM Include="game\Exports\winmm.asm" />
</ItemGroup>
<ItemGroup>
<Library Include="vendor\detours\detours-x64.lib" />
<Library Include="vendor\detours\detours-x86.lib" />
Expand Down
38 changes: 5 additions & 33 deletions src/SoloLevelling.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,6 @@
<ClInclude Include="vendor\magic_enum\include\magic_enum\magic_enum_utility.hpp">
<Filter>vendor\magic_enum</Filter>
</ClInclude>
<ClInclude Include="game\Exports\Exports.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="game\Exports\Resources.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="game\Render\Backend\DX11Hook.h">
<Filter>Header Files</Filter>
</ClInclude>
Expand Down Expand Up @@ -234,9 +228,6 @@
<ClInclude Include="game\cheat\vars.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="game\Core\Core.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="res\resource.h">
<Filter>Header Files</Filter>
</ClInclude>
Expand Down Expand Up @@ -297,6 +288,9 @@
<ClInclude Include="game\cheat\features\DisableWebView.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="game\main.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="vendor\CommandMenu\src\Menu.cpp">
Expand Down Expand Up @@ -341,9 +335,6 @@
<ClCompile Include="vendor\imgui\backends\imgui_impl_win32.cpp">
<Filter>vendor\imgui</Filter>
</ClCompile>
<ClCompile Include="game\Exports\Exports.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="game\Render\Backend\DX11Hook.cpp">
<Filter>Source Files</Filter>
</ClCompile>
Expand Down Expand Up @@ -401,9 +392,6 @@
<ClCompile Include="game\cheat\features\TimeScale.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="game\Core\Core.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="game\events\joins\abstracteventjoin.cpp">
<Filter>Source Files</Filter>
</ClCompile>
Expand All @@ -419,24 +407,8 @@
<ClCompile Include="game\cheat\features\DisableWebView.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="game\Exports\Exports.def">
<Filter>Source Files</Filter>
</None>
</ItemGroup>
<ItemGroup>
<MASM Include="game\Exports\psapi.asm">
<Filter>Source Files</Filter>
</MASM>
<MASM Include="game\Exports\version.asm">
<Filter>Source Files</Filter>
</MASM>
<MASM Include="game\Exports\winhttp.asm">
<ClCompile Include="game\main.cpp">
<Filter>Source Files</Filter>
</MASM>
<MASM Include="game\Exports\winmm.asm">
<Filter>Source Files</Filter>
</MASM>
</ClCompile>
</ItemGroup>
</Project>
1 change: 1 addition & 0 deletions src/game/ConfigManager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ class ConfigManager : public Singleton<ConfigManager>
// o << config_.dump(4);
std::ofstream file(configPath_);
file << config_.dump(4);
file.flush();
file.close();
}
};
150 changes: 0 additions & 150 deletions src/game/Core/Core.cpp

This file was deleted.

18 changes: 0 additions & 18 deletions src/game/Core/Core.h

This file was deleted.

Loading

0 comments on commit b55312f

Please sign in to comment.