diff options
| author | 2015-02-25 21:42:42 -0500 | |
|---|---|---|
| committer | 2015-02-25 21:42:42 -0500 | |
| commit | c7dac73b0c4f3552882f8e7a04ffff8ead435d7b (patch) | |
| tree | a159087da1d5d57754524150b265cdbbcc03aebc /src/video_core | |
| parent | Merge pull request #604 from Subv/arc_ssd (diff) | |
| parent | Video core: Fix A4 texture decoding (diff) | |
| download | yuzu-c7dac73b0c4f3552882f8e7a04ffff8ead435d7b.tar.gz yuzu-c7dac73b0c4f3552882f8e7a04ffff8ead435d7b.tar.xz yuzu-c7dac73b0c4f3552882f8e7a04ffff8ead435d7b.zip | |
Merge pull request #612 from yuriks/fix-A4
Video core: Fix A4 texture decoding
Diffstat (limited to 'src/video_core')
| -rw-r--r-- | src/video_core/debug_utils/debug_utils.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/video_core/debug_utils/debug_utils.cpp b/src/video_core/debug_utils/debug_utils.cpp index 795449423..f436aa541 100644 --- a/src/video_core/debug_utils/debug_utils.cpp +++ b/src/video_core/debug_utils/debug_utils.cpp | |||
| @@ -436,9 +436,9 @@ const Math::Vec4<u8> LookupTexture(const u8* source, int x, int y, const Texture | |||
| 436 | 436 | ||
| 437 | case Regs::TextureFormat::A4: | 437 | case Regs::TextureFormat::A4: |
| 438 | { | 438 | { |
| 439 | const u8* source_ptr = source + offset / 2 + i / 2; | 439 | const u8* source_ptr = source + (offset + i) / 2; |
| 440 | 440 | ||
| 441 | u8 a = (coarse_x % 2) ? ((*source_ptr)&0xF) : (((*source_ptr) & 0xF0) >> 4); | 441 | u8 a = (i % 2) ? ((*source_ptr & 0xF0) >> 4) : (*source_ptr & 0xF); |
| 442 | a = Color::Convert4To8(a); | 442 | a = Color::Convert4To8(a); |
| 443 | 443 | ||
| 444 | if (disable_alpha) { | 444 | if (disable_alpha) { |