Add more spoofing options and added clang-format (#1020)

* feat(Spoofing): add spoofing
* feat(Spoofing): prepare code for player attach
* remove(PlayerAttach): isn't going to work due to netsync architecture
* fix(GUI): fix scaling
* feat(Project): add clang-format file
* feat(Classes): update classes
* fix(BlackHole): remove unnecessary cleanup
* fix(Formatting): fix formatting for initializer lists
* feat(clang-format): Set tab width and 1 space before comment

Co-authored-by: Yimura <24669514+Yimura@users.noreply.github.com>
This commit is contained in:
maybegreat48
2023-03-01 21:27:15 +00:00
committed by GitHub
parent 92aea20cd6
commit 97a8c5d60b
466 changed files with 55224 additions and 35596 deletions

View File

@ -1,11 +1,11 @@
#include "view.hpp"
#include "services/context_menu/context_menu_service.hpp"
#include "view.hpp"
namespace big
{
static void draw_model_bounding_box(ImDrawList* draw_list, const model_bounding_box_screen_space& m_model_bounding_box_screen_space)
{
const auto& box = g_context_menu_service->m_model_bounding_box_screen_space;
const auto& box = g_context_menu_service->m_model_bounding_box_screen_space;
const auto& color = g.context_menu.bounding_box_color;
draw_list->AddLine(box.edge1, box.edge2, color);
@ -28,9 +28,8 @@ namespace big
{
if (const auto draw_list = ImGui::GetBackgroundDrawList(); draw_list)
{
if (g_context_menu_service->enabled &&
g_context_menu_service->m_pointer &&
g_context_menu_service->m_pointer->m_navigation)
if (g_context_menu_service->enabled && g_context_menu_service->m_pointer
&& g_context_menu_service->m_pointer->m_navigation)
{
float context_screen_x;
float context_screen_y;
@ -49,14 +48,19 @@ namespace big
const auto cm_start_x = static_cast<float>(*g_pointers->m_resolution_x) * context_screen_x + (67.5f * context_target_multplr);
const auto cm_start_y = static_cast<float>(*g_pointers->m_resolution_y) * context_screen_y - (175.f * context_target_multplr);
const auto cm_col = ImGui::ColorConvertFloat4ToU32({ 0.549f, 0.639f, 0.710f, 0.3f });
const auto cm_col = ImGui::ColorConvertFloat4ToU32({0.549f, 0.639f, 0.710f, 0.3f});
draw_list->AddRectFilled({ cm_start_x - 2.f , cm_start_y }, { cm_start_x + 2.f + cm->menu_size.x, cm_start_y + cm->menu_size.y }, cm_col, 5.f);
draw_list->AddRectFilled({cm_start_x - 2.f, cm_start_y},
{cm_start_x + 2.f + cm->menu_size.x, cm_start_y + cm->menu_size.y},
cm_col,
5.f);
for (std::uint32_t i = 0; i < cm->options.size(); i++)
{
const auto co = cm->options.at(i);
draw_list->AddText({ cm_start_x + 7.f, cm_start_y + (20.f * static_cast<float>(i)) + 5.f }, cm->current_option == i ? g.context_menu.selected_option_color : ImGui::ColorConvertFloat4ToU32({ 1.f, 1.f, 1.f, 1.f }), co.name.c_str());
draw_list->AddText({cm_start_x + 7.f, cm_start_y + (20.f * static_cast<float>(i)) + 5.f},
cm->current_option == i ? g.context_menu.selected_option_color : ImGui::ColorConvertFloat4ToU32({1.f, 1.f, 1.f, 1.f}),
co.name.c_str());
}
if (g.context_menu.bounding_box_enabled)