Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate

Autor Topic: Loading Mu Archangel 2 Main5.2  (Visto 1024 veces)

0 Miembros and 1 Guest are viewing this topic.

Offline Odisk Posteado: April 09, 2025, 12:04:00 PM | Modificado: April 09, 2025, 09:58:47 PM by Odisk

  • Colaborador
  • 0 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 889
  • Gracias recibida: 13921
  • pr
New Loading for Main 5.2




one day

Offline Dexign #1 Posteado: April 09, 2025, 02:10:37 PM

  • Diseñador
  • +1 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 290
  • Gracias recibida: 1087
  • ve
Está bueno, solo le falta arreglar un poco el código para que sea escalable, pero para comenzar de allí, está perfecto


Offline Odisk #2 Posteado: April 09, 2025, 02:29:20 PM

  • Colaborador
  • 0 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 889
  • Gracias recibida: 13921
  • pr
Está bueno, solo le falta arreglar un poco el código para que sea escalable, pero para comenzar de allí, está perfecto

Falta más que todo que se pueda adaptar a resoluciones más grande o en el caso de widescreen ya con eso quedaría

one day

Gracias:


Offline Dexign #3 Posteado: April 09, 2025, 04:10:34 PM

  • Diseñador
  • +1 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 290
  • Gracias recibida: 1087
  • ve
Está bueno, solo le falta arreglar un poco el código para que sea escalable, pero para comenzar de allí, está perfecto

Falta más que todo que se pueda adaptar a resoluciones más grande o en el caso de widescreen ya con eso quedaría


Luego revisamos bien a ver qué se logra, pero digamos ya carga hasta 1366x700


Offline HayllanderBR #4 Posteado: April 09, 2025, 08:34:35 PM | Modificado: April 09, 2025, 08:37:50 PM by HayllanderBR

  • 0 puntos por ventas
  • *
  • Rank: Dedicado
  • Posts: 40
  • Gracias recibida: 436
  • br
Não ta 100% mais ta uma parte em widescreen ja



Code: [Select]
void CUIMng::CreateTitleSceneUI()
{
ReleaseTitleSceneUI();

CInput& rInput = CInput::Instance();
float fScaleX = (float)rInput.GetScreenWidth() / 800.0f;
float fScaleY = (float)rInput.GetScreenHeight() / 600.0f;

LoadBitmapA("Custom\\Interface\\NL_Loading.tga", 531123, 0x2601, 0x2901, 1, 0);
LoadBitmapA("Custom\\Interface\\NL_BarFrame.tga", 531124, 0x2601, 0x2901, 1, 0);
LoadBitmapA("Custom\\Interface\\NL_Porcento.tga", 531126, 0x2601, 0x2901, 1, 0);
LoadBitmapA("Interface\\newui_number1.tga", 31337, 9729, 10496, 1, 0);
LoadBitmapA("Custom\\Interface\\NL_Back1.jpg", 531122, 0x2600, 0x2900, 1, 0);
LoadBitmapA("Custom\\Interface\\NL_Back2.jpg", 531125, 0x2600, 0x2900, 1, 0);
LoadBitmapA("Custom\\Interface\\NL_Bar.jpg", 31122, 0x2601, 0x2901, 1, 0);

m_pgbLoding = new CGaugeBar;

RECT rc = { -36, 4, 656 + 36, 10 };
m_pgbLoding->Create(4, 15, 31122, &rc, 0, 0, -1, true, fScaleX, fScaleY);
m_pgbLoding->SetPosition(72, 521);
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 FT_Perspective = (float)(1024.f / (float)WindowHeight);
float FT_Width = (float)(2048.f / FT_Perspective);
float FT_Height = (float)(1024.f / FT_Perspective);

float iPos_x = 0 + ((WindowWidth - FT_Width) / 2.f);
float iPos_y = 0 + ((WindowHeight - FT_Height) / 2.f);

float width = (FT_Width / 2.f);


EnableAlphaTest(TRUE);
glAlphaFunc(GL_GREATER, 0.0f);
RenderBitmap(531122, iPos_x, iPos_y, width, FT_Height, 0.0, 0.0, 1.f, 1.f, 0, 0, 0.0);
RenderBitmap(531125, iPos_x + width, iPos_y, width, FT_Height, 0.0, 0.0, 1.f, 1.f, 0, 0, 0.0);

FT_Perspective = (float)(1024.f / (float)WindowWidth);
FT_Height = (float)(119.f / FT_Perspective);

iPos_x = 0;
iPos_y = WindowHeight - FT_Height;

RenderBitmap(531123, iPos_x, iPos_y, WindowWidth, FT_Height, 0.0, 0.0, 1.f, 119.f / 128.f, 0, 0, 0.0);

m_pgbLoding->SetValue(dwNow, dwTotal);
m_pgbLoding->Render();
   
//--
iPos_x = (42.f / FT_Perspective);
iPos_y = (WindowHeight - FT_Height) + (46.f / FT_Perspective);
FT_Width = (float)(WindowWidth - (84.f / FT_Perspective));

float relative = ((float)status_pgb / (float)total_pgb);

RenderBitmap(31122, iPos_x, iPos_y, FT_Width * relative, (8.f / FT_Perspective), 0.0, 0.0, 750.f / 1024.f, 1.f, 0, 0, 0.0);

float rate, SizeNew, Porcento;
double AnimX, AnimY;
float 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;

iPos_x += FT_Width * relative;
RenderBitmap(531124, iPos_x - (55.f / FT_Perspective), iPos_y - (42.f / FT_Perspective), (81.f / FT_Perspective), (81.f / FT_Perspective), AnimX, AnimY, WH, WH, 0, 0, 0.0);//Bar Frame

glColor3f(0.84, 0.85, 0.86);
rate = 100.f / (float)dwTotal;
Porcento = rate * dwNow;
CRenderNumber(GetWindowsX - 55.f, GetWindowsY - 26.f, Porcento, 1.0);
glColor3f(1.0, 1.0, 1.0);

glAlphaFunc(GL_GREATER, 0.25f);

::EndBitmap();
::EndOpengl();
::glFlush();
::SwapBuffers(hDC);
}

Gracias:


Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate


 

Related Topics

  Subject / Started by Replies Last post
1 Replies
499 Views
Last post June 05, 2021, 10:55:48 PM
by lunaticodeveloper
5 Replies
3647 Views
Last post September 20, 2022, 05:35:46 AM
by adryan
0 Replies
2041 Views
Last post May 06, 2024, 09:10:51 PM
by muccone
5 Replies
1827 Views
Last post April 24, 2025, 02:27:36 AM
by SPK
1 Replies
827 Views
Last post June 12, 2025, 02:53:28 PM
by mrtin