Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/src/tileatlasvx.cpp b/src/tileatlasvx.cpp
- index d8ac718..e0bae38 100644
- --- a/src/tileatlasvx.cpp
- +++ b/src/tileatlasvx.cpp
- @@ -31,6 +31,7 @@
- #include "glstate.h"
- #include "texpool.h"
- #include "util.h"
- +#include <SDL_image.h>
- #include <assert.h>
- #include <vector>
- @@ -314,6 +315,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, "__atlas.png");
- + SDL_FreeSurface(surf);
- }
- #define OVER_PLAYER_FLAG (1 << 4)
Add Comment
Please, Sign In to add comment