SMF - Just Installed!
float CRenderNumber(float x, float y, int iNum, float fScale)
{
EnableAlphaTest(1);
float width, height;
if (fScale < 0.3f)
{
return x;
}
// Ajustar el ancho y alto para pantallas widescreen
width = 12.f * (fScale - 0.3f);
height = 16.f * (fScale - 0.3f);
char strText[32];
itoa(iNum, strText, 10);
int iLength = (int)strlen(strText);
x -= width * iLength / 2;
for (int i = 0; i < iLength; ++i)
{
float fU = (float)(strText[i] - 48) * 12.f / 128.f;
RenderBitmap(31337, x, y, width, height, fU, 0.f, 12.f / 128.f, 14.f / 16.f, 1, 1, 0.0);
x += width * 0.8f;
}
RenderBitmap(531126, x, y, width + 3, height, 0.f, 0.f, 9.f / 16.f, 14.f / 16.f, 1, 1, 0.0);
return x;
}
void CUIMng::CreateTitleSceneUI()
{
ReleaseTitleSceneUI();
CInput& rInput = CInput::Instance();
float fScaleX = (float)rInput.GetScreenWidth() / 800.0f;
float fScaleY = (float)rInput.GetScreenHeight() / 600.0f;
LoadBitmapA("Interface\\KMUA2_Bar.jpg", 31122, 0x2601, 0x2901, 1, 0);
LoadBitmapA("Interface\\KMUA2_Loading.tga", 531123, 0x2601, 0x2901, 1, 0);
LoadBitmapA("Interface\\KMUA2_BarFrame.tga", 531124, 0x2601, 0x2901, 1, 0);
LoadBitmapA("Interface\\KMUA2_Back01.jpg", 531122, 0x2600, 0x2900, 1, 0);
LoadBitmapA("Interface\\KMUA2_Back02.jpg", 531125, 0x2600, 0x2900, 1, 0);
LoadBitmapA("Interface\\KMUA2_Porcento.tga", 531126, 0x2601, 0x2901, 1, 0);
LoadBitmapA("Interface\\newui_number1.tga", 31337, 9729, 10496, 1, 0);
m_pgbLoding = new CGaugeBar;
// Ajustes para la posición en pantallas widescreen
RECT rc = { -36 * fScaleX, 4 * fScaleY, (656 + 36) * fScaleX, 8 * fScaleY };
m_pgbLoding->Create(4, 15, 31122, &rc, 0, 0, -1, true, fScaleX, fScaleY);
m_pgbLoding->SetPosition(72 * fScaleX, 540 * fScaleY);
m_pgbLoding->Show();
m_nScene = UIM_SCENE_TITLE;
}
void CUIMng::RenderTitleSceneUI(HDC hDC, DWORD dwNow, DWORD dwTotal)
{
::BeginOpengl();
::glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
::BeginBitmap();
float Center;
// Ajustar el centro para pantallas widescreen
Center = (m_Resolution == 4 || m_Resolution == 8 || m_Resolution == 7 || m_Resolution == 6 || m_Resolution == 5) ? 0.0 : -107 * (800.0f / rInput.GetScreenWidth());
RenderBitmap(531122, Center, -1.0, 427 * fScaleX, 480 * fScaleY, 0, 0, 1.0, 1.0, 1, 1, 0.0); // Back
RenderBitmap(531125, Center + 427 * fScaleX, -1.0, 427 * fScaleX, 480 * fScaleY, 0, 0, 1.0, 1.0, 1, 1, 0.0); // Back
RenderBitmap(531123, 0.0, 406.0 * fScaleY, 640.0 * fScaleX, 74.0 * fScaleY, 0, 0, 1.0, 0.94, 1, 1, 0.0);
m_pgbLoding->SetValue(dwNow, dwTotal);
m_pgbLoding->Render();
float WH, rate, SizeNew, Porcento;
double AnimX, AnimY;
WH = 0.25;
int Anim = (int)(timeGetTime() * 0.5f) % 600 / 40;
AnimX = (double)(Anim % 4) * WH;
AnimY = (double)(Anim / 4) * WH;
rate = 580.f / (float)dwTotal;
SizeNew = rate * dwNow;
RenderBitmap(531124, SizeNew - 27 * fScaleX, 391.0 * fScaleY, 81.0 * fScaleX, 81.0 * fScaleY, AnimX, AnimY, WH, WH, 1, 1, 0.0);
glColor3f(0.84, 0.85, 0.86);
rate = 100.f / (float)dwTotal;
Porcento = rate * dwNow;
CRenderNumber(590 * fScaleX, 454 * fScaleY, Porcento, 1.0);
glColor3f(1.0, 1.0, 1.0);
::EndBitmap();
::EndOpengl();
::glFlush();
::SwapBuffers(hDC);
}
float CRenderNumber(float x, float y, int iNum, float fScale)
{
EnableAlphaTest(1);
float width, height;
if (fScale < 0.3f)
{
return x;
}
width = 12.f * (fScale - 0.3f);
height = 16.f * (fScale - 0.3f);
char strText[32];
itoa(iNum, strText, 10);
int iLength = (int)strlen(strText);
x -= width * iLength / 2;
for (int i = 0; i < iLength; ++i)
{
float fU = (float)(strText[i] - 48) * 12.f / 128.f;
RenderBitmap(31337, x, y, width, height, fU, 0.f, 12.f / 128.f, 14.f / 16.f, 1, 1, 0.0);
x += width * 0.8f;
}
RenderBitmap(531126, x, y, width + 3, height, 0.f, 0.f, 9.f / 16.f, 14.f / 16.f, 1, 1, 0.0);
return x;
}
void CUIMng::CreateTitleSceneUI()
{
ReleaseTitleSceneUI();
CInput& rInput = CInput::Instance();
float fScaleX = (float)rInput.GetScreenWidth() / 800.0f;
float fScaleY = (float)rInput.GetScreenHeight() / 600.0f;
LoadBitmapA("Interface\\KMUA2_Bar.jpg", 31122, 0x2601, 0x2901, 1, 0);
LoadBitmapA("Interface\\KMUA2_Loading.tga", 531123, 0x2601, 0x2901, 1, 0);
LoadBitmapA("Interface\\KMUA2_BarFrame.tga", 531124, 0x2601, 0x2901, 1, 0);
LoadBitmapA("Interface\\KMUA2_Back01.jpg", 531122, 0x2600, 0x2900, 1, 0);
LoadBitmapA("Interface\\KMUA2_Back02.jpg", 531125, 0x2600, 0x2900, 1, 0);
LoadBitmapA("Interface\\KMUA2_Porcento.tga", 531126, 0x2601, 0x2901, 1, 0);
LoadBitmapA("Interface\\newui_number1.tga", 31337, 9729, 10496, 1, 0);
m_pgbLoding = new CGaugeBar;
RECT rc = { -36, 4, 656 + 36, 8 };
m_pgbLoding->Create(4, 15, 31122, &rc, 0, 0, -1, true, fScaleX, fScaleY);
m_pgbLoding->SetPosition(72, 540);
m_pgbLoding->Show();
m_nScene = UIM_SCENE_TITLE;
}
void CUIMng::ReleaseTitleSceneUI()
{
SAFE_DELETE_ARRAY(m_asprTitle);
SAFE_DELETE(m_pgbLoding);
m_nScene = UIM_SCENE_NONE;
}
void CUIMng::RenderTitleSceneUI(HDC hDC, DWORD dwNow, DWORD dwTotal)
{
::BeginOpengl();
::glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
::BeginBitmap();
float Center;
if (m_Resolution == 4 || m_Resolution == 8 || m_Resolution == 7 || m_Resolution == 6 || m_Resolution == 5)
{
Center = 0.0;
}
else
{
Center = -107;
}
RenderBitmap(531122, Center, -1.0, 427, 480, 0, 0, 1.0, 1.0, 1, 1, 0.0);//Back
RenderBitmap(531125, Center + 427, -1.0, 427, 480, 0, 0, 1.0, 1.0, 1, 1, 0.0);//Back
RenderBitmap(531123, 0.0, 406.0, 640.0, 74.0, 0, 0, 1.0, 0.94, 1, 1, 0.0);
m_pgbLoding->SetValue(dwNow, dwTotal);
m_pgbLoding->Render();
float WH, rate, SizeNew, Porcento;
double AnimX, AnimY;
WH = 0.25;
int Anim = (int)(timeGetTime() * 0.5f) % 600 / 40;
AnimX = (double)(Anim % 4) * WH;
AnimY = (double)(Anim / 4) * WH;
rate = 580.f / (float)dwTotal;
SizeNew = rate * dwNow;
RenderBitmap(531124, SizeNew - 27, 391.0, 81.0, 81.0, AnimX, AnimY, WH, WH, 1, 1, 0.0);
glColor3f(0.84, 0.85, 0.86);
rate = 100.f / (float)dwTotal;
Porcento = rate * dwNow;
CRenderNumber(590, 454, Porcento, 1.0);
glColor3f(1.0, 1.0, 1.0);
::EndBitmap();
::EndOpengl();
::glFlush();
::SwapBuffers(hDC);
}
void WebzenScene(HDC hDC)
{
CUIMng& rUIMng = CUIMng::Instance();
OpenFont();
ClearInput();
rUIMng.CreateTitleSceneUI();
FogEnable = false;
::EnableAlphaTest();
OpenBasicData(hDC);
g_pNewUISystem->LoadMainSceneInterface();
CUIMng::Instance().RenderTitleSceneUI(hDC, 11, 11);
rUIMng.ReleaseTitleSceneUI();
DeleteBitmap(31122);
DeleteBitmap(531123);
DeleteBitmap(531124);
DeleteBitmap(531122);
DeleteBitmap(531125);
DeleteBitmap(531126);
DeleteBitmap(31337);
g_ErrorReport.Write( "> Loading ok.\r\n");
SceneFlag = LOG_IN_SCENE; //
}
default: m_Resolution = 2; break;
// Render Character Class
RenderText(StartPosX + 20, CenterTextPosY(CharClass, StartPosY), CharClass, REAL_WIDTH(150), RT3_SORT_CENTER, NULL);
[/div]// Render Server Name
RenderText(StartPosX + 20, CenterTextPosY(ServerName, StartPosY), ServerName, REAL_WIDTH(150), RT3_SORT_CENTER, NULL);
[/div]void CServerList::ServerBoxTexture(int Texture, float x, float y, float Width, float Height, float u, float v, float uWidth, float vHeight, bool Scale, bool StartScale)
{
RenderBitmap(Texture, x + 135, y - 3, Width, Height, u, v, uWidth, vHeight, Scale, StartScale);
}
[/div]`, y `[url]` para estructurar el contenido de manera adecuada en BBCode.
- Los saltos de línea se han representado con `[br]`.
Creditos
BANGUber
Cita de: Evangelio en Abr 08, 2025, 10:13 PMQue update es??
if(gProtect.m_MainInfo.MoveClassic == 1)
{
/* NEW MOVE DOWNGRADE SYSTEM */
SetCompleteHook(0xE9,0x00832862, 0x00832897); //DISABLE GENS BATTLE (BATTLE ZONE MOVE (M))
MemorySet(0x00832CF2,0x90,0x5);
SetByte((PVOID)(0x00832C44+2),5); //BARRA AMARELA REDIMENSIONADA
//TELA M EM RESOLUÇÃO 800
SetByte((PVOID)(0x00830C77+2),34);
SetByte((PVOID)(0x00830C86+2),94);
SetByte((PVOID)(0x00830C98+2),139);
SetByte((PVOID)(0x00830C6A+3),148); //LARGURA
//TELA M EM RESOLUÇÃO 1024
SetByte((PVOID)(0x00830CB6+2),29);
SetByte((PVOID)(0x00830CC5+2),84);
SetByte((PVOID)(0x00830CD4+2),124);
SetByte((PVOID)(0x00830CA9+3),128); //LARGURA
SetByte((PVOID)(0x00830C31+2),30);
//TELA M EM RESOLUÇÃO 1280 OK
SetByte((PVOID)(0x00830CF2+2),25);
SetByte((PVOID)(0x00830D01+2),69);
SetByte((PVOID)(0x00830D10+1),104);
SetByte((PVOID)(0x00830CE5+3),108); //LARGURA
SetDword((PVOID)(0x00830D49),500); //DIMENSIONAMENTO DO MOVE
SetDword((PVOID)(0x00832443+2),220); //COMPRIMENTO DO MOVE
//TAMANHO DO MOVE - OTIMIZAÇÃO DE TAMANHO
SetByte((0x00830D64+2),33);
SetByte((0x00830D67+2),55); //REGULA O TAMANHO DO MOVE
SetByte((0x00830E55+2),33);
SetByte((0x0083245B+2),33);
SetByte((0x00830ED3+2),33);
SetByte((0X00830FD6+2),33);
//RETIRA IMAGENS DO MOVE
MemorySet(0x008325D4, 0x90, 0x05);
MemorySet(0x00832639, 0x90, 0x05);
MemorySet(0x0083268F, 0x90, 0x05);
MemorySet(0x008326D7, 0x90, 0x05);
MemorySet(0x00832757, 0x90, 0x05);
MemorySet(0x00832794, 0x90, 0x05);
/* NEW MOVE DOWNGRADE SYSTEM */
}