Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate

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

0 Miembros and 1 Guest are viewing this topic.

Offline fukpim Posteado: June 01, 2019, 02:36:24 PM | Modificado: June 01, 2019, 03:37:59 PM by fukpim

  • 0 puntos por ventas
  • *
  • Rank: Dedicado
  • Posts: 59
  • Gracias recibida: 973
  • 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?


Offline fukpim #1 Posteado: June 03, 2019, 05:35:18 PM

  • 0 puntos por ventas
  • *
  • Rank: Dedicado
  • Posts: 59
  • Gracias recibida: 973
  • cn

Offline RinOv #2 Posteado: June 03, 2019, 08:33:56 PM

  • C++ Coder
  • 0 puntos por ventas
  • *
  • Rank: Liga mayor
  • Posts: 181
  • Gracias recibida: 1990
  • 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 Posteado: June 03, 2019, 11:25:42 PM

  • 0 puntos por ventas
  • *
  • Rank: Dedicado
  • Posts: 59
  • Gracias recibida: 973
  • 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 Posteado: June 04, 2019, 06:31:41 PM

  • C++ Coder
  • 0 puntos por ventas
  • *
  • Rank: Liga mayor
  • Posts: 181
  • Gracias recibida: 1990
  • 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 Posteado: June 04, 2019, 11:37:52 PM

  • 0 puntos por ventas
  • *
  • Rank: Dedicado
  • Posts: 59
  • Gracias recibida: 973
  • 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 Posteado: June 05, 2019, 12:23:54 PM

  • C++ Coder
  • 0 puntos por ventas
  • *
  • Rank: Liga mayor
  • Posts: 181
  • Gracias recibida: 1990
  • 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 Posteado: June 05, 2019, 08:22:02 PM

  • 0 puntos por ventas
  • *
  • Rank: Dedicado
  • Posts: 59
  • Gracias recibida: 973
  • 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


Offline modaxd #8 Posteado: February 16, 2020, 09:06:19 AM

  • 0 puntos por ventas
  • *
  • Rank: Sup. destacado
  • Posts: 118
  • Gracias recibida: 1035
  • es
Es confuso por que usa el source up13 de louis y tampoco me funciona tengo ya 2 dias en eso y nada como que no lo activara o.o


Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate


 

Related Topics

  Subject / Started by Replies Last post
3 Replies
1625 Views
Last post September 25, 2017, 10:48:15 AM
by Marote
4 Replies
1500 Views
Last post May 27, 2018, 12:35:09 PM
by JoJoGy
1 Replies
732 Views
Last post July 04, 2019, 08:35:06 AM
by JoJoGy
2 Replies
925 Views
Last post April 07, 2020, 03:21:21 AM
by seniol
0 Replies
165 Views
Last post May 17, 2023, 10:58:01 PM
by armamor