├── .gitattributes ├── .gitignore ├── AimAssist.cpp ├── AimAssist.hpp ├── Config.cpp ├── Config.hpp ├── ESP.cpp ├── ESP.hpp ├── HUD.cpp ├── HUD.hpp ├── ImGui Advanced Cheat Menu.sln ├── ImGui Advanced Cheat Menu.vcxproj ├── ImGui Advanced Cheat Menu.vcxproj.filters ├── Marker.cpp ├── Marker.hpp ├── Module.hpp ├── ModuleManager.cpp ├── ModuleManager.hpp ├── RCS.cpp ├── RCS.hpp ├── README.md ├── Set.cpp ├── Set.hpp ├── SetManager.cpp ├── SetManager.hpp ├── Source.cpp ├── dependencies └── imgui-sfml │ ├── Debug-x64-static-config.props │ ├── Release-x64-static-config.props │ ├── include │ ├── SFML │ │ ├── Audio.hpp │ │ ├── Audio │ │ │ ├── AlResource.hpp │ │ │ ├── Export.hpp │ │ │ ├── InputSoundFile.hpp │ │ │ ├── Listener.hpp │ │ │ ├── Music.hpp │ │ │ ├── OutputSoundFile.hpp │ │ │ ├── Sound.hpp │ │ │ ├── SoundBuffer.hpp │ │ │ ├── SoundBufferRecorder.hpp │ │ │ ├── SoundFileFactory.hpp │ │ │ ├── SoundFileFactory.inl │ │ │ ├── SoundFileReader.hpp │ │ │ ├── SoundFileWriter.hpp │ │ │ ├── SoundRecorder.hpp │ │ │ ├── SoundSource.hpp │ │ │ └── SoundStream.hpp │ │ ├── Config.hpp │ │ ├── GpuPreference.hpp │ │ ├── Graphics.hpp │ │ ├── Graphics │ │ │ ├── BlendMode.hpp │ │ │ ├── CircleShape.hpp │ │ │ ├── Color.hpp │ │ │ ├── ConvexShape.hpp │ │ │ ├── Drawable.hpp │ │ │ ├── Export.hpp │ │ │ ├── Font.hpp │ │ │ ├── Glsl.hpp │ │ │ ├── Glsl.inl │ │ │ ├── Glyph.hpp │ │ │ ├── Image.hpp │ │ │ ├── PrimitiveType.hpp │ │ │ ├── Rect.hpp │ │ │ ├── Rect.inl │ │ │ ├── RectangleShape.hpp │ │ │ ├── RenderStates.hpp │ │ │ ├── RenderTarget.hpp │ │ │ ├── RenderTexture.hpp │ │ │ ├── RenderWindow.hpp │ │ │ ├── Shader.hpp │ │ │ ├── Shape.hpp │ │ │ ├── Sprite.hpp │ │ │ ├── Text.hpp │ │ │ ├── Texture.hpp │ │ │ ├── Transform.hpp │ │ │ ├── Transformable.hpp │ │ │ ├── Vertex.hpp │ │ │ ├── VertexArray.hpp │ │ │ ├── VertexBuffer.hpp │ │ │ └── View.hpp │ │ ├── Main.hpp │ │ ├── Network.hpp │ │ ├── Network │ │ │ ├── Export.hpp │ │ │ ├── Ftp.hpp │ │ │ ├── Http.hpp │ │ │ ├── IpAddress.hpp │ │ │ ├── Packet.hpp │ │ │ ├── Socket.hpp │ │ │ ├── SocketHandle.hpp │ │ │ ├── SocketSelector.hpp │ │ │ ├── TcpListener.hpp │ │ │ ├── TcpSocket.hpp │ │ │ └── UdpSocket.hpp │ │ ├── OpenGL.hpp │ │ ├── System.hpp │ │ ├── System │ │ │ ├── Clock.hpp │ │ │ ├── Err.hpp │ │ │ ├── Export.hpp │ │ │ ├── FileInputStream.hpp │ │ │ ├── InputStream.hpp │ │ │ ├── Lock.hpp │ │ │ ├── MemoryInputStream.hpp │ │ │ ├── Mutex.hpp │ │ │ ├── NativeActivity.hpp │ │ │ ├── NonCopyable.hpp │ │ │ ├── Sleep.hpp │ │ │ ├── String.hpp │ │ │ ├── String.inl │ │ │ ├── Thread.hpp │ │ │ ├── Thread.inl │ │ │ ├── ThreadLocal.hpp │ │ │ ├── ThreadLocalPtr.hpp │ │ │ ├── ThreadLocalPtr.inl │ │ │ ├── Time.hpp │ │ │ ├── Utf.hpp │ │ │ ├── Utf.inl │ │ │ ├── Vector2.hpp │ │ │ ├── Vector2.inl │ │ │ ├── Vector3.hpp │ │ │ └── Vector3.inl │ │ ├── Window.hpp │ │ └── Window │ │ │ ├── Clipboard.hpp │ │ │ ├── Context.hpp │ │ │ ├── ContextSettings.hpp │ │ │ ├── Cursor.hpp │ │ │ ├── Event.hpp │ │ │ ├── Export.hpp │ │ │ ├── GlResource.hpp │ │ │ ├── Joystick.hpp │ │ │ ├── Keyboard.hpp │ │ │ ├── Mouse.hpp │ │ │ ├── Sensor.hpp │ │ │ ├── Touch.hpp │ │ │ ├── VideoMode.hpp │ │ │ ├── Window.hpp │ │ │ ├── WindowHandle.hpp │ │ │ └── WindowStyle.hpp │ ├── imconfig-SFML.h │ ├── imconfig.h │ ├── imgui-SFML.cpp │ ├── imgui-SFML.h │ ├── imgui-SFML_export.h │ ├── imgui.cpp │ ├── imgui.h │ ├── imgui_demo.cpp │ ├── imgui_draw.cpp │ ├── imgui_internal.h │ ├── imgui_tables.cpp │ ├── imgui_widgets.cpp │ ├── imstb_rectpack.h │ ├── imstb_textedit.h │ └── imstb_truetype.h │ └── lib │ ├── ImGui-SFML-d.lib │ ├── ImGui-SFML.lib │ ├── cmake │ └── SFML │ │ ├── SFMLConfig.cmake │ │ ├── SFMLConfigDependencies.cmake │ │ ├── SFMLConfigVersion.cmake │ │ ├── SFMLSharedTargets-debug.cmake │ │ ├── SFMLSharedTargets-release.cmake │ │ ├── SFMLSharedTargets.cmake │ │ ├── SFMLStaticTargets-debug.cmake │ │ ├── SFMLStaticTargets-release.cmake │ │ └── SFMLStaticTargets.cmake │ ├── flac.lib │ ├── freetype.lib │ ├── ogg.lib │ ├── openal32.lib │ ├── sfml-audio-d.lib │ ├── sfml-audio-s-d.lib │ ├── sfml-audio-s.lib │ ├── sfml-audio.lib │ ├── sfml-graphics-d.lib │ ├── sfml-graphics-s-d.lib │ ├── sfml-graphics-s.lib │ ├── sfml-graphics.lib │ ├── sfml-main-d.lib │ ├── sfml-main.lib │ ├── sfml-network-d.lib │ ├── sfml-network-s-d.lib │ ├── sfml-network-s.lib │ ├── sfml-network.lib │ ├── sfml-system-d.lib │ ├── sfml-system-s-d.lib │ ├── sfml-system-s.lib │ ├── sfml-system.lib │ ├── sfml-window-d.lib │ ├── sfml-window-s-d.lib │ ├── sfml-window-s.lib │ ├── sfml-window.lib │ ├── vorbis.lib │ ├── vorbisenc.lib │ └── vorbisfile.lib ├── imgui.ini ├── menu ├── Console.cpp ├── Console.hpp ├── Fonts.hpp ├── Menu.cpp ├── Menu.hpp ├── imgui_custom.cpp ├── imgui_custom.hpp ├── imgui_helper.cpp ├── imgui_helper.hpp └── imgui_notify.h └── util ├── ColorH.cpp ├── ColorH.hpp ├── FileH.cpp ├── FileH.hpp ├── MH.cpp ├── MH.hpp ├── Obf.hpp ├── Singleton.hpp ├── StringH.cpp ├── StringH.hpp ├── TimeH.cpp ├── TimeH.hpp └── Vec2H.hpp /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /AimAssist.cpp: -------------------------------------------------------------------------------- 1 | #include "AimAssist.hpp" 2 | #include "menu/imgui_helper.hpp" 3 | #include "SetManager.hpp" 4 | #include "menu/imgui_custom.hpp" 5 | #include "menu/Menu.hpp" 6 | 7 | #include 8 | 9 | 10 | AimAssist::AimAssist() : Module(obf("AimAssist"), obf("Helps you at Aiming")) { 11 | isEnemy = &SetManager::i().add(new Set(true, obf("isEnemy"), getName())).getBVal(); 12 | isMate = &SetManager::i().add(new Set(false, obf("isMate"), getName())).getBVal(); 13 | isBot = &SetManager::i().add(new Set(false, obf("isBot"), getName())).getBVal(); 14 | relativeFOV = &SetManager::i().add(new Set(false, obf("relativeFOV"), getName())).getBVal(); 15 | noSnap = &SetManager::i().add(new Set(false, obf("noSnap"), getName())).getBVal(); 16 | noLock = &SetManager::i().add(new Set(false, obf("noLock"), getName())).getBVal(); 17 | 18 | hitbox = &SetManager::i().add(new Set(0, obf("hitbox"), getName())).getIVal(); 19 | targetSelection = &SetManager::i().add(new Set(0, obf("targetSelection"), getName())).getIVal(); 20 | onHold = &SetManager::i().add(new Set(0, obf("onHold"), getName())).getIVal(); 21 | reactTime = &SetManager::i().add(new Set(200, 0, 1000, obf("reactionTime"), getName())).getVec3i(); 22 | fov = &SetManager::i().add(new Set(40, 0, 360, obf("fov"), getName())).getVec3i(); 23 | } 24 | 25 | void AimAssist::renderImGui() { 26 | ImGui::Checkbox_(obf("Enabled").c_str(), &isToggled()); 27 | ImGui::SameLine(); 28 | 29 | int i = *onHold; 30 | 31 | ImGuiHelper::renderCombo(" ", { obf("Toggle"), obf("Hold") }, *onHold, 80); 32 | 33 | ImGui::Hotkey(obf("Hotkey").c_str(), getKey()); 34 | 35 | ImGuiHelper::renderCombo(obf("Target Selection"), { obf("By Distance"), obf("By Health") }, *targetSelection, Menu::elementSize); 36 | std::string targets = ""; 37 | if (*isEnemy || *isMate || *isBot) { // atleast one target 38 | if (*isEnemy && *isMate && *isBot) targets = obf("All"); 39 | else { 40 | if (*isEnemy) targets += obf("Enemy,"); 41 | if (*isMate) targets += obf("Mate,"); 42 | if (*isBot) targets += obf("Bots,"); 43 | if (targets.back() == ',') targets.pop_back(); // remove , at the end 44 | } 45 | } 46 | else targets = obf("None"); 47 | 48 | ImGui::PushItemWidth(Menu::elementSize); 49 | if (ImGui::BeginCombo(obf("Targets").c_str(), targets.c_str(), 0)) { 50 | ImGui::Checkbox_(obf("Enemy").c_str(), isEnemy); 51 | ImGui::Checkbox_(obf("Mate").c_str(), isMate); 52 | ImGui::Checkbox_(obf("Bot").c_str(), isBot); 53 | ImGui::EndCombo(); 54 | } 55 | ImGui::PopItemWidth(); 56 | 57 | ImGuiHelper::renderCombo(obf("Hitbox"), { obf("Head"), obf("Neck"), obf("Body"), obf("Arms"), obf("Hip"), obf("Legs") }, *hitbox, Menu::elementSize); 58 | 59 | ImGui::PushItemWidth(Menu::elementSize); 60 | ImGui::SliderInt_(obf("Reaction ms").c_str(), &reactTime->x, reactTime->y, reactTime->z); 61 | ImGui::PopItemWidth(); 62 | 63 | ImGui::PushItemWidth(Menu::elementSize); 64 | ImGui::SliderInt_(obf("FOV").c_str(), &fov->x, fov->y, fov->z); 65 | ImGui::PopItemWidth(); 66 | ImGui::Checkbox_(obf("Relative FOV").c_str(), relativeFOV); 67 | ImGui::Checkbox_(obf("No Snap").c_str(), noSnap); 68 | ImGui::Checkbox_(obf("No Lock").c_str(), noLock); 69 | } -------------------------------------------------------------------------------- /AimAssist.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "imgui.h" 3 | #include "util/Obf.hpp" 4 | #include "util/Singleton.hpp" 5 | #include "Module.hpp" 6 | 7 | class AimAssist : public Singleton, public Module { 8 | friend class Singleton; 9 | public: 10 | bool* isEnemy, * isMate, * isBot, * relativeFOV, * noSnap, * noLock; 11 | int* hitbox, * targetSelection, * onHold; 12 | Vec3i* reactTime, * fov; 13 | 14 | AimAssist(); 15 | void renderImGui(); 16 | 17 | void onEnable() override {} 18 | void onDisable() override {} 19 | }; -------------------------------------------------------------------------------- /Config.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "util/Singleton.hpp" 3 | 4 | #include 5 | #include 6 | 7 | class Config : public Singleton { 8 | friend class Singleton; 9 | public: 10 | std::vector cfgs; 11 | Config(); 12 | 13 | void checkCfgs(); 14 | void renderImGui(); 15 | 16 | bool save(); 17 | bool save(std::string filePath); 18 | bool load(); 19 | bool load(std::string filePath); 20 | }; -------------------------------------------------------------------------------- /ESP.cpp: -------------------------------------------------------------------------------- 1 | #include "ESP.hpp" 2 | #include "menu/imgui_helper.hpp" 3 | #include "menu/imgui_custom.hpp" 4 | #include "menu/Menu.hpp" 5 | #include "SetManager.hpp" 6 | #include 7 | 8 | ESP::ESP() : Module(obf("ESP"), obf("Render Entities through Walls"), VK_DIVIDE) { 9 | colSkeleton = &SetManager::i().add(new Set(ImGuiHelper::rgbaToVec4(222, 144, 154, 200), obf("colSkeleton"), getName())).getVec4(); 10 | col2DBox = &SetManager::i().add(new Set(ImGuiHelper::rgbaToVec4(114, 222, 154, 200), obf("col2DBox"), getName())).getVec4(); 11 | colHealthBar = &SetManager::i().add(new Set(ImGuiHelper::rgbaToVec4(114, 144, 222, 200), obf("colHealthBar"), getName())).getVec4(); 12 | colHeadCircle = &SetManager::i().add(new Set(ImGuiHelper::rgbaToVec4(188, 169, 154, 200), obf("colHeadCircle"), getName())).getVec4(); 13 | 14 | isSkeleton = &SetManager::i().add(new Set(false, obf("isSkeleton"), getName())).getBVal(); 15 | is2DBox = &SetManager::i().add(new Set(false, obf("is2DBox"), getName())).getBVal(); 16 | isHealthBar = &SetManager::i().add(new Set(false, obf("isHealthBar"), getName())).getBVal(); 17 | isHeadCircle = &SetManager::i().add(new Set(false, obf("isHeadCircle"), getName())).getBVal(); 18 | isEnemy = &SetManager::i().add(new Set(true, obf("isEnemy"), getName())).getBVal(); 19 | isMate = &SetManager::i().add(new Set(false, obf("isMate"), getName())).getBVal(); 20 | isBot = &SetManager::i().add(new Set(false, obf("isBot"), getName())).getBVal(); 21 | isSkeletonHealthBased = &SetManager::i().add(new Set(false, obf("isSkeletonHealthBased"), getName())).getBVal(); 22 | is2DBoxHealthBased = &SetManager::i().add(new Set(false, obf("is2DBoxHealthBased"), getName())).getBVal(); 23 | isHealthBarHealthBased = &SetManager::i().add(new Set(false, obf("isHealthBarHealthBased"), getName())).getBVal(); 24 | isHeadCircleHealthBased = &SetManager::i().add(new Set(false, obf("isHeadCircleHealthBased"), getName())).getBVal(); 25 | } 26 | 27 | void ESP::renderImGui() { 28 | ImGui::Checkbox_(obf("Enabled").c_str(), &isToggled()); 29 | 30 | ImGui::Hotkey(obf("Hotkey").c_str(), getKey()); 31 | 32 | ImGui::PushItemWidth(Menu::elementSize); 33 | if (ImGui::BeginCombo(obf("Type").c_str(), obf("Type").c_str(), 0)) { 34 | ImGui::Checkbox_(obf("Enemy").c_str(), isEnemy); 35 | ImGui::Checkbox_(obf("Mate").c_str(), isMate); 36 | ImGui::Checkbox_(obf("Bot").c_str(), isBot); 37 | 38 | ImGui::EndCombo(); 39 | } 40 | ImGui::PopItemWidth(); 41 | 42 | ImGui::PushItemWidth(Menu::elementSize); 43 | if (ImGui::BeginCombo(obf("2D Box Style").c_str(), obf("Style").c_str(), 0)) { 44 | ImGui::Checkbox_(obf("2D Box").c_str(), is2DBox); 45 | ImGui::ColorEdit4(obf("2D Box Color##1").c_str(), (float*)col2DBox, ImGuiColorEditFlags_NoInputs | ImGuiColorEditFlags_AlphaBar); 46 | ImGui::Checkbox_(obf("2D Box Based on Health").c_str(), is2DBoxHealthBased); 47 | ImGui::EndCombo(); 48 | } 49 | if (ImGui::BeginCombo(obf("Skeleton Style").c_str(), obf("Style").c_str(), 0)) { 50 | ImGui::Checkbox_(obf("Skeleton").c_str(), isSkeleton); 51 | ImGui::ColorEdit4(obf("Skeleton Color##1").c_str(), (float*)colSkeleton, ImGuiColorEditFlags_NoInputs | ImGuiColorEditFlags_AlphaBar); 52 | ImGui::Checkbox_(obf("Skeleton Based on Health").c_str(), isSkeletonHealthBased); 53 | ImGui::EndCombo(); 54 | } 55 | if (ImGui::BeginCombo(obf("Healthbar Style").c_str(), obf("Style").c_str(), 0)) { 56 | ImGui::Checkbox_(obf("Healthbar").c_str(), isHealthBar); 57 | ImGui::ColorEdit4(obf("Healthbar Color##1").c_str(), (float*)colHealthBar, ImGuiColorEditFlags_NoInputs | ImGuiColorEditFlags_AlphaBar); 58 | ImGui::Checkbox_(obf("Healthbar Based on Health").c_str(), isHealthBarHealthBased); 59 | ImGui::EndCombo(); 60 | } 61 | if (ImGui::BeginCombo(obf("Head Circle Style").c_str(), obf("Style").c_str(), 0)) { 62 | ImGui::Checkbox_(obf("Head Circle").c_str(), isHeadCircle); 63 | ImGui::ColorEdit4(obf("Head Circle Color##1").c_str(), (float*)colHeadCircle, ImGuiColorEditFlags_NoInputs | ImGuiColorEditFlags_AlphaBar); 64 | ImGui::Checkbox_(obf("Head Circle Based on Health").c_str(), isHeadCircleHealthBased); 65 | ImGui::EndCombo(); 66 | } 67 | ImGui::PopItemWidth(); 68 | } -------------------------------------------------------------------------------- /ESP.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "imgui.h" 3 | #include "util/Obf.hpp" 4 | #include "util/Singleton.hpp" 5 | #include "Module.hpp" 6 | 7 | class ESP : public Singleton, public Module { 8 | friend class Singleton; 9 | public: 10 | ImVec4* colSkeleton, * col2DBox, * colHealthBar, * colHeadCircle; 11 | bool* isSkeleton, * is2DBox, * isHealthBar, * isHeadCircle, * isEnemy, * isMate, * isBot, 12 | * isSkeletonHealthBased, * is2DBoxHealthBased, * isHealthBarHealthBased, * isHeadCircleHealthBased; 13 | 14 | ESP(); 15 | void renderImGui(); 16 | 17 | void onEnable() override {} 18 | void onDisable() override {} 19 | }; -------------------------------------------------------------------------------- /HUD.cpp: -------------------------------------------------------------------------------- 1 | #include "HUD.hpp" 2 | #include "util/ColorH.hpp" 3 | #include "menu/imgui_helper.hpp" 4 | #include "menu/imgui_custom.hpp" 5 | #include "ModuleManager.hpp" 6 | #include "util/TimeH.hpp" 7 | #include "SetManager.hpp" 8 | #include "menu/Menu.hpp" 9 | 10 | #include 11 | 12 | HUD::HUD() : Module(obf("HUD"), obf("Renders Overlay like ModuleList")) { 13 | colML = &SetManager::i().add(new Set(ImGuiHelper::rgbaToVec4(255, 100, 100, 255), obf("colML"), getName())).getVec4(); 14 | colML_Bg = &SetManager::i().add(new Set(ImGuiHelper::rgbaToVec4(0, 0, 0, 100), obf("colML_Bg"), getName())).getVec4(); 15 | 16 | speedML = &SetManager::i().add(new Set(0.4f, 0.1f, 1.f, obf("speedML"), getName())).getVec3f(); 17 | offsetML = &SetManager::i().add(new Set(0.06f, 0.f, 0.4f, obf("offsetML"), getName())).getVec3f(); 18 | rangeML = &SetManager::i().add(new Set(0.02f, 0.f, 0.1f, obf("rangeML"), getName())).getVec3f(); 19 | 20 | isML = &SetManager::i().add(new Set(false, obf("isML"), getName())).getBVal(); 21 | isMLRainbow = &SetManager::i().add(new Set(true, obf("isMLRainbow"), getName())).getBVal(); 22 | isTime = &SetManager::i().add(new Set(false, obf("isTime"), getName())).getBVal(); 23 | 24 | alignML = &SetManager::i().add(new Set(0, obf("alignML"), getName())).getIVal(); 25 | sortML = &SetManager::i().add(new Set(1, obf("sortML"), getName())).getIVal(); 26 | } 27 | 28 | void HUD::renderImGui() { 29 | ImGui::Checkbox_(obf("Show HUD").c_str(), &isToggled()); 30 | ImGui::Checkbox_(obf("Show ModuleList").c_str(), isML); 31 | ImGui::PushItemWidth(Menu::elementSize); 32 | if (ImGui::BeginCombo(obf("ModuleList Style").c_str(), obf("Style").c_str(), 0)) { 33 | ImGui::ColorEdit4(obf("ModuleList Color##1").c_str(), (float*)&colML->x, ImGuiColorEditFlags_NoInputs | ImGuiColorEditFlags_AlphaBar); 34 | ImGui::Checkbox_(obf("Rainbow Color").c_str(), isMLRainbow); 35 | ImGui::PushItemWidth(Menu::elementSize); 36 | ImGui::SliderFloat_(obf("ModuleList Speed").c_str(), &speedML->x, speedML->y, speedML->z); 37 | ImGui::SliderFloat_(obf("ModuleList Offset").c_str(), &offsetML->x, offsetML->y, offsetML->z); 38 | ImGui::SliderFloat_(obf("ModuleList Range").c_str(), &rangeML->x, rangeML->y, rangeML->z); 39 | ImGui::PopItemWidth(); 40 | ImGui::ColorEdit4(obf("Background Color##1").c_str(), (float*)&colML_Bg->x, ImGuiColorEditFlags_NoInputs | ImGuiColorEditFlags_AlphaBar); 41 | ImGuiHelper::renderCombo(obf("Sort"), { obf("ASC"), obf("DSC") }, *sortML, Menu::elementSize); 42 | ImGuiHelper::renderCombo(obf("Align"), { obf("Left"), obf("Right"), obf("Middle") }, *alignML, Menu::elementSize); 43 | 44 | ImGui::EndCombo(); 45 | } 46 | ImGui::PopItemWidth(); 47 | } 48 | 49 | void HUD::renderML() { 50 | if (!*isML) return; 51 | 52 | ImVec2 winPadding = ImGui::GetStyle().WindowPadding; 53 | std::vectormodules; 54 | float calcHeight = winPadding.y * 2, longestStr = 0, shortestStr; 55 | 56 | for (int i = 0; i < ModuleManager::i().modules.size(); i++) { 57 | Module* m = ModuleManager::i().modules.at(i); 58 | if (!m->isToggled()) continue; 59 | 60 | ImVec2 vec2 = ImGui::CalcTextSize(m->getName().c_str()); 61 | if (vec2.x > longestStr) longestStr = vec2.x; 62 | calcHeight += vec2.y; 63 | 64 | modules.push_back(&m->getName()); 65 | } 66 | if (modules.size() == 0) return; // no Module active 67 | 68 | calcHeight += ImGui::GetStyle().ItemSpacing.y * (modules.size() - 1); // itemspacing; 69 | 70 | ImGui::SetNextWindowSize({ longestStr + winPadding.x * 2, calcHeight }); 71 | ImGui::PushStyleColor(ImGuiCol_WindowBg, *colML_Bg); 72 | ImGui::Begin(" ", 0, ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoTitleBar); 73 | ImGui::PopStyleColor(); 74 | 75 | if (sortML == 0) { 76 | 77 | } 78 | 79 | if (*isMLRainbow) { 80 | for (int i = 0; i < modules.size(); i++) { 81 | std::string* str = modules.at(i); 82 | float h, s, v; 83 | ColorH::RGBtoHSV(colML->x, colML->y, colML->z, h, s, v); 84 | 85 | if ((*alignML == 1 || *alignML == 2) && i != 0) { 86 | float width = ImGui::CalcTextSize(str->c_str()).x; 87 | if (*alignML == 1) ImGui::Dummy(ImVec2(longestStr - width - ImGui::GetStyle().ItemSpacing.x, 0)); 88 | else ImGui::Dummy(ImVec2((longestStr - width) * 0.5 - ImGui::GetStyle().ItemSpacing.x, 0)); 89 | ImGui::SameLine(); 90 | } 91 | ImGui::chromaText(*str, s, v, colML->w, i * (offsetML->x + 1), speedML->x, rangeML->x); 92 | } 93 | } 94 | else { 95 | for (int i = 0; i < modules.size(); i++) { 96 | std::string* str = modules.at(i); 97 | 98 | if ((*alignML == 1 || *alignML == 2) && i != 0) { 99 | float width = ImGui::CalcTextSize(str->c_str()).x; 100 | if (*alignML == 1) ImGui::Dummy(ImVec2(longestStr - width - ImGui::GetStyle().ItemSpacing.x, 0)); 101 | else ImGui::Dummy(ImVec2((longestStr - width) * 0.5 - ImGui::GetStyle().ItemSpacing.x, 0)); 102 | ImGui::SameLine(); 103 | } 104 | 105 | ImGui::PushStyleColor(ImGuiCol_Text, *colML); 106 | ImGui::Text(str->c_str()); 107 | ImGui::PopStyleColor(); 108 | } 109 | } 110 | 111 | ImGui::End(); 112 | } 113 | 114 | void HUD::render() { 115 | if (!isToggled()) return; 116 | 117 | renderML(); 118 | } -------------------------------------------------------------------------------- /HUD.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "imgui.h" 3 | #include "util/Obf.hpp" 4 | #include "util/Singleton.hpp" 5 | #include "Module.hpp" 6 | 7 | class HUD : public Singleton, public Module { 8 | friend class Singleton; 9 | public: 10 | int* alignML, * sortML; 11 | ImVec4* colML, * colML_Bg; 12 | Vec3f* speedML, *offsetML, *rangeML; 13 | bool* isML, * isMLRainbow, // render Module List 14 | * isTime; 15 | 16 | HUD(); 17 | void renderImGui(); 18 | void render(); 19 | void renderML(); 20 | 21 | void onEnable() override {} 22 | void onDisable() override {} 23 | }; -------------------------------------------------------------------------------- /ImGui Advanced Cheat Menu.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.32510.428 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ImGui Advanced Cheat Menu", "ImGui Advanced Cheat Menu.vcxproj", "{0F77A9A8-7435-4B2B-9742-926B1A0EE48C}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Debug|x86 = Debug|x86 12 | Release|x64 = Release|x64 13 | Release|x86 = Release|x86 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {0F77A9A8-7435-4B2B-9742-926B1A0EE48C}.Debug|x64.ActiveCfg = Debug|x64 17 | {0F77A9A8-7435-4B2B-9742-926B1A0EE48C}.Debug|x64.Build.0 = Debug|x64 18 | {0F77A9A8-7435-4B2B-9742-926B1A0EE48C}.Debug|x86.ActiveCfg = Debug|Win32 19 | {0F77A9A8-7435-4B2B-9742-926B1A0EE48C}.Debug|x86.Build.0 = Debug|Win32 20 | {0F77A9A8-7435-4B2B-9742-926B1A0EE48C}.Release|x64.ActiveCfg = Release|x64 21 | {0F77A9A8-7435-4B2B-9742-926B1A0EE48C}.Release|x64.Build.0 = Release|x64 22 | {0F77A9A8-7435-4B2B-9742-926B1A0EE48C}.Release|x86.ActiveCfg = Release|Win32 23 | {0F77A9A8-7435-4B2B-9742-926B1A0EE48C}.Release|x86.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityGlobals) = postSolution 29 | SolutionGuid = {F571F6B4-61DE-46AB-812D-93F270FA35D2} 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /Marker.cpp: -------------------------------------------------------------------------------- 1 | #include "Marker.hpp" 2 | #include "menu/imgui_helper.hpp" 3 | #include "menu/imgui_custom.hpp" 4 | #include "SetManager.hpp" 5 | #include 6 | 7 | Marker::Marker() : Module(obf("Marker"), obf("Render a Marker to Entities Position")) { 8 | col = &SetManager::i().add(new Set(ImGuiHelper::rgbaToVec4(60, 160, 200, 200), obf("col"), getName())).getVec4(); 9 | 10 | renderWhenVisible = &SetManager::i().add(new Set(false, obf("renderWhenVisible"), getName())).getBVal(); 11 | renderBehind = &SetManager::i().add(new Set(true, obf("renderBehind"), getName())).getBVal(); 12 | renderInfront = &SetManager::i().add(new Set(false, obf("renderInfront"), getName())).getBVal(); 13 | } 14 | 15 | void Marker::renderImGui() { 16 | ImGui::Checkbox_(obf("Enable Markers").c_str(), &isToggled()); 17 | ImGui::ColorEdit4(obf("Marker Color##1").c_str(), (float*)col, ImGuiColorEditFlags_NoInputs | ImGuiColorEditFlags_AlphaBar); 18 | ImGui::Checkbox_(obf("Render Behind").c_str(), renderBehind); 19 | ImGui::Checkbox_(obf("Render Infront").c_str(), renderInfront); 20 | } -------------------------------------------------------------------------------- /Marker.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "imgui.h" 3 | #include "util/Obf.hpp" 4 | #include "util/Singleton.hpp" 5 | #include "Module.hpp" 6 | 7 | class Marker : public Singleton, public Module { 8 | friend class Singleton; 9 | public: 10 | ImVec4* col; 11 | bool* renderWhenVisible; 12 | bool* renderBehind, * renderInfront; 13 | 14 | Marker(); 15 | void renderImGui(); 16 | 17 | void onEnable() override {} 18 | void onDisable() override {} 19 | }; -------------------------------------------------------------------------------- /Module.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "util/Obf.hpp" 3 | #include "util/StringH.hpp" 4 | #include "util/Vec2H.hpp" 5 | #include "menu/Console.hpp" 6 | 7 | #include 8 | 9 | class Module { 10 | private: 11 | std::string name, description; 12 | bool toggled; 13 | int key; 14 | public: 15 | 16 | Module(std::string name, std::string description, int key = 0) { 17 | this->name = name; 18 | this->description = description; 19 | 20 | this->key = key; 21 | this->toggled = false; 22 | } 23 | 24 | virtual void onEnable() = 0; 25 | virtual void onDisable() = 0; 26 | 27 | std::string& getName() { 28 | return name; 29 | } 30 | 31 | std::string& getDescription() { 32 | return description; 33 | } 34 | 35 | int& getKey() { 36 | return key; 37 | } 38 | 39 | void setKey(int key, bool log = false) { 40 | this->key = key; 41 | if (!log) return; 42 | std::string out = obf("Set Key: [").c_str() + StringH::vkToString(key) + obf("] for Module: [").c_str() + this->name.c_str() + "]"; 43 | Console::i().logInfo(out); 44 | } 45 | 46 | bool& isToggled() { 47 | return toggled; 48 | } 49 | 50 | void setToggled(bool toggled, bool log = false) { 51 | this->toggled = toggled; 52 | if (!log) return; 53 | Console::i().logInfo(obf("Set Toggled: [") + StringH::boolToStr(toggled) + obf("] for Module: [") + this->name + obf("]")); 54 | } 55 | 56 | void toggle(bool log = false) { 57 | toggled = !toggled; 58 | if (isToggled()) { 59 | onEnable(); 60 | } 61 | else { 62 | onDisable(); 63 | } 64 | if (!log) return; 65 | 66 | Console::i().logInfo(obf("Toggled to: [") + StringH::boolToStr(toggled) + obf("] for Module: [") + this->name + obf("]")); 67 | } 68 | }; -------------------------------------------------------------------------------- /ModuleManager.cpp: -------------------------------------------------------------------------------- 1 | #include "ModuleManager.hpp" 2 | #include "HUD.hpp" 3 | #include "ESP.hpp" 4 | #include "RCS.hpp" 5 | #include "Marker.hpp" 6 | #include "AimAssist.hpp" 7 | 8 | #include "util/StringH.hpp" 9 | 10 | ModuleManager::ModuleManager() { 11 | modules.push_back(&AimAssist::i()); 12 | modules.push_back(&Marker::i()); 13 | modules.push_back(&HUD::i()); 14 | modules.push_back(&RCS::i()); 15 | modules.push_back(&ESP::i()); 16 | } 17 | 18 | Module* ModuleManager::getModuleByName(std::string name) { 19 | for (Module* mod : modules) { 20 | if (StringH::equalsIgnoreCase(mod->getName(), name))return mod; 21 | } 22 | return NULL; 23 | } -------------------------------------------------------------------------------- /ModuleManager.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "util/Singleton.hpp" 3 | #include "Module.hpp" 4 | 5 | #include 6 | 7 | class ModuleManager : public Singleton { 8 | friend class Singleton; 9 | public: 10 | std::vector modules; // virtual functions need pointers 11 | 12 | ModuleManager(); 13 | Module* getModuleByName(std::string name); 14 | }; -------------------------------------------------------------------------------- /RCS.cpp: -------------------------------------------------------------------------------- 1 | #include "RCS.hpp" 2 | #include "menu/imgui_helper.hpp" 3 | #include "menu/imgui_custom.hpp" 4 | #include "menu/Menu.hpp" 5 | #include "SetManager.hpp" 6 | #include 7 | 8 | RCS::RCS() : Module(obf("RCS"), obf("Comprehends for Shooting Recoil")) { 9 | standalone = &SetManager::i().add(new Set(true, obf("standalone"), getName())).getBVal(); 10 | 11 | xPow = &SetManager::i().add(new Set(0.6f, 0.1f, 1.f, obf("xPow"), getName())).getVec3f(); 12 | yPow = &SetManager::i().add(new Set(0.5f, 0.1f, 1.f, obf("yPow"), getName())).getVec3f(); 13 | } 14 | 15 | void RCS::renderImGui() { 16 | ImGui::Checkbox_(obf("Enable Recoil Control").c_str(), &isToggled()); 17 | ImGui::Checkbox_(obf("Standalone").c_str(), standalone); 18 | 19 | ImGui::PushItemWidth(Menu::elementSize); 20 | ImGui::SliderFloat_(obf("X Strength").c_str(), &xPow->x, xPow->y, xPow->z); 21 | ImGui::SliderFloat_(obf("Y Strength").c_str(), &yPow->x, xPow->y, xPow->z); 22 | ImGui::PopItemWidth(); 23 | } -------------------------------------------------------------------------------- /RCS.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "imgui.h" 3 | #include "util/Obf.hpp" 4 | #include "util/Singleton.hpp" 5 | #include "Module.hpp" 6 | 7 | class RCS : public Singleton, public Module { 8 | friend class Singleton; 9 | public: 10 | bool* standalone; 11 | Vec3f* xPow, * yPow; 12 | 13 | RCS(); 14 | void renderImGui(); 15 | 16 | void onEnable() override {} 17 | void onDisable() override {} 18 | }; -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ImGUI-Advanced-Cheat-Menu 2 | 3 | > An ImGui Menu preset that is somewhat useable. 4 | * SFML is used for backend. 5 | * This Menu does not modify ImGui. New elements are added in imgui_custom.hpp (Hotkey Button) 6 | 7 | ![menu](https://user-images.githubusercontent.com/59796488/178153554-7cf12656-7d93-4a7c-b505-10dac9b674fb.png) 8 | 9 | * Build scripts are available for x64 DEBUG and RELEASE 10 | * Project will only compile for Windows without modifications 11 | 12 | ## Features 13 | * Decent Menu to work with 14 | * Custom Hotkey Button 15 | * Console Window for Debugging 16 | * Font Loaded from Memory (Poppins and Fontawesome v.5 for Icons) 17 | * Overlay for Active Modules Loaded (very improvable) 18 | 19 | ## Features to add 20 | * Configs Loading and Saving 21 | * Search Feature 22 | * Title for Panels 23 | * Animations? 24 | * Custom Items 25 | 26 | ## Version 1.1 27 | * Made ModuleList (HUD) customizeable 28 | * ModuleList Sorting by ASC not working currently 29 | 30 | 31 | https://user-images.githubusercontent.com/59796488/178722805-4d2eeae8-c656-48f8-b9b1-171c549f7fab.mp4 32 | 33 | -------------------------------------------------------------------------------- /Set.cpp: -------------------------------------------------------------------------------- 1 | #include "Set.hpp" 2 | 3 | Set::Set(bool val, std::string ID, std::string ID2) { 4 | bval = val; 5 | typeID = SET_TYPE_BOOL; 6 | this->ID = ID; 7 | this->ID2 = ID2; 8 | } 9 | Set::Set(int val, std::string ID, std::string ID2) { 10 | ival = val; 11 | typeID = SET_TYPE_INT; 12 | this->ID = ID; 13 | this->ID2 = ID2; 14 | } 15 | Set::Set(float val, std::string ID, std::string ID2) { 16 | fval = val; 17 | typeID = SET_TYPE_FLOAT; 18 | this->ID = ID; 19 | this->ID2 = ID2; 20 | } 21 | Set::Set(double val, std::string ID, std::string ID2) { 22 | dval = val; 23 | typeID = SET_TYPE_DOUBLE; 24 | this->ID = ID; 25 | this->ID2 = ID2; 26 | } 27 | Set::Set(int val, int min, int max, std::string ID, std::string ID2) { 28 | vec3i = Vec3i(val, min, max); 29 | typeID = SET_TYPE_SLIDER_I; 30 | this->ID = ID; 31 | this->ID2 = ID2; 32 | } 33 | Set::Set(float val, float min, float max, std::string ID, std::string ID2) { 34 | vec3f = Vec3f(val, min, max); 35 | typeID = SET_TYPE_SLIDER_F; 36 | this->ID = ID; 37 | this->ID2 = ID2; 38 | } 39 | Set::Set(double val, double min, double max, std::string ID, std::string ID2) { 40 | vec3d = Vec3d(val, min, max); 41 | typeID = SET_TYPE_SLIDER_D; 42 | this->ID = ID; 43 | this->ID2 = ID2; 44 | } 45 | Set::Set(ImVec4 v, std::string ID, std::string ID2) { 46 | vec4 = v; 47 | typeID = SET_TYPE_VEC4; 48 | this->ID = ID; 49 | this->ID2 = ID2; 50 | } 51 | 52 | bool& Set::getBVal() { 53 | return bval; 54 | } 55 | int& Set::getIVal() { 56 | return ival; 57 | } 58 | float& Set::getFVal() { 59 | return fval; 60 | } 61 | double& Set::getDVal() { 62 | return dval; 63 | } 64 | ImVec4& Set::getVec4() { 65 | return vec4; 66 | } 67 | Vec3i& Set::getVec3i() { 68 | return vec3i; 69 | } 70 | Vec3f& Set::getVec3f() { 71 | return vec3f; 72 | } 73 | Vec3d& Set::getVec3d() { 74 | return vec3d; 75 | } 76 | 77 | void Set::setBVal(bool val) { 78 | bval = val; 79 | } 80 | void Set::setIVal(int val) { 81 | ival = val; 82 | } 83 | void Set::setFVal(float val) { 84 | fval = val; 85 | } 86 | void Set::setDVal(double val) { 87 | dval = val; 88 | } 89 | void Set::setVec4(ImVec4 v) { 90 | vec4 = v; 91 | } 92 | void Set::setVec3i(int val, int min, int max) { 93 | vec3i = Vec3i(val, min, max); 94 | } 95 | void Set::setVec3f(float val, float min, float max) { 96 | vec3f = Vec3f(val, min, max); 97 | } 98 | void Set::setVec3d(double val, double min, double max) { 99 | vec3d = Vec3d(val, min, max); 100 | } 101 | 102 | 103 | bool Set::isBool() { 104 | return typeID == SET_TYPE_BOOL; 105 | } 106 | bool Set::isInt() { 107 | return typeID == SET_TYPE_INT; 108 | } 109 | bool Set::isFloat() { 110 | return typeID == SET_TYPE_FLOAT; 111 | } 112 | bool Set::isDouble() { 113 | return typeID == SET_TYPE_DOUBLE; 114 | } 115 | bool Set::isISlider() { 116 | return typeID == SET_TYPE_SLIDER_I; 117 | } 118 | bool Set::isFSlider() { 119 | return typeID == SET_TYPE_SLIDER_F; 120 | } 121 | bool Set::isDSlider() { 122 | return typeID == SET_TYPE_SLIDER_D; 123 | } 124 | bool Set::isVec4() { 125 | return typeID == SET_TYPE_VEC4; 126 | } -------------------------------------------------------------------------------- /Set.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "util/Vec2H.hpp" 3 | #include "imgui.h" 4 | 5 | #include 6 | 7 | #define SET_TYPE_BOOL 0 8 | #define SET_TYPE_INT 1 9 | #define SET_TYPE_FLOAT 2 10 | #define SET_TYPE_DOUBLE 3 11 | #define SET_TYPE_SLIDER_I 4 12 | #define SET_TYPE_SLIDER_F 5 13 | #define SET_TYPE_SLIDER_D 6 14 | #define SET_TYPE_VEC4 7 15 | 16 | class Set { 17 | int typeID = -1; 18 | bool bval; 19 | int ival; 20 | float fval; 21 | double dval; 22 | ImVec4 vec4; 23 | Vec3i vec3i; 24 | Vec3f vec3f; 25 | Vec3d vec3d; 26 | public: 27 | std::string ID, ID2; 28 | 29 | Set(bool val, std::string ID, std::string ID2 = ""); // addBool 30 | Set(int val, std::string ID, std::string ID2 = ""); // addInt 31 | Set(float val, std::string ID, std::string ID2 = ""); // addFloat 32 | Set(double val, std::string ID, std::string ID2 = ""); // addDouble 33 | 34 | Set(int val, int min, int max, std::string ID, std::string ID2 = ""); // addISlider 35 | Set(float val, float min, float max, std::string ID, std::string ID2 = ""); // addFSlider 36 | Set(double val, double min, double max, std::string ID, std::string ID2 = ""); // addDSlider 37 | Set(ImVec4 v, std::string ID, std::string ID2 = ""); // addImVec4 38 | 39 | bool& getBVal(); 40 | int& getIVal(); 41 | float& getFVal(); 42 | double& getDVal(); 43 | ImVec4& getVec4(); 44 | Vec3i& getVec3i(); 45 | Vec3f& getVec3f(); 46 | Vec3d& getVec3d(); 47 | 48 | void setBVal(bool val); 49 | void setIVal(int val); 50 | void setFVal(float val); 51 | void setDVal(double val); 52 | void setVec4(ImVec4 v); 53 | void setVec3i(int val, int min, int max); 54 | void setVec3f(float val, float min, float max); 55 | void setVec3d(double val, double min, double max); 56 | 57 | 58 | bool isBool(); 59 | bool isInt(); 60 | bool isFloat(); 61 | bool isDouble(); 62 | bool isISlider(); 63 | bool isFSlider(); 64 | bool isDSlider(); 65 | bool isVec4(); 66 | }; -------------------------------------------------------------------------------- /SetManager.cpp: -------------------------------------------------------------------------------- 1 | #include "SetManager.hpp" 2 | 3 | #include "util/StringH.hpp" 4 | 5 | Set& SetManager::add(Set* set) { 6 | settings.push_back(set); 7 | return *set; 8 | } 9 | 10 | Set* SetManager::getSetByName(std::string ID, std::string ID2) { 11 | for (Set* set : settings) { 12 | if (!ID2.empty()) { 13 | if (StringH::equalsIgnoreCase(set->ID2, ID2) && StringH::equalsIgnoreCase(set->ID, ID)) return set; 14 | continue; 15 | } 16 | if (StringH::equalsIgnoreCase(set->ID, ID))return set; 17 | } 18 | return NULL; 19 | } -------------------------------------------------------------------------------- /SetManager.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "util/Singleton.hpp" 3 | #include "Set.hpp" 4 | 5 | #include 6 | 7 | class SetManager : public Singleton { 8 | friend class Singleton; 9 | public: 10 | std::vector settings; 11 | 12 | Set& add(Set* set); 13 | Set* getSetByName(std::string ID, std::string ID2 = ""); 14 | }; -------------------------------------------------------------------------------- /Source.cpp: -------------------------------------------------------------------------------- 1 | #include "imgui.h" 2 | #include "imgui-SFML.h" 3 | #include "util/Obf.hpp" 4 | 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | #include "menu/Fonts.hpp" 12 | #include "menu/Menu.hpp" 13 | #include "menu/Console.hpp" 14 | #include "ModuleManager.hpp" 15 | 16 | #include 17 | #include "menu/imgui_notify.h" 18 | 19 | bool show_demo_window = true; 20 | 21 | void keyCheck() { 22 | if (GetAsyncKeyState(VK_INSERT) & 1) { 23 | Menu::isGUIVisible = !Menu::isGUIVisible; 24 | } 25 | 26 | for (Module* mod : ModuleManager::i().modules) { 27 | if (GetAsyncKeyState(mod->getKey()) & 1) { 28 | mod->toggle(); 29 | ImGuiToast toast(ImGuiToastType_Info, 400); 30 | toast.set_title((obf("Toggled ") + mod->getName()).c_str()); 31 | ImGui::InsertNotification(toast); 32 | } 33 | } 34 | } 35 | 36 | int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { 37 | sf::RenderWindow window(sf::VideoMode(1280, 800), obf("ImGui + SFML = <3"), sf::Style::Default); 38 | HWND hwnd = window.getSystemHandle(); 39 | //SetWindowLong(hwnd, GWL_EXSTYLE, GetWindowLong(hwnd, GWL_EXSTYLE) | WS_EX_TOOLWINDOW); // exclude from taskbar 40 | window.setFramerateLimit(60); 41 | ImGui::SFML::Init(window); 42 | 43 | // Setup our Menu Theme and font 44 | Menu::loadTheme(); 45 | 46 | Console::i().log(obf("Test Log")); 47 | Console::i().logInfo(obf("Info Test Log")); 48 | Console::i().logError(obf("Error Test Log")); 49 | Console::i().log(obf("Log with no Date"), false); 50 | 51 | Console::i().logInfo(obf("sdcfg -> Save Current Config")); 52 | Console::i().logInfo(obf("ldcfg -> Load Saved Config")); 53 | 54 | sf::Clock deltaClock; 55 | while (window.isOpen()) { 56 | sf::Event event; 57 | while (window.pollEvent(event)) { 58 | ImGui::SFML::ProcessEvent(window, event); 59 | 60 | if (event.type == sf::Event::Closed) { 61 | window.close(); 62 | } 63 | } 64 | 65 | ImGui::SFML::Update(window, deltaClock.restart()); 66 | 67 | keyCheck(); 68 | 69 | // imgui render here 70 | if (show_demo_window) ImGui::ShowDemoWindow(&show_demo_window); 71 | 72 | Menu::render(); 73 | if (Menu::isGUIVisible) 74 | Console::i().render(); 75 | 76 | { // render Notifications 77 | ImGui::PushStyleVar(ImGuiStyleVar_WindowRounding, 5.f); 78 | ImGui::PushStyleColor(ImGuiCol_WindowBg, ImVec4(43.f / 255.f, 43.f / 255.f, 43.f / 255.f, 100.f / 255.f)); 79 | ImGui::RenderNotifications(); 80 | ImGui::PopStyleVar(1); // Don't forget to Pop() 81 | ImGui::PopStyleColor(1); 82 | } 83 | 84 | window.clear(sf::Color(115, 140, 155, 255)); 85 | // sfml render here 86 | 87 | ImGui::SFML::Render(window); 88 | window.display(); 89 | } 90 | 91 | ImGui::SFML::Shutdown(); 92 | } -------------------------------------------------------------------------------- /dependencies/imgui-sfml/Debug-x64-static-config.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | $(SolutionDir)Dependencies\imgui-sfml\include;%(AdditionalIncludeDirectories) 9 | SFML_STATIC;%(PreprocessorDefinitions) 10 | 11 | 12 | $(SolutionDir)Dependencies\imgui-sfml\lib;%(AdditionalLibraryDirectories) 13 | Dwmapi.lib;opengl32.lib;openal32.lib;winmm.lib;freetype.lib;sfml-graphics-s-d.lib;sfml-window-s-d.lib;sfml-system-s-d.lib;sfml-audio-s-d.lib;sfml-network-s-d.lib;ImGui-SFML-d.lib;%(AdditionalDependencies) 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /dependencies/imgui-sfml/Release-x64-static-config.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Dwmapi.lib;opengl32.lib;openal32.lib;winmm.lib;freetype.lib;sfml-graphics-s.lib;sfml-window-s.lib;sfml-system-s.lib;sfml-audio-s.lib;sfml-network-s.lib;ImGui-SFML.lib;%(AdditionalDependencies) 9 | $(SolutionDir)Dependencies\imgui-sfml\lib 10 | 11 | 12 | $(SolutionDir)Dependencies\imgui-sfml\include;%(AdditionalIncludeDirectories) 13 | SFML_STATIC;%(PreprocessorDefinitions) 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /dependencies/imgui-sfml/include/SFML/Audio.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_AUDIO_HPP 26 | #define SFML_AUDIO_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include 40 | #include 41 | #include 42 | #include 43 | #include 44 | #include 45 | #include 46 | 47 | 48 | #endif // SFML_AUDIO_HPP 49 | 50 | //////////////////////////////////////////////////////////// 51 | /// \defgroup audio Audio module 52 | /// 53 | /// Sounds, streaming (musics or custom sources), recording, 54 | /// spatialization. 55 | /// 56 | //////////////////////////////////////////////////////////// 57 | -------------------------------------------------------------------------------- /dependencies/imgui-sfml/include/SFML/Audio/AlResource.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_ALRESOURCE_HPP 26 | #define SFML_ALRESOURCE_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | #include 32 | 33 | 34 | namespace sf 35 | { 36 | //////////////////////////////////////////////////////////// 37 | /// \brief Base class for classes that require an OpenAL context 38 | /// 39 | //////////////////////////////////////////////////////////// 40 | class SFML_AUDIO_API AlResource 41 | { 42 | protected: 43 | 44 | //////////////////////////////////////////////////////////// 45 | /// \brief Default constructor 46 | /// 47 | //////////////////////////////////////////////////////////// 48 | AlResource(); 49 | 50 | //////////////////////////////////////////////////////////// 51 | /// \brief Destructor 52 | /// 53 | //////////////////////////////////////////////////////////// 54 | ~AlResource(); 55 | }; 56 | 57 | } // namespace sf 58 | 59 | 60 | #endif // SFML_ALRESOURCE_HPP 61 | 62 | //////////////////////////////////////////////////////////// 63 | /// \class sf::AlResource 64 | /// \ingroup audio 65 | /// 66 | /// This class is for internal use only, it must be the base 67 | /// of every class that requires a valid OpenAL context in 68 | /// order to work. 69 | /// 70 | //////////////////////////////////////////////////////////// 71 | -------------------------------------------------------------------------------- /dependencies/imgui-sfml/include/SFML/Audio/Export.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_AUDIO_EXPORT_HPP 26 | #define SFML_AUDIO_EXPORT_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | #include 32 | 33 | 34 | //////////////////////////////////////////////////////////// 35 | // Define portable import / export macros 36 | //////////////////////////////////////////////////////////// 37 | #if defined(SFML_AUDIO_EXPORTS) 38 | 39 | #define SFML_AUDIO_API SFML_API_EXPORT 40 | 41 | #else 42 | 43 | #define SFML_AUDIO_API SFML_API_IMPORT 44 | 45 | #endif 46 | 47 | 48 | #endif // SFML_AUDIO_EXPORT_HPP 49 | -------------------------------------------------------------------------------- /dependencies/imgui-sfml/include/SFML/Audio/OutputSoundFile.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_OUTPUTSOUNDFILE_HPP 26 | #define SFML_OUTPUTSOUNDFILE_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | #include 32 | #include 33 | #include 34 | 35 | 36 | namespace sf 37 | { 38 | class SoundFileWriter; 39 | 40 | //////////////////////////////////////////////////////////// 41 | /// \brief Provide write access to sound files 42 | /// 43 | //////////////////////////////////////////////////////////// 44 | class SFML_AUDIO_API OutputSoundFile : NonCopyable 45 | { 46 | public: 47 | 48 | //////////////////////////////////////////////////////////// 49 | /// \brief Default constructor 50 | /// 51 | //////////////////////////////////////////////////////////// 52 | OutputSoundFile(); 53 | 54 | //////////////////////////////////////////////////////////// 55 | /// \brief Destructor 56 | /// 57 | /// Closes the file if it was still open. 58 | /// 59 | //////////////////////////////////////////////////////////// 60 | ~OutputSoundFile(); 61 | 62 | //////////////////////////////////////////////////////////// 63 | /// \brief Open the sound file from the disk for writing 64 | /// 65 | /// The supported audio formats are: WAV, OGG/Vorbis, FLAC. 66 | /// 67 | /// \param filename Path of the sound file to write 68 | /// \param sampleRate Sample rate of the sound 69 | /// \param channelCount Number of channels in the sound 70 | /// 71 | /// \return True if the file was successfully opened 72 | /// 73 | //////////////////////////////////////////////////////////// 74 | bool openFromFile(const std::string& filename, unsigned int sampleRate, unsigned int channelCount); 75 | 76 | //////////////////////////////////////////////////////////// 77 | /// \brief Write audio samples to the file 78 | /// 79 | /// \param samples Pointer to the sample array to write 80 | /// \param count Number of samples to write 81 | /// 82 | //////////////////////////////////////////////////////////// 83 | void write(const Int16* samples, Uint64 count); 84 | 85 | private: 86 | 87 | //////////////////////////////////////////////////////////// 88 | /// \brief Close the current file 89 | /// 90 | //////////////////////////////////////////////////////////// 91 | void close(); 92 | 93 | //////////////////////////////////////////////////////////// 94 | // Member data 95 | //////////////////////////////////////////////////////////// 96 | SoundFileWriter* m_writer; ///< Writer that handles I/O on the file's format 97 | }; 98 | 99 | } // namespace sf 100 | 101 | 102 | #endif // SFML_OUTPUTSOUNDFILE_HPP 103 | 104 | 105 | //////////////////////////////////////////////////////////// 106 | /// \class sf::OutputSoundFile 107 | /// \ingroup audio 108 | /// 109 | /// This class encodes audio samples to a sound file. It is 110 | /// used internally by higher-level classes such as sf::SoundBuffer, 111 | /// but can also be useful if you want to create audio files from 112 | /// custom data sources, like generated audio samples. 113 | /// 114 | /// Usage example: 115 | /// \code 116 | /// // Create a sound file, ogg/vorbis format, 44100 Hz, stereo 117 | /// sf::OutputSoundFile file; 118 | /// if (!file.openFromFile("music.ogg", 44100, 2)) 119 | /// /* error */; 120 | /// 121 | /// while (...) 122 | /// { 123 | /// // Read or generate audio samples from your custom source 124 | /// std::vector samples = ...; 125 | /// 126 | /// // Write them to the file 127 | /// file.write(samples.data(), samples.size()); 128 | /// } 129 | /// \endcode 130 | /// 131 | /// \see sf::SoundFileWriter, sf::InputSoundFile 132 | /// 133 | //////////////////////////////////////////////////////////// 134 | -------------------------------------------------------------------------------- /dependencies/imgui-sfml/include/SFML/Audio/SoundFileFactory.inl: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | //////////////////////////////////////////////////////////// 26 | // Headers 27 | //////////////////////////////////////////////////////////// 28 | 29 | 30 | namespace sf 31 | { 32 | namespace priv 33 | { 34 | template SoundFileReader* createReader() {return new T;} 35 | template SoundFileWriter* createWriter() {return new T;} 36 | } 37 | 38 | //////////////////////////////////////////////////////////// 39 | template 40 | void SoundFileFactory::registerReader() 41 | { 42 | // Make sure the same class won't be registered twice 43 | unregisterReader(); 44 | 45 | // Create a new factory with the functions provided by the class 46 | ReaderFactory factory; 47 | factory.check = &T::check; 48 | factory.create = &priv::createReader; 49 | 50 | // Add it 51 | s_readers.push_back(factory); 52 | } 53 | 54 | 55 | //////////////////////////////////////////////////////////// 56 | template 57 | void SoundFileFactory::unregisterReader() 58 | { 59 | // Remove the instance(s) of the reader from the array of factories 60 | for (ReaderFactoryArray::iterator it = s_readers.begin(); it != s_readers.end(); ) 61 | { 62 | if (it->create == &priv::createReader) 63 | it = s_readers.erase(it); 64 | else 65 | ++it; 66 | } 67 | } 68 | 69 | //////////////////////////////////////////////////////////// 70 | template 71 | void SoundFileFactory::registerWriter() 72 | { 73 | // Make sure the same class won't be registered twice 74 | unregisterWriter(); 75 | 76 | // Create a new factory with the functions provided by the class 77 | WriterFactory factory; 78 | factory.check = &T::check; 79 | factory.create = &priv::createWriter; 80 | 81 | // Add it 82 | s_writers.push_back(factory); 83 | } 84 | 85 | 86 | //////////////////////////////////////////////////////////// 87 | template 88 | void SoundFileFactory::unregisterWriter() 89 | { 90 | // Remove the instance(s) of the writer from the array of factories 91 | for (WriterFactoryArray::iterator it = s_writers.begin(); it != s_writers.end(); ) 92 | { 93 | if (it->create == &priv::createWriter) 94 | it = s_writers.erase(it); 95 | else 96 | ++it; 97 | } 98 | } 99 | 100 | } // namespace sf 101 | -------------------------------------------------------------------------------- /dependencies/imgui-sfml/include/SFML/Audio/SoundFileWriter.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_SOUNDFILEWRITER_HPP 26 | #define SFML_SOUNDFILEWRITER_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | #include 32 | #include 33 | 34 | 35 | namespace sf 36 | { 37 | //////////////////////////////////////////////////////////// 38 | /// \brief Abstract base class for sound file encoding 39 | /// 40 | //////////////////////////////////////////////////////////// 41 | class SFML_AUDIO_API SoundFileWriter 42 | { 43 | public: 44 | 45 | //////////////////////////////////////////////////////////// 46 | /// \brief Virtual destructor 47 | /// 48 | //////////////////////////////////////////////////////////// 49 | virtual ~SoundFileWriter() {} 50 | 51 | //////////////////////////////////////////////////////////// 52 | /// \brief Open a sound file for writing 53 | /// 54 | /// \param filename Path of the file to open 55 | /// \param sampleRate Sample rate of the sound 56 | /// \param channelCount Number of channels of the sound 57 | /// 58 | /// \return True if the file was successfully opened 59 | /// 60 | //////////////////////////////////////////////////////////// 61 | virtual bool open(const std::string& filename, unsigned int sampleRate, unsigned int channelCount) = 0; 62 | 63 | //////////////////////////////////////////////////////////// 64 | /// \brief Write audio samples to the open file 65 | /// 66 | /// \param samples Pointer to the sample array to write 67 | /// \param count Number of samples to write 68 | /// 69 | //////////////////////////////////////////////////////////// 70 | virtual void write(const Int16* samples, Uint64 count) = 0; 71 | }; 72 | 73 | } // namespace sf 74 | 75 | 76 | #endif // SFML_SOUNDFILEWRITER_HPP 77 | 78 | 79 | //////////////////////////////////////////////////////////// 80 | /// \class sf::SoundFileWriter 81 | /// \ingroup audio 82 | /// 83 | /// This class allows users to write audio file formats not natively 84 | /// supported by SFML, and thus extend the set of supported writable 85 | /// audio formats. 86 | /// 87 | /// A valid sound file writer must override the open and write functions, 88 | /// as well as providing a static check function; the latter is used by 89 | /// SFML to find a suitable writer for a given filename. 90 | /// 91 | /// To register a new writer, use the sf::SoundFileFactory::registerWriter 92 | /// template function. 93 | /// 94 | /// Usage example: 95 | /// \code 96 | /// class MySoundFileWriter : public sf::SoundFileWriter 97 | /// { 98 | /// public: 99 | /// 100 | /// static bool check(const std::string& filename) 101 | /// { 102 | /// // typically, check the extension 103 | /// // return true if the writer can handle the format 104 | /// } 105 | /// 106 | /// virtual bool open(const std::string& filename, unsigned int sampleRate, unsigned int channelCount) 107 | /// { 108 | /// // open the file 'filename' for writing, 109 | /// // write the given sample rate and channel count to the file header 110 | /// // return true on success 111 | /// } 112 | /// 113 | /// virtual void write(const sf::Int16* samples, sf::Uint64 count) 114 | /// { 115 | /// // write 'count' samples stored at address 'samples', 116 | /// // convert them (for example to normalized float) if the format requires it 117 | /// } 118 | /// }; 119 | /// 120 | /// sf::SoundFileFactory::registerWriter(); 121 | /// \endcode 122 | /// 123 | /// \see sf::OutputSoundFile, sf::SoundFileFactory, sf::SoundFileReader 124 | /// 125 | //////////////////////////////////////////////////////////// 126 | -------------------------------------------------------------------------------- /dependencies/imgui-sfml/include/SFML/GpuPreference.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_GPUPREFERENCE_HPP 26 | #define SFML_GPUPREFERENCE_HPP 27 | 28 | 29 | //////////////////////////////////////////////////////////// 30 | /// Headers 31 | //////////////////////////////////////////////////////////// 32 | #include 33 | 34 | 35 | //////////////////////////////////////////////////////////// 36 | /// \file 37 | /// 38 | /// \brief File containing SFML_DEFINE_DISCRETE_GPU_PREFERENCE 39 | /// 40 | //////////////////////////////////////////////////////////// 41 | 42 | 43 | //////////////////////////////////////////////////////////// 44 | /// \def SFML_DEFINE_DISCRETE_GPU_PREFERENCE 45 | /// 46 | /// \brief A macro to encourage usage of the discrete GPU 47 | /// 48 | /// In order to inform the Nvidia/AMD driver that an SFML 49 | /// application could benefit from using the more powerful 50 | /// discrete GPU, special symbols have to be publicly 51 | /// exported from the final executable. 52 | /// 53 | /// SFML defines a helper macro to easily do this. 54 | /// 55 | /// Place SFML_DEFINE_DISCRETE_GPU_PREFERENCE in the 56 | /// global scope of a source file that will be linked into 57 | /// the final executable. Typically it is best to place it 58 | /// where the main function is also defined. 59 | /// 60 | //////////////////////////////////////////////////////////// 61 | #if defined(SFML_SYSTEM_WINDOWS) 62 | 63 | #define SFML_DEFINE_DISCRETE_GPU_PREFERENCE \ 64 | extern "C" __declspec(dllexport) unsigned long NvOptimusEnablement = 1; \ 65 | extern "C" __declspec(dllexport) unsigned long AmdPowerXpressRequestHighPerformance = 1; 66 | 67 | #else 68 | 69 | #define SFML_DEFINE_DISCRETE_GPU_PREFERENCE 70 | 71 | #endif 72 | 73 | 74 | #endif // SFML_GPUPREFERENCE_HPP 75 | -------------------------------------------------------------------------------- /dependencies/imgui-sfml/include/SFML/Graphics.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_GRAPHICS_HPP 26 | #define SFML_GRAPHICS_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include 40 | #include 41 | #include 42 | #include 43 | #include 44 | #include 45 | #include 46 | #include 47 | #include 48 | #include 49 | #include 50 | #include 51 | #include 52 | #include 53 | #include 54 | #include 55 | #include 56 | #include 57 | #include 58 | #include 59 | 60 | 61 | #endif // SFML_GRAPHICS_HPP 62 | 63 | //////////////////////////////////////////////////////////// 64 | /// \defgroup graphics Graphics module 65 | /// 66 | /// 2D graphics module: sprites, text, shapes, ... 67 | /// 68 | //////////////////////////////////////////////////////////// 69 | -------------------------------------------------------------------------------- /dependencies/imgui-sfml/include/SFML/Graphics/Drawable.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_DRAWABLE_HPP 26 | #define SFML_DRAWABLE_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | #include 32 | #include 33 | 34 | 35 | namespace sf 36 | { 37 | class RenderTarget; 38 | 39 | //////////////////////////////////////////////////////////// 40 | /// \brief Abstract base class for objects that can be drawn 41 | /// to a render target 42 | /// 43 | //////////////////////////////////////////////////////////// 44 | class SFML_GRAPHICS_API Drawable 45 | { 46 | public: 47 | 48 | //////////////////////////////////////////////////////////// 49 | /// \brief Virtual destructor 50 | /// 51 | //////////////////////////////////////////////////////////// 52 | virtual ~Drawable() {} 53 | 54 | protected: 55 | 56 | friend class RenderTarget; 57 | 58 | //////////////////////////////////////////////////////////// 59 | /// \brief Draw the object to a render target 60 | /// 61 | /// This is a pure virtual function that has to be implemented 62 | /// by the derived class to define how the drawable should be 63 | /// drawn. 64 | /// 65 | /// \param target Render target to draw to 66 | /// \param states Current render states 67 | /// 68 | //////////////////////////////////////////////////////////// 69 | virtual void draw(RenderTarget& target, RenderStates states) const = 0; 70 | }; 71 | 72 | } // namespace sf 73 | 74 | 75 | #endif // SFML_DRAWABLE_HPP 76 | 77 | 78 | //////////////////////////////////////////////////////////// 79 | /// \class sf::Drawable 80 | /// \ingroup graphics 81 | /// 82 | /// sf::Drawable is a very simple base class that allows objects 83 | /// of derived classes to be drawn to a sf::RenderTarget. 84 | /// 85 | /// All you have to do in your derived class is to override the 86 | /// draw virtual function. 87 | /// 88 | /// Note that inheriting from sf::Drawable is not mandatory, 89 | /// but it allows this nice syntax "window.draw(object)" rather 90 | /// than "object.draw(window)", which is more consistent with other 91 | /// SFML classes. 92 | /// 93 | /// Example: 94 | /// \code 95 | /// class MyDrawable : public sf::Drawable 96 | /// { 97 | /// public: 98 | /// 99 | /// ... 100 | /// 101 | /// private: 102 | /// 103 | /// virtual void draw(sf::RenderTarget& target, sf::RenderStates states) const 104 | /// { 105 | /// // You can draw other high-level objects 106 | /// target.draw(m_sprite, states); 107 | /// 108 | /// // ... or use the low-level API 109 | /// states.texture = &m_texture; 110 | /// target.draw(m_vertices, states); 111 | /// 112 | /// // ... or draw with OpenGL directly 113 | /// glBegin(GL_QUADS); 114 | /// ... 115 | /// glEnd(); 116 | /// } 117 | /// 118 | /// sf::Sprite m_sprite; 119 | /// sf::Texture m_texture; 120 | /// sf::VertexArray m_vertices; 121 | /// }; 122 | /// \endcode 123 | /// 124 | /// \see sf::RenderTarget 125 | /// 126 | //////////////////////////////////////////////////////////// 127 | -------------------------------------------------------------------------------- /dependencies/imgui-sfml/include/SFML/Graphics/Export.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_GRAPHICS_EXPORT_HPP 26 | #define SFML_GRAPHICS_EXPORT_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | #include 32 | 33 | 34 | //////////////////////////////////////////////////////////// 35 | // Define portable import / export macros 36 | //////////////////////////////////////////////////////////// 37 | #if defined(SFML_GRAPHICS_EXPORTS) 38 | 39 | #define SFML_GRAPHICS_API SFML_API_EXPORT 40 | 41 | #else 42 | 43 | #define SFML_GRAPHICS_API SFML_API_IMPORT 44 | 45 | #endif 46 | 47 | 48 | #endif // SFML_GRAPHICS_EXPORT_HPP 49 | -------------------------------------------------------------------------------- /dependencies/imgui-sfml/include/SFML/Graphics/Glyph.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_GLYPH_HPP 26 | #define SFML_GLYPH_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | #include 32 | #include 33 | 34 | 35 | namespace sf 36 | { 37 | //////////////////////////////////////////////////////////// 38 | /// \brief Structure describing a glyph 39 | /// 40 | //////////////////////////////////////////////////////////// 41 | class SFML_GRAPHICS_API Glyph 42 | { 43 | public: 44 | 45 | //////////////////////////////////////////////////////////// 46 | /// \brief Default constructor 47 | /// 48 | //////////////////////////////////////////////////////////// 49 | Glyph() : advance(0) {} 50 | 51 | //////////////////////////////////////////////////////////// 52 | // Member data 53 | //////////////////////////////////////////////////////////// 54 | float advance; ///< Offset to move horizontally to the next character 55 | FloatRect bounds; ///< Bounding rectangle of the glyph, in coordinates relative to the baseline 56 | IntRect textureRect; ///< Texture coordinates of the glyph inside the font's texture 57 | }; 58 | 59 | } // namespace sf 60 | 61 | 62 | #endif // SFML_GLYPH_HPP 63 | 64 | 65 | //////////////////////////////////////////////////////////// 66 | /// \class sf::Glyph 67 | /// \ingroup graphics 68 | /// 69 | /// A glyph is the visual representation of a character. 70 | /// 71 | /// The sf::Glyph structure provides the information needed 72 | /// to handle the glyph: 73 | /// \li its coordinates in the font's texture 74 | /// \li its bounding rectangle 75 | /// \li the offset to apply to get the starting position of the next glyph 76 | /// 77 | /// \see sf::Font 78 | /// 79 | //////////////////////////////////////////////////////////// 80 | -------------------------------------------------------------------------------- /dependencies/imgui-sfml/include/SFML/Graphics/PrimitiveType.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_PRIMITIVETYPE_HPP 26 | #define SFML_PRIMITIVETYPE_HPP 27 | 28 | namespace sf 29 | { 30 | //////////////////////////////////////////////////////////// 31 | /// \ingroup graphics 32 | /// \brief Types of primitives that a sf::VertexArray can render 33 | /// 34 | /// Points and lines have no area, therefore their thickness 35 | /// will always be 1 pixel, regardless the current transform 36 | /// and view. 37 | /// 38 | //////////////////////////////////////////////////////////// 39 | enum PrimitiveType 40 | { 41 | Points, ///< List of individual points 42 | Lines, ///< List of individual lines 43 | LineStrip, ///< List of connected lines, a point uses the previous point to form a line 44 | Triangles, ///< List of individual triangles 45 | TriangleStrip, ///< List of connected triangles, a point uses the two previous points to form a triangle 46 | TriangleFan, ///< List of connected triangles, a point uses the common center and the previous point to form a triangle 47 | Quads, ///< List of individual quads (deprecated, don't work with OpenGL ES) 48 | 49 | // Deprecated names 50 | LinesStrip = LineStrip, ///< \deprecated Use LineStrip instead 51 | TrianglesStrip = TriangleStrip, ///< \deprecated Use TriangleStrip instead 52 | TrianglesFan = TriangleFan ///< \deprecated Use TriangleFan instead 53 | }; 54 | 55 | } // namespace sf 56 | 57 | 58 | #endif // SFML_PRIMITIVETYPE_HPP 59 | -------------------------------------------------------------------------------- /dependencies/imgui-sfml/include/SFML/Graphics/RectangleShape.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_RECTANGLESHAPE_HPP 26 | #define SFML_RECTANGLESHAPE_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | #include 32 | #include 33 | 34 | 35 | namespace sf 36 | { 37 | //////////////////////////////////////////////////////////// 38 | /// \brief Specialized shape representing a rectangle 39 | /// 40 | //////////////////////////////////////////////////////////// 41 | class SFML_GRAPHICS_API RectangleShape : public Shape 42 | { 43 | public: 44 | 45 | //////////////////////////////////////////////////////////// 46 | /// \brief Default constructor 47 | /// 48 | /// \param size Size of the rectangle 49 | /// 50 | //////////////////////////////////////////////////////////// 51 | explicit RectangleShape(const Vector2f& size = Vector2f(0, 0)); 52 | 53 | //////////////////////////////////////////////////////////// 54 | /// \brief Set the size of the rectangle 55 | /// 56 | /// \param size New size of the rectangle 57 | /// 58 | /// \see getSize 59 | /// 60 | //////////////////////////////////////////////////////////// 61 | void setSize(const Vector2f& size); 62 | 63 | //////////////////////////////////////////////////////////// 64 | /// \brief Get the size of the rectangle 65 | /// 66 | /// \return Size of the rectangle 67 | /// 68 | /// \see setSize 69 | /// 70 | //////////////////////////////////////////////////////////// 71 | const Vector2f& getSize() const; 72 | 73 | //////////////////////////////////////////////////////////// 74 | /// \brief Get the number of points defining the shape 75 | /// 76 | /// \return Number of points of the shape. For rectangle 77 | /// shapes, this number is always 4. 78 | /// 79 | //////////////////////////////////////////////////////////// 80 | virtual std::size_t getPointCount() const; 81 | 82 | //////////////////////////////////////////////////////////// 83 | /// \brief Get a point of the rectangle 84 | /// 85 | /// The returned point is in local coordinates, that is, 86 | /// the shape's transforms (position, rotation, scale) are 87 | /// not taken into account. 88 | /// The result is undefined if \a index is out of the valid range. 89 | /// 90 | /// \param index Index of the point to get, in range [0 .. 3] 91 | /// 92 | /// \return index-th point of the shape 93 | /// 94 | //////////////////////////////////////////////////////////// 95 | virtual Vector2f getPoint(std::size_t index) const; 96 | 97 | private: 98 | 99 | //////////////////////////////////////////////////////////// 100 | // Member data 101 | //////////////////////////////////////////////////////////// 102 | Vector2f m_size; ///< Size of the rectangle 103 | }; 104 | 105 | } // namespace sf 106 | 107 | 108 | #endif // SFML_RECTANGLESHAPE_HPP 109 | 110 | 111 | //////////////////////////////////////////////////////////// 112 | /// \class sf::RectangleShape 113 | /// \ingroup graphics 114 | /// 115 | /// This class inherits all the functions of sf::Transformable 116 | /// (position, rotation, scale, bounds, ...) as well as the 117 | /// functions of sf::Shape (outline, color, texture, ...). 118 | /// 119 | /// Usage example: 120 | /// \code 121 | /// sf::RectangleShape rectangle; 122 | /// rectangle.setSize(sf::Vector2f(100, 50)); 123 | /// rectangle.setOutlineColor(sf::Color::Red); 124 | /// rectangle.setOutlineThickness(5); 125 | /// rectangle.setPosition(10, 20); 126 | /// ... 127 | /// window.draw(rectangle); 128 | /// \endcode 129 | /// 130 | /// \see sf::Shape, sf::CircleShape, sf::ConvexShape 131 | /// 132 | //////////////////////////////////////////////////////////// 133 | -------------------------------------------------------------------------------- /dependencies/imgui-sfml/include/SFML/Main.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_MAIN_HPP 26 | #define SFML_MAIN_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | #include 32 | 33 | 34 | #if defined(SFML_SYSTEM_IOS) 35 | 36 | // On iOS, we have no choice but to have our own main, 37 | // so we need to rename the user one and call it later 38 | #define main sfmlMain 39 | 40 | #endif 41 | 42 | 43 | #endif // SFML_MAIN_HPP 44 | -------------------------------------------------------------------------------- /dependencies/imgui-sfml/include/SFML/Network.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_NETWORK_HPP 26 | #define SFML_NETWORK_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include 40 | #include 41 | #include 42 | #include 43 | 44 | 45 | #endif // SFML_NETWORK_HPP 46 | 47 | //////////////////////////////////////////////////////////// 48 | /// \defgroup network Network module 49 | /// 50 | /// Socket-based communication, utilities and higher-level 51 | /// network protocols (HTTP, FTP). 52 | /// 53 | //////////////////////////////////////////////////////////// 54 | -------------------------------------------------------------------------------- /dependencies/imgui-sfml/include/SFML/Network/Export.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_NETWORK_EXPORT_HPP 26 | #define SFML_NETWORK_EXPORT_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | #include 32 | 33 | 34 | //////////////////////////////////////////////////////////// 35 | // Define portable import / export macros 36 | //////////////////////////////////////////////////////////// 37 | #if defined(SFML_NETWORK_EXPORTS) 38 | 39 | #define SFML_NETWORK_API SFML_API_EXPORT 40 | 41 | #else 42 | 43 | #define SFML_NETWORK_API SFML_API_IMPORT 44 | 45 | #endif 46 | 47 | 48 | #endif // SFML_NETWORK_EXPORT_HPP 49 | -------------------------------------------------------------------------------- /dependencies/imgui-sfml/include/SFML/Network/SocketHandle.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_SOCKETHANDLE_HPP 26 | #define SFML_SOCKETHANDLE_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | #include 32 | 33 | #if defined(SFML_SYSTEM_WINDOWS) 34 | #include 35 | #endif 36 | 37 | 38 | namespace sf 39 | { 40 | //////////////////////////////////////////////////////////// 41 | // Define the low-level socket handle type, specific to 42 | // each platform 43 | //////////////////////////////////////////////////////////// 44 | #if defined(SFML_SYSTEM_WINDOWS) 45 | 46 | typedef UINT_PTR SocketHandle; 47 | 48 | #else 49 | 50 | typedef int SocketHandle; 51 | 52 | #endif 53 | 54 | } // namespace sf 55 | 56 | 57 | #endif // SFML_SOCKETHANDLE_HPP 58 | -------------------------------------------------------------------------------- /dependencies/imgui-sfml/include/SFML/OpenGL.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_OPENGL_HPP 26 | #define SFML_OPENGL_HPP 27 | 28 | 29 | //////////////////////////////////////////////////////////// 30 | /// Headers 31 | //////////////////////////////////////////////////////////// 32 | #include 33 | 34 | 35 | //////////////////////////////////////////////////////////// 36 | /// This file just includes the OpenGL headers, 37 | /// which have actually different paths on each system 38 | //////////////////////////////////////////////////////////// 39 | #if defined(SFML_SYSTEM_WINDOWS) 40 | 41 | // The Visual C++ version of gl.h uses WINGDIAPI and APIENTRY but doesn't define them 42 | #ifdef _MSC_VER 43 | #include 44 | #endif 45 | 46 | #include 47 | 48 | #elif defined(SFML_SYSTEM_LINUX) || defined(SFML_SYSTEM_FREEBSD) || defined(SFML_SYSTEM_OPENBSD) 49 | 50 | #if defined(SFML_OPENGL_ES) 51 | #include 52 | #include 53 | #else 54 | #include 55 | #endif 56 | 57 | #elif defined(SFML_SYSTEM_MACOS) 58 | 59 | #include 60 | 61 | #elif defined (SFML_SYSTEM_IOS) 62 | 63 | #include 64 | #include 65 | 66 | #elif defined (SFML_SYSTEM_ANDROID) 67 | 68 | #include 69 | #include 70 | 71 | // We're not using OpenGL ES 2+ yet, but we can use the sRGB extension 72 | #include 73 | #include 74 | 75 | #endif 76 | 77 | 78 | #endif // SFML_OPENGL_HPP 79 | -------------------------------------------------------------------------------- /dependencies/imgui-sfml/include/SFML/System.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_SYSTEM_HPP 26 | #define SFML_SYSTEM_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include 40 | #include 41 | #include 42 | #include 43 | #include 44 | #include 45 | #include 46 | #include 47 | #include 48 | #include 49 | #include 50 | 51 | #endif // SFML_SYSTEM_HPP 52 | 53 | //////////////////////////////////////////////////////////// 54 | /// \defgroup system System module 55 | /// 56 | /// Base module of SFML, defining various utilities. It provides 57 | /// vector classes, Unicode strings and conversion functions, 58 | /// threads and mutexes, timing classes. 59 | /// 60 | //////////////////////////////////////////////////////////// 61 | -------------------------------------------------------------------------------- /dependencies/imgui-sfml/include/SFML/System/Clock.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_CLOCK_HPP 26 | #define SFML_CLOCK_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | #include 32 | #include 33 | 34 | 35 | namespace sf 36 | { 37 | //////////////////////////////////////////////////////////// 38 | /// \brief Utility class that measures the elapsed time 39 | /// 40 | //////////////////////////////////////////////////////////// 41 | class SFML_SYSTEM_API Clock 42 | { 43 | public: 44 | 45 | //////////////////////////////////////////////////////////// 46 | /// \brief Default constructor 47 | /// 48 | /// The clock starts automatically after being constructed. 49 | /// 50 | //////////////////////////////////////////////////////////// 51 | Clock(); 52 | 53 | //////////////////////////////////////////////////////////// 54 | /// \brief Get the elapsed time 55 | /// 56 | /// This function returns the time elapsed since the last call 57 | /// to restart() (or the construction of the instance if restart() 58 | /// has not been called). 59 | /// 60 | /// \return Time elapsed 61 | /// 62 | //////////////////////////////////////////////////////////// 63 | Time getElapsedTime() const; 64 | 65 | //////////////////////////////////////////////////////////// 66 | /// \brief Restart the clock 67 | /// 68 | /// This function puts the time counter back to zero. 69 | /// It also returns the time elapsed since the clock was started. 70 | /// 71 | /// \return Time elapsed 72 | /// 73 | //////////////////////////////////////////////////////////// 74 | Time restart(); 75 | 76 | private: 77 | 78 | //////////////////////////////////////////////////////////// 79 | // Member data 80 | //////////////////////////////////////////////////////////// 81 | Time m_startTime; ///< Time of last reset, in microseconds 82 | }; 83 | 84 | } // namespace sf 85 | 86 | 87 | #endif // SFML_CLOCK_HPP 88 | 89 | 90 | //////////////////////////////////////////////////////////// 91 | /// \class sf::Clock 92 | /// \ingroup system 93 | /// 94 | /// sf::Clock is a lightweight class for measuring time. 95 | /// 96 | /// Its provides the most precise time that the underlying 97 | /// OS can achieve (generally microseconds or nanoseconds). 98 | /// It also ensures monotonicity, which means that the returned 99 | /// time can never go backward, even if the system time is 100 | /// changed. 101 | /// 102 | /// Usage example: 103 | /// \code 104 | /// sf::Clock clock; 105 | /// ... 106 | /// Time time1 = clock.getElapsedTime(); 107 | /// ... 108 | /// Time time2 = clock.restart(); 109 | /// \endcode 110 | /// 111 | /// The sf::Time value returned by the clock can then be 112 | /// converted to a number of seconds, milliseconds or even 113 | /// microseconds. 114 | /// 115 | /// \see sf::Time 116 | /// 117 | //////////////////////////////////////////////////////////// 118 | -------------------------------------------------------------------------------- /dependencies/imgui-sfml/include/SFML/System/Err.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_ERR_HPP 26 | #define SFML_ERR_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | #include 32 | #include 33 | 34 | 35 | namespace sf 36 | { 37 | //////////////////////////////////////////////////////////// 38 | /// \brief Standard stream used by SFML to output warnings and errors 39 | /// 40 | //////////////////////////////////////////////////////////// 41 | SFML_SYSTEM_API std::ostream& err(); 42 | 43 | } // namespace sf 44 | 45 | 46 | #endif // SFML_ERR_HPP 47 | 48 | 49 | //////////////////////////////////////////////////////////// 50 | /// \fn sf::err 51 | /// \ingroup system 52 | /// 53 | /// By default, sf::err() outputs to the same location as std::cerr, 54 | /// (-> the stderr descriptor) which is the console if there's 55 | /// one available. 56 | /// 57 | /// It is a standard std::ostream instance, so it supports all the 58 | /// insertion operations defined by the STL 59 | /// (operator <<, manipulators, etc.). 60 | /// 61 | /// sf::err() can be redirected to write to another output, independently 62 | /// of std::cerr, by using the rdbuf() function provided by the 63 | /// std::ostream class. 64 | /// 65 | /// Example: 66 | /// \code 67 | /// // Redirect to a file 68 | /// std::ofstream file("sfml-log.txt"); 69 | /// std::streambuf* previous = sf::err().rdbuf(file.rdbuf()); 70 | /// 71 | /// // Redirect to nothing 72 | /// sf::err().rdbuf(NULL); 73 | /// 74 | /// // Restore the original output 75 | /// sf::err().rdbuf(previous); 76 | /// \endcode 77 | /// 78 | /// \return Reference to std::ostream representing the SFML error stream 79 | /// 80 | //////////////////////////////////////////////////////////// 81 | -------------------------------------------------------------------------------- /dependencies/imgui-sfml/include/SFML/System/Export.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_SYSTEM_EXPORT_HPP 26 | #define SFML_SYSTEM_EXPORT_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | #include 32 | 33 | 34 | //////////////////////////////////////////////////////////// 35 | // Define portable import / export macros 36 | //////////////////////////////////////////////////////////// 37 | #if defined(SFML_SYSTEM_EXPORTS) 38 | 39 | #define SFML_SYSTEM_API SFML_API_EXPORT 40 | 41 | #else 42 | 43 | #define SFML_SYSTEM_API SFML_API_IMPORT 44 | 45 | #endif 46 | 47 | 48 | #endif // SFML_SYSTEM_EXPORT_HPP 49 | -------------------------------------------------------------------------------- /dependencies/imgui-sfml/include/SFML/System/InputStream.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_INPUTSTREAM_HPP 26 | #define SFML_INPUTSTREAM_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | #include 32 | #include 33 | 34 | 35 | namespace sf 36 | { 37 | //////////////////////////////////////////////////////////// 38 | /// \brief Abstract class for custom file input streams 39 | /// 40 | //////////////////////////////////////////////////////////// 41 | class SFML_SYSTEM_API InputStream 42 | { 43 | public: 44 | 45 | //////////////////////////////////////////////////////////// 46 | /// \brief Virtual destructor 47 | /// 48 | //////////////////////////////////////////////////////////// 49 | virtual ~InputStream() {} 50 | 51 | //////////////////////////////////////////////////////////// 52 | /// \brief Read data from the stream 53 | /// 54 | /// After reading, the stream's reading position must be 55 | /// advanced by the amount of bytes read. 56 | /// 57 | /// \param data Buffer where to copy the read data 58 | /// \param size Desired number of bytes to read 59 | /// 60 | /// \return The number of bytes actually read, or -1 on error 61 | /// 62 | //////////////////////////////////////////////////////////// 63 | virtual Int64 read(void* data, Int64 size) = 0; 64 | 65 | //////////////////////////////////////////////////////////// 66 | /// \brief Change the current reading position 67 | /// 68 | /// \param position The position to seek to, from the beginning 69 | /// 70 | /// \return The position actually sought to, or -1 on error 71 | /// 72 | //////////////////////////////////////////////////////////// 73 | virtual Int64 seek(Int64 position) = 0; 74 | 75 | //////////////////////////////////////////////////////////// 76 | /// \brief Get the current reading position in the stream 77 | /// 78 | /// \return The current position, or -1 on error. 79 | /// 80 | //////////////////////////////////////////////////////////// 81 | virtual Int64 tell() = 0; 82 | 83 | //////////////////////////////////////////////////////////// 84 | /// \brief Return the size of the stream 85 | /// 86 | /// \return The total number of bytes available in the stream, or -1 on error 87 | /// 88 | //////////////////////////////////////////////////////////// 89 | virtual Int64 getSize() = 0; 90 | }; 91 | 92 | } // namespace sf 93 | 94 | 95 | #endif // SFML_INPUTSTREAM_HPP 96 | 97 | 98 | //////////////////////////////////////////////////////////// 99 | /// \class sf::InputStream 100 | /// \ingroup system 101 | /// 102 | /// This class allows users to define their own file input sources 103 | /// from which SFML can load resources. 104 | /// 105 | /// SFML resource classes like sf::Texture and 106 | /// sf::SoundBuffer provide loadFromFile and loadFromMemory functions, 107 | /// which read data from conventional sources. However, if you 108 | /// have data coming from a different source (over a network, 109 | /// embedded, encrypted, compressed, etc) you can derive your 110 | /// own class from sf::InputStream and load SFML resources with 111 | /// their loadFromStream function. 112 | /// 113 | /// Usage example: 114 | /// \code 115 | /// // custom stream class that reads from inside a zip file 116 | /// class ZipStream : public sf::InputStream 117 | /// { 118 | /// public: 119 | /// 120 | /// ZipStream(std::string archive); 121 | /// 122 | /// bool open(std::string filename); 123 | /// 124 | /// Int64 read(void* data, Int64 size); 125 | /// 126 | /// Int64 seek(Int64 position); 127 | /// 128 | /// Int64 tell(); 129 | /// 130 | /// Int64 getSize(); 131 | /// 132 | /// private: 133 | /// 134 | /// ... 135 | /// }; 136 | /// 137 | /// // now you can load textures... 138 | /// sf::Texture texture; 139 | /// ZipStream stream("resources.zip"); 140 | /// stream.open("images/img.png"); 141 | /// texture.loadFromStream(stream); 142 | /// 143 | /// // musics... 144 | /// sf::Music music; 145 | /// ZipStream stream("resources.zip"); 146 | /// stream.open("musics/msc.ogg"); 147 | /// music.openFromStream(stream); 148 | /// 149 | /// // etc. 150 | /// \endcode 151 | /// 152 | //////////////////////////////////////////////////////////// 153 | -------------------------------------------------------------------------------- /dependencies/imgui-sfml/include/SFML/System/Lock.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_LOCK_HPP 26 | #define SFML_LOCK_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | #include 32 | #include 33 | 34 | 35 | namespace sf 36 | { 37 | class Mutex; 38 | 39 | //////////////////////////////////////////////////////////// 40 | /// \brief Automatic wrapper for locking and unlocking mutexes 41 | /// 42 | //////////////////////////////////////////////////////////// 43 | class SFML_SYSTEM_API Lock : NonCopyable 44 | { 45 | public: 46 | 47 | //////////////////////////////////////////////////////////// 48 | /// \brief Construct the lock with a target mutex 49 | /// 50 | /// The mutex passed to sf::Lock is automatically locked. 51 | /// 52 | /// \param mutex Mutex to lock 53 | /// 54 | //////////////////////////////////////////////////////////// 55 | explicit Lock(Mutex& mutex); 56 | 57 | //////////////////////////////////////////////////////////// 58 | /// \brief Destructor 59 | /// 60 | /// The destructor of sf::Lock automatically unlocks its mutex. 61 | /// 62 | //////////////////////////////////////////////////////////// 63 | ~Lock(); 64 | 65 | private: 66 | 67 | //////////////////////////////////////////////////////////// 68 | // Member data 69 | //////////////////////////////////////////////////////////// 70 | Mutex& m_mutex; ///< Mutex to lock / unlock 71 | }; 72 | 73 | } // namespace sf 74 | 75 | 76 | #endif // SFML_LOCK_HPP 77 | 78 | 79 | //////////////////////////////////////////////////////////// 80 | /// \class sf::Lock 81 | /// \ingroup system 82 | /// 83 | /// sf::Lock is a RAII wrapper for sf::Mutex. By unlocking 84 | /// it in its destructor, it ensures that the mutex will 85 | /// always be released when the current scope (most likely 86 | /// a function) ends. 87 | /// This is even more important when an exception or an early 88 | /// return statement can interrupt the execution flow of the 89 | /// function. 90 | /// 91 | /// For maximum robustness, sf::Lock should always be used 92 | /// to lock/unlock a mutex. 93 | /// 94 | /// Usage example: 95 | /// \code 96 | /// sf::Mutex mutex; 97 | /// 98 | /// void function() 99 | /// { 100 | /// sf::Lock lock(mutex); // mutex is now locked 101 | /// 102 | /// functionThatMayThrowAnException(); // mutex is unlocked if this function throws 103 | /// 104 | /// if (someCondition) 105 | /// return; // mutex is unlocked 106 | /// 107 | /// } // mutex is unlocked 108 | /// \endcode 109 | /// 110 | /// Because the mutex is not explicitly unlocked in the code, 111 | /// it may remain locked longer than needed. If the region 112 | /// of the code that needs to be protected by the mutex is 113 | /// not the entire function, a good practice is to create a 114 | /// smaller, inner scope so that the lock is limited to this 115 | /// part of the code. 116 | /// 117 | /// \code 118 | /// sf::Mutex mutex; 119 | /// 120 | /// void function() 121 | /// { 122 | /// { 123 | /// sf::Lock lock(mutex); 124 | /// codeThatRequiresProtection(); 125 | /// 126 | /// } // mutex is unlocked here 127 | /// 128 | /// codeThatDoesntCareAboutTheMutex(); 129 | /// } 130 | /// \endcode 131 | /// 132 | /// Having a mutex locked longer than required is a bad practice 133 | /// which can lead to bad performances. Don't forget that when 134 | /// a mutex is locked, other threads may be waiting doing nothing 135 | /// until it is released. 136 | /// 137 | /// \see sf::Mutex 138 | /// 139 | //////////////////////////////////////////////////////////// 140 | -------------------------------------------------------------------------------- /dependencies/imgui-sfml/include/SFML/System/NativeActivity.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_NATIVEACTIVITY_HPP 26 | #define SFML_NATIVEACTIVITY_HPP 27 | 28 | 29 | //////////////////////////////////////////////////////////// 30 | // Headers 31 | //////////////////////////////////////////////////////////// 32 | #include 33 | 34 | 35 | #if !defined(SFML_SYSTEM_ANDROID) 36 | #error NativeActivity.hpp: This header is Android only. 37 | #endif 38 | 39 | 40 | struct ANativeActivity; 41 | 42 | namespace sf 43 | { 44 | //////////////////////////////////////////////////////////// 45 | /// \ingroup system 46 | /// \brief Return a pointer to the Android native activity 47 | /// 48 | /// You shouldn't have to use this function, unless you want 49 | /// to implement very specific details, that SFML doesn't 50 | /// support, or to use a workaround for a known issue. 51 | /// 52 | /// \return Pointer to Android native activity structure 53 | /// 54 | /// \sfplatform{Android,SFML/System/NativeActivity.hpp} 55 | /// 56 | //////////////////////////////////////////////////////////// 57 | SFML_SYSTEM_API ANativeActivity* getNativeActivity(); 58 | 59 | } // namespace sf 60 | 61 | 62 | #endif // SFML_NATIVEACTIVITY_HPP 63 | -------------------------------------------------------------------------------- /dependencies/imgui-sfml/include/SFML/System/NonCopyable.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_NONCOPYABLE_HPP 26 | #define SFML_NONCOPYABLE_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | #include 32 | 33 | 34 | namespace sf 35 | { 36 | //////////////////////////////////////////////////////////// 37 | /// \brief Utility class that makes any derived 38 | /// class non-copyable 39 | /// 40 | //////////////////////////////////////////////////////////// 41 | class SFML_SYSTEM_API NonCopyable 42 | { 43 | protected: 44 | 45 | //////////////////////////////////////////////////////////// 46 | /// \brief Default constructor 47 | /// 48 | /// Because this class has a copy constructor, the compiler 49 | /// will not automatically generate the default constructor. 50 | /// That's why we must define it explicitly. 51 | /// 52 | //////////////////////////////////////////////////////////// 53 | NonCopyable() {} 54 | 55 | //////////////////////////////////////////////////////////// 56 | /// \brief Default destructor 57 | /// 58 | /// By declaring a protected destructor it's impossible to 59 | /// call delete on a pointer of sf::NonCopyable, thus 60 | /// preventing possible resource leaks. 61 | /// 62 | //////////////////////////////////////////////////////////// 63 | ~NonCopyable() {} 64 | 65 | private: 66 | 67 | //////////////////////////////////////////////////////////// 68 | /// \brief Disabled copy constructor 69 | /// 70 | /// By making the copy constructor private, the compiler will 71 | /// trigger an error if anyone outside tries to use it. 72 | /// To prevent NonCopyable or friend classes from using it, 73 | /// we also give no definition, so that the linker will 74 | /// produce an error if the first protection was inefficient. 75 | /// 76 | //////////////////////////////////////////////////////////// 77 | NonCopyable(const NonCopyable&); 78 | 79 | //////////////////////////////////////////////////////////// 80 | /// \brief Disabled assignment operator 81 | /// 82 | /// By making the assignment operator private, the compiler will 83 | /// trigger an error if anyone outside tries to use it. 84 | /// To prevent NonCopyable or friend classes from using it, 85 | /// we also give no definition, so that the linker will 86 | /// produce an error if the first protection was inefficient. 87 | /// 88 | //////////////////////////////////////////////////////////// 89 | NonCopyable& operator =(const NonCopyable&); 90 | }; 91 | 92 | } // namespace sf 93 | 94 | 95 | #endif // SFML_NONCOPYABLE_HPP 96 | 97 | 98 | //////////////////////////////////////////////////////////// 99 | /// \class sf::NonCopyable 100 | /// \ingroup system 101 | /// 102 | /// This class makes its instances non-copyable, by explicitly 103 | /// disabling its copy constructor and its assignment operator. 104 | /// 105 | /// To create a non-copyable class, simply inherit from 106 | /// sf::NonCopyable. 107 | /// 108 | /// The type of inheritance (public or private) doesn't matter, 109 | /// the copy constructor and assignment operator are declared private 110 | /// in sf::NonCopyable so they will end up being inaccessible in both 111 | /// cases. Thus you can use a shorter syntax for inheriting from it 112 | /// (see below). 113 | /// 114 | /// Usage example: 115 | /// \code 116 | /// class MyNonCopyableClass : sf::NonCopyable 117 | /// { 118 | /// ... 119 | /// }; 120 | /// \endcode 121 | /// 122 | /// Deciding whether the instances of a class can be copied 123 | /// or not is a very important design choice. You are strongly 124 | /// encouraged to think about it before writing a class, 125 | /// and to use sf::NonCopyable when necessary to prevent 126 | /// many potential future errors when using it. This is also 127 | /// a very important indication to users of your class. 128 | /// 129 | //////////////////////////////////////////////////////////// 130 | -------------------------------------------------------------------------------- /dependencies/imgui-sfml/include/SFML/System/Sleep.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_SLEEP_HPP 26 | #define SFML_SLEEP_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | #include 32 | #include 33 | 34 | 35 | namespace sf 36 | { 37 | //////////////////////////////////////////////////////////// 38 | /// \ingroup system 39 | /// \brief Make the current thread sleep for a given duration 40 | /// 41 | /// sf::sleep is the best way to block a program or one of its 42 | /// threads, as it doesn't consume any CPU power. 43 | /// 44 | /// \param duration Time to sleep 45 | /// 46 | //////////////////////////////////////////////////////////// 47 | void SFML_SYSTEM_API sleep(Time duration); 48 | 49 | } // namespace sf 50 | 51 | 52 | #endif // SFML_SLEEP_HPP 53 | -------------------------------------------------------------------------------- /dependencies/imgui-sfml/include/SFML/System/String.inl: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | 26 | //////////////////////////////////////////////////////////// 27 | template 28 | String String::fromUtf8(T begin, T end) 29 | { 30 | String string; 31 | Utf8::toUtf32(begin, end, std::back_inserter(string.m_string)); 32 | return string; 33 | } 34 | 35 | 36 | //////////////////////////////////////////////////////////// 37 | template 38 | String String::fromUtf16(T begin, T end) 39 | { 40 | String string; 41 | Utf16::toUtf32(begin, end, std::back_inserter(string.m_string)); 42 | return string; 43 | } 44 | 45 | 46 | //////////////////////////////////////////////////////////// 47 | template 48 | String String::fromUtf32(T begin, T end) 49 | { 50 | String string; 51 | string.m_string.assign(begin, end); 52 | return string; 53 | } 54 | -------------------------------------------------------------------------------- /dependencies/imgui-sfml/include/SFML/System/Thread.inl: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | namespace priv 26 | { 27 | // Base class for abstract thread functions 28 | struct ThreadFunc 29 | { 30 | virtual ~ThreadFunc() {} 31 | virtual void run() = 0; 32 | }; 33 | 34 | // Specialization using a functor (including free functions) with no argument 35 | template 36 | struct ThreadFunctor : ThreadFunc 37 | { 38 | ThreadFunctor(T functor) : m_functor(functor) {} 39 | virtual void run() {m_functor();} 40 | T m_functor; 41 | }; 42 | 43 | // Specialization using a functor (including free functions) with one argument 44 | template 45 | struct ThreadFunctorWithArg : ThreadFunc 46 | { 47 | ThreadFunctorWithArg(F function, A arg) : m_function(function), m_arg(arg) {} 48 | virtual void run() {m_function(m_arg);} 49 | F m_function; 50 | A m_arg; 51 | }; 52 | 53 | // Specialization using a member function 54 | template 55 | struct ThreadMemberFunc : ThreadFunc 56 | { 57 | ThreadMemberFunc(void(C::*function)(), C* object) : m_function(function), m_object(object) {} 58 | virtual void run() {(m_object->*m_function)();} 59 | void(C::*m_function)(); 60 | C* m_object; 61 | }; 62 | 63 | } // namespace priv 64 | 65 | 66 | //////////////////////////////////////////////////////////// 67 | template 68 | Thread::Thread(F functor) : 69 | m_impl (NULL), 70 | m_entryPoint(new priv::ThreadFunctor(functor)) 71 | { 72 | } 73 | 74 | 75 | //////////////////////////////////////////////////////////// 76 | template 77 | Thread::Thread(F function, A argument) : 78 | m_impl (NULL), 79 | m_entryPoint(new priv::ThreadFunctorWithArg(function, argument)) 80 | { 81 | } 82 | 83 | 84 | //////////////////////////////////////////////////////////// 85 | template 86 | Thread::Thread(void(C::*function)(), C* object) : 87 | m_impl (NULL), 88 | m_entryPoint(new priv::ThreadMemberFunc(function, object)) 89 | { 90 | } 91 | -------------------------------------------------------------------------------- /dependencies/imgui-sfml/include/SFML/System/ThreadLocal.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_THREADLOCAL_HPP 26 | #define SFML_THREADLOCAL_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | #include 32 | #include 33 | #include 34 | 35 | 36 | namespace sf 37 | { 38 | namespace priv 39 | { 40 | class ThreadLocalImpl; 41 | } 42 | 43 | //////////////////////////////////////////////////////////// 44 | /// \brief Defines variables with thread-local storage 45 | /// 46 | //////////////////////////////////////////////////////////// 47 | class SFML_SYSTEM_API ThreadLocal : NonCopyable 48 | { 49 | public: 50 | 51 | //////////////////////////////////////////////////////////// 52 | /// \brief Default constructor 53 | /// 54 | /// \param value Optional value to initialize the variable 55 | /// 56 | //////////////////////////////////////////////////////////// 57 | ThreadLocal(void* value = NULL); 58 | 59 | //////////////////////////////////////////////////////////// 60 | /// \brief Destructor 61 | /// 62 | //////////////////////////////////////////////////////////// 63 | ~ThreadLocal(); 64 | 65 | //////////////////////////////////////////////////////////// 66 | /// \brief Set the thread-specific value of the variable 67 | /// 68 | /// \param value Value of the variable for the current thread 69 | /// 70 | //////////////////////////////////////////////////////////// 71 | void setValue(void* value); 72 | 73 | //////////////////////////////////////////////////////////// 74 | /// \brief Retrieve the thread-specific value of the variable 75 | /// 76 | /// \return Value of the variable for the current thread 77 | /// 78 | //////////////////////////////////////////////////////////// 79 | void* getValue() const; 80 | 81 | private: 82 | 83 | //////////////////////////////////////////////////////////// 84 | // Member data 85 | //////////////////////////////////////////////////////////// 86 | priv::ThreadLocalImpl* m_impl; ///< Pointer to the OS specific implementation 87 | }; 88 | 89 | } // namespace sf 90 | 91 | 92 | #endif // SFML_THREADLOCAL_HPP 93 | 94 | 95 | //////////////////////////////////////////////////////////// 96 | /// \class sf::ThreadLocal 97 | /// \ingroup system 98 | /// 99 | /// This class manipulates void* parameters and thus is not 100 | /// appropriate for strongly-typed variables. You should rather 101 | /// use the sf::ThreadLocalPtr template class. 102 | /// 103 | //////////////////////////////////////////////////////////// 104 | -------------------------------------------------------------------------------- /dependencies/imgui-sfml/include/SFML/System/ThreadLocalPtr.inl: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | 26 | namespace sf 27 | { 28 | //////////////////////////////////////////////////////////// 29 | template 30 | ThreadLocalPtr::ThreadLocalPtr(T* value) : 31 | ThreadLocal(value) 32 | { 33 | } 34 | 35 | 36 | //////////////////////////////////////////////////////////// 37 | template 38 | T& ThreadLocalPtr::operator *() const 39 | { 40 | return *static_cast(getValue()); 41 | } 42 | 43 | 44 | //////////////////////////////////////////////////////////// 45 | template 46 | T* ThreadLocalPtr::operator ->() const 47 | { 48 | return static_cast(getValue()); 49 | } 50 | 51 | 52 | //////////////////////////////////////////////////////////// 53 | template 54 | ThreadLocalPtr::operator T*() const 55 | { 56 | return static_cast(getValue()); 57 | } 58 | 59 | 60 | //////////////////////////////////////////////////////////// 61 | template 62 | ThreadLocalPtr& ThreadLocalPtr::operator =(T* value) 63 | { 64 | setValue(value); 65 | return *this; 66 | } 67 | 68 | 69 | //////////////////////////////////////////////////////////// 70 | template 71 | ThreadLocalPtr& ThreadLocalPtr::operator =(const ThreadLocalPtr& right) 72 | { 73 | setValue(right.getValue()); 74 | return *this; 75 | } 76 | 77 | } // namespace sf 78 | -------------------------------------------------------------------------------- /dependencies/imgui-sfml/include/SFML/System/Vector2.inl: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | 26 | //////////////////////////////////////////////////////////// 27 | template 28 | inline Vector2::Vector2() : 29 | x(0), 30 | y(0) 31 | { 32 | 33 | } 34 | 35 | 36 | //////////////////////////////////////////////////////////// 37 | template 38 | inline Vector2::Vector2(T X, T Y) : 39 | x(X), 40 | y(Y) 41 | { 42 | 43 | } 44 | 45 | 46 | //////////////////////////////////////////////////////////// 47 | template 48 | template 49 | inline Vector2::Vector2(const Vector2& vector) : 50 | x(static_cast(vector.x)), 51 | y(static_cast(vector.y)) 52 | { 53 | } 54 | 55 | 56 | //////////////////////////////////////////////////////////// 57 | template 58 | inline Vector2 operator -(const Vector2& right) 59 | { 60 | return Vector2(-right.x, -right.y); 61 | } 62 | 63 | 64 | //////////////////////////////////////////////////////////// 65 | template 66 | inline Vector2& operator +=(Vector2& left, const Vector2& right) 67 | { 68 | left.x += right.x; 69 | left.y += right.y; 70 | 71 | return left; 72 | } 73 | 74 | 75 | //////////////////////////////////////////////////////////// 76 | template 77 | inline Vector2& operator -=(Vector2& left, const Vector2& right) 78 | { 79 | left.x -= right.x; 80 | left.y -= right.y; 81 | 82 | return left; 83 | } 84 | 85 | 86 | //////////////////////////////////////////////////////////// 87 | template 88 | inline Vector2 operator +(const Vector2& left, const Vector2& right) 89 | { 90 | return Vector2(left.x + right.x, left.y + right.y); 91 | } 92 | 93 | 94 | //////////////////////////////////////////////////////////// 95 | template 96 | inline Vector2 operator -(const Vector2& left, const Vector2& right) 97 | { 98 | return Vector2(left.x - right.x, left.y - right.y); 99 | } 100 | 101 | 102 | //////////////////////////////////////////////////////////// 103 | template 104 | inline Vector2 operator *(const Vector2& left, T right) 105 | { 106 | return Vector2(left.x * right, left.y * right); 107 | } 108 | 109 | 110 | //////////////////////////////////////////////////////////// 111 | template 112 | inline Vector2 operator *(T left, const Vector2& right) 113 | { 114 | return Vector2(right.x * left, right.y * left); 115 | } 116 | 117 | 118 | //////////////////////////////////////////////////////////// 119 | template 120 | inline Vector2& operator *=(Vector2& left, T right) 121 | { 122 | left.x *= right; 123 | left.y *= right; 124 | 125 | return left; 126 | } 127 | 128 | 129 | //////////////////////////////////////////////////////////// 130 | template 131 | inline Vector2 operator /(const Vector2& left, T right) 132 | { 133 | return Vector2(left.x / right, left.y / right); 134 | } 135 | 136 | 137 | //////////////////////////////////////////////////////////// 138 | template 139 | inline Vector2& operator /=(Vector2& left, T right) 140 | { 141 | left.x /= right; 142 | left.y /= right; 143 | 144 | return left; 145 | } 146 | 147 | 148 | //////////////////////////////////////////////////////////// 149 | template 150 | inline bool operator ==(const Vector2& left, const Vector2& right) 151 | { 152 | return (left.x == right.x) && (left.y == right.y); 153 | } 154 | 155 | 156 | //////////////////////////////////////////////////////////// 157 | template 158 | inline bool operator !=(const Vector2& left, const Vector2& right) 159 | { 160 | return (left.x != right.x) || (left.y != right.y); 161 | } 162 | -------------------------------------------------------------------------------- /dependencies/imgui-sfml/include/SFML/System/Vector3.inl: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | 26 | //////////////////////////////////////////////////////////// 27 | template 28 | inline Vector3::Vector3() : 29 | x(0), 30 | y(0), 31 | z(0) 32 | { 33 | 34 | } 35 | 36 | 37 | //////////////////////////////////////////////////////////// 38 | template 39 | inline Vector3::Vector3(T X, T Y, T Z) : 40 | x(X), 41 | y(Y), 42 | z(Z) 43 | { 44 | 45 | } 46 | 47 | 48 | //////////////////////////////////////////////////////////// 49 | template 50 | template 51 | inline Vector3::Vector3(const Vector3& vector) : 52 | x(static_cast(vector.x)), 53 | y(static_cast(vector.y)), 54 | z(static_cast(vector.z)) 55 | { 56 | } 57 | 58 | 59 | //////////////////////////////////////////////////////////// 60 | template 61 | inline Vector3 operator -(const Vector3& left) 62 | { 63 | return Vector3(-left.x, -left.y, -left.z); 64 | } 65 | 66 | 67 | //////////////////////////////////////////////////////////// 68 | template 69 | inline Vector3& operator +=(Vector3& left, const Vector3& right) 70 | { 71 | left.x += right.x; 72 | left.y += right.y; 73 | left.z += right.z; 74 | 75 | return left; 76 | } 77 | 78 | 79 | //////////////////////////////////////////////////////////// 80 | template 81 | inline Vector3& operator -=(Vector3& left, const Vector3& right) 82 | { 83 | left.x -= right.x; 84 | left.y -= right.y; 85 | left.z -= right.z; 86 | 87 | return left; 88 | } 89 | 90 | 91 | //////////////////////////////////////////////////////////// 92 | template 93 | inline Vector3 operator +(const Vector3& left, const Vector3& right) 94 | { 95 | return Vector3(left.x + right.x, left.y + right.y, left.z + right.z); 96 | } 97 | 98 | 99 | //////////////////////////////////////////////////////////// 100 | template 101 | inline Vector3 operator -(const Vector3& left, const Vector3& right) 102 | { 103 | return Vector3(left.x - right.x, left.y - right.y, left.z - right.z); 104 | } 105 | 106 | 107 | //////////////////////////////////////////////////////////// 108 | template 109 | inline Vector3 operator *(const Vector3& left, T right) 110 | { 111 | return Vector3(left.x * right, left.y * right, left.z * right); 112 | } 113 | 114 | 115 | //////////////////////////////////////////////////////////// 116 | template 117 | inline Vector3 operator *(T left, const Vector3& right) 118 | { 119 | return Vector3(right.x * left, right.y * left, right.z * left); 120 | } 121 | 122 | 123 | //////////////////////////////////////////////////////////// 124 | template 125 | inline Vector3& operator *=(Vector3& left, T right) 126 | { 127 | left.x *= right; 128 | left.y *= right; 129 | left.z *= right; 130 | 131 | return left; 132 | } 133 | 134 | 135 | //////////////////////////////////////////////////////////// 136 | template 137 | inline Vector3 operator /(const Vector3& left, T right) 138 | { 139 | return Vector3(left.x / right, left.y / right, left.z / right); 140 | } 141 | 142 | 143 | //////////////////////////////////////////////////////////// 144 | template 145 | inline Vector3& operator /=(Vector3& left, T right) 146 | { 147 | left.x /= right; 148 | left.y /= right; 149 | left.z /= right; 150 | 151 | return left; 152 | } 153 | 154 | 155 | //////////////////////////////////////////////////////////// 156 | template 157 | inline bool operator ==(const Vector3& left, const Vector3& right) 158 | { 159 | return (left.x == right.x) && (left.y == right.y) && (left.z == right.z); 160 | } 161 | 162 | 163 | //////////////////////////////////////////////////////////// 164 | template 165 | inline bool operator !=(const Vector3& left, const Vector3& right) 166 | { 167 | return (left.x != right.x) || (left.y != right.y) || (left.z != right.z); 168 | } 169 | -------------------------------------------------------------------------------- /dependencies/imgui-sfml/include/SFML/Window.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_SFML_WINDOW_HPP 26 | #define SFML_SFML_WINDOW_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include 40 | #include 41 | #include 42 | #include 43 | #include 44 | #include 45 | #include 46 | #include 47 | 48 | 49 | 50 | #endif // SFML_SFML_WINDOW_HPP 51 | 52 | //////////////////////////////////////////////////////////// 53 | /// \defgroup window Window module 54 | /// 55 | /// Provides OpenGL-based windows, and abstractions for 56 | /// events and input handling. 57 | /// 58 | //////////////////////////////////////////////////////////// 59 | -------------------------------------------------------------------------------- /dependencies/imgui-sfml/include/SFML/Window/Clipboard.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_CLIPBOARD_HPP 26 | #define SFML_CLIPBOARD_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | #include 32 | #include 33 | 34 | 35 | namespace sf 36 | { 37 | //////////////////////////////////////////////////////////// 38 | /// \brief Give access to the system clipboard 39 | /// 40 | //////////////////////////////////////////////////////////// 41 | class SFML_WINDOW_API Clipboard 42 | { 43 | public: 44 | 45 | //////////////////////////////////////////////////////////// 46 | /// \brief Get the content of the clipboard as string data 47 | /// 48 | /// This function returns the content of the clipboard 49 | /// as a string. If the clipboard does not contain string 50 | /// it returns an empty sf::String object. 51 | /// 52 | /// \return Clipboard contents as sf::String object 53 | /// 54 | //////////////////////////////////////////////////////////// 55 | static String getString(); 56 | 57 | //////////////////////////////////////////////////////////// 58 | /// \brief Set the content of the clipboard as string data 59 | /// 60 | /// This function sets the content of the clipboard as a 61 | /// string. 62 | /// 63 | /// \warning Due to limitations on some operating systems, 64 | /// setting the clipboard contents is only 65 | /// guaranteed to work if there is currently an 66 | /// open window for which events are being handled. 67 | /// 68 | /// \param text sf::String containing the data to be sent 69 | /// to the clipboard 70 | /// 71 | //////////////////////////////////////////////////////////// 72 | static void setString(const String& text); 73 | }; 74 | 75 | } // namespace sf 76 | 77 | 78 | #endif // SFML_CLIPBOARD_HPP 79 | 80 | 81 | //////////////////////////////////////////////////////////// 82 | /// \class sf::Clipboard 83 | /// \ingroup window 84 | /// 85 | /// sf::Clipboard provides an interface for getting and 86 | /// setting the contents of the system clipboard. 87 | /// 88 | /// It is important to note that due to limitations on some 89 | /// operating systems, setting the clipboard contents is 90 | /// only guaranteed to work if there is currently an open 91 | /// window for which events are being handled. 92 | /// 93 | /// Usage example: 94 | /// \code 95 | /// // get the clipboard content as a string 96 | /// sf::String string = sf::Clipboard::getString(); 97 | /// 98 | /// // or use it in the event loop 99 | /// sf::Event event; 100 | /// while(window.pollEvent(event)) 101 | /// { 102 | /// if(event.type == sf::Event::Closed) 103 | /// window.close(); 104 | /// if(event.type == sf::Event::KeyPressed) 105 | /// { 106 | /// // Using Ctrl + V to paste a string into SFML 107 | /// if(event.key.control && event.key.code == sf::Keyboard::V) 108 | /// string = sf::Clipboard::getString(); 109 | /// 110 | /// // Using Ctrl + C to copy a string out of SFML 111 | /// if(event.key.control && event.key.code == sf::Keyboard::C) 112 | /// sf::Clipboard::setString("Hello World!"); 113 | /// } 114 | /// } 115 | /// \endcode 116 | /// 117 | /// \see sf::String, sf::Event 118 | /// 119 | //////////////////////////////////////////////////////////// 120 | -------------------------------------------------------------------------------- /dependencies/imgui-sfml/include/SFML/Window/Export.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_WINDOW_EXPORT_HPP 26 | #define SFML_WINDOW_EXPORT_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | #include 32 | 33 | 34 | //////////////////////////////////////////////////////////// 35 | // Define portable import / export macros 36 | //////////////////////////////////////////////////////////// 37 | #if defined(SFML_WINDOW_EXPORTS) 38 | 39 | #define SFML_WINDOW_API SFML_API_EXPORT 40 | 41 | #else 42 | 43 | #define SFML_WINDOW_API SFML_API_IMPORT 44 | 45 | #endif 46 | 47 | 48 | #endif // SFML_WINDOW_EXPORT_HPP 49 | -------------------------------------------------------------------------------- /dependencies/imgui-sfml/include/SFML/Window/GlResource.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_GLRESOURCE_HPP 26 | #define SFML_GLRESOURCE_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | #include 32 | #include 33 | 34 | 35 | namespace sf 36 | { 37 | 38 | class Context; 39 | 40 | typedef void(*ContextDestroyCallback)(void*); 41 | 42 | //////////////////////////////////////////////////////////// 43 | /// \brief Base class for classes that require an OpenGL context 44 | /// 45 | //////////////////////////////////////////////////////////// 46 | class SFML_WINDOW_API GlResource 47 | { 48 | protected: 49 | 50 | //////////////////////////////////////////////////////////// 51 | /// \brief Default constructor 52 | /// 53 | //////////////////////////////////////////////////////////// 54 | GlResource(); 55 | 56 | //////////////////////////////////////////////////////////// 57 | /// \brief Destructor 58 | /// 59 | //////////////////////////////////////////////////////////// 60 | ~GlResource(); 61 | 62 | //////////////////////////////////////////////////////////// 63 | /// \brief Register a function to be called when a context is destroyed 64 | /// 65 | /// This is used for internal purposes in order to properly 66 | /// clean up OpenGL resources that cannot be shared between 67 | /// contexts. 68 | /// 69 | /// \param callback Function to be called when a context is destroyed 70 | /// \param arg Argument to pass when calling the function 71 | /// 72 | //////////////////////////////////////////////////////////// 73 | static void registerContextDestroyCallback(ContextDestroyCallback callback, void* arg); 74 | 75 | //////////////////////////////////////////////////////////// 76 | /// \brief RAII helper class to temporarily lock an available context for use 77 | /// 78 | //////////////////////////////////////////////////////////// 79 | class SFML_WINDOW_API TransientContextLock : NonCopyable 80 | { 81 | public: 82 | //////////////////////////////////////////////////////////// 83 | /// \brief Default constructor 84 | /// 85 | //////////////////////////////////////////////////////////// 86 | TransientContextLock(); 87 | 88 | //////////////////////////////////////////////////////////// 89 | /// \brief Destructor 90 | /// 91 | //////////////////////////////////////////////////////////// 92 | ~TransientContextLock(); 93 | }; 94 | }; 95 | 96 | } // namespace sf 97 | 98 | 99 | #endif // SFML_GLRESOURCE_HPP 100 | 101 | //////////////////////////////////////////////////////////// 102 | /// \class sf::GlResource 103 | /// \ingroup window 104 | /// 105 | /// This class is for internal use only, it must be the base 106 | /// of every class that requires a valid OpenGL context in 107 | /// order to work. 108 | /// 109 | //////////////////////////////////////////////////////////// 110 | -------------------------------------------------------------------------------- /dependencies/imgui-sfml/include/SFML/Window/WindowHandle.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_WINDOWHANDLE_HPP 26 | #define SFML_WINDOWHANDLE_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | #include 32 | 33 | // Windows' HWND is a typedef on struct HWND__* 34 | #if defined(SFML_SYSTEM_WINDOWS) 35 | struct HWND__; 36 | #endif 37 | 38 | namespace sf 39 | { 40 | #if defined(SFML_SYSTEM_WINDOWS) 41 | 42 | // Window handle is HWND (HWND__*) on Windows 43 | typedef HWND__* WindowHandle; 44 | 45 | #elif defined(SFML_SYSTEM_LINUX) || defined(SFML_SYSTEM_FREEBSD) || defined(SFML_SYSTEM_OPENBSD) 46 | 47 | // Window handle is Window (unsigned long) on Unix - X11 48 | typedef unsigned long WindowHandle; 49 | 50 | #elif defined(SFML_SYSTEM_MACOS) 51 | 52 | // Window handle is NSWindow or NSView (void*) on Mac OS X - Cocoa 53 | typedef void* WindowHandle; 54 | 55 | #elif defined(SFML_SYSTEM_IOS) 56 | 57 | // Window handle is UIWindow (void*) on iOS - UIKit 58 | typedef void* WindowHandle; 59 | 60 | #elif defined(SFML_SYSTEM_ANDROID) 61 | 62 | // Window handle is ANativeWindow* (void*) on Android 63 | typedef void* WindowHandle; 64 | 65 | #elif defined(SFML_DOXYGEN) 66 | 67 | // Define typedef symbol so that Doxygen can attach some documentation to it 68 | typedef "platform-specific" WindowHandle; 69 | 70 | #endif 71 | 72 | } // namespace sf 73 | 74 | 75 | #endif // SFML_WINDOWHANDLE_HPP 76 | 77 | //////////////////////////////////////////////////////////// 78 | /// \typedef sf::WindowHandle 79 | /// \ingroup window 80 | /// 81 | /// Define a low-level window handle type, specific to 82 | /// each platform. 83 | /// 84 | /// Platform | Type 85 | /// ----------------|------------------------------------------------------------ 86 | /// Windows | \p HWND 87 | /// Linux/FreeBSD | \p %Window 88 | /// Mac OS X | either \p NSWindow* or \p NSView*, disguised as \p void* 89 | /// iOS | \p UIWindow* 90 | /// Android | \p ANativeWindow* 91 | /// 92 | /// \par Mac OS X Specification 93 | /// 94 | /// On Mac OS X, a sf::Window can be created either from an 95 | /// existing \p NSWindow* or an \p NSView*. When the window 96 | /// is created from a window, SFML will use its content view 97 | /// as the OpenGL area. sf::Window::getSystemHandle() will 98 | /// return the handle that was used to create the window, 99 | /// which is a \p NSWindow* by default. 100 | /// 101 | //////////////////////////////////////////////////////////// 102 | -------------------------------------------------------------------------------- /dependencies/imgui-sfml/include/SFML/Window/WindowStyle.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_WINDOWSTYLE_HPP 26 | #define SFML_WINDOWSTYLE_HPP 27 | 28 | 29 | namespace sf 30 | { 31 | namespace Style 32 | { 33 | //////////////////////////////////////////////////////////// 34 | /// \ingroup window 35 | /// \brief Enumeration of the window styles 36 | /// 37 | //////////////////////////////////////////////////////////// 38 | enum 39 | { 40 | None = 0, ///< No border / title bar (this flag and all others are mutually exclusive) 41 | Titlebar = 1 << 0, ///< Title bar + fixed border 42 | Resize = 1 << 1, ///< Title bar + resizable border + maximize button 43 | Close = 1 << 2, ///< Title bar + close button 44 | Fullscreen = 1 << 3, ///< Fullscreen mode (this flag and all others are mutually exclusive) 45 | 46 | Default = Titlebar | Resize | Close ///< Default window style 47 | }; 48 | } 49 | 50 | } // namespace sf 51 | 52 | 53 | #endif // SFML_WINDOWSTYLE_HPP 54 | -------------------------------------------------------------------------------- /dependencies/imgui-sfml/include/imconfig-SFML.h: -------------------------------------------------------------------------------- 1 | // Add this to your imconfig.h 2 | 3 | #include 4 | #include 5 | 6 | #include "imgui-SFML_export.h" 7 | 8 | #define IM_VEC2_CLASS_EXTRA \ 9 | template \ 10 | ImVec2(const sf::Vector2& v) { \ 11 | x = static_cast(v.x); \ 12 | y = static_cast(v.y); \ 13 | } \ 14 | \ 15 | template \ 16 | operator sf::Vector2() const { \ 17 | return sf::Vector2(x, y); \ 18 | } 19 | 20 | #define IM_VEC4_CLASS_EXTRA \ 21 | ImVec4(const sf::Color& c) : x(c.r / 255.f), y(c.g / 255.f), z(c.b / 255.f), w(c.a / 255.f) {} \ 22 | operator sf::Color() const { \ 23 | return sf::Color(static_cast(x * 255.f), static_cast(y * 255.f), \ 24 | static_cast(z * 255.f), static_cast(w * 255.f)); \ 25 | } 26 | -------------------------------------------------------------------------------- /dependencies/imgui-sfml/include/imgui-SFML_export.h: -------------------------------------------------------------------------------- 1 | #ifndef IMGUI_SFML_EXPORT_H 2 | #define IMGUI_SFML_EXPORT_H 3 | 4 | #if IMGUI_SFML_SHARED_LIB 5 | #if _WIN32 6 | #ifdef IMGUI_SFML_EXPORTS 7 | #define IMGUI_SFML_API __declspec(dllexport) 8 | #define IMGUI_API __declspec(dllexport) 9 | #else 10 | #define IMGUI_SFML_API __declspec(dllimport) 11 | #define IMGUI_API __declspec(dllexport) 12 | #endif 13 | #elif __GNUC__ >= 4 14 | #define IMGUI_SFML_API __attribute__((visibility("default"))) 15 | #define IMGUI_API __attribute__((visibility("default"))) 16 | #else 17 | #define IMGUI_SFML_API 18 | #define IMGUI_API 19 | #endif 20 | #else 21 | #define IMGUI_SFML_API 22 | #define IMGUI_API 23 | #endif 24 | 25 | #endif -------------------------------------------------------------------------------- /dependencies/imgui-sfml/lib/ImGui-SFML-d.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dy-Baby/ImGUI-Advanced-Cheat-Menu/9f5a3129f5c78d2acf4df116c3f1505bf5849a4d/dependencies/imgui-sfml/lib/ImGui-SFML-d.lib -------------------------------------------------------------------------------- /dependencies/imgui-sfml/lib/ImGui-SFML.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dy-Baby/ImGUI-Advanced-Cheat-Menu/9f5a3129f5c78d2acf4df116c3f1505bf5849a4d/dependencies/imgui-sfml/lib/ImGui-SFML.lib -------------------------------------------------------------------------------- /dependencies/imgui-sfml/lib/cmake/SFML/SFMLConfigDependencies.cmake: -------------------------------------------------------------------------------- 1 | 2 | if (CMAKE_VERSION VERSION_LESS 3.5.2) 3 | include(CMakeParseArguments) 4 | endif() 5 | 6 | # in case of static linking, we must also define the list of all the dependencies of SFML libraries 7 | if(SFML_STATIC_LIBRARIES) 8 | # detect the OS 9 | if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") 10 | set(FIND_SFML_OS_WINDOWS 1) 11 | elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux") 12 | set(FIND_SFML_OS_LINUX 1) 13 | elseif(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") 14 | set(FIND_SFML_OS_FREEBSD 1) 15 | elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") 16 | if (DEFINED IOS) 17 | set(FIND_SFML_OS_IOS 1) 18 | else() 19 | set(FIND_SFML_OS_MACOSX 1) 20 | endif() 21 | endif() 22 | 23 | # start with an empty list 24 | set(FIND_SFML_DEPENDENCIES_NOTFOUND) 25 | 26 | # macro that searches for a 3rd-party library 27 | function(sfml_bind_dependency) 28 | cmake_parse_arguments(THIS "" "TARGET;FRIENDLY_NAME" "SEARCH_NAMES" ${ARGN}) 29 | if (THIS_UNPARSED_ARGUMENTS) 30 | message(FATAL_ERROR "Unknown arguments when calling sfml_bind_dependency: ${THIS_UNPARSED_ARGUMENTS}") 31 | endif() 32 | 33 | # No lookup in environment variables (PATH on Windows), as they may contain wrong library versions 34 | find_library(${THIS_FRIENDLY_NAME}_LIB NAMES ${THIS_SEARCH_NAMES} 35 | PATHS ${FIND_SFML_PATHS} PATH_SUFFIXES lib NO_SYSTEM_ENVIRONMENT_PATH) 36 | mark_as_advanced(${THIS_FRIENDLY_NAME}_LIB) 37 | if(${THIS_FRIENDLY_NAME}_LIB) 38 | set_property(TARGET ${THIS_TARGET} APPEND PROPERTY INTERFACE_LINK_LIBRARIES "${${THIS_FRIENDLY_NAME}_LIB}") 39 | else() 40 | set(FIND_SFML_DEPENDENCIES_NOTFOUND "${FIND_SFML_DEPENDENCIES_NOTFOUND} ${THIS_FRIENDLY_NAME}" PARENT_SCOPE) 41 | endif() 42 | endfunction() 43 | 44 | # sfml-window 45 | list(FIND SFML_FIND_COMPONENTS "window" FIND_SFML_WINDOW_COMPONENT_INDEX) 46 | if(FIND_SFML_WINDOW_COMPONENT_INDEX GREATER -1) 47 | if(FIND_SFML_OS_LINUX OR FIND_SFML_OS_FREEBSD) 48 | sfml_bind_dependency(TARGET X11 FRIENDLY_NAME "X11" SEARCH_NAMES "X11") 49 | sfml_bind_dependency(TARGET X11 FRIENDLY_NAME "Xrandr" SEARCH_NAMES "Xrandr") 50 | endif() 51 | 52 | if(FIND_SFML_OS_LINUX) 53 | sfml_bind_dependency(TARGET UDev FRIENDLY_NAME "UDev" SEARCH_NAMES "udev" "libudev") 54 | endif() 55 | 56 | if (FIND_SFML_OS_WINDOWS) 57 | set_property(TARGET OpenGL APPEND PROPERTY INTERFACE_LINK_LIBRARIES "OpenGL32") 58 | elseif(NOT FIND_SFML_OS_IOS) 59 | sfml_bind_dependency(TARGET OpenGL FRIENDLY_NAME "OpenGL" SEARCH_NAMES "OpenGL" "GL") 60 | endif() 61 | endif() 62 | 63 | # sfml-graphics 64 | list(FIND SFML_FIND_COMPONENTS "graphics" FIND_SFML_GRAPHICS_COMPONENT_INDEX) 65 | if(FIND_SFML_GRAPHICS_COMPONENT_INDEX GREATER -1) 66 | sfml_bind_dependency(TARGET Freetype FRIENDLY_NAME "FreeType" SEARCH_NAMES "freetype") 67 | endif() 68 | 69 | # sfml-audio 70 | list(FIND SFML_FIND_COMPONENTS "audio" FIND_SFML_AUDIO_COMPONENT_INDEX) 71 | if(FIND_SFML_AUDIO_COMPONENT_INDEX GREATER -1) 72 | sfml_bind_dependency(TARGET OpenAL FRIENDLY_NAME "OpenAL" SEARCH_NAMES "OpenAL" "openal" "openal32") 73 | if (NOT FIND_SFML_OS_IOS) 74 | sfml_bind_dependency(TARGET Vorbis FRIENDLY_NAME "VorbisFile" SEARCH_NAMES "vorbisfile") 75 | sfml_bind_dependency(TARGET Vorbis FRIENDLY_NAME "VorbisEnc" SEARCH_NAMES "vorbisenc") 76 | endif() 77 | sfml_bind_dependency(TARGET Vorbis FRIENDLY_NAME "Vorbis" SEARCH_NAMES "vorbis") 78 | sfml_bind_dependency(TARGET Vorbis FRIENDLY_NAME "Ogg" SEARCH_NAMES "ogg") 79 | sfml_bind_dependency(TARGET FLAC FRIENDLY_NAME "FLAC" SEARCH_NAMES "FLAC") 80 | endif() 81 | 82 | if (FIND_SFML_DEPENDENCIES_NOTFOUND) 83 | set(FIND_SFML_ERROR "SFML found but some of its dependencies are missing (${FIND_SFML_DEPENDENCIES_NOTFOUND})") 84 | set(SFML_FOUND FALSE) 85 | endif() 86 | endif() 87 | -------------------------------------------------------------------------------- /dependencies/imgui-sfml/lib/cmake/SFML/SFMLConfigVersion.cmake: -------------------------------------------------------------------------------- 1 | # This is a basic version file for the Config-mode of find_package(). 2 | # It is used by write_basic_package_version_file() as input file for configure_file() 3 | # to create a version-file which can be installed along a config.cmake file. 4 | # 5 | # The created file sets PACKAGE_VERSION_EXACT if the current version string and 6 | # the requested version string are exactly the same and it sets 7 | # PACKAGE_VERSION_COMPATIBLE if the current version is >= requested version, 8 | # but only if the requested major version is the same as the current one. 9 | # The variable CVF_VERSION must be set before calling configure_file(). 10 | 11 | 12 | set(PACKAGE_VERSION "2.5.1") 13 | 14 | if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION) 15 | set(PACKAGE_VERSION_COMPATIBLE FALSE) 16 | else() 17 | 18 | if("2.5.1" MATCHES "^([0-9]+)\\.") 19 | set(CVF_VERSION_MAJOR "${CMAKE_MATCH_1}") 20 | else() 21 | set(CVF_VERSION_MAJOR "2.5.1") 22 | endif() 23 | 24 | if(PACKAGE_FIND_VERSION_MAJOR STREQUAL CVF_VERSION_MAJOR) 25 | set(PACKAGE_VERSION_COMPATIBLE TRUE) 26 | else() 27 | set(PACKAGE_VERSION_COMPATIBLE FALSE) 28 | endif() 29 | 30 | if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION) 31 | set(PACKAGE_VERSION_EXACT TRUE) 32 | endif() 33 | endif() 34 | 35 | 36 | # if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it: 37 | if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "8" STREQUAL "") 38 | return() 39 | endif() 40 | 41 | # check that the installed version has the same 32/64bit-ness as the one which is currently searching: 42 | if(NOT CMAKE_SIZEOF_VOID_P STREQUAL "8") 43 | math(EXPR installedBits "8 * 8") 44 | set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)") 45 | set(PACKAGE_VERSION_UNSUITABLE TRUE) 46 | endif() 47 | -------------------------------------------------------------------------------- /dependencies/imgui-sfml/lib/cmake/SFML/SFMLSharedTargets-debug.cmake: -------------------------------------------------------------------------------- 1 | #---------------------------------------------------------------- 2 | # Generated CMake target import file for configuration "Debug". 3 | #---------------------------------------------------------------- 4 | 5 | # Commands may need to know the format version. 6 | set(CMAKE_IMPORT_FILE_VERSION 1) 7 | 8 | # Import target "sfml-system" for configuration "Debug" 9 | set_property(TARGET sfml-system APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) 10 | set_target_properties(sfml-system PROPERTIES 11 | IMPORTED_IMPLIB_DEBUG "${_IMPORT_PREFIX}/lib/sfml-system-d.lib" 12 | IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/bin/sfml-system-d-2.dll" 13 | ) 14 | 15 | list(APPEND _IMPORT_CHECK_TARGETS sfml-system ) 16 | list(APPEND _IMPORT_CHECK_FILES_FOR_sfml-system "${_IMPORT_PREFIX}/lib/sfml-system-d.lib" "${_IMPORT_PREFIX}/bin/sfml-system-d-2.dll" ) 17 | 18 | # Import target "sfml-main" for configuration "Debug" 19 | set_property(TARGET sfml-main APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) 20 | set_target_properties(sfml-main PROPERTIES 21 | IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "CXX" 22 | IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/lib/sfml-main-d.lib" 23 | ) 24 | 25 | list(APPEND _IMPORT_CHECK_TARGETS sfml-main ) 26 | list(APPEND _IMPORT_CHECK_FILES_FOR_sfml-main "${_IMPORT_PREFIX}/lib/sfml-main-d.lib" ) 27 | 28 | # Import target "sfml-window" for configuration "Debug" 29 | set_property(TARGET sfml-window APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) 30 | set_target_properties(sfml-window PROPERTIES 31 | IMPORTED_IMPLIB_DEBUG "${_IMPORT_PREFIX}/lib/sfml-window-d.lib" 32 | IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/bin/sfml-window-d-2.dll" 33 | ) 34 | 35 | list(APPEND _IMPORT_CHECK_TARGETS sfml-window ) 36 | list(APPEND _IMPORT_CHECK_FILES_FOR_sfml-window "${_IMPORT_PREFIX}/lib/sfml-window-d.lib" "${_IMPORT_PREFIX}/bin/sfml-window-d-2.dll" ) 37 | 38 | # Import target "sfml-network" for configuration "Debug" 39 | set_property(TARGET sfml-network APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) 40 | set_target_properties(sfml-network PROPERTIES 41 | IMPORTED_IMPLIB_DEBUG "${_IMPORT_PREFIX}/lib/sfml-network-d.lib" 42 | IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/bin/sfml-network-d-2.dll" 43 | ) 44 | 45 | list(APPEND _IMPORT_CHECK_TARGETS sfml-network ) 46 | list(APPEND _IMPORT_CHECK_FILES_FOR_sfml-network "${_IMPORT_PREFIX}/lib/sfml-network-d.lib" "${_IMPORT_PREFIX}/bin/sfml-network-d-2.dll" ) 47 | 48 | # Import target "sfml-graphics" for configuration "Debug" 49 | set_property(TARGET sfml-graphics APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) 50 | set_target_properties(sfml-graphics PROPERTIES 51 | IMPORTED_IMPLIB_DEBUG "${_IMPORT_PREFIX}/lib/sfml-graphics-d.lib" 52 | IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/bin/sfml-graphics-d-2.dll" 53 | ) 54 | 55 | list(APPEND _IMPORT_CHECK_TARGETS sfml-graphics ) 56 | list(APPEND _IMPORT_CHECK_FILES_FOR_sfml-graphics "${_IMPORT_PREFIX}/lib/sfml-graphics-d.lib" "${_IMPORT_PREFIX}/bin/sfml-graphics-d-2.dll" ) 57 | 58 | # Import target "sfml-audio" for configuration "Debug" 59 | set_property(TARGET sfml-audio APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) 60 | set_target_properties(sfml-audio PROPERTIES 61 | IMPORTED_IMPLIB_DEBUG "${_IMPORT_PREFIX}/lib/sfml-audio-d.lib" 62 | IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/bin/sfml-audio-d-2.dll" 63 | ) 64 | 65 | list(APPEND _IMPORT_CHECK_TARGETS sfml-audio ) 66 | list(APPEND _IMPORT_CHECK_FILES_FOR_sfml-audio "${_IMPORT_PREFIX}/lib/sfml-audio-d.lib" "${_IMPORT_PREFIX}/bin/sfml-audio-d-2.dll" ) 67 | 68 | # Commands beyond this point should not need to know the version. 69 | set(CMAKE_IMPORT_FILE_VERSION) 70 | -------------------------------------------------------------------------------- /dependencies/imgui-sfml/lib/cmake/SFML/SFMLSharedTargets-release.cmake: -------------------------------------------------------------------------------- 1 | #---------------------------------------------------------------- 2 | # Generated CMake target import file for configuration "Release". 3 | #---------------------------------------------------------------- 4 | 5 | # Commands may need to know the format version. 6 | set(CMAKE_IMPORT_FILE_VERSION 1) 7 | 8 | # Import target "sfml-system" for configuration "Release" 9 | set_property(TARGET sfml-system APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) 10 | set_target_properties(sfml-system PROPERTIES 11 | IMPORTED_IMPLIB_RELEASE "${_IMPORT_PREFIX}/lib/sfml-system.lib" 12 | IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/bin/sfml-system-2.dll" 13 | ) 14 | 15 | list(APPEND _IMPORT_CHECK_TARGETS sfml-system ) 16 | list(APPEND _IMPORT_CHECK_FILES_FOR_sfml-system "${_IMPORT_PREFIX}/lib/sfml-system.lib" "${_IMPORT_PREFIX}/bin/sfml-system-2.dll" ) 17 | 18 | # Import target "sfml-main" for configuration "Release" 19 | set_property(TARGET sfml-main APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) 20 | set_target_properties(sfml-main PROPERTIES 21 | IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "CXX" 22 | IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/sfml-main.lib" 23 | ) 24 | 25 | list(APPEND _IMPORT_CHECK_TARGETS sfml-main ) 26 | list(APPEND _IMPORT_CHECK_FILES_FOR_sfml-main "${_IMPORT_PREFIX}/lib/sfml-main.lib" ) 27 | 28 | # Import target "sfml-window" for configuration "Release" 29 | set_property(TARGET sfml-window APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) 30 | set_target_properties(sfml-window PROPERTIES 31 | IMPORTED_IMPLIB_RELEASE "${_IMPORT_PREFIX}/lib/sfml-window.lib" 32 | IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/bin/sfml-window-2.dll" 33 | ) 34 | 35 | list(APPEND _IMPORT_CHECK_TARGETS sfml-window ) 36 | list(APPEND _IMPORT_CHECK_FILES_FOR_sfml-window "${_IMPORT_PREFIX}/lib/sfml-window.lib" "${_IMPORT_PREFIX}/bin/sfml-window-2.dll" ) 37 | 38 | # Import target "sfml-network" for configuration "Release" 39 | set_property(TARGET sfml-network APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) 40 | set_target_properties(sfml-network PROPERTIES 41 | IMPORTED_IMPLIB_RELEASE "${_IMPORT_PREFIX}/lib/sfml-network.lib" 42 | IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/bin/sfml-network-2.dll" 43 | ) 44 | 45 | list(APPEND _IMPORT_CHECK_TARGETS sfml-network ) 46 | list(APPEND _IMPORT_CHECK_FILES_FOR_sfml-network "${_IMPORT_PREFIX}/lib/sfml-network.lib" "${_IMPORT_PREFIX}/bin/sfml-network-2.dll" ) 47 | 48 | # Import target "sfml-graphics" for configuration "Release" 49 | set_property(TARGET sfml-graphics APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) 50 | set_target_properties(sfml-graphics PROPERTIES 51 | IMPORTED_IMPLIB_RELEASE "${_IMPORT_PREFIX}/lib/sfml-graphics.lib" 52 | IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/bin/sfml-graphics-2.dll" 53 | ) 54 | 55 | list(APPEND _IMPORT_CHECK_TARGETS sfml-graphics ) 56 | list(APPEND _IMPORT_CHECK_FILES_FOR_sfml-graphics "${_IMPORT_PREFIX}/lib/sfml-graphics.lib" "${_IMPORT_PREFIX}/bin/sfml-graphics-2.dll" ) 57 | 58 | # Import target "sfml-audio" for configuration "Release" 59 | set_property(TARGET sfml-audio APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) 60 | set_target_properties(sfml-audio PROPERTIES 61 | IMPORTED_IMPLIB_RELEASE "${_IMPORT_PREFIX}/lib/sfml-audio.lib" 62 | IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/bin/sfml-audio-2.dll" 63 | ) 64 | 65 | list(APPEND _IMPORT_CHECK_TARGETS sfml-audio ) 66 | list(APPEND _IMPORT_CHECK_FILES_FOR_sfml-audio "${_IMPORT_PREFIX}/lib/sfml-audio.lib" "${_IMPORT_PREFIX}/bin/sfml-audio-2.dll" ) 67 | 68 | # Commands beyond this point should not need to know the version. 69 | set(CMAKE_IMPORT_FILE_VERSION) 70 | -------------------------------------------------------------------------------- /dependencies/imgui-sfml/lib/cmake/SFML/SFMLStaticTargets-debug.cmake: -------------------------------------------------------------------------------- 1 | #---------------------------------------------------------------- 2 | # Generated CMake target import file for configuration "Debug". 3 | #---------------------------------------------------------------- 4 | 5 | # Commands may need to know the format version. 6 | set(CMAKE_IMPORT_FILE_VERSION 1) 7 | 8 | # Import target "sfml-system" for configuration "Debug" 9 | set_property(TARGET sfml-system APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) 10 | set_target_properties(sfml-system PROPERTIES 11 | IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "CXX" 12 | IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/lib/sfml-system-s-d.lib" 13 | ) 14 | 15 | list(APPEND _IMPORT_CHECK_TARGETS sfml-system ) 16 | list(APPEND _IMPORT_CHECK_FILES_FOR_sfml-system "${_IMPORT_PREFIX}/lib/sfml-system-s-d.lib" ) 17 | 18 | # Import target "sfml-main" for configuration "Debug" 19 | set_property(TARGET sfml-main APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) 20 | set_target_properties(sfml-main PROPERTIES 21 | IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "CXX" 22 | IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/lib/sfml-main-d.lib" 23 | ) 24 | 25 | list(APPEND _IMPORT_CHECK_TARGETS sfml-main ) 26 | list(APPEND _IMPORT_CHECK_FILES_FOR_sfml-main "${_IMPORT_PREFIX}/lib/sfml-main-d.lib" ) 27 | 28 | # Import target "sfml-window" for configuration "Debug" 29 | set_property(TARGET sfml-window APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) 30 | set_target_properties(sfml-window PROPERTIES 31 | IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "CXX" 32 | IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/lib/sfml-window-s-d.lib" 33 | ) 34 | 35 | list(APPEND _IMPORT_CHECK_TARGETS sfml-window ) 36 | list(APPEND _IMPORT_CHECK_FILES_FOR_sfml-window "${_IMPORT_PREFIX}/lib/sfml-window-s-d.lib" ) 37 | 38 | # Import target "sfml-network" for configuration "Debug" 39 | set_property(TARGET sfml-network APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) 40 | set_target_properties(sfml-network PROPERTIES 41 | IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "CXX" 42 | IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/lib/sfml-network-s-d.lib" 43 | ) 44 | 45 | list(APPEND _IMPORT_CHECK_TARGETS sfml-network ) 46 | list(APPEND _IMPORT_CHECK_FILES_FOR_sfml-network "${_IMPORT_PREFIX}/lib/sfml-network-s-d.lib" ) 47 | 48 | # Import target "sfml-graphics" for configuration "Debug" 49 | set_property(TARGET sfml-graphics APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) 50 | set_target_properties(sfml-graphics PROPERTIES 51 | IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "CXX" 52 | IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/lib/sfml-graphics-s-d.lib" 53 | ) 54 | 55 | list(APPEND _IMPORT_CHECK_TARGETS sfml-graphics ) 56 | list(APPEND _IMPORT_CHECK_FILES_FOR_sfml-graphics "${_IMPORT_PREFIX}/lib/sfml-graphics-s-d.lib" ) 57 | 58 | # Import target "sfml-audio" for configuration "Debug" 59 | set_property(TARGET sfml-audio APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) 60 | set_target_properties(sfml-audio PROPERTIES 61 | IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "CXX" 62 | IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/lib/sfml-audio-s-d.lib" 63 | ) 64 | 65 | list(APPEND _IMPORT_CHECK_TARGETS sfml-audio ) 66 | list(APPEND _IMPORT_CHECK_FILES_FOR_sfml-audio "${_IMPORT_PREFIX}/lib/sfml-audio-s-d.lib" ) 67 | 68 | # Commands beyond this point should not need to know the version. 69 | set(CMAKE_IMPORT_FILE_VERSION) 70 | -------------------------------------------------------------------------------- /dependencies/imgui-sfml/lib/cmake/SFML/SFMLStaticTargets-release.cmake: -------------------------------------------------------------------------------- 1 | #---------------------------------------------------------------- 2 | # Generated CMake target import file for configuration "Release". 3 | #---------------------------------------------------------------- 4 | 5 | # Commands may need to know the format version. 6 | set(CMAKE_IMPORT_FILE_VERSION 1) 7 | 8 | # Import target "sfml-system" for configuration "Release" 9 | set_property(TARGET sfml-system APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) 10 | set_target_properties(sfml-system PROPERTIES 11 | IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "CXX" 12 | IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/sfml-system-s.lib" 13 | ) 14 | 15 | list(APPEND _IMPORT_CHECK_TARGETS sfml-system ) 16 | list(APPEND _IMPORT_CHECK_FILES_FOR_sfml-system "${_IMPORT_PREFIX}/lib/sfml-system-s.lib" ) 17 | 18 | # Import target "sfml-main" for configuration "Release" 19 | set_property(TARGET sfml-main APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) 20 | set_target_properties(sfml-main PROPERTIES 21 | IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "CXX" 22 | IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/sfml-main.lib" 23 | ) 24 | 25 | list(APPEND _IMPORT_CHECK_TARGETS sfml-main ) 26 | list(APPEND _IMPORT_CHECK_FILES_FOR_sfml-main "${_IMPORT_PREFIX}/lib/sfml-main.lib" ) 27 | 28 | # Import target "sfml-window" for configuration "Release" 29 | set_property(TARGET sfml-window APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) 30 | set_target_properties(sfml-window PROPERTIES 31 | IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "CXX" 32 | IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/sfml-window-s.lib" 33 | ) 34 | 35 | list(APPEND _IMPORT_CHECK_TARGETS sfml-window ) 36 | list(APPEND _IMPORT_CHECK_FILES_FOR_sfml-window "${_IMPORT_PREFIX}/lib/sfml-window-s.lib" ) 37 | 38 | # Import target "sfml-network" for configuration "Release" 39 | set_property(TARGET sfml-network APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) 40 | set_target_properties(sfml-network PROPERTIES 41 | IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "CXX" 42 | IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/sfml-network-s.lib" 43 | ) 44 | 45 | list(APPEND _IMPORT_CHECK_TARGETS sfml-network ) 46 | list(APPEND _IMPORT_CHECK_FILES_FOR_sfml-network "${_IMPORT_PREFIX}/lib/sfml-network-s.lib" ) 47 | 48 | # Import target "sfml-graphics" for configuration "Release" 49 | set_property(TARGET sfml-graphics APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) 50 | set_target_properties(sfml-graphics PROPERTIES 51 | IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "CXX" 52 | IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/sfml-graphics-s.lib" 53 | ) 54 | 55 | list(APPEND _IMPORT_CHECK_TARGETS sfml-graphics ) 56 | list(APPEND _IMPORT_CHECK_FILES_FOR_sfml-graphics "${_IMPORT_PREFIX}/lib/sfml-graphics-s.lib" ) 57 | 58 | # Import target "sfml-audio" for configuration "Release" 59 | set_property(TARGET sfml-audio APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) 60 | set_target_properties(sfml-audio PROPERTIES 61 | IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "CXX" 62 | IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/sfml-audio-s.lib" 63 | ) 64 | 65 | list(APPEND _IMPORT_CHECK_TARGETS sfml-audio ) 66 | list(APPEND _IMPORT_CHECK_FILES_FOR_sfml-audio "${_IMPORT_PREFIX}/lib/sfml-audio-s.lib" ) 67 | 68 | # Commands beyond this point should not need to know the version. 69 | set(CMAKE_IMPORT_FILE_VERSION) 70 | -------------------------------------------------------------------------------- /dependencies/imgui-sfml/lib/flac.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dy-Baby/ImGUI-Advanced-Cheat-Menu/9f5a3129f5c78d2acf4df116c3f1505bf5849a4d/dependencies/imgui-sfml/lib/flac.lib -------------------------------------------------------------------------------- /dependencies/imgui-sfml/lib/freetype.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dy-Baby/ImGUI-Advanced-Cheat-Menu/9f5a3129f5c78d2acf4df116c3f1505bf5849a4d/dependencies/imgui-sfml/lib/freetype.lib -------------------------------------------------------------------------------- /dependencies/imgui-sfml/lib/ogg.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dy-Baby/ImGUI-Advanced-Cheat-Menu/9f5a3129f5c78d2acf4df116c3f1505bf5849a4d/dependencies/imgui-sfml/lib/ogg.lib -------------------------------------------------------------------------------- /dependencies/imgui-sfml/lib/openal32.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dy-Baby/ImGUI-Advanced-Cheat-Menu/9f5a3129f5c78d2acf4df116c3f1505bf5849a4d/dependencies/imgui-sfml/lib/openal32.lib -------------------------------------------------------------------------------- /dependencies/imgui-sfml/lib/sfml-audio-d.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dy-Baby/ImGUI-Advanced-Cheat-Menu/9f5a3129f5c78d2acf4df116c3f1505bf5849a4d/dependencies/imgui-sfml/lib/sfml-audio-d.lib -------------------------------------------------------------------------------- /dependencies/imgui-sfml/lib/sfml-audio-s-d.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dy-Baby/ImGUI-Advanced-Cheat-Menu/9f5a3129f5c78d2acf4df116c3f1505bf5849a4d/dependencies/imgui-sfml/lib/sfml-audio-s-d.lib -------------------------------------------------------------------------------- /dependencies/imgui-sfml/lib/sfml-audio-s.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dy-Baby/ImGUI-Advanced-Cheat-Menu/9f5a3129f5c78d2acf4df116c3f1505bf5849a4d/dependencies/imgui-sfml/lib/sfml-audio-s.lib -------------------------------------------------------------------------------- /dependencies/imgui-sfml/lib/sfml-audio.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dy-Baby/ImGUI-Advanced-Cheat-Menu/9f5a3129f5c78d2acf4df116c3f1505bf5849a4d/dependencies/imgui-sfml/lib/sfml-audio.lib -------------------------------------------------------------------------------- /dependencies/imgui-sfml/lib/sfml-graphics-d.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dy-Baby/ImGUI-Advanced-Cheat-Menu/9f5a3129f5c78d2acf4df116c3f1505bf5849a4d/dependencies/imgui-sfml/lib/sfml-graphics-d.lib -------------------------------------------------------------------------------- /dependencies/imgui-sfml/lib/sfml-graphics-s-d.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dy-Baby/ImGUI-Advanced-Cheat-Menu/9f5a3129f5c78d2acf4df116c3f1505bf5849a4d/dependencies/imgui-sfml/lib/sfml-graphics-s-d.lib -------------------------------------------------------------------------------- /dependencies/imgui-sfml/lib/sfml-graphics-s.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dy-Baby/ImGUI-Advanced-Cheat-Menu/9f5a3129f5c78d2acf4df116c3f1505bf5849a4d/dependencies/imgui-sfml/lib/sfml-graphics-s.lib -------------------------------------------------------------------------------- /dependencies/imgui-sfml/lib/sfml-graphics.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dy-Baby/ImGUI-Advanced-Cheat-Menu/9f5a3129f5c78d2acf4df116c3f1505bf5849a4d/dependencies/imgui-sfml/lib/sfml-graphics.lib -------------------------------------------------------------------------------- /dependencies/imgui-sfml/lib/sfml-main-d.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dy-Baby/ImGUI-Advanced-Cheat-Menu/9f5a3129f5c78d2acf4df116c3f1505bf5849a4d/dependencies/imgui-sfml/lib/sfml-main-d.lib -------------------------------------------------------------------------------- /dependencies/imgui-sfml/lib/sfml-main.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dy-Baby/ImGUI-Advanced-Cheat-Menu/9f5a3129f5c78d2acf4df116c3f1505bf5849a4d/dependencies/imgui-sfml/lib/sfml-main.lib -------------------------------------------------------------------------------- /dependencies/imgui-sfml/lib/sfml-network-d.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dy-Baby/ImGUI-Advanced-Cheat-Menu/9f5a3129f5c78d2acf4df116c3f1505bf5849a4d/dependencies/imgui-sfml/lib/sfml-network-d.lib -------------------------------------------------------------------------------- /dependencies/imgui-sfml/lib/sfml-network-s-d.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dy-Baby/ImGUI-Advanced-Cheat-Menu/9f5a3129f5c78d2acf4df116c3f1505bf5849a4d/dependencies/imgui-sfml/lib/sfml-network-s-d.lib -------------------------------------------------------------------------------- /dependencies/imgui-sfml/lib/sfml-network-s.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dy-Baby/ImGUI-Advanced-Cheat-Menu/9f5a3129f5c78d2acf4df116c3f1505bf5849a4d/dependencies/imgui-sfml/lib/sfml-network-s.lib -------------------------------------------------------------------------------- /dependencies/imgui-sfml/lib/sfml-network.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dy-Baby/ImGUI-Advanced-Cheat-Menu/9f5a3129f5c78d2acf4df116c3f1505bf5849a4d/dependencies/imgui-sfml/lib/sfml-network.lib -------------------------------------------------------------------------------- /dependencies/imgui-sfml/lib/sfml-system-d.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dy-Baby/ImGUI-Advanced-Cheat-Menu/9f5a3129f5c78d2acf4df116c3f1505bf5849a4d/dependencies/imgui-sfml/lib/sfml-system-d.lib -------------------------------------------------------------------------------- /dependencies/imgui-sfml/lib/sfml-system-s-d.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dy-Baby/ImGUI-Advanced-Cheat-Menu/9f5a3129f5c78d2acf4df116c3f1505bf5849a4d/dependencies/imgui-sfml/lib/sfml-system-s-d.lib -------------------------------------------------------------------------------- /dependencies/imgui-sfml/lib/sfml-system-s.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dy-Baby/ImGUI-Advanced-Cheat-Menu/9f5a3129f5c78d2acf4df116c3f1505bf5849a4d/dependencies/imgui-sfml/lib/sfml-system-s.lib -------------------------------------------------------------------------------- /dependencies/imgui-sfml/lib/sfml-system.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dy-Baby/ImGUI-Advanced-Cheat-Menu/9f5a3129f5c78d2acf4df116c3f1505bf5849a4d/dependencies/imgui-sfml/lib/sfml-system.lib -------------------------------------------------------------------------------- /dependencies/imgui-sfml/lib/sfml-window-d.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dy-Baby/ImGUI-Advanced-Cheat-Menu/9f5a3129f5c78d2acf4df116c3f1505bf5849a4d/dependencies/imgui-sfml/lib/sfml-window-d.lib -------------------------------------------------------------------------------- /dependencies/imgui-sfml/lib/sfml-window-s-d.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dy-Baby/ImGUI-Advanced-Cheat-Menu/9f5a3129f5c78d2acf4df116c3f1505bf5849a4d/dependencies/imgui-sfml/lib/sfml-window-s-d.lib -------------------------------------------------------------------------------- /dependencies/imgui-sfml/lib/sfml-window-s.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dy-Baby/ImGUI-Advanced-Cheat-Menu/9f5a3129f5c78d2acf4df116c3f1505bf5849a4d/dependencies/imgui-sfml/lib/sfml-window-s.lib -------------------------------------------------------------------------------- /dependencies/imgui-sfml/lib/sfml-window.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dy-Baby/ImGUI-Advanced-Cheat-Menu/9f5a3129f5c78d2acf4df116c3f1505bf5849a4d/dependencies/imgui-sfml/lib/sfml-window.lib -------------------------------------------------------------------------------- /dependencies/imgui-sfml/lib/vorbis.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dy-Baby/ImGUI-Advanced-Cheat-Menu/9f5a3129f5c78d2acf4df116c3f1505bf5849a4d/dependencies/imgui-sfml/lib/vorbis.lib -------------------------------------------------------------------------------- /dependencies/imgui-sfml/lib/vorbisenc.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dy-Baby/ImGUI-Advanced-Cheat-Menu/9f5a3129f5c78d2acf4df116c3f1505bf5849a4d/dependencies/imgui-sfml/lib/vorbisenc.lib -------------------------------------------------------------------------------- /dependencies/imgui-sfml/lib/vorbisfile.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dy-Baby/ImGUI-Advanced-Cheat-Menu/9f5a3129f5c78d2acf4df116c3f1505bf5849a4d/dependencies/imgui-sfml/lib/vorbisfile.lib -------------------------------------------------------------------------------- /imgui.ini: -------------------------------------------------------------------------------- 1 | [Window][Debug##Default] 2 | Pos=60,60 3 | Size=400,400 4 | Collapsed=0 5 | 6 | [Window][ ] 7 | Pos=85,159 8 | Size=800,600 9 | Collapsed=0 10 | 11 | [Window][ ] 12 | Pos=888,251 13 | Size=519,461 14 | Collapsed=0 15 | 16 | [Window][ ] 17 | Pos=6,7 18 | Size=78,78 19 | Collapsed=0 20 | 21 | [Window][Dear ImGui Demo] 22 | Pos=127,14 23 | Size=825,751 24 | Collapsed=1 25 | 26 | [Window][##TOAST1] 27 | Pos=1144,702 28 | Size=116,34 29 | Collapsed=0 30 | 31 | [Window][##TOAST0] 32 | Pos=1144,746 33 | Size=116,34 34 | Collapsed=0 35 | 36 | [Window][##TOAST2] 37 | Pos=1166,565 38 | Size=94,65 39 | Collapsed=0 40 | 41 | -------------------------------------------------------------------------------- /menu/Console.cpp: -------------------------------------------------------------------------------- 1 | #include "Console.hpp" 2 | #include "../Config.hpp" 3 | #include "../util/TimeH.hpp" 4 | #include "../util/Obf.hpp" 5 | 6 | #include "imgui_custom.hpp" 7 | #include 8 | 9 | void Console::renderLog(Output& output) { 10 | if (output.type != 0) return; 11 | std::string print = output.text; 12 | if (output.drawTime) print = "[" + output.time + "] " + print; 13 | ImGui::TextUnformatted(print.c_str()); 14 | } 15 | void Console::renderLogError(Output& output) { 16 | if (output.type != 1) return; 17 | std::string print = output.text; 18 | if (output.drawTime) print = "[" + output.time + "] " ICON_FA_TIMES_CIRCLE + " " + print; 19 | ImVec4 color = ImGuiHelper::rgbaToVec4(255, 152, 172, 255); 20 | 21 | ImGui::PushStyleColor(ImGuiCol_Text, color); 22 | ImGui::TextUnformatted(print.c_str()); 23 | ImGui::PopStyleColor(); 24 | } 25 | void Console::renderLogInfo(Output& output) { 26 | if (output.type != 2) return; 27 | std::string print = output.text; 28 | if (output.drawTime) print = "[" + output.time + "] " ICON_FA_INFO_CIRCLE + " " + print; 29 | ImVec4 color = ImGuiHelper::rgbaToVec4(122, 202, 242, 255); 30 | 31 | ImGui::PushStyleColor(ImGuiCol_Text, color); 32 | ImGui::TextUnformatted(print.c_str()); 33 | ImGui::PopStyleColor(); 34 | } 35 | 36 | void Console::render() { 37 | if (!DRAW_CONSOLE) return; 38 | 39 | ImGui::SetNextWindowSize({ 300, 200 }, ImGuiCond_FirstUseEver); 40 | ImGui::Begin(" ", 0, ImGuiWindowFlags_HorizontalScrollbar | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoTitleBar); 41 | 42 | ImGuiHelper::drawTabHorizontally(obf("Styles"), ImVec2(ImGuiHelper::getWidth(), 50), types, selectedTypeTab); 43 | 44 | const float footer_height_to_reserve = ImGui::GetStyle().ItemSpacing.y + ImGui::GetFrameHeightWithSpacing(); 45 | ImGui::BeginChild(obf("ScrollingRegion").c_str(), ImVec2(0, -footer_height_to_reserve), true, ImGuiWindowFlags_HorizontalScrollbar); 46 | 47 | for (int i = 0; i < outputArr.size(); i++) { // draw output 48 | Output output = outputArr.at(i); 49 | 50 | if (selectedTypeTab == 0) { // draw all 51 | renderLog(output); 52 | renderLogError(output); 53 | renderLogInfo(output); 54 | } 55 | else if (selectedTypeTab == 1) { 56 | renderLogError(output); 57 | } 58 | else if (selectedTypeTab == 2) { 59 | renderLogInfo(output); 60 | } 61 | } 62 | 63 | if (ImGui::GetScrollY() >= ImGui::GetScrollMaxY()) ImGui::SetScrollHereY(1.0f); // scroll down automatically 64 | 65 | ImGui::EndChild(); 66 | ImGui::Separator(); 67 | 68 | bool reclaim_focus = false; 69 | ImGuiInputTextFlags input_text_flags = ImGuiInputTextFlags_EnterReturnsTrue; 70 | if (ImGui::InputText(obf("Input").c_str(), inputBuf, sizeof(inputBuf), input_text_flags)) { 71 | std::string s = inputBuf; 72 | memset(inputBuf, 0, sizeof(inputBuf)); 73 | if (s.compare(obf("clear")) == 0 || s.compare(obf("cls")) == 0) outputArr.clear(); 74 | else if (s.compare(obf("sdcfg")) == 0) Config::i().save(); 75 | else if (s.compare(obf("ldcfg")) == 0) Config::i().load(); 76 | 77 | reclaim_focus = true; 78 | } 79 | 80 | // Auto-focus on window apparition 81 | ImGui::SetItemDefaultFocus(); 82 | if (reclaim_focus) 83 | ImGui::SetKeyboardFocusHere(-1); // Auto focus previous widget 84 | 85 | ImGui::End(); 86 | 87 | } 88 | 89 | void Console::log(std::string text, bool printTime) { 90 | Output output{ text, printTime, 0 }; 91 | if (printTime) output.time = TimeH::getHourMinutesSeconds(); 92 | 93 | outputArr.push_back(output); 94 | } 95 | 96 | void Console::logError(std::string text, bool printTime) { 97 | Output output{ text, printTime, 1 }; 98 | if (printTime) output.time = TimeH::getHourMinutesSeconds(); 99 | 100 | outputArr.push_back(output); 101 | } 102 | 103 | void Console::logInfo(std::string text, bool printTime) { 104 | Output output{ text, printTime, 2 }; 105 | if (printTime) output.time = TimeH::getHourMinutesSeconds(); 106 | 107 | outputArr.push_back(output); 108 | } -------------------------------------------------------------------------------- /menu/Console.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "../util/Singleton.hpp" 3 | #include "Fonts.hpp" 4 | 5 | #include 6 | #include 7 | 8 | 9 | struct Output { 10 | std::string text, time; 11 | bool drawTime; 12 | int type; 13 | 14 | Output(std::string text_, bool drawTime_, int type_) { 15 | text = text_; 16 | drawTime = drawTime_; 17 | type = type_; 18 | } 19 | }; 20 | 21 | class Console : public Singleton { 22 | friend class Singleton; 23 | 24 | void renderLog(Output& output); 25 | void renderLogError(Output& output); 26 | void renderLogInfo(Output& output); 27 | 28 | public: 29 | int selectedTypeTab; 30 | std::vector types{ ICON_FA_LIST_ALT " All", ICON_FA_TIMES_CIRCLE " Errors", ICON_FA_INFO_CIRCLE " Info" }; 31 | 32 | char inputBuf[256]; 33 | std::vector outputArr; 34 | 35 | bool DRAW_CONSOLE = true; 36 | 37 | void render(); 38 | 39 | void log(std::string, bool printTime = true); 40 | void logError(std::string, bool printTime = true); 41 | void logInfo(std::string, bool printTime = true); 42 | }; -------------------------------------------------------------------------------- /menu/Menu.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../util/Obf.hpp" 4 | #include "imgui_custom.hpp" 5 | #include "../SetManager.hpp" 6 | 7 | #include 8 | #include 9 | 10 | namespace Menu { 11 | inline ImVec4* winCol = &SetManager::i().add(new Set(ImGuiHelper::rgbaToVec4(0, 0, 0, 230), obf("winCol"))).getVec4(), 12 | * bgCol = &SetManager::i().add(new Set(ImGuiHelper::rgbaToVec4(31, 30, 31, 255), obf("bgCol"))).getVec4(), 13 | * childCol = &SetManager::i().add(new Set(ImGuiHelper::rgbaToVec4(33, 34, 45, 255), obf("childCol"))).getVec4(), 14 | * childCol1 = &SetManager::i().add(new Set(ImGuiHelper::rgbaToVec4(38, 39, 50, 255), obf("childCol1"))).getVec4(), 15 | * notSelectedTextColor = &SetManager::i().add(new Set(ImGuiHelper::rgbaToVec4(140, 140, 140, 255), obf("notSelectedTextColor"))).getVec4(), 16 | * textCol = &SetManager::i().add(new Set(ImGuiHelper::rgbaToVec4(255, 255, 255, 255), obf("textCol"))).getVec4(), 17 | * btnActiveCol = &SetManager::i().add(new Set(ImGuiHelper::rgbaToVec4(239, 73, 88, 255), obf("btnActiveCol"))).getVec4(), 18 | * btnHoverCol = &SetManager::i().add(new Set(ImGuiHelper::rgbaToVec4(173, 55, 65, 255), obf("btnHoverCol"))).getVec4(), 19 | 20 | * frameCol = &SetManager::i().add(new Set(ImGuiHelper::rgbaToVec4(44, 43, 44, 255), obf("frameCol"))).getVec4(), 21 | * hoverCol = &SetManager::i().add(new Set(ImGuiHelper::rgbaToVec4(37, 36, 37, 255), obf("hoverCol"))).getVec4(), 22 | * itemCol = &SetManager::i().add(new Set(ImGuiHelper::rgbaToVec4(240, 74, 88, 255), obf("itemCol"))).getVec4(), 23 | * itemActiveCol = &SetManager::i().add(new Set(ImGuiHelper::rgbaToVec4(240, 50, 66, 255), obf("itemActiveCol"))).getVec4(), 24 | * resizeGripCol = &SetManager::i().add(new Set(ImGuiHelper::rgbaToVec4(220, 50, 66, 120), obf("resizeGripCol"))).getVec4(), 25 | * resizeGripHoverCol = &SetManager::i().add(new Set(ImGuiHelper::rgbaToVec4(250, 50, 66, 140), obf("resizeGripHoverCol"))).getVec4(); 26 | 27 | inline bool isGUIVisible = true; 28 | 29 | inline ImGuiStyle* style; 30 | inline int selectedTab = 0, selectedSubTab0 = 0, selectedSubTab1 = 0, selectedSubTab2 = 0, elementSize = 120; 31 | 32 | inline sf::Texture* logoTx; 33 | inline ImFont* bigFont; 34 | 35 | void setColors(); 36 | 37 | void loadFont(); 38 | void loadTheme(); 39 | 40 | void renderPanel(); // left panel 41 | void renderLogo(); 42 | void renderUser(); 43 | void renderTabs(); 44 | void renderSubTab0(); 45 | void renderSubTab1(); 46 | void renderSubTab2(); 47 | 48 | void render(); 49 | 50 | } -------------------------------------------------------------------------------- /menu/imgui_custom.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "imgui_helper.hpp" 4 | #include "imgui.h" 5 | 6 | #include 7 | 8 | static int STYLE = 0; 9 | 10 | namespace ImGui { 11 | 12 | IMGUI_API bool Hotkey(const char* label, int& key, float samelineOffset = 0.0f, const ImVec2& size = { 100.0f, 0.0f }); 13 | IMGUI_API bool Checkbox2(const char* label, bool* v); 14 | IMGUI_API bool Checkbox_(const char* label, bool* v); 15 | 16 | IMGUI_API bool SliderInt_3(const char* label, int* v, int v_min, int v_max, const char* format = "%d", ImGuiSliderFlags flags = 0); 17 | IMGUI_API bool SliderInt_2(const char* label, int* v, int v_min, int v_max, const char* format = "%d", ImGuiSliderFlags flags = 0); 18 | IMGUI_API bool SliderInt_(const char* label, int* v, int v_min, int v_max, const char* format = "%d", ImGuiSliderFlags flags = 0); 19 | 20 | IMGUI_API bool SliderFloat_3(const char* label, float* v, float v_min, float v_max, const char* format = "%.3f", ImGuiSliderFlags flags = 0); 21 | IMGUI_API bool SliderFloat_2(const char* label, float* v, float v_min, float v_max, const char* format = "%.3f", ImGuiSliderFlags flags = 0); 22 | IMGUI_API bool SliderFloat_(const char* label, float* v, float v_min, float v_max, const char* format = "%.3f", ImGuiSliderFlags flags = 0); 23 | 24 | IMGUI_API void chromaText(std::string text, float sat, float value, float alpha, float speed, float offset, float range); 25 | } 26 | 27 | struct ImGuiTextFilter2 : public ImGuiTextFilter { 28 | IMGUI_API bool Draw2(const char* label = "Filter (inc,-exc)", float width = 0.0f); // filter.Draw | Helper calling InputText+Build 29 | }; 30 | -------------------------------------------------------------------------------- /menu/imgui_helper.cpp: -------------------------------------------------------------------------------- 1 | #include "imgui_helper.hpp" 2 | #include "Menu.hpp" 3 | #include "../util/MH.hpp" 4 | 5 | float ImGuiHelper::getWidth() { 6 | return ImGui::GetContentRegionAvail().x; 7 | } 8 | float ImGuiHelper::getHeight() { 9 | return ImGui::GetContentRegionAvail().y; 10 | } 11 | 12 | void ImGuiHelper::drawTabHorizontally(std::string childName, ImVec2 childSize, std::vectortabNames, int& selectedSubTab) { 13 | int length = tabNames.front().length(); // get shortest string length 14 | int strIndex = 1; 15 | for (int i = 1; i < tabNames.size(); i++) { 16 | if (length > tabNames.at(i).length()) { 17 | length = tabNames.at(i).length(); 18 | strIndex = i; 19 | } 20 | } 21 | 22 | ImGui::BeginChild(childName.c_str(), childSize, true, ImGuiWindowFlags_HorizontalScrollbar); 23 | 24 | int minWidth = ImGuiHelper::getTextLength(tabNames.at(strIndex).c_str()).x; 25 | int maxWidth = 200; 26 | 27 | int btnWidth = (ImGuiHelper::getWidth() - ImGui::GetStyle().ItemSpacing.x * (tabNames.size())) / tabNames.size(); 28 | int btnHeight = MH::clamp(ImGuiHelper::getHeight(), 20, 60); 29 | btnWidth = (std::max)(minWidth, (std::min)(btnWidth, maxWidth)); 30 | 31 | { // center buttons 32 | // tell Dear ImGui to render the button at the new pos 33 | ImGui::SetCursorPosX((childSize.x - btnWidth * tabNames.size() - ImGui::GetStyle().ItemSpacing.x) / 2); 34 | } 35 | 36 | ImGui::PushStyleVar(ImGuiStyleVar_FrameRounding, 5); // round buttons 37 | for (int i = 0; i < tabNames.size(); i++) { 38 | std::string it = tabNames.at(i); 39 | ImGui::PushStyleColor(ImGuiCol_Button, selectedSubTab == i ? ImGui::GetStyle().Colors[ImGuiCol_ButtonActive] : ImGui::GetStyle().Colors[ImGuiCol_Button]); 40 | ImGui::PushStyleColor(ImGuiCol_Text, selectedSubTab == i ? ImGui::GetStyle().Colors[ImGuiCol_Text] : *Menu::notSelectedTextColor); 41 | 42 | 43 | if (ImGui::Button(it.c_str(), ImVec2(btnWidth, btnHeight))) selectedSubTab = i; 44 | ImGui::SameLine(); 45 | ImGui::PopStyleColor(2); 46 | 47 | } 48 | ImGui::PopStyleVar(); 49 | 50 | ImGui::EndChild(); 51 | } 52 | 53 | ImVec4 ImGuiHelper::rgbaToVec4(float r, float g, float b, float a) { 54 | return ImVec4(r / 255.f, g / 255.f, b / 255.f, a / 255.f); 55 | } 56 | ImVec4 ImGuiHelper::rgbaToVec4(ImColor& col) { 57 | return col.Value; 58 | } 59 | 60 | ImVec2 ImGuiHelper::getTextLength(std::string text) { 61 | return ImGui::CalcTextSize(text.c_str()); 62 | } 63 | 64 | void ImGuiHelper::renderCombo(std::string title, std::vectoritems, int& index, int comboWidth) { 65 | ImGui::PushItemWidth(comboWidth); 66 | if (ImGui::BeginCombo(title.c_str(), items.at(index).c_str(), 0)) { 67 | 68 | for (int n = 0; n < items.size(); n++) { 69 | const bool is_selected = (index == n); 70 | if (ImGui::Selectable(items.at(n).c_str(), is_selected))index = n; 71 | 72 | if (is_selected)ImGui::SetItemDefaultFocus();// Set the initial focus when opening the combo (scrolling + keyboard navigation focus) 73 | } 74 | ImGui::EndCombo(); 75 | } 76 | ImGui::PopItemWidth(); 77 | } -------------------------------------------------------------------------------- /menu/imgui_helper.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "imgui.h" 3 | 4 | #include 5 | #include 6 | 7 | namespace ImGuiHelper { 8 | void drawTabHorizontally(std::string childName, ImVec2 childSize, std::vectortabNames, int& selectedSubTab); // draws togglebuttons(tabs) in a child 9 | float getWidth(); 10 | float getHeight(); 11 | ImVec4 rgbaToVec4(float r, float g, float b, float a); 12 | ImVec4 rgbaToVec4(ImColor& col); 13 | ImVec2 getTextLength(std::string text); 14 | void renderCombo(std::string title, std::vectoritems, int& index, int comboWidth); 15 | } -------------------------------------------------------------------------------- /util/ColorH.cpp: -------------------------------------------------------------------------------- 1 | #include "ColorH.hpp" 2 | #include "MH.hpp" 3 | #include "TimeH.hpp" 4 | 5 | #include 6 | 7 | template void swap(T& a, T& b) { T tmp = a; a = b; b = tmp; } 8 | 9 | void ColorH::RGBtoHSV(float r, float g, float b, float& out_h, float& out_s, float& out_v) { 10 | float K = 0.f; 11 | if (g < b) { 12 | swap(g, b); 13 | K = -1.f; 14 | } 15 | if (r < g) { 16 | swap(r, g); 17 | K = -2.f / 6.f - K; 18 | } 19 | 20 | const float chroma = r - (g < b ? g : b); 21 | out_h = fabsf(K + (g - b) / (6.f * chroma + 1e-20f)); 22 | out_s = chroma / (r + 1e-20f); 23 | out_v = r; 24 | } 25 | 26 | void ColorH::HSVtoRGB(float h, float s, float v, float& out_r, float& out_g, float& out_b) { 27 | if (s == 0.0f) { 28 | // gray 29 | out_r = out_g = out_b = v; 30 | return; 31 | } 32 | 33 | h = fmodf(h, 1.0f) / 0.166667f /*(60.0f / 360.0f)*/; 34 | int i = (int)h; 35 | float f = h - (float)i; 36 | float p = v * (1.0f - s); 37 | float q = v * (1.0f - s * f); 38 | float t = v * (1.0f - s * (1.0f - f)); 39 | 40 | switch (i) { 41 | case 0: out_r = v; out_g = t; out_b = p; break; 42 | case 1: out_r = q; out_g = v; out_b = p; break; 43 | case 2: out_r = p; out_g = v; out_b = t; break; 44 | case 3: out_r = p; out_g = q; out_b = v; break; 45 | case 4: out_r = t; out_g = p; out_b = v; break; 46 | case 5: default: out_r = v; out_g = p; out_b = q; break; 47 | } 48 | } 49 | 50 | float ColorH::getTimeHue(float moveSpeed, float speed, float offset) { 51 | return fmodf(TimeH::currentTimeMS() * speed - moveSpeed - offset, 1); 52 | } -------------------------------------------------------------------------------- /util/ColorH.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | struct RGB { 4 | unsigned char r, g, b; // values go from 0-255 5 | RGB() : r(0), g(0), b(0) { } 6 | RGB(unsigned char _r, unsigned char _g, unsigned char _b) : r(_r), g(_g), b(_b) { } 7 | }; 8 | 9 | 10 | 11 | struct RGBA { 12 | unsigned char r, g, b, a; // values go from 0-255 13 | RGBA() : r(0), g(0), b(0), a(0) { } 14 | RGBA(unsigned char _r, unsigned char _g, unsigned char _b, unsigned char _a) : r(_r), g(_g), b(_b), a(_a) { } 15 | }; 16 | 17 | struct HSV { 18 | unsigned char h, s, v; // values go from 0-255 19 | HSV() : h(0), s(0), v(0) { } 20 | HSV(unsigned char _h, unsigned char _s, unsigned char _v) : h(_h), s(_s), v(_v) { } 21 | }; 22 | 23 | struct HSVA { 24 | unsigned char h, s, v, a; // values go from 0-255 25 | HSVA() : h(0), s(0), v(0), a(0) { } 26 | HSVA(unsigned char _h, unsigned char _s, unsigned char _v, unsigned char _a) : h(_h), s(_s), v(_v), a(_a) { } 27 | }; 28 | 29 | namespace ColorH { 30 | // Convert rgb floats ([0-1],[0-1],[0-1]) to hsv floats ([0-1],[0-1],[0-1]), from Foley & van Dam p593 31 | void RGBtoHSV(float r, float g, float b, float& out_h, float& out_s, float& out_v); 32 | // Convert hsv floats ([0-1],[0-1],[0-1]) to rgb floats ([0-1],[0-1],[0-1]), from Foley & van Dam p593 33 | void HSVtoRGB(float h, float s, float v, float& out_r, float& out_g, float& out_b); 34 | 35 | float getTimeHue(float moveSpeed, float speed, float offset = 0); 36 | }; -------------------------------------------------------------------------------- /util/FileH.cpp: -------------------------------------------------------------------------------- 1 | #include "FileH.hpp" 2 | 3 | #include 4 | #include 5 | 6 | namespace fs = std::filesystem; 7 | 8 | std::string FileH::getFilePath() { 9 | char buffer[MAX_PATH] = { 0 }; 10 | GetModuleFileNameA(NULL, buffer, MAX_PATH); 11 | return std::string(buffer); 12 | } 13 | 14 | std::string FileH::getDirPath() { 15 | std::string filePath = getFilePath(); 16 | return std::string(filePath).substr(0, std::string(filePath).find_last_of("\\")); 17 | } 18 | 19 | std::string FileH::getTempPath() { 20 | char buffer[MAX_PATH] = { 0 }; 21 | GetTempPathA(MAX_PATH, buffer); 22 | return std::string(buffer).substr(0, std::string(buffer).find_last_of("\\")); 23 | } 24 | 25 | std::string FileH::getRoamingPath() { 26 | 27 | char* path; 28 | size_t requiredSize; 29 | 30 | getenv_s(&requiredSize, NULL, 0, obf("APPDATA").c_str()); 31 | if (requiredSize == 0) { 32 | MessageBoxA(0, obf("Failed to get APPDATA Path!").c_str(), 0, 0); 33 | exit(1); 34 | } 35 | path = (char*)malloc(requiredSize * sizeof(char)); 36 | if (!path) { 37 | MessageBoxA(0, obf("Failed to get allocate Memory!").c_str(), 0, 0); 38 | exit(1); 39 | } 40 | getenv_s(&requiredSize, path, requiredSize, obf("APPDATA").c_str()); 41 | return path; 42 | } 43 | 44 | std::string FileH::getProjPath() { 45 | std::string roaming = getRoamingPath() + PATHNAME; 46 | if (!fs::exists(roaming)) 47 | if (!fs::create_directory(roaming)) { 48 | roaming = obf("Failed to create a Folder at: ").c_str() + roaming; 49 | MessageBoxA(0, roaming.c_str(), 0, 0); 50 | exit(1); 51 | } 52 | 53 | return roaming; 54 | } 55 | 56 | std::string FileH::getProjCfgPath() { 57 | std::string cfgFolder = getProjPath() + CFGNAME; 58 | if (!fs::exists(cfgFolder)) 59 | if (!fs::create_directory(cfgFolder)) { 60 | cfgFolder = obf("Failed to create a Folder at: ").c_str() + cfgFolder; 61 | MessageBoxA(0, cfgFolder.c_str(), 0, 0); 62 | exit(1); 63 | } 64 | 65 | return cfgFolder; 66 | } 67 | 68 | std::vector FileH::getFilesInDir(std::string path) { 69 | std::vector out; 70 | for (const auto& entry : fs::directory_iterator(path)) { 71 | if (entry.is_regular_file()) out.push_back(entry.path().string()); 72 | } 73 | return out; 74 | } 75 | 76 | bool FileH::deleteFile(std::string filePath) { 77 | if (fs::exists(filePath) && fs::is_regular_file(filePath)) { 78 | return fs::remove(filePath); 79 | } 80 | 81 | return false; 82 | } -------------------------------------------------------------------------------- /util/FileH.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Obf.hpp" 4 | #include 5 | #include 6 | 7 | namespace FileH { 8 | 9 | // Folder names located in %APPDATA% 10 | static std::string PATHNAME = obf("\\ImGuiCheat"); 11 | static std::string CFGNAME = obf("\\cfgs"); 12 | 13 | std::string getFilePath(); 14 | std::string getDirPath(); 15 | std::string getTempPath(); 16 | std::string getRoamingPath(); 17 | 18 | std::string getProjPath(); 19 | std::string getProjCfgPath(); 20 | std::vector getFilesInDir(std::string path); 21 | 22 | bool deleteFile(std::string filePath); 23 | }; -------------------------------------------------------------------------------- /util/MH.cpp: -------------------------------------------------------------------------------- 1 | #include "MH.hpp" 2 | #include 3 | #include 4 | 5 | float MH::clamp(float n, float min, float max) { 6 | return (std::max)(min, (std::min)(n, max)); 7 | } 8 | 9 | float MH::min(float n, float min) { 10 | return (std::min)(n, min); 11 | } 12 | 13 | float MH::max(float n, float max) { 14 | return (std::max)(n, max); 15 | } 16 | 17 | float MH::abs_(float val) { 18 | return abs(val); 19 | } 20 | 21 | float MH::toDeg(float val) { 22 | //return val * (180f / PI); 23 | return val * (18.237813f * PI); 24 | } 25 | 26 | float MH::toRad(float val) { 27 | //return val * (PI / 180f); 28 | return val * (PI * 0.005556f); 29 | } 30 | 31 | float MH::sin_(float angle) { 32 | return sin(toRad(angle)); 33 | } 34 | 35 | float MH::asin_(float angle) { 36 | return toDeg(asin(angle)); 37 | } 38 | 39 | float MH::cos_(float angle) { 40 | return cos(toRad(angle)); 41 | } 42 | 43 | float MH::acos_(float angle) { 44 | return toDeg(acos(angle)); 45 | } 46 | 47 | float MH::tan_(float angle) { 48 | return tan(toRad(angle)); 49 | } 50 | 51 | float MH::atan_(float angle) { 52 | return toDeg(atan(angle)); 53 | } 54 | 55 | float MH::atan2_(float y, float x) { 56 | return toDeg(atan2(y, x)); 57 | } 58 | 59 | float MH::randRange(float min, float max) { 60 | return min + static_cast (rand()) / static_cast (RAND_MAX / (max - min)); 61 | } 62 | 63 | int MH::randRange(int min, int max) { 64 | int range = max - min + 1; 65 | return rand() % range + min; 66 | } 67 | 68 | float MH::len(float x, float y) { 69 | return sqrtf(x * x + y * y); 70 | } 71 | float MH::len3(float x, float y, float z) { 72 | return sqrtf(x * x + y * y + z * z); 73 | } 74 | 75 | float MH::wrapAngleTo180(float angle) { 76 | angle = fmod(angle, 360); 77 | if (angle > 180) { 78 | angle -= 360; 79 | } 80 | 81 | else if (angle < -180) { 82 | angle += 360; 83 | } 84 | 85 | return angle; 86 | } 87 | 88 | float MH::wrapAngleTo360(float angle) { 89 | angle = fmod(angle, 360); 90 | if (angle < 0) { 91 | angle += 360; 92 | } 93 | 94 | return angle; 95 | } 96 | 97 | float MH::fade(float t) { 98 | // Fade function as defined by Ken Perlin. This eases coordinate values 99 | // so that they will "ease" towards integral values. This ends up smoothing 100 | // the final output. 101 | return t * t * t * (t * (t * 6 - 15) + 10); // 6t^5 - 15t^4 + 10t^3 102 | } 103 | 104 | // Linear interpolation function -> returns the point on a line from t = 0-1 105 | float MH::lerp(float x, float y, float t) { 106 | return x + t * (y - x); 107 | } -------------------------------------------------------------------------------- /util/MH.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace MH { 4 | float constexpr PI{ 3.141593 }; 5 | float abs_(float val); 6 | float toDeg(float val); 7 | float toRad(float val); 8 | float sin_(float angle); 9 | float asin_(float angle); 10 | float cos_(float angle); 11 | float acos_(float angle); 12 | float tan_(float angle); 13 | float atan_(float angle); 14 | float atan2_(float y, float x); 15 | float clamp(float n, float min, float max); 16 | float min(float n, float min); 17 | float max(float n, float max); 18 | float randRange(float min, float max); 19 | int randRange(int min, int max); 20 | float wrapAngleTo180(float angle); 21 | float wrapAngleTo360(float angle); 22 | float fade(float t); 23 | float lerp(float x, float y, float t); 24 | 25 | float len(float x, float y); 26 | float len3(float x, float y, float z); 27 | } -------------------------------------------------------------------------------- /util/Obf.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // Only for x64 ! 4 | 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | namespace Obf { 11 | 12 | inline std::string xor_(std::string s) { 13 | std::string out{}; 14 | for (char& c : s) { 15 | out += c ^ (s.length() + 1) ^ 'f'; 16 | } 17 | return out; 18 | } 19 | 20 | template 21 | struct Xor_String { 22 | std::array charArr; 23 | 24 | inline auto operator()() { 25 | std::string str{}; 26 | 27 | std::transform(charArr.begin(), charArr.end() - 1, std::back_inserter(str), [](auto const& c) { 28 | return c ^ S ^ 'f'; 29 | }); 30 | return str; 31 | } 32 | 33 | constexpr Xor_String(const char(&string)[S]) : charArr{} { 34 | auto it = charArr.begin(); 35 | for (auto const& c : string) { 36 | *it = c ^ S ^ 'f'; 37 | it++; 38 | } 39 | } 40 | }; 41 | } 42 | #define obf(string) []() { static auto result = Obf::Xor_String(string); return result(); }() -------------------------------------------------------------------------------- /util/Singleton.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | template 4 | class Singleton { 5 | protected: 6 | Singleton() { } 7 | ~Singleton() { } 8 | 9 | Singleton(const Singleton&) = delete; 10 | Singleton& operator=(const Singleton&) = delete; 11 | 12 | Singleton(Singleton&&) = delete; 13 | Singleton& operator=(Singleton&&) = delete; 14 | public: 15 | static T& i() { // returns instance 16 | static T inst{}; 17 | return inst; 18 | } 19 | }; -------------------------------------------------------------------------------- /util/StringH.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | namespace StringH { 7 | 8 | std::string vkToString(int vk); 9 | std::string boolToStr(bool flag); 10 | std::vector split(std::string s, std::string delimiter); 11 | bool equalsIgnoreCase(std::string a, std::string b); 12 | std::string strToBytes(std::string s); 13 | std::string bytesToStr(std::string s); 14 | std::string getFileNameFromPath(std::string s); 15 | } -------------------------------------------------------------------------------- /util/TimeH.cpp: -------------------------------------------------------------------------------- 1 | #include "TimeH.hpp" 2 | 3 | #include 4 | 5 | std::string TimeH::getHourMinutesSeconds() { 6 | struct tm tstruct; 7 | time_t now = time(0); 8 | localtime_s(&tstruct, &now); 9 | 10 | char buf[10]; 11 | std::strftime(buf, sizeof(buf), "%H:%M:%S", &tstruct); 12 | 13 | return buf; 14 | } 15 | 16 | float TimeH::currentTimeMS() { 17 | auto t = std::chrono::high_resolution_clock::now().time_since_epoch(); 18 | return std::chrono::duration(t).count(); 19 | } -------------------------------------------------------------------------------- /util/TimeH.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | namespace TimeH { 5 | std::string getHourMinutesSeconds(); 6 | float currentTimeMS(); 7 | } -------------------------------------------------------------------------------- /util/Vec2H.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "MH.hpp" 3 | 4 | class Vec2i { 5 | public: 6 | int x; 7 | int y; 8 | 9 | Vec2i() : x(0), y(0) {} 10 | Vec2i(int _x, int _y) : x(_x), y(_y) {} 11 | 12 | float len() { 13 | return MH::len(x, y); 14 | } 15 | }; 16 | 17 | class Vec2f { 18 | public: 19 | float x; 20 | float y; 21 | 22 | Vec2f() : x(0), y(0) {} 23 | Vec2f(float _x, float _y) : x(_x), y(_y) {} 24 | 25 | float len() { 26 | return MH::len(x, y); 27 | } 28 | }; 29 | 30 | class Vec2d { 31 | public: 32 | double x; 33 | double y; 34 | 35 | Vec2d() : x(0), y(0) {} 36 | Vec2d(double _x, double _y) : x(_x), y(_y) {} 37 | 38 | float len() { 39 | return MH::len(x, y); 40 | } 41 | }; 42 | 43 | class Vec3i { 44 | public: 45 | int x; 46 | int y; 47 | int z; 48 | 49 | Vec3i() : x(0), y(0), z(0) {} 50 | Vec3i(int _x, int _y, int _z) : x(_x), y(_y), z(_z) {} 51 | 52 | float len() { 53 | return MH::len3(x, y, z); 54 | } 55 | }; 56 | 57 | class Vec3f { 58 | public: 59 | float x; 60 | float y; 61 | float z; 62 | 63 | Vec3f() : x(0), y(0), z(0) {} 64 | Vec3f(float _x, float _y, float _z) : x(_x), y(_y), z(_z) {} 65 | 66 | float len() { 67 | return MH::len3(x, y, z); 68 | } 69 | }; 70 | 71 | class Vec3d { 72 | public: 73 | double x; 74 | double y; 75 | double z; 76 | 77 | Vec3d() : x(0), y(0), z(0) {} 78 | Vec3d(double _x, double _y, double _z) : x(_x), y(_y), z(_z) {} 79 | 80 | double len() { 81 | return MH::len3(x, y, z); 82 | } 83 | }; --------------------------------------------------------------------------------