Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate

Autor Topic: Consulta sobre Interface -> DrawItem  (Visto 1076 veces)

0 Miembros and 1 Guest are viewing this topic.

Offline xtestx Posteado: June 30, 2021, 01:55:18 AM | Modificado: June 30, 2021, 05:07:10 AM by xtestx

  • 0 puntos por ventas
  • *
  • Rank: Usuario activo
  • Posts: 73
  • Gracias recibida: 23
  • bs
Hola, tengo este código rescatado de alguna source (Por favor, informarme el autor para agregar creditos)

Funciona, el problema es que me dibuja el item en el tamaño que tiene cuando uno le hace click. Mi idea es dibujar el item con el tamaño que se ve en el inventario.

¿Alguien me da una mano?


Gracias desde ya!

Code: [Select]


void Interface::DrawItem(float PosX, float PosY, float Width, float Height, int ItemID, int Level, int Excl, int Anc, bool OnMouse)
{

// if (this->CheckWindow(ObjWindow::MoveList) || this->CheckWindow(ObjWindow::CashShop) || this->CheckWindow(ObjWindow::SkillTree) || this->CheckWindow(ObjWindow::FullMap)
// || (this->CheckWindow(Inventory) && this->CheckWindow(ExpandInventory) && this->CheckWindow(Store))
// || (this->CheckWindow(Inventory) && this->CheckWindow(Warehouse) && this->CheckWindow(ExpandWarehouse)))
// {
// return;
// }

pSetBlend(true);

glMatrixMode(0x1701);
glPushMatrix();
glLoadIdentity();

sub_6363D0_Addr(0, 0, *(GLsizei*)MAIN_RESOLUTION_X, *(GLsizei*)MAIN_RESOLUTION_Y);

float v2 = *(float*)MAIN_RESOLUTION_X / *(float*)MAIN_RESOLUTION_Y;

if (ItemID == 406)
{
sub_6358A0_Addr(0.4f, v2, *(float*)0xE61E38, *(float*)0xE61E3C); //tamanho do bmd
}
else if (ItemID == 407)
{
sub_6358A0_Addr(0.5f, v2, *(float*)0xE61E38, *(float*)0xE61E3C); //tamanho do bmd
}
else
{
sub_6358A0_Addr(0.7f, v2, *(float*)0xE61E38, *(float*)0xE61E3C); //tamanho do bmd
}


glMatrixMode(0x1700);
glPushMatrix();
glLoadIdentity();

sub_635830_Addr((LPVOID)0x87933A0);
sub_635DE0_Addr();
sub_635E40_Addr();

//posX
//posY
//Width
//Height
//unk
// 1 - Excellent Effect
// 1 - Aura +7
// 1 - original size
glClear(0x100);

pDrawItemModel(PosX, PosY, Width, Height, ItemID, Level, Excl, Anc, OnMouse);

// int v31 = pTest((double)PosY);
//int v32 = pTest((double)PosX);

VAngle v45;

unsigned __int8 v44 = 0; //0 = parado / 1 = girando

sub_6359B0_Addr(PosX, PosY, (int)&v45, 0); //posição do bmd
sub_5CA0D0_Addr(ItemID, Level, Excl, Anc, (int)&v45, v44, 0); //funão que mostra o BMD

//sub_636720_Addr();

glMatrixMode(0x1700);
glPopMatrix();

glMatrixMode(0x1701);
glPopMatrix();

//sub_637770_Addr();

glColor3f(1, 1, 1);
pSetBlend(false);
}


Edit:
Credits:@myheart

Gracias:


Offline emersonx13 #1 Posteado: June 30, 2021, 04:56:20 AM

  • MAESTRO

  • US. DE HONOR

  • LEYENDA

  • 3D Maker
  • 0 puntos por ventas
  • *
  • *
  • Rank: Puto amo
  • Posts: 523
  • Gracias recibida: 33113
  • br
Donate for my Work

BTC: 1HnXqN1wAh3EUC2Gi4WVH5Cj8fmihgeQze

Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate


 

Related Topics

  Subject / Started by Replies Last post
4 Replies
1564 Views
Last post June 05, 2017, 07:53:18 PM
by FrancoB
0 Replies
1029 Views
Last post June 18, 2017, 01:46:46 AM
by waltervg91
4 Replies
1822 Views
Last post February 07, 2018, 10:02:04 PM
by firemarcos
2 Replies
994 Views
Last post June 16, 2019, 07:13:31 PM
by wueso19
7 Replies
850 Views
Last post August 13, 2020, 11:30:45 AM
by Hoangsy99