gopro2027

GTA V PS4 Custom Assets

Sep 27th, 2018
854
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.02 KB | None | 0 0
  1. //by gopro_2027
  2.  
  3. //PEA stood for something but I forgot what it was
  4. #define PEA(x) (x+0x400000)
  5.  
  6. //returns registered id for the thing
  7. int RegisterFile(const char *fullPath, const char *fileName)
  8. {
  9.     int(*pRegisterFile)(const char*, bool, const char*, bool, bool) = (void*)PEA(0x1F1D7E0);//1.27  //1.00 PEA(0x1B8EC20);
  10.    
  11.     return pRegisterFile(fullPath, true, fileName, false, false);
  12. }
  13.  
  14. //call this once
  15. void initCustomTexture() {
  16.     RegisterFile("/user/home/ps4texture.ytd","ps4texture.ytd");
  17. }
  18.  
  19. //render code
  20. void DrawSprite(char * textureDict, char * textureName, float x, float y, float sizeX, float sizeY, float rotation, int r, int g, int b, int a)
  21. {
  22.     GRAPHICS::REQUEST_STREAMED_TEXTURE_DICT(textureDict, false);
  23.     if (GRAPHICS::HAS_STREAMED_TEXTURE_DICT_LOADED(textureDict))
  24.     {
  25.         GRAPHICS::DRAW_SPRITE(textureDict, textureName, x, y, sizeX, sizeY, rotation, r, g, b, a);
  26.     }
  27. }
  28. DrawSprite("ps4texture","tux-288_512",0.5f,0.5f,1.0f,1.0f,0.0f,255,255,255,255);
  29.  
  30. Test file:
  31. https://anonfile.com/90aai6i5bb/ps4texture_ytd
Advertisement
Add Comment
Please, Sign In to add comment