OkMuOnline


NowaHosting


AlphaServers


Resultados 1 a 6 de 6
  1. #1
    Fundador PerfectZone Mentor's Avatar




    Data de Ingresso
    Jun 2022
    Posts
    286
    Thanks Thanks Given 
    492
    Thanks Thanks Received 
    1,723
    Thanked in
    119 Posts
    Mentioned
    20 Post(s)
    Humor
    Twisted
    País
    Brazil

    Source WideScreen 2024 By Dakosmu

    Pessoal , estou postando essa source que foi compartilhada pelo dakosmu que é o widescreem para season6, inclusive adicionei ela ao projeto PZ Season6, mais requer alguns ajustes...







    Interface.cpp Adicione:
    Código:
    #include "DakosmuS6.h"
    Agora busque por:
    Código:
    void Interface::LoadImages()
    E adicione:
    Código:
        //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
    Baixe os arquivos .OZT, pois será necessário para você adicionar na pasta Data\Custom\DakosmuWide do seu cliente


    Dando continuidade no Interface.cpp busque por:
    Código:
    pLoadSomeForm();
    E adicione:
    Código:
    DakosmuInterfaceNew.Load_Image(); //Las Imagenes Wide_1,2,3,4,5
    Agora abra o Main.cpp e adicione:
    Código:
    #include "DakosmuWide.h"
    #include "DakosmuS6.h"
    Busque por:
    Código:
    extern "C" _declspec(dllexport) void EntryProc() // OK
    E adicione:
    Código:
    //WideScreen
        DakosmuWide1.InitFrameOpenGL();
        DakosmuInterfaceNew.Load();
        //WideScreen
    Próxima é criar pasta e diretórios conforme imagem abaixo:



    DakosmuBytes.cpp
    Código:
    #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
    Código:
    #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
    Código:
    #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
    Código:
    #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 adicione:
    Código:
    #define Wide_Screen           1
    Faça o download desse arquivo e adicione ele dentro da pasta Util conforme mostra na print:


    deve ser colocado dentro da pasta Util de suas fontes

    Você também deve verificar a rota
    #include "../../Util/libjpeg/jpeglib.h"

    verifique o caminho ../../
    DakosmuS6.cpp


    DakosmuS6.h


    DakosmuWide.cpp


    DakosmuWide.h


    Créditos
    Asura pela fonte
    Dakosmu pelo guia
    onlinezajzaj para o guia de vídeo
    Last edited by Mentor; 02-20-2024 at 02:11 AM.

  2. The Following 15 Users Say Thank You to Mentor For This Useful Post:


  3. #2
    Membro HR.'s Avatar

    Data de Ingresso
    Jul 2022
    Posts
    17
    Thanks Thanks Given 
    71
    Thanks Thanks Received 
    117
    Thanked in
    6 Posts
    Mentioned
    0 Post(s)
    País
    Brazil


    https://imgur.com/ni8QM7J

    Deu esse erro no seu ?

  4. #3
    Fundador PerfectZone Mentor's Avatar




    Data de Ingresso
    Jun 2022
    Posts
    286
    Thanks Thanks Given 
    492
    Thanks Thanks Received 
    1,723
    Thanked in
    119 Posts
    Mentioned
    20 Post(s)
    Humor
    Twisted
    País
    Brazil
    Citação Originally Posted by HR. Ver Post


    https://imgur.com/ni8QM7J

    Deu esse erro no seu ?
    Sim, no tópico inicial tem link do arquivo e print mostrando a onde você deve colocar o arquivo necessário.

  5. #4
    Membro HR.'s Avatar

    Data de Ingresso
    Jul 2022
    Posts
    17
    Thanks Thanks Given 
    71
    Thanks Thanks Received 
    117
    Thanked in
    6 Posts
    Mentioned
    0 Post(s)
    País
    Brazil
    Citação Originally Posted by Mentor Ver Post
    Sim, no tópico inicial tem link do arquivo e print mostrando a onde você deve colocar o arquivo necessário.
    Já estava adicionado os arquivos na pasta Util

  6. #5
    Fundador PerfectZone Mentor's Avatar




    Data de Ingresso
    Jun 2022
    Posts
    286
    Thanks Thanks Given 
    492
    Thanks Thanks Received 
    1,723
    Thanked in
    119 Posts
    Mentioned
    20 Post(s)
    Humor
    Twisted
    País
    Brazil
    Citação Originally Posted by HR. Ver Post
    Já estava adicionado os arquivos na pasta Util
    Mas você verificou se essa linha está chamando o arquivo necessário?
    Código:
    #include "../../Util/libjpeg/jpeglib.h"
    Porque a depender da quantidade de subpasta que sua source esteja essa parte talvez seja necessário acrescentar mais ../ por exemplo: #include "../../../../Util/libjpeg/jpeglib.h"
    No meu caso deixei assim e ficou ok



    Edit

    Conseguir deixar as janelas custom do meu projeto centralizada, mas estou precisando centralizar outras coisas como as mensagens de avisos em geral, o nome dos mapas, tela de loading, e o menu de opções quando apertamos a teccla esc.








    Para isso, fui nas funções de interface das janelas, e mudei a linha


    para essa :


    Pelo menos foi a maneira que encontrei para que essas janelas ficassem centralizadas em todas as resoluções do meu projeto.
    Last edited by Mentor; 02-21-2024 at 02:23 AM.

  7. The Following 12 Users Say Thank You to Mentor For This Useful Post:


  8. #6
    Membro Farias's Avatar

    Data de Ingresso
    Jul 2022
    Posts
    125
    Thanks Thanks Given 
    111
    Thanks Thanks Received 
    18
    Thanked in
    17 Posts
    Mentioned
    2 Post(s)
    País
    Brazil
    Top, isso que chamo de tutorial, passo a passo, se todos fizessem isso, ajudava muitos !!!

Permissões de Postagem

  • Você não pode iniciar novos tópicos
  • You may not post Resposta(s)
  • Você não pode enviar anexos
  • Você não pode editar suas mensagens
  •