Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate

Autor Topic: MuEMU Font size problem  (Visto 358 veces)

0 Miembros and 1 Guest are viewing this topic.

Offline fukpim on: June 01, 2019, 01:36:24 PM

  • 0 puntos por ventas
  • *
  • Rank: Usuario activo
  • Posts: 61
  • Gracias recibida: 501
  • cn
Can anyone tell me the offset of the font size of MuEMU?

I use OD found :

Code: [Select]
004D27CB   . /EB 2E         jmp short main.004D27FB
004D27CD   > \C705 80031C08>mov dword ptr ds:[0x81C0380],0xC //640x480?
004D27D7   . /EB 22         jmp short main.004D27FB
004D27D9   > \C705 80031C08>mov dword ptr ds:[0x81C0380],0xD  //800x600
004D27E3   . /EB 16         jmp short main.004D27FB
004D27E5   > \C705 80031C08>mov dword ptr ds:[0x81C0380],0xE  //1024
004D27EF   . /EB 0A         jmp short main.004D27FB
004D27F1   > \C705 80031C08>mov dword ptr ds:[0x81C0380],0xF //1280
004D27FB   > \C785 1CFFFFFF>mov dword ptr ss:[ebp-0xE4],0xD
But I tried to modify 0xC=0xF or 0xD=0xF to be invalid
And I found that the font size of the login interface is not here.
Can who give me any guidance?
« Ultima edicion: June 01, 2019, 02:37:59 PM by fukpim »

Offline fukpim #1 on: June 03, 2019, 04:35:18 PM

  • 0 puntos por ventas
  • *
  • Rank: Usuario activo
  • Posts: 61
  • Gracias recibida: 501
  • cn

Offline RinOv #2 on: June 03, 2019, 07:33:56 PM

  • C++ Coder
  • 0 puntos por ventas
  • *
  • Rank: Experto
  • Posts: 151
  • Gracias recibida: 863
  • ru
Aqui tienes los offset del s6

Code: [Select]
#define Offset_CreateFontA1 0x004060D0
#define Offset_CreateFontA2 0x004D2882
#define Offset_CreateFontA3 0x004D28EB
#define Offset_CreateFontA4 0x004D2957
#define Offset_CreateFontA5 0x004D29C1

puedes usar el mismo custom de tt o zteam con estos Offset y funciona bien
RinOv Group

Offline fukpim #3 on: June 03, 2019, 10:25:42 PM

  • 0 puntos por ventas
  • *
  • Rank: Usuario activo
  • Posts: 61
  • Gracias recibida: 501
  • cn
Aqui tienes los offset del s6

Code: [Select]
#define Offset_CreateFontA1 0x004060D0
#define Offset_CreateFontA2 0x004D2882
#define Offset_CreateFontA3 0x004D28EB
#define Offset_CreateFontA4 0x004D2957
#define Offset_CreateFontA5 0x004D29C1

puedes usar el mismo custom de tt o zteam con estos Offset y funciona bien

I tried it as if it didn't work.
look my code
.h
Code: [Select]
//---------------------------------------------------------------------------
#pragma once
//---------------------------------------------------------------------------
#define Offset_CreateFontA1 0x004060D0
#define Offset_CreateFontA2 0x004D2882
#define Offset_CreateFontA3 0x004D28EB
#define Offset_CreateFontA4 0x004D2957
#define Offset_CreateFontA5 0x004D29C1
//---------------------------------------------------------------------------
class Font{
public:   
//--   
Font(){};   
~Font(){};   
//--   
void Load();   
HFONT LoadNewFont();   
//--
}; extern Font gFont;
//---------------------------------------------------------------------------
.cpp
Code: [Select]
//---------------------------------------------------------------------------
#include "stdafx.h"
#include "Util.h"
#include "Font.h"
//---------------------------------------------------------------------------
Font gFont;
//---------------------------------------------------------------------------
char MyFontFaceName[100];char sValue[99];
//--
int Bold = GetPrivateProfileIntA ("MainConfig", "Main_Font_Bold", 0, ".\\Font.ini");
int Height = GetPrivateProfileIntA ("MainConfig", "Main_Font_Height", 13, ".\\Font.ini");
int Italic = GetPrivateProfileIntA ("MainConfig", "Main_Font_Italic", 0, ".\\Font.ini");
int Unicode = GetPrivateProfileIntA ("MainConfig", "Main_Font_Unicode", 1, ".\\Font.ini");
//--
int Width = GetPrivateProfileIntA ("MainConfig", "Main_Font_Width", 0, ".\\Font.ini");
int UnderLine = GetPrivateProfileIntA ("MainConfig", "Main_Font_Underline", 0, ".\\Font.ini");
int Quality = GetPrivateProfileIntA ("MainConfig", "Main_Font_Quality", 3, ".\\Font.ini");
int StrikeOut = GetPrivateProfileIntA ("MainConfig", "Main_Font_StrikeOut", 0, ".\\Font.ini");
//---------------------------------------------------------------------------
void Font::Load(){
GetPrivateProfileStringA("MainConfig", "Main_Font_Name", "Tahoma", MyFontFaceName, 100, ".\\Font.ini");
//--   
SetCompleteHook(0xE8, Offset_CreateFontA1, &Font::LoadNewFont);
SetCompleteHook(0xE8, Offset_CreateFontA2, &Font::LoadNewFont);
SetCompleteHook(0xE8, Offset_CreateFontA3, &Font::LoadNewFont);
SetCompleteHook(0xE8, Offset_CreateFontA4, &Font::LoadNewFont);
SetCompleteHook(0xE8, Offset_CreateFontA5, &Font::LoadNewFont);
//--   
SetByte((Offset_CreateFontA1 + 5), 0x90);    SetByte((Offset_CreateFontA2 + 5), 0x90);
SetByte((Offset_CreateFontA3 + 5), 0x90);    SetByte((Offset_CreateFontA4 + 5), 0x90);
SetByte((Offset_CreateFontA5 + 5), 0x90);
}
//---------------------------------------------------------------------------
HFONT Font::LoadNewFont(){   
HFONT MyFont;
//-- 
if (Bold == 0)    {
if (Unicode == 1)       
{         
MyFont = CreateFontA(Height, Width, 0, 0, 400, Italic, UnderLine, StrikeOut, 0x01, 0, 0, Quality, 0, MyFontFaceName);
}       
else   
{           
MyFont = CreateFontA(Height, Width, 0, 0, 400, Italic, UnderLine, StrikeOut, 0x0, 0, 0, Quality, 0, MyFontFaceName);   
}   

else 
{       
if (Unicode == 1)       
{         
MyFont = CreateFontA(Height, Width, 0, 0, 700, Italic, UnderLine, StrikeOut, 0x01, 0, 0, Quality, 0, MyFontFaceName); 
}     
else     
{     
MyFont = CreateFontA(Height, Width, 0, 0, 700, Italic, UnderLine, StrikeOut, 0x0, 0, 0, Quality, 0, MyFontFaceName);     


return MyFont;
}
//---------------------------------------------------------------------------

font.ini
Code: [Select]
;===================
[MainConfig]
Main_Font_Name = Tahoma
MSMain_Font_Bold = 0
Main_Font_Height = 13
Main_Font_Italic = 0
Main_Font_Unicode = 1
Main_Font_Width = 0
Main_Font_Underline = 0
Main_Font_Quality = 3
Main_Font_StrikeOut = 0

Offline RinOv #4 on: June 04, 2019, 05:31:41 PM

  • C++ Coder
  • 0 puntos por ventas
  • *
  • Rank: Experto
  • Posts: 151
  • Gracias recibida: 863
  • ru
te dejo mi Font que funciona, en muemu s6 y en s4, con otros offset claro xd  (si no te funciona es por que usas cosas del main 1.04d mal adaptadas.)

.h
Code: [Select]
#pragma once
//#include "stdafx.h"

#define Offset_CreateFontA1 0x004060D0
#define Offset_CreateFontA2 0x004D2882
#define Offset_CreateFontA3 0x004D28EB // S6
#define Offset_CreateFontA4 0x004D2957
#define Offset_CreateFontA5 0x004D29C1
//---------------------------------------------------------------------------
class Font
{
public:
    //--
    Font(){};
    ~Font(){};
    //--
    void Load();
    HFONT LoadNewFont();


    //--
}; extern Font gFont;
#endif

.cpp
Code: [Select]
#include "stdafx.h"
#include "NewFont.h"
#include "Util.h"

//---------------------------------------------------------------------------
Font gFont;
//---------------------------------------------------------------------------
char MyFontFaceName[100];
char sValue[99];
//--
int Bold = GetPrivateProfileIntA("Font", "Main_Font_Bold", 0, "Data\\Custom\\Font.cfg");
int Height = GetPrivateProfileIntA("Font", "Main_Font_Height", 13, "Data\\Custom\\Font.cfg");
int Italic = GetPrivateProfileIntA("Font", "Main_Font_Italic", 0, "Data\\Custom\\Font.cfg");
int Unicode = GetPrivateProfileIntA("Font", "Main_Font_Unicode", 1, "Data\\Custom\\Font.cfg");
//--
int Width = GetPrivateProfileIntA("Font", "Main_Font_Width", 0, "Data\\Custom\\Font.cfg");
int UnderLine = GetPrivateProfileIntA("Font", "Main_Font_Underline", 0, "Data\\Custom\\Font.cfg");
int Quality = GetPrivateProfileIntA("Font", "Main_Font_Quality", 3, "Data\\Custom\\Font.cfg");
int StrikeOut = GetPrivateProfileIntA("Font", "Main_Font_StrikeOut", 0, "Data\\Custom\\Font.cfg");
//---------------------------------------------------------------------------
void Font::Load()
{
    GetPrivateProfileStringA("Font", "Main_Font_Name", "Tahoma", MyFontFaceName, 100, "Data\\Custom\\Font.cfg");
    //--
    SetCompleteHook(0xE8, Offset_CreateFontA1, &Font::LoadNewFont);
    SetCompleteHook(0xE8, Offset_CreateFontA2, &Font::LoadNewFont);
    SetCompleteHook(0xE8, Offset_CreateFontA3, &Font::LoadNewFont);
    SetCompleteHook(0xE8, Offset_CreateFontA4, &Font::LoadNewFont);
    SetCompleteHook(0xE8, Offset_CreateFontA5, &Font::LoadNewFont);
    //--
    SetByte((Offset_CreateFontA1 + 5), 0x90);
    SetByte((Offset_CreateFontA2 + 5), 0x90);
    SetByte((Offset_CreateFontA3 + 5), 0x90);
    SetByte((Offset_CreateFontA4 + 5), 0x90);
    SetByte((Offset_CreateFontA5 + 5), 0x90);
}
//---------------------------------------------------------------------------
HFONT Font::LoadNewFont()
{
    HFONT MyFont;
    //--
    if (Bold == 0)
    {
        if (Unicode == 1)
        {
            MyFont = CreateFontA(Height, Width, 0, 0, 400, Italic, UnderLine, StrikeOut, 0x01, 0, 0, Quality, 0, MyFontFaceName);
        }
        else
        {
            MyFont = CreateFontA(Height, Width, 0, 0, 400, Italic, UnderLine, StrikeOut, 0x0, 0, 0, Quality, 0, MyFontFaceName);
        }
    }
    else
    {
        if (Unicode == 1)
        {
            MyFont = CreateFontA(Height, Width, 0, 0, 700, Italic, UnderLine, StrikeOut, 0x01, 0, 0, Quality, 0, MyFontFaceName);
        }
        else
        {
            MyFont = CreateFontA(Height, Width, 0, 0, 700, Italic, UnderLine, StrikeOut, 0x0, 0, 0, Quality, 0, MyFontFaceName);
        }
    }


    return MyFont;
}

.cfg
Code: [Select]
[Font]
Main_Font_Bold = 1
Main_Font_Height = 13
Main_Font_Italic = 0
Main_Font_Unicode = 1
Main_Font_Width = 0
Main_Font_Underline = 0
Main_Font_Quality = 3
Main_Font_StrikeOut = 0
Main_Font_Name = Tahoma
MyFontFaceName = 100

RinOv Group

Offline fukpim #5 on: June 04, 2019, 10:37:52 PM

  • 0 puntos por ventas
  • *
  • Rank: Usuario activo
  • Posts: 61
  • Gracias recibida: 501
  • cn
te dejo mi Font que funciona, en muemu s6 y en s4, con otros offset claro xd  (si no te funciona es por que usas cosas del main 1.04d mal adaptadas.)

.h
Code: [Select]
#pragma once
//#include "stdafx.h"

#define Offset_CreateFontA1 0x004060D0
#define Offset_CreateFontA2 0x004D2882
#define Offset_CreateFontA3 0x004D28EB // S6
#define Offset_CreateFontA4 0x004D2957
#define Offset_CreateFontA5 0x004D29C1
//---------------------------------------------------------------------------
class Font
{
public:
    //--
    Font(){};
    ~Font(){};
    //--
    void Load();
    HFONT LoadNewFont();


    //--
}; extern Font gFont;
#endif

.cpp
Code: [Select]
#include "stdafx.h"
#include "NewFont.h"
#include "Util.h"

//---------------------------------------------------------------------------
Font gFont;
//---------------------------------------------------------------------------
char MyFontFaceName[100];
char sValue[99];
//--
int Bold = GetPrivateProfileIntA("Font", "Main_Font_Bold", 0, "Data\\Custom\\Font.cfg");
int Height = GetPrivateProfileIntA("Font", "Main_Font_Height", 13, "Data\\Custom\\Font.cfg");
int Italic = GetPrivateProfileIntA("Font", "Main_Font_Italic", 0, "Data\\Custom\\Font.cfg");
int Unicode = GetPrivateProfileIntA("Font", "Main_Font_Unicode", 1, "Data\\Custom\\Font.cfg");
//--
int Width = GetPrivateProfileIntA("Font", "Main_Font_Width", 0, "Data\\Custom\\Font.cfg");
int UnderLine = GetPrivateProfileIntA("Font", "Main_Font_Underline", 0, "Data\\Custom\\Font.cfg");
int Quality = GetPrivateProfileIntA("Font", "Main_Font_Quality", 3, "Data\\Custom\\Font.cfg");
int StrikeOut = GetPrivateProfileIntA("Font", "Main_Font_StrikeOut", 0, "Data\\Custom\\Font.cfg");
//---------------------------------------------------------------------------
void Font::Load()
{
    GetPrivateProfileStringA("Font", "Main_Font_Name", "Tahoma", MyFontFaceName, 100, "Data\\Custom\\Font.cfg");
    //--
    SetCompleteHook(0xE8, Offset_CreateFontA1, &Font::LoadNewFont);
    SetCompleteHook(0xE8, Offset_CreateFontA2, &Font::LoadNewFont);
    SetCompleteHook(0xE8, Offset_CreateFontA3, &Font::LoadNewFont);
    SetCompleteHook(0xE8, Offset_CreateFontA4, &Font::LoadNewFont);
    SetCompleteHook(0xE8, Offset_CreateFontA5, &Font::LoadNewFont);
    //--
    SetByte((Offset_CreateFontA1 + 5), 0x90);
    SetByte((Offset_CreateFontA2 + 5), 0x90);
    SetByte((Offset_CreateFontA3 + 5), 0x90);
    SetByte((Offset_CreateFontA4 + 5), 0x90);
    SetByte((Offset_CreateFontA5 + 5), 0x90);
}
//---------------------------------------------------------------------------
HFONT Font::LoadNewFont()
{
    HFONT MyFont;
    //--
    if (Bold == 0)
    {
        if (Unicode == 1)
        {
            MyFont = CreateFontA(Height, Width, 0, 0, 400, Italic, UnderLine, StrikeOut, 0x01, 0, 0, Quality, 0, MyFontFaceName);
        }
        else
        {
            MyFont = CreateFontA(Height, Width, 0, 0, 400, Italic, UnderLine, StrikeOut, 0x0, 0, 0, Quality, 0, MyFontFaceName);
        }
    }
    else
    {
        if (Unicode == 1)
        {
            MyFont = CreateFontA(Height, Width, 0, 0, 700, Italic, UnderLine, StrikeOut, 0x01, 0, 0, Quality, 0, MyFontFaceName);
        }
        else
        {
            MyFont = CreateFontA(Height, Width, 0, 0, 700, Italic, UnderLine, StrikeOut, 0x0, 0, 0, Quality, 0, MyFontFaceName);
        }
    }


    return MyFont;
}

.cfg
Code: [Select]
[Font]
Main_Font_Bold = 1
Main_Font_Height = 13
Main_Font_Italic = 0
Main_Font_Unicode = 1
Main_Font_Width = 0
Main_Font_Underline = 0
Main_Font_Quality = 3
Main_Font_StrikeOut = 0
Main_Font_Name = Tahoma
MyFontFaceName = 100

Yes, he doesn't work, I use this source
http://tuservermu.com.ve/index.php?topic=6417.0

I think this source code is valid, main 1.04E,but it might be a hook that affects it. I can't find out where the problem is. . :( :(
* Can you help me find the hook that caused it to be wrong?

Offline RinOv #6 on: June 05, 2019, 11:23:54 AM

  • C++ Coder
  • 0 puntos por ventas
  • *
  • Rank: Experto
  • Posts: 151
  • Gracias recibida: 863
  • ru
deberias dejar que files estas usando, que source, si es tt, los offset son para main 1.04D, la source de Arkania que enviaste y el source de Font que te envie es de 1.04e xD
RinOv Group

Offline fukpim #7 on: June 05, 2019, 07:22:02 PM

  • 0 puntos por ventas
  • *
  • Rank: Usuario activo
  • Posts: 61
  • Gracias recibida: 501
  • cn
deberias dejar que files estas usando, que source, si es tt, los offset son para main 1.04D, la source de Arkania que enviaste y el source de Font que te envie es de 1.04e xD

Yes, I use this Arkania source, also use your font source code, but the Game has not changed.... This makes me unable to understand

Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate

 

Related Topics

  Subject / Started by Replies Last post
3 Replies
618 Views
Last post September 25, 2017, 09:48:15 AM
by Marote
2 Replies
740 Views
Last post May 23, 2018, 01:00:57 AM
by ZabiinoOo
4 Replies
530 Views
Last post May 27, 2018, 11:35:09 AM
by JoJoGy
12 Replies
435 Views
Last post March 26, 2019, 07:27:15 PM
by hiser
1 Replies
122 Views
Last post July 04, 2019, 07:35:06 AM
by JoJoGy