Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
danij-deng committed Feb 28, 2013
1 parent e98f0f5 commit 42570e6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
20 changes: 10 additions & 10 deletions doomsday/client/src/gl/gl_tex.cpp
Expand Up @@ -27,6 +27,7 @@
#include "color.h"
#include "resource/colorpalettes.h"
#include "resource/r_data.h"
#include "render/r_main.h"

#include "gl/gl_tex.h"

Expand Down Expand Up @@ -750,22 +751,21 @@ void GL_DownMipmap8(uint8_t* in, uint8_t* fadedOut, int width, int height, float
}
}

boolean GL_PalettizeImage(uint8_t* out, int outformat, const colorpalette_t* palette,
boolean applyTexGamma, const uint8_t* in, int informat, int width, int height)
boolean GL_PalettizeImage(uint8_t *out, int outformat, colorpalette_t const *palette,
boolean applyTexGamma, uint8_t const *in, int informat, int width, int height)
{
assert(in && out && palette);
DENG2_ASSERT(in && out && palette);

if(0 >= width || 0 >= height)
if(width <= 0 || height <= 0)
return false;

if(informat <= 2 && outformat >= 3)
{
long numPels = width * height;
int inSize = (informat == 2 ? 1 : informat);
int outSize = (outformat == 2 ? 1 : outformat);
long const numPels = width * height;
int const inSize = (informat == 2 ? 1 : informat);
int const outSize = (outformat == 2 ? 1 : outformat);

{ long i;
for(i = 0; i < numPels; ++i)
for(long i = 0; i < numPels; ++i)
{
ColorPalette_Color(palette, *in, out);
if(applyTexGamma)
Expand All @@ -785,7 +785,7 @@ boolean GL_PalettizeImage(uint8_t* out, int outformat, const colorpalette_t* pal

in += inSize;
out += outSize;
}}
}
return true;
}
return false;
Expand Down
1 change: 1 addition & 0 deletions doomsday/client/src/m_misc.cpp
Expand Up @@ -419,6 +419,7 @@ DENG_EXTERN_C int M_ScreenShot(const char* name, int bits)
Str_Free(&fullName);
return result;
#else
DENG2_UNUSED2(name, bits);
return false;
#endif
}
Expand Down

0 comments on commit 42570e6

Please sign in to comment.