Beta.2 - Added ImGui support and new features
- Added ImGui library integration - Enhanced UI configurations - Improved custom delay settings - Fixed existing bugs - Updated project dependencies
This commit is contained in:
parent
fcf6e26e66
commit
ec0eb69865
15 changed files with 47278 additions and 117 deletions
109
GolemHelper/Dependencies/imgui/imconfig.h
Normal file
109
GolemHelper/Dependencies/imgui/imconfig.h
Normal file
|
|
@ -0,0 +1,109 @@
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// 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);
|
||||||
|
}
|
||||||
|
*/
|
||||||
11153
GolemHelper/Dependencies/imgui/imgui.cpp
Normal file
11153
GolemHelper/Dependencies/imgui/imgui.cpp
Normal file
File diff suppressed because it is too large
Load diff
2725
GolemHelper/Dependencies/imgui/imgui.h
Normal file
2725
GolemHelper/Dependencies/imgui/imgui.h
Normal file
File diff suppressed because it is too large
Load diff
7533
GolemHelper/Dependencies/imgui/imgui_demo.cpp
Normal file
7533
GolemHelper/Dependencies/imgui/imgui_demo.cpp
Normal file
File diff suppressed because it is too large
Load diff
3899
GolemHelper/Dependencies/imgui/imgui_draw.cpp
Normal file
3899
GolemHelper/Dependencies/imgui/imgui_draw.cpp
Normal file
File diff suppressed because it is too large
Load diff
2528
GolemHelper/Dependencies/imgui/imgui_internal.h
Normal file
2528
GolemHelper/Dependencies/imgui/imgui_internal.h
Normal file
File diff suppressed because it is too large
Load diff
3923
GolemHelper/Dependencies/imgui/imgui_tables.cpp
Normal file
3923
GolemHelper/Dependencies/imgui/imgui_tables.cpp
Normal file
File diff suppressed because it is too large
Load diff
7918
GolemHelper/Dependencies/imgui/imgui_widgets.cpp
Normal file
7918
GolemHelper/Dependencies/imgui/imgui_widgets.cpp
Normal file
File diff suppressed because it is too large
Load diff
639
GolemHelper/Dependencies/imgui/imstb_rectpack.h
Normal file
639
GolemHelper/Dependencies/imgui/imstb_rectpack.h
Normal file
|
|
@ -0,0 +1,639 @@
|
||||||
|
// [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.
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
1447
GolemHelper/Dependencies/imgui/imstb_textedit.h
Normal file
1447
GolemHelper/Dependencies/imgui/imstb_textedit.h
Normal file
File diff suppressed because it is too large
Load diff
4903
GolemHelper/Dependencies/imgui/imstb_truetype.h
Normal file
4903
GolemHelper/Dependencies/imgui/imstb_truetype.h
Normal file
File diff suppressed because it is too large
Load diff
153
GolemHelper/Dependencies/mumble/Mumble.h
Normal file
153
GolemHelper/Dependencies/mumble/Mumble.h
Normal file
|
|
@ -0,0 +1,153 @@
|
||||||
|
#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
|
||||||
|
|
@ -142,10 +142,47 @@
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="Definitions\Nexus.h" />
|
<ClInclude Include="Definitions\Nexus.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="framework.h" />
|
<ClInclude Include="framework.h" />
|
||||||
<ClInclude Include="pch.h" />
|
<ClInclude Include="pch.h" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<ClCompile Include="Dependencies\imgui\imgui.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_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" />
|
<ClCompile Include="dllmain.cpp" />
|
||||||
<ClCompile Include="pch.cpp">
|
<ClCompile Include="pch.cpp">
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,15 @@
|
||||||
<Filter Include="Definitions">
|
<Filter Include="Definitions">
|
||||||
<UniqueIdentifier>{076f83a5-9043-4392-bb42-102eb54d65fb}</UniqueIdentifier>
|
<UniqueIdentifier>{076f83a5-9043-4392-bb42-102eb54d65fb}</UniqueIdentifier>
|
||||||
</Filter>
|
</Filter>
|
||||||
|
<Filter Include="Dependencies">
|
||||||
|
<UniqueIdentifier>{27275069-8d0e-4c32-a745-abf5ae2384a5}</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>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="framework.h">
|
<ClInclude Include="framework.h">
|
||||||
|
|
@ -27,6 +36,27 @@
|
||||||
<ClInclude Include="Definitions\Nexus.h">
|
<ClInclude Include="Definitions\Nexus.h">
|
||||||
<Filter>Definitions</Filter>
|
<Filter>Definitions</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="Dependencies\imgui\imconfig.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>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="dllmain.cpp">
|
<ClCompile Include="dllmain.cpp">
|
||||||
|
|
@ -35,5 +65,20 @@
|
||||||
<ClCompile Include="pch.cpp">
|
<ClCompile Include="pch.cpp">
|
||||||
<Filter>File di origine</Filter>
|
<Filter>File di origine</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="Dependencies\imgui\imgui.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>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
@ -4,7 +4,11 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
#include "Dependencies/imgui/imgui.h"
|
||||||
|
#include "Dependencies/mumble/Mumble.h"
|
||||||
|
|
||||||
AddonAPI* g_api = nullptr;
|
AddonAPI* g_api = nullptr;
|
||||||
|
NexusLinkData* NexusLink = nullptr;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
bool enabled = false;
|
bool enabled = false;
|
||||||
|
|
@ -13,8 +17,13 @@ struct {
|
||||||
bool isQuickDps = false;
|
bool isQuickDps = false;
|
||||||
bool isAlacDps = false;
|
bool isAlacDps = false;
|
||||||
bool isChronomancer = false;
|
bool isChronomancer = false;
|
||||||
|
bool isMediumHitbox = false;
|
||||||
bool debugMode = false;
|
bool debugMode = false;
|
||||||
|
bool showUI = false;
|
||||||
|
bool useCustomDelays = false;
|
||||||
int debugCounter = 0;
|
int debugCounter = 0;
|
||||||
|
|
||||||
|
int stepDelay = 290;
|
||||||
} g_state;
|
} g_state;
|
||||||
|
|
||||||
struct MenuCoordinates {
|
struct MenuCoordinates {
|
||||||
|
|
@ -39,14 +48,176 @@ struct MenuCoordinates {
|
||||||
};
|
};
|
||||||
} g_coords;
|
} g_coords;
|
||||||
|
|
||||||
|
void GetScaledCoordinates(int baseX, int baseY, int* scaledX, int* scaledY);
|
||||||
|
void DebugMousePosition();
|
||||||
|
void ApplyAllBoons();
|
||||||
|
void ApplyGolemSettings();
|
||||||
|
void ClickAtScaled(int baseX, int baseY, int delay);
|
||||||
|
bool ShouldSkipBoonStep(int stepIndex);
|
||||||
|
bool ShouldSkipGolemStep(int stepIndex);
|
||||||
|
void HandleBoonKeybind(const char* id, bool release);
|
||||||
|
void HandleGolemKeybind(const char* id, bool release);
|
||||||
|
void HandleToggleKeybind(const char* id, bool release);
|
||||||
|
void HandleUIToggleKeybind(const char* id, bool release);
|
||||||
|
void HandleDebugKeybind(const char* id, bool release);
|
||||||
|
void HandleQuickDpsKeybind(const char* id, bool release);
|
||||||
|
void HandleAlacDpsKeybind(const char* id, bool release);
|
||||||
|
void HandleChronomancerKeybind(const char* id, bool release);
|
||||||
|
void HandleMediumHitboxKeybind(const char* id, bool release);
|
||||||
|
void Load(AddonAPI* aApi);
|
||||||
|
void Unload();
|
||||||
|
|
||||||
|
void RenderUI() {
|
||||||
|
if (!g_state.showUI) return;
|
||||||
|
|
||||||
|
ImGui::SetNextWindowSize(ImVec2(400, 500), ImGuiCond_FirstUseEver);
|
||||||
|
ImGui::SetNextWindowPos(ImVec2(50, 50), ImGuiCond_FirstUseEver);
|
||||||
|
|
||||||
|
if (ImGui::Begin("GolemHelper Control Panel", &g_state.showUI, ImGuiWindowFlags_AlwaysAutoResize)) {
|
||||||
|
|
||||||
|
ImGui::TextColored(ImVec4(0.2f, 0.8f, 1.0f, 1.0f), "GolemHelper v1.0.0-beta.3");
|
||||||
|
ImGui::Separator();
|
||||||
|
|
||||||
|
ImGui::Text("Status:");
|
||||||
|
ImGui::SameLine();
|
||||||
|
if (g_state.enabled) {
|
||||||
|
ImGui::TextColored(ImVec4(0.0f, 1.0f, 0.0f, 1.0f), "ENABLED");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
ImGui::TextColored(ImVec4(1.0f, 0.0f, 0.0f, 1.0f), "DISABLED");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ImGui::Button(g_state.enabled ? "Disable GolemHelper" : "Enable GolemHelper", ImVec2(200, 0))) {
|
||||||
|
g_state.enabled = !g_state.enabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
ImGui::Spacing();
|
||||||
|
ImGui::Separator();
|
||||||
|
|
||||||
|
ImGui::Text("Boon Configuration");
|
||||||
|
ImGui::Checkbox("Enable Boons", &g_state.boonsEnabled);
|
||||||
|
|
||||||
|
if (ImGui::Button("Apply Boons", ImVec2(150, 0))) {
|
||||||
|
if (g_state.enabled) {
|
||||||
|
g_api->InputBinds.Invoke("GolemHelper.ApplyBoons", false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ImGui::Text("DPS Modes:");
|
||||||
|
|
||||||
|
if (ImGui::RadioButton("Normal Mode", !g_state.isQuickDps && !g_state.isAlacDps)) {
|
||||||
|
g_state.isQuickDps = false;
|
||||||
|
g_state.isAlacDps = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ImGui::RadioButton("Quick DPS (Skip Quickness)", g_state.isQuickDps)) {
|
||||||
|
g_state.isQuickDps = true;
|
||||||
|
g_state.isAlacDps = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ImGui::RadioButton("Alac DPS (Skip Alacrity)", g_state.isAlacDps)) {
|
||||||
|
g_state.isQuickDps = false;
|
||||||
|
g_state.isAlacDps = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
ImGui::Spacing();
|
||||||
|
ImGui::Separator();
|
||||||
|
|
||||||
|
ImGui::Text("Golem Configuration");
|
||||||
|
ImGui::Checkbox("Enable Golem Settings", &g_state.golemEnabled);
|
||||||
|
|
||||||
|
if (ImGui::Button("Apply Golem Settings", ImVec2(150, 0))) {
|
||||||
|
if (g_state.enabled) {
|
||||||
|
g_api->InputBinds.Invoke("GolemHelper.ApplyGolem", false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ImGui::Checkbox("Medium Hitbox (Default is Small)", &g_state.isMediumHitbox);
|
||||||
|
|
||||||
|
ImGui::Checkbox("Chronomancer Mode (Skip Slow)", &g_state.isChronomancer);
|
||||||
|
|
||||||
|
ImGui::Spacing();
|
||||||
|
ImGui::Separator();
|
||||||
|
|
||||||
|
ImGui::Text("Settings");
|
||||||
|
|
||||||
|
if (ImGui::Button("Configure Hotkeys", ImVec2(150, 0))) {
|
||||||
|
}
|
||||||
|
|
||||||
|
if (g_state.debugMode) {
|
||||||
|
ImGui::Spacing();
|
||||||
|
ImGui::Separator();
|
||||||
|
ImGui::Text("Display Info:");
|
||||||
|
if (NexusLink && NexusLink->Width > 0 && NexusLink->Height > 0) {
|
||||||
|
ImGui::Text("Resolution: %dx%d", NexusLink->Width, NexusLink->Height);
|
||||||
|
ImGui::Text("UI Scale: %.2f", NexusLink->Scaling);
|
||||||
|
float dpiScale = (float)NexusLink->Width / 1920.0f;
|
||||||
|
ImGui::Text("DPI Scale: %.3f", dpiScale);
|
||||||
|
ImGui::Text("Debug samples: %d", g_state.debugCounter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ImGui::Spacing();
|
||||||
|
ImGui::Separator();
|
||||||
|
ImGui::Text("Timing Settings");
|
||||||
|
|
||||||
|
bool wasUsingCustom = g_state.useCustomDelays;
|
||||||
|
ImGui::Checkbox("Use Custom Step Delay", &g_state.useCustomDelays);
|
||||||
|
|
||||||
|
if (g_state.useCustomDelays) {
|
||||||
|
ImGui::SliderInt("", &g_state.stepDelay, 100, 1000, "%d ms");
|
||||||
|
|
||||||
|
ImGui::Spacing();
|
||||||
|
if (ImGui::Button("Reset to Default", ImVec2(120, 0))) {
|
||||||
|
g_state.stepDelay = 290;
|
||||||
|
}
|
||||||
|
ImGui::SameLine();
|
||||||
|
if (ImGui::Button("Slow Mode", ImVec2(80, 0))) {
|
||||||
|
g_state.stepDelay = 1000;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!wasUsingCustom) {
|
||||||
|
ImGui::Spacing();
|
||||||
|
ImGui::TextColored(ImVec4(0.8f, 0.8f, 0.2f, 1.0f), "Increase delay if clicks fail");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ImGui::End();
|
||||||
|
}
|
||||||
|
|
||||||
|
void RenderOptions() {
|
||||||
|
ImGui::Separator();
|
||||||
|
ImGui::Text("GolemHelper Settings");
|
||||||
|
|
||||||
|
ImGui::Checkbox("Show UI by default", &g_state.showUI);
|
||||||
|
ImGui::Checkbox("Enable debug mode", &g_state.debugMode);
|
||||||
|
|
||||||
|
if (ImGui::Button("Reset all settings")) {
|
||||||
|
g_state.isQuickDps = false;
|
||||||
|
g_state.isAlacDps = false;
|
||||||
|
g_state.isChronomancer = false;
|
||||||
|
g_state.isMediumHitbox = false;
|
||||||
|
g_state.useCustomDelays = false;
|
||||||
|
g_state.stepDelay = 290;
|
||||||
|
g_state.boonsEnabled = true;
|
||||||
|
g_state.golemEnabled = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
ImGui::Spacing();
|
||||||
|
ImGui::Text("Current Modes:");
|
||||||
|
ImGui::Text("- Boons: %s", g_state.isQuickDps ? "Quick DPS" : g_state.isAlacDps ? "Alac DPS" : "Normal");
|
||||||
|
ImGui::Text("- Golem: %s", g_state.isChronomancer ? "Chronomancer" : "Normal");
|
||||||
|
ImGui::Text("- Hitbox: %s", g_state.isMediumHitbox ? "Medium" : "Small");
|
||||||
|
ImGui::Text("- Timing: %s", g_state.useCustomDelays ? "Custom" : "Default");
|
||||||
|
}
|
||||||
|
|
||||||
void GetScaledCoordinates(int baseX, int baseY, int* scaledX, int* scaledY) {
|
void GetScaledCoordinates(int baseX, int baseY, int* scaledX, int* scaledY) {
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", "GetScaledCoordinates CHIAMATA");
|
g_api->Log(ELogLevel_INFO, "GolemHelper", "GetScaledCoordinates CHIAMATA");
|
||||||
|
|
||||||
NexusLinkData* nexusData = (NexusLinkData*)g_api->DataLink.Get("DL_NEXUS_LINK");
|
if (NexusLink && NexusLink->Width > 0 && NexusLink->Height > 0) {
|
||||||
|
float uiScale = NexusLink->Scaling;
|
||||||
if (nexusData && nexusData->Width > 0 && nexusData->Height > 0) {
|
float dpiScale = (float)NexusLink->Width / 1920.0f;
|
||||||
float uiScale = nexusData->Scaling;
|
|
||||||
float dpiScale = (float)nexusData->Width / 1920.0f;
|
|
||||||
|
|
||||||
char valuesBuffer[200];
|
char valuesBuffer[200];
|
||||||
sprintf_s(valuesBuffer, "GetScaled INPUT: uiScale=%.3f, base=%d,%d", uiScale, baseX, baseY);
|
sprintf_s(valuesBuffer, "GetScaled INPUT: uiScale=%.3f, base=%d,%d", uiScale, baseX, baseY);
|
||||||
|
|
@ -103,11 +274,9 @@ void DebugMousePosition() {
|
||||||
POINT mousePos;
|
POINT mousePos;
|
||||||
GetCursorPos(&mousePos);
|
GetCursorPos(&mousePos);
|
||||||
|
|
||||||
NexusLinkData* nexusData = (NexusLinkData*)g_api->DataLink.Get("DL_NEXUS_LINK");
|
if (NexusLink && NexusLink->Width > 0 && NexusLink->Height > 0) {
|
||||||
|
float uiScale = NexusLink->Scaling;
|
||||||
if (nexusData && nexusData->Width > 0 && nexusData->Height > 0) {
|
float dpiScale = (float)NexusLink->Width / 1920.0f;
|
||||||
float uiScale = nexusData->Scaling;
|
|
||||||
float dpiScale = (float)nexusData->Width / 1920.0f;
|
|
||||||
float finalScaleX = uiScale * dpiScale;
|
float finalScaleX = uiScale * dpiScale;
|
||||||
|
|
||||||
int baseX = (int)(mousePos.x / finalScaleX);
|
int baseX = (int)(mousePos.x / finalScaleX);
|
||||||
|
|
@ -117,7 +286,7 @@ void DebugMousePosition() {
|
||||||
|
|
||||||
char buffer[450];
|
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",
|
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,
|
g_state.debugCounter, NexusLink->Width, NexusLink->Height,
|
||||||
mousePos.x, mousePos.y, baseX, baseY, uiScale, dpiScale, finalScaleX);
|
mousePos.x, mousePos.y, baseX, baseY, uiScale, dpiScale, finalScaleX);
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", buffer);
|
g_api->Log(ELogLevel_INFO, "GolemHelper", buffer);
|
||||||
}
|
}
|
||||||
|
|
@ -126,7 +295,6 @@ void DebugMousePosition() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_state.debugCounter == 1) {
|
if (g_state.debugCounter == 1) {
|
||||||
g_api->UI.SendAlert("Debug active - Interface Size + DPI scaling");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -167,31 +335,9 @@ bool ShouldSkipGolemStep(int stepIndex) {
|
||||||
void ApplyAllBoons() {
|
void ApplyAllBoons() {
|
||||||
if (!g_api || !g_state.boonsEnabled || !g_state.enabled) return;
|
if (!g_api || !g_state.boonsEnabled || !g_state.enabled) return;
|
||||||
|
|
||||||
NexusLinkData* nexusData = (NexusLinkData*)g_api->DataLink.Get("DL_NEXUS_LINK");
|
bool uiWasVisible = g_state.showUI;
|
||||||
if (nexusData && nexusData->Width > 0 && nexusData->Height > 0) {
|
if (uiWasVisible) {
|
||||||
float uiScale = nexusData->Scaling;
|
g_state.showUI = false;
|
||||||
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" :
|
const char* mode = g_state.isQuickDps ? "Quick DPS" :
|
||||||
|
|
@ -203,36 +349,20 @@ void ApplyAllBoons() {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
g_api->GameBinds.InvokeAsync(EGameBinds_MiscInteract, 50);
|
g_api->GameBinds.InvokeAsync(EGameBinds_MiscInteract, 50);
|
||||||
Sleep(390);
|
int initialDelay = g_state.useCustomDelays ? g_state.stepDelay : 390;
|
||||||
|
Sleep(initialDelay);
|
||||||
|
|
||||||
for (int i = 0; i < 20; i++) {
|
for (int i = 0; i < 20; i++) {
|
||||||
if (g_coords.boonStepX[i] == 0 && g_coords.boonStepY[i] == 0) {
|
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;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ShouldSkipBoonStep(i)) {
|
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;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
char stepBuffer[200];
|
int delay = (i == 19) ? 50 : (g_state.useCustomDelays ? g_state.stepDelay : 290);
|
||||||
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);
|
ClickAtScaled(g_coords.boonStepX[i], g_coords.boonStepY[i], delay);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -240,71 +370,74 @@ void ApplyAllBoons() {
|
||||||
g_api->Log(ELogLevel_WARNING, "GolemHelper", "Exception during boon sequence");
|
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!");
|
g_api->Log(ELogLevel_INFO, "GolemHelper", "Boon sequence completed!");
|
||||||
}
|
}
|
||||||
|
|
||||||
void ApplyGolemSettings() {
|
void ApplyGolemSettings() {
|
||||||
if (!g_api || !g_state.golemEnabled || !g_state.enabled) return;
|
if (!g_api || !g_state.golemEnabled || !g_state.enabled) return;
|
||||||
|
|
||||||
NexusLinkData* nexusData = (NexusLinkData*)g_api->DataLink.Get("DL_NEXUS_LINK");
|
bool uiWasVisible = g_state.showUI;
|
||||||
if (nexusData && nexusData->Width > 0 && nexusData->Height > 0) {
|
if (uiWasVisible) {
|
||||||
float uiScale = nexusData->Scaling;
|
g_state.showUI = false;
|
||||||
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";
|
const char* mode = g_state.isChronomancer ? "Chronomancer" : "Normal";
|
||||||
char startBuffer[200];
|
const char* hitbox = g_state.isMediumHitbox ? "Medium Hitbox" : "Small Hitbox";
|
||||||
sprintf_s(startBuffer, "Starting golem settings sequence (25 steps) - Mode: %s", mode);
|
char startBuffer[300];
|
||||||
|
sprintf_s(startBuffer, "Starting golem settings sequence (25 steps) - Mode: %s, Hitbox: %s", mode, hitbox);
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", startBuffer);
|
g_api->Log(ELogLevel_INFO, "GolemHelper", startBuffer);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
g_api->GameBinds.InvokeAsync(EGameBinds_MiscInteract, 50);
|
g_api->GameBinds.InvokeAsync(EGameBinds_MiscInteract, 50);
|
||||||
Sleep(390);
|
int initialDelay = g_state.useCustomDelays ? g_state.stepDelay : 390;
|
||||||
|
Sleep(initialDelay);
|
||||||
|
|
||||||
for (int i = 0; i < 25; i++) {
|
for (int i = 0; i < 25; i++) {
|
||||||
if (g_coords.golemStepX[i] == 0 && g_coords.golemStepY[i] == 0) {
|
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;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ShouldSkipGolemStep(i)) {
|
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;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
char stepBuffer[150];
|
int currentX = g_coords.golemStepX[i];
|
||||||
sprintf_s(stepBuffer, "Executing golem step %d at base coordinates: %d,%d",
|
int currentY = g_coords.golemStepY[i];
|
||||||
i + 1, g_coords.golemStepX[i], g_coords.golemStepY[i]);
|
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", stepBuffer);
|
|
||||||
|
|
||||||
int delay = (i == 24) ? 50 : 290;
|
if (g_state.isMediumHitbox && i == 1) {
|
||||||
ClickAtScaled(g_coords.golemStepX[i], g_coords.golemStepY[i], delay);
|
currentY = 305;
|
||||||
|
}
|
||||||
|
|
||||||
|
int delay = (i == 24) ? 50 : (g_state.useCustomDelays ? g_state.stepDelay : 290);
|
||||||
|
|
||||||
|
ClickAtScaled(currentX, currentY, delay);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (...) {
|
catch (...) {
|
||||||
g_api->Log(ELogLevel_WARNING, "GolemHelper", "Exception during golem settings sequence");
|
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)!");
|
g_api->Log(ELogLevel_INFO, "GolemHelper", "Golem settings sequence completed (25 steps)!");
|
||||||
}
|
}
|
||||||
|
|
||||||
void HandleBoonKeybind(const char* id, bool release) {
|
void HandleBoonKeybind(const char* id, bool release) {
|
||||||
if (!release && g_state.enabled) ApplyAllBoons();
|
if (!release && g_state.enabled) {
|
||||||
|
ApplyAllBoons();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void HandleGolemKeybind(const char* id, bool release) {
|
void HandleGolemKeybind(const char* id, bool release) {
|
||||||
if (!release && g_state.enabled) ApplyGolemSettings();
|
if (!release && g_state.enabled) {
|
||||||
|
ApplyGolemSettings();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void HandleToggleKeybind(const char* id, bool release) {
|
void HandleToggleKeybind(const char* id, bool release) {
|
||||||
|
|
@ -314,6 +447,12 @@ void HandleToggleKeybind(const char* id, bool release) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void HandleUIToggleKeybind(const char* id, bool release) {
|
||||||
|
if (!release) {
|
||||||
|
g_state.showUI = !g_state.showUI;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void HandleDebugKeybind(const char* id, bool release) {
|
void HandleDebugKeybind(const char* id, bool release) {
|
||||||
if (!release) DebugMousePosition();
|
if (!release) DebugMousePosition();
|
||||||
}
|
}
|
||||||
|
|
@ -325,7 +464,6 @@ void HandleQuickDpsKeybind(const char* id, bool release) {
|
||||||
g_state.isAlacDps = false;
|
g_state.isAlacDps = false;
|
||||||
}
|
}
|
||||||
g_api->UI.SendAlert(g_state.isQuickDps ? "Quick DPS mode enabled" : "Quick DPS mode disabled");
|
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");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -336,7 +474,6 @@ void HandleAlacDpsKeybind(const char* id, bool release) {
|
||||||
g_state.isQuickDps = false;
|
g_state.isQuickDps = false;
|
||||||
}
|
}
|
||||||
g_api->UI.SendAlert(g_state.isAlacDps ? "Alac DPS mode enabled" : "Alac DPS mode disabled");
|
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");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -344,53 +481,63 @@ void HandleChronomancerKeybind(const char* id, bool release) {
|
||||||
if (!release) {
|
if (!release) {
|
||||||
g_state.isChronomancer = !g_state.isChronomancer;
|
g_state.isChronomancer = !g_state.isChronomancer;
|
||||||
g_api->UI.SendAlert(g_state.isChronomancer ? "Chronomancer mode enabled" : "Chronomancer mode disabled");
|
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) {
|
void HandleMediumHitboxKeybind(const char* id, bool release) {
|
||||||
g_api = api;
|
if (!release) {
|
||||||
|
g_state.isMediumHitbox = !g_state.isMediumHitbox;
|
||||||
|
g_api->UI.SendAlert(g_state.isMediumHitbox ? "Medium Hitbox enabled" : "Medium Hitbox disabled");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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);
|
||||||
|
|
||||||
|
NexusLink = (NexusLinkData*)g_api->DataLink.Get("DL_NEXUS_LINK");
|
||||||
|
|
||||||
g_state.enabled = true;
|
g_state.enabled = true;
|
||||||
|
|
||||||
|
g_api->Renderer.Register(ERenderType_Render, RenderUI);
|
||||||
|
g_api->Renderer.Register(ERenderType_OptionsRender, RenderOptions);
|
||||||
|
|
||||||
Keybind kb_empty = { 0, false, false, false };
|
Keybind kb_empty = { 0, false, false, false };
|
||||||
g_api->InputBinds.RegisterWithStruct("GolemHelper.ApplyBoons", HandleBoonKeybind, kb_empty);
|
g_api->InputBinds.RegisterWithStruct("GolemHelper.ApplyBoons", HandleBoonKeybind, kb_empty);
|
||||||
g_api->InputBinds.RegisterWithStruct("GolemHelper.ApplyGolem", HandleGolemKeybind, 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.QuickDPS", HandleQuickDpsKeybind, kb_empty);
|
||||||
g_api->InputBinds.RegisterWithStruct("GolemHelper.AlacDPS", HandleAlacDpsKeybind, 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.Chronomancer", HandleChronomancerKeybind, kb_empty);
|
||||||
|
g_api->InputBinds.RegisterWithStruct("GolemHelper.MediumHitbox", HandleMediumHitboxKeybind, kb_empty);
|
||||||
g_api->InputBinds.RegisterWithStruct("GolemHelper.Toggle", HandleToggleKeybind, kb_empty);
|
g_api->InputBinds.RegisterWithStruct("GolemHelper.Toggle", HandleToggleKeybind, kb_empty);
|
||||||
g_api->InputBinds.RegisterWithStruct("GolemHelper.DebugMouse", HandleDebugKeybind, kb_empty);
|
g_api->InputBinds.RegisterWithStruct("GolemHelper.DebugMouse", HandleDebugKeybind, kb_empty);
|
||||||
|
g_api->InputBinds.RegisterWithStruct("GolemHelper.ToggleUI", HandleUIToggleKeybind, 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", "=== GolemHelper v1.0.0-beta.2 Loaded ===");
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", "Available keybinds:");
|
g_api->Log(ELogLevel_INFO, "GolemHelper", "<c=#00ff00>GolemHelper addon</c> loaded successfully!");
|
||||||
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() {
|
void Unload() {
|
||||||
|
if (g_api) {
|
||||||
|
g_api->Renderer.Deregister(RenderUI);
|
||||||
|
g_api->Renderer.Deregister(RenderOptions);
|
||||||
g_api->InputBinds.Deregister("GolemHelper.ApplyBoons");
|
g_api->InputBinds.Deregister("GolemHelper.ApplyBoons");
|
||||||
g_api->InputBinds.Deregister("GolemHelper.ApplyGolem");
|
g_api->InputBinds.Deregister("GolemHelper.ApplyGolem");
|
||||||
g_api->InputBinds.Deregister("GolemHelper.QuickDPS");
|
g_api->InputBinds.Deregister("GolemHelper.QuickDPS");
|
||||||
g_api->InputBinds.Deregister("GolemHelper.AlacDPS");
|
g_api->InputBinds.Deregister("GolemHelper.AlacDPS");
|
||||||
g_api->InputBinds.Deregister("GolemHelper.Chronomancer");
|
g_api->InputBinds.Deregister("GolemHelper.Chronomancer");
|
||||||
|
g_api->InputBinds.Deregister("GolemHelper.MediumHitbox");
|
||||||
g_api->InputBinds.Deregister("GolemHelper.Toggle");
|
g_api->InputBinds.Deregister("GolemHelper.Toggle");
|
||||||
g_api->InputBinds.Deregister("GolemHelper.DebugMouse");
|
g_api->InputBinds.Deregister("GolemHelper.DebugMouse");
|
||||||
|
g_api->InputBinds.Deregister("GolemHelper.ToggleUI");
|
||||||
|
}
|
||||||
|
|
||||||
|
g_api->Log(ELogLevel_INFO, "GolemHelper", "<c=#ff0000>GolemHelper signing off</c>, it was an honor commander.");
|
||||||
g_api = nullptr;
|
g_api = nullptr;
|
||||||
g_state.enabled = false;
|
g_state.enabled = false;
|
||||||
|
g_state.showUI = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" __declspec(dllexport) AddonDefinition* GetAddonDef() {
|
extern "C" __declspec(dllexport) AddonDefinition* GetAddonDef() {
|
||||||
|
|
@ -398,9 +545,9 @@ extern "C" __declspec(dllexport) AddonDefinition* GetAddonDef() {
|
||||||
def.Signature = -424248;
|
def.Signature = -424248;
|
||||||
def.APIVersion = NEXUS_API_VERSION;
|
def.APIVersion = NEXUS_API_VERSION;
|
||||||
def.Name = "GolemHelper";
|
def.Name = "GolemHelper";
|
||||||
def.Version = { 1, 0, 0, 1 };
|
def.Version = { 1, 0, 0, 2 };
|
||||||
def.Author = "Azrub";
|
def.Author = "Azrub";
|
||||||
def.Description = "Boon & golem automation with DPS modes, Chronomancer mode and auto-scaling [BETA]";
|
def.Description = "Automatically applies boons and configures golems in the training area";
|
||||||
def.Load = Load;
|
def.Load = Load;
|
||||||
def.Unload = Unload;
|
def.Unload = Unload;
|
||||||
def.Flags = EAddonFlags_None;
|
def.Flags = EAddonFlags_None;
|
||||||
|
|
@ -409,4 +556,6 @@ extern "C" __declspec(dllexport) AddonDefinition* GetAddonDef() {
|
||||||
return &def;
|
return &def;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL APIENTRY DllMain(HMODULE, DWORD, LPVOID) { return TRUE; }
|
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) {
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue