-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add target to run Cyberpunk directly (#26)
* Clean up client, add a Cyberpunk2077 target to debug * Configurable debug * Fix path * Rename option to game * Update xmake.lua * Adapt option passing to game's parser * Document debug process * Fix install target * Protect crash when DLL is not loaded correctly * Update README.md
- Loading branch information
Showing
59 changed files
with
128 additions
and
2,048 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#include "Settings.h" | ||
#include <RED4ext/LaunchParameters.hpp> | ||
|
||
void Settings::Load() | ||
{ | ||
Settings& settings = Get(); | ||
|
||
auto& launchParameters = RED4ext::GetLaunchParameters(); | ||
|
||
if (launchParameters.Contains(RED4ext::CString("-online"))) | ||
settings.enabled = true; | ||
|
||
if (const auto ip = launchParameters.Get("-ip"); ip) | ||
{ | ||
if (ip->size > 0) | ||
settings.ip = (*ip)[0].c_str(); | ||
} | ||
|
||
if (const auto port = launchParameters.Get("-port"); port) | ||
{ | ||
if (port->size > 0) | ||
settings.ip = (*port)[0].c_str(); | ||
} | ||
|
||
if (const auto mods = launchParameters.Get("-mod"); mods) | ||
{ | ||
for (const auto& mod : *mods) | ||
settings.mods.push_back(mod.c_str()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#pragma once | ||
|
||
namespace fs = std::filesystem; | ||
|
||
struct Settings | ||
{ | ||
static Settings& Get() | ||
{ | ||
static Settings instance; | ||
return instance; | ||
} | ||
static void Load(); | ||
|
||
fs::path exePath{}; | ||
fs::path gamePath{}; | ||
String Version{}; | ||
String ip = "127.0.0.1"; | ||
uint16_t port = 11778; | ||
Vector<fs::path> mods = {}; | ||
bool enabled = false; | ||
|
||
private: | ||
Settings() = default; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.