Skip to content

Commit

Permalink
Merge pull request #121 from ByteCorum/WIP
Browse files Browse the repository at this point in the history
Added speclist; Added logger; New offsets system; Bugfix
  • Loading branch information
ByteCorum authored Sep 11, 2024
2 parents 617a43c + 609e6e4 commit 71a93e0
Show file tree
Hide file tree
Showing 35 changed files with 569 additions and 702 deletions.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
22 changes: 11 additions & 11 deletions DragonBurn/Config/ConfigMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,28 +39,28 @@ namespace ConfigMenu {
float ComponentWidth = ImGui::GetColumnWidth() - ImGui::GetStyle().ItemSpacing.x - CursorX * 2;

ImGui::SetCursorPos(ImVec2(15.f, 24.f));
ImGui::SeparatorText(Lang::ConfigText.FeatureName);
ImGui::SeparatorText(Text::Config::FeatureName.c_str());

ImGui::SetCursorPosX(CurrentCursorX + CursorX);
ImGui::TextDisabled(Lang::ConfigText.MyConfigs);
ImGui::TextDisabled(Text::Config::MyConfigs.c_str());
ImGui::SetCursorPosX(CurrentCursorX + CursorX);
ImGui::SetNextItemWidth(ComponentWidth);
ImGui::ListBox("##ConfigFiles", &selectedConfig, configFilesCStr.data(), configFilesCStr.size());
ImGui::SetCursorPosX(CurrentCursorX + CursorX);
if (ImGui::Button(Lang::ConfigText.Load, { 120.f, 30.f }) && selectedConfig >= 0 && selectedConfig < configFiles.size())
if (ImGui::Button(Text::Config::Load.c_str(), { 120.f, 30.f }) && selectedConfig >= 0 && selectedConfig < configFiles.size())
{
std::string selectedConfigFile = configFiles[selectedConfig];
MyConfigSaver::LoadConfig(selectedConfigFile);
}
ImGui::SameLine();
if (ImGui::Button(Lang::ConfigText.Save, { 120.f, 30.f }) && selectedConfig >= 0 && selectedConfig < configFiles.size())
if (ImGui::Button(Text::Config::Save.c_str(), { 120.f, 30.f }) && selectedConfig >= 0 && selectedConfig < configFiles.size())
{
std::string selectedConfigFile = configFiles[selectedConfig];
MyConfigSaver::SaveConfig(selectedConfigFile);
}

ImGui::SetCursorPosX(CurrentCursorX + CursorX);
if (ImGui::Button(Lang::ConfigText.Delete, { 120.f, 30.f }) && selectedConfig >= 0 && selectedConfig < configFiles.size())
if (ImGui::Button(Text::Config::Delete.c_str(), { 120.f, 30.f }) && selectedConfig >= 0 && selectedConfig < configFiles.size())
ImGui::OpenPopup("##reallyDelete");
if (ImGui::BeginPopup("##reallyDelete"))
{
Expand All @@ -85,7 +85,7 @@ namespace ConfigMenu {
ImGui::EndPopup();
}
ImGui::SameLine();
if (ImGui::Button(Lang::ConfigText.Reset, { 120.f, 30.f }))
if (ImGui::Button(Text::Config::Reset.c_str(), { 120.f, 30.f }))
ImGui::OpenPopup("##reallyReset");
if (ImGui::BeginPopup("##reallyReset"))
{
Expand All @@ -106,21 +106,21 @@ namespace ConfigMenu {
ImGui::NextColumn();
CurrentCursorX = ImGui::GetCursorPosX();
ImGui::SetCursorPos(ImVec2(CurrentCursorX + CursorX, 24.f));
ImGui::SeparatorText(Lang::ConfigText.SeparateLine);
ImGui::TextDisabled(Lang::ConfigText.ConfigName);
ImGui::SeparatorText(Text::Config::SeparateLine.c_str());
ImGui::TextDisabled(Text::Config::ConfigName.c_str());
ImGui::SetNextItemWidth(ComponentWidth + 8);
ImGui::InputText("###ConfigNameInput", configNameBuffer, sizeof(configNameBuffer));
ImGui::TextDisabled(Lang::ConfigText.AuthorName);
ImGui::TextDisabled(Text::Config::AuthorName.c_str());
ImGui::SetNextItemWidth(ComponentWidth + 8);
ImGui::InputText("###AuthorNameInput", configAuthorBuffer, sizeof(configAuthorBuffer));
ImGui::NewLine();
if (ImGui::Button(Lang::ConfigText.Create, { 120.f, 30.f }))
if (ImGui::Button(Text::Config::Create.c_str(), { 120.f, 30.f }))
{
std::string configFileName = std::string(configNameBuffer) + ".cfg";
MyConfigSaver::SaveConfig(configFileName, std::string(configAuthorBuffer));
}
ImGui::SameLine();
if (ImGui::Button(Lang::ConfigText.OpenFolder, { 120.f, 30.f }))
if (ImGui::Button(Text::Config::OpenFolder.c_str(), { 120.f, 30.f }))
{
Gui.OpenWebpage(configDir.c_str());
}
Expand Down
4 changes: 2 additions & 2 deletions DragonBurn/Config/ConfigSaver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ namespace MyConfigSaver

json ConfigData;

ConfigData["0"]["Name"] = "DragonBurn";
ConfigData["0"]["Version"] = "1.0.5.2";
ConfigData["0"]["Name"] = MenuConfig::name;
ConfigData["0"]["Version"] = MenuConfig::version;
ConfigData["0"]["Author"] = author;


Expand Down
3 changes: 2 additions & 1 deletion DragonBurn/Config/MenuConfig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

namespace MenuConfig
{
inline std::string version = "1.0.5.2";
inline std::string name = "DragonBurn";
inline std::string version = "1.1.0.0";
inline std::string author = "ByteCorum";

inline std::string path = "";
Expand Down
11 changes: 5 additions & 6 deletions DragonBurn/Core/Cheats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ void Visual(const CEntity&);
void Radar(Base_Radar, const CEntity&);
void Trigger(const CEntity&);
void AIM(const CEntity&, std::vector<Vec3>);
void MiscFuncs(const CEntity&);
void MiscFuncs(CEntity&);

void Cheats::Run()
{
Expand Down Expand Up @@ -224,16 +224,15 @@ void Visual(const CEntity& LocalEntity)
// HeadShoot Line
Render::HeadShootLine(LocalEntity, MiscCFG::HeadShootLineColor);

// CrossHair
TriggerBot::TargetCheck(LocalEntity);
Misc::AirCheck(LocalEntity);

RenderCrosshair(ImGui::GetBackgroundDrawList(), LocalEntity);
}

void Radar(Base_Radar Radar, const CEntity& LocalEntity)
{
// Radar render
if (RadarCFG::ShowRadar && LocalEntity.Controller.TeamID != 0)
if ((RadarCFG::ShowRadar && LocalEntity.Controller.TeamID != 0) || (RadarCFG::ShowRadar && MenuConfig::ShowMenu))
{
Radar.Render();
ImGui::End();
Expand Down Expand Up @@ -271,7 +270,7 @@ void AIM(const CEntity& LocalEntity, std::vector<Vec3> AimPosList)
RCS::RecoilControl(LocalEntity);
}

void MiscFuncs(const CEntity& LocalEntity)
void MiscFuncs(CEntity& LocalEntity)
{
Misc::HitManager(LocalEntity, PreviousTotalHits);
Misc::BunnyHop(LocalEntity);
Expand Down Expand Up @@ -323,7 +322,7 @@ void RenderCrosshair(ImDrawList* drawList, const CEntity& LocalEntity)
bool isScoped;
ProcessMgr.ReadMemory<bool>(LocalEntity.Pawn.Address + Offset.Pawn.isScoped, isScoped);

if (!MiscCFG::SniperCrosshair || LocalEntity.Controller.TeamID == 0 || !TriggerBot::CheckScopeWeapon(LocalEntity) || isScoped)
if (!MiscCFG::SniperCrosshair || LocalEntity.Controller.TeamID == 0 || !TriggerBot::CheckScopeWeapon(LocalEntity) || isScoped || MenuConfig::ShowMenu)
return;

Render::DrawCrossHair(drawList, ImVec2(ImGui::GetIO().DisplaySize.x / 2, ImGui::GetIO().DisplaySize.y / 2), MiscCFG::SniperCrosshairColor);
Expand Down
Loading

0 comments on commit 71a93e0

Please sign in to comment.