Advertisement
Kiosani

Pseudo-Decompilation ItemToolTip Function 1.03.08 main

Jul 16th, 2021
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.85 KB | None | 0 0
  1. #define MAX_LEVEL 13
  2. #define MAX_CHARS 30
  3. #define MAX_LINES 100
  4. #define MAX_ITEMS 512
  5.  
  6. #define mGetItem(x,y) ((x*MAX_ITEMS)+y)
  7.  
  8. // 1.03.08 CHS
  9. #define oItemToolTip_Call01 0x005A0B34
  10. #define oItemToolTip_Call02 0x007222D6
  11. #define oItemToolTip_Call03 0x00722323
  12. #define oItemToolTip_Call04 0x0072234E
  13. #define oItemToolTip_Call05 0x00722379
  14. #define oItemToolTip_Call06 0x0074755A
  15. #define oItemToolTip_Call07 0x00771C0C
  16. #define pItemToolTip ((void(__cdecl*)(int CoordX,int CoordY,LPITEM lpItem,int a4,int a5))0x0058B520)
  17.  
  18. enum eColorID
  19. {
  20. WHITE=0,
  21. BLUE,
  22. RED,
  23. YELLOW,
  24. GREEN,
  25. WHITERED,
  26. PURPLE,
  27. WHITEBLUE,
  28. WHITEYELLOW,
  29. GREENBLUE,
  30. GRAY,
  31. LIGHTPURPLE,
  32. VIOLET,
  33. };
  34.  
  35. class cToolTip
  36. {
  37. public:
  38.  
  39. cToolTip();
  40.  
  41. void STTC RenderInfo(int CoordX,int CoordY,LPITEM lpItem,int a4,int a5);
  42.  
  43. private:
  44.  
  45. int NumberLine;
  46. int SpacedLine;
  47.  
  48. int TextBold[MAX_CHARS];
  49. int TextListColor[MAX_CHARS];
  50. char TextList[MAX_CHARS][MAX_LINES];
  51. };
  52.  
  53. extern cToolTip gToolTip;
  54.  
  55. cToolTip::cToolTip()
  56. {
  57. this->NumberLine=0;
  58. this->SpacedLine=0;
  59.  
  60. ZeroMemory(this->TextListColor,((MAX_CHARS-10)*sizeof(int)));
  61. }
  62.  
  63. void cToolTip::RenderInfo(int CoordX,int CoordY,LPITEM lpItem,int a4,int a5)
  64. {
  65. if(lpItem->Type==-1) return;
  66.  
  67. LPITEMATTR lpItemAttr = &ItemAttribute[lpItem->Type];
  68.  
  69. for(int y=0;y<MAX_CHARS;y++)
  70. {
  71. this->TextList[y][0]=0;
  72. }
  73.  
  74. sprintf(this->TextList[this->NumberLine],"\n");
  75.  
  76. this->NumberLine++;
  77. this->SpacedLine++;
  78.  
  79. int ItemLevel=(lpItem->Level>>3)&MAX_LEVEL;
  80.  
  81. switch(lpItem->Type)
  82. {
  83. case mGetItem(0,30):
  84. {
  85. sprintf(this->TextList[this->NumberLine],"new added text");
  86. this->TextListColor[this->NumberLine]=BLUE;
  87. this->TextBold[this->NumberLine]=0;
  88. this->NumberLine++;
  89. }
  90. break;
  91. }
  92.  
  93. pItemToolTip(CoordX,CoordY,lpItem,a4,a5);
  94. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement