Menu option + Change Resolution + FontHeight

Publicado por Dakosmu, Mar 07, 2025, 07:01 PM

Tema anterior - Siguiente tema

Dakosmu

Menu option + Change Resolution + FontHeight


Como dice el título, hoy les traigo el panel de opciones más el cambio de resoluciones y FontHeight. Aclaro que no pude terminar el sistema de resoluciones, le falta un par de detalles y espero que alguien con más conocimiento que yo lo termine y lo comparta para toda la comunidad. Las fuentes están 100%. Espero sea de su agrado y ayuden a terminarlo...

Los visitantes no pueden visualizar imágenes en los mensajes, por favor Regístrate o Inicia Sesión

Descargar archivo

Central.cpp

DWORD RESOLUTION=pWinWidth;
#define sub_630BC0  ((bool(*)()) 0x630BC0)
void ChangeSize(int a1, int a2)
{
    int v2; // esi@1
    DWORD v3; // edi@1
    int v4; // eax@2
    int v5; // eax@2
    DWORD *v6; // esi@2
    int v8; // eax@2
    int v7; // eax@2

    v2 = a2;
    v3 = a1;
    if (pMUIsLoaded)
    {
        pWinWidth = a1;
        pWinHeight = a2;
        pWinWidthReal = (double)(signed int)a1 / 640.0;
        pWinHeightReal = (double)a2 / 480.0;
        SetWindowPos(pGameWindow, 0, 0, 0, a1, a2 + 30, 0x116u);
        sub_630BC0();
        sub_596AC0(1);
        v4 = sub_482B70();
        *(DWORD *)(v4 + 40) = v3;
        *(DWORD *)(v4 + 44) = v2;
        v5 = sub_407B20();
        *(DWORD *)(v5 + 40) = v3;
        *(DWORD *)(v5 + 44) = v2;
        v6 = (DWORD *)pWindowThis();
        sub_785870(v6[3], *v6, v6[4], 0, 382);
        v7 = GetInstance();
        v8 = sub_861AC0(v7);
        sub_7F0D40(v8);
        sub_7F0C80(v6[78], *v6, 450, 0);
        dword_81C0380=FontHeight; // fuente
        sub_830B70(v6[45], *v6, 1, 1);
        SetFloat((PVOID)(0x00D2C848), 2000.0);
        SetFloat((PVOID)(0x00D2C898), 1000.0);
    }
}

void RegeditData(BYTE data)
{
    HKEY hKey;
    DWORD dwType, dwSize;
    DWORD buffer;
    LONG result;

    RegOpenKeyA(HKEY_CURRENT_USER, "SOFTWARE\\Webzen\\Mu\\Config", &hKey);
    DWORD value=data;
    ChangeResolution=data;
    RegSetValueExA(hKey, TEXT("Resolution"), 0, REG_DWORD, (const BYTE*)&value, REG_DWORD);
    RegCloseKey(hKey);
    switch (data)
    {
        case 0:
            WritePrivateProfileStringA("Interface", "ChangeResolution", "0", ".\\Settings.ini");
            break;
        case 1:
            WritePrivateProfileStringA("Interface", "ChangeResolution", "1", ".\\Settings.ini");
            break;
        case 2:
            WritePrivateProfileStringA("Interface", "ChangeResolution", "2", ".\\Settings.ini");
            break;
        case 3:
            WritePrivateProfileStringA("Interface", "ChangeResolution", "3", ".\\Settings.ini");
            break;
        case 4:
            WritePrivateProfileStringA("Interface", "ChangeResolution", "4", ".\\Settings.ini");
            break;
        case 5:
            WritePrivateProfileStringA("Interface", "ChangeResolution", "5", ".\\Settings.ini");
            break;
        case 6:
            WritePrivateProfileStringA("Interface", "ChangeResolution", "6", ".\\Settings.ini");
            break;
        case 7:
            WritePrivateProfileStringA("Interface", "ChangeResolution", "7", ".\\Settings.ini");
            break;
        case 8:
            WritePrivateProfileStringA("Interface", "ChangeResolution", "8", ".\\Settings.ini");
            break;
        case 9:
            WritePrivateProfileStringA("Interface", "ChangeResolution", "9", ".\\Settings.ini");
            break;
    }
}

// buscar void EventPanelOption() y reemplazar
void EventPanelOption()
{
    float x; // [sp+2Ch] [bp-8h]@1
    float y; // ST34_4@1
    int This; // [sp+74h] [bp-4h]@1

    This = *(DWORD *)(GetInstance() + 160);
    x = (double)*(signed int *)(This + 16);
    y = (double)*(signed int *)(This + 20);

    // OPCIONES LADO IZQUIERDO
    // OPCIONES LADO DERECHO
    if (gCentral.EventPushCursor(x + 140, y + 37, 15, 15)) {
        HPMonster = !HPMonster;
        if (HPMonster != 0)
            WritePrivateProfileStringA("Setting", "HPMonster", "1", "./Settings.ini");
        else
            WritePrivateProfileStringA("Setting", "HPMonster", "0", "./Settings.ini");
    }
    // ...
}

Créditos: JavixFer por el trabajo de las resoluciones y FontHeight.

Bon Dia

🡱 🡳