Advertisement
Ancurio

Untitled

Oct 2nd, 2014
308
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 0.83 KB | None | 0 0
  1. diff --git a/src/tileatlasvx.cpp b/src/tileatlasvx.cpp
  2. index 711675c..35c4294 100644
  3. --- a/src/tileatlasvx.cpp
  4. +++ b/src/tileatlasvx.cpp
  5. @@ -61,7 +61,7 @@ static const StaticRect autotileVXRectsC[] =
  6.  };
  7.  
  8.  static elementsN(autotileVXRectsC);
  9. -
  10. +#include <SDL_image.h>
  11.  namespace TileAtlasVX
  12.  {
  13.  
  14. @@ -317,6 +317,14 @@ void build(TEXFBO &tf, Bitmap *bitmaps[BM_COUNT])
  15.  #undef EXEC_BLITS
  16.  
  17.     GLMeta::blitEnd();
  18. +
  19. +   int bpp; Uint32 rs, gs, bs, as;
  20. +   SDL_PixelFormatEnumToMasks(SDL_PIXELFORMAT_ABGR8888, &bpp, &rs, &gs, &bs, &as);
  21. +   SDL_Surface *surf = SDL_CreateRGBSurface(0, tf.width, tf.height, bpp, rs, gs, bs, as);
  22. +   FBO::bind(tf.fbo);
  23. +   gl.ReadPixels(0, 0, tf.width, tf.height, GL_RGBA, GL_UNSIGNED_BYTE, surf->pixels);
  24. +   IMG_SavePNG(surf, "atlasvx.png");
  25. +   SDL_FreeSurface(surf);
  26.  }
  27.  
  28.  #define OVER_PLAYER_FLAG (1 << 4)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement