Skocz do zawartości

Problem z cheatem


# CSH External VIP Project

Masz dosyć problemów z czynnikiem zaufania w CS2 lub notorycznymi banami?

Sprawdź CSH External VIP Project.


Więcej informacji  

Rekomendowane odpowiedzi

W Visual Studio użyj skrótu klawiaturowego CTRL + ALT + P, aby dołączyć do procesu csgo.exe i następnie używaj debugger'a, aby znaleźć błąd w kodzie i go popraw. Może to być źle napisany kod bądź po prostu jakieś nieaktualne offsety / sygnatury itp

Pomogłem i chcesz podziękować? Zostaw up.png przy poście

CSHEx4.png

 

Szukasz taniego i bardzo dobrego cheata na legit? Wypróbuj CSH External VIP Project.

Odnośnik do komentarza

To nie foldery. Plik z rozszerzaniem cpp to kod źródłowy, gdzie są funkcje i instrukcje itd, a plik z rozszerzeniem h to plik nagłówkowy, gdzie są definicje zmiennych i funkcji itd

 

Jeżeli chcesz cokolwiek działać z kodami źródłowymi / coś samemu działać w tym kierunku to musisz najpierw nauczyć się podstaw programowania, w tym wypadku w języka C++

Pomogłem i chcesz podziękować? Zostaw up.png przy poście

CSHEx4.png

 

Szukasz taniego i bardzo dobrego cheata na legit? Wypróbuj CSH External VIP Project.

Odnośnik do komentarza

Heh, ja nie wiem co ty masz zaprogramowane w tym kodzie. Ale jak skompilowała się wcześniej biblioteka to śmiem twierdzić, że żadnych plików nie brakuje

Pomogłem i chcesz podziękować? Zostaw up.png przy poście

CSHEx4.png

 

Szukasz taniego i bardzo dobrego cheata na legit? Wypróbuj CSH External VIP Project.

Odnośnik do komentarza

To tylko ostrzeżenie jak na przykład zmienna jest błędnie przypisana

 

np. int x = 3.65f

 

int reprezentuje liczbę całkowitą, a przypisałem do niej liczbę zmiennoprzecinkową. Nie robi się tak

Pomogłem i chcesz podziękować? Zostaw up.png przy poście

CSHEx4.png

 

Szukasz taniego i bardzo dobrego cheata na legit? Wypróbuj CSH External VIP Project.

Odnośnik do komentarza
#pragma once

#include "IAppSystem.hpp"
#include "../Math/Vector2D.hpp"
#include "../Math/Vector.hpp"


namespace vgui
{
    typedef unsigned long HFont;
    typedef unsigned int VPANEL;
};
enum FontCenteringFlags
{
    HFONT_CENTERED_NONE = (1 << 0),
    HFONT_CENTERED_X = (1 << 1),
    HFONT_CENTERED_Y = (1 << 2)
};

enum FontFeature
{
    FONT_FEATURE_ANTIALIASED_FONTS = 1,
    FONT_FEATURE_DROPSHADOW_FONTS = 2,
    FONT_FEATURE_OUTLINE_FONTS = 6,
};

enum FontDrawType
{
    FONT_DRAW_DEFAULT = 0,
    FONT_DRAW_NONADDITIVE,
    FONT_DRAW_ADDITIVE,
    FONT_DRAW_TYPE_COUNT = 2,
};

enum FontFlags
{
    FONTFLAG_NONE,
    FONTFLAG_ITALIC = 0x001,
    FONTFLAG_UNDERLINE = 0x002,
    FONTFLAG_STRIKEOUT = 0x004,
    FONTFLAG_SYMBOL = 0x008,
    FONTFLAG_ANTIALIAS = 0x010,
    FONTFLAG_GAUSSIANBLUR = 0x020,
    FONTFLAG_ROTARY = 0x040,
    FONTFLAG_DROPSHADOW = 0x080,
    FONTFLAG_ADDITIVE = 0x100,
    FONTFLAG_OUTLINE = 0x200,
    FONTFLAG_CUSTOM = 0x400,
    FONTFLAG_BITMAP = 0x800,
};

struct IntRect
{
    int x0;
    int y0;
    int x1;
    int y1;
};

struct Vertex_t
{
    Vertex_t() {}
    Vertex_t(const Vector2D &pos, const Vector2D &coord = Vector2D(0, 0))
    {
        m_Position = pos;
        m_TexCoord = coord;
    }
    void Init(const Vector2D &pos, const Vector2D &coord = Vector2D(0, 0))
    {
        m_Position = pos;
        m_TexCoord = coord;
    }

    Vector2D m_Position;
    Vector2D m_TexCoord;
};

//-----------------------------------------------------------------------------
// Purpose: Wraps contextless windows system functions
//-----------------------------------------------------------------------------
class ISurface : public IAppSystem
{
public:
    virtual void          RunFrame() = 0;
    virtual vgui::VPANEL  GetEmbeddedPanel() = 0;
    virtual void          SetEmbeddedPanel(vgui::VPANEL pPanel) = 0;
    virtual void          PushMakeCurrent(vgui::VPANEL panel, bool useInsets) = 0;
    virtual void          PopMakeCurrent(vgui::VPANEL panel) = 0;
    virtual void          DrawSetColor(int r, int g, int b, int a) = 0;
    virtual void          DrawSetColor(Color col) = 0;
    virtual void          DrawFilledRect(int x0, int y0, int x1, int y1) = 0;
    virtual void          DrawFilledRectArray(IntRect *pRects, int numRects) = 0;
    virtual void          DrawOutlinedRect(int x0, int y0, int x1, int y1) = 0;
    virtual void          DrawLine(int x0, int y0, int x1, int y1) = 0;
    virtual void          DrawPolyLine(int *px, int *py, int numPoints) = 0;
    virtual void          DrawSetApparentDepth(float f) = 0;
    virtual void          DrawClearApparentDepth(void) = 0;
    virtual void          DrawSetTextFont(vgui::HFont font) = 0;
    virtual void          DrawSetTextColor(int r, int g, int b, int a) = 0;
    virtual void          DrawSetTextColor(Color col) = 0;
    virtual void          DrawSetTextPos(int x, int y) = 0;
    virtual void          DrawGetTextPos(int& x, int& y) = 0;
    virtual void          DrawPrintText(const wchar_t *text, int textLen, FontDrawType drawType = FontDrawType::FONT_DRAW_DEFAULT) = 0;
    virtual void          DrawUnicodeChar(wchar_t wch, FontDrawType drawType = FontDrawType::FONT_DRAW_DEFAULT) = 0;
    virtual void          DrawFlushText() = 0;
    virtual void*         CreateHTMLWindow(void *events, vgui::VPANEL context) = 0;
    virtual void          PaintHTMLWindow(void *htmlwin) = 0;
    virtual void          DeleteHTMLWindow(void *htmlwin) = 0;
    virtual int           DrawGetTextureId(char const *filename) = 0;
    virtual bool          DrawGetTextureFile(int id, char *filename, int maxlen) = 0;
    virtual void          DrawSetTextureFile(int id, const char *filename, int hardwareFilter, bool forceReload) = 0;
    virtual void          DrawSetTextureRGBA(int id, const unsigned char *rgba, int wide, int tall) = 0;
    virtual void          DrawSetTexture(int id) = 0;
    virtual void          DeleteTextureByID(int id) = 0;
    virtual void          DrawGetTextureSize(int id, int &wide, int &tall) = 0;
    virtual void          DrawTexturedRect(int x0, int y0, int x1, int y1) = 0;
    virtual bool          IsTextureIDValid(int id) = 0;
    virtual int           CreateNewTextureID(bool procedural = false) = 0;
    virtual void          GetScreenSize(int &wide, int &tall) = 0;
    virtual void          SetAsTopMost(vgui::VPANEL panel, bool state) = 0;
    virtual void          BringToFront(vgui::VPANEL panel) = 0;
    virtual void          SetForegroundWindow(vgui::VPANEL panel) = 0;
    virtual void          SetPanelVisible(vgui::VPANEL panel, bool state) = 0;
    virtual void          SetMinimized(vgui::VPANEL panel, bool state) = 0;
    virtual bool          IsMinimized(vgui::VPANEL panel) = 0;
    virtual void          FlashWindow(vgui::VPANEL panel, bool state) = 0;
    virtual void          SetTitle(vgui::VPANEL panel, const wchar_t *title) = 0;
    virtual void          SetAsToolBar(vgui::VPANEL panel, bool state) = 0;
    virtual void          CreatePopup(vgui::VPANEL panel, bool minimised, bool showTaskbarIcon = true, bool disabled = false, bool mouseInput = true, bool kbInput = true) = 0;
    virtual void          SwapBuffers(vgui::VPANEL panel) = 0;
    virtual void          Invalidate(vgui::VPANEL panel) = 0;
    virtual void          SetCursor(unsigned long cursor) = 0;
    virtual bool          IsCursorVisible() = 0;
    virtual void          ApplyChanges() = 0;
    virtual bool          IsWithin(int x, int y) = 0;
    virtual bool          HasFocus() = 0;
    virtual bool          SupportsFeature(int /*SurfaceFeature_t*/ feature) = 0;
    virtual void          RestrictPaintToSinglePanel(vgui::VPANEL panel, bool bForceAllowNonModalSurface = false) = 0;
    virtual void          SetModalPanel(vgui::VPANEL) = 0;
    virtual vgui::VPANEL  GetModalPanel() = 0;
    virtual void          UnlockCursor() = 0;
    virtual void          LockCursor() = 0;
    virtual void          SetTranslateExtendedKeys(bool state) = 0;
    virtual vgui::VPANEL  GetTopmostPopup() = 0;
    virtual void          SetTopLevelFocus(vgui::VPANEL panel) = 0;
    virtual vgui::HFont   CreateFont_() = 0;
    virtual bool          SetFontGlyphSet(vgui::HFont font, const char *windowsFontName, int tall, int weight, int blur, int scanlines, int flags, int nRangeMin = 0, int nRangeMax = 0) = 0;
    virtual bool          AddCustomFontFile(const char *fontFileName) = 0;
    virtual int           GetFontTall(vgui::HFont font) = 0;
    virtual int           GetFontAscent(vgui::HFont font, wchar_t wch) = 0;
    virtual bool          IsFontAdditive(vgui::HFont font) = 0;
    virtual void          GetCharABCwide(vgui::HFont font, int ch, int &a, int &b, int &c) = 0;
    virtual int           GetCharacterWidth(vgui::HFont font, int ch) = 0;
    virtual void          GetTextSize(vgui::HFont font, const wchar_t *text, int &wide, int &tall) = 0;
    virtual vgui::VPANEL  GetNotifyPanel() = 0;
    virtual void          SetNotifyIcon(vgui::VPANEL context, unsigned long icon, vgui::VPANEL panelToReceiveMessages, const char *text) = 0;
    virtual void          PlaySound_(const char *fileName) = 0;
    virtual int           GetPopupCount() = 0;
    virtual vgui::VPANEL  GetPopup(int index) = 0;
    virtual bool          ShouldPaintChildPanel(vgui::VPANEL childPanel) = 0;
    virtual bool          RecreateContext(vgui::VPANEL panel) = 0;
    virtual void          AddPanel(vgui::VPANEL panel) = 0;
    virtual void          ReleasePanel(vgui::VPANEL panel) = 0;
    virtual void          MovePopupToFront(vgui::VPANEL panel) = 0;
    virtual void          MovePopupToBack(vgui::VPANEL panel) = 0;
    virtual void          SolveTraverse(vgui::VPANEL panel, bool forceApplySchemeSettings = false) = 0;
    virtual void          PaintTraverse(vgui::VPANEL panel) = 0;
    virtual void          EnableMouseCapture(vgui::VPANEL panel, bool state) = 0;
    virtual void          GetWorkspaceBounds(int &x, int &y, int &wide, int &tall) = 0;
    virtual void          GetAbsoluteWindowBounds(int &x, int &y, int &wide, int &tall) = 0;
    virtual void          GetProportionalBase(int &width, int &height) = 0;
    virtual void          CalculateMouseVisible() = 0;
    virtual bool          NeedKBInput() = 0;
    virtual bool          HasCursorPosFunctions() = 0;
    virtual void          SurfaceGetCursorPos(int &x, int &y) = 0;
    virtual void          SurfaceSetCursorPos(int x, int y) = 0;
    virtual void          DrawTexturedLine(const Vertex_t &a, const Vertex_t &b) = 0;
    virtual void          DrawOutlinedCircle(int x, int y, int radius, int segments) = 0;
    virtual void          DrawTexturedPolyLine(const Vertex_t *p, int n) = 0;
    virtual void          DrawTexturedSubRect(int x0, int y0, int x1, int y1, float texs0, float text0, float texs1, float text1) = 0;
    virtual void          DrawTexturedPolygon(int n, Vertex_t *pVertice, bool bClipVertices = true) = 0;

    void Clear(int x, int y, int w, int h, Color color)
    {
        DrawSetColor(color);
        DrawFilledRect(x, y, x + w, y + h);
    }
    void DrawRect(int x, int y, int w, int h, Color col)
    {
        DrawSetColor(col);
        DrawFilledRect(x, y, x + w, y + h);
    }
    int TweakColor(int c1, int c2, int variation)
    {
        if (c1 == c2)
            return c1;
        else if (c1 < c2)
            c1 += variation;
        else
            c1 -= variation;
        return c1;
    }
   

    void rect_filled(int x, int y, int w, int h, Color color)
    {
        DrawSetColor(color);
        DrawFilledRect(x, y, x + w, y + h);
    }
    RECT GetTextSizeNEW(DWORD font, const char* text)
    {
        size_t origsize = strlen(text) + 1;
        const size_t newsize = 100;
        size_t convertedChars = 0;
        wchar_t wcstring[newsize];
        mbstowcs_s(&convertedChars, wcstring, origsize, text, _TRUNCATE);

        RECT rect; int x, y;
        GetTextSize(font, wcstring, x, y);
        rect.left = x; rect.bottom = y;
        rect.right = x;
        return rect;
    }
    void Text(int x, int y, Color color, DWORD font, const char* text)
    {
        size_t origsize = strlen(text) + 1;
        const size_t newsize = 100;
        size_t convertedChars = 0;
        wchar_t wcstring[newsize];
        mbstowcs_s(&convertedChars, wcstring, origsize, text, _TRUNCATE);

        DrawSetTextFont(font);

        DrawSetTextColor(color);
        DrawSetTextPos(x, y);
        DrawPrintText(wcstring, wcslen(wcstring));
        return;
    }
    void Outline(float x, float y, float w, float h, Color color)
    {
        DrawSetColor(color);
        DrawOutlinedRect(x, y, x + w, y + h);
    }

    void DrawFilledRectNEW(int x1, int y1, int x2, int y2, Color color)
    {
        DrawSetColor(color);
        DrawFilledRect(x1, y1, x2, y2);
    }

    void text(vgui::HFont font, int x, int y, Color color, DWORD flags, const char* msg, ...)
    {
    
        va_list va_alist;
        char buffer[1024];
        va_start(va_alist, msg);
        _vsnprintf(buffer, sizeof(buffer), msg, va_alist);
        va_end(va_alist);
        wchar_t wbuf[1024];

        MultiByteToWideChar(CP_UTF8, 0, buffer, 256, wbuf, 256);


        int width, height;
        GetTextSize(font, wbuf, width, height);

        if (!(flags & HFONT_CENTERED_NONE))
        {
            if (flags & HFONT_CENTERED_X)
                x -= width * 0.5f;

            if (flags & HFONT_CENTERED_Y)
                y -= height * 0.5f;
        }

        DrawSetTextFont(font);
        DrawSetTextColor(color);
        DrawSetTextPos(x, y);
        DrawPrintText(wbuf, wcslen(wbuf));
    }

    void triangle(Vector2D point_one, Vector2D point_two, Vector2D point_three, Color color)
    {
     

        Vertex_t verts[3] = {
            Vertex_t(point_one),
            Vertex_t(point_two),
            Vertex_t(point_three)
        };


        static int texture = CreateNewTextureID(true);
        unsigned char buffer[4] = { 255, 255, 255, 255 };

        DrawSetTextureRGBA(texture, buffer, 1, 1);
        DrawSetColor(color);
        DrawSetTexture(texture);

        DrawTexturedPolygon(3, verts);
    }

    void GradientV(int x, int y, int w, int h, Color c1, Color c2)
    {
        Clear(x, y, w, h, c1);
        BYTE first = c2.r();
        BYTE second = c2.g();
        BYTE third = c2.b();
        for (int i = 0; i < h; i++)
        {
            float fi = i, fh = h;
            float a = fi / fh;
            DWORD ia = a * 255;
            Clear(x, y + i, w, 1, Color(first, second, third, ia));
        }
    }

    void Text2(int x, int y, const char* _Input, int font, Color color)
    {
        int apple = 0;
        char Buffer[2048] = { '\0' };
        va_list Args;
        va_start(Args, _Input);
        vsprintf_s(Buffer, _Input, Args);
        va_end(Args);
        size_t Size = strlen(Buffer) + 1;
        wchar_t* WideBuffer = new wchar_t[Size];
        mbstowcs_s(0, WideBuffer, Size, Buffer, Size - 1);

        DrawSetTextColor(color);
        DrawSetTextFont(font);
        DrawSetTextPos(x, y);
        DrawPrintText(WideBuffer, wcslen(WideBuffer));
    }
    void Textf(int x, int y, Color color, DWORD font, const char* fmt, ...)
    {
        if (!fmt) return; //if the passed string is null return
        if (strlen(fmt) < 2) return;

        //Set up va_list and buffer to hold the params 
        va_list va_alist;
        char logBuf[256] = { 0 };

        //Do sprintf with the parameters
        va_start(va_alist, fmt);
        _vsnprintf_s(logBuf + strlen(logBuf), 256 - strlen(logBuf), sizeof(logBuf) - strlen(logBuf), fmt, va_alist);
        va_end(va_alist);

        Text(x, y, color, font, logBuf);
    }
    void Line(int x, int y, int x2, int y2, Color color)
    {
        DrawSetColor(color);
        DrawLine(x, y, x2, y2);
    }
    RECT get_text_size(const char* _Input, int font)
    {
        int apple = 0;
        char Buffer[2048] = { '\0' };
        va_list Args;
        va_start(Args, _Input);
        vsprintf_s(Buffer, _Input, Args);
        va_end(Args);
        size_t Size = strlen(Buffer) + 1;
        wchar_t* WideBuffer = new wchar_t[Size];
        mbstowcs_s(0, WideBuffer, Size, Buffer, Size - 1);
        int Width = 0, Height = 0;

        GetTextSize(font, WideBuffer, Width, Height);

        RECT outcome = { 0, 0, Width, Height };
        return outcome;
    }
    void outlined_rect(int x, int y, int w, int h, Color color_out, Color color_in)
    {
        DrawSetColor(color_in);
        DrawFilledRect(x, y, x + w, y + h);

        DrawSetColor(color_out);
        DrawOutlinedRect(x, y, x + w, y + h);
    }
    void color_spectrum(int x, int y, int w, int h)
    {
        static int GradientTexture = 0;
        static std::unique_ptr<Color[]> Gradient = nullptr;
        if (!Gradient)
        {
            Gradient = std::make_unique<Color[]>(w * h);

            for (int i = 0; i < w; i++)
            {
                int div = w / 6;
                int phase = i / div;
                float t = (i % div) / (float)div;
                int r = 0, g = 0, b = 0;

                switch (phase)
                {
                case(0):
                    r = 255;
                    g = 255 * t;
                    b = 0;
                    break;
                case(1):
                    r = 255 * (1.f - t);
                    g = 255;
                    b = 0;
                    break;
                case(2):
                    r = 0;
                    g = 255;
                    b = 255 * t;
                    break;
                case(3):
                    r = 0;
                    g = 255 * (1.f - t);
                    b = 255;
                    break;
                case(4):
                    r = 255 * t;
                    g = 0;
                    b = 255;
                    break;
                case(5):
                    r = 255;
                    g = 0;
                    b = 255 * (1.f - t);
                    break;
                }

                for (int k = 0; k < h; k++)
                {
                    float sat = k / (float)h;
                    int _r = r + sat * (255 - r);
                    int _g = g + sat * (255 - g);
                    int _b = b + sat * (255 - b);

                    *reinterpret_cast<Color*>(Gradient.get() + i + k * w) = Color(_r, _g, _b);
                }
            }

            GradientTexture = CreateNewTextureID(true);
            DrawSetTextureRGBA(GradientTexture, (unsigned char*)Gradient.get(), w, h);
        }
        DrawSetColor(Color(255, 255, 255, 255));
        DrawSetTexture(GradientTexture);
        DrawTexturedRect(x, y, x + w, y + h);
    }
    Color color_spectrum_pen(int x, int y, int w, int h, Vector stx)
    {
        int div = w / 6;
        int phase = stx.x / div;
        float t = ((int)stx.x % div) / (float)div;
        int r = 0, g = 0, b = 0;

        switch (phase)
        {
        case(0):
            r = 255;
            g = 255 * t;
            b = 0;
            break;
        case(1):
            r = 255 * (1.f - t);
            g = 255;
            b = 0;
            break;
        case(2):
            r = 0;
            g = 255;
            b = 255 * t;
            break;
        case(3):
            r = 0;
            g = 255 * (1.f - t);
            b = 255;
            break;
        case(4):
            r = 255 * t;
            g = 0;
            b = 255;
            break;
        case(5):
            r = 255;
            g = 0;
            b = 255 * (1.f - t);
            break;
        }

        float sat = stx.y / h;
        return Color(r + sat * (255 - r), g + sat * (255 - g), b + sat * (255 - b), 255);

    }

    void DrawT(int X, int Y, Color Color, int Font, bool Center, const char* _Input, ...)
    {
        int apple = 0;
        char Buffer[2048] = { '\0' };
        va_list Args;

        va_start(Args, _Input);
        vsprintf_s(Buffer, _Input, Args);
        va_end(Args);

        size_t Size = strlen(Buffer) + 1;
        wchar_t* WideBuffer = new wchar_t[Size];

        mbstowcs_s(0, WideBuffer, Size, Buffer, Size - 1);

        int Width = 0, Height = 0;

        if (Center)
            GetTextSize(Font, WideBuffer, Width, Height);

        DrawSetTextColor(Color);
        DrawSetTextFont(Font);
        DrawSetTextPos(X - (Width / 2), Y);
        DrawPrintText(WideBuffer, wcslen(WideBuffer));
    }
  //  void DrawEmptyRect(int x1, int y1, int x2, int y2, Color color, unsigned char = 0); // the flags are for which sides to ignore in clockwise, 0b1 is top, 0b10 is right, etc.
    void DrawF(int X, int Y, unsigned int Font, bool center_width, bool center_height, Color Color, std::string Input, ...)
    {
        /* char -> wchar */
        size_t size = Input.size() + 1;
        auto wide_buffer = std::make_unique<wchar_t[]>(size);
        mbstowcs_s(0, wide_buffer.get(), size, Input.c_str(), size - 1);

        /* check center */
        int width = 0, height = 0;
        GetTextSize(Font, wide_buffer.get(), width, height);
        if (!center_width)
            width = 0;
        if (!center_height)
            height = 0;

        /* call and draw*/
        DrawSetTextColor(Color);
        DrawSetTextFont(Font);
        DrawSetTextPos(X - (width * .5), Y - (height * .5));
        DrawPrintText(wide_buffer.get(), wcslen(wide_buffer.get()));
    }
    void DrawEmptyRect(int x1, int y1, int x2, int y2, Color color, unsigned char ignore_flags = 0)
    {
        DrawSetColor(color);
        if (!(ignore_flags & 0b1))
            DrawLine(x1, y1, x2, y1);
        if (!(ignore_flags & 0b10))
            DrawLine(x2, y1, x2, y2);
        if (!(ignore_flags & 0b100))
            DrawLine(x2, y2, x1, y2);
        if (!(ignore_flags & 0b1000))
            DrawLine(x1, y2, x1, y1);
    }

    RECT GetTextSizeRect(DWORD font, const char* text) // ayyware or something
    {
        size_t origsize = strlen(text) + 1;
        const size_t newsize = 100;
        size_t convertedChars = 0;
        wchar_t wcstring[newsize];
        mbstowcs_s(&convertedChars, wcstring, origsize, text, _TRUNCATE);

        RECT rect; int x, y;
        GetTextSize(font, wcstring, x, y);
        rect.left = x; rect.bottom = y;
        rect.right = x;
        return rect;
    }
    void draw_wide_string(bool center, unsigned long font, int x, int y, Color c, wchar_t* str)
    {
        if (center) {
            int wide = 0, tall = 0;
            GetTextSize(font, str, wide, tall);
            x -= wide / 2;
            y -= tall / 2;
        }

        DrawSetTextColor(c);
        DrawSetTextFont(font);
        DrawSetTextPos(x, y);
        DrawPrintText(str, (int)wcslen(str));
    }
    void Text(int x, int y, const char* _Input, int font, Color color)
    {
        int apple = 0;
        char Buffer[2048] = { '\0' };
        va_list Args;
        va_start(Args, _Input);
        vsprintf_s(Buffer, _Input, Args);
        va_end(Args);
        size_t Size = strlen(Buffer) + 1;
        wchar_t* WideBuffer = new wchar_t[Size];
        mbstowcs_s(0, WideBuffer, Size, Buffer, Size - 1);

        DrawSetTextColor(color);
        DrawSetTextFont(font);
        DrawSetTextPos(x, y);
        DrawPrintText(WideBuffer, wcslen(WideBuffer));
    }
    void FilledRect(int x, int y, int w, int h, Color color)
    {
        DrawSetColor(color);
        DrawFilledRect(x, y, x + w, y + h);
    }

    void OutlinedRect(int x, int y, int w, int h, Color color)
    {
        DrawSetColor(color);
        DrawOutlinedRect(x, y, x + w, y + h);
    }
    void Polygon(int count, Vertex_t* Vertexs, Color color)
    {
        static int Texture = CreateNewTextureID(true); //need to make a texture with procedural true
        unsigned char buffer[4] = { 255, 255, 255, 255 };//{ color.r(), color.g(), color.b(), color.a() };

        DrawSetTextureRGBA(Texture, buffer, 1, 1); //Texture, char array of texture, width, height
        DrawSetColor(color); // keep this full color and opacity use the RGBA @top to set values.
        DrawSetTexture(Texture); // bind texture

        DrawTexturedPolygon(count, Vertexs);
    }
    RECT GetTextSize2(const char* _Input, int font)
    {
        int apple = 0;
        char Buffer[2048] = { '\0' };
        va_list Args;
        va_start(Args, _Input);
        vsprintf_s(Buffer, _Input, Args);
        va_end(Args);
        size_t Size = strlen(Buffer) + 1;
        wchar_t* WideBuffer = new wchar_t[Size];
        mbstowcs_s(0, WideBuffer, Size, Buffer, Size - 1);
        int Width = 0, Height = 0;

        GetTextSize(font, WideBuffer, Width, Height);

        RECT outcome = { 0, 0, Width, Height };
        return outcome;
    }
    void GradientSideways(int x, int y, int w, int h, Color color1, Color color2, int variation)
    {
        int r1 = color1.r();
        int g1 = color1.g();
        int b1 = color1.b();
        int a1 = color1.a();

        int r2 = color2.r();
        int g2 = color2.g();
        int b2 = color2.b();
        int a2 = color2.a();

        for (int i = 0; i <= w; i++)
        {
            DrawRect(x + i, y, 1, h, Color(r1, g1, b1, a1));
            r1 = TweakColor(r1, r2, variation);
            g1 = TweakColor(g1, g2, variation);
            b1 = TweakColor(b1, b2, variation);
            a1 = TweakColor(a1, a2, variation);
        }
    }

};
Odnośnik do komentarza

Dołącz do dyskusji

Możesz dodać zawartość już teraz a zarejestrować się później. Jeśli posiadasz już konto, zaloguj się aby dodać zawartość za jego pomocą.

Gość
Dodaj odpowiedź do tematu...

×   Wklejono zawartość z formatowaniem.   Usuń formatowanie

  Dozwolonych jest tylko 75 emoji.

×   Odnośnik został automatycznie osadzony.   Przywróć wyświetlanie jako odnośnik

×   Przywrócono poprzednią zawartość.   Wyczyść edytor

×   Nie możesz bezpośrednio wkleić grafiki. Dodaj lub załącz grafiki z adresu URL.

  Tagi

×
×
  • Dodaj nową pozycję...

Powiadomienie o plikach cookie

Umieściliśmy na Twoim urządzeniu pliki cookie, aby pomóc Ci usprawnić przeglądanie strony. Możesz dostosować ustawienia plików cookie, w przeciwnym wypadku zakładamy, że wyrażasz na to zgodę. Regulamin. Polityka prywatności