Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/src/tileatlasvx.cpp b/src/tileatlasvx.cpp
- index 711675c..35c4294 100644
- --- a/src/tileatlasvx.cpp
- +++ b/src/tileatlasvx.cpp
- @@ -61,7 +61,7 @@ static const StaticRect autotileVXRectsC[] =
- };
- static elementsN(autotileVXRectsC);
- -
- +#include <SDL_image.h>
- namespace TileAtlasVX
- {
- @@ -317,6 +317,14 @@ void build(TEXFBO &tf, Bitmap *bitmaps[BM_COUNT])
- #undef EXEC_BLITS
- GLMeta::blitEnd();
- +
- + int bpp; Uint32 rs, gs, bs, as;
- + SDL_PixelFormatEnumToMasks(SDL_PIXELFORMAT_ABGR8888, &bpp, &rs, &gs, &bs, &as);
- + SDL_Surface *surf = SDL_CreateRGBSurface(0, tf.width, tf.height, bpp, rs, gs, bs, as);
- + FBO::bind(tf.fbo);
- + gl.ReadPixels(0, 0, tf.width, tf.height, GL_RGBA, GL_UNSIGNED_BYTE, surf->pixels);
- + IMG_SavePNG(surf, "atlasvx.png");
- + SDL_FreeSurface(surf);
- }
- #define OVER_PLAYER_FLAG (1 << 4)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement