Source WideScreen 2024 By Dakosmu

Iniciado por dakosmu, Nov 03, 2024, 05:47 PM

0 Miembros y 1 Visitante están viendo este tema.

dakosmu

  • Country: vn
  • *
    Newbie
    Mensajes: 3
    En Lorencia
    Agradecido: 11 veces
    En línea
    Source WideScreen 2024 By Dakosmu




    Este Wide Fue Sacado de los Source ZonaMu season 6 + grow lancer


    Interface.cpp

    Agregas

    #include "DakosmuS6.h"



    Buscas

    void Interface::LoadImages()


    Agregas


        //DakosmuWide Imagenes Cliente
        pLoadImage("Custom\\DakosmuWide\\Wide_1.tga", 87968, 0x2601, 0x2901, 1, 0);
        pLoadImage("Custom\\DakosmuWide\\Wide_2.tga", 87969, 0x2601, 0x2901, 1, 0);
        pLoadImage("Custom\\DakosmuWide\\Wide_3.tga", 61546, GL_LINEAR, GL_CLAMP, 1, 0);
        pLoadImage("Custom\\DakosmuWide\\Wide_4.tga", 61547, GL_LINEAR, GL_CLAMP, 1, 0);
        pLoadImage("Custom\\DakosmuWide\\Wide_5.tga", 31337, 9729, 10496, 1, 0);
        //Dakosmu


    Descargar los .OZT


    Colocar Dentro del CLiente en la Ruta
    CitarData\Custom\DakosmuWide


    Buscas

    pLoadSomeForm();


    Agregas

    DakosmuInterfaceNew.Load_Image(); //Las Imagenes Wide_1,2,3,4,5



    Main.cpp

    Agregas


    #include "DakosmuWide.h"
    #include "DakosmuS6.h"



    Buscas

    extern "C" _declspec(dllexport) void EntryProc() // OK


    Agregas

        //WideScreen
        DakosmuWide1.InitFrameOpenGL();
        DakosmuInterfaceNew.Load();
        //WideScreen



    DakosmuBytes.cpp


    #include "stdafx.h"
    #include "DakosmuBytes.h"
    #include "../../Util/libjpeg/jpeglib.h"
    #include "Util.h"

    #include <Shlwapi.h>

    #pragma comment(lib, "Shlwapi.lib")

    #pragma comment(lib, "jpeg.lib")

    #define pOpen        ((FILE*(*)(const char *,const char*))0x009D0040)
    #define pSeek        ((int*(*)(FILE*,long,int))0x009D6A53)
    #define pRead        ((DWORD*(*)(void*,DWORD,DWORD,FILE*))0x009CFF5F)

    void* DakosmuJpegBuffer;
    DWORD DakosmuJpegBufferSize;

    void DakosmuDec()
    {
        SetCompleteHook(0xE9, 0x004FC7AC, &DakosmuOpenJpegBuffer1);
        SetCompleteHook(0xE9, 0x004FCB85, &DakosmuOpenJpegBuffer2);

        SetCompleteHook(0xE9, 0x004FCCBA, &DakosmuOpenTga);
        SetCompleteHook(0xE9, 0x0054C28C, &DakosmuOpenBmd);
        SetCompleteHook(0xE9, 0x005D68FF, &DakosmuOpenAtt);
        SetCompleteHook(0xE9, 0x005D6ECF, &DakosmuOpenMap);
        SetCompleteHook(0xE9, 0x005F34A8, &DakosmuOpenObj);

        SetCompleteHook(0xFF, 0x004FC6C7, &DakosmuOpenFile);
        SetCompleteHook(0xFF, 0x004FCC3E, &DakosmuOpenFile);
        SetCompleteHook(0xFF, 0x0054C21D, &DakosmuOpenFile);
        SetCompleteHook(0xFF, 0x005D6826, &DakosmuOpenFile);
        SetCompleteHook(0xFF, 0x005D6E64, &DakosmuOpenFile);
        SetCompleteHook(0xFF, 0x005F3402, &DakosmuOpenFile);
    }

    FILE* DakosmuOpenFile(const char* path, const char* f)
    {
        char encpath[MAX_PATH] = { 0 };

        wsprintf(encpath, "%s.enc", path);

        if (PathFileExists(encpath) != 0)
        {
            return pOpen(encpath, f);
        }

        return pOpen(path, f);
    }

    int DakosmuCheckFile(FILE* hFile)
    {
        BYTE Buffer[0x18] = { 0 };

        pSeek(hFile, 0, SEEK_SET);
        pRead(Buffer, 1, sizeof(Buffer), hFile);

        if (Buffer[0] != 'E' || Buffer[1] != 'N' || Buffer[2] != 'C')
        {
            return 0;
        }

        if (Buffer[3] == 1)
        {
            return 2;
        }

        return 1;
    }

    BOOL DakosmuDecryptFile(FILE* hFile, BYTE* Buffer, int Size, int Origin, int Offset)
    {
        if (DakosmuCheckFile(hFile) != 0)
        {
            pSeek(hFile, 0x18, SEEK_SET);
            pRead(Buffer, 1, Size, hFile);

            for (int n = 0; n < (Size - 0x18); n++)
            {
                Buffer[n] += (BYTE)(0xA0 ^ HIBYTE(n));
                Buffer[n] ^= (BYTE)(0xAB ^ LOBYTE(n));
            }

            return 1;
        }

        pSeek(hFile, Offset, SEEK_SET);
        pRead(Buffer, 1, Size, hFile);

        return 0;
    }

    __declspec(naked) void DakosmuOpenJpegBuffer1()
    {
        static DWORD Address1 = 0x004FC7C2;
        static DWORD Address2 = 0x004FC7C2;
        static DWORD Address3 = 0x009CFF5F;
        static DWORD Address4 = 0x009D6A53;
        static DWORD Address5 = 0x009D6CF0;
        static DWORD Address6 = 0x009D00C5;

        _asm
        {
            Push 2
            Push 0x18
            Mov Ecx, Dword Ptr Ss : [Ebp - 0x2C4]
            Push Ecx
            Call[Address4]
            Add Esp, 0x0C
            Mov Ecx, Dword Ptr Ss : [Ebp - 0x2C4]
            Push Ecx
            Call[Address5]
            Add Esp, 0x04
            Mov DakosmuJpegBufferSize, Eax
            Push 0
            Push 0x18
            Mov Ecx, Dword Ptr Ss : [Ebp - 0x2C4]
            Push Ecx
            Call[Address4]
            Add Esp, 0x0C
            Push DakosmuJpegBufferSize
            Call[Address6]
            Add Esp, 0x04
            Push 0x18
            Push 0
            Mov DakosmuJpegBuffer, Eax
            Push DakosmuJpegBufferSize
            Push DakosmuJpegBuffer
            Mov Ecx, Dword Ptr Ss : [Ebp - 0x2C4]
            Push Ecx
            Call[DakosmuDecryptFile]
            Add Esp, 0x14
            Test Eax, Eax
            Je EXIT
            Mov Edx, DakosmuJpegBufferSize
            Sub Edx, 0x18
            Push Edx
            Mov Eax, DakosmuJpegBuffer
            Add Eax, 0x18
            Push Eax
            Lea Ecx, Dword Ptr Ss : [Ebp - 0x2A4]
            Push Ecx
            Call[jpeg_mem_src]
            Add Esp, 0x0C
            Jmp Address1
            EXIT :
            Push DakosmuJpegBufferSize
                Push DakosmuJpegBuffer
                Lea Ecx, Dword Ptr Ss : [Ebp - 0x2A4]
                Push Ecx
                Call[jpeg_mem_src]
                Add Esp, 0x0C
                Jmp Address2
        }
    }

    __declspec(naked) void DakosmuOpenJpegBuffer2()
    {
        static DWORD Address1 = 0x004FCB8C;
        static DWORD Address2 = 0x009CF11A;

        _asm
        {
            Push DakosmuJpegBuffer
            Call[Address2]
            Add Esp, 0x04
            Mov DakosmuJpegBuffer, 0
            Mov Byte Ptr Ss : [Ebp - 0x325] , 1
            Jmp Address1
        }
    }

    __declspec(naked) void DakosmuOpenTga()
    {
        static DWORD Address1 = 0x004FCCD0;
        static DWORD Address2 = 0x004FCCD0;

        _asm
        {
            Push 0
            Push 0x18
            Mov Edx, Dword Ptr Ss : [Ebp - 0x34]
            Push Edx
            Mov Eax, Dword Ptr Ss : [Ebp - 0x44]
            Push Eax
            Mov Ecx, Dword Ptr Ss : [Ebp - 0x3C]
            Push Ecx
            Call[DakosmuDecryptFile]
            Add Esp, 0x14
            Jmp Address1
        }
    }

    __declspec(naked) void DakosmuOpenBmd()
    {
        static DWORD Address1 = 0x0054C2A2;
        static DWORD Address2 = 0x0054C2A2;

        _asm
        {
            Push 0
            Push 0x18
            Mov Edx, Dword Ptr Ss : [Ebp - 0x64]
            Push Edx
            Mov Eax, Dword Ptr Ss : [Ebp - 0x68]
            Push Eax
            Mov Ecx, Dword Ptr Ss : [Ebp - 0x18]
            Push Ecx
            Call[DakosmuDecryptFile]
            Add Esp, 0x14
            Jmp Address1
        }
    }

    __declspec(naked) void DakosmuOpenAtt()
    {
        static DWORD Address1 = 0x005D6915;
        static DWORD Address2 = 0x005D6915;

        _asm
        {
            Push 0
            Push 0x18
            Mov Edx, Dword Ptr Ss : [Ebp - 0x14]
            Push Edx
            Mov Eax, Dword Ptr Ss : [Ebp - 0x0C]
            Push Eax
            Mov Ecx, Dword Ptr Ss : [Ebp - 0x8]
            Push Ecx
            Call[DakosmuDecryptFile]
            Add Esp, 0x14
            Test Eax, Eax
            Je EXIT
            Mov Edx, Dword Ptr Ss : [Ebp - 0x14]
            Sub Edx, 0x18
            Mov Dword Ptr Ss : [Ebp - 0x14] , Edx
            Jmp Address1
            EXIT :
            Jmp Address2
        }
    }

    __declspec(naked) void DakosmuOpenMap()
    {
        static DWORD Address1 = 0x005D6EE5;
        static DWORD Address2 = 0x005D6EE5;

        _asm
        {
            Push 0
            Push 0x18
            Mov Edx, Dword Ptr Ss : [Ebp - 0x14]
            Push Edx
            Mov Eax, Dword Ptr Ss : [Ebp - 0x0C]
            Push Eax
            Mov Ecx, Dword Ptr Ss : [Ebp - 0x8]
            Push Ecx
            Call[DakosmuDecryptFile]
            Add Esp, 0x14
            Test Eax, Eax
            Je EXIT
            Mov Edx, Dword Ptr Ss : [Ebp - 0x14]
            Sub Edx, 0x18
            Mov Dword Ptr Ss : [Ebp - 0x14] , Edx
            Jmp Address1
            EXIT :
            Jmp Address2
        }
    }

    __declspec(naked) void DakosmuOpenObj()
    {
        static DWORD Address1 = 0x005F34BE;
        static DWORD Address2 = 0x005F34BE;

        _asm
        {
            Push 0
            Push 0x18
            Mov Edx, Dword Ptr Ss : [Ebp - 0x18]
            Push Edx
            Mov Eax, Dword Ptr Ss : [Ebp - 0x10]
            Push Eax
            Mov Ecx, Dword Ptr Ss : [Ebp - 0x8]
            Push Ecx
            Call[DakosmuDecryptFile]
            Add Esp, 0x14
            Test Eax, Eax
            Je EXIT
            Mov Edx, Dword Ptr Ss : [Ebp - 0x18]
            Sub Edx, 0x18
            Mov Dword Ptr Ss : [Ebp - 0x18] , Edx
            Jmp Address1
            EXIT :
            Jmp Address2
        }
    }


    DakosmuBytes.h


    #pragma once

    void DakosmuDec();
    FILE *DakosmuOpenFile(const char *path, const char *f);
    int DakosmuCheckFile(FILE *hFile);
    BOOL DakosmuDecryptFile(FILE *hFile, BYTE *Buffer, int Size, int Origin, int Offset);
    void DakosmuOpenJpegBuffer1();
    void DakosmuOpenJpegBuffer2();
    void DakosmuOpenTga();
    void DakosmuOpenBmd();
    void DakosmuOpenAtt();
    void DakosmuOpenMap();
    void DakosmuOpenObj();


    Dakosmudefine.h


    #pragma once
    //WideScreem
    #define DakosmuCoorX                *(DWORD *)(*(DWORD *)0x7BC4F04 + 0xAC)
    #define DakosmuCoorY                *(DWORD *)(*(DWORD *)0x7BC4F04 + 0xB0)
    #define DakosmuSupremo                    ((void(__cdecl*)())0x00637A30)
    #define DakosmuSetFont                ((int(__thiscall*)(LPVOID This, int a2)) 0x420120)
    #define DakosmuFontBold                *(HGDIOBJ*)0x00E8C58C
    #define DakosmuAlphaTest                        ((void(__cdecl*)(BYTE Mode)) 0x635FD0)
    #define DakosmuBitmap                ((void(__cdecl*)(int ImageID, float PosX, float PosY, float Width, float Height, float Arg6, float Arg7, float ScaleX, float ScaleY, bool ScaleSize, bool ScalePosition, float ScaleAlpha)) 0x00637C60)
    #define DakosmuMouseOver                ((bool(__cdecl*)(int a1, int a2, int a3, int a4)) 0x00790B10)
    #define DakosmuBuffer33                            ((signed int(__cdecl*)(int a1, int a2, int a3)) 0x006D6C20)
    #define Dakosmu_7BC4F04                        *(DWORD*)0x7BC4F04
    #define Dakosmu_8128AC8                        *(DWORD*)0x8128AC8
    #define Dakosmu_8793384                        *(BYTE*)0x8793384
    #define Dakosmu_8793380                        *(BYTE*)0x8793380
    #define Dakosmu_8128ABC                        *(DWORD*)0x8128ABC
    #define DakosmuSkillLine                    ((void(__thiscall*)(int a1, float a5, int a6, int a7, int a8, int a9)) 0x00772EA0)
    #define DakosmuWidth                *(GLsizei*)0x0E61E58
    #define DakosmuHeight                *(GLsizei*)0x0E61E5C
    //WideScreem


    import.cpp


    #include "stdafx.h"
    #include "Import.h"
    #include "DakosmuWide.h"
    #include "DakosmuS6.h"
    #include "DakosmuBytes.h"

    signed int sub_9CEBF0_2(double a1)
    {
        return (signed int)a1;
    }

    bool pCheckMouseOverMiddle(int x, int y, int w, int h)
    {
        int Addr = (pWinWidth / pWinHeightReal / 2) - 320;
        return pCheckMouseOver(x + Addr, y, w, h);
    }

    void RenderBitmapMiddle(int ImageID, float PosX, float PosY, float Width, float Height, float Arg6, float Arg7, float ScaleX, float ScaleY, bool ScaleSize, bool ScalePosition, float ScaleAlpha)
    {
        int Addr = (pWinWidth / pWinHeightReal / 2) - 320;

        RenderBitmap(ImageID, PosX + Addr, PosY, Width, Height, Arg6, Arg7, ScaleX, ScaleY, ScaleSize, ScalePosition, ScaleAlpha);
    }

    void RenderBitmapRight(int ImageID, float PosX, float PosY, float Width, float Height, float Arg6, float Arg7, float ScaleX, float ScaleY, bool ScaleSize, bool ScalePosition, float ScaleAlpha)
    {
        int Addr = pWinWidth / pWinHeightReal - 640;

        RenderBitmap(ImageID, PosX + Addr, PosY, Width, Height, Arg6, Arg7, ScaleX, ScaleY, ScaleSize, ScalePosition, ScaleAlpha);
    }

    void CRenderImageMiddle(int a1, float a2, float a3, float a4, float a5)
    {
        int Addr = (pWinWidth / pWinHeightReal / 2) - 320;

        pDrawGUI(a1, a2 + Addr, a3, a4, a5);
    }

    void CRenderImageRight(int a1, float a2, float a3, float a4, float a5)
    {
        int Addr = pWinWidth / pWinHeightReal - 640;

        pDrawGUI(a1, a2 + Addr, a3, a4, a5);
    }

    void BarFormMiddle(float PosX, float PosY, float Width, float Height, float Arg5, int Arg6)
    {
        int Addr = (pWinWidth / pWinHeightReal / 2) - 320;

        pDrawBarForm(PosX + Addr, PosY, Width, Height, Arg5, Arg6);
    }

    void BarFormRight(float PosX, float PosY, float Width, float Height, float Arg5, int Arg6)
    {
        int Addr = pWinWidth / pWinHeightReal - 640;

        pDrawBarForm(PosX + Addr, PosY, Width, Height, Arg5, Arg6);
    }

    void pDrawButtonMiddle(DWORD ModelID, float X, float Y, float W, float H, float CurrentX, float CurrentY)
    {
        int Addr = (pWinWidth / pWinHeightReal / 2) - 320;
        pDrawButton(ModelID, X + Addr, Y, W, H, CurrentX, CurrentY);
    }


    double sub_636450_2(float a1)
    {
        return (float)((double)(unsigned int)pWinHeight * a1 / 480.0);
    }


    stdafx.h
    #define Wide_Screen           1


    DakosmuS6.cpp



    DakosmuS6.h



    DakosmuWide.cpp



    DakosmuWide.h




    Creditos
    Asura por el source
    Dakosmu por la guia
    onlinezajzaj por el video guia



    www.muserverfiles.com - En Lorencia

    🡱 🡳