summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTony Wasserka <NeoBrainX@gmail.com>2014-12-19 19:37:37 +0100
committerTony Wasserka <NeoBrainX@gmail.com>2014-12-20 18:06:56 +0100
commit871418e62b079a83d9121dca0ef75b91acbe77cd (patch)
treeefd831e31bc5c8d2d310c15bd6127b05c92f1fa4 /src
parentPica/DebugUtils: Fix two warnings. (diff)
downloadyuzu-871418e62b079a83d9121dca0ef75b91acbe77cd.tar
yuzu-871418e62b079a83d9121dca0ef75b91acbe77cd.tar.gz
yuzu-871418e62b079a83d9121dca0ef75b91acbe77cd.tar.bz2
yuzu-871418e62b079a83d9121dca0ef75b91acbe77cd.tar.lz
yuzu-871418e62b079a83d9121dca0ef75b91acbe77cd.tar.xz
yuzu-871418e62b079a83d9121dca0ef75b91acbe77cd.tar.zst
yuzu-871418e62b079a83d9121dca0ef75b91acbe77cd.zip
Diffstat (limited to 'src')
-rw-r--r--src/video_core/debug_utils/debug_utils.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/video_core/debug_utils/debug_utils.cpp b/src/video_core/debug_utils/debug_utils.cpp
index d9fed58bf..328386b7e 100644
--- a/src/video_core/debug_utils/debug_utils.cpp
+++ b/src/video_core/debug_utils/debug_utils.cpp
@@ -392,13 +392,13 @@ const Math::Vec4<u8> LookupTexture(const u8* source, int x, int y, const Texture
{
const u8* source_ptr = source + coarse_x * block_height * 2 + coarse_y * info.stride + texel_index_within_tile * 2;
- // TODO: compoent order not verified
+ // TODO: component order not verified
if (disable_alpha) {
// Show intensity as red, alpha as green
- return { *source_ptr, *(source_ptr+1), 0, 255 };
+ return { source_ptr[0], source_ptr[1], 0, 255 };
} else {
- return { *source_ptr, *source_ptr, *source_ptr, *(source_ptr+1)};
+ return { source_ptr[0], source_ptr[0], source_ptr[0], source_ptr[1]};
}
}
@@ -423,9 +423,9 @@ const Math::Vec4<u8> LookupTexture(const u8* source, int x, int y, const Texture
{
const u8* source_ptr = source + coarse_x * block_height / 2 + coarse_y * info.stride + texel_index_within_tile / 2;
- // TODO: compoent order not verified
+ // TODO: component order not verified
- u8 i = (*source_ptr)&0xF;
+ u8 i = (*source_ptr) & 0xF;
u8 a = ((*source_ptr) & 0xF0) >> 4;
a |= a << 4;
i |= i << 4;
@@ -442,11 +442,11 @@ const Math::Vec4<u8> LookupTexture(const u8* source, int x, int y, const Texture
{
const u8* source_ptr = source + coarse_x * block_height / 2 + coarse_y * info.stride + texel_index_within_tile / 2;
- // TODO: Order?
+ // TODO: component order not verified
+
u8 a = (coarse_x % 2) ? ((*source_ptr)&0xF) : (((*source_ptr) & 0xF0) >> 4);
a |= a << 4;
- // TODO: Better control this...
if (disable_alpha) {
return { *source_ptr, *source_ptr, *source_ptr, 255 };
} else {