Compare commits
No commits in common. "main" and "v1.0.0-beta.2" have entirely different histories.
main
...
v1.0.0-bet
48 changed files with 1282 additions and 50727 deletions
83
.gitignore
vendored
83
.gitignore
vendored
|
|
@ -37,86 +37,5 @@
|
||||||
*.out
|
*.out
|
||||||
*.app
|
*.app
|
||||||
|
|
||||||
# Debug information files
|
# debug information files
|
||||||
*.dwo
|
*.dwo
|
||||||
|
|
||||||
# Visual Studio specific files
|
|
||||||
.vs/
|
|
||||||
*.suo
|
|
||||||
*.user
|
|
||||||
*.userosscache
|
|
||||||
*.sln.docstates
|
|
||||||
*.vsidx
|
|
||||||
*.vspscc
|
|
||||||
*.vssscc
|
|
||||||
.builds/
|
|
||||||
*.pidb
|
|
||||||
*.svclog
|
|
||||||
*.scc
|
|
||||||
|
|
||||||
# Visual Studio additional files
|
|
||||||
*.vcxproj.user
|
|
||||||
*.sdf
|
|
||||||
*.opensdf
|
|
||||||
*.db
|
|
||||||
*.opendb
|
|
||||||
*.idb
|
|
||||||
*.exp
|
|
||||||
|
|
||||||
# Build folders
|
|
||||||
[Dd]ebug/
|
|
||||||
[Dd]ebugPublic/
|
|
||||||
[Rr]elease/
|
|
||||||
[Rr]eleases/
|
|
||||||
x64/
|
|
||||||
x86/
|
|
||||||
build/
|
|
||||||
bld/
|
|
||||||
[Bb]in/
|
|
||||||
[Oo]bj/
|
|
||||||
[Ll]og/
|
|
||||||
|
|
||||||
# MSBuild
|
|
||||||
*.log
|
|
||||||
*.wrn
|
|
||||||
*.err
|
|
||||||
*.unsuccessfulbuild
|
|
||||||
*.lastbuildstate
|
|
||||||
*.command.*
|
|
||||||
*.read.*
|
|
||||||
*.write.*
|
|
||||||
link-*
|
|
||||||
|
|
||||||
# Backup files
|
|
||||||
*.bak
|
|
||||||
*~
|
|
||||||
|
|
||||||
# OS generated files
|
|
||||||
.DS_Store
|
|
||||||
.DS_Store?
|
|
||||||
._*
|
|
||||||
.Spotlight-V100
|
|
||||||
.Trashes
|
|
||||||
ehthumbs.db
|
|
||||||
Thumbs.db
|
|
||||||
|
|
||||||
# Temporary files
|
|
||||||
*.tmp
|
|
||||||
*.temp
|
|
||||||
|
|
||||||
# IDE files
|
|
||||||
*.swp
|
|
||||||
*.swo
|
|
||||||
|
|
||||||
# Package files (vcpkg, NuGet)
|
|
||||||
packages/
|
|
||||||
vcpkg_installed/
|
|
||||||
|
|
||||||
# Visual Studio Code
|
|
||||||
.vscode/
|
|
||||||
|
|
||||||
# JetBrains IDEs
|
|
||||||
.idea/
|
|
||||||
|
|
||||||
# Resource compiled files
|
|
||||||
*.aps
|
|
||||||
|
|
@ -1,427 +0,0 @@
|
||||||
#include <Windows.h>
|
|
||||||
#include <string>
|
|
||||||
#include "AutomationLogic.h"
|
|
||||||
#include "../Common/Globals.h"
|
|
||||||
#include "../Common/MenuSequences.h"
|
|
||||||
#include "CoordinateUtils.h"
|
|
||||||
|
|
||||||
bool AutomationLogic::ShouldSkipBoonStep(int stepIndex) {
|
|
||||||
MenuOption step = MenuSequences::BOON_SEQUENCE[stepIndex];
|
|
||||||
|
|
||||||
if (g_state.isQuickDps && step == BOON_QUICKNESS) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (g_state.isAlacDps && step == BOON_ALACRITY) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (g_state.showBoonAdvanced && g_state.skipAegis && step == BOON_AEGIS) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool AutomationLogic::ShouldSkipGolemStep(int stepIndex) {
|
|
||||||
if (!g_state.showAdvanced) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
MenuOption step = MenuSequences::GOLEM_SEQUENCE[stepIndex];
|
|
||||||
|
|
||||||
if (g_state.skipBurning && step == GOLEM_BURNING) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (g_state.skipConfusion && step == GOLEM_CONFUSION) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (g_state.skipSlow && step == GOLEM_SLOW) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
void AutomationLogic::ApplyHealerBoons() {
|
|
||||||
if (!g_api || !g_state.enabled) return;
|
|
||||||
|
|
||||||
bool uiWasVisible = g_state.showUI;
|
|
||||||
if (uiWasVisible) {
|
|
||||||
g_state.showUI = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string mode = "Healer Bench - ";
|
|
||||||
if (g_state.isQuickDps) {
|
|
||||||
mode += "Quick DPS";
|
|
||||||
}
|
|
||||||
else if (g_state.isAlacDps) {
|
|
||||||
mode += "Alac DPS";
|
|
||||||
}
|
|
||||||
|
|
||||||
mode += " + Environment ";
|
|
||||||
switch (g_state.envDamageLevel) {
|
|
||||||
case ENV_MILD: mode += "Mild"; break;
|
|
||||||
case ENV_MODERATE: mode += "Moderate"; break;
|
|
||||||
case ENV_EXTREME: mode += "Extreme"; break;
|
|
||||||
}
|
|
||||||
|
|
||||||
char startBuffer[400];
|
|
||||||
sprintf_s(startBuffer, "Starting healer boon sequence - Mode: %s", mode.c_str());
|
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", startBuffer);
|
|
||||||
|
|
||||||
try {
|
|
||||||
g_api->GameBinds.InvokeAsync(EGameBinds_MiscInteract, 50);
|
|
||||||
Sleep(g_state.initialDelay);
|
|
||||||
|
|
||||||
bool alacrityCounted = false;
|
|
||||||
for (int i = 0; i < MenuSequences::HEALER_QUICK_LENGTH; i++) {
|
|
||||||
MenuOption step = MenuSequences::HEALER_QUICK_SEQUENCE[i];
|
|
||||||
|
|
||||||
if (g_state.isAlacDps && step == BOON_ALACRITY) {
|
|
||||||
if (!alacrityCounted) {
|
|
||||||
auto quicknessCoord = g_coords.coords.find(BOON_QUICKNESS);
|
|
||||||
if (quicknessCoord != g_coords.coords.end()) {
|
|
||||||
CoordinateUtils::ClickAtScaled(
|
|
||||||
quicknessCoord->second.first,
|
|
||||||
quicknessCoord->second.second,
|
|
||||||
g_state.stepDelay
|
|
||||||
);
|
|
||||||
}
|
|
||||||
alacrityCounted = true;
|
|
||||||
}
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto coordIt = g_coords.coords.find(step);
|
|
||||||
if (coordIt != g_coords.coords.end()) {
|
|
||||||
CoordinateUtils::ClickAtScaled(
|
|
||||||
coordIt->second.first,
|
|
||||||
coordIt->second.second,
|
|
||||||
g_state.stepDelay
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MenuOption envDamageOption;
|
|
||||||
switch (g_state.envDamageLevel) {
|
|
||||||
case ENV_MILD: envDamageOption = BOON_ENV_MILD; break;
|
|
||||||
case ENV_MODERATE: envDamageOption = BOON_ENV_MODERATE; break;
|
|
||||||
case ENV_EXTREME: envDamageOption = BOON_ENV_EXTREME; break;
|
|
||||||
default: envDamageOption = BOON_ENV_MILD; break;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto envCoord = g_coords.coords.find(envDamageOption);
|
|
||||||
if (envCoord != g_coords.coords.end()) {
|
|
||||||
CoordinateUtils::ClickAtScaled(envCoord->second.first, envCoord->second.second, 50);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (...) {
|
|
||||||
g_api->Log(ELogLevel_WARNING, "GolemHelper", "Exception during healer boon sequence");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (uiWasVisible) {
|
|
||||||
g_state.showUI = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", "Healer boon sequence completed!");
|
|
||||||
}
|
|
||||||
|
|
||||||
void AutomationLogic::ApplyBoons() {
|
|
||||||
if (!g_api || !g_state.enabled) return;
|
|
||||||
|
|
||||||
if (g_state.environmentDamage) {
|
|
||||||
ApplyHealerBoons();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool uiWasVisible = g_state.showUI;
|
|
||||||
if (uiWasVisible) {
|
|
||||||
g_state.showUI = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string mode = "Normal";
|
|
||||||
if (g_state.isQuickDps) {
|
|
||||||
mode = "Quick DPS";
|
|
||||||
}
|
|
||||||
else if (g_state.isAlacDps) {
|
|
||||||
mode = "Alac DPS";
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string advancedBoons = "";
|
|
||||||
if (g_state.showBoonAdvanced && (g_state.addResistance || g_state.addStability || g_state.skipAegis)) {
|
|
||||||
advancedBoons = " + ";
|
|
||||||
if (g_state.addResistance) advancedBoons += "Resistance ";
|
|
||||||
if (g_state.addStability) advancedBoons += "Stability ";
|
|
||||||
if (g_state.skipAegis) advancedBoons += "Skip Aegis ";
|
|
||||||
advancedBoons.pop_back();
|
|
||||||
}
|
|
||||||
|
|
||||||
char startBuffer[300];
|
|
||||||
sprintf_s(startBuffer, "Starting boon sequence (20 steps) - Mode: %s%s", mode.c_str(), advancedBoons.c_str());
|
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", startBuffer);
|
|
||||||
|
|
||||||
try {
|
|
||||||
g_api->GameBinds.InvokeAsync(EGameBinds_MiscInteract, 50);
|
|
||||||
Sleep(g_state.initialDelay);
|
|
||||||
|
|
||||||
for (int i = 0; i < MenuSequences::BOON_LENGTH; i++) {
|
|
||||||
int stepIndex = i;
|
|
||||||
MenuOption step = MenuSequences::BOON_SEQUENCE[i];
|
|
||||||
auto coordIt = g_coords.coords.find(step);
|
|
||||||
|
|
||||||
if (coordIt == g_coords.coords.end() ||
|
|
||||||
(coordIt->second.first == 0 && coordIt->second.second == 0)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ShouldSkipBoonStep(stepIndex)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (step == BOON_RESOLUTION) {
|
|
||||||
CoordinateUtils::ClickAtScaled(
|
|
||||||
coordIt->second.first,
|
|
||||||
coordIt->second.second,
|
|
||||||
g_state.stepDelay
|
|
||||||
);
|
|
||||||
|
|
||||||
if (g_state.showBoonAdvanced && g_state.addResistance) {
|
|
||||||
auto resistanceCoord = g_coords.coords.find(BOON_RESISTANCE);
|
|
||||||
if (resistanceCoord != g_coords.coords.end()) {
|
|
||||||
CoordinateUtils::ClickAtScaled(
|
|
||||||
resistanceCoord->second.first,
|
|
||||||
resistanceCoord->second.second,
|
|
||||||
g_state.stepDelay
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (g_state.showBoonAdvanced && g_state.addStability) {
|
|
||||||
auto stabilityCoord = g_coords.coords.find(BOON_STABILITY);
|
|
||||||
if (stabilityCoord != g_coords.coords.end()) {
|
|
||||||
CoordinateUtils::ClickAtScaled(
|
|
||||||
stabilityCoord->second.first,
|
|
||||||
stabilityCoord->second.second,
|
|
||||||
g_state.stepDelay
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
int delay = (i == MenuSequences::BOON_LENGTH - 1) ? 50 : g_state.stepDelay;
|
|
||||||
CoordinateUtils::ClickAtScaled(coordIt->second.first, coordIt->second.second, delay);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (...) {
|
|
||||||
g_api->Log(ELogLevel_WARNING, "GolemHelper", "Exception during boon sequence");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (uiWasVisible) {
|
|
||||||
g_state.showUI = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", "Boon sequence completed!");
|
|
||||||
}
|
|
||||||
|
|
||||||
void AutomationLogic::SpawnGolem() {
|
|
||||||
if (!g_api || !g_state.enabled) return;
|
|
||||||
|
|
||||||
bool uiWasVisible = g_state.showUI;
|
|
||||||
if (uiWasVisible) {
|
|
||||||
g_state.showUI = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
const char* hitbox = g_state.hitboxType == HITBOX_SMALL ? "Small Hitbox" :
|
|
||||||
g_state.hitboxType == HITBOX_MEDIUM ? "Medium Hitbox" : "Large Hitbox";
|
|
||||||
|
|
||||||
std::string modifiers = "Normal";
|
|
||||||
if (g_state.showAdvanced && (g_state.skipBurning || g_state.skipConfusion || g_state.skipSlow ||
|
|
||||||
g_state.addImmobilize || g_state.addBlind || g_state.fiveBleedingStacks)) {
|
|
||||||
modifiers = "";
|
|
||||||
if (g_state.skipBurning) modifiers += "Skip Burning ";
|
|
||||||
if (g_state.skipConfusion) modifiers += "Skip Confusion ";
|
|
||||||
if (g_state.skipSlow) modifiers += "Skip Slow ";
|
|
||||||
if (g_state.addImmobilize) modifiers += "Add Immobilize ";
|
|
||||||
if (g_state.addBlind) modifiers += "Add Blind ";
|
|
||||||
if (g_state.fiveBleedingStacks) modifiers += "5 Bleeding ";
|
|
||||||
if (!modifiers.empty()) modifiers.pop_back();
|
|
||||||
}
|
|
||||||
|
|
||||||
char startBuffer[400];
|
|
||||||
sprintf_s(startBuffer, "Starting golem settings sequence (25 steps) - Modifiers: %s, Hitbox: %s", modifiers.c_str(), hitbox);
|
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", startBuffer);
|
|
||||||
|
|
||||||
try {
|
|
||||||
g_api->GameBinds.InvokeAsync(EGameBinds_MiscInteract, 50);
|
|
||||||
Sleep(g_state.initialDelay);
|
|
||||||
|
|
||||||
for (int i = 0; i < MenuSequences::GOLEM_LENGTH; i++) {
|
|
||||||
int stepIndex = i;
|
|
||||||
MenuOption step = MenuSequences::GOLEM_SEQUENCE[i];
|
|
||||||
auto coordIt = g_coords.coords.find(step);
|
|
||||||
|
|
||||||
if (coordIt == g_coords.coords.end() ||
|
|
||||||
(coordIt->second.first == 0 && coordIt->second.second == 0)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ShouldSkipGolemStep(stepIndex)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
int currentX = coordIt->second.first;
|
|
||||||
int currentY = coordIt->second.second;
|
|
||||||
|
|
||||||
if (step == GOLEM_HITBOX_SMALL) {
|
|
||||||
MenuOption hitboxOption;
|
|
||||||
switch (g_state.hitboxType) {
|
|
||||||
case HITBOX_SMALL: hitboxOption = GOLEM_HITBOX_SMALL; break;
|
|
||||||
case HITBOX_MEDIUM: hitboxOption = GOLEM_HITBOX_MEDIUM; break;
|
|
||||||
case HITBOX_LARGE: hitboxOption = GOLEM_HITBOX_LARGE; break;
|
|
||||||
default: hitboxOption = GOLEM_HITBOX_SMALL; break;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto hitboxCoord = g_coords.coords.find(hitboxOption);
|
|
||||||
if (hitboxCoord != g_coords.coords.end()) {
|
|
||||||
currentX = hitboxCoord->second.first;
|
|
||||||
currentY = hitboxCoord->second.second;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int delay = (i == MenuSequences::GOLEM_LENGTH - 1) ? 50 : g_state.stepDelay;
|
|
||||||
|
|
||||||
if (step == GOLEM_CRIPPLE) {
|
|
||||||
CoordinateUtils::ClickAtScaled(currentX, currentY, delay);
|
|
||||||
|
|
||||||
if (g_state.showAdvanced && g_state.addImmobilize) {
|
|
||||||
auto immobilizeCoord = g_coords.coords.find(GOLEM_IMMOBILIZE);
|
|
||||||
if (immobilizeCoord != g_coords.coords.end()) {
|
|
||||||
CoordinateUtils::ClickAtScaled(
|
|
||||||
immobilizeCoord->second.first,
|
|
||||||
immobilizeCoord->second.second,
|
|
||||||
g_state.stepDelay
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (step == GOLEM_COMBATAFFECTINGCONDITIONS) {
|
|
||||||
CoordinateUtils::ClickAtScaled(currentX, currentY, delay);
|
|
||||||
|
|
||||||
if (g_state.showAdvanced && g_state.addBlind) {
|
|
||||||
auto blindCoord = g_coords.coords.find(GOLEM_BLIND);
|
|
||||||
if (blindCoord != g_coords.coords.end()) {
|
|
||||||
CoordinateUtils::ClickAtScaled(
|
|
||||||
blindCoord->second.first,
|
|
||||||
blindCoord->second.second,
|
|
||||||
g_state.stepDelay
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
CoordinateUtils::ClickAtScaled(currentX, currentY, delay);
|
|
||||||
|
|
||||||
if (g_state.showAdvanced && g_state.fiveBleedingStacks && step == GOLEM_BLEEDING) {
|
|
||||||
for (int repeat = 0; repeat < 4; repeat++) {
|
|
||||||
CoordinateUtils::ClickAtScaled(currentX, currentY, g_state.stepDelay);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (...) {
|
|
||||||
g_api->Log(ELogLevel_WARNING, "GolemHelper", "Exception during golem settings sequence");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (uiWasVisible) {
|
|
||||||
g_state.showUI = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", "Golem settings sequence completed (25 steps)!");
|
|
||||||
}
|
|
||||||
|
|
||||||
void AutomationLogic::RespawnGolem() {
|
|
||||||
if (!g_api || !g_state.enabled) return;
|
|
||||||
|
|
||||||
bool uiWasVisible = g_state.showUI;
|
|
||||||
if (uiWasVisible) {
|
|
||||||
g_state.showUI = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", "Starting golem respawn sequence (2 steps)");
|
|
||||||
|
|
||||||
try {
|
|
||||||
g_api->GameBinds.InvokeAsync(EGameBinds_MiscInteract, 50);
|
|
||||||
Sleep(g_state.initialDelay);
|
|
||||||
|
|
||||||
for (int i = 0; i < MenuSequences::GOLEM_RESPAWN_LENGTH; i++) {
|
|
||||||
MenuOption step = MenuSequences::GOLEM_RESPAWN[i];
|
|
||||||
auto coordIt = g_coords.coords.find(step);
|
|
||||||
|
|
||||||
if (coordIt == g_coords.coords.end() ||
|
|
||||||
(coordIt->second.first == 0 && coordIt->second.second == 0)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
int delay = (i == MenuSequences::GOLEM_RESPAWN_LENGTH - 1) ? 50 : g_state.stepDelay;
|
|
||||||
CoordinateUtils::ClickAtScaled(coordIt->second.first, coordIt->second.second, delay);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (...) {
|
|
||||||
g_api->Log(ELogLevel_WARNING, "GolemHelper", "Exception during golem respawn sequence");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (uiWasVisible) {
|
|
||||||
g_state.showUI = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", "Golem respawn sequence completed!");
|
|
||||||
}
|
|
||||||
|
|
||||||
void AutomationLogic::RemoveAndRespawnGolem()
|
|
||||||
{
|
|
||||||
if (!g_api || !g_state.enabled) return;
|
|
||||||
|
|
||||||
bool uiWasVisible = g_state.showUI;
|
|
||||||
if (uiWasVisible) {
|
|
||||||
g_state.showUI = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", "Starting golem remove and respawn sequence (3 steps)");
|
|
||||||
|
|
||||||
try {
|
|
||||||
g_api->GameBinds.InvokeAsync(EGameBinds_MiscInteract, 50);
|
|
||||||
Sleep(g_state.initialDelay);
|
|
||||||
|
|
||||||
for (int i = 0; i < MenuSequences::GOLEM_REMOVE_AND_RESPAWN_LENGTH; i++) {
|
|
||||||
MenuOption step = MenuSequences::GOLEM_REMOVE_AND_RESPAWN[i];
|
|
||||||
auto coordIt = g_coords.coords.find(step);
|
|
||||||
|
|
||||||
if (coordIt == g_coords.coords.end() ||
|
|
||||||
(coordIt->second.first == 0 && coordIt->second.second == 0)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
int delay = (i == MenuSequences::GOLEM_REMOVE_AND_RESPAWN_LENGTH - 1) ? 50 : g_state.stepDelay;
|
|
||||||
CoordinateUtils::ClickAtScaled(coordIt->second.first, coordIt->second.second, delay);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (...) {
|
|
||||||
g_api->Log(ELogLevel_WARNING, "GolemHelper", "Exception during golem remove and respawn sequence");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (uiWasVisible) {
|
|
||||||
g_state.showUI = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", "Golem remove and respawn sequence completed!");
|
|
||||||
}
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
#pragma once
|
|
||||||
|
|
||||||
class AutomationLogic {
|
|
||||||
public:
|
|
||||||
static bool ShouldSkipBoonStep(int stepIndex);
|
|
||||||
static bool ShouldSkipGolemStep(int stepIndex);
|
|
||||||
static void ApplyBoons();
|
|
||||||
static void ApplyHealerBoons();
|
|
||||||
static void SpawnGolem();
|
|
||||||
static void RespawnGolem();
|
|
||||||
static void RemoveAndRespawnGolem();
|
|
||||||
};
|
|
||||||
|
|
@ -1,253 +0,0 @@
|
||||||
#include <Windows.h>
|
|
||||||
#include <string>
|
|
||||||
#include "CoordinateUtils.h"
|
|
||||||
#include "../Common/Globals.h"
|
|
||||||
#include "../Config/ConfigManager.h"
|
|
||||||
|
|
||||||
void CoordinateUtils::GetScaledCoordinates(int baseX, int baseY, int* scaledX, int* scaledY) {
|
|
||||||
if (!g_api) return;
|
|
||||||
|
|
||||||
if (g_state.hasCalibration) {
|
|
||||||
*scaledX = (int)(baseX * g_state.calibratedScaleX);
|
|
||||||
*scaledY = (int)(baseY * g_state.calibratedScaleY);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (g_nexusLink && g_nexusLink->Width > 0 && g_nexusLink->Height > 0) {
|
|
||||||
float uiScale = g_nexusLink->Scaling;
|
|
||||||
float dpiScaleX, dpiScaleY;
|
|
||||||
|
|
||||||
// Ultrawide 5120x1440
|
|
||||||
if (g_nexusLink->Width == 5120 && g_nexusLink->Height == 1440) {
|
|
||||||
if (uiScale >= 0.89f && uiScale <= 0.91f) {
|
|
||||||
dpiScaleX = 2.814f;
|
|
||||||
dpiScaleY = 0.888f;
|
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", "ULTRAWIDE 5120x1440: APPLIED SMALL UI OFFSET");
|
|
||||||
}
|
|
||||||
else if (uiScale >= 1.09f && uiScale <= 1.15f) {
|
|
||||||
dpiScaleX = 2.746f;
|
|
||||||
dpiScaleY = 1.104f;
|
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", "ULTRAWIDE 5120x1440: APPLIED LARGE UI OFFSET");
|
|
||||||
}
|
|
||||||
else if (uiScale >= 1.21f && uiScale <= 1.25f) {
|
|
||||||
dpiScaleX = 2.713f;
|
|
||||||
dpiScaleY = 1.208f;
|
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", "ULTRAWIDE 5120x1440: APPLIED LARGER UI OFFSET");
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
dpiScaleX = 2.779f;
|
|
||||||
dpiScaleY = 1.000f;
|
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", "ULTRAWIDE 5120x1440: APPLIED NORMAL UI OFFSET");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Ultrawide 3440x1440
|
|
||||||
else if (g_nexusLink->Width == 3440 && g_nexusLink->Height == 1440) {
|
|
||||||
if (uiScale >= 0.89f && uiScale <= 0.91f) {
|
|
||||||
dpiScaleX = 1.810f;
|
|
||||||
dpiScaleY = 0.892f;
|
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", "ULTRAWIDE 3440x1440: APPLIED SMALL UI OFFSET");
|
|
||||||
}
|
|
||||||
else if (uiScale >= 1.09f && uiScale <= 1.15f) {
|
|
||||||
dpiScaleX = 1.741f;
|
|
||||||
dpiScaleY = 1.104f;
|
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", "ULTRAWIDE 3440x1440: APPLIED LARGE UI OFFSET");
|
|
||||||
}
|
|
||||||
else if (uiScale >= 1.21f && uiScale <= 1.25f) {
|
|
||||||
dpiScaleX = 1.708f;
|
|
||||||
dpiScaleY = 1.212f;
|
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", "ULTRAWIDE 3440x1440: APPLIED LARGER UI OFFSET");
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
dpiScaleX = 1.773f;
|
|
||||||
dpiScaleY = 0.992f;
|
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", "ULTRAWIDE 3440x1440: APPLIED NORMAL UI OFFSET");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (g_nexusLink->Width == 3840 && g_nexusLink->Height == 2160) {
|
|
||||||
if (uiScale >= 0.89f && uiScale <= 0.91f) {
|
|
||||||
dpiScaleX = 2.052f;
|
|
||||||
dpiScaleY = 0.908f;
|
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", "4K 3840x2160: APPLIED SMALL UI OFFSET");
|
|
||||||
}
|
|
||||||
else if (uiScale >= 1.09f && uiScale <= 1.15f) {
|
|
||||||
dpiScaleX = 1.985f;
|
|
||||||
dpiScaleY = 1.130f;
|
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", "4K 3840x2160: APPLIED LARGE UI OFFSET");
|
|
||||||
}
|
|
||||||
else if (uiScale >= 1.21f && uiScale <= 1.25f) {
|
|
||||||
dpiScaleX = 1.952f;
|
|
||||||
dpiScaleY = 1.233f;
|
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", "4K 3840x2160: APPLIED LARGER UI OFFSET");
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
dpiScaleX = 2.0f;
|
|
||||||
dpiScaleY = 1.0f;
|
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", "4K 3840x2160: APPLIED NORMAL UI OFFSET");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
dpiScaleX = (float)g_nexusLink->Width / 1920.0f;
|
|
||||||
dpiScaleY = 1.0f;
|
|
||||||
|
|
||||||
char normalBuffer[150];
|
|
||||||
sprintf_s(normalBuffer, "NORMAL MONITOR: Width=%d, Height=%d, scaleX=%.3f",
|
|
||||||
g_nexusLink->Width, g_nexusLink->Height, dpiScaleX);
|
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", normalBuffer);
|
|
||||||
}
|
|
||||||
|
|
||||||
int scaledForResolutionX = (int)(baseX * dpiScaleX);
|
|
||||||
int scaledForResolutionY = (int)(baseY * dpiScaleY);
|
|
||||||
|
|
||||||
int finalX = scaledForResolutionX;
|
|
||||||
int finalY = scaledForResolutionY;
|
|
||||||
|
|
||||||
if (!(g_nexusLink->Width == 5120 && g_nexusLink->Height == 1440) &&
|
|
||||||
!(g_nexusLink->Width == 3440 && g_nexusLink->Height == 1440) &&
|
|
||||||
!(g_nexusLink->Width == 3840 && g_nexusLink->Height == 2160)) {
|
|
||||||
if (uiScale >= 0.89f && uiScale <= 0.91f) {
|
|
||||||
finalX = scaledForResolutionX - (int)(scaledForResolutionX * 0.029f);
|
|
||||||
finalY = scaledForResolutionY - (int)(scaledForResolutionY * 0.103f);
|
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", "APPLIED SMALL UI OFFSET");
|
|
||||||
}
|
|
||||||
else if (uiScale >= 1.09f && uiScale <= 1.15f) {
|
|
||||||
finalX = scaledForResolutionX - (int)(scaledForResolutionX * 0.053f);
|
|
||||||
finalY = scaledForResolutionY + (int)(scaledForResolutionY * 0.095f);
|
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", "APPLIED LARGE UI OFFSET");
|
|
||||||
}
|
|
||||||
else if (uiScale >= 1.21f && uiScale <= 1.25f) {
|
|
||||||
finalX = scaledForResolutionX - (int)(scaledForResolutionX * 0.097f);
|
|
||||||
finalY = scaledForResolutionY + (int)(scaledForResolutionY * 0.206f);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
*scaledX = finalX;
|
|
||||||
*scaledY = finalY;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
g_api->Log(ELogLevel_WARNING, "GolemHelper", "GetScaledCoordinates - Nexus data not available");
|
|
||||||
|
|
||||||
int screenWidth = GetSystemMetrics(SM_CXSCREEN);
|
|
||||||
float dpiScale = (float)screenWidth / 1920.0f;
|
|
||||||
|
|
||||||
*scaledX = (int)(baseX * dpiScale);
|
|
||||||
*scaledY = baseY;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void CoordinateUtils::DebugMousePosition() {
|
|
||||||
if (!g_api) return;
|
|
||||||
|
|
||||||
POINT mousePos;
|
|
||||||
GetCursorPos(&mousePos);
|
|
||||||
|
|
||||||
if (g_nexusLink && g_nexusLink->Width > 0 && g_nexusLink->Height > 0) {
|
|
||||||
float uiScale = g_nexusLink->Scaling;
|
|
||||||
float dpiScale = (float)g_nexusLink->Width / 1920.0f;
|
|
||||||
float finalScaleX = uiScale * dpiScale;
|
|
||||||
|
|
||||||
int baseX = (int)(mousePos.x / finalScaleX);
|
|
||||||
int baseY = mousePos.y;
|
|
||||||
|
|
||||||
g_state.debugCounter++;
|
|
||||||
|
|
||||||
char buffer[450];
|
|
||||||
sprintf_s(buffer, "=== DEBUG #%d === Resolution: %dx%d | Mouse: %d,%d | Base coords: %d,%d | Interface Size: %.2f | DPI Scale: %.3f | Final ScaleX: %.3f",
|
|
||||||
g_state.debugCounter, g_nexusLink->Width, g_nexusLink->Height,
|
|
||||||
mousePos.x, mousePos.y, baseX, baseY, uiScale, dpiScale, finalScaleX);
|
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", buffer);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
g_api->Log(ELogLevel_WARNING, "GolemHelper", "Cannot debug - Nexus data not available");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void CoordinateUtils::ClickAtScaled(int baseX, int baseY, int delay) {
|
|
||||||
if (g_mumbleData && !g_mumbleData->Context.IsGameFocused) {
|
|
||||||
if (g_api) {
|
|
||||||
g_api->Log(ELogLevel_WARNING, "GolemHelper", "Sequence stopped - Game lost focus");
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
HWND gameWindow = GetForegroundWindow();
|
|
||||||
if (!gameWindow) return;
|
|
||||||
|
|
||||||
int scaledX, scaledY;
|
|
||||||
GetScaledCoordinates(baseX, baseY, &scaledX, &scaledY);
|
|
||||||
|
|
||||||
LPARAM lParam = MAKELPARAM(scaledX, scaledY);
|
|
||||||
SendMessage(gameWindow, WM_LBUTTONDOWN, MK_LBUTTON, lParam);
|
|
||||||
Sleep(10);
|
|
||||||
SendMessage(gameWindow, WM_LBUTTONUP, 0, lParam);
|
|
||||||
Sleep(delay);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CoordinateUtils::StartCalibration() {
|
|
||||||
g_state.calibrationMode = true;
|
|
||||||
g_state.showUI = false;
|
|
||||||
|
|
||||||
if (g_api) {
|
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper",
|
|
||||||
"Calibration started - interact with the Boon Console and click 'Adjust Self'");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void CoordinateUtils::CaptureCalibrationPoint() {
|
|
||||||
POINT mousePos;
|
|
||||||
GetCursorPos(&mousePos);
|
|
||||||
|
|
||||||
const float REF_BASE_X = 830.0f;
|
|
||||||
const float REF_BASE_Y = 262.0f;
|
|
||||||
|
|
||||||
g_state.calibratedScaleX = mousePos.x / REF_BASE_X;
|
|
||||||
g_state.calibratedScaleY = mousePos.y / REF_BASE_Y;
|
|
||||||
g_state.hasCalibration = true;
|
|
||||||
g_state.calibrationMode = false;
|
|
||||||
|
|
||||||
ConfigManager::SaveCustomDelaySettings();
|
|
||||||
|
|
||||||
if (g_api) {
|
|
||||||
char buffer[256];
|
|
||||||
sprintf_s(buffer,
|
|
||||||
"Calibration saved: click=(%ld, %ld) scaleX=%.4f scaleY=%.4f",
|
|
||||||
mousePos.x, mousePos.y,
|
|
||||||
g_state.calibratedScaleX, g_state.calibratedScaleY);
|
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", buffer);
|
|
||||||
g_api->UI.SendAlert("Calibration saved!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void CoordinateUtils::ResetCalibration() {
|
|
||||||
g_state.hasCalibration = false;
|
|
||||||
g_state.calibrationMode = false;
|
|
||||||
g_state.calibratedScaleX = 1.0f;
|
|
||||||
g_state.calibratedScaleY = 1.0f;
|
|
||||||
|
|
||||||
ConfigManager::SaveCustomDelaySettings();
|
|
||||||
|
|
||||||
if (g_api) {
|
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", "Calibration reset - back to auto-scaling");
|
|
||||||
g_api->UI.SendAlert("Calibration reset to default");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void CoordinateUtils::UpdateCalibrationCapture() {
|
|
||||||
if (!g_state.calibrationMode) return;
|
|
||||||
|
|
||||||
if (GetAsyncKeyState(VK_ESCAPE) & 0x8000) {
|
|
||||||
g_state.calibrationMode = false;
|
|
||||||
if (g_api) g_api->UI.SendAlert("Calibration cancelled");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool s_wasPressed = false;
|
|
||||||
bool isPressed = (GetAsyncKeyState(VK_LBUTTON) & 0x8000) != 0;
|
|
||||||
|
|
||||||
if (isPressed && !s_wasPressed) {
|
|
||||||
if (g_mumbleData && g_mumbleData->Context.IsGameFocused) {
|
|
||||||
CaptureCalibrationPoint();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
s_wasPressed = isPressed;
|
|
||||||
}
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
#pragma once
|
|
||||||
|
|
||||||
class CoordinateUtils {
|
|
||||||
public:
|
|
||||||
static void GetScaledCoordinates(int baseX, int baseY, int* scaledX, int* scaledY);
|
|
||||||
static void DebugMousePosition();
|
|
||||||
static void ClickAtScaled(int baseX, int baseY, int delay = 25);
|
|
||||||
|
|
||||||
static void StartCalibration();
|
|
||||||
static void CaptureCalibrationPoint();
|
|
||||||
static void ResetCalibration();
|
|
||||||
static void UpdateCalibrationCapture();
|
|
||||||
};
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
#include <Windows.h>
|
|
||||||
#include <vector>
|
|
||||||
#include <string>
|
|
||||||
#include "Globals.h"
|
|
||||||
|
|
||||||
AddonAPI* g_api = nullptr;
|
|
||||||
NexusLinkData* g_nexusLink = nullptr;
|
|
||||||
Mumble::Data* g_mumbleData = nullptr;
|
|
||||||
GolemHelperState g_state;
|
|
||||||
MenuCoordinates g_coords;
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
#pragma once
|
|
||||||
#include "Types.h"
|
|
||||||
#include "../Dependencies/nexus/Nexus.h"
|
|
||||||
#include "../Dependencies/mumble/mumble.h"
|
|
||||||
|
|
||||||
extern AddonAPI* g_api;
|
|
||||||
extern NexusLinkData* g_nexusLink;
|
|
||||||
extern Mumble::Data* g_mumbleData;
|
|
||||||
extern GolemHelperState g_state;
|
|
||||||
extern MenuCoordinates g_coords;
|
|
||||||
|
|
@ -1,86 +0,0 @@
|
||||||
#pragma once
|
|
||||||
#include "Types.h"
|
|
||||||
|
|
||||||
class MenuSequences {
|
|
||||||
public:
|
|
||||||
static constexpr MenuOption BOON_SEQUENCE[20] = {
|
|
||||||
BOON_ADJUSTSELF,
|
|
||||||
BOON_ADDBOONS,
|
|
||||||
BOON_OFFENSIVE,
|
|
||||||
BOON_MIGHT,
|
|
||||||
BOON_25MIGHT,
|
|
||||||
BOON_FURY,
|
|
||||||
BOON_RETURN1,
|
|
||||||
BOON_DEFENSIVE,
|
|
||||||
BOON_PROTECTION,
|
|
||||||
BOON_RESOLUTION,
|
|
||||||
BOON_AEGIS,
|
|
||||||
BOON_RETURN2,
|
|
||||||
BOON_UTILITY,
|
|
||||||
BOON_ALACRITY,
|
|
||||||
BOON_QUICKNESS,
|
|
||||||
BOON_REGENERATION,
|
|
||||||
BOON_SWIFTNESS,
|
|
||||||
BOON_VIGOR,
|
|
||||||
BOON_ALACRITY,
|
|
||||||
BOON_EXIT
|
|
||||||
};
|
|
||||||
|
|
||||||
static constexpr MenuOption HEALER_QUICK_SEQUENCE[10] = {
|
|
||||||
BOON_ADJUSTSELF,
|
|
||||||
BOON_ADDBOONS,
|
|
||||||
BOON_UTILITY,
|
|
||||||
BOON_ALACRITY,
|
|
||||||
BOON_ALACRITY,
|
|
||||||
BOON_RETURN3,
|
|
||||||
BOON_RETURN4,
|
|
||||||
BOON_GOBACK,
|
|
||||||
BOON_ADJUSTENVIRONMENT,
|
|
||||||
BOON_TOGGLEPULSINGARENADAMAGEON
|
|
||||||
};
|
|
||||||
|
|
||||||
static constexpr MenuOption GOLEM_SEQUENCE[25] = {
|
|
||||||
GOLEM_SPAWNAGOLEM,
|
|
||||||
GOLEM_HITBOX_SMALL,
|
|
||||||
GOLEM_AVERAGEENEMY,
|
|
||||||
GOLEM_ADDITIONALOPTIONS,
|
|
||||||
GOLEM_ADDCONDITIONS,
|
|
||||||
GOLEM_DAMAGEOVERTIMECONDITIONS,
|
|
||||||
GOLEM_BLEEDING,
|
|
||||||
GOLEM_BURNING,
|
|
||||||
GOLEM_CONFUSION,
|
|
||||||
GOLEM_POISON,
|
|
||||||
GOLEM_TORMENT,
|
|
||||||
GOLEM_GOBACK1,
|
|
||||||
GOLEM_MOBILITYAFFECTINGCONDITIONS,
|
|
||||||
GOLEM_CHILL,
|
|
||||||
GOLEM_CRIPPLE,
|
|
||||||
GOLEM_GOBACK2,
|
|
||||||
GOLEM_COMBATAFFECTINGCONDITIONS,
|
|
||||||
GOLEM_SLOW,
|
|
||||||
GOLEM_VULNERABILITY,
|
|
||||||
GOLEM_25VULNERABILITY,
|
|
||||||
GOLEM_GOBACK3,
|
|
||||||
GOLEM_WEAKNESS,
|
|
||||||
GOLEM_GOBACK4,
|
|
||||||
GOLEM_GOBACK5,
|
|
||||||
GOLEM_PLEASESPAWNMYGOLEM
|
|
||||||
};
|
|
||||||
|
|
||||||
static constexpr MenuOption GOLEM_RESPAWN[2] = {
|
|
||||||
GOLEM_RESPAWNMYPREVIOUSGOLEMINCARNATION,
|
|
||||||
GOLEM_EXIT
|
|
||||||
};
|
|
||||||
|
|
||||||
static constexpr MenuOption GOLEM_REMOVE_AND_RESPAWN[3] = {
|
|
||||||
GOLEM_REMOVEGOLEM,
|
|
||||||
GOLEM_RESPAWNMYPREVIOUSGOLEMINCARNATION,
|
|
||||||
GOLEM_EXIT
|
|
||||||
};
|
|
||||||
|
|
||||||
static constexpr int BOON_LENGTH = 20;
|
|
||||||
static constexpr int HEALER_QUICK_LENGTH = 10;
|
|
||||||
static constexpr int GOLEM_LENGTH = 25;
|
|
||||||
static constexpr int GOLEM_RESPAWN_LENGTH = 2;
|
|
||||||
static constexpr int GOLEM_REMOVE_AND_RESPAWN_LENGTH = 3;
|
|
||||||
};
|
|
||||||
|
|
@ -1,239 +0,0 @@
|
||||||
#pragma once
|
|
||||||
#include "../Dependencies/mumble/mumble.h"
|
|
||||||
#include <vector>
|
|
||||||
#include <string>
|
|
||||||
#include <map>
|
|
||||||
|
|
||||||
enum HitboxType {
|
|
||||||
HITBOX_SMALL = 0,
|
|
||||||
HITBOX_MEDIUM = 1,
|
|
||||||
HITBOX_LARGE = 2
|
|
||||||
};
|
|
||||||
|
|
||||||
enum EnvironmentDamageLevel {
|
|
||||||
ENV_MILD = 0,
|
|
||||||
ENV_MODERATE = 1,
|
|
||||||
ENV_EXTREME = 2
|
|
||||||
};
|
|
||||||
|
|
||||||
enum MenuOption {
|
|
||||||
// === BOON MENU ===
|
|
||||||
BOON_ADJUSTSELF,
|
|
||||||
BOON_ADDBOONS,
|
|
||||||
BOON_OFFENSIVE,
|
|
||||||
BOON_MIGHT,
|
|
||||||
BOON_25MIGHT,
|
|
||||||
BOON_FURY,
|
|
||||||
BOON_RETURN1,
|
|
||||||
BOON_DEFENSIVE,
|
|
||||||
BOON_PROTECTION,
|
|
||||||
BOON_RESOLUTION,
|
|
||||||
BOON_RESISTANCE,
|
|
||||||
BOON_STABILITY,
|
|
||||||
BOON_AEGIS,
|
|
||||||
BOON_RETURN2,
|
|
||||||
BOON_UTILITY,
|
|
||||||
BOON_ALACRITY,
|
|
||||||
BOON_QUICKNESS,
|
|
||||||
BOON_REGENERATION,
|
|
||||||
BOON_SWIFTNESS,
|
|
||||||
BOON_VIGOR,
|
|
||||||
BOON_EXIT,
|
|
||||||
|
|
||||||
// === HEALER EXTENSIONS ===
|
|
||||||
BOON_RETURN3,
|
|
||||||
BOON_RETURN4,
|
|
||||||
BOON_GOBACK,
|
|
||||||
BOON_ADJUSTENVIRONMENT,
|
|
||||||
BOON_TOGGLEPULSINGARENADAMAGEON,
|
|
||||||
BOON_ENV_MILD,
|
|
||||||
BOON_ENV_MODERATE,
|
|
||||||
BOON_ENV_EXTREME,
|
|
||||||
|
|
||||||
// === GOLEM MENU ===
|
|
||||||
GOLEM_RESPAWNMYPREVIOUSGOLEMINCARNATION,
|
|
||||||
GOLEM_REMOVEGOLEM,
|
|
||||||
GOLEM_SPAWNAGOLEM,
|
|
||||||
GOLEM_HITBOX_SMALL,
|
|
||||||
GOLEM_HITBOX_MEDIUM,
|
|
||||||
GOLEM_HITBOX_LARGE,
|
|
||||||
GOLEM_AVERAGEENEMY,
|
|
||||||
GOLEM_ADDITIONALOPTIONS,
|
|
||||||
GOLEM_ADDCONDITIONS,
|
|
||||||
GOLEM_DAMAGEOVERTIMECONDITIONS,
|
|
||||||
GOLEM_BLEEDING,
|
|
||||||
GOLEM_BURNING,
|
|
||||||
GOLEM_CONFUSION,
|
|
||||||
GOLEM_POISON,
|
|
||||||
GOLEM_TORMENT,
|
|
||||||
GOLEM_GOBACK1,
|
|
||||||
GOLEM_MOBILITYAFFECTINGCONDITIONS,
|
|
||||||
GOLEM_CHILL,
|
|
||||||
GOLEM_CRIPPLE,
|
|
||||||
GOLEM_IMMOBILIZE,
|
|
||||||
GOLEM_GOBACK2,
|
|
||||||
GOLEM_COMBATAFFECTINGCONDITIONS,
|
|
||||||
GOLEM_BLIND,
|
|
||||||
GOLEM_SLOW,
|
|
||||||
GOLEM_VULNERABILITY,
|
|
||||||
GOLEM_25VULNERABILITY,
|
|
||||||
GOLEM_GOBACK3,
|
|
||||||
GOLEM_WEAKNESS,
|
|
||||||
GOLEM_GOBACK4,
|
|
||||||
GOLEM_GOBACK5,
|
|
||||||
GOLEM_PLEASESPAWNMYGOLEM,
|
|
||||||
GOLEM_EXIT
|
|
||||||
};
|
|
||||||
|
|
||||||
struct GolemTemplate {
|
|
||||||
std::string name;
|
|
||||||
bool isQuickDps;
|
|
||||||
bool isAlacDps;
|
|
||||||
bool environmentDamage;
|
|
||||||
EnvironmentDamageLevel envDamageLevel;
|
|
||||||
bool skipBurning;
|
|
||||||
bool skipConfusion;
|
|
||||||
bool skipSlow;
|
|
||||||
bool addImmobilize;
|
|
||||||
bool addBlind;
|
|
||||||
bool fiveBleedingStacks;
|
|
||||||
HitboxType hitboxType;
|
|
||||||
bool isDefaultTemplate;
|
|
||||||
bool addResistance;
|
|
||||||
bool addStability;
|
|
||||||
bool skipAegis;
|
|
||||||
|
|
||||||
GolemTemplate() :
|
|
||||||
name("Unnamed Template"),
|
|
||||||
isQuickDps(false),
|
|
||||||
isAlacDps(false),
|
|
||||||
environmentDamage(false),
|
|
||||||
envDamageLevel(ENV_MILD),
|
|
||||||
skipBurning(false),
|
|
||||||
skipConfusion(false),
|
|
||||||
skipSlow(false),
|
|
||||||
addImmobilize(false),
|
|
||||||
addBlind(false),
|
|
||||||
fiveBleedingStacks(false),
|
|
||||||
hitboxType(HITBOX_SMALL),
|
|
||||||
isDefaultTemplate(false),
|
|
||||||
addResistance(false),
|
|
||||||
addStability(false),
|
|
||||||
skipAegis(false) {
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
struct GolemHelperState {
|
|
||||||
bool enabled = false;
|
|
||||||
bool isQuickDps = false;
|
|
||||||
bool isAlacDps = false;
|
|
||||||
bool environmentDamage = false;
|
|
||||||
EnvironmentDamageLevel envDamageLevel = ENV_MILD;
|
|
||||||
bool skipBurning = false;
|
|
||||||
bool skipConfusion = false;
|
|
||||||
bool skipSlow = false;
|
|
||||||
bool addImmobilize = false;
|
|
||||||
bool addBlind = false;
|
|
||||||
bool fiveBleedingStacks = false;
|
|
||||||
HitboxType hitboxType = HITBOX_SMALL;
|
|
||||||
bool debugMode = false;
|
|
||||||
bool showUI = false;
|
|
||||||
bool showAdvanced = false;
|
|
||||||
bool showTimingSettings = false;
|
|
||||||
bool showBoonAdvanced = false;
|
|
||||||
bool addResistance = false;
|
|
||||||
bool addStability = false;
|
|
||||||
bool skipAegis = false;
|
|
||||||
bool alwaysHideIcon = false;
|
|
||||||
bool autoShowHideUI = false;
|
|
||||||
bool alwaysLoadLastSettings = false;
|
|
||||||
int debugCounter = 0;
|
|
||||||
|
|
||||||
int initialDelay = 390;
|
|
||||||
int stepDelay = 290;
|
|
||||||
|
|
||||||
bool quickAccessVisible = false;
|
|
||||||
unsigned int lastMapID = 0;
|
|
||||||
|
|
||||||
// Calibration
|
|
||||||
bool calibrationMode = false;
|
|
||||||
bool hasCalibration = false;
|
|
||||||
float calibratedScaleX = 1.0f;
|
|
||||||
float calibratedScaleY = 1.0f;
|
|
||||||
|
|
||||||
std::vector<GolemTemplate> templates;
|
|
||||||
int selectedTemplateIndex = -1;
|
|
||||||
int lastUserTemplateIndex = -1;
|
|
||||||
char newTemplateName[64] = "";
|
|
||||||
};
|
|
||||||
|
|
||||||
struct MenuCoordinates {
|
|
||||||
std::map<MenuOption, std::pair<int, int>> coords = {
|
|
||||||
// === BOON MENU ===
|
|
||||||
{BOON_ADJUSTSELF, {830, 262}},
|
|
||||||
{BOON_ADDBOONS, {830, 354}},
|
|
||||||
{BOON_OFFENSIVE, {830, 262}},
|
|
||||||
{BOON_MIGHT, {830, 262}},
|
|
||||||
{BOON_25MIGHT, {830, 400}},
|
|
||||||
{BOON_FURY, {830, 305}},
|
|
||||||
{BOON_RETURN1, {830, 354}},
|
|
||||||
{BOON_DEFENSIVE, {830, 305}},
|
|
||||||
{BOON_PROTECTION, {830, 262}},
|
|
||||||
{BOON_RESOLUTION, {830, 305}},
|
|
||||||
{BOON_RESISTANCE, {830, 354}},
|
|
||||||
{BOON_STABILITY, {830, 400}},
|
|
||||||
{BOON_AEGIS, {830, 450}},
|
|
||||||
{BOON_RETURN2, {830, 500}},
|
|
||||||
{BOON_UTILITY, {830, 354}},
|
|
||||||
{BOON_ALACRITY, {830, 262}},
|
|
||||||
{BOON_QUICKNESS, {830, 305}},
|
|
||||||
{BOON_REGENERATION, {830, 354}},
|
|
||||||
{BOON_SWIFTNESS, {830, 400}},
|
|
||||||
{BOON_VIGOR, {830, 450}},
|
|
||||||
{BOON_EXIT, {830, 550}},
|
|
||||||
|
|
||||||
// === HEALER EXTENSIONS ===
|
|
||||||
{BOON_RETURN3, {830, 500}},
|
|
||||||
{BOON_RETURN4, {830, 450}},
|
|
||||||
{BOON_GOBACK, {830, 450}},
|
|
||||||
{BOON_ADJUSTENVIRONMENT, {830, 305}},
|
|
||||||
{BOON_TOGGLEPULSINGARENADAMAGEON, {830, 262}},
|
|
||||||
{BOON_ENV_MILD, {830, 352}},
|
|
||||||
{BOON_ENV_MODERATE, {830, 305}},
|
|
||||||
{BOON_ENV_EXTREME, {830, 262}},
|
|
||||||
|
|
||||||
// === GOLEM MENU ===
|
|
||||||
{GOLEM_RESPAWNMYPREVIOUSGOLEMINCARNATION, {830, 352}},
|
|
||||||
{GOLEM_REMOVEGOLEM, {830, 306}},
|
|
||||||
{GOLEM_SPAWNAGOLEM, {830, 260}},
|
|
||||||
{GOLEM_HITBOX_SMALL, {830, 260}},
|
|
||||||
{GOLEM_HITBOX_MEDIUM, {830, 305}},
|
|
||||||
{GOLEM_HITBOX_LARGE, {830, 352}},
|
|
||||||
{GOLEM_AVERAGEENEMY, {830, 306}},
|
|
||||||
{GOLEM_ADDITIONALOPTIONS, {830, 257}},
|
|
||||||
{GOLEM_ADDCONDITIONS, {830, 257}},
|
|
||||||
{GOLEM_DAMAGEOVERTIMECONDITIONS, {830, 306}},
|
|
||||||
{GOLEM_BLEEDING, {830, 257}},
|
|
||||||
{GOLEM_BURNING, {830, 306}},
|
|
||||||
{GOLEM_CONFUSION, {830, 352}},
|
|
||||||
{GOLEM_POISON, {830, 400}},
|
|
||||||
{GOLEM_TORMENT, {830, 454}},
|
|
||||||
{GOLEM_GOBACK1, {830, 508}},
|
|
||||||
{GOLEM_MOBILITYAFFECTINGCONDITIONS, {830, 352}},
|
|
||||||
{GOLEM_CHILL, {830, 257}},
|
|
||||||
{GOLEM_CRIPPLE, {830, 306}},
|
|
||||||
{GOLEM_IMMOBILIZE, {830, 400}},
|
|
||||||
{GOLEM_GOBACK2, {830, 454}},
|
|
||||||
{GOLEM_COMBATAFFECTINGCONDITIONS, {830, 400}},
|
|
||||||
{GOLEM_BLIND, {830, 260}},
|
|
||||||
{GOLEM_SLOW, {830, 306}},
|
|
||||||
{GOLEM_VULNERABILITY, {830, 352}},
|
|
||||||
{GOLEM_25VULNERABILITY, {830, 400}},
|
|
||||||
{GOLEM_GOBACK3, {830, 454}},
|
|
||||||
{GOLEM_WEAKNESS, {830, 400}},
|
|
||||||
{GOLEM_GOBACK4, {830, 454}},
|
|
||||||
{GOLEM_GOBACK5, {830, 454}},
|
|
||||||
{GOLEM_PLEASESPAWNMYGOLEM, {830, 548}},
|
|
||||||
{GOLEM_EXIT, {830, 400}},
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
@ -1,213 +0,0 @@
|
||||||
#include <Windows.h>
|
|
||||||
#include <string>
|
|
||||||
#include <fstream>
|
|
||||||
#include <sstream>
|
|
||||||
#include "ConfigManager.h"
|
|
||||||
#include "../Common/Globals.h"
|
|
||||||
#include "../Utils/FileUtils.h"
|
|
||||||
|
|
||||||
void ConfigManager::SaveCustomDelaySettings() {
|
|
||||||
if (!g_api) return;
|
|
||||||
|
|
||||||
std::string configPath = FileUtils::GetConfigFilePath();
|
|
||||||
|
|
||||||
try {
|
|
||||||
std::ofstream configFile(configPath);
|
|
||||||
if (!configFile.is_open()) {
|
|
||||||
g_api->Log(ELogLevel_WARNING, "GolemHelper", "Could not create config file");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
configFile << "[GolemHelper]" << std::endl;
|
|
||||||
configFile << "initialDelay=" << g_state.initialDelay << std::endl;
|
|
||||||
configFile << "stepDelay=" << g_state.stepDelay << std::endl;
|
|
||||||
configFile << "alwaysHideIcon=" << (g_state.alwaysHideIcon ? "1" : "0") << std::endl;
|
|
||||||
configFile << "autoShowHideUI=" << (g_state.autoShowHideUI ? "1" : "0") << std::endl;
|
|
||||||
configFile << "alwaysLoadLastSettings=" << (g_state.alwaysLoadLastSettings ? "1" : "0") << std::endl;
|
|
||||||
configFile << "hasCalibration=" << (g_state.hasCalibration ? "1" : "0") << std::endl;
|
|
||||||
configFile << "calibratedScaleX=" << g_state.calibratedScaleX << std::endl;
|
|
||||||
configFile << "calibratedScaleY=" << g_state.calibratedScaleY << std::endl;
|
|
||||||
|
|
||||||
configFile.close();
|
|
||||||
|
|
||||||
char logBuffer[512];
|
|
||||||
sprintf_s(logBuffer, "Settings saved: initialDelay=%dms, stepDelay=%dms, alwaysHideIcon=%s, autoShowHideUI=%s, alwaysLoadLastSettings=%s",
|
|
||||||
g_state.initialDelay, g_state.stepDelay,
|
|
||||||
g_state.alwaysHideIcon ? "true" : "false",
|
|
||||||
g_state.autoShowHideUI ? "true" : "false",
|
|
||||||
g_state.alwaysLoadLastSettings ? "true" : "false");
|
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", logBuffer);
|
|
||||||
|
|
||||||
}
|
|
||||||
catch (...) {
|
|
||||||
g_api->Log(ELogLevel_WARNING, "GolemHelper", "Failed to save config file");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void ConfigManager::LoadCustomDelaySettings() {
|
|
||||||
if (!g_api) return;
|
|
||||||
|
|
||||||
std::string configPath = FileUtils::GetConfigFilePath();
|
|
||||||
|
|
||||||
try {
|
|
||||||
std::ifstream configFile(configPath);
|
|
||||||
if (!configFile.is_open()) {
|
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", "No config file found, using defaults");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string line;
|
|
||||||
while (std::getline(configFile, line)) {
|
|
||||||
if (line.empty() || line[0] == '[') continue;
|
|
||||||
|
|
||||||
size_t equalPos = line.find('=');
|
|
||||||
if (equalPos == std::string::npos) continue;
|
|
||||||
|
|
||||||
std::string key = line.substr(0, equalPos);
|
|
||||||
std::string value = line.substr(equalPos + 1);
|
|
||||||
|
|
||||||
if (key == "initialDelay") {
|
|
||||||
int delay = std::stoi(value);
|
|
||||||
if (delay >= 100 && delay <= 1000) {
|
|
||||||
g_state.initialDelay = delay;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (key == "stepDelay") {
|
|
||||||
int delay = std::stoi(value);
|
|
||||||
if (delay >= 100 && delay <= 1000) {
|
|
||||||
g_state.stepDelay = delay;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (key == "alwaysHideIcon") {
|
|
||||||
g_state.alwaysHideIcon = (value == "1");
|
|
||||||
}
|
|
||||||
else if (key == "autoShowHideUI") {
|
|
||||||
g_state.autoShowHideUI = (value == "1");
|
|
||||||
}
|
|
||||||
else if (key == "alwaysLoadLastSettings") {
|
|
||||||
g_state.alwaysLoadLastSettings = (value == "1");
|
|
||||||
}
|
|
||||||
else if (key == "hasCalibration") {
|
|
||||||
g_state.hasCalibration = (value == "1");
|
|
||||||
}
|
|
||||||
else if (key == "calibratedScaleX") {
|
|
||||||
try {
|
|
||||||
float v = std::stof(value);
|
|
||||||
if (v > 0.1f && v < 10.0f) g_state.calibratedScaleX = v;
|
|
||||||
}
|
|
||||||
catch (...) {}
|
|
||||||
}
|
|
||||||
else if (key == "calibratedScaleY") {
|
|
||||||
try {
|
|
||||||
float v = std::stof(value);
|
|
||||||
if (v > 0.1f && v < 10.0f) g_state.calibratedScaleY = v;
|
|
||||||
}
|
|
||||||
catch (...) {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
configFile.close();
|
|
||||||
|
|
||||||
char logBuffer[512];
|
|
||||||
sprintf_s(logBuffer, "Settings loaded: initialDelay=%dms, stepDelay=%dms, alwaysHideIcon=%s, autoShowHideUI=%s, alwaysLoadLastSettings=%s",
|
|
||||||
g_state.initialDelay, g_state.stepDelay,
|
|
||||||
g_state.alwaysHideIcon ? "true" : "false",
|
|
||||||
g_state.autoShowHideUI ? "true" : "false",
|
|
||||||
g_state.alwaysLoadLastSettings ? "true" : "false");
|
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", logBuffer);
|
|
||||||
|
|
||||||
}
|
|
||||||
catch (...) {
|
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", "Could not load config file, using defaults");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void ConfigManager::SaveLastUsedSettings() {
|
|
||||||
if (!g_api) return;
|
|
||||||
|
|
||||||
std::string addonPath = g_api->Paths.GetAddonDirectory("GolemHelper");
|
|
||||||
std::string settingsPath = addonPath + "\\last_settings.ini";
|
|
||||||
|
|
||||||
try {
|
|
||||||
std::ofstream settingsFile(settingsPath);
|
|
||||||
if (!settingsFile.is_open()) {
|
|
||||||
g_api->Log(ELogLevel_WARNING, "GolemHelper", "Could not create last settings file");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
settingsFile << "[LastUsedSettings]" << std::endl;
|
|
||||||
settingsFile << "isQuickDps=" << (g_state.isQuickDps ? "1" : "0") << std::endl;
|
|
||||||
settingsFile << "isAlacDps=" << (g_state.isAlacDps ? "1" : "0") << std::endl;
|
|
||||||
settingsFile << "showBoonAdvanced=" << (g_state.showBoonAdvanced ? "1" : "0") << std::endl;
|
|
||||||
settingsFile << "environmentDamage=" << (g_state.environmentDamage ? "1" : "0") << std::endl;
|
|
||||||
settingsFile << "envDamageLevel=" << static_cast<int>(g_state.envDamageLevel) << std::endl;
|
|
||||||
settingsFile << "skipBurning=" << (g_state.skipBurning ? "1" : "0") << std::endl;
|
|
||||||
settingsFile << "showAdvanced=" << (g_state.showAdvanced ? "1" : "0") << std::endl;
|
|
||||||
settingsFile << "skipConfusion=" << (g_state.skipConfusion ? "1" : "0") << std::endl;
|
|
||||||
settingsFile << "skipSlow=" << (g_state.skipSlow ? "1" : "0") << std::endl;
|
|
||||||
settingsFile << "addImmobilize=" << (g_state.addImmobilize ? "1" : "0") << std::endl;
|
|
||||||
settingsFile << "addBlind=" << (g_state.addBlind ? "1" : "0") << std::endl;
|
|
||||||
settingsFile << "fiveBleedingStacks=" << (g_state.fiveBleedingStacks ? "1" : "0") << std::endl;
|
|
||||||
settingsFile << "hitboxType=" << static_cast<int>(g_state.hitboxType) << std::endl;
|
|
||||||
settingsFile << "addResistance=" << (g_state.addResistance ? "1" : "0") << std::endl;
|
|
||||||
settingsFile << "addStability=" << (g_state.addStability ? "1" : "0") << std::endl;
|
|
||||||
settingsFile << "skipAegis=" << (g_state.skipAegis ? "1" : "0") << std::endl;
|
|
||||||
|
|
||||||
settingsFile.close();
|
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", "Last used settings saved");
|
|
||||||
|
|
||||||
}
|
|
||||||
catch (...) {
|
|
||||||
g_api->Log(ELogLevel_WARNING, "GolemHelper", "Failed to save last settings file");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void ConfigManager::LoadLastUsedSettings() {
|
|
||||||
if (!g_api) return;
|
|
||||||
|
|
||||||
std::string addonPath = g_api->Paths.GetAddonDirectory("GolemHelper");
|
|
||||||
std::string settingsPath = addonPath + "\\last_settings.ini";
|
|
||||||
|
|
||||||
try {
|
|
||||||
std::ifstream settingsFile(settingsPath);
|
|
||||||
if (!settingsFile.is_open()) {
|
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", "No last settings file found");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string line;
|
|
||||||
while (std::getline(settingsFile, line)) {
|
|
||||||
if (line.empty() || line[0] == '[') continue;
|
|
||||||
|
|
||||||
size_t equalPos = line.find('=');
|
|
||||||
if (equalPos == std::string::npos) continue;
|
|
||||||
|
|
||||||
std::string key = line.substr(0, equalPos);
|
|
||||||
std::string value = line.substr(equalPos + 1);
|
|
||||||
|
|
||||||
if (key == "isQuickDps") g_state.isQuickDps = (value == "1");
|
|
||||||
else if (key == "isAlacDps") g_state.isAlacDps = (value == "1");
|
|
||||||
else if (key == "showBoonAdvanced") g_state.showBoonAdvanced = (value == "1");
|
|
||||||
else if (key == "environmentDamage") g_state.environmentDamage = (value == "1");
|
|
||||||
else if (key == "envDamageLevel") g_state.envDamageLevel = static_cast<EnvironmentDamageLevel>(std::stoi(value));
|
|
||||||
else if (key == "showAdvanced") g_state.showAdvanced = (value == "1");
|
|
||||||
else if (key == "skipBurning") g_state.skipBurning = (value == "1");
|
|
||||||
else if (key == "skipConfusion") g_state.skipConfusion = (value == "1");
|
|
||||||
else if (key == "skipSlow") g_state.skipSlow = (value == "1");
|
|
||||||
else if (key == "addImmobilize") g_state.addImmobilize = (value == "1");
|
|
||||||
else if (key == "addBlind") g_state.addBlind = (value == "1");
|
|
||||||
else if (key == "fiveBleedingStacks") g_state.fiveBleedingStacks = (value == "1");
|
|
||||||
else if (key == "hitboxType") g_state.hitboxType = static_cast<HitboxType>(std::stoi(value));
|
|
||||||
else if (key == "addResistance") g_state.addResistance = (value == "1");
|
|
||||||
else if (key == "addStability") g_state.addStability = (value == "1");
|
|
||||||
else if (key == "skipAegis") g_state.skipAegis = (value == "1");
|
|
||||||
}
|
|
||||||
|
|
||||||
settingsFile.close();
|
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", "Last used settings loaded");
|
|
||||||
|
|
||||||
}
|
|
||||||
catch (...) {
|
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", "Could not load last settings file");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
#pragma once
|
|
||||||
|
|
||||||
class ConfigManager {
|
|
||||||
public:
|
|
||||||
static void SaveCustomDelaySettings();
|
|
||||||
static void LoadCustomDelaySettings();
|
|
||||||
static void SaveLastUsedSettings();
|
|
||||||
static void LoadLastUsedSettings();
|
|
||||||
};
|
|
||||||
|
|
@ -1,319 +0,0 @@
|
||||||
#include <Windows.h>
|
|
||||||
#include <string>
|
|
||||||
#include <fstream>
|
|
||||||
#include <sstream>
|
|
||||||
#include <iostream>
|
|
||||||
#include "TemplateManager.h"
|
|
||||||
#include "../Common/Globals.h"
|
|
||||||
#include "../Utils/FileUtils.h"
|
|
||||||
|
|
||||||
void TemplateManager::LoadTemplates() {
|
|
||||||
if (!g_api) return;
|
|
||||||
|
|
||||||
CreateDefaultTemplates();
|
|
||||||
|
|
||||||
std::string templatePath = FileUtils::GetAddonPath() + "\\templates.cfg";
|
|
||||||
|
|
||||||
try {
|
|
||||||
std::ifstream file(templatePath);
|
|
||||||
if (!file.is_open()) {
|
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", "No user templates file found");
|
|
||||||
SaveTemplates();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string line;
|
|
||||||
GolemTemplate currentTemplate;
|
|
||||||
bool inTemplate = false;
|
|
||||||
|
|
||||||
while (std::getline(file, line)) {
|
|
||||||
if (line.empty() || line[0] == '#') continue;
|
|
||||||
|
|
||||||
if (line.find("[Template]") == 0) {
|
|
||||||
if (inTemplate && !currentTemplate.name.empty()) {
|
|
||||||
g_state.templates.push_back(currentTemplate);
|
|
||||||
}
|
|
||||||
currentTemplate = GolemTemplate();
|
|
||||||
inTemplate = true;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!inTemplate) continue;
|
|
||||||
|
|
||||||
size_t equalPos = line.find('=');
|
|
||||||
if (equalPos == std::string::npos) continue;
|
|
||||||
|
|
||||||
std::string key = line.substr(0, equalPos);
|
|
||||||
std::string value = line.substr(equalPos + 1);
|
|
||||||
|
|
||||||
if (key == "name") {
|
|
||||||
currentTemplate.name = value;
|
|
||||||
}
|
|
||||||
else if (key == "isQuickDps") {
|
|
||||||
currentTemplate.isQuickDps = (value == "1");
|
|
||||||
}
|
|
||||||
else if (key == "isAlacDps") {
|
|
||||||
currentTemplate.isAlacDps = (value == "1");
|
|
||||||
}
|
|
||||||
else if (key == "environmentDamage") {
|
|
||||||
currentTemplate.environmentDamage = (value == "1");
|
|
||||||
}
|
|
||||||
else if (key == "envDamageLevel") {
|
|
||||||
currentTemplate.envDamageLevel = (EnvironmentDamageLevel)std::stoi(value);
|
|
||||||
}
|
|
||||||
else if (key == "skipBurning") {
|
|
||||||
currentTemplate.skipBurning = (value == "1");
|
|
||||||
}
|
|
||||||
else if (key == "skipConfusion") {
|
|
||||||
currentTemplate.skipConfusion = (value == "1");
|
|
||||||
}
|
|
||||||
else if (key == "skipSlow") {
|
|
||||||
currentTemplate.skipSlow = (value == "1");
|
|
||||||
}
|
|
||||||
else if (key == "addImmobilize") {
|
|
||||||
currentTemplate.addImmobilize = (value == "1");
|
|
||||||
}
|
|
||||||
else if (key == "addBlind") {
|
|
||||||
currentTemplate.addBlind = (value == "1");
|
|
||||||
}
|
|
||||||
else if (key == "fiveBleedingStacks") {
|
|
||||||
currentTemplate.fiveBleedingStacks = (value == "1");
|
|
||||||
}
|
|
||||||
else if (key == "hitboxType") {
|
|
||||||
currentTemplate.hitboxType = (HitboxType)std::stoi(value);
|
|
||||||
}
|
|
||||||
else if (key == "addResistance") {
|
|
||||||
currentTemplate.addResistance = (value == "1");
|
|
||||||
}
|
|
||||||
else if (key == "addStability") {
|
|
||||||
currentTemplate.addStability = (value == "1");
|
|
||||||
}
|
|
||||||
else if (key == "skipAegis") {
|
|
||||||
currentTemplate.skipAegis = (value == "1");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (inTemplate && !currentTemplate.name.empty()) {
|
|
||||||
g_state.templates.push_back(currentTemplate);
|
|
||||||
}
|
|
||||||
|
|
||||||
file.close();
|
|
||||||
|
|
||||||
int userTemplateCount = 0;
|
|
||||||
for (const auto& temp : g_state.templates) {
|
|
||||||
if (!temp.isDefaultTemplate) userTemplateCount++;
|
|
||||||
}
|
|
||||||
|
|
||||||
char logBuffer[150];
|
|
||||||
sprintf_s(logBuffer, "Loaded %d user templates", userTemplateCount);
|
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", logBuffer);
|
|
||||||
|
|
||||||
}
|
|
||||||
catch (...) {
|
|
||||||
g_api->Log(ELogLevel_WARNING, "GolemHelper", "Failed to load user templates");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void TemplateManager::SaveTemplates() {
|
|
||||||
if (!g_api) return;
|
|
||||||
|
|
||||||
std::string templatePath = FileUtils::GetAddonPath() + "\\templates.cfg";
|
|
||||||
|
|
||||||
try {
|
|
||||||
std::ofstream file(templatePath);
|
|
||||||
if (!file.is_open()) {
|
|
||||||
g_api->Log(ELogLevel_WARNING, "GolemHelper", "Could not create templates file");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
file << "# GolemHelper User Templates Configuration\n";
|
|
||||||
|
|
||||||
int savedCount = 0;
|
|
||||||
for (const auto& temp : g_state.templates) {
|
|
||||||
if (!temp.isDefaultTemplate) {
|
|
||||||
file << "[Template]\n";
|
|
||||||
file << "name=" << temp.name << "\n";
|
|
||||||
file << "isQuickDps=" << (temp.isQuickDps ? "1" : "0") << "\n";
|
|
||||||
file << "isAlacDps=" << (temp.isAlacDps ? "1" : "0") << "\n";
|
|
||||||
file << "environmentDamage=" << (temp.environmentDamage ? "1" : "0") << "\n";
|
|
||||||
file << "envDamageLevel=" << temp.envDamageLevel << "\n";
|
|
||||||
file << "skipBurning=" << (temp.skipBurning ? "1" : "0") << "\n";
|
|
||||||
file << "skipConfusion=" << (temp.skipConfusion ? "1" : "0") << "\n";
|
|
||||||
file << "skipSlow=" << (temp.skipSlow ? "1" : "0") << "\n";
|
|
||||||
file << "addImmobilize=" << (temp.addImmobilize ? "1" : "0") << "\n";
|
|
||||||
file << "addBlind=" << (temp.addBlind ? "1" : "0") << "\n";
|
|
||||||
file << "fiveBleedingStacks=" << (temp.fiveBleedingStacks ? "1" : "0") << "\n";
|
|
||||||
file << "hitboxType=" << temp.hitboxType << "\n";
|
|
||||||
file << "addResistance=" << (temp.addResistance ? "1" : "0") << "\n";
|
|
||||||
file << "addStability=" << (temp.addStability ? "1" : "0") << "\n";
|
|
||||||
file << "skipAegis=" << (temp.skipAegis ? "1" : "0") << "\n\n";
|
|
||||||
savedCount++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
file.close();
|
|
||||||
|
|
||||||
char logBuffer[150];
|
|
||||||
sprintf_s(logBuffer, "Saved %d user templates", savedCount);
|
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", logBuffer);
|
|
||||||
|
|
||||||
}
|
|
||||||
catch (...) {
|
|
||||||
g_api->Log(ELogLevel_WARNING, "GolemHelper", "Failed to save templates");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void TemplateManager::SaveCurrentAsTemplate(const std::string& name) {
|
|
||||||
GolemTemplate newTemplate = CreateTemplateFromCurrentSettings();
|
|
||||||
newTemplate.name = name;
|
|
||||||
|
|
||||||
g_state.templates.push_back(newTemplate);
|
|
||||||
SaveTemplates();
|
|
||||||
|
|
||||||
if (g_api) {
|
|
||||||
char logBuffer[200];
|
|
||||||
sprintf_s(logBuffer, "Template '%s' saved successfully", name.c_str());
|
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", logBuffer);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void TemplateManager::LoadTemplate(int index) {
|
|
||||||
if (index < 0 || index >= g_state.templates.size()) return;
|
|
||||||
|
|
||||||
ApplyTemplateToSettings(g_state.templates[index]);
|
|
||||||
|
|
||||||
if (!g_state.templates[index].isDefaultTemplate) {
|
|
||||||
g_state.selectedTemplateIndex = index;
|
|
||||||
g_state.lastUserTemplateIndex = index;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (g_api) {
|
|
||||||
char logBuffer[200];
|
|
||||||
sprintf_s(logBuffer, "Template '%s' loaded", g_state.templates[index].name.c_str());
|
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", logBuffer);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void TemplateManager::DeleteTemplate(int index) {
|
|
||||||
if (index < 0 || index >= g_state.templates.size()) return;
|
|
||||||
|
|
||||||
std::string templateName = g_state.templates[index].name;
|
|
||||||
g_state.templates.erase(g_state.templates.begin() + index);
|
|
||||||
|
|
||||||
if (g_state.selectedTemplateIndex == index) {
|
|
||||||
g_state.selectedTemplateIndex = -1;
|
|
||||||
}
|
|
||||||
else if (g_state.selectedTemplateIndex > index) {
|
|
||||||
g_state.selectedTemplateIndex--;
|
|
||||||
}
|
|
||||||
|
|
||||||
SaveTemplates();
|
|
||||||
|
|
||||||
if (g_api) {
|
|
||||||
char logBuffer[200];
|
|
||||||
sprintf_s(logBuffer, "Template '%s' deleted", templateName.c_str());
|
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", logBuffer);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void TemplateManager::RenameTemplate(int index, const std::string& newName) {
|
|
||||||
if (index < 0 || index >= g_state.templates.size()) return;
|
|
||||||
|
|
||||||
std::string oldName = g_state.templates[index].name;
|
|
||||||
g_state.templates[index].name = newName;
|
|
||||||
SaveTemplates();
|
|
||||||
|
|
||||||
if (g_api) {
|
|
||||||
char logBuffer[300];
|
|
||||||
sprintf_s(logBuffer, "Template renamed from '%s' to '%s'", oldName.c_str(), newName.c_str());
|
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", logBuffer);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
GolemTemplate TemplateManager::CreateTemplateFromCurrentSettings() {
|
|
||||||
GolemTemplate temp;
|
|
||||||
temp.isQuickDps = g_state.isQuickDps;
|
|
||||||
temp.isAlacDps = g_state.isAlacDps;
|
|
||||||
temp.environmentDamage = g_state.environmentDamage;
|
|
||||||
temp.envDamageLevel = g_state.envDamageLevel;
|
|
||||||
temp.skipBurning = g_state.skipBurning;
|
|
||||||
temp.skipConfusion = g_state.skipConfusion;
|
|
||||||
temp.skipSlow = g_state.skipSlow;
|
|
||||||
temp.addImmobilize = g_state.addImmobilize;
|
|
||||||
temp.addBlind = g_state.addBlind;
|
|
||||||
temp.fiveBleedingStacks = g_state.fiveBleedingStacks;
|
|
||||||
temp.hitboxType = g_state.hitboxType;
|
|
||||||
temp.addResistance = g_state.addResistance;
|
|
||||||
temp.addStability = g_state.addStability;
|
|
||||||
temp.skipAegis = g_state.skipAegis;
|
|
||||||
temp.isDefaultTemplate = false;
|
|
||||||
return temp;
|
|
||||||
}
|
|
||||||
|
|
||||||
void TemplateManager::ApplyTemplateToSettings(const GolemTemplate& temp) {
|
|
||||||
g_state.isQuickDps = temp.isQuickDps;
|
|
||||||
g_state.isAlacDps = temp.isAlacDps;
|
|
||||||
g_state.environmentDamage = temp.environmentDamage;
|
|
||||||
g_state.envDamageLevel = temp.envDamageLevel;
|
|
||||||
g_state.skipBurning = temp.skipBurning;
|
|
||||||
g_state.skipConfusion = temp.skipConfusion;
|
|
||||||
g_state.skipSlow = temp.skipSlow;
|
|
||||||
g_state.addImmobilize = temp.addImmobilize;
|
|
||||||
g_state.addBlind = temp.addBlind;
|
|
||||||
g_state.fiveBleedingStacks = temp.fiveBleedingStacks;
|
|
||||||
g_state.hitboxType = temp.hitboxType;
|
|
||||||
g_state.addResistance = temp.addResistance;
|
|
||||||
g_state.addStability = temp.addStability;
|
|
||||||
g_state.skipAegis = temp.skipAegis;
|
|
||||||
|
|
||||||
if (temp.isDefaultTemplate) {
|
|
||||||
g_state.showAdvanced = false;
|
|
||||||
g_state.showBoonAdvanced = false;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (temp.skipBurning || temp.skipConfusion || temp.skipSlow ||
|
|
||||||
temp.addImmobilize || temp.addBlind || temp.fiveBleedingStacks) {
|
|
||||||
g_state.showAdvanced = true;
|
|
||||||
}
|
|
||||||
if (temp.addResistance || temp.addStability || temp.skipAegis) {
|
|
||||||
g_state.showBoonAdvanced = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void TemplateManager::CreateDefaultTemplates() {
|
|
||||||
g_state.templates.clear();
|
|
||||||
|
|
||||||
GolemTemplate dps;
|
|
||||||
dps.name = "DPS";
|
|
||||||
dps.isDefaultTemplate = true;
|
|
||||||
g_state.templates.push_back(dps);
|
|
||||||
|
|
||||||
GolemTemplate quickDps;
|
|
||||||
quickDps.name = "Quick DPS";
|
|
||||||
quickDps.isQuickDps = true;
|
|
||||||
quickDps.isDefaultTemplate = true;
|
|
||||||
g_state.templates.push_back(quickDps);
|
|
||||||
|
|
||||||
GolemTemplate alacDps;
|
|
||||||
alacDps.name = "Alac DPS";
|
|
||||||
alacDps.isAlacDps = true;
|
|
||||||
alacDps.isDefaultTemplate = true;
|
|
||||||
g_state.templates.push_back(alacDps);
|
|
||||||
|
|
||||||
GolemTemplate qHeal;
|
|
||||||
qHeal.name = "qHeal";
|
|
||||||
qHeal.isQuickDps = true;
|
|
||||||
qHeal.environmentDamage = true;
|
|
||||||
qHeal.envDamageLevel = ENV_MILD;
|
|
||||||
qHeal.isDefaultTemplate = true;
|
|
||||||
g_state.templates.push_back(qHeal);
|
|
||||||
|
|
||||||
GolemTemplate aHeal;
|
|
||||||
aHeal.name = "aHeal";
|
|
||||||
aHeal.isAlacDps = true;
|
|
||||||
aHeal.environmentDamage = true;
|
|
||||||
aHeal.envDamageLevel = ENV_MILD;
|
|
||||||
aHeal.isDefaultTemplate = true;
|
|
||||||
g_state.templates.push_back(aHeal);
|
|
||||||
}
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
#pragma once
|
|
||||||
#include "../Common/Types.h"
|
|
||||||
|
|
||||||
class TemplateManager {
|
|
||||||
public:
|
|
||||||
static void LoadTemplates();
|
|
||||||
static void SaveTemplates();
|
|
||||||
static void SaveCurrentAsTemplate(const std::string& name);
|
|
||||||
static void LoadTemplate(int index);
|
|
||||||
static void DeleteTemplate(int index);
|
|
||||||
static void RenameTemplate(int index, const std::string& newName);
|
|
||||||
static GolemTemplate CreateTemplateFromCurrentSettings();
|
|
||||||
static void ApplyTemplateToSettings(const GolemTemplate& temp);
|
|
||||||
static void CreateDefaultTemplates();
|
|
||||||
};
|
|
||||||
|
|
@ -1,109 +0,0 @@
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
// COMPILE-TIME OPTIONS FOR DEAR IMGUI
|
|
||||||
// Runtime options (clipboard callbacks, enabling various features, etc.) can generally be set via the ImGuiIO structure.
|
|
||||||
// You can use ImGui::SetAllocatorFunctions() before calling ImGui::CreateContext() to rewire memory allocation functions.
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
// A) You may edit imconfig.h (and not overwrite it when updating Dear ImGui, or maintain a patch/rebased branch with your modifications to it)
|
|
||||||
// B) or '#define IMGUI_USER_CONFIG "my_imgui_config.h"' in your project and then add directives in your own file without touching this template.
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
// You need to make sure that configuration settings are defined consistently _everywhere_ Dear ImGui is used, which include the imgui*.cpp
|
|
||||||
// files but also _any_ of your code that uses Dear ImGui. This is because some compile-time options have an affect on data structures.
|
|
||||||
// Defining those options in imconfig.h will ensure every compilation unit gets to see the same data structure layouts.
|
|
||||||
// Call IMGUI_CHECKVERSION() from your .cpp files to verify that the data structures your files are using are matching the ones imgui.cpp is using.
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
//---- Define assertion handler. Defaults to calling assert().
|
|
||||||
// If your macro uses multiple statements, make sure is enclosed in a 'do { .. } while (0)' block so it can be used as a single statement.
|
|
||||||
//#define IM_ASSERT(_EXPR) MyAssert(_EXPR)
|
|
||||||
//#define IM_ASSERT(_EXPR) ((void)(_EXPR)) // Disable asserts
|
|
||||||
|
|
||||||
//---- Define attributes of all API symbols declarations, e.g. for DLL under Windows
|
|
||||||
// Using dear imgui via a shared library is not recommended, because of function call overhead and because we don't guarantee backward nor forward ABI compatibility.
|
|
||||||
//#define IMGUI_API __declspec( dllexport )
|
|
||||||
//#define IMGUI_API __declspec( dllimport )
|
|
||||||
|
|
||||||
//---- Don't define obsolete functions/enums/behaviors. Consider enabling from time to time after updating to avoid using soon-to-be obsolete function/names.
|
|
||||||
//#define IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
|
||||||
|
|
||||||
//---- Disable all of Dear ImGui or don't implement standard windows.
|
|
||||||
// It is very strongly recommended to NOT disable the demo windows during development. Please read comments in imgui_demo.cpp.
|
|
||||||
//#define IMGUI_DISABLE // Disable everything: all headers and source files will be empty.
|
|
||||||
//#define IMGUI_DISABLE_DEMO_WINDOWS // Disable demo windows: ShowDemoWindow()/ShowStyleEditor() will be empty. Not recommended.
|
|
||||||
//#define IMGUI_DISABLE_METRICS_WINDOW // Disable metrics/debugger window: ShowMetricsWindow() will be empty.
|
|
||||||
|
|
||||||
//---- Don't implement some functions to reduce linkage requirements.
|
|
||||||
//#define IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS // [Win32] Don't implement default clipboard handler. Won't use and link with OpenClipboard/GetClipboardData/CloseClipboard etc.
|
|
||||||
//#define IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS // [Win32] Don't implement default IME handler. Won't use and link with ImmGetContext/ImmSetCompositionWindow.
|
|
||||||
//#define IMGUI_DISABLE_WIN32_FUNCTIONS // [Win32] Won't use and link with any Win32 function (clipboard, ime).
|
|
||||||
//#define IMGUI_ENABLE_OSX_DEFAULT_CLIPBOARD_FUNCTIONS // [OSX] Implement default OSX clipboard handler (need to link with '-framework ApplicationServices', this is why this is not the default).
|
|
||||||
//#define IMGUI_DISABLE_DEFAULT_FORMAT_FUNCTIONS // Don't implement ImFormatString/ImFormatStringV so you can implement them yourself (e.g. if you don't want to link with vsnprintf)
|
|
||||||
//#define IMGUI_DISABLE_DEFAULT_MATH_FUNCTIONS // Don't implement ImFabs/ImSqrt/ImPow/ImFmod/ImCos/ImSin/ImAcos/ImAtan2 so you can implement them yourself.
|
|
||||||
//#define IMGUI_DISABLE_DEFAULT_FILE_FUNCTIONS // Don't implement ImFileOpen/ImFileClose/ImFileRead/ImFileWrite so you can implement them yourself if you don't want to link with fopen/fclose/fread/fwrite. This will also disable the LogToTTY() function.
|
|
||||||
//#define IMGUI_DISABLE_DEFAULT_ALLOCATORS // Don't implement default allocators calling malloc()/free() to avoid linking with them. You will need to call ImGui::SetAllocatorFunctions().
|
|
||||||
|
|
||||||
//---- Include imgui_user.h at the end of imgui.h as a convenience
|
|
||||||
//#define IMGUI_INCLUDE_IMGUI_USER_H
|
|
||||||
|
|
||||||
//---- Pack colors to BGRA8 instead of RGBA8 (to avoid converting from one to another)
|
|
||||||
//#define IMGUI_USE_BGRA_PACKED_COLOR
|
|
||||||
|
|
||||||
//---- Use 32-bit for ImWchar (default is 16-bit) to support unicode planes 1-16. (e.g. point beyond 0xFFFF like emoticons, dingbats, symbols, shapes, ancient languages, etc...)
|
|
||||||
//#define IMGUI_USE_WCHAR32
|
|
||||||
|
|
||||||
//---- Avoid multiple STB libraries implementations, or redefine path/filenames to prioritize another version
|
|
||||||
// By default the embedded implementations are declared static and not available outside of imgui cpp files.
|
|
||||||
//#define IMGUI_STB_TRUETYPE_FILENAME "my_folder/stb_truetype.h"
|
|
||||||
//#define IMGUI_STB_RECT_PACK_FILENAME "my_folder/stb_rect_pack.h"
|
|
||||||
//#define IMGUI_DISABLE_STB_TRUETYPE_IMPLEMENTATION
|
|
||||||
//#define IMGUI_DISABLE_STB_RECT_PACK_IMPLEMENTATION
|
|
||||||
|
|
||||||
//---- Use stb_printf's faster implementation of vsnprintf instead of the one from libc (unless IMGUI_DISABLE_DEFAULT_FORMAT_FUNCTIONS is defined)
|
|
||||||
// Requires 'stb_sprintf.h' to be available in the include path. Compatibility checks of arguments and formats done by clang and GCC will be disabled in order to support the extra formats provided by STB sprintf.
|
|
||||||
// #define IMGUI_USE_STB_SPRINTF
|
|
||||||
|
|
||||||
//---- Define constructor and implicit cast operators to convert back<>forth between your math types and ImVec2/ImVec4.
|
|
||||||
// This will be inlined as part of ImVec2 and ImVec4 class declarations.
|
|
||||||
/*
|
|
||||||
#define IM_VEC2_CLASS_EXTRA \
|
|
||||||
ImVec2(const MyVec2& f) { x = f.x; y = f.y; } \
|
|
||||||
operator MyVec2() const { return MyVec2(x,y); }
|
|
||||||
|
|
||||||
#define IM_VEC4_CLASS_EXTRA \
|
|
||||||
ImVec4(const MyVec4& f) { x = f.x; y = f.y; z = f.z; w = f.w; } \
|
|
||||||
operator MyVec4() const { return MyVec4(x,y,z,w); }
|
|
||||||
*/
|
|
||||||
|
|
||||||
//---- Use 32-bit vertex indices (default is 16-bit) is one way to allow large meshes with more than 64K vertices.
|
|
||||||
// Your renderer backend will need to support it (most example renderer backends support both 16/32-bit indices).
|
|
||||||
// Another way to allow large meshes while keeping 16-bit indices is to handle ImDrawCmd::VtxOffset in your renderer.
|
|
||||||
// Read about ImGuiBackendFlags_RendererHasVtxOffset for details.
|
|
||||||
//#define ImDrawIdx unsigned int
|
|
||||||
|
|
||||||
//---- Override ImDrawCallback signature (will need to modify renderer backends accordingly)
|
|
||||||
//struct ImDrawList;
|
|
||||||
//struct ImDrawCmd;
|
|
||||||
//typedef void (*MyImDrawCallback)(const ImDrawList* draw_list, const ImDrawCmd* cmd, void* my_renderer_user_data);
|
|
||||||
//#define ImDrawCallback MyImDrawCallback
|
|
||||||
|
|
||||||
//---- Debug Tools: Macro to break in Debugger
|
|
||||||
// (use 'Metrics->Tools->Item Picker' to pick widgets with the mouse and break into them for easy debugging.)
|
|
||||||
//#define IM_DEBUG_BREAK IM_ASSERT(0)
|
|
||||||
//#define IM_DEBUG_BREAK __debugbreak()
|
|
||||||
|
|
||||||
//---- Debug Tools: Have the Item Picker break in the ItemAdd() function instead of ItemHoverable(),
|
|
||||||
// (which comes earlier in the code, will catch a few extra items, allow picking items other than Hovered one.)
|
|
||||||
// This adds a small runtime cost which is why it is not enabled by default.
|
|
||||||
//#define IMGUI_DEBUG_TOOL_ITEM_PICKER_EX
|
|
||||||
|
|
||||||
//---- Debug Tools: Enable slower asserts
|
|
||||||
//#define IMGUI_DEBUG_PARANOID
|
|
||||||
|
|
||||||
//---- Tip: You can add extra functions within the ImGui:: namespace, here or in your own headers files.
|
|
||||||
/*
|
|
||||||
namespace ImGui
|
|
||||||
{
|
|
||||||
void MyFunction(const char* name, const MyMatrix44& v);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -1,639 +0,0 @@
|
||||||
// [DEAR IMGUI]
|
|
||||||
// This is a slightly modified version of stb_rect_pack.h 1.00.
|
|
||||||
// Those changes would need to be pushed into nothings/stb:
|
|
||||||
// - Added STBRP__CDECL
|
|
||||||
// Grep for [DEAR IMGUI] to find the changes.
|
|
||||||
|
|
||||||
// stb_rect_pack.h - v1.00 - public domain - rectangle packing
|
|
||||||
// Sean Barrett 2014
|
|
||||||
//
|
|
||||||
// Useful for e.g. packing rectangular textures into an atlas.
|
|
||||||
// Does not do rotation.
|
|
||||||
//
|
|
||||||
// Not necessarily the awesomest packing method, but better than
|
|
||||||
// the totally naive one in stb_truetype (which is primarily what
|
|
||||||
// this is meant to replace).
|
|
||||||
//
|
|
||||||
// Has only had a few tests run, may have issues.
|
|
||||||
//
|
|
||||||
// More docs to come.
|
|
||||||
//
|
|
||||||
// No memory allocations; uses qsort() and assert() from stdlib.
|
|
||||||
// Can override those by defining STBRP_SORT and STBRP_ASSERT.
|
|
||||||
//
|
|
||||||
// This library currently uses the Skyline Bottom-Left algorithm.
|
|
||||||
//
|
|
||||||
// Please note: better rectangle packers are welcome! Please
|
|
||||||
// implement them to the same API, but with a different init
|
|
||||||
// function.
|
|
||||||
//
|
|
||||||
// Credits
|
|
||||||
//
|
|
||||||
// Library
|
|
||||||
// Sean Barrett
|
|
||||||
// Minor features
|
|
||||||
// Martins Mozeiko
|
|
||||||
// github:IntellectualKitty
|
|
||||||
//
|
|
||||||
// Bugfixes / warning fixes
|
|
||||||
// Jeremy Jaussaud
|
|
||||||
// Fabian Giesen
|
|
||||||
//
|
|
||||||
// Version history:
|
|
||||||
//
|
|
||||||
// 1.00 (2019-02-25) avoid small space waste; gracefully fail too-wide rectangles
|
|
||||||
// 0.99 (2019-02-07) warning fixes
|
|
||||||
// 0.11 (2017-03-03) return packing success/fail result
|
|
||||||
// 0.10 (2016-10-25) remove cast-away-const to avoid warnings
|
|
||||||
// 0.09 (2016-08-27) fix compiler warnings
|
|
||||||
// 0.08 (2015-09-13) really fix bug with empty rects (w=0 or h=0)
|
|
||||||
// 0.07 (2015-09-13) fix bug with empty rects (w=0 or h=0)
|
|
||||||
// 0.06 (2015-04-15) added STBRP_SORT to allow replacing qsort
|
|
||||||
// 0.05: added STBRP_ASSERT to allow replacing assert
|
|
||||||
// 0.04: fixed minor bug in STBRP_LARGE_RECTS support
|
|
||||||
// 0.01: initial release
|
|
||||||
//
|
|
||||||
// LICENSE
|
|
||||||
//
|
|
||||||
// See end of file for license information.
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// INCLUDE SECTION
|
|
||||||
//
|
|
||||||
|
|
||||||
#ifndef STB_INCLUDE_STB_RECT_PACK_H
|
|
||||||
#define STB_INCLUDE_STB_RECT_PACK_H
|
|
||||||
|
|
||||||
#define STB_RECT_PACK_VERSION 1
|
|
||||||
|
|
||||||
#ifdef STBRP_STATIC
|
|
||||||
#define STBRP_DEF static
|
|
||||||
#else
|
|
||||||
#define STBRP_DEF extern
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef struct stbrp_context stbrp_context;
|
|
||||||
typedef struct stbrp_node stbrp_node;
|
|
||||||
typedef struct stbrp_rect stbrp_rect;
|
|
||||||
|
|
||||||
#ifdef STBRP_LARGE_RECTS
|
|
||||||
typedef int stbrp_coord;
|
|
||||||
#else
|
|
||||||
typedef unsigned short stbrp_coord;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
STBRP_DEF int stbrp_pack_rects (stbrp_context *context, stbrp_rect *rects, int num_rects);
|
|
||||||
// Assign packed locations to rectangles. The rectangles are of type
|
|
||||||
// 'stbrp_rect' defined below, stored in the array 'rects', and there
|
|
||||||
// are 'num_rects' many of them.
|
|
||||||
//
|
|
||||||
// Rectangles which are successfully packed have the 'was_packed' flag
|
|
||||||
// set to a non-zero value and 'x' and 'y' store the minimum location
|
|
||||||
// on each axis (i.e. bottom-left in cartesian coordinates, top-left
|
|
||||||
// if you imagine y increasing downwards). Rectangles which do not fit
|
|
||||||
// have the 'was_packed' flag set to 0.
|
|
||||||
//
|
|
||||||
// You should not try to access the 'rects' array from another thread
|
|
||||||
// while this function is running, as the function temporarily reorders
|
|
||||||
// the array while it executes.
|
|
||||||
//
|
|
||||||
// To pack into another rectangle, you need to call stbrp_init_target
|
|
||||||
// again. To continue packing into the same rectangle, you can call
|
|
||||||
// this function again. Calling this multiple times with multiple rect
|
|
||||||
// arrays will probably produce worse packing results than calling it
|
|
||||||
// a single time with the full rectangle array, but the option is
|
|
||||||
// available.
|
|
||||||
//
|
|
||||||
// The function returns 1 if all of the rectangles were successfully
|
|
||||||
// packed and 0 otherwise.
|
|
||||||
|
|
||||||
struct stbrp_rect
|
|
||||||
{
|
|
||||||
// reserved for your use:
|
|
||||||
int id;
|
|
||||||
|
|
||||||
// input:
|
|
||||||
stbrp_coord w, h;
|
|
||||||
|
|
||||||
// output:
|
|
||||||
stbrp_coord x, y;
|
|
||||||
int was_packed; // non-zero if valid packing
|
|
||||||
|
|
||||||
}; // 16 bytes, nominally
|
|
||||||
|
|
||||||
|
|
||||||
STBRP_DEF void stbrp_init_target (stbrp_context *context, int width, int height, stbrp_node *nodes, int num_nodes);
|
|
||||||
// Initialize a rectangle packer to:
|
|
||||||
// pack a rectangle that is 'width' by 'height' in dimensions
|
|
||||||
// using temporary storage provided by the array 'nodes', which is 'num_nodes' long
|
|
||||||
//
|
|
||||||
// You must call this function every time you start packing into a new target.
|
|
||||||
//
|
|
||||||
// There is no "shutdown" function. The 'nodes' memory must stay valid for
|
|
||||||
// the following stbrp_pack_rects() call (or calls), but can be freed after
|
|
||||||
// the call (or calls) finish.
|
|
||||||
//
|
|
||||||
// Note: to guarantee best results, either:
|
|
||||||
// 1. make sure 'num_nodes' >= 'width'
|
|
||||||
// or 2. call stbrp_allow_out_of_mem() defined below with 'allow_out_of_mem = 1'
|
|
||||||
//
|
|
||||||
// If you don't do either of the above things, widths will be quantized to multiples
|
|
||||||
// of small integers to guarantee the algorithm doesn't run out of temporary storage.
|
|
||||||
//
|
|
||||||
// If you do #2, then the non-quantized algorithm will be used, but the algorithm
|
|
||||||
// may run out of temporary storage and be unable to pack some rectangles.
|
|
||||||
|
|
||||||
STBRP_DEF void stbrp_setup_allow_out_of_mem (stbrp_context *context, int allow_out_of_mem);
|
|
||||||
// Optionally call this function after init but before doing any packing to
|
|
||||||
// change the handling of the out-of-temp-memory scenario, described above.
|
|
||||||
// If you call init again, this will be reset to the default (false).
|
|
||||||
|
|
||||||
|
|
||||||
STBRP_DEF void stbrp_setup_heuristic (stbrp_context *context, int heuristic);
|
|
||||||
// Optionally select which packing heuristic the library should use. Different
|
|
||||||
// heuristics will produce better/worse results for different data sets.
|
|
||||||
// If you call init again, this will be reset to the default.
|
|
||||||
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
STBRP_HEURISTIC_Skyline_default=0,
|
|
||||||
STBRP_HEURISTIC_Skyline_BL_sortHeight = STBRP_HEURISTIC_Skyline_default,
|
|
||||||
STBRP_HEURISTIC_Skyline_BF_sortHeight
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// the details of the following structures don't matter to you, but they must
|
|
||||||
// be visible so you can handle the memory allocations for them
|
|
||||||
|
|
||||||
struct stbrp_node
|
|
||||||
{
|
|
||||||
stbrp_coord x,y;
|
|
||||||
stbrp_node *next;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct stbrp_context
|
|
||||||
{
|
|
||||||
int width;
|
|
||||||
int height;
|
|
||||||
int align;
|
|
||||||
int init_mode;
|
|
||||||
int heuristic;
|
|
||||||
int num_nodes;
|
|
||||||
stbrp_node *active_head;
|
|
||||||
stbrp_node *free_head;
|
|
||||||
stbrp_node extra[2]; // we allocate two extra nodes so optimal user-node-count is 'width' not 'width+2'
|
|
||||||
};
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// IMPLEMENTATION SECTION
|
|
||||||
//
|
|
||||||
|
|
||||||
#ifdef STB_RECT_PACK_IMPLEMENTATION
|
|
||||||
#ifndef STBRP_SORT
|
|
||||||
#include <stdlib.h>
|
|
||||||
#define STBRP_SORT qsort
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef STBRP_ASSERT
|
|
||||||
#include <assert.h>
|
|
||||||
#define STBRP_ASSERT assert
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// [DEAR IMGUI] Added STBRP__CDECL
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#define STBRP__NOTUSED(v) (void)(v)
|
|
||||||
#define STBRP__CDECL __cdecl
|
|
||||||
#else
|
|
||||||
#define STBRP__NOTUSED(v) (void)sizeof(v)
|
|
||||||
#define STBRP__CDECL
|
|
||||||
#endif
|
|
||||||
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
STBRP__INIT_skyline = 1
|
|
||||||
};
|
|
||||||
|
|
||||||
STBRP_DEF void stbrp_setup_heuristic(stbrp_context *context, int heuristic)
|
|
||||||
{
|
|
||||||
switch (context->init_mode) {
|
|
||||||
case STBRP__INIT_skyline:
|
|
||||||
STBRP_ASSERT(heuristic == STBRP_HEURISTIC_Skyline_BL_sortHeight || heuristic == STBRP_HEURISTIC_Skyline_BF_sortHeight);
|
|
||||||
context->heuristic = heuristic;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
STBRP_ASSERT(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
STBRP_DEF void stbrp_setup_allow_out_of_mem(stbrp_context *context, int allow_out_of_mem)
|
|
||||||
{
|
|
||||||
if (allow_out_of_mem)
|
|
||||||
// if it's ok to run out of memory, then don't bother aligning them;
|
|
||||||
// this gives better packing, but may fail due to OOM (even though
|
|
||||||
// the rectangles easily fit). @TODO a smarter approach would be to only
|
|
||||||
// quantize once we've hit OOM, then we could get rid of this parameter.
|
|
||||||
context->align = 1;
|
|
||||||
else {
|
|
||||||
// if it's not ok to run out of memory, then quantize the widths
|
|
||||||
// so that num_nodes is always enough nodes.
|
|
||||||
//
|
|
||||||
// I.e. num_nodes * align >= width
|
|
||||||
// align >= width / num_nodes
|
|
||||||
// align = ceil(width/num_nodes)
|
|
||||||
|
|
||||||
context->align = (context->width + context->num_nodes-1) / context->num_nodes;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
STBRP_DEF void stbrp_init_target(stbrp_context *context, int width, int height, stbrp_node *nodes, int num_nodes)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
#ifndef STBRP_LARGE_RECTS
|
|
||||||
STBRP_ASSERT(width <= 0xffff && height <= 0xffff);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
for (i=0; i < num_nodes-1; ++i)
|
|
||||||
nodes[i].next = &nodes[i+1];
|
|
||||||
nodes[i].next = NULL;
|
|
||||||
context->init_mode = STBRP__INIT_skyline;
|
|
||||||
context->heuristic = STBRP_HEURISTIC_Skyline_default;
|
|
||||||
context->free_head = &nodes[0];
|
|
||||||
context->active_head = &context->extra[0];
|
|
||||||
context->width = width;
|
|
||||||
context->height = height;
|
|
||||||
context->num_nodes = num_nodes;
|
|
||||||
stbrp_setup_allow_out_of_mem(context, 0);
|
|
||||||
|
|
||||||
// node 0 is the full width, node 1 is the sentinel (lets us not store width explicitly)
|
|
||||||
context->extra[0].x = 0;
|
|
||||||
context->extra[0].y = 0;
|
|
||||||
context->extra[0].next = &context->extra[1];
|
|
||||||
context->extra[1].x = (stbrp_coord) width;
|
|
||||||
#ifdef STBRP_LARGE_RECTS
|
|
||||||
context->extra[1].y = (1<<30);
|
|
||||||
#else
|
|
||||||
context->extra[1].y = 65535;
|
|
||||||
#endif
|
|
||||||
context->extra[1].next = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
// find minimum y position if it starts at x1
|
|
||||||
static int stbrp__skyline_find_min_y(stbrp_context *c, stbrp_node *first, int x0, int width, int *pwaste)
|
|
||||||
{
|
|
||||||
stbrp_node *node = first;
|
|
||||||
int x1 = x0 + width;
|
|
||||||
int min_y, visited_width, waste_area;
|
|
||||||
|
|
||||||
STBRP__NOTUSED(c);
|
|
||||||
|
|
||||||
STBRP_ASSERT(first->x <= x0);
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
// skip in case we're past the node
|
|
||||||
while (node->next->x <= x0)
|
|
||||||
++node;
|
|
||||||
#else
|
|
||||||
STBRP_ASSERT(node->next->x > x0); // we ended up handling this in the caller for efficiency
|
|
||||||
#endif
|
|
||||||
|
|
||||||
STBRP_ASSERT(node->x <= x0);
|
|
||||||
|
|
||||||
min_y = 0;
|
|
||||||
waste_area = 0;
|
|
||||||
visited_width = 0;
|
|
||||||
while (node->x < x1) {
|
|
||||||
if (node->y > min_y) {
|
|
||||||
// raise min_y higher.
|
|
||||||
// we've accounted for all waste up to min_y,
|
|
||||||
// but we'll now add more waste for everything we've visted
|
|
||||||
waste_area += visited_width * (node->y - min_y);
|
|
||||||
min_y = node->y;
|
|
||||||
// the first time through, visited_width might be reduced
|
|
||||||
if (node->x < x0)
|
|
||||||
visited_width += node->next->x - x0;
|
|
||||||
else
|
|
||||||
visited_width += node->next->x - node->x;
|
|
||||||
} else {
|
|
||||||
// add waste area
|
|
||||||
int under_width = node->next->x - node->x;
|
|
||||||
if (under_width + visited_width > width)
|
|
||||||
under_width = width - visited_width;
|
|
||||||
waste_area += under_width * (min_y - node->y);
|
|
||||||
visited_width += under_width;
|
|
||||||
}
|
|
||||||
node = node->next;
|
|
||||||
}
|
|
||||||
|
|
||||||
*pwaste = waste_area;
|
|
||||||
return min_y;
|
|
||||||
}
|
|
||||||
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
int x,y;
|
|
||||||
stbrp_node **prev_link;
|
|
||||||
} stbrp__findresult;
|
|
||||||
|
|
||||||
static stbrp__findresult stbrp__skyline_find_best_pos(stbrp_context *c, int width, int height)
|
|
||||||
{
|
|
||||||
int best_waste = (1<<30), best_x, best_y = (1 << 30);
|
|
||||||
stbrp__findresult fr;
|
|
||||||
stbrp_node **prev, *node, *tail, **best = NULL;
|
|
||||||
|
|
||||||
// align to multiple of c->align
|
|
||||||
width = (width + c->align - 1);
|
|
||||||
width -= width % c->align;
|
|
||||||
STBRP_ASSERT(width % c->align == 0);
|
|
||||||
|
|
||||||
// if it can't possibly fit, bail immediately
|
|
||||||
if (width > c->width || height > c->height) {
|
|
||||||
fr.prev_link = NULL;
|
|
||||||
fr.x = fr.y = 0;
|
|
||||||
return fr;
|
|
||||||
}
|
|
||||||
|
|
||||||
node = c->active_head;
|
|
||||||
prev = &c->active_head;
|
|
||||||
while (node->x + width <= c->width) {
|
|
||||||
int y,waste;
|
|
||||||
y = stbrp__skyline_find_min_y(c, node, node->x, width, &waste);
|
|
||||||
if (c->heuristic == STBRP_HEURISTIC_Skyline_BL_sortHeight) { // actually just want to test BL
|
|
||||||
// bottom left
|
|
||||||
if (y < best_y) {
|
|
||||||
best_y = y;
|
|
||||||
best = prev;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// best-fit
|
|
||||||
if (y + height <= c->height) {
|
|
||||||
// can only use it if it first vertically
|
|
||||||
if (y < best_y || (y == best_y && waste < best_waste)) {
|
|
||||||
best_y = y;
|
|
||||||
best_waste = waste;
|
|
||||||
best = prev;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
prev = &node->next;
|
|
||||||
node = node->next;
|
|
||||||
}
|
|
||||||
|
|
||||||
best_x = (best == NULL) ? 0 : (*best)->x;
|
|
||||||
|
|
||||||
// if doing best-fit (BF), we also have to try aligning right edge to each node position
|
|
||||||
//
|
|
||||||
// e.g, if fitting
|
|
||||||
//
|
|
||||||
// ____________________
|
|
||||||
// |____________________|
|
|
||||||
//
|
|
||||||
// into
|
|
||||||
//
|
|
||||||
// | |
|
|
||||||
// | ____________|
|
|
||||||
// |____________|
|
|
||||||
//
|
|
||||||
// then right-aligned reduces waste, but bottom-left BL is always chooses left-aligned
|
|
||||||
//
|
|
||||||
// This makes BF take about 2x the time
|
|
||||||
|
|
||||||
if (c->heuristic == STBRP_HEURISTIC_Skyline_BF_sortHeight) {
|
|
||||||
tail = c->active_head;
|
|
||||||
node = c->active_head;
|
|
||||||
prev = &c->active_head;
|
|
||||||
// find first node that's admissible
|
|
||||||
while (tail->x < width)
|
|
||||||
tail = tail->next;
|
|
||||||
while (tail) {
|
|
||||||
int xpos = tail->x - width;
|
|
||||||
int y,waste;
|
|
||||||
STBRP_ASSERT(xpos >= 0);
|
|
||||||
// find the left position that matches this
|
|
||||||
while (node->next->x <= xpos) {
|
|
||||||
prev = &node->next;
|
|
||||||
node = node->next;
|
|
||||||
}
|
|
||||||
STBRP_ASSERT(node->next->x > xpos && node->x <= xpos);
|
|
||||||
y = stbrp__skyline_find_min_y(c, node, xpos, width, &waste);
|
|
||||||
if (y + height <= c->height) {
|
|
||||||
if (y <= best_y) {
|
|
||||||
if (y < best_y || waste < best_waste || (waste==best_waste && xpos < best_x)) {
|
|
||||||
best_x = xpos;
|
|
||||||
STBRP_ASSERT(y <= best_y);
|
|
||||||
best_y = y;
|
|
||||||
best_waste = waste;
|
|
||||||
best = prev;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
tail = tail->next;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fr.prev_link = best;
|
|
||||||
fr.x = best_x;
|
|
||||||
fr.y = best_y;
|
|
||||||
return fr;
|
|
||||||
}
|
|
||||||
|
|
||||||
static stbrp__findresult stbrp__skyline_pack_rectangle(stbrp_context *context, int width, int height)
|
|
||||||
{
|
|
||||||
// find best position according to heuristic
|
|
||||||
stbrp__findresult res = stbrp__skyline_find_best_pos(context, width, height);
|
|
||||||
stbrp_node *node, *cur;
|
|
||||||
|
|
||||||
// bail if:
|
|
||||||
// 1. it failed
|
|
||||||
// 2. the best node doesn't fit (we don't always check this)
|
|
||||||
// 3. we're out of memory
|
|
||||||
if (res.prev_link == NULL || res.y + height > context->height || context->free_head == NULL) {
|
|
||||||
res.prev_link = NULL;
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
// on success, create new node
|
|
||||||
node = context->free_head;
|
|
||||||
node->x = (stbrp_coord) res.x;
|
|
||||||
node->y = (stbrp_coord) (res.y + height);
|
|
||||||
|
|
||||||
context->free_head = node->next;
|
|
||||||
|
|
||||||
// insert the new node into the right starting point, and
|
|
||||||
// let 'cur' point to the remaining nodes needing to be
|
|
||||||
// stiched back in
|
|
||||||
|
|
||||||
cur = *res.prev_link;
|
|
||||||
if (cur->x < res.x) {
|
|
||||||
// preserve the existing one, so start testing with the next one
|
|
||||||
stbrp_node *next = cur->next;
|
|
||||||
cur->next = node;
|
|
||||||
cur = next;
|
|
||||||
} else {
|
|
||||||
*res.prev_link = node;
|
|
||||||
}
|
|
||||||
|
|
||||||
// from here, traverse cur and free the nodes, until we get to one
|
|
||||||
// that shouldn't be freed
|
|
||||||
while (cur->next && cur->next->x <= res.x + width) {
|
|
||||||
stbrp_node *next = cur->next;
|
|
||||||
// move the current node to the free list
|
|
||||||
cur->next = context->free_head;
|
|
||||||
context->free_head = cur;
|
|
||||||
cur = next;
|
|
||||||
}
|
|
||||||
|
|
||||||
// stitch the list back in
|
|
||||||
node->next = cur;
|
|
||||||
|
|
||||||
if (cur->x < res.x + width)
|
|
||||||
cur->x = (stbrp_coord) (res.x + width);
|
|
||||||
|
|
||||||
#ifdef _DEBUG
|
|
||||||
cur = context->active_head;
|
|
||||||
while (cur->x < context->width) {
|
|
||||||
STBRP_ASSERT(cur->x < cur->next->x);
|
|
||||||
cur = cur->next;
|
|
||||||
}
|
|
||||||
STBRP_ASSERT(cur->next == NULL);
|
|
||||||
|
|
||||||
{
|
|
||||||
int count=0;
|
|
||||||
cur = context->active_head;
|
|
||||||
while (cur) {
|
|
||||||
cur = cur->next;
|
|
||||||
++count;
|
|
||||||
}
|
|
||||||
cur = context->free_head;
|
|
||||||
while (cur) {
|
|
||||||
cur = cur->next;
|
|
||||||
++count;
|
|
||||||
}
|
|
||||||
STBRP_ASSERT(count == context->num_nodes+2);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
// [DEAR IMGUI] Added STBRP__CDECL
|
|
||||||
static int STBRP__CDECL rect_height_compare(const void *a, const void *b)
|
|
||||||
{
|
|
||||||
const stbrp_rect *p = (const stbrp_rect *) a;
|
|
||||||
const stbrp_rect *q = (const stbrp_rect *) b;
|
|
||||||
if (p->h > q->h)
|
|
||||||
return -1;
|
|
||||||
if (p->h < q->h)
|
|
||||||
return 1;
|
|
||||||
return (p->w > q->w) ? -1 : (p->w < q->w);
|
|
||||||
}
|
|
||||||
|
|
||||||
// [DEAR IMGUI] Added STBRP__CDECL
|
|
||||||
static int STBRP__CDECL rect_original_order(const void *a, const void *b)
|
|
||||||
{
|
|
||||||
const stbrp_rect *p = (const stbrp_rect *) a;
|
|
||||||
const stbrp_rect *q = (const stbrp_rect *) b;
|
|
||||||
return (p->was_packed < q->was_packed) ? -1 : (p->was_packed > q->was_packed);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef STBRP_LARGE_RECTS
|
|
||||||
#define STBRP__MAXVAL 0xffffffff
|
|
||||||
#else
|
|
||||||
#define STBRP__MAXVAL 0xffff
|
|
||||||
#endif
|
|
||||||
|
|
||||||
STBRP_DEF int stbrp_pack_rects(stbrp_context *context, stbrp_rect *rects, int num_rects)
|
|
||||||
{
|
|
||||||
int i, all_rects_packed = 1;
|
|
||||||
|
|
||||||
// we use the 'was_packed' field internally to allow sorting/unsorting
|
|
||||||
for (i=0; i < num_rects; ++i) {
|
|
||||||
rects[i].was_packed = i;
|
|
||||||
}
|
|
||||||
|
|
||||||
// sort according to heuristic
|
|
||||||
STBRP_SORT(rects, num_rects, sizeof(rects[0]), rect_height_compare);
|
|
||||||
|
|
||||||
for (i=0; i < num_rects; ++i) {
|
|
||||||
if (rects[i].w == 0 || rects[i].h == 0) {
|
|
||||||
rects[i].x = rects[i].y = 0; // empty rect needs no space
|
|
||||||
} else {
|
|
||||||
stbrp__findresult fr = stbrp__skyline_pack_rectangle(context, rects[i].w, rects[i].h);
|
|
||||||
if (fr.prev_link) {
|
|
||||||
rects[i].x = (stbrp_coord) fr.x;
|
|
||||||
rects[i].y = (stbrp_coord) fr.y;
|
|
||||||
} else {
|
|
||||||
rects[i].x = rects[i].y = STBRP__MAXVAL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// unsort
|
|
||||||
STBRP_SORT(rects, num_rects, sizeof(rects[0]), rect_original_order);
|
|
||||||
|
|
||||||
// set was_packed flags and all_rects_packed status
|
|
||||||
for (i=0; i < num_rects; ++i) {
|
|
||||||
rects[i].was_packed = !(rects[i].x == STBRP__MAXVAL && rects[i].y == STBRP__MAXVAL);
|
|
||||||
if (!rects[i].was_packed)
|
|
||||||
all_rects_packed = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// return the all_rects_packed status
|
|
||||||
return all_rects_packed;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
------------------------------------------------------------------------------
|
|
||||||
This software is available under 2 licenses -- choose whichever you prefer.
|
|
||||||
------------------------------------------------------------------------------
|
|
||||||
ALTERNATIVE A - MIT License
|
|
||||||
Copyright (c) 2017 Sean Barrett
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
this software and associated documentation files (the "Software"), to deal in
|
|
||||||
the Software without restriction, including without limitation the rights to
|
|
||||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
so, subject to the following conditions:
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
------------------------------------------------------------------------------
|
|
||||||
ALTERNATIVE B - Public Domain (www.unlicense.org)
|
|
||||||
This is free and unencumbered software released into the public domain.
|
|
||||||
Anyone is free to copy, modify, publish, use, compile, sell, or distribute this
|
|
||||||
software, either in source code form or as a compiled binary, for any purpose,
|
|
||||||
commercial or non-commercial, and by any means.
|
|
||||||
In jurisdictions that recognize copyright laws, the author or authors of this
|
|
||||||
software dedicate any and all copyright interest in the software to the public
|
|
||||||
domain. We make this dedication for the benefit of the public at large and to
|
|
||||||
the detriment of our heirs and successors. We intend this dedication to be an
|
|
||||||
overt act of relinquishment in perpetuity of all present and future rights to
|
|
||||||
this software under copyright law.
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
|
||||||
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
||||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
------------------------------------------------------------------------------
|
|
||||||
*/
|
|
||||||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -1,153 +0,0 @@
|
||||||
#ifndef MUMBLE_H
|
|
||||||
#define MUMBLE_H
|
|
||||||
|
|
||||||
struct Vector2
|
|
||||||
{
|
|
||||||
float X;
|
|
||||||
float Y;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct Vector3
|
|
||||||
{
|
|
||||||
float X;
|
|
||||||
float Y;
|
|
||||||
float Z;
|
|
||||||
};
|
|
||||||
|
|
||||||
namespace Mumble
|
|
||||||
{
|
|
||||||
/* enums */
|
|
||||||
enum class EMapType : unsigned char
|
|
||||||
{
|
|
||||||
AutoRedirect,
|
|
||||||
CharacterCreation,
|
|
||||||
PvP,
|
|
||||||
GvG,
|
|
||||||
Instance,
|
|
||||||
Public,
|
|
||||||
Tournament,
|
|
||||||
Tutorial,
|
|
||||||
UserTournament,
|
|
||||||
WvW_EternalBattlegrounds,
|
|
||||||
WvW_BlueBorderlands,
|
|
||||||
WvW_GreenBorderlands,
|
|
||||||
WvW_RedBorderlands,
|
|
||||||
WVW_FortunesVale,
|
|
||||||
WvW_ObsidianSanctum,
|
|
||||||
WvW_EdgeOfTheMists,
|
|
||||||
Public_Mini,
|
|
||||||
BigBattle,
|
|
||||||
WvW_Lounge
|
|
||||||
};
|
|
||||||
|
|
||||||
enum class EMountIndex : unsigned char
|
|
||||||
{
|
|
||||||
None,
|
|
||||||
Jackal,
|
|
||||||
Griffon,
|
|
||||||
Springer,
|
|
||||||
Skimmer,
|
|
||||||
Raptor,
|
|
||||||
RollerBeetle,
|
|
||||||
Warclaw,
|
|
||||||
Skyscale,
|
|
||||||
Skiff,
|
|
||||||
SiegeTurtle
|
|
||||||
};
|
|
||||||
|
|
||||||
enum class EProfession : unsigned char
|
|
||||||
{
|
|
||||||
None,
|
|
||||||
Guardian,
|
|
||||||
Warrior,
|
|
||||||
Engineer,
|
|
||||||
Ranger,
|
|
||||||
Thief,
|
|
||||||
Elementalist,
|
|
||||||
Mesmer,
|
|
||||||
Necromancer,
|
|
||||||
Revenant
|
|
||||||
};
|
|
||||||
|
|
||||||
enum class ERace : unsigned char
|
|
||||||
{
|
|
||||||
Asura,
|
|
||||||
Charr,
|
|
||||||
Human,
|
|
||||||
Norn,
|
|
||||||
Sylvari
|
|
||||||
};
|
|
||||||
|
|
||||||
enum class EUIScale : unsigned char
|
|
||||||
{
|
|
||||||
Small,
|
|
||||||
Normal,
|
|
||||||
Large,
|
|
||||||
Larger
|
|
||||||
};
|
|
||||||
|
|
||||||
/* structs */
|
|
||||||
struct Identity
|
|
||||||
{
|
|
||||||
char Name[20];
|
|
||||||
EProfession Profession;
|
|
||||||
unsigned Specialization;
|
|
||||||
ERace Race;
|
|
||||||
unsigned MapID;
|
|
||||||
unsigned WorldID;
|
|
||||||
unsigned TeamColorID;
|
|
||||||
bool IsCommander; // is the player currently tagged up
|
|
||||||
float FOV;
|
|
||||||
EUIScale UISize;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct Compass
|
|
||||||
{
|
|
||||||
unsigned short Width;
|
|
||||||
unsigned short Height;
|
|
||||||
float Rotation; // radians
|
|
||||||
Vector2 PlayerPosition; // continent
|
|
||||||
Vector2 Center; // continent
|
|
||||||
float Scale;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct Context
|
|
||||||
{
|
|
||||||
unsigned char ServerAddress[28]; // contains sockaddr_in or sockaddr_in6
|
|
||||||
unsigned MapID;
|
|
||||||
EMapType MapType;
|
|
||||||
unsigned ShardID;
|
|
||||||
unsigned InstanceID;
|
|
||||||
unsigned BuildID;
|
|
||||||
unsigned IsMapOpen : 1;
|
|
||||||
unsigned IsCompassTopRight : 1;
|
|
||||||
unsigned IsCompassRotating : 1;
|
|
||||||
unsigned IsGameFocused : 1;
|
|
||||||
unsigned IsCompetitive : 1;
|
|
||||||
unsigned IsTextboxFocused : 1;
|
|
||||||
unsigned IsInCombat : 1;
|
|
||||||
// unsigned UNUSED1 : 1;
|
|
||||||
Compass Compass;
|
|
||||||
unsigned ProcessID;
|
|
||||||
EMountIndex MountIndex;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct Data
|
|
||||||
{
|
|
||||||
unsigned UIVersion;
|
|
||||||
unsigned UITick;
|
|
||||||
Vector3 AvatarPosition;
|
|
||||||
Vector3 AvatarFront;
|
|
||||||
Vector3 AvatarTop;
|
|
||||||
wchar_t Name[256];
|
|
||||||
Vector3 CameraPosition;
|
|
||||||
Vector3 CameraFront;
|
|
||||||
Vector3 CameraTop;
|
|
||||||
wchar_t Identity[256];
|
|
||||||
unsigned ContextLength;
|
|
||||||
Context Context;
|
|
||||||
wchar_t Description[2048];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -1,79 +0,0 @@
|
||||||
#include <Windows.h>
|
|
||||||
#include <string>
|
|
||||||
#include "Common/Globals.h"
|
|
||||||
#include "Utils/FileUtils.h"
|
|
||||||
#include "Utils/MapUtils.h"
|
|
||||||
#include "Config/ConfigManager.h"
|
|
||||||
#include "Config/TemplateManager.h"
|
|
||||||
#include "UI/UIManager.h"
|
|
||||||
#include "Input/KeybindManager.h"
|
|
||||||
#include "Dependencies/imgui/imgui.h"
|
|
||||||
|
|
||||||
void Load(AddonAPI* aApi) {
|
|
||||||
g_api = aApi;
|
|
||||||
|
|
||||||
ImGui::SetCurrentContext((ImGuiContext*)g_api->ImguiContext);
|
|
||||||
ImGui::SetAllocatorFunctions((void* (*)(size_t, void*))g_api->ImguiMalloc, (void(*)(void*, void*))g_api->ImguiFree);
|
|
||||||
|
|
||||||
g_nexusLink = (NexusLinkData*)g_api->DataLink.Get("DL_NEXUS_LINK");
|
|
||||||
|
|
||||||
g_mumbleData = (Mumble::Data*)g_api->DataLink.Get("DL_MUMBLE_LINK");
|
|
||||||
|
|
||||||
g_state.enabled = true;
|
|
||||||
|
|
||||||
ConfigManager::LoadCustomDelaySettings();
|
|
||||||
TemplateManager::LoadTemplates();
|
|
||||||
|
|
||||||
if (g_state.alwaysLoadLastSettings) {
|
|
||||||
ConfigManager::LoadLastUsedSettings();
|
|
||||||
}
|
|
||||||
|
|
||||||
FileUtils::CopyResourceIcons();
|
|
||||||
|
|
||||||
g_api->Renderer.Register(ERenderType_Render, UIManager::RenderUI);
|
|
||||||
g_api->Renderer.Register(ERenderType_OptionsRender, UIManager::RenderOptions);
|
|
||||||
|
|
||||||
KeybindManager::RegisterKeybinds();
|
|
||||||
|
|
||||||
g_api->Textures.GetOrCreateFromFile("GOLEM_HELPER_ICON", "addons/GolemHelper/icons/GOLEM_HELPER_ICON.png");
|
|
||||||
g_api->Textures.GetOrCreateFromFile("GOLEM_HELPER_ICON_HOVER", "addons/GolemHelper/icons/GOLEM_HELPER_ICON_HOVER.png");
|
|
||||||
|
|
||||||
MapUtils::UpdateQuickAccessVisibility();
|
|
||||||
|
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", "=== GolemHelper v1.7.1.0 Loaded ===");
|
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", "<c=#00ff00>GolemHelper addon</c> loaded successfully!");
|
|
||||||
}
|
|
||||||
|
|
||||||
void Unload() {
|
|
||||||
if (g_api) {
|
|
||||||
if (g_state.quickAccessVisible) {
|
|
||||||
g_api->QuickAccess.Remove("GolemHelper.ToggleUI");
|
|
||||||
}
|
|
||||||
g_api->Renderer.Deregister(UIManager::RenderUI);
|
|
||||||
g_api->Renderer.Deregister(UIManager::RenderOptions);
|
|
||||||
KeybindManager::UnregisterKeybinds();
|
|
||||||
}
|
|
||||||
|
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", "<c=#ff0000>GolemHelper signing off</c>, it was an honor commander.");
|
|
||||||
g_api = nullptr;
|
|
||||||
g_mumbleData = nullptr;
|
|
||||||
g_state.enabled = false;
|
|
||||||
g_state.showUI = false;
|
|
||||||
g_state.quickAccessVisible = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
extern "C" __declspec(dllexport) AddonDefinition* GetAddonDef() {
|
|
||||||
static AddonDefinition def;
|
|
||||||
def.Signature = -424248;
|
|
||||||
def.APIVersion = NEXUS_API_VERSION;
|
|
||||||
def.Name = "GolemHelper";
|
|
||||||
def.Version = { 1, 7, 1, 0 };
|
|
||||||
def.Author = "Azrub";
|
|
||||||
def.Description = "Automates the process of setting optimal boon and golem configurations in the training area";
|
|
||||||
def.Load = Load;
|
|
||||||
def.Unload = Unload;
|
|
||||||
def.Flags = EAddonFlags_None;
|
|
||||||
def.Provider = EUpdateProvider_Direct;
|
|
||||||
def.UpdateLink = "https://git.azrub.dev/Azrub/GolemHelper/releases/download/latest/GolemHelper.dll";
|
|
||||||
return &def;
|
|
||||||
}
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
#pragma once
|
|
||||||
#include "Dependencies/nexus/Nexus.h"
|
|
||||||
|
|
||||||
void Load(AddonAPI* aApi);
|
|
||||||
void Unload();
|
|
||||||
extern "C" __declspec(dllexport) AddonDefinition* GetAddonDef();
|
|
||||||
Binary file not shown.
|
|
@ -76,11 +76,8 @@
|
||||||
<SDLCheck>true</SDLCheck>
|
<SDLCheck>true</SDLCheck>
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;GOLEMHELPER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;_DEBUG;GOLEMHELPER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<ConformanceMode>true</ConformanceMode>
|
<ConformanceMode>true</ConformanceMode>
|
||||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
<PrecompiledHeaderFile>
|
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||||
</PrecompiledHeaderFile>
|
|
||||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
|
||||||
<PrecompiledHeaderOutputFile />
|
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
|
|
@ -96,11 +93,8 @@
|
||||||
<SDLCheck>true</SDLCheck>
|
<SDLCheck>true</SDLCheck>
|
||||||
<PreprocessorDefinitions>WIN32;NDEBUG;GOLEMHELPER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;NDEBUG;GOLEMHELPER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<ConformanceMode>true</ConformanceMode>
|
<ConformanceMode>true</ConformanceMode>
|
||||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
<PrecompiledHeaderFile>
|
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||||
</PrecompiledHeaderFile>
|
|
||||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
|
||||||
<PrecompiledHeaderOutputFile />
|
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
|
|
@ -116,11 +110,9 @@
|
||||||
<SDLCheck>true</SDLCheck>
|
<SDLCheck>true</SDLCheck>
|
||||||
<PreprocessorDefinitions>_DEBUG;GOLEMHELPER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_DEBUG;GOLEMHELPER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<ConformanceMode>true</ConformanceMode>
|
<ConformanceMode>true</ConformanceMode>
|
||||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
<PrecompiledHeaderFile>
|
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||||
</PrecompiledHeaderFile>
|
|
||||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||||
<PrecompiledHeaderOutputFile />
|
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
|
|
@ -136,11 +128,9 @@
|
||||||
<SDLCheck>true</SDLCheck>
|
<SDLCheck>true</SDLCheck>
|
||||||
<PreprocessorDefinitions>NDEBUG;GOLEMHELPER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>NDEBUG;GOLEMHELPER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<ConformanceMode>true</ConformanceMode>
|
<ConformanceMode>true</ConformanceMode>
|
||||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
<PrecompiledHeaderFile>
|
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||||
</PrecompiledHeaderFile>
|
|
||||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||||
<PrecompiledHeaderOutputFile />
|
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
|
|
@ -151,82 +141,18 @@
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="Automation\AutomationLogic.h" />
|
<ClInclude Include="Definitions\Nexus.h" />
|
||||||
<ClInclude Include="Automation\CoordinateUtils.h" />
|
<ClInclude Include="framework.h" />
|
||||||
<ClInclude Include="Common\Globals.h" />
|
<ClInclude Include="pch.h" />
|
||||||
<ClInclude Include="Common\MenuSequences.h" />
|
|
||||||
<ClInclude Include="Common\Types.h" />
|
|
||||||
<ClInclude Include="Config\ConfigManager.h" />
|
|
||||||
<ClInclude Include="Config\TemplateManager.h" />
|
|
||||||
<ClInclude Include="Dependencies\imgui\imconfig.h" />
|
|
||||||
<ClInclude Include="Dependencies\imgui\imgui.h" />
|
|
||||||
<ClInclude Include="Dependencies\imgui\imgui_internal.h" />
|
|
||||||
<ClInclude Include="Dependencies\imgui\imstb_rectpack.h" />
|
|
||||||
<ClInclude Include="Dependencies\imgui\imstb_textedit.h" />
|
|
||||||
<ClInclude Include="Dependencies\imgui\imstb_truetype.h" />
|
|
||||||
<ClInclude Include="Dependencies\mumble\Mumble.h" />
|
|
||||||
<ClInclude Include="Dependencies\nexus\Nexus.h" />
|
|
||||||
<ClInclude Include="GolemHelper.h" />
|
|
||||||
<ClInclude Include="Input\KeybindManager.h" />
|
|
||||||
<ClInclude Include="resource.h" />
|
|
||||||
<ClInclude Include="UI\UIManager.h" />
|
|
||||||
<ClInclude Include="Utils\FileUtils.h" />
|
|
||||||
<ClInclude Include="Utils\MapUtils.h" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="Automation\AutomationLogic.cpp" />
|
<ClCompile Include="dllmain.cpp" />
|
||||||
<ClCompile Include="Automation\CoordinateUtils.cpp" />
|
<ClCompile Include="pch.cpp">
|
||||||
<ClCompile Include="Common\Globals.cpp" />
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
|
||||||
<ClCompile Include="Config\ConfigManager.cpp" />
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
||||||
<ClCompile Include="Config\TemplateManager.cpp" />
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
||||||
<ClCompile Include="Dependencies\imgui\imgui.cpp">
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader>
|
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NotUsing</PrecompiledHeader>
|
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="Dependencies\imgui\imgui_demo.cpp">
|
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader>
|
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NotUsing</PrecompiledHeader>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="Dependencies\imgui\imgui_draw.cpp">
|
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader>
|
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NotUsing</PrecompiledHeader>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="Dependencies\imgui\imgui_tables.cpp">
|
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader>
|
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NotUsing</PrecompiledHeader>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="Dependencies\imgui\imgui_widgets.cpp">
|
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader>
|
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NotUsing</PrecompiledHeader>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="dllmain.cpp">
|
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader>
|
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NotUsing</PrecompiledHeader>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="GolemHelper.cpp" />
|
|
||||||
<ClCompile Include="Input\KeybindManager.cpp" />
|
|
||||||
<ClCompile Include="UI\UIManager.cpp" />
|
|
||||||
<ClCompile Include="Utils\FileUtils.cpp" />
|
|
||||||
<ClCompile Include="Utils\MapUtils.cpp" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ResourceCompile Include="GolemHelper.rc" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Image Include="Resources\GOLEM_HELPER_ICON.png" />
|
|
||||||
<Image Include="Resources\GOLEM_HELPER_ICON_HOVER.png" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<ImportGroup Label="ExtensionTargets">
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
|
|
||||||
|
|
@ -13,166 +13,27 @@
|
||||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||||
</Filter>
|
</Filter>
|
||||||
<Filter Include="Dependencies">
|
<Filter Include="Definitions">
|
||||||
<UniqueIdentifier>{27275069-8d0e-4c32-a745-abf5ae2384a5}</UniqueIdentifier>
|
<UniqueIdentifier>{076f83a5-9043-4392-bb42-102eb54d65fb}</UniqueIdentifier>
|
||||||
</Filter>
|
|
||||||
<Filter Include="Dependencies\imgui">
|
|
||||||
<UniqueIdentifier>{b8f45b0c-762e-42a8-8874-f613a6868415}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="Dependencies\mumble">
|
|
||||||
<UniqueIdentifier>{f98a3cf3-1848-4f30-ae62-50d10c81cf6f}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="Dependencies\nexus">
|
|
||||||
<UniqueIdentifier>{9474c716-f028-4778-8cd0-b5d8292d1586}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="Resources">
|
|
||||||
<UniqueIdentifier>{07fb10f3-1f9b-483c-8721-e22bfe687792}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="Common">
|
|
||||||
<UniqueIdentifier>{b4daf0a2-ce7a-4961-b877-492964d4659a}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="Utils">
|
|
||||||
<UniqueIdentifier>{2822a502-cacf-4886-9672-0fcc32ee7086}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="Config">
|
|
||||||
<UniqueIdentifier>{b37262c0-bd49-4acd-8713-e2667f4bc9fe}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="Automation">
|
|
||||||
<UniqueIdentifier>{a9946213-e275-4fc2-989d-aff381613895}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="UI">
|
|
||||||
<UniqueIdentifier>{4bbec8bd-548f-4efa-969c-af01a3e7e43f}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="Input">
|
|
||||||
<UniqueIdentifier>{f74436fc-a159-4a48-8ac8-f79f20fb657f}</UniqueIdentifier>
|
|
||||||
</Filter>
|
</Filter>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="Dependencies\imgui\imconfig.h">
|
<ClInclude Include="framework.h">
|
||||||
<Filter>Dependencies\imgui</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="Dependencies\imgui\imgui.h">
|
|
||||||
<Filter>Dependencies\imgui</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="Dependencies\imgui\imgui_internal.h">
|
|
||||||
<Filter>Dependencies\imgui</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="Dependencies\imgui\imstb_rectpack.h">
|
|
||||||
<Filter>Dependencies\imgui</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="Dependencies\imgui\imstb_textedit.h">
|
|
||||||
<Filter>Dependencies\imgui</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="Dependencies\imgui\imstb_truetype.h">
|
|
||||||
<Filter>Dependencies\imgui</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="Dependencies\mumble\Mumble.h">
|
|
||||||
<Filter>Dependencies\mumble</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="Dependencies\nexus\Nexus.h">
|
|
||||||
<Filter>Dependencies\nexus</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="resource.h">
|
|
||||||
<Filter>File di intestazione</Filter>
|
<Filter>File di intestazione</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="Common\Globals.h">
|
<ClInclude Include="pch.h">
|
||||||
<Filter>Common</Filter>
|
<Filter>File di intestazione</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="Common\Types.h">
|
<ClInclude Include="Definitions\Nexus.h">
|
||||||
<Filter>Common</Filter>
|
<Filter>Definitions</Filter>
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="Utils\FileUtils.h">
|
|
||||||
<Filter>Utils</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="Config\ConfigManager.h">
|
|
||||||
<Filter>Config</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="Automation\AutomationLogic.h">
|
|
||||||
<Filter>Automation</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="Automation\CoordinateUtils.h">
|
|
||||||
<Filter>Automation</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="UI\UIManager.h">
|
|
||||||
<Filter>UI</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="Input\KeybindManager.h">
|
|
||||||
<Filter>Input</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="GolemHelper.h">
|
|
||||||
<Filter>File di origine</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="Utils\MapUtils.h">
|
|
||||||
<Filter>Utils</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="Config\TemplateManager.h">
|
|
||||||
<Filter>Config</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="Common\MenuSequences.h">
|
|
||||||
<Filter>Common</Filter>
|
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="dllmain.cpp">
|
<ClCompile Include="dllmain.cpp">
|
||||||
<Filter>File di origine</Filter>
|
<Filter>File di origine</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="Dependencies\imgui\imgui.cpp">
|
<ClCompile Include="pch.cpp">
|
||||||
<Filter>Dependencies\imgui</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="Dependencies\imgui\imgui_demo.cpp">
|
|
||||||
<Filter>Dependencies\imgui</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="Dependencies\imgui\imgui_draw.cpp">
|
|
||||||
<Filter>Dependencies\imgui</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="Dependencies\imgui\imgui_tables.cpp">
|
|
||||||
<Filter>Dependencies\imgui</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="Dependencies\imgui\imgui_widgets.cpp">
|
|
||||||
<Filter>Dependencies\imgui</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="Common\Globals.cpp">
|
|
||||||
<Filter>Common</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="Utils\FileUtils.cpp">
|
|
||||||
<Filter>Utils</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="Config\ConfigManager.cpp">
|
|
||||||
<Filter>Config</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="Automation\AutomationLogic.cpp">
|
|
||||||
<Filter>Automation</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="Automation\CoordinateUtils.cpp">
|
|
||||||
<Filter>Automation</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="UI\UIManager.cpp">
|
|
||||||
<Filter>UI</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="Input\KeybindManager.cpp">
|
|
||||||
<Filter>Input</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="GolemHelper.cpp">
|
|
||||||
<Filter>File di origine</Filter>
|
<Filter>File di origine</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="Utils\MapUtils.cpp">
|
|
||||||
<Filter>Utils</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="Config\TemplateManager.cpp">
|
|
||||||
<Filter>Config</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ResourceCompile Include="GolemHelper.rc">
|
|
||||||
<Filter>File di risorse</Filter>
|
|
||||||
</ResourceCompile>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Image Include="Resources\GOLEM_HELPER_ICON.png">
|
|
||||||
<Filter>File di risorse</Filter>
|
|
||||||
</Image>
|
|
||||||
<Image Include="Resources\GOLEM_HELPER_ICON_HOVER.png">
|
|
||||||
<Filter>File di risorse</Filter>
|
|
||||||
</Image>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
4
GolemHelper/GolemHelper.vcxproj.user
Normal file
4
GolemHelper/GolemHelper.vcxproj.user
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup />
|
||||||
|
</Project>
|
||||||
|
|
@ -1,98 +0,0 @@
|
||||||
#include <Windows.h>
|
|
||||||
#include <string>
|
|
||||||
#include "KeybindManager.h"
|
|
||||||
#include "../Common/Globals.h"
|
|
||||||
#include "../Automation/AutomationLogic.h"
|
|
||||||
#include "../Automation/CoordinateUtils.h"
|
|
||||||
|
|
||||||
void KeybindManager::RegisterKeybinds() {
|
|
||||||
if (!g_api) return;
|
|
||||||
|
|
||||||
Keybind kb_empty = { 0, false, false, false };
|
|
||||||
g_api->InputBinds.RegisterWithStruct("GolemHelper.ApplyBoons", HandleBoonKeybind, kb_empty);
|
|
||||||
g_api->InputBinds.RegisterWithStruct("GolemHelper.SpawnGolem", HandleGolemKeybind, kb_empty);
|
|
||||||
g_api->InputBinds.RegisterWithStruct("GolemHelper.RespawnGolem", HandleRespawnGolemKeybind, kb_empty);
|
|
||||||
g_api->InputBinds.RegisterWithStruct("GolemHelper.RemoveAndRespawnGolem", HandleRemoveAndRespawnGolemKeybind, kb_empty);
|
|
||||||
g_api->InputBinds.RegisterWithStruct("GolemHelper.QuickDPS", HandleQuickDpsKeybind, kb_empty);
|
|
||||||
g_api->InputBinds.RegisterWithStruct("GolemHelper.AlacDPS", HandleAlacDpsKeybind, kb_empty);
|
|
||||||
g_api->InputBinds.RegisterWithStruct("GolemHelper.Toggle", HandleToggleKeybind, kb_empty);
|
|
||||||
g_api->InputBinds.RegisterWithStruct("GolemHelper.ToggleUI", HandleUIToggleKeybind, kb_empty);
|
|
||||||
g_api->InputBinds.RegisterWithStruct("GolemHelper.DebugMouse", HandleDebugKeybind, kb_empty);
|
|
||||||
}
|
|
||||||
|
|
||||||
void KeybindManager::UnregisterKeybinds() {
|
|
||||||
if (!g_api) return;
|
|
||||||
|
|
||||||
g_api->InputBinds.Deregister("GolemHelper.ApplyBoons");
|
|
||||||
g_api->InputBinds.Deregister("GolemHelper.SpawnGolem");
|
|
||||||
g_api->InputBinds.Deregister("GolemHelper.RespawnGolem");
|
|
||||||
g_api->InputBinds.Deregister("GolemHelper.RemoveAndRespawnGolem");
|
|
||||||
g_api->InputBinds.Deregister("GolemHelper.QuickDPS");
|
|
||||||
g_api->InputBinds.Deregister("GolemHelper.AlacDPS");
|
|
||||||
g_api->InputBinds.Deregister("GolemHelper.Toggle");
|
|
||||||
g_api->InputBinds.Deregister("GolemHelper.ToggleUI");
|
|
||||||
g_api->InputBinds.Deregister("GolemHelper.DebugMouse");
|
|
||||||
}
|
|
||||||
|
|
||||||
void KeybindManager::HandleBoonKeybind(const char* id, bool release) {
|
|
||||||
if (!release && g_state.enabled) {
|
|
||||||
AutomationLogic::ApplyBoons();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void KeybindManager::HandleGolemKeybind(const char* id, bool release) {
|
|
||||||
if (!release && g_state.enabled) {
|
|
||||||
AutomationLogic::SpawnGolem();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void KeybindManager::HandleRespawnGolemKeybind(const char* id, bool release) {
|
|
||||||
if (!release && g_state.enabled) {
|
|
||||||
AutomationLogic::RespawnGolem();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void KeybindManager::HandleRemoveAndRespawnGolemKeybind(const char* id, bool release) {
|
|
||||||
if (!release && g_state.enabled) {
|
|
||||||
AutomationLogic::RemoveAndRespawnGolem();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void KeybindManager::HandleToggleKeybind(const char* id, bool release) {
|
|
||||||
if (!release) {
|
|
||||||
g_state.enabled = !g_state.enabled;
|
|
||||||
g_api->UI.SendAlert(g_state.enabled ? "GolemHelper enabled" : "GolemHelper disabled");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void KeybindManager::HandleUIToggleKeybind(const char* id, bool release) {
|
|
||||||
if (!release) {
|
|
||||||
g_state.showUI = !g_state.showUI;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void KeybindManager::HandleDebugKeybind(const char* id, bool release) {
|
|
||||||
if (!release) {
|
|
||||||
CoordinateUtils::DebugMousePosition();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void KeybindManager::HandleQuickDpsKeybind(const char* id, bool release) {
|
|
||||||
if (!release) {
|
|
||||||
g_state.isQuickDps = !g_state.isQuickDps;
|
|
||||||
if (g_state.isQuickDps) {
|
|
||||||
g_state.isAlacDps = false;
|
|
||||||
}
|
|
||||||
g_api->UI.SendAlert(g_state.isQuickDps ? "Quick DPS mode enabled" : "Quick DPS mode disabled");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void KeybindManager::HandleAlacDpsKeybind(const char* id, bool release) {
|
|
||||||
if (!release) {
|
|
||||||
g_state.isAlacDps = !g_state.isAlacDps;
|
|
||||||
if (g_state.isAlacDps) {
|
|
||||||
g_state.isQuickDps = false;
|
|
||||||
}
|
|
||||||
g_api->UI.SendAlert(g_state.isAlacDps ? "Alac DPS mode enabled" : "Alac DPS mode disabled");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
#pragma once
|
|
||||||
|
|
||||||
class KeybindManager {
|
|
||||||
public:
|
|
||||||
static void RegisterKeybinds();
|
|
||||||
static void UnregisterKeybinds();
|
|
||||||
|
|
||||||
static void HandleBoonKeybind(const char* id, bool release);
|
|
||||||
static void HandleGolemKeybind(const char* id, bool release);
|
|
||||||
static void HandleRespawnGolemKeybind(const char* id, bool release);
|
|
||||||
static void HandleRemoveAndRespawnGolemKeybind(const char* id, bool release);
|
|
||||||
static void HandleQuickDpsKeybind(const char* id, bool release);
|
|
||||||
static void HandleAlacDpsKeybind(const char* id, bool release);
|
|
||||||
static void HandleToggleKeybind(const char* id, bool release);
|
|
||||||
static void HandleUIToggleKeybind(const char* id, bool release);
|
|
||||||
static void HandleDebugKeybind(const char* id, bool release);
|
|
||||||
};
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.4 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.7 KiB |
|
|
@ -1,640 +0,0 @@
|
||||||
#include <Windows.h>
|
|
||||||
#include <string>
|
|
||||||
#include "UIManager.h"
|
|
||||||
#include "../Common/Globals.h"
|
|
||||||
#include "../Config/ConfigManager.h"
|
|
||||||
#include "../Utils/MapUtils.h"
|
|
||||||
#include "../Config/TemplateManager.h"
|
|
||||||
#include "../Automation/CoordinateUtils.h"
|
|
||||||
#include "../Dependencies/imgui/imgui.h"
|
|
||||||
|
|
||||||
void UIManager::RenderUI() {
|
|
||||||
MapUtils::UpdateQuickAccessVisibility();
|
|
||||||
|
|
||||||
CoordinateUtils::UpdateCalibrationCapture();
|
|
||||||
|
|
||||||
if (!g_state.showUI) return;
|
|
||||||
|
|
||||||
ImGui::SetNextWindowSize(ImVec2(450, 600), ImGuiCond_FirstUseEver);
|
|
||||||
ImGui::SetNextWindowPos(ImVec2(50, 50), ImGuiCond_FirstUseEver);
|
|
||||||
|
|
||||||
if (ImGui::Begin("GolemHelper", &g_state.showUI, ImGuiWindowFlags_AlwaysAutoResize)) {
|
|
||||||
|
|
||||||
ImGui::TextColored(ImVec4(0.2f, 0.8f, 1.0f, 1.0f), "GolemHelper v1.7.1.0");
|
|
||||||
ImGui::Separator();
|
|
||||||
|
|
||||||
if (ImGui::BeginTabBar("GolemHelperTabs", ImGuiTabBarFlags_None)) {
|
|
||||||
|
|
||||||
if (ImGui::BeginTabItem("Settings")) {
|
|
||||||
RenderSettingsTab();
|
|
||||||
ImGui::EndTabItem();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ImGui::BeginTabItem("Templates")) {
|
|
||||||
RenderTemplatesTab();
|
|
||||||
ImGui::EndTabItem();
|
|
||||||
}
|
|
||||||
|
|
||||||
ImGui::EndTabBar();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ImGui::End();
|
|
||||||
}
|
|
||||||
|
|
||||||
void UIManager::RenderSettingsTab() {
|
|
||||||
ImGui::Text("Boon Configuration");
|
|
||||||
|
|
||||||
if (ImGui::Button("Apply Boons", ImVec2(130, 0))) {
|
|
||||||
if (g_state.enabled && MapUtils::IsInTrainingArea()) {
|
|
||||||
g_api->InputBinds.Invoke("GolemHelper.ApplyBoons", false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ImGui::Text(g_state.environmentDamage ? "Healer Modes:" : "DPS Modes:");
|
|
||||||
|
|
||||||
if (g_state.environmentDamage) {
|
|
||||||
ImGui::PushStyleVar(ImGuiStyleVar_Alpha, 0.6f);
|
|
||||||
ImGui::RadioButton("Normal Mode", false);
|
|
||||||
ImGui::PopStyleVar();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (ImGui::RadioButton("Normal Mode", !g_state.isQuickDps && !g_state.isAlacDps)) {
|
|
||||||
g_state.isQuickDps = false;
|
|
||||||
g_state.isAlacDps = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ImGui::RadioButton(g_state.environmentDamage ? "qHeal (Skip Quickness)" : "Quick DPS (Skip Quickness)", g_state.isQuickDps)) {
|
|
||||||
g_state.isQuickDps = true;
|
|
||||||
g_state.isAlacDps = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ImGui::RadioButton(g_state.environmentDamage ? "aHeal (Skip Alacrity)" : "Alac DPS (Skip Alacrity)", g_state.isAlacDps)) {
|
|
||||||
g_state.isQuickDps = false;
|
|
||||||
g_state.isAlacDps = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
ImGui::Spacing();
|
|
||||||
ImGui::Text("Advanced:");
|
|
||||||
|
|
||||||
if (g_state.environmentDamage) {
|
|
||||||
ImGui::PushStyleVar(ImGuiStyleVar_Alpha, 0.6f);
|
|
||||||
ImGui::Checkbox("Boon Settings", &g_state.showBoonAdvanced);
|
|
||||||
g_state.showBoonAdvanced = false;
|
|
||||||
ImGui::PopStyleVar();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
ImGui::Checkbox("Boon Settings", &g_state.showBoonAdvanced);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (g_state.showBoonAdvanced && !g_state.environmentDamage) {
|
|
||||||
ImGui::Checkbox("Add Resistance", &g_state.addResistance);
|
|
||||||
ImGui::Checkbox("Add Stability", &g_state.addStability);
|
|
||||||
ImGui::Checkbox("Skip Aegis", &g_state.skipAegis);
|
|
||||||
}
|
|
||||||
|
|
||||||
ImGui::Spacing();
|
|
||||||
ImGui::Text("Healer Bench:");
|
|
||||||
|
|
||||||
bool wasEnvironmentDamage = g_state.environmentDamage;
|
|
||||||
ImGui::Checkbox("Environment Damage", &g_state.environmentDamage);
|
|
||||||
|
|
||||||
if (g_state.environmentDamage && !wasEnvironmentDamage) {
|
|
||||||
if (!g_state.isQuickDps && !g_state.isAlacDps) {
|
|
||||||
g_state.isQuickDps = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (g_state.environmentDamage) {
|
|
||||||
if (ImGui::RadioButton("Mild", g_state.envDamageLevel == ENV_MILD)) {
|
|
||||||
g_state.envDamageLevel = ENV_MILD;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ImGui::RadioButton("Moderate", g_state.envDamageLevel == ENV_MODERATE)) {
|
|
||||||
g_state.envDamageLevel = ENV_MODERATE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ImGui::RadioButton("Extreme", g_state.envDamageLevel == ENV_EXTREME)) {
|
|
||||||
g_state.envDamageLevel = ENV_EXTREME;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ImGui::Spacing();
|
|
||||||
ImGui::Separator();
|
|
||||||
|
|
||||||
ImGui::Text("Golem Configuration");
|
|
||||||
|
|
||||||
if (ImGui::Button("Spawn Golem", ImVec2(110, 0))) {
|
|
||||||
if (g_state.enabled && MapUtils::IsInTrainingArea()) {
|
|
||||||
g_api->InputBinds.Invoke("GolemHelper.SpawnGolem", false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ImGui::SameLine(0, 5);
|
|
||||||
if (ImGui::Button("Respawn", ImVec2(80, 0))) {
|
|
||||||
if (g_state.enabled && MapUtils::IsInTrainingArea()) {
|
|
||||||
g_api->InputBinds.Invoke("GolemHelper.RespawnGolem", false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ImGui::Spacing();
|
|
||||||
|
|
||||||
if (ImGui::Button("Remove and Respawn", ImVec2(150, 0))) {
|
|
||||||
if (g_state.enabled && MapUtils::IsInTrainingArea()) {
|
|
||||||
g_api->InputBinds.Invoke("GolemHelper.RemoveAndRespawnGolem", false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ImGui::Text("Golem Hitbox:");
|
|
||||||
|
|
||||||
if (ImGui::RadioButton("Small (Benchmark Default)", g_state.hitboxType == HITBOX_SMALL)) {
|
|
||||||
g_state.hitboxType = HITBOX_SMALL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ImGui::RadioButton("Medium", g_state.hitboxType == HITBOX_MEDIUM)) {
|
|
||||||
g_state.hitboxType = HITBOX_MEDIUM;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ImGui::RadioButton("Large", g_state.hitboxType == HITBOX_LARGE)) {
|
|
||||||
g_state.hitboxType = HITBOX_LARGE;
|
|
||||||
}
|
|
||||||
|
|
||||||
ImGui::Spacing();
|
|
||||||
ImGui::Text("Advanced:");
|
|
||||||
|
|
||||||
ImGui::Checkbox("Condition Settings", &g_state.showAdvanced);
|
|
||||||
|
|
||||||
if (g_state.showAdvanced) {
|
|
||||||
ImGui::Checkbox("Skip Burning", &g_state.skipBurning);
|
|
||||||
ImGui::Checkbox("Skip Confusion", &g_state.skipConfusion);
|
|
||||||
ImGui::Checkbox("Skip Slow", &g_state.skipSlow);
|
|
||||||
ImGui::Checkbox("Add Immobilize", &g_state.addImmobilize);
|
|
||||||
ImGui::Checkbox("Add Blind", &g_state.addBlind);
|
|
||||||
ImGui::Checkbox("5 Bleeding Stacks", &g_state.fiveBleedingStacks);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (g_state.debugMode) {
|
|
||||||
ImGui::Spacing();
|
|
||||||
ImGui::Separator();
|
|
||||||
ImGui::Text("Display Info:");
|
|
||||||
if (g_nexusLink && g_nexusLink->Width > 0 && g_nexusLink->Height > 0) {
|
|
||||||
ImGui::Text("Resolution: %dx%d", g_nexusLink->Width, g_nexusLink->Height);
|
|
||||||
ImGui::Text("UI Scale: %.2f", g_nexusLink->Scaling);
|
|
||||||
float dpiScale = (float)g_nexusLink->Width / 1920.0f;
|
|
||||||
ImGui::Text("DPI Scale: %.3f", dpiScale);
|
|
||||||
ImGui::Text("Debug samples: %d", g_state.debugCounter);
|
|
||||||
}
|
|
||||||
|
|
||||||
ImGui::Spacing();
|
|
||||||
ImGui::Text("Map Info:");
|
|
||||||
unsigned int currentMapID = MapUtils::GetCurrentMapID();
|
|
||||||
ImGui::Text("Current MapID: %u", currentMapID);
|
|
||||||
ImGui::Text("Is Training Area: %s", MapUtils::IsInTrainingArea() ? "YES" : "NO");
|
|
||||||
ImGui::Text("QuickAccess Visible: %s", g_state.quickAccessVisible ? "YES" : "NO");
|
|
||||||
}
|
|
||||||
|
|
||||||
ImGui::Spacing();
|
|
||||||
ImGui::Separator();
|
|
||||||
|
|
||||||
ImGui::PushStyleColor(ImGuiCol_Header, ImVec4(0.0f, 0.0f, 0.0f, 0.0f));
|
|
||||||
ImGui::PushStyleColor(ImGuiCol_HeaderHovered, ImVec4(0.3f, 0.5f, 0.7f, 0.8f));
|
|
||||||
if (ImGui::CollapsingHeader("Set Custom Delays")) {
|
|
||||||
|
|
||||||
int oldStepDelay = g_state.stepDelay;
|
|
||||||
int oldInitialDelay = g_state.initialDelay;
|
|
||||||
|
|
||||||
ImGui::Text("Initial Delay (after F key):");
|
|
||||||
ImGui::SetNextItemWidth(200);
|
|
||||||
ImGui::SliderInt("##initial", &g_state.initialDelay, 100, 1000, "%d ms");
|
|
||||||
|
|
||||||
ImGui::Text("Step Delay (between clicks):");
|
|
||||||
ImGui::SetNextItemWidth(200);
|
|
||||||
ImGui::SliderInt("##step", &g_state.stepDelay, 100, 1000, "%d ms");
|
|
||||||
|
|
||||||
ImGui::Spacing();
|
|
||||||
|
|
||||||
if (ImGui::Button("Reset to Default", ImVec2(117, 0))) {
|
|
||||||
g_state.stepDelay = 290;
|
|
||||||
g_state.initialDelay = 390;
|
|
||||||
ConfigManager::SaveCustomDelaySettings();
|
|
||||||
}
|
|
||||||
ImGui::SameLine(0, 5);
|
|
||||||
if (ImGui::Button("Slow Mode", ImVec2(78, 0))) {
|
|
||||||
g_state.stepDelay = 1000;
|
|
||||||
g_state.initialDelay = 600;
|
|
||||||
ConfigManager::SaveCustomDelaySettings();
|
|
||||||
}
|
|
||||||
|
|
||||||
ImGui::Spacing();
|
|
||||||
ImGui::TextColored(ImVec4(0.8f, 0.8f, 0.2f, 1.0f), "Increase delays if clicks fail");
|
|
||||||
ImGui::TextColored(ImVec4(0.8f, 0.8f, 0.2f, 1.0f), "or calibrate in Options");
|
|
||||||
|
|
||||||
if (oldStepDelay != g_state.stepDelay || oldInitialDelay != g_state.initialDelay) {
|
|
||||||
ConfigManager::SaveCustomDelaySettings();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ImGui::PopStyleColor(2);
|
|
||||||
|
|
||||||
if (g_state.alwaysLoadLastSettings) {
|
|
||||||
static bool lastIsQuickDps = g_state.isQuickDps;
|
|
||||||
static bool lastIsAlacDps = g_state.isAlacDps;
|
|
||||||
static bool lastEnvironmentDamage = g_state.environmentDamage;
|
|
||||||
static EnvironmentDamageLevel lastEnvDamageLevel = g_state.envDamageLevel;
|
|
||||||
static bool lastSkipBurning = g_state.skipBurning;
|
|
||||||
static bool lastSkipConfusion = g_state.skipConfusion;
|
|
||||||
static bool lastSkipSlow = g_state.skipSlow;
|
|
||||||
static bool lastAddImmobilize = g_state.addImmobilize;
|
|
||||||
static bool lastAddBlind = g_state.addBlind;
|
|
||||||
static bool lastFiveBleedingStacks = g_state.fiveBleedingStacks;
|
|
||||||
static HitboxType lastHitboxType = g_state.hitboxType;
|
|
||||||
static bool lastAddResistance = g_state.addResistance;
|
|
||||||
static bool lastAddStability = g_state.addStability;
|
|
||||||
static bool lastSkipAegis = g_state.skipAegis;
|
|
||||||
static bool lastShowBoonAdvanced = g_state.showBoonAdvanced;
|
|
||||||
static bool lastShowAdvanced = g_state.showAdvanced;
|
|
||||||
|
|
||||||
if (lastIsQuickDps != g_state.isQuickDps ||
|
|
||||||
lastIsAlacDps != g_state.isAlacDps ||
|
|
||||||
lastEnvironmentDamage != g_state.environmentDamage ||
|
|
||||||
lastEnvDamageLevel != g_state.envDamageLevel ||
|
|
||||||
lastSkipBurning != g_state.skipBurning ||
|
|
||||||
lastSkipConfusion != g_state.skipConfusion ||
|
|
||||||
lastSkipSlow != g_state.skipSlow ||
|
|
||||||
lastAddImmobilize != g_state.addImmobilize ||
|
|
||||||
lastAddBlind != g_state.addBlind ||
|
|
||||||
lastFiveBleedingStacks != g_state.fiveBleedingStacks ||
|
|
||||||
lastHitboxType != g_state.hitboxType ||
|
|
||||||
lastAddResistance != g_state.addResistance ||
|
|
||||||
lastAddStability != g_state.addStability ||
|
|
||||||
lastSkipAegis != g_state.skipAegis ||
|
|
||||||
lastShowBoonAdvanced != g_state.showBoonAdvanced ||
|
|
||||||
lastShowAdvanced != g_state.showAdvanced) {
|
|
||||||
|
|
||||||
ConfigManager::SaveLastUsedSettings();
|
|
||||||
|
|
||||||
lastIsQuickDps = g_state.isQuickDps;
|
|
||||||
lastIsAlacDps = g_state.isAlacDps;
|
|
||||||
lastEnvironmentDamage = g_state.environmentDamage;
|
|
||||||
lastEnvDamageLevel = g_state.envDamageLevel;
|
|
||||||
lastSkipBurning = g_state.skipBurning;
|
|
||||||
lastSkipConfusion = g_state.skipConfusion;
|
|
||||||
lastSkipSlow = g_state.skipSlow;
|
|
||||||
lastAddImmobilize = g_state.addImmobilize;
|
|
||||||
lastAddBlind = g_state.addBlind;
|
|
||||||
lastFiveBleedingStacks = g_state.fiveBleedingStacks;
|
|
||||||
lastHitboxType = g_state.hitboxType;
|
|
||||||
lastAddResistance = g_state.addResistance;
|
|
||||||
lastAddStability = g_state.addStability;
|
|
||||||
lastSkipAegis = g_state.skipAegis;
|
|
||||||
lastShowBoonAdvanced = g_state.showBoonAdvanced;
|
|
||||||
lastShowAdvanced = g_state.showAdvanced;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void UIManager::RenderTemplatesTab() {
|
|
||||||
|
|
||||||
std::string currentTemplateName = "None";
|
|
||||||
bool foundMatchingTemplate = false;
|
|
||||||
|
|
||||||
for (const auto& temp : g_state.templates) {
|
|
||||||
if (temp.isQuickDps == g_state.isQuickDps &&
|
|
||||||
temp.isAlacDps == g_state.isAlacDps &&
|
|
||||||
temp.environmentDamage == g_state.environmentDamage &&
|
|
||||||
temp.envDamageLevel == g_state.envDamageLevel &&
|
|
||||||
temp.skipBurning == g_state.skipBurning &&
|
|
||||||
temp.skipConfusion == g_state.skipConfusion &&
|
|
||||||
temp.skipSlow == g_state.skipSlow &&
|
|
||||||
temp.addImmobilize == g_state.addImmobilize &&
|
|
||||||
temp.addBlind == g_state.addBlind &&
|
|
||||||
temp.fiveBleedingStacks == g_state.fiveBleedingStacks &&
|
|
||||||
temp.hitboxType == g_state.hitboxType &&
|
|
||||||
temp.addResistance == g_state.addResistance &&
|
|
||||||
temp.addStability == g_state.addStability &&
|
|
||||||
temp.skipAegis == g_state.skipAegis) {
|
|
||||||
currentTemplateName = temp.name;
|
|
||||||
foundMatchingTemplate = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ImGui::Spacing();
|
|
||||||
ImGui::Text("Current: ");
|
|
||||||
ImGui::SameLine();
|
|
||||||
if (foundMatchingTemplate) {
|
|
||||||
ImGui::TextColored(ImVec4(0.0f, 1.0f, 0.0f, 1.0f), "%s", currentTemplateName.c_str());
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
ImGui::TextColored(ImVec4(0.7f, 0.7f, 0.7f, 1.0f), "None");
|
|
||||||
}
|
|
||||||
ImGui::Separator();
|
|
||||||
ImGui::Spacing();
|
|
||||||
|
|
||||||
if (ImGui::Button("Apply Boons", ImVec2(110, 0))) {
|
|
||||||
if (g_state.enabled && MapUtils::IsInTrainingArea()) {
|
|
||||||
g_api->InputBinds.Invoke("GolemHelper.ApplyBoons", false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ImGui::SameLine(0, 5);
|
|
||||||
if (ImGui::Button("Spawn Golem", ImVec2(110, 0))) {
|
|
||||||
if (g_state.enabled && MapUtils::IsInTrainingArea()) {
|
|
||||||
g_api->InputBinds.Invoke("GolemHelper.SpawnGolem", false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ImGui::Spacing();
|
|
||||||
|
|
||||||
if (ImGui::Button("Respawn", ImVec2(110, 0))) {
|
|
||||||
if (g_state.enabled && MapUtils::IsInTrainingArea()) {
|
|
||||||
g_api->InputBinds.Invoke("GolemHelper.RespawnGolem", false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ImGui::SameLine(0, 5);
|
|
||||||
if (ImGui::Button("Remove and Respawn", ImVec2(150, 0))) {
|
|
||||||
if (g_state.enabled && MapUtils::IsInTrainingArea()) {
|
|
||||||
g_api->InputBinds.Invoke("GolemHelper.RemoveAndRespawnGolem", false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ImGui::Spacing();
|
|
||||||
ImGui::Spacing();
|
|
||||||
ImGui::Separator();
|
|
||||||
ImGui::Spacing();
|
|
||||||
|
|
||||||
ImGui::Text("Template Management");
|
|
||||||
ImGui::Separator();
|
|
||||||
|
|
||||||
ImGui::Text("Save Current Settings:");
|
|
||||||
ImGui::SetNextItemWidth(170);
|
|
||||||
ImGui::InputText("##templateName", g_state.newTemplateName, sizeof(g_state.newTemplateName));
|
|
||||||
ImGui::SameLine(0, 5);
|
|
||||||
|
|
||||||
if (ImGui::Button("Save", ImVec2(50, 0))) {
|
|
||||||
if (strlen(g_state.newTemplateName) > 0) {
|
|
||||||
TemplateManager::SaveCurrentAsTemplate(std::string(g_state.newTemplateName));
|
|
||||||
memset(g_state.newTemplateName, 0, sizeof(g_state.newTemplateName));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ImGui::Spacing();
|
|
||||||
ImGui::Separator();
|
|
||||||
|
|
||||||
ImGui::Text("Available Templates:");
|
|
||||||
|
|
||||||
std::vector<int> userTemplateIndices;
|
|
||||||
std::vector<const char*> userTemplateNames;
|
|
||||||
|
|
||||||
for (int i = 0; i < g_state.templates.size(); i++) {
|
|
||||||
if (!g_state.templates[i].isDefaultTemplate) {
|
|
||||||
userTemplateIndices.push_back(i);
|
|
||||||
userTemplateNames.push_back(g_state.templates[i].name.c_str());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (userTemplateNames.empty()) {
|
|
||||||
ImGui::TextColored(ImVec4(0.7f, 0.7f, 0.7f, 1.0f), "No user templates saved");
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
int currentUserIndex = -1;
|
|
||||||
if (g_state.lastUserTemplateIndex >= 0) {
|
|
||||||
for (int i = 0; i < userTemplateIndices.size(); i++) {
|
|
||||||
if (userTemplateIndices[i] == g_state.lastUserTemplateIndex) {
|
|
||||||
currentUserIndex = i;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ImGui::SetNextItemWidth(170);
|
|
||||||
if (ImGui::Combo("##templateList", ¤tUserIndex, userTemplateNames.data(), (int)userTemplateNames.size())) {
|
|
||||||
g_state.selectedTemplateIndex = userTemplateIndices[currentUserIndex];
|
|
||||||
g_state.lastUserTemplateIndex = userTemplateIndices[currentUserIndex];
|
|
||||||
}
|
|
||||||
|
|
||||||
ImGui::SameLine(0, 5);
|
|
||||||
if (ImGui::Button("Load", ImVec2(50, 0))) {
|
|
||||||
if (currentUserIndex >= 0 && currentUserIndex < userTemplateIndices.size()) {
|
|
||||||
TemplateManager::LoadTemplate(userTemplateIndices[currentUserIndex]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ImGui::SameLine(0, 5);
|
|
||||||
if (ImGui::Button("Del", ImVec2(50, 0))) {
|
|
||||||
if (currentUserIndex >= 0 && currentUserIndex < userTemplateIndices.size()) {
|
|
||||||
TemplateManager::DeleteTemplate(userTemplateIndices[currentUserIndex]);
|
|
||||||
g_state.selectedTemplateIndex = -1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (g_state.lastUserTemplateIndex >= 0 &&
|
|
||||||
g_state.lastUserTemplateIndex < g_state.templates.size()) {
|
|
||||||
|
|
||||||
const auto& selectedTemplate = g_state.templates[g_state.lastUserTemplateIndex];
|
|
||||||
|
|
||||||
ImGui::Spacing();
|
|
||||||
ImGui::Separator();
|
|
||||||
|
|
||||||
std::string displayName = selectedTemplate.name;
|
|
||||||
if (displayName.length() > 20) {
|
|
||||||
displayName = displayName.substr(0, 17) + "...";
|
|
||||||
}
|
|
||||||
ImGui::TextColored(ImVec4(0.4f, 0.8f, 1.0f, 1.0f), "%s", displayName.c_str());
|
|
||||||
|
|
||||||
std::string modeText = "Normal";
|
|
||||||
if (selectedTemplate.isQuickDps) modeText = "Quick DPS";
|
|
||||||
else if (selectedTemplate.isAlacDps) modeText = "Alac DPS";
|
|
||||||
|
|
||||||
if (selectedTemplate.environmentDamage) {
|
|
||||||
modeText += " + Env ";
|
|
||||||
switch (selectedTemplate.envDamageLevel) {
|
|
||||||
case ENV_MILD: modeText += "Mild"; break;
|
|
||||||
case ENV_MODERATE: modeText += "Moderate"; break;
|
|
||||||
case ENV_EXTREME: modeText += "Extreme"; break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ImGui::Text("Mode: %s", modeText.c_str());
|
|
||||||
|
|
||||||
const char* hitboxName = selectedTemplate.hitboxType == HITBOX_SMALL ? "Small" :
|
|
||||||
selectedTemplate.hitboxType == HITBOX_MEDIUM ? "Medium" : "Large";
|
|
||||||
ImGui::Text("Hitbox: %s", hitboxName);
|
|
||||||
|
|
||||||
if (selectedTemplate.skipBurning || selectedTemplate.skipConfusion || selectedTemplate.skipSlow ||
|
|
||||||
selectedTemplate.addImmobilize || selectedTemplate.addBlind || selectedTemplate.fiveBleedingStacks) {
|
|
||||||
|
|
||||||
ImGui::Text("Conditions:");
|
|
||||||
ImGui::Indent(15.0f);
|
|
||||||
|
|
||||||
std::vector<std::string> conditions;
|
|
||||||
if (selectedTemplate.skipBurning) conditions.push_back("Skip Burning");
|
|
||||||
if (selectedTemplate.skipConfusion) conditions.push_back("Skip Confusion");
|
|
||||||
if (selectedTemplate.skipSlow) conditions.push_back("Skip Slow");
|
|
||||||
if (selectedTemplate.addImmobilize) conditions.push_back("Add Immobilize");
|
|
||||||
if (selectedTemplate.addBlind) conditions.push_back("Add Blind");
|
|
||||||
if (selectedTemplate.fiveBleedingStacks) conditions.push_back("5 Bleeding");
|
|
||||||
|
|
||||||
std::string conditionsText = "";
|
|
||||||
for (int i = 0; i < conditions.size(); i++) {
|
|
||||||
if (i > 0 && i % 2 != 0) conditionsText += ", ";
|
|
||||||
conditionsText += conditions[i];
|
|
||||||
|
|
||||||
if ((i + 1) % 2 == 0 || i == conditions.size() - 1) {
|
|
||||||
ImGui::TextUnformatted(conditionsText.c_str());
|
|
||||||
conditionsText = "";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ImGui::Unindent(15.0f);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (selectedTemplate.addResistance || selectedTemplate.addStability || selectedTemplate.skipAegis) {
|
|
||||||
ImGui::Text("Boon Settings:");
|
|
||||||
ImGui::Indent(15.0f);
|
|
||||||
|
|
||||||
std::vector<std::string> boonSettings;
|
|
||||||
if (selectedTemplate.addResistance) boonSettings.push_back("Add Resistance");
|
|
||||||
if (selectedTemplate.addStability) boonSettings.push_back("Add Stability");
|
|
||||||
if (selectedTemplate.skipAegis) boonSettings.push_back("Skip Aegis");
|
|
||||||
|
|
||||||
std::string boonText = "";
|
|
||||||
for (int i = 0; i < boonSettings.size(); i++) {
|
|
||||||
if (i > 0 && i % 2 != 0) boonText += ", ";
|
|
||||||
boonText += boonSettings[i];
|
|
||||||
|
|
||||||
if ((i + 1) % 2 == 0 || i == boonSettings.size() - 1) {
|
|
||||||
ImGui::TextUnformatted(boonText.c_str());
|
|
||||||
boonText = "";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ImGui::Unindent(15.0f);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ImGui::Spacing();
|
|
||||||
ImGui::Separator();
|
|
||||||
|
|
||||||
ImGui::Text("Quick Load:");
|
|
||||||
|
|
||||||
std::vector<std::string> defaultNames = { "DPS", "Quick DPS", "Alac DPS", "qHeal", "aHeal" };
|
|
||||||
|
|
||||||
for (int i = 0; i < 3; i++) {
|
|
||||||
const std::string& name = defaultNames[i];
|
|
||||||
int templateIndex = -1;
|
|
||||||
for (int j = 0; j < g_state.templates.size(); j++) {
|
|
||||||
if (g_state.templates[j].name == name && g_state.templates[j].isDefaultTemplate) {
|
|
||||||
templateIndex = j;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (templateIndex >= 0) {
|
|
||||||
if (ImGui::Button(name.c_str(), ImVec2(80, 0))) {
|
|
||||||
TemplateManager::LoadTemplate(templateIndex);
|
|
||||||
g_state.selectedTemplateIndex = -1;
|
|
||||||
}
|
|
||||||
if (i < 2) ImGui::SameLine(0, 5);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ImGui::Spacing();
|
|
||||||
|
|
||||||
for (int i = 3; i < 5; i++) {
|
|
||||||
const std::string& name = defaultNames[i];
|
|
||||||
int templateIndex = -1;
|
|
||||||
for (int j = 0; j < g_state.templates.size(); j++) {
|
|
||||||
if (g_state.templates[j].name == name && g_state.templates[j].isDefaultTemplate) {
|
|
||||||
templateIndex = j;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (templateIndex >= 0) {
|
|
||||||
if (ImGui::Button(name.c_str(), ImVec2(80, 0))) {
|
|
||||||
TemplateManager::LoadTemplate(templateIndex);
|
|
||||||
g_state.selectedTemplateIndex = -1;
|
|
||||||
}
|
|
||||||
if (i == 3) ImGui::SameLine(0, 5);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void UIManager::RenderOptions() {
|
|
||||||
ImGui::Separator();
|
|
||||||
ImGui::Text("GolemHelper Settings");
|
|
||||||
|
|
||||||
bool oldAlwaysHideIcon = g_state.alwaysHideIcon;
|
|
||||||
ImGui::Checkbox("Always Hide Icon", &g_state.alwaysHideIcon);
|
|
||||||
|
|
||||||
if (oldAlwaysHideIcon != g_state.alwaysHideIcon) {
|
|
||||||
ConfigManager::SaveCustomDelaySettings();
|
|
||||||
MapUtils::UpdateQuickAccessVisibility();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool oldAutoShowHideUI = g_state.autoShowHideUI;
|
|
||||||
ImGui::Checkbox("Auto Show/Hide UI", &g_state.autoShowHideUI);
|
|
||||||
|
|
||||||
if (oldAutoShowHideUI != g_state.autoShowHideUI) {
|
|
||||||
ConfigManager::SaveCustomDelaySettings();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool oldAlwaysLoadLastSettings = g_state.alwaysLoadLastSettings;
|
|
||||||
ImGui::Checkbox("Always Load Last Settings", &g_state.alwaysLoadLastSettings);
|
|
||||||
|
|
||||||
if (oldAlwaysLoadLastSettings != g_state.alwaysLoadLastSettings) {
|
|
||||||
ConfigManager::SaveCustomDelaySettings();
|
|
||||||
}
|
|
||||||
|
|
||||||
ImGui::Checkbox("Enable debug mode", &g_state.debugMode);
|
|
||||||
|
|
||||||
ImGui::Spacing();
|
|
||||||
ImGui::Separator();
|
|
||||||
|
|
||||||
ImGui::PushStyleColor(ImGuiCol_Header, ImVec4(0.0f, 0.0f, 0.0f, 0.0f));
|
|
||||||
ImGui::PushStyleColor(ImGuiCol_HeaderHovered, ImVec4(0.3f, 0.5f, 0.7f, 0.8f));
|
|
||||||
if (ImGui::CollapsingHeader("Coordinate Calibration")) {
|
|
||||||
|
|
||||||
ImGui::Spacing();
|
|
||||||
|
|
||||||
if (g_state.calibrationMode) {
|
|
||||||
ImGui::TextColored(ImVec4(1.0f, 0.85f, 0.0f, 1.0f), "! Calibration active !");
|
|
||||||
ImGui::Spacing();
|
|
||||||
ImGui::TextWrapped("1. Interact with the Boon Console (press F)");
|
|
||||||
ImGui::TextWrapped("2. Hover your mouse over the middle of \"Adjust Self\" and click.");
|
|
||||||
ImGui::Spacing();
|
|
||||||
ImGui::TextColored(ImVec4(0.7f, 0.7f, 0.7f, 1.0f), "The addon window is hidden.");
|
|
||||||
ImGui::TextColored(ImVec4(0.7f, 0.7f, 0.7f, 1.0f), "Press ESC to cancel.");
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (g_state.hasCalibration) {
|
|
||||||
ImGui::TextColored(ImVec4(0.2f, 1.0f, 0.4f, 1.0f), "Status: Calibrated");
|
|
||||||
ImGui::Text("scaleX: %.4f scaleY: %.4f",
|
|
||||||
g_state.calibratedScaleX, g_state.calibratedScaleY);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
ImGui::TextColored(ImVec4(0.75f, 0.75f, 0.75f, 1.0f), "Status: Auto-scaling (default)");
|
|
||||||
}
|
|
||||||
|
|
||||||
ImGui::Spacing();
|
|
||||||
|
|
||||||
if (ImGui::Button("Calibrate", ImVec2(120, 0))) {
|
|
||||||
CoordinateUtils::StartCalibration();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (g_state.hasCalibration) {
|
|
||||||
ImGui::SameLine(0, 6);
|
|
||||||
if (ImGui::Button("Reset to Default", ImVec2(120, 0))) {
|
|
||||||
CoordinateUtils::ResetCalibration();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ImGui::Spacing();
|
|
||||||
ImGui::TextDisabled("Interact with the Boon Console, then hover over");
|
|
||||||
ImGui::TextDisabled("the middle of \"Adjust Self\" and click.");
|
|
||||||
}
|
|
||||||
|
|
||||||
ImGui::Spacing();
|
|
||||||
}
|
|
||||||
ImGui::PopStyleColor(2);
|
|
||||||
}
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
#pragma once
|
|
||||||
|
|
||||||
class UIManager {
|
|
||||||
public:
|
|
||||||
static void RenderUI();
|
|
||||||
static void RenderOptions();
|
|
||||||
|
|
||||||
private:
|
|
||||||
static void RenderSettingsTab();
|
|
||||||
static void RenderTemplatesTab();
|
|
||||||
};
|
|
||||||
|
|
@ -1,98 +0,0 @@
|
||||||
#include <Windows.h>
|
|
||||||
#include <vector>
|
|
||||||
#include <string>
|
|
||||||
#include <fstream>
|
|
||||||
#include "FileUtils.h"
|
|
||||||
#include "../Common/Globals.h"
|
|
||||||
#include "../resource.h"
|
|
||||||
|
|
||||||
std::string FileUtils::GetAddonPath() {
|
|
||||||
char gameDir[MAX_PATH];
|
|
||||||
GetModuleFileNameA(NULL, gameDir, MAX_PATH);
|
|
||||||
|
|
||||||
std::string gamePath = gameDir;
|
|
||||||
size_t lastSlash = gamePath.find_last_of("\\");
|
|
||||||
if (lastSlash != std::string::npos) {
|
|
||||||
gamePath = gamePath.substr(0, lastSlash);
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string addonPath = gamePath + "\\addons\\GolemHelper";
|
|
||||||
CreateDirectoryA(addonPath.c_str(), NULL);
|
|
||||||
|
|
||||||
return addonPath;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string FileUtils::GetConfigFilePath() {
|
|
||||||
std::string configPath = GetAddonPath() + "\\config.ini";
|
|
||||||
|
|
||||||
if (g_api) {
|
|
||||||
char logBuffer[500];
|
|
||||||
sprintf_s(logBuffer, "Config file path: %s", configPath.c_str());
|
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", logBuffer);
|
|
||||||
}
|
|
||||||
|
|
||||||
return configPath;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool FileUtils::ExtractResourceToFile(HMODULE hModule, int resourceID, const std::string& filePath) {
|
|
||||||
HRSRC hRes = FindResourceA(hModule, MAKEINTRESOURCEA(resourceID), "PNG");
|
|
||||||
if (!hRes) return false;
|
|
||||||
|
|
||||||
HGLOBAL hData = LoadResource(hModule, hRes);
|
|
||||||
if (!hData) return false;
|
|
||||||
|
|
||||||
LPVOID pData = LockResource(hData);
|
|
||||||
if (!pData) return false;
|
|
||||||
|
|
||||||
DWORD dataSize = SizeofResource(hModule, hRes);
|
|
||||||
if (!dataSize) return false;
|
|
||||||
|
|
||||||
std::ofstream file(filePath, std::ios::binary);
|
|
||||||
if (!file.is_open()) return false;
|
|
||||||
|
|
||||||
file.write(static_cast<const char*>(pData), dataSize);
|
|
||||||
file.close();
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void FileUtils::CopyResourceIcons() {
|
|
||||||
if (!g_api) return;
|
|
||||||
|
|
||||||
std::string addonPath = GetAddonPath();
|
|
||||||
std::string iconsPath = addonPath + "\\icons";
|
|
||||||
CreateDirectoryA(iconsPath.c_str(), NULL);
|
|
||||||
|
|
||||||
std::string iconDestPath = iconsPath + "\\GOLEM_HELPER_ICON.png";
|
|
||||||
std::string iconHoverDestPath = iconsPath + "\\GOLEM_HELPER_ICON_HOVER.png";
|
|
||||||
|
|
||||||
if (GetFileAttributesA(iconDestPath.c_str()) != INVALID_FILE_ATTRIBUTES &&
|
|
||||||
GetFileAttributesA(iconHoverDestPath.c_str()) != INVALID_FILE_ATTRIBUTES) {
|
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", "Icons already exist, skipping unpack");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
HMODULE hModule = GetModuleHandleA("GolemHelper.dll");
|
|
||||||
if (!hModule) {
|
|
||||||
g_api->Log(ELogLevel_WARNING, "GolemHelper", "Failed to get module handle");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ExtractResourceToFile(hModule, IDB_PNG1, iconDestPath)) {
|
|
||||||
char logBuffer[300];
|
|
||||||
sprintf_s(logBuffer, "Extracted icon from resources: %s", iconDestPath.c_str());
|
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", logBuffer);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
g_api->Log(ELogLevel_WARNING, "GolemHelper", "Failed to extract normal icon from resources");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ExtractResourceToFile(hModule, IDB_PNG2, iconHoverDestPath)) {
|
|
||||||
char logBuffer[300];
|
|
||||||
sprintf_s(logBuffer, "Extracted hover icon from resources: %s", iconHoverDestPath.c_str());
|
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", logBuffer);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
g_api->Log(ELogLevel_WARNING, "GolemHelper", "Failed to extract hover icon from resources");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
#pragma once
|
|
||||||
#include <string>
|
|
||||||
#include <Windows.h>
|
|
||||||
|
|
||||||
class FileUtils {
|
|
||||||
public:
|
|
||||||
static std::string GetAddonPath();
|
|
||||||
static std::string GetConfigFilePath();
|
|
||||||
static bool ExtractResourceToFile(HMODULE hModule, int resourceID, const std::string& filePath);
|
|
||||||
static void CopyResourceIcons();
|
|
||||||
};
|
|
||||||
|
|
@ -1,68 +0,0 @@
|
||||||
#include <Windows.h>
|
|
||||||
#include "MapUtils.h"
|
|
||||||
#include "../Common/Globals.h"
|
|
||||||
|
|
||||||
bool MapUtils::IsInTrainingArea() {
|
|
||||||
return GetCurrentMapID() == 1154;
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned int MapUtils::GetCurrentMapID() {
|
|
||||||
if (g_mumbleData && g_mumbleData->Context.MapID != 0) {
|
|
||||||
return g_mumbleData->Context.MapID;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void MapUtils::UpdateQuickAccessVisibility() {
|
|
||||||
if (!g_api) return;
|
|
||||||
|
|
||||||
bool shouldBeVisible = IsInTrainingArea() && !g_state.alwaysHideIcon;
|
|
||||||
unsigned int currentMapID = GetCurrentMapID();
|
|
||||||
|
|
||||||
if (currentMapID != g_state.lastMapID || g_state.quickAccessVisible != shouldBeVisible) {
|
|
||||||
g_state.lastMapID = currentMapID;
|
|
||||||
|
|
||||||
if (shouldBeVisible && !g_state.quickAccessVisible) {
|
|
||||||
g_api->QuickAccess.Add(
|
|
||||||
"GolemHelper.ToggleUI",
|
|
||||||
"GOLEM_HELPER_ICON",
|
|
||||||
"GOLEM_HELPER_ICON_HOVER",
|
|
||||||
"GolemHelper.ToggleUI",
|
|
||||||
"GolemHelper UI"
|
|
||||||
);
|
|
||||||
g_state.quickAccessVisible = true;
|
|
||||||
|
|
||||||
if (g_state.debugMode) {
|
|
||||||
char buffer[150];
|
|
||||||
sprintf_s(buffer, sizeof(buffer), "QuickAccess icon ADDED - MapID: %u (Training Area)", currentMapID);
|
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", buffer);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if ((!shouldBeVisible || g_state.alwaysHideIcon) && g_state.quickAccessVisible) {
|
|
||||||
g_api->QuickAccess.Remove("GolemHelper.ToggleUI");
|
|
||||||
g_state.quickAccessVisible = false;
|
|
||||||
|
|
||||||
if (g_state.debugMode) {
|
|
||||||
const char* reason = g_state.alwaysHideIcon ? "Always Hide Icon enabled" : "Not Training Area";
|
|
||||||
char buffer[200];
|
|
||||||
sprintf_s(buffer, sizeof(buffer), "QuickAccess icon REMOVED - MapID: %u (%s)", currentMapID, reason);
|
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", buffer);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (g_state.autoShowHideUI) {
|
|
||||||
bool inTrainingArea = IsInTrainingArea();
|
|
||||||
static bool wasInTrainingArea = false;
|
|
||||||
|
|
||||||
if (inTrainingArea && !wasInTrainingArea) {
|
|
||||||
g_state.showUI = true;
|
|
||||||
}
|
|
||||||
else if (!inTrainingArea && wasInTrainingArea) {
|
|
||||||
g_state.showUI = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
wasInTrainingArea = inTrainingArea;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
#pragma once
|
|
||||||
|
|
||||||
class MapUtils {
|
|
||||||
public:
|
|
||||||
static bool IsInTrainingArea();
|
|
||||||
static void UpdateQuickAccessVisibility();
|
|
||||||
static unsigned int GetCurrentMapID();
|
|
||||||
};
|
|
||||||
|
|
@ -1,5 +1,412 @@
|
||||||
#include <Windows.h>
|
#include "pch.h"
|
||||||
|
#include "Definitions/Nexus.h"
|
||||||
|
#include <Windows.h>
|
||||||
|
#include <vector>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) {
|
AddonAPI* g_api = nullptr;
|
||||||
return TRUE;
|
|
||||||
|
struct {
|
||||||
|
bool enabled = false;
|
||||||
|
bool boonsEnabled = true;
|
||||||
|
bool golemEnabled = true;
|
||||||
|
bool isQuickDps = false;
|
||||||
|
bool isAlacDps = false;
|
||||||
|
bool isChronomancer = false;
|
||||||
|
bool debugMode = false;
|
||||||
|
int debugCounter = 0;
|
||||||
|
} g_state;
|
||||||
|
|
||||||
|
struct MenuCoordinates {
|
||||||
|
int golemStepX[25] = {
|
||||||
|
830, 830, 830, 830, 830, 830, 830, 830, 830, 830,
|
||||||
|
830, 830, 830, 830, 830, 830, 830, 830, 830, 830,
|
||||||
|
830, 830, 830, 830, 830
|
||||||
|
};
|
||||||
|
int golemStepY[25] = {
|
||||||
|
260, 260, 306, 257, 257, 306, 257, 306, 352, 400,
|
||||||
|
454, 508, 352, 257, 306, 454, 400, 306, 352, 400,
|
||||||
|
454, 400, 454, 454, 548
|
||||||
|
};
|
||||||
|
|
||||||
|
int boonStepX[20] = {
|
||||||
|
830, 830, 830, 830, 830, 830, 830, 830, 830, 830,
|
||||||
|
830, 830, 830, 830, 830, 830, 830, 830, 830, 830
|
||||||
|
};
|
||||||
|
int boonStepY[20] = {
|
||||||
|
262, 354, 262, 262, 400, 305, 354, 305, 262, 305,
|
||||||
|
450, 500, 354, 262, 305, 354, 400, 450, 262, 550
|
||||||
|
};
|
||||||
|
} g_coords;
|
||||||
|
|
||||||
|
void GetScaledCoordinates(int baseX, int baseY, int* scaledX, int* scaledY) {
|
||||||
|
g_api->Log(ELogLevel_INFO, "GolemHelper", "GetScaledCoordinates CHIAMATA");
|
||||||
|
|
||||||
|
NexusLinkData* nexusData = (NexusLinkData*)g_api->DataLink.Get("DL_NEXUS_LINK");
|
||||||
|
|
||||||
|
if (nexusData && nexusData->Width > 0 && nexusData->Height > 0) {
|
||||||
|
float uiScale = nexusData->Scaling;
|
||||||
|
float dpiScale = (float)nexusData->Width / 1920.0f;
|
||||||
|
|
||||||
|
char valuesBuffer[200];
|
||||||
|
sprintf_s(valuesBuffer, "GetScaled INPUT: uiScale=%.3f, base=%d,%d", uiScale, baseX, baseY);
|
||||||
|
g_api->Log(ELogLevel_INFO, "GolemHelper", valuesBuffer);
|
||||||
|
|
||||||
|
int scaledForResolutionX = (int)(baseX * dpiScale);
|
||||||
|
int scaledForResolutionY = baseY;
|
||||||
|
|
||||||
|
int finalX = scaledForResolutionX;
|
||||||
|
int finalY = scaledForResolutionY;
|
||||||
|
|
||||||
|
if (uiScale >= 0.89f && uiScale <= 0.91f) {
|
||||||
|
finalX = scaledForResolutionX - (int)(scaledForResolutionX * 0.029f);
|
||||||
|
finalY = scaledForResolutionY - (int)(scaledForResolutionY * 0.103f);
|
||||||
|
g_api->Log(ELogLevel_INFO, "GolemHelper", "APPLIED SMALL OFFSET");
|
||||||
|
}
|
||||||
|
else if (uiScale >= 1.09f && uiScale <= 1.15f) {
|
||||||
|
finalX = scaledForResolutionX - (int)(scaledForResolutionX * 0.053f);
|
||||||
|
finalY = scaledForResolutionY + (int)(scaledForResolutionY * 0.095f);
|
||||||
|
g_api->Log(ELogLevel_INFO, "GolemHelper", "APPLIED LARGE OFFSET");
|
||||||
|
}
|
||||||
|
else if (uiScale >= 1.21f && uiScale <= 1.25f) {
|
||||||
|
finalX = scaledForResolutionX - (int)(scaledForResolutionX * 0.097f);
|
||||||
|
finalY = scaledForResolutionY + (int)(scaledForResolutionY * 0.206f);
|
||||||
|
g_api->Log(ELogLevel_INFO, "GolemHelper", "APPLIED LARGER OFFSET");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
char buffer[100];
|
||||||
|
sprintf_s(buffer, "NO OFFSET - uiScale %.3f", uiScale);
|
||||||
|
g_api->Log(ELogLevel_INFO, "GolemHelper", buffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
*scaledX = finalX;
|
||||||
|
*scaledY = finalY;
|
||||||
|
|
||||||
|
char resultBuffer[200];
|
||||||
|
sprintf_s(resultBuffer, "GetScaled RESULT: %d,%d -> %d,%d", scaledForResolutionX, scaledForResolutionY, finalX, finalY);
|
||||||
|
g_api->Log(ELogLevel_INFO, "GolemHelper", resultBuffer);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
g_api->Log(ELogLevel_WARNING, "GolemHelper", "GetScaledCoordinates - Nexus data not available");
|
||||||
|
|
||||||
|
int screenWidth = GetSystemMetrics(SM_CXSCREEN);
|
||||||
|
float dpiScale = (float)screenWidth / 1920.0f;
|
||||||
|
|
||||||
|
*scaledX = (int)(baseX * dpiScale);
|
||||||
|
*scaledY = baseY;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DebugMousePosition() {
|
||||||
|
if (!g_api) return;
|
||||||
|
|
||||||
|
POINT mousePos;
|
||||||
|
GetCursorPos(&mousePos);
|
||||||
|
|
||||||
|
NexusLinkData* nexusData = (NexusLinkData*)g_api->DataLink.Get("DL_NEXUS_LINK");
|
||||||
|
|
||||||
|
if (nexusData && nexusData->Width > 0 && nexusData->Height > 0) {
|
||||||
|
float uiScale = nexusData->Scaling;
|
||||||
|
float dpiScale = (float)nexusData->Width / 1920.0f;
|
||||||
|
float finalScaleX = uiScale * dpiScale;
|
||||||
|
|
||||||
|
int baseX = (int)(mousePos.x / finalScaleX);
|
||||||
|
int baseY = mousePos.y;
|
||||||
|
|
||||||
|
g_state.debugCounter++;
|
||||||
|
|
||||||
|
char buffer[450];
|
||||||
|
sprintf_s(buffer, "=== DEBUG #%d === Resolution: %dx%d | Mouse: %d,%d | Base coords: %d,%d | Interface Size: %.2f | DPI Scale: %.3f | Final ScaleX: %.3f",
|
||||||
|
g_state.debugCounter, nexusData->Width, nexusData->Height,
|
||||||
|
mousePos.x, mousePos.y, baseX, baseY, uiScale, dpiScale, finalScaleX);
|
||||||
|
g_api->Log(ELogLevel_INFO, "GolemHelper", buffer);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
g_api->Log(ELogLevel_WARNING, "GolemHelper", "Cannot debug - Nexus data not available");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (g_state.debugCounter == 1) {
|
||||||
|
g_api->UI.SendAlert("Debug active - Interface Size + DPI scaling");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void ClickAtScaled(int baseX, int baseY, int delay = 25) {
|
||||||
|
HWND gameWindow = GetForegroundWindow();
|
||||||
|
if (!gameWindow) return;
|
||||||
|
|
||||||
|
int scaledX, scaledY;
|
||||||
|
GetScaledCoordinates(baseX, baseY, &scaledX, &scaledY);
|
||||||
|
|
||||||
|
LPARAM lParam = MAKELPARAM(scaledX, scaledY);
|
||||||
|
SendMessage(gameWindow, WM_LBUTTONDOWN, MK_LBUTTON, lParam);
|
||||||
|
Sleep(10);
|
||||||
|
SendMessage(gameWindow, WM_LBUTTONUP, 0, lParam);
|
||||||
|
Sleep(delay);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ShouldSkipBoonStep(int stepIndex) {
|
||||||
|
if (g_state.isQuickDps && stepIndex == 14) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (g_state.isAlacDps && (stepIndex == 13 || stepIndex == 18)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ShouldSkipGolemStep(int stepIndex) {
|
||||||
|
if (g_state.isChronomancer && stepIndex == 17) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ApplyAllBoons() {
|
||||||
|
if (!g_api || !g_state.boonsEnabled || !g_state.enabled) return;
|
||||||
|
|
||||||
|
NexusLinkData* nexusData = (NexusLinkData*)g_api->DataLink.Get("DL_NEXUS_LINK");
|
||||||
|
if (nexusData && nexusData->Width > 0 && nexusData->Height > 0) {
|
||||||
|
float uiScale = nexusData->Scaling;
|
||||||
|
float dpiScale = (float)nexusData->Width / 1920.0f;
|
||||||
|
float finalScaleX = dpiScale;
|
||||||
|
|
||||||
|
char scalingBuffer[300];
|
||||||
|
sprintf_s(scalingBuffer, "Current scaling - Resolution: %dx%d | Interface Size: %.3f | DPI Scale: %.3f | Final ScaleX: %.3f",
|
||||||
|
nexusData->Width, nexusData->Height, uiScale, dpiScale, finalScaleX);
|
||||||
|
g_api->Log(ELogLevel_INFO, "GolemHelper", scalingBuffer);
|
||||||
|
|
||||||
|
if (uiScale >= 0.89f && uiScale <= 0.91f) {
|
||||||
|
g_api->Log(ELogLevel_INFO, "GolemHelper", "Applying SMALL interface offset");
|
||||||
|
}
|
||||||
|
else if (uiScale >= 1.09f && uiScale <= 1.15f) {
|
||||||
|
g_api->Log(ELogLevel_INFO, "GolemHelper", "Applying LARGE interface offset");
|
||||||
|
}
|
||||||
|
else if (uiScale >= 1.21f && uiScale <= 1.25f) {
|
||||||
|
g_api->Log(ELogLevel_INFO, "GolemHelper", "Applying LARGER interface offset");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
char noOffsetBuffer[150];
|
||||||
|
sprintf_s(noOffsetBuffer, "NO OFFSET applied - uiScale %.3f doesn't match any range", uiScale);
|
||||||
|
g_api->Log(ELogLevel_INFO, "GolemHelper", noOffsetBuffer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const char* mode = g_state.isQuickDps ? "Quick DPS" :
|
||||||
|
g_state.isAlacDps ? "Alac DPS" : "Normal";
|
||||||
|
|
||||||
|
char startBuffer[200];
|
||||||
|
sprintf_s(startBuffer, "Starting boon sequence (20 steps) - Mode: %s", mode);
|
||||||
|
g_api->Log(ELogLevel_INFO, "GolemHelper", startBuffer);
|
||||||
|
|
||||||
|
try {
|
||||||
|
g_api->GameBinds.InvokeAsync(EGameBinds_MiscInteract, 50);
|
||||||
|
Sleep(390);
|
||||||
|
|
||||||
|
for (int i = 0; i < 20; i++) {
|
||||||
|
if (g_coords.boonStepX[i] == 0 && g_coords.boonStepY[i] == 0) {
|
||||||
|
char skipBuffer[100];
|
||||||
|
sprintf_s(skipBuffer, "Skipping boon step %d (coordinates 0,0)", i + 1);
|
||||||
|
g_api->Log(ELogLevel_INFO, "GolemHelper", skipBuffer);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ShouldSkipBoonStep(i)) {
|
||||||
|
char skipBuffer[150];
|
||||||
|
sprintf_s(skipBuffer, "Skipping boon step %d (%s mode) - coordinates: %d,%d",
|
||||||
|
i + 1, mode, g_coords.boonStepX[i], g_coords.boonStepY[i]);
|
||||||
|
g_api->Log(ELogLevel_INFO, "GolemHelper", skipBuffer);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
char stepBuffer[200];
|
||||||
|
sprintf_s(stepBuffer, "Executing boon step %d at base coordinates: %d,%d",
|
||||||
|
i + 1, g_coords.boonStepX[i], g_coords.boonStepY[i]);
|
||||||
|
g_api->Log(ELogLevel_INFO, "GolemHelper", stepBuffer);
|
||||||
|
|
||||||
|
int scaledX, scaledY;
|
||||||
|
GetScaledCoordinates(g_coords.boonStepX[i], g_coords.boonStepY[i], &scaledX, &scaledY);
|
||||||
|
char scaledBuffer[200];
|
||||||
|
sprintf_s(scaledBuffer, "-> FINAL SCALED COORDINATES: %d,%d", scaledX, scaledY);
|
||||||
|
g_api->Log(ELogLevel_INFO, "GolemHelper", scaledBuffer);
|
||||||
|
|
||||||
|
int delay = (i == 19) ? 50 : 290;
|
||||||
|
ClickAtScaled(g_coords.boonStepX[i], g_coords.boonStepY[i], delay);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (...) {
|
||||||
|
g_api->Log(ELogLevel_WARNING, "GolemHelper", "Exception during boon sequence");
|
||||||
|
}
|
||||||
|
|
||||||
|
g_api->Log(ELogLevel_INFO, "GolemHelper", "Boon sequence completed!");
|
||||||
|
}
|
||||||
|
|
||||||
|
void ApplyGolemSettings() {
|
||||||
|
if (!g_api || !g_state.golemEnabled || !g_state.enabled) return;
|
||||||
|
|
||||||
|
NexusLinkData* nexusData = (NexusLinkData*)g_api->DataLink.Get("DL_NEXUS_LINK");
|
||||||
|
if (nexusData && nexusData->Width > 0 && nexusData->Height > 0) {
|
||||||
|
float uiScale = nexusData->Scaling;
|
||||||
|
float dpiScale = (float)nexusData->Width / 1920.0f;
|
||||||
|
float finalScaleX = dpiScale;
|
||||||
|
|
||||||
|
char scalingBuffer[300];
|
||||||
|
sprintf_s(scalingBuffer, "Current scaling - Resolution: %dx%d | Interface Size: %.3f | DPI Scale: %.3f | Final ScaleX: %.3f",
|
||||||
|
nexusData->Width, nexusData->Height, uiScale, dpiScale, finalScaleX);
|
||||||
|
g_api->Log(ELogLevel_INFO, "GolemHelper", scalingBuffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
const char* mode = g_state.isChronomancer ? "Chronomancer" : "Normal";
|
||||||
|
char startBuffer[200];
|
||||||
|
sprintf_s(startBuffer, "Starting golem settings sequence (25 steps) - Mode: %s", mode);
|
||||||
|
g_api->Log(ELogLevel_INFO, "GolemHelper", startBuffer);
|
||||||
|
|
||||||
|
try {
|
||||||
|
g_api->GameBinds.InvokeAsync(EGameBinds_MiscInteract, 50);
|
||||||
|
Sleep(390);
|
||||||
|
|
||||||
|
for (int i = 0; i < 25; i++) {
|
||||||
|
if (g_coords.golemStepX[i] == 0 && g_coords.golemStepY[i] == 0) {
|
||||||
|
char skipBuffer[100];
|
||||||
|
sprintf_s(skipBuffer, "Skipping golem step %d (coordinates 0,0)", i + 1);
|
||||||
|
g_api->Log(ELogLevel_INFO, "GolemHelper", skipBuffer);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ShouldSkipGolemStep(i)) {
|
||||||
|
char skipBuffer[150];
|
||||||
|
sprintf_s(skipBuffer, "Skipping golem step %d (%s mode) - coordinates: %d,%d",
|
||||||
|
i + 1, mode, g_coords.golemStepX[i], g_coords.golemStepY[i]);
|
||||||
|
g_api->Log(ELogLevel_INFO, "GolemHelper", skipBuffer);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
char stepBuffer[150];
|
||||||
|
sprintf_s(stepBuffer, "Executing golem step %d at base coordinates: %d,%d",
|
||||||
|
i + 1, g_coords.golemStepX[i], g_coords.golemStepY[i]);
|
||||||
|
g_api->Log(ELogLevel_INFO, "GolemHelper", stepBuffer);
|
||||||
|
|
||||||
|
int delay = (i == 24) ? 50 : 290;
|
||||||
|
ClickAtScaled(g_coords.golemStepX[i], g_coords.golemStepY[i], delay);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (...) {
|
||||||
|
g_api->Log(ELogLevel_WARNING, "GolemHelper", "Exception during golem settings sequence");
|
||||||
|
}
|
||||||
|
|
||||||
|
g_api->Log(ELogLevel_INFO, "GolemHelper", "Golem settings sequence completed (25 steps)!");
|
||||||
|
}
|
||||||
|
|
||||||
|
void HandleBoonKeybind(const char* id, bool release) {
|
||||||
|
if (!release && g_state.enabled) ApplyAllBoons();
|
||||||
|
}
|
||||||
|
|
||||||
|
void HandleGolemKeybind(const char* id, bool release) {
|
||||||
|
if (!release && g_state.enabled) ApplyGolemSettings();
|
||||||
|
}
|
||||||
|
|
||||||
|
void HandleToggleKeybind(const char* id, bool release) {
|
||||||
|
if (!release) {
|
||||||
|
g_state.enabled = !g_state.enabled;
|
||||||
|
g_api->UI.SendAlert(g_state.enabled ? "GolemHelper enabled" : "GolemHelper disabled");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void HandleDebugKeybind(const char* id, bool release) {
|
||||||
|
if (!release) DebugMousePosition();
|
||||||
|
}
|
||||||
|
|
||||||
|
void HandleQuickDpsKeybind(const char* id, bool release) {
|
||||||
|
if (!release) {
|
||||||
|
g_state.isQuickDps = !g_state.isQuickDps;
|
||||||
|
if (g_state.isQuickDps) {
|
||||||
|
g_state.isAlacDps = false;
|
||||||
|
}
|
||||||
|
g_api->UI.SendAlert(g_state.isQuickDps ? "Quick DPS mode enabled" : "Quick DPS mode disabled");
|
||||||
|
g_api->Log(ELogLevel_INFO, "GolemHelper", g_state.isQuickDps ? "Quick DPS enabled" : "Quick DPS disabled");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void HandleAlacDpsKeybind(const char* id, bool release) {
|
||||||
|
if (!release) {
|
||||||
|
g_state.isAlacDps = !g_state.isAlacDps;
|
||||||
|
if (g_state.isAlacDps) {
|
||||||
|
g_state.isQuickDps = false;
|
||||||
|
}
|
||||||
|
g_api->UI.SendAlert(g_state.isAlacDps ? "Alac DPS mode enabled" : "Alac DPS mode disabled");
|
||||||
|
g_api->Log(ELogLevel_INFO, "GolemHelper", g_state.isAlacDps ? "Alac DPS enabled" : "Alac DPS disabled");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void HandleChronomancerKeybind(const char* id, bool release) {
|
||||||
|
if (!release) {
|
||||||
|
g_state.isChronomancer = !g_state.isChronomancer;
|
||||||
|
g_api->UI.SendAlert(g_state.isChronomancer ? "Chronomancer mode enabled" : "Chronomancer mode disabled");
|
||||||
|
g_api->Log(ELogLevel_INFO, "GolemHelper", g_state.isChronomancer ? "Chronomancer enabled" : "Chronomancer disabled");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Load(AddonAPI* api) {
|
||||||
|
g_api = api;
|
||||||
|
g_state.enabled = true;
|
||||||
|
|
||||||
|
Keybind kb_empty = { 0, false, false, false };
|
||||||
|
g_api->InputBinds.RegisterWithStruct("GolemHelper.ApplyBoons", HandleBoonKeybind, kb_empty);
|
||||||
|
g_api->InputBinds.RegisterWithStruct("GolemHelper.ApplyGolem", HandleGolemKeybind, kb_empty);
|
||||||
|
g_api->InputBinds.RegisterWithStruct("GolemHelper.QuickDPS", HandleQuickDpsKeybind, kb_empty);
|
||||||
|
g_api->InputBinds.RegisterWithStruct("GolemHelper.AlacDPS", HandleAlacDpsKeybind, kb_empty);
|
||||||
|
g_api->InputBinds.RegisterWithStruct("GolemHelper.Chronomancer", HandleChronomancerKeybind, kb_empty);
|
||||||
|
g_api->InputBinds.RegisterWithStruct("GolemHelper.Toggle", HandleToggleKeybind, kb_empty);
|
||||||
|
g_api->InputBinds.RegisterWithStruct("GolemHelper.DebugMouse", HandleDebugKeybind, kb_empty);
|
||||||
|
|
||||||
|
g_api->Log(ELogLevel_INFO, "GolemHelper", "=== GolemHelper v1.0.0-beta.1 Loaded with Array System + DPS Modes + Chronomancer ===");
|
||||||
|
g_api->Log(ELogLevel_INFO, "GolemHelper", "Available keybinds:");
|
||||||
|
g_api->Log(ELogLevel_INFO, "GolemHelper", "Available keybinds:");
|
||||||
|
g_api->Log(ELogLevel_INFO, "GolemHelper", "- ApplyBoons: Apply boons with current DPS mode");
|
||||||
|
g_api->Log(ELogLevel_INFO, "GolemHelper", "- ApplyGolem: Apply golem settings");
|
||||||
|
g_api->Log(ELogLevel_INFO, "GolemHelper", "- QuickDPS: Toggle Quick DPS mode (skip quickness)");
|
||||||
|
g_api->Log(ELogLevel_INFO, "GolemHelper", "- AlacDPS: Toggle Alac DPS mode (skip alacrity)");
|
||||||
|
g_api->Log(ELogLevel_INFO, "GolemHelper", "- Chronomancer: Toggle Chronomancer mode (skip slow on golem)");
|
||||||
|
g_api->Log(ELogLevel_INFO, "GolemHelper", "- Toggle: Enable/disable addon");
|
||||||
|
g_api->Log(ELogLevel_INFO, "GolemHelper", "- DebugMouse: Show mouse position (for coordinate mapping)");
|
||||||
|
|
||||||
|
const char* boonMode = g_state.isQuickDps ? "Quick DPS" :
|
||||||
|
g_state.isAlacDps ? "Alac DPS" : "Normal";
|
||||||
|
const char* golemMode = g_state.isChronomancer ? "Chronomancer" : "Normal";
|
||||||
|
|
||||||
|
char modeBuffer[150];
|
||||||
|
sprintf_s(modeBuffer, "Current Modes - Boons: %s | Golem: %s | Base coordinates: 1080p", boonMode, golemMode);
|
||||||
|
g_api->Log(ELogLevel_INFO, "GolemHelper", modeBuffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Unload() {
|
||||||
|
g_api->InputBinds.Deregister("GolemHelper.ApplyBoons");
|
||||||
|
g_api->InputBinds.Deregister("GolemHelper.ApplyGolem");
|
||||||
|
g_api->InputBinds.Deregister("GolemHelper.QuickDPS");
|
||||||
|
g_api->InputBinds.Deregister("GolemHelper.AlacDPS");
|
||||||
|
g_api->InputBinds.Deregister("GolemHelper.Chronomancer");
|
||||||
|
g_api->InputBinds.Deregister("GolemHelper.Toggle");
|
||||||
|
g_api->InputBinds.Deregister("GolemHelper.DebugMouse");
|
||||||
|
g_api = nullptr;
|
||||||
|
g_state.enabled = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
extern "C" __declspec(dllexport) AddonDefinition* GetAddonDef() {
|
||||||
|
static AddonDefinition def;
|
||||||
|
def.Signature = -424248;
|
||||||
|
def.APIVersion = NEXUS_API_VERSION;
|
||||||
|
def.Name = "GolemHelper";
|
||||||
|
def.Version = { 1, 0, 0, 1 };
|
||||||
|
def.Author = "Azrub";
|
||||||
|
def.Description = "Boon & golem automation with DPS modes, Chronomancer mode and auto-scaling [BETA]";
|
||||||
|
def.Load = Load;
|
||||||
|
def.Unload = Unload;
|
||||||
|
def.Flags = EAddonFlags_None;
|
||||||
|
def.Provider = EUpdateProvider_GitHub;
|
||||||
|
def.UpdateLink = "https://github.com/Azrub/GolemHelper";
|
||||||
|
return &def;
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOL APIENTRY DllMain(HMODULE, DWORD, LPVOID) { return TRUE; }
|
||||||
5
GolemHelper/framework.h
Normal file
5
GolemHelper/framework.h
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#define WIN32_LEAN_AND_MEAN // Escludere gli elementi usati raramente dalle intestazioni di Windows
|
||||||
|
// File di intestazione di Windows
|
||||||
|
#include <windows.h>
|
||||||
5
GolemHelper/pch.cpp
Normal file
5
GolemHelper/pch.cpp
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
// pch.cpp: file di origine corrispondente all'intestazione precompilata
|
||||||
|
|
||||||
|
#include "pch.h"
|
||||||
|
|
||||||
|
// Quando si usano intestazioni precompilate, questo file è necessario per la riuscita della compilazione.
|
||||||
13
GolemHelper/pch.h
Normal file
13
GolemHelper/pch.h
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
// pch.h: questo è un file di intestazione precompilata.
|
||||||
|
// I file elencati di seguito vengono compilati una sola volta, in modo da migliorare le prestazioni per le compilazioni successive.
|
||||||
|
// Questa impostazione influisce anche sulle prestazioni di IntelliSense, incluso il completamento codice e molte altre funzionalità di esplorazione del codice.
|
||||||
|
// I file elencati qui vengono però TUTTI ricompilati se uno di essi viene aggiornato da una compilazione all'altra.
|
||||||
|
// Non aggiungere qui file soggetti a frequenti aggiornamenti; in caso contrario si perderanno i vantaggi offerti in termini di prestazioni.
|
||||||
|
|
||||||
|
#ifndef PCH_H
|
||||||
|
#define PCH_H
|
||||||
|
|
||||||
|
// aggiungere qui le intestazioni da precompilare
|
||||||
|
#include "framework.h"
|
||||||
|
|
||||||
|
#endif //PCH_H
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
//{{NO_DEPENDENCIES}}
|
|
||||||
// File di inclusione generato con Microsoft Visual C++.
|
|
||||||
// Utilizzato da GolemHelper.rc
|
|
||||||
//
|
|
||||||
#define IDB_PNG1 104
|
|
||||||
#define IDB_PNG2 105
|
|
||||||
|
|
||||||
// Next default values for new objects
|
|
||||||
//
|
|
||||||
#ifdef APSTUDIO_INVOKED
|
|
||||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
|
||||||
#define _APS_NEXT_RESOURCE_VALUE 106
|
|
||||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
|
||||||
#define _APS_NEXT_CONTROL_VALUE 1001
|
|
||||||
#define _APS_NEXT_SYMED_VALUE 101
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
42
README.md
42
README.md
|
|
@ -1,29 +1,33 @@
|
||||||
# GolemHelper
|
# GolemHelper BETA
|
||||||
|
|
||||||
A Guild Wars 2 addon for [Nexus](https://github.com/RaidcoreGG/Nexus) that automates optimal boon and golem configurations in the Special Forces Training Area.
|
A Guild Wars 2 addon for [Nexus](https://github.com/RaidcoreGG/Nexus) that that automates boon application and golem configuration in the Special Forces Training Area with support for different DPS role modes.
|
||||||
|
|
||||||
|
## Description
|
||||||
|
|
||||||
|
GolemHelper eliminates the tedious manual clicking required to set up optimal training conditions. With a single keypress, you can apply all necessary boons or configure golem settings.
|
||||||
|
The addon automatically scales coordinates for different resolutions and UI sizes.
|
||||||
|
|
||||||
|
Particularly useful for players who:
|
||||||
|
- Regularly practice rotations on training golems
|
||||||
|
- Test different build configurations
|
||||||
|
- Play multiple DPS roles (Quickness DPS, Alacrity DPS, Chronomancer DT+DR)
|
||||||
|
- Want to minimize setup time and focus on actual gameplay practice
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
DPS Benchmarking:
|
- Automated Boon Application: Apply boon configuration based on dps mode.
|
||||||
|
- Automated Golem Configuration: Apply SnowCrows benchmark settings on golem with one keypress.
|
||||||
|
|
||||||
- hi dps
|
DPS Modes:
|
||||||
- Quick DPS
|
- Quick DPS Mode: Automatically skips Quickness boon
|
||||||
- Alac DPS
|
- Alac DPS Mode: Automatically skips Alacrity boon
|
||||||
|
- Chronomancer Mode: Automatically skips Slow debuff on golem
|
||||||
|
|
||||||
Healer Support:
|
## Planned Features (No ETA)
|
||||||
|
|
||||||
- Environment Damage with Mild/Moderate/Extreme settings
|
- ImGui Interface: Visual interface for easier mode switching and configuration (coming in v1.0.0 final)
|
||||||
- Specialized healer boon sequences (qHeal/aHeal modes)
|
- Additional DPS Modes: More specialized role configurations based on community feedback
|
||||||
|
- Custom Presets: User-defined boon and golem configurations
|
||||||
Golem Customization:
|
|
||||||
|
|
||||||
- Hitbox selection: Small/Medium/Large (Small is benchmark default)
|
|
||||||
- Advanced condition modifiers: Skip Slow, Skip Burning, 5 Bleeding Stacks
|
|
||||||
|
|
||||||
Tips:
|
|
||||||
|
|
||||||
- If the sequence is too fast and missing clicks, increase Custom Delays in the UI
|
|
||||||
- You can move your mouse during the sequence, just don't hover over UIs or click
|
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue