Address review feedback on protocol types
This commit is contained in:
1 parent
bcc765f3e7
commit
883e98bde0
11 files changed
+73
-86
No files matched your search
@@ -18,6 +18,7 @@
|
||||
#include "../../UI/SimpleIcon.h"
|
||||
#include "../CompassTexture.h"
|
||||
#include "../ClockTexture.h"
|
||||
#include <cstring>
|
||||
|
||||
const std::wstring PreStitchedTextureMap::NAME_MISSING_TEXTURE = L"missingno";
|
||||
|
||||
@@ -178,7 +179,7 @@ void PreStitchedTextureMap::stitch()
|
||||
|
||||
#ifdef __PSVITA__
|
||||
// AP - alpha cut out is expensive on vita so we mark which icons actually require it
|
||||
std::uint32_t *data = reinterpret_cast<std::uint32_t*>(this->getStitchedTexture()->getData()->getBuffer());
|
||||
const std::uint8_t *data = this->getStitchedTexture()->getData()->getBuffer();
|
||||
int Width = this->getStitchedTexture()->getWidth();
|
||||
int Height = this->getStitchedTexture()->getHeight();
|
||||
for(AUTO_VAR(it, texturesByName.begin()); it != texturesByName.end(); ++it)
|
||||
@@ -196,8 +197,10 @@ void PreStitchedTextureMap::stitch()
|
||||
{
|
||||
for( int u = u0;u < u1; u+= 1 )
|
||||
{
|
||||
std::uint32_t pixel = 0;
|
||||
std::memcpy(&pixel, data + ((v * Width + u) * sizeof(pixel)), sizeof(pixel));
|
||||
// is this texel alpha value < 0.1
|
||||
if( (data[v * Width + u] & 0xff000000) < 0x20000000 )
|
||||
if( (pixel & 0xff000000) < 0x20000000 )
|
||||
{
|
||||
// this texel is transparent. Mark the icon as such and bail
|
||||
preStitched->setFlags(Icon::IS_ALPHA_CUT_OUT);
|
||||
|
||||
Reference in new issue
Block a user