From 8941f19cdb01bbe8c40851240d02019ed6e13a32 Mon Sep 17 00:00:00 2001 From: Tony Wasserka Date: Sun, 23 Mar 2014 21:44:23 +0100 Subject: BPMemory: Expose the pixel_format and zformat fields in PE_CONTROL as enumerations. --- .../Core/VideoBackends/Software/TextureEncoder.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'Source/Core/VideoBackends/Software/TextureEncoder.cpp') diff --git a/Source/Core/VideoBackends/Software/TextureEncoder.cpp b/Source/Core/VideoBackends/Software/TextureEncoder.cpp index cf99dbf911..5913125a08 100644 --- a/Source/Core/VideoBackends/Software/TextureEncoder.cpp +++ b/Source/Core/VideoBackends/Software/TextureEncoder.cpp @@ -1386,8 +1386,8 @@ void EncodeZ24halfscale(u8 *dst, u8 *src, u32 format) void Encode(u8 *dest_ptr) { - int pixelformat = bpmem.zcontrol.pixel_format; - bool bFromZBuffer = pixelformat == PIXELFMT_Z24; + auto pixelformat = bpmem.zcontrol.pixel_format; + bool bFromZBuffer = pixelformat == PEControl::Z24; bool bIsIntensityFmt = bpmem.triggerEFBCopy.intensity_fmt > 0; u32 copyfmt = ((bpmem.triggerEFBCopy.target_pixel_format / 2) + ((bpmem.triggerEFBCopy.target_pixel_format & 1) * 8)); @@ -1409,24 +1409,24 @@ void Encode(u8 *dest_ptr) if (bpmem.triggerEFBCopy.half_scale) { - if (pixelformat == PIXELFMT_RGBA6_Z24) + if (pixelformat == PEControl::RGBA6_Z24) EncodeRGBA6halfscale(dest_ptr, src, format); - else if (pixelformat == PIXELFMT_RGB8_Z24) + else if (pixelformat == PEControl::RGB8_Z24) EncodeRGB8halfscale(dest_ptr, src, format); - else if (pixelformat == PIXELFMT_RGB565_Z16) // not supported + else if (pixelformat == PEControl::RGB565_Z16) // not supported EncodeRGB8halfscale(dest_ptr, src, format); - else if (pixelformat == PIXELFMT_Z24) + else if (pixelformat == PEControl::Z24) EncodeZ24halfscale(dest_ptr, src, format); } else { - if (pixelformat == PIXELFMT_RGBA6_Z24) + if (pixelformat == PEControl::RGBA6_Z24) EncodeRGBA6(dest_ptr, src, format); - else if (pixelformat == PIXELFMT_RGB8_Z24) + else if (pixelformat == PEControl::RGB8_Z24) EncodeRGB8(dest_ptr, src, format); - else if (pixelformat == PIXELFMT_RGB565_Z16) // not supported + else if (pixelformat == PEControl::RGB565_Z16) // not supported EncodeRGB8(dest_ptr, src, format); - else if (pixelformat == PIXELFMT_Z24) + else if (pixelformat == PEControl::Z24) EncodeZ24(dest_ptr, src, format); } } -- cgit v1.2.3