Untitled

From Ivory Dove, 11 Years ago, written in C++, viewed 847 times.
URL https://paste.godclan.hu/view/krPCoSnU Embed
Download Paste or View Raw
  1. #pragma pack(push, 1)
  2. struct SScriptRectangle {
  3.     char bActive;
  4.     char gap_1[1];
  5.     short textureID;
  6.     float pos1x;
  7.     float pos1y;
  8.     float pos2x;
  9.     float pos2y;
  10.     int color;
  11. };
  12. #pragma pack(pop)
  13.  
  14. SScriptRectangle* g_pRectangles = (SScriptRectangle*)0x00813DF0;
  15.  
  16. bool DrawScriptRectangle(float posX, float posY, float w, float h, int color){
  17.     for(int i = 0; i < 16; i++){
  18.         if(!g_pRectangles[i]->bActive){
  19.             g_pRectangles[i]->bActive = 1;
  20.             g_pRectangles[i]->textureID = -1;
  21.             g_pRectangles[i]->pos1x = posX;
  22.             g_pRectangles[i]->pos1y = posY;
  23.             g_pRectangles[i]->pos2x = posX + w;
  24.             g_pRectangles[i]->pos2y = posY + h;
  25.             g_pRectangles[i]->color = color;
  26.             return true;
  27.         }
  28.     }
  29.     return false;
  30. }
  31.  

Reply to "Untitled"

Here you can reply to the paste above