X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=plugins%2Fgpu_unai%2Fgpu_inner.h;h=4aab604299e99705f904a672dc8bc4d64f3210d2;hb=08b333774702ffc2d6a61bb0c8d690d9946a65c7;hp=83147903a19658acc2cd91e392fa79571104ef2b;hpb=92eab56ae97cb8cd2a198f960b61cc8f1086eaf8;p=pcsx_rearmed.git diff --git a/plugins/gpu_unai/gpu_inner.h b/plugins/gpu_unai/gpu_inner.h index 83147903..4aab6042 100644 --- a/plugins/gpu_unai/gpu_inner.h +++ b/plugins/gpu_unai/gpu_inner.h @@ -19,6 +19,9 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. * ***************************************************************************/ +#ifndef __GPU_UNAI_GPU_INNER_H__ +#define __GPU_UNAI_GPU_INNER_H__ + /////////////////////////////////////////////////////////////////////////////// // Inner loop driver instantiation file @@ -357,10 +360,10 @@ static void gpuSpriteSpanFn(u16 *pDst, u32 count, u8* pTxt, u32 u0) // Blend func can save an operation if it knows uSrc MSB is unset. // Untextured prims can always skip (source color always comes with MSB=0). // For textured prims, the generic lighting funcs always return it unset. (bonus!) - const bool skip_uSrc_mask = MSB_PRESERVED ? (!CF_TEXTMODE) : (!CF_TEXTMODE) || CF_LIGHT; + const bool skip_uSrc_mask = MSB_PRESERVED ? (!CF_TEXTMODE) : (!CF_TEXTMODE) || CF_LIGHT; uint_fast16_t uSrc, uDst, srcMSB; - bool should_blend; + bool should_blend; u32 u0_mask = gpu_unai.TextureWindow[2]; u8 r5, g5, b5; @@ -402,7 +405,7 @@ static void gpuSpriteSpanFn(u16 *pDst, u32 count, u8* pTxt, u32 u0) if (CF_LIGHT) uSrc = gpuLightingTXT(uSrc, r5, g5, b5); - should_blend = MSB_PRESERVED ? uSrc & 0x8000 : srcMSB; + should_blend = MSB_PRESERVED ? uSrc & 0x8000 : srcMSB; if (CF_BLEND && should_blend) uSrc = gpuBlending(uSrc, uDst); @@ -487,8 +490,8 @@ static void gpuPolySpanFn(const gpu_unai_t &gpu_unai, u16 *pDst, u32 count) // Blend func can save an operation if it knows uSrc MSB is unset. // Untextured prims can always skip this (src color MSB is always 0). // For textured prims, the generic lighting funcs always return it unset. (bonus!) - const bool skip_uSrc_mask = MSB_PRESERVED ? (!CF_TEXTMODE) : (!CF_TEXTMODE) || CF_LIGHT; - bool should_blend; + const bool skip_uSrc_mask = MSB_PRESERVED ? (!CF_TEXTMODE) : (!CF_TEXTMODE) || CF_LIGHT; + bool should_blend; u32 bMsk; if (CF_BLITMASK) bMsk = gpu_unai.blit_mask; @@ -653,7 +656,7 @@ endpolynotextgou: uSrc = gpuLightingTXT(uSrc, r5, g5, b5); } - should_blend = MSB_PRESERVED ? uSrc & 0x8000 : srcMSB; + should_blend = MSB_PRESERVED ? uSrc & 0x8000 : srcMSB; if (CF_BLEND && should_blend) uSrc = gpuBlending(uSrc, uDst); } @@ -727,3 +730,5 @@ const PP gpuPolySpanDrivers[2048] = { #undef TI #undef TN #undef TIBLOCK + +#endif /* __GPU_UNAI_GPU_INNER_H__ */