Kiosani

Pequeña comparacion entre 1 funcion decompilada que usaba desde 1 DLL y la original del main

Aug 9th, 2021
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.23 KB | None | 0 0
  1. void cInterface::RenderHPUI(int PosX,int PosY,char *Text,int Life,int MaxLife,bool IsLive)
  2. {
  3. pSetBlend(true);
  4. pSetBackGround(pTextThis(),0x00,0x00,0x00,0x00);
  5. pSetTextColor(pTextThis(),0xFF,0xFF,0xFF,0xFF);
  6. if(IsLive)
  7. {
  8. glColor4f(0.2f,0.f,0.f,0.7f);
  9. }
  10. else
  11. {
  12. glColor4f(0.f,0.f,0.f,0.7f);
  13. }
  14. float PY = (double)(PosY+2);
  15. float PX = (double)(PosX+2);
  16. pRenderColor(PX,PY,53.f,13.f);
  17. pEndRenderColor();
  18. glColor4f(1.f,1.f,1.f,1.f);
  19. float BY = (double)PosY;
  20. float BX = (double)PosX;
  21. pDrawGUI(0x7B77,BX,BY,57.f,23.f);
  22. float CurrentLife = ((double)Life/(double)MaxLife)*49.f;
  23. float LifeY = (double)(PosY+16);
  24. float LifeX = (double)(PosX+4);
  25. pDrawGUI(0x7B78,LifeX,LifeY,CurrentLife,3.f);
  26. pDrawTextHealth(pTextThis(),PosX+28,PosY+5,Text,0,0,(LPINT)8,0);
  27. }
  28.  
  29.  
  30. void SEASON3B::CNewUIItemEnduranceInfo::RenderHPUI( int iX, int iY, unicode::t_char* pszName,
  31. int iLife, int iMaxLife/*=255*/, bool bWarning/*=false*/ )
  32. {
  33. EnableAlphaTest();
  34.  
  35. g_pRenderText->SetBgColor( 0, 0, 0, 0 );
  36. g_pRenderText->SetTextColor( 255, 255, 255, 255 );
  37.  
  38. // HPUI_FRAME
  39. if( bWarning == false )
  40. {
  41. glColor4f( 0.f, 0.f, 0.f, 0.7f );
  42. }
  43. else
  44. {
  45. glColor4f( 0.2f, 0.f, 0.f, 0.7f );
  46. }
  47.  
  48. RenderColor( iX+2, iY+2, PETHP_FRAME_WIDTH-4, PETHP_FRAME_HEIGHT-10 );
  49. EndRenderColor();
  50.  
  51. #ifdef PJH_FIX_SPRIT
  52. if(strcmp(pszName,GlobalText[1214]) == 0)
  53. {
  54. int iCharisma = CharacterAttribute->Charisma+CharacterAttribute->AddCharisma; // ¸¶À̳ʽº ¿­¸Å ÀÛ¾÷
  55. PET_INFO PetInfo;
  56. giPetManager::GetPetInfo(PetInfo, 421-PET_TYPE_DARK_SPIRIT);
  57. int RequireCharisma = (185+(PetInfo.m_wLevel*15));
  58. if( RequireCharisma > iCharisma )
  59. glColor4f ( 1.f, 0.5f, 0.5f, 1.f );
  60. else
  61. glColor4f ( 1.f, 1.f, 1.f, 1.f );
  62. }
  63. else
  64. #endif //#ifdef PJH_FIX_SPRIT
  65. glColor4f ( 1.f, 1.f, 1.f, 1.f );
  66. RenderImage( IMAGE_PETHP_FRAME, iX, iY, PETHP_FRAME_WIDTH, PETHP_FRAME_HEIGHT );
  67.  
  68. // HPUI_Bar
  69. float fLife = ((float)iLife/(float)iMaxLife)*(float)PETHP_BAR_WIDTH;
  70. RenderImage( IMAGE_PETHP_BAR, iX+4, iY+PETHP_FRAME_HEIGHT-PETHP_BAR_HEIGHT-4, fLife, PETHP_BAR_HEIGHT );
  71. // À̸§
  72. g_pRenderText->RenderText( iX+(PETHP_FRAME_WIDTH/2), iY+5, pszName, 0, 0, RT3_WRITE_CENTER );
  73.  
  74. DisableAlphaBlend();
  75. }
Advertisement
Add Comment
Please, Sign In to add comment