From 4af82402bec1c02c79adf5e5e8a735017f75cf12 Mon Sep 17 00:00:00 2001 From: LIghty Date: Thu, 22 Mar 2018 17:00:13 +0100 Subject: [PATCH] draw circle and font esp not used nor needed. --- include/menu/compatlayer.hpp | 1 - src/menu/compatibilitylayer.cpp | 30 ------------------------------ 2 files changed, 31 deletions(-) diff --git a/include/menu/compatlayer.hpp b/include/menu/compatlayer.hpp index 9d6b7e97..10f1ca33 100644 --- a/include/menu/compatlayer.hpp +++ b/include/menu/compatlayer.hpp @@ -49,7 +49,6 @@ void FString(unsigned long font, int x, int y, int color, int shadow, void DrawRect(int x, int y, int w, int h, int color); void DrawLine(int x, int y, int dx, int dy, int color); void OutlineRect(int x, int y, int w, int h, int color); -void DrawCircle(float cx, float cy, float r, int num_segments, int color); void GetStringLength(unsigned long font, char *string, int &length, int &height); std::pair GetStringLength(unsigned long font, std::string string); diff --git a/src/menu/compatibilitylayer.cpp b/src/menu/compatibilitylayer.cpp index 0529f695..5008d8c8 100644 --- a/src/menu/compatibilitylayer.cpp +++ b/src/menu/compatibilitylayer.cpp @@ -2,7 +2,6 @@ namespace fonts { -unsigned long ESP = 0; unsigned long MENU = 0; unsigned long MENU_BIG = 0; const std::vector fonts = { "Tahoma Bold", "Tahoma", @@ -10,19 +9,6 @@ const std::vector fonts = { "Tahoma Bold", "Tahoma", "Verdana Bold", "Arial", "Courier New", "Ubuntu Mono Bold" }; CatEnum family_enum(fonts); -CatVar esp_family(family_enum, "font_esp_family", "2", "ESP font", - "ESP font family"); -CatVar esp_height(CV_INT, "font_esp_height", "14", "ESP height", - "ESP font height"); - -void Update() -{ - fonts::ESP = g_ISurface->CreateFont(); - g_ISurface->SetFontGlyphSet( - fonts::ESP, fonts::fonts[_clamp(0, 7, (int) fonts::esp_family)].c_str(), - (int) fonts::esp_height, 0, 0, 0, 0); // or Ubuntu Mono Bold - // g_ISurface->ResetFontCaches(); -} } int colorsint::FromHSL(float h, float s, float v) @@ -87,22 +73,6 @@ void draw::OutlineRect(int x, int y, int w, int h, int color) g_ISurface->DrawOutlinedRect(x, y, x + w, y + h); } -void draw::DrawCircle(float x, float y, float r, int num_segments, int color) -{ - if (num_segments < 3 || r == 0) - return; - g_ISurface->DrawSetColor(*reinterpret_cast(&color)); - float Step = PI * 2.0 / num_segments; - for (float a = 0; a < (PI * 2.0); a += Step) - { - float x1 = r * cos(a) + x; - float y1 = r * sin(a) + y; - float x2 = r * cos(a + Step) + x; - float y2 = r * sin(a + Step) + y; - g_ISurface->DrawLine(x1, y1, x2, y2); - } -} - void draw::GetStringLength(unsigned long font, char *string, int &length, int &height) {