Skip to content

Commit

Permalink
Merge branch 'project-bo4:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Skwll committed Feb 19, 2024
2 parents 318b4a5 + 977d6c0 commit 46c53e4
Show file tree
Hide file tree
Showing 23 changed files with 4,076 additions and 92 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,6 @@
[submodule "deps/xxhash"]
path = deps/xxhash
url = https://github.com/stbrumme/xxhash.git
[submodule "deps/rapidcsv"]
path = deps/rapidcsv
url = https://github.com/d99kris/rapidcsv
21 changes: 12 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,23 @@ A very experimental modification platform for Call of Duty®: Black Ops 4 run by
As of May11, 2023 we merged 'demonware' branch into 'master'. it includes a built-in demonware server emulator which allows player to start game without connection to official online servers.


## INSTRUCTION
## INSTRUCTIONS

> you should have publisher files required for playing online under LPC folder of your game directory.
> if its not the case then start original game through battlenet launcher once to get those downloaded.
> You should have publisher files required for playing online under LPC folder of your game directory.
> If its not the case then start original game through battlenet launcher once to get those downloaded.
1- clone repository with its sub-modules and use generate.bat to make visual studio solution then compile project and copy ``d3d11.dll`` into your bo4 folder.
1- Clone repository with its sub-modules and use generate.bat to make visual studio solution then compile project and copy ``d3d11.dll`` into your bo4 folder.

2- start BlackOps4.exe
2- Start BlackOps4.exe

*in case you wanted to revert back to original battlenet servers just delete ``d3d11.dll``. you can put it back later whenever you want to re-install client.*
*In case you wanted to revert back to original battlenet servers just delete ``d3d11.dll``. you can put it back later whenever you want to re-install client.*

## SHIELD DOCUMENTATION

Documentation on shield can be found [here](https://shield-bo4.gitbook.io/).

## SUBMITTING ISSUES
github issues section is only for reporting programmatically errors of client. please dont use it for requesting features or seeking help with personal issues such as faulty game data or similar problems. use battlenet's scan and repair feature to fix those problems.
Github issues section is only for reporting programmatically errors of client. please dont use it for requesting features or seeking help with personal issues such as faulty game data or similar problems. use battlenet's scan and repair feature to fix those problems.


## NOTES
Expand All @@ -38,10 +41,10 @@ github issues section is only for reporting programmatically errors of client. p
- [x] Online Battlenet Connection Requirement Removal
- [x] Built-in Demonware Server Emulation
- [x] BlackBox Crash Reporting Component
- [ ] Enable Aim-Assist for Game Controllers
- [x] In-game Interactable Console
- [x] Gsc & Lua Modding Support
- [ ] Enable Aim-Assist for Game Controllers
- [ ] Miscellaneous Features such as 1st person view fov

- [ ] Fix *uncommon* runtime black screen issue along other instabilities

### SERVER-SIDE:
Expand Down
18 changes: 18 additions & 0 deletions deps/premake/rapidcsv.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
rapidcsv = {
source = path.join(dependencies.basePath, "rapidcsv"),
}

function rapidcsv.import()
rapidcsv.includes()
end

function rapidcsv.includes()
includedirs {
path.join(rapidcsv.source, "src"),
}
end

function rapidcsv.project()
end

table.insert(dependencies, rapidcsv)
1 change: 1 addition & 0 deletions deps/rapidcsv
Submodule rapidcsv added at f032c5
25 changes: 23 additions & 2 deletions source/proxy-dll/component/debugging.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#include <std_include.hpp>
#include "definitions/game.hpp"
#include "definitions/game_runtime_errors.hpp"
#include "component/scheduler.hpp"
#include "loader/component_loader.hpp"

#include <utilities/hook.hpp>
#include <utilities/string.hpp>

namespace debugging
Expand All @@ -17,7 +19,7 @@ namespace debugging
{
if ((1 << bitNumber) & infoBitmask)
{
connectionInfoString[bitNumber * 2] = bitNumber + 0x41;
connectionInfoString[bitNumber * 2] = (char)(bitNumber + 0x41);
}
else
{
Expand All @@ -42,7 +44,7 @@ namespace debugging

if (!connected)
{
float color[4] = { 0.8f, 1.0f, 0.3, 0.8f };
float color[4] = { 0.8f, 1.0f, 0.3f, 0.8f };

const char* sz = get_connectivity_info_string(infoBitmask);

Expand All @@ -68,11 +70,30 @@ namespace debugging
}
}

utilities::hook::detour sys_error_hook;

void sys_error_stub(uint32_t code, const char* message)
{
const char* error_message = game::runtime_errors::get_error_message(code);

if (error_message)
{
logger::write(logger::LOG_TYPE_ERROR, "[sys_error] %s (%d): %s", error_message, code, message);
}
else
{
logger::write(logger::LOG_TYPE_ERROR, "[sys_error] %d: %s", code, message);
}

sys_error_hook.invoke<void>(code, message);
}

class component final : public component_interface
{
public:
void post_unpack() override
{
sys_error_hook.create(0x143D36CC0_g, sys_error_stub);
scheduler::loop(draw_debug_info, scheduler::renderer);
scheduler::loop(test_key_catcher, scheduler::main);
}
Expand Down
Loading

0 comments on commit 46c53e4

Please sign in to comment.