Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate

Autor Topic: Source VS2019 Main 5.2 + Louis Emulator 5.2 UP15 + Cashshop Included  (Visto 84611 veces)

wener1992 and 1 Guest are viewing this topic.

Offline xiazaipw #280 Posteado: September 30, 2023, 12:37:22 AM

  • 0 puntos por ventas
  • *
  • Rank: Usuario activo
  • Posts: 67
  • Gracias recibida: 13
  • cn
I also had a problem with the connection. I completely commented out NEW_PROTOCOL and it didn't solve the problem. Then I started looking for the difference in the 5.2 code with decompiled s6 and found the differences. Maybe this will help you

Code: [Select]
void CLoginWin::ConnectConnectionServer()
{
//Edit
//#ifdef NEW_PROTOCOL_SYSTEM
//gProtocolSend.DisconnectServer();
//#endif
//Edit added s6
SocketClient.Close();

LogIn = 0;
CurrentProtocolState = REQUEST_JOIN_SERVER;
CreateSocket(szServerIpAddress, g_ServerPort);
}
Brother, have you solved it?


Offline vcore30 #281 Posteado: September 30, 2023, 07:04:06 AM

  • 0 puntos por ventas
  • *
  • Rank: Destacado
  • Posts: 96
  • Gracias recibida: 853
  • ru
I also had a problem with the connection. I completely commented out NEW_PROTOCOL and it didn't solve the problem. Then I started looking for the difference in the 5.2 code with decompiled s6 and found the differences. Maybe this will help you

Code: [Select]
void CLoginWin::ConnectConnectionServer()
{
//Edit
//#ifdef NEW_PROTOCOL_SYSTEM
//gProtocolSend.DisconnectServer();
//#endif
//Edit added s6
SocketClient.Close();

LogIn = 0;
CurrentProtocolState = REQUEST_JOIN_SERVER;
CreateSocket(szServerIpAddress, g_ServerPort);
}
Brother, have you solved it?

I decided it a long time ago. Have you tried replacing the code I gave?


Offline xiazaipw #282 Posteado: October 03, 2023, 04:46:09 AM

  • 0 puntos por ventas
  • *
  • Rank: Usuario activo
  • Posts: 67
  • Gracias recibida: 13
  • cn
I also had a problem with the connection. I completely commented out NEW_PROTOCOL and it didn't solve the problem. Then I started looking for the difference in the 5.2 code with decompiled s6 and found the differences. Maybe this will help you

Code: [Select]
void CLoginWin::ConnectConnectionServer()
{
//Edit
//#ifdef NEW_PROTOCOL_SYSTEM
//gProtocolSend.DisconnectServer();
//#endif
//Edit added s6
SocketClient.Close();

LogIn = 0;
CurrentProtocolState = REQUEST_JOIN_SERVER;
CreateSocket(szServerIpAddress, g_ServerPort);
}
Brother, have you solved it?

I decided it a long time ago. Have you tried replacing the code I gave?
Brother, I used it. Your code doesn't work either



Offline xiazaipw #283 Posteado: October 07, 2023, 03:30:04 AM | Modificado: October 07, 2023, 09:37:39 AM by xiazaipw

  • 0 puntos por ventas
  • *
  • Rank: Usuario activo
  • Posts: 67
  • Gracias recibida: 13
  • cn

Gracias:


Offline hieuvt #284 Posteado: October 14, 2023, 01:01:44 PM

  • 0 puntos por ventas
  • *
  • Rank: Usuario activo
  • Posts: 62
  • Gracias recibida: 15
  • vn
Estoy agregando las resoluciones HD, pero tengo este problema, no se donde encontrar para arreglarlo, alguien me da una mano o alguna solucion para que no aparezcan los bloues negros?
how to fixed


Edit: Solucionado!



Can you tell us how you fixed it ?

Update:
Thanks Already Fixed.

Gracias:


Offline hoanmaster #285 Posteado: October 15, 2023, 12:14:50 AM

  • 0 puntos por ventas
  • *
  • Rank: Principiante
  • Posts: 28
  • Gracias recibida: 28
  • vn
Estoy agregando las resoluciones HD, pero tengo este problema, no se donde encontrar para arreglarlo, alguien me da una mano o alguna solucion para que no aparezcan los bloues negros?
how to fixed


Edit: Solucionado!



Can you tell us how you fixed it ?

Update:
Thanks Already Fixed.
bool TestFrustrum2D(float x, float y, float Range)
{
   if (SceneFlag == SERVER_LIST_SCENE || SceneFlag == WEBZEN_SCENE || SceneFlag == LOADING_SCENE)
      return true;

   int j = 3;
   for (int i = 0; i < 4; j = i, i++)
   {
      float d = (FrustrumX - x) * (FrustrumY[j] - y) -
                     (FrustrumX[j] - x) * (FrustrumY - y);
Range = Range+70;
      if (d <= Range)
      {
         return false;
      }
   }
   return true;
}


Offline hoanmaster #286 Posteado: October 17, 2023, 08:04:40 PM

  • 0 puntos por ventas
  • *
  • Rank: Principiante
  • Posts: 28
  • Gracias recibida: 28
  • vn

Gracias:


Offline vcore30 #287 Posteado: October 18, 2023, 08:49:56 AM

  • 0 puntos por ventas
  • *
  • Rank: Destacado
  • Posts: 96
  • Gracias recibida: 853
  • ru

master skill tree complace  cool2

Share the code. Otherwise, what's the point of posting this here? Do you want to brag? cheesyy2


Offline hoanmaster #288 Posteado: October 18, 2023, 08:57:46 AM

  • 0 puntos por ventas
  • *
  • Rank: Principiante
  • Posts: 28
  • Gracias recibida: 28
  • vn

master skill tree complace  cool2

Share the code. Otherwise, what's the point of posting this here? Do you want to brag? cheesyy2
Is it forbidden to post photos here?  cool2  and here is the forum for "code" or for copy and paste


Offline vcore30 #289 Posteado: November 05, 2023, 04:57:40 AM | Modificado: November 05, 2023, 05:09:12 AM by vcore30

  • 0 puntos por ventas
  • *
  • Rank: Destacado
  • Posts: 96
  • Gracias recibida: 853
  • ru
Hello. When I resize the window all TextInpuBoxes stop displaying text normally. Does anyone know how to fix this?

If I call this function, the chatbox displays the text correctly. But I don't think this is the right solution to this problem. And you need to update all other textboxes they are in Create Guild, Personal Shop

Code: [Select]
g_pChatInputBox->Create(g_pNewUISystem->GetNewUIManager(), g_pNewUISystem->GetUI_NewChatLogWindow(), 0, 382); 



Code: [Select]
void ResizeWindow(int Resolution, int Width, int Height)
{
m_Resolution = Resolution;
WindowWidth = Width;
WindowHeight = Height;
g_fScreenRate_x = (float)Width / 640.0;
g_fScreenRate_y = (float)Height / 480.0;

DWORD window_style;

if (g_bUseWindowMode == TRUE)
window_style = WS_OVERLAPPED | WS_MINIMIZEBOX | WS_CLIPCHILDREN | WS_SYSMENU | WS_CAPTION;
else
window_style = WS_OVERLAPPED | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_CLIPCHILDREN | WS_SYSMENU | WS_THICKFRAME | WS_CAPTION;

tagRECT rect;
rect.left = 0;
rect.top = 0;
rect.right = Width;
rect.bottom = Height;
AdjustWindowRect(&rect, window_style, 0);
rect.right -= rect.left;
rect.bottom -= rect.top;

int pos_x = (GetSystemMetrics(SM_CXSCREEN) - rect.right) / 2;
int pos_y = (GetSystemMetrics(SM_CYSCREEN) - rect.bottom) / 2;
SetWindowPos(g_hWnd, HWND_TOP, pos_x, pos_y, rect.right, rect.bottom, /*SWP_NOMOVE | */SWP_SHOWWINDOW | SWP_FRAMECHANGED);
OpenFont();
ClearInput();
}




Gracias:


Offline son1xx2 #290 Posteado: November 05, 2023, 06:44:39 AM

  • 0 puntos por ventas
  • *
  • Rank: Liga mayor
  • Posts: 198
  • Gracias recibida: 2255
  • vn
Hello. When I resize the window all TextInpuBoxes stop displaying text normally. Does anyone know how to fix this?

If I call this function, the chatbox displays the text correctly. But I don't think this is the right solution to this problem. And you need to update all other textboxes they are in Create Guild, Personal Shop

Code: [Select]
g_pChatInputBox->Create(g_pNewUISystem->GetNewUIManager(), g_pNewUISystem->GetUI_NewChatLogWindow(), 0, 382); 



Code: [Select]
void ResizeWindow(int Resolution, int Width, int Height)
{
m_Resolution = Resolution;
WindowWidth = Width;
WindowHeight = Height;
g_fScreenRate_x = (float)Width / 640.0;
g_fScreenRate_y = (float)Height / 480.0;

DWORD window_style;

if (g_bUseWindowMode == TRUE)
window_style = WS_OVERLAPPED | WS_MINIMIZEBOX | WS_CLIPCHILDREN | WS_SYSMENU | WS_CAPTION;
else
window_style = WS_OVERLAPPED | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_CLIPCHILDREN | WS_SYSMENU | WS_THICKFRAME | WS_CAPTION;

tagRECT rect;
rect.left = 0;
rect.top = 0;
rect.right = Width;
rect.bottom = Height;
AdjustWindowRect(&rect, window_style, 0);
rect.right -= rect.left;
rect.bottom -= rect.top;

int pos_x = (GetSystemMetrics(SM_CXSCREEN) - rect.right) / 2;
int pos_y = (GetSystemMetrics(SM_CYSCREEN) - rect.bottom) / 2;
SetWindowPos(g_hWnd, HWND_TOP, pos_x, pos_y, rect.right, rect.bottom, /*SWP_NOMOVE | */SWP_SHOWWINDOW | SWP_FRAMECHANGED);
OpenFont();
ClearInput();
}





you need to make it recalculate the font height and width

Do better, don't try to do the same ;)

Gracias:


Offline vcore30 #291 Posteado: November 06, 2023, 05:46:50 AM | Modificado: November 06, 2023, 05:52:26 AM by vcore30

  • 0 puntos por ventas
  • *
  • Rank: Destacado
  • Posts: 96
  • Gracias recibida: 853
  • ru
Hello. When I resize the window all TextInpuBoxes stop displaying text normally. Does anyone know how to fix this?

If I call this function, the chatbox displays the text correctly. But I don't think this is the right solution to this problem. And you need to update all other textboxes they are in Create Guild, Personal Shop

Code: [Select]
g_pChatInputBox->Create(g_pNewUISystem->GetNewUIManager(), g_pNewUISystem->GetUI_NewChatLogWindow(), 0, 382); 



Code: [Select]
void ResizeWindow(int Resolution, int Width, int Height)
{
m_Resolution = Resolution;
WindowWidth = Width;
WindowHeight = Height;
g_fScreenRate_x = (float)Width / 640.0;
g_fScreenRate_y = (float)Height / 480.0;

DWORD window_style;

if (g_bUseWindowMode == TRUE)
window_style = WS_OVERLAPPED | WS_MINIMIZEBOX | WS_CLIPCHILDREN | WS_SYSMENU | WS_CAPTION;
else
window_style = WS_OVERLAPPED | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_CLIPCHILDREN | WS_SYSMENU | WS_THICKFRAME | WS_CAPTION;

tagRECT rect;
rect.left = 0;
rect.top = 0;
rect.right = Width;
rect.bottom = Height;
AdjustWindowRect(&rect, window_style, 0);
rect.right -= rect.left;
rect.bottom -= rect.top;

int pos_x = (GetSystemMetrics(SM_CXSCREEN) - rect.right) / 2;
int pos_y = (GetSystemMetrics(SM_CYSCREEN) - rect.bottom) / 2;
SetWindowPos(g_hWnd, HWND_TOP, pos_x, pos_y, rect.right, rect.bottom, /*SWP_NOMOVE | */SWP_SHOWWINDOW | SWP_FRAMECHANGED);
OpenFont();
ClearInput();
}





you need to make it recalculate the font height and width

I couldn't understand. How to do it.


Offline vcore30 #292 Posteado: November 07, 2023, 02:16:48 PM

  • 0 puntos por ventas
  • *
  • Rank: Destacado
  • Posts: 96
  • Gracias recibida: 853
  • ru
@son1xx2
 As I understand it, I need to call these functions when the window size changes. It's right?

Code: [Select]
void CUITextInputBox::SetSize(int iWidth, int iHeight)
{
if(iWidth == 0 || iHeight == 0) return;
//if(iWidth == m_iWidth && iHeight == m_iHeight) return;

m_iWidth = iWidth;
m_iHeight = iHeight;

if (m_hMemDC != NULL)
{
DeleteDC(m_hMemDC);
m_hMemDC = NULL;
m_pFontBuffer = NULL;
}
if (m_hBitmap != NULL)
{
DeleteObject(m_hBitmap);
m_hBitmap = NULL;
}

HDC hDC = GetDC(m_hParentWnd);
BITMAPINFO * DIB_INFO;
DIB_INFO = (BITMAPINFO*)new BYTE[sizeof(BITMAPINFOHEADER) + sizeof(PALETTEENTRY) * 256];
memset( DIB_INFO, 0x00, sizeof(BITMAPINFOHEADER) );
DIB_INFO->bmiHeader.biSize        = sizeof(BITMAPINFOHEADER);
DIB_INFO->bmiHeader.biWidth       = iWidth*g_fScreenRate_x;
DIB_INFO->bmiHeader.biHeight      = -(iHeight*g_fScreenRate_y);
DIB_INFO->bmiHeader.biPlanes      = 1;
DIB_INFO->bmiHeader.biBitCount    = 24;
DIB_INFO->bmiHeader.biCompression = BI_RGB;

m_hBitmap = CreateDIBSection(hDC, DIB_INFO, DIB_RGB_COLORS, (void**)&m_pFontBuffer, NULL, NULL);
m_hMemDC = CreateCompatibleDC(hDC);
SelectObject(m_hMemDC, m_hBitmap);
SetFont(g_hFont);

delete [] DIB_INFO;
g_ConsoleDebug->Write(MCD_NORMAL, "HWND:%d", m_hEditWnd);
if(!m_hMemDC || !m_hBitmap)
{
if(m_hEditWnd != NULL)
{
DestroyWindow(m_hEditWnd);
m_hEditWnd = NULL;
}
if (m_hMemDC != NULL)
{
DeleteDC(m_hMemDC);
m_hMemDC = NULL;
m_pFontBuffer = NULL;
}
if (m_hBitmap != NULL)
{
DeleteObject(m_hBitmap);
m_hBitmap = NULL;
}
return;
}

if (m_hEditWnd != NULL)
{
SetWindowPos(m_hEditWnd, 0, 0, 0, iWidth*g_fScreenRate_x, iHeight*g_fScreenRate_y, SWP_NOMOVE | SWP_NOZORDER);
SendMessageW(m_hEditWnd, EM_SETSEL, (WPARAM)0, (LPARAM)0);
}
}

bool CUIRenderTextOriginal::Create(HDC hDC)
{
BITMAPINFO* DIB_INFO;
    DIB_INFO = (BITMAPINFO*)new BYTE[ sizeof(BITMAPINFOHEADER) + sizeof(PALETTEENTRY) * 256 ];
    memset( DIB_INFO, 0x00, sizeof(BITMAPINFOHEADER) );
    DIB_INFO->bmiHeader.biSize        = sizeof(BITMAPINFOHEADER);
    DIB_INFO->bmiHeader.biWidth       = 640*g_fScreenRate_x; //. 640
DIB_INFO->bmiHeader.biHeight      = -(480*g_fScreenRate_y); //. 480
    DIB_INFO->bmiHeader.biPlanes      = 1;
    DIB_INFO->bmiHeader.biBitCount    = 24;
    DIB_INFO->bmiHeader.biCompression = BI_RGB;

m_hBitmap = CreateDIBSection(hDC, DIB_INFO, DIB_RGB_COLORS, (void**)&m_pFontBuffer, NULL, NULL);
m_hFontDC = CreateCompatibleDC(hDC);
SelectObject(m_hFontDC, m_hBitmap);
SelectObject(m_hFontDC, g_hFont);
m_dwBackColor = 0; //. Default Background Color;
m_dwTextColor = 0xFFFFFFFF; //. Default Text Color

delete [] DIB_INFO;

if(NULL == m_hFontDC || NULL == m_hBitmap)
{
Release();
return false;
}
return true;
}


Offline son1xx2 #293 Posteado: November 07, 2023, 09:28:43 PM

  • 0 puntos por ventas
  • *
  • Rank: Liga mayor
  • Posts: 198
  • Gracias recibida: 2255
  • vn
@son1xx2
 As I understand it, I need to call these functions when the window size changes. It's right?

Code: [Select]
void CUITextInputBox::SetSize(int iWidth, int iHeight)
{
if(iWidth == 0 || iHeight == 0) return;
//if(iWidth == m_iWidth && iHeight == m_iHeight) return;

m_iWidth = iWidth;
m_iHeight = iHeight;

if (m_hMemDC != NULL)
{
DeleteDC(m_hMemDC);
m_hMemDC = NULL;
m_pFontBuffer = NULL;
}
if (m_hBitmap != NULL)
{
DeleteObject(m_hBitmap);
m_hBitmap = NULL;
}

HDC hDC = GetDC(m_hParentWnd);
BITMAPINFO * DIB_INFO;
DIB_INFO = (BITMAPINFO*)new BYTE[sizeof(BITMAPINFOHEADER) + sizeof(PALETTEENTRY) * 256];
memset( DIB_INFO, 0x00, sizeof(BITMAPINFOHEADER) );
DIB_INFO->bmiHeader.biSize        = sizeof(BITMAPINFOHEADER);
DIB_INFO->bmiHeader.biWidth       = iWidth*g_fScreenRate_x;
DIB_INFO->bmiHeader.biHeight      = -(iHeight*g_fScreenRate_y);
DIB_INFO->bmiHeader.biPlanes      = 1;
DIB_INFO->bmiHeader.biBitCount    = 24;
DIB_INFO->bmiHeader.biCompression = BI_RGB;

m_hBitmap = CreateDIBSection(hDC, DIB_INFO, DIB_RGB_COLORS, (void**)&m_pFontBuffer, NULL, NULL);
m_hMemDC = CreateCompatibleDC(hDC);
SelectObject(m_hMemDC, m_hBitmap);
SetFont(g_hFont);

delete [] DIB_INFO;
g_ConsoleDebug->Write(MCD_NORMAL, "HWND:%d", m_hEditWnd);
if(!m_hMemDC || !m_hBitmap)
{
if(m_hEditWnd != NULL)
{
DestroyWindow(m_hEditWnd);
m_hEditWnd = NULL;
}
if (m_hMemDC != NULL)
{
DeleteDC(m_hMemDC);
m_hMemDC = NULL;
m_pFontBuffer = NULL;
}
if (m_hBitmap != NULL)
{
DeleteObject(m_hBitmap);
m_hBitmap = NULL;
}
return;
}

if (m_hEditWnd != NULL)
{
SetWindowPos(m_hEditWnd, 0, 0, 0, iWidth*g_fScreenRate_x, iHeight*g_fScreenRate_y, SWP_NOMOVE | SWP_NOZORDER);
SendMessageW(m_hEditWnd, EM_SETSEL, (WPARAM)0, (LPARAM)0);
}
}

bool CUIRenderTextOriginal::Create(HDC hDC)
{
BITMAPINFO* DIB_INFO;
    DIB_INFO = (BITMAPINFO*)new BYTE[ sizeof(BITMAPINFOHEADER) + sizeof(PALETTEENTRY) * 256 ];
    memset( DIB_INFO, 0x00, sizeof(BITMAPINFOHEADER) );
    DIB_INFO->bmiHeader.biSize        = sizeof(BITMAPINFOHEADER);
    DIB_INFO->bmiHeader.biWidth       = 640*g_fScreenRate_x; //. 640
DIB_INFO->bmiHeader.biHeight      = -(480*g_fScreenRate_y); //. 480
    DIB_INFO->bmiHeader.biPlanes      = 1;
    DIB_INFO->bmiHeader.biBitCount    = 24;
    DIB_INFO->bmiHeader.biCompression = BI_RGB;

m_hBitmap = CreateDIBSection(hDC, DIB_INFO, DIB_RGB_COLORS, (void**)&m_pFontBuffer, NULL, NULL);
m_hFontDC = CreateCompatibleDC(hDC);
SelectObject(m_hFontDC, m_hBitmap);
SelectObject(m_hFontDC, g_hFont);
m_dwBackColor = 0; //. Default Background Color;
m_dwTextColor = 0xFFFFFFFF; //. Default Text Color

delete [] DIB_INFO;

if(NULL == m_hFontDC || NULL == m_hBitmap)
{
Release();
return false;
}
return true;
}

in Winmain.cpp

   switch(WindowWidth)
   {
   case 640 :FontHeight = 12;break;
   case 800 :FontHeight = 13;break;
   case 1024:FontHeight = 14;break;
   case 1280:FontHeight = 15;break;
   }

You will see that the font height is fixed according to the WindowWidth, you need to add the WindowWidth you want to it or have a formula so it can calculate, that's the way I understand it.

Do better, don't try to do the same ;)

Offline vcore30 #294 Posteado: November 08, 2023, 01:48:17 AM

  • 0 puntos por ventas
  • *
  • Rank: Destacado
  • Posts: 96
  • Gracias recibida: 853
  • ru
@son1xx2
 As I understand it, I need to call these functions when the window size changes. It's right?

Code: [Select]
void CUITextInputBox::SetSize(int iWidth, int iHeight)
{
if(iWidth == 0 || iHeight == 0) return;
//if(iWidth == m_iWidth && iHeight == m_iHeight) return;

m_iWidth = iWidth;
m_iHeight = iHeight;

if (m_hMemDC != NULL)
{
DeleteDC(m_hMemDC);
m_hMemDC = NULL;
m_pFontBuffer = NULL;
}
if (m_hBitmap != NULL)
{
DeleteObject(m_hBitmap);
m_hBitmap = NULL;
}

HDC hDC = GetDC(m_hParentWnd);
BITMAPINFO * DIB_INFO;
DIB_INFO = (BITMAPINFO*)new BYTE[sizeof(BITMAPINFOHEADER) + sizeof(PALETTEENTRY) * 256];
memset( DIB_INFO, 0x00, sizeof(BITMAPINFOHEADER) );
DIB_INFO->bmiHeader.biSize        = sizeof(BITMAPINFOHEADER);
DIB_INFO->bmiHeader.biWidth       = iWidth*g_fScreenRate_x;
DIB_INFO->bmiHeader.biHeight      = -(iHeight*g_fScreenRate_y);
DIB_INFO->bmiHeader.biPlanes      = 1;
DIB_INFO->bmiHeader.biBitCount    = 24;
DIB_INFO->bmiHeader.biCompression = BI_RGB;

m_hBitmap = CreateDIBSection(hDC, DIB_INFO, DIB_RGB_COLORS, (void**)&m_pFontBuffer, NULL, NULL);
m_hMemDC = CreateCompatibleDC(hDC);
SelectObject(m_hMemDC, m_hBitmap);
SetFont(g_hFont);

delete [] DIB_INFO;
g_ConsoleDebug->Write(MCD_NORMAL, "HWND:%d", m_hEditWnd);
if(!m_hMemDC || !m_hBitmap)
{
if(m_hEditWnd != NULL)
{
DestroyWindow(m_hEditWnd);
m_hEditWnd = NULL;
}
if (m_hMemDC != NULL)
{
DeleteDC(m_hMemDC);
m_hMemDC = NULL;
m_pFontBuffer = NULL;
}
if (m_hBitmap != NULL)
{
DeleteObject(m_hBitmap);
m_hBitmap = NULL;
}
return;
}

if (m_hEditWnd != NULL)
{
SetWindowPos(m_hEditWnd, 0, 0, 0, iWidth*g_fScreenRate_x, iHeight*g_fScreenRate_y, SWP_NOMOVE | SWP_NOZORDER);
SendMessageW(m_hEditWnd, EM_SETSEL, (WPARAM)0, (LPARAM)0);
}
}

bool CUIRenderTextOriginal::Create(HDC hDC)
{
BITMAPINFO* DIB_INFO;
    DIB_INFO = (BITMAPINFO*)new BYTE[ sizeof(BITMAPINFOHEADER) + sizeof(PALETTEENTRY) * 256 ];
    memset( DIB_INFO, 0x00, sizeof(BITMAPINFOHEADER) );
    DIB_INFO->bmiHeader.biSize        = sizeof(BITMAPINFOHEADER);
    DIB_INFO->bmiHeader.biWidth       = 640*g_fScreenRate_x; //. 640
DIB_INFO->bmiHeader.biHeight      = -(480*g_fScreenRate_y); //. 480
    DIB_INFO->bmiHeader.biPlanes      = 1;
    DIB_INFO->bmiHeader.biBitCount    = 24;
    DIB_INFO->bmiHeader.biCompression = BI_RGB;

m_hBitmap = CreateDIBSection(hDC, DIB_INFO, DIB_RGB_COLORS, (void**)&m_pFontBuffer, NULL, NULL);
m_hFontDC = CreateCompatibleDC(hDC);
SelectObject(m_hFontDC, m_hBitmap);
SelectObject(m_hFontDC, g_hFont);
m_dwBackColor = 0; //. Default Background Color;
m_dwTextColor = 0xFFFFFFFF; //. Default Text Color

delete [] DIB_INFO;

if(NULL == m_hFontDC || NULL == m_hBitmap)
{
Release();
return false;
}
return true;
}

in Winmain.cpp

   switch(WindowWidth)
   {
   case 640 :FontHeight = 12;break;
   case 800 :FontHeight = 13;break;
   case 1024:FontHeight = 14;break;
   case 1280:FontHeight = 15;break;
   }

You will see that the font height is fixed according to the WindowWidth, you need to add the WindowWidth you want to it or have a formula so it can calculate, that's the way I understand it.

This does not correct the display of the text, but only changes its size. sueno


Offline son1xx2 #295 Posteado: November 08, 2023, 02:33:00 AM | Modificado: November 08, 2023, 04:46:26 AM by son1xx2

  • 0 puntos por ventas
  • *
  • Rank: Liga mayor
  • Posts: 198
  • Gracias recibida: 2255
  • vn
Do better, don't try to do the same ;)

Offline hoanmaster #296 Posteado: November 11, 2023, 07:29:46 PM

  • 0 puntos por ventas
  • *
  • Rank: Principiante
  • Posts: 28
  • Gracias recibida: 28
  • vn
   
Code: [Select]
		case 61:
for (int i = 0; i < 6; i++)
{
int Hand = 0;
if (i >= 3)
Hand = 1;
b->TransformPosition(o->BoneTransform[c->Weapon[Hand].LinkBone], p, Position, true); // ����
Vector(0.f, 0.f, (float)(rand() % 360), Angle);
CreateJoint(BITMAP_JOINT_THUNDER, Position, to->Position, Angle, 2, to, 50.f);
CreateJoint(BITMAP_JOINT_THUNDER, Position, to->Position, Angle, 2, to, 10.f);
}

if (c->AttackTime == 1)
PlayBuffer(SOUND_EVIL);

for (int i = 0; i < 4; i++)
{
int Hand = 0;
if (i >= 2)
Hand = 1;
b->TransformPosition(o->BoneTransform[c->Weapon[Hand].LinkBone], p, Position, true);
Vector(0.f, 0.f, (float)(rand() % 360), Angle);
//CreateJoint(BITMAP_JOINT_LASER + 1, Position, to->Position, Angle, 0, to, 50.f);  // dis
CreateParticle(BITMAP_FIRE, Position, o->Angle, o->Light);
}
break;
fix effect in tarkan monter Beam Knight

   

Gracias:


Offline bimaloha #297 Posteado: November 13, 2023, 09:08:40 AM

  • 0 puntos por ventas
  • *
  • Rank: Sup. destacado
  • Posts: 117
  • Gracias recibida: 4206
  • vn

Gracias:


Offline hieuvt #298 Posteado: December 11, 2023, 12:45:25 AM

  • 0 puntos por ventas
  • *
  • Rank: Usuario activo
  • Posts: 62
  • Gracias recibida: 15
  • vn

Offline 1732313 #299 Posteado: December 31, 2023, 12:48:53 AM

  • 0 puntos por ventas
  • *
  • Rank: Usuario activo
  • Posts: 65
  • Gracias recibida: 4
  • ru
Can someone tell me where to fix the entrance to Vulcan?


Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate


 

Related Topics

  Subject / Started by Replies Last post
89 Replies
29245 Views
Last post November 20, 2021, 04:00:17 PM
by djagripnos
211 Replies
44484 Views
Last post August 27, 2023, 01:38:23 AM
by OBBY
9 Replies
2914 Views
Last post February 05, 2020, 07:40:01 AM
by takumi12
3 Replies
3855 Views
Last post February 28, 2020, 11:17:49 PM
by ConejoMalo
26 Replies
11955 Views
Last post December 21, 2024, 04:54:26 AM
by josef300