diff options
| author | robojumper <robojumper@gmail.com> | 2025-03-27 15:51:45 +0100 |
|---|---|---|
| committer | robojumper <robojumper@gmail.com> | 2025-03-27 15:51:45 +0100 |
| commit | e8d9aae33e779f6aee484eedc7d1a1df8307edb5 (patch) | |
| tree | 510573a24c3206cc1051c3e69f8d93c9ce3601ba /src/egg/gfx/eggCpuTexture.cpp | |
| parent | 811e7746780f14a4d26e351d592c79b52072e4df (diff) | |
Minor fixes
Diffstat (limited to 'src/egg/gfx/eggCpuTexture.cpp')
| -rw-r--r-- | src/egg/gfx/eggCpuTexture.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/egg/gfx/eggCpuTexture.cpp b/src/egg/gfx/eggCpuTexture.cpp index f5b925c9..955641a4 100644 --- a/src/egg/gfx/eggCpuTexture.cpp +++ b/src/egg/gfx/eggCpuTexture.cpp @@ -290,7 +290,7 @@ void CpuTexture::setColor(u16 x, u16 y, GXColor color) { case GX_TF_I8: case GX_TF_Z8: { // TODO - int offset = ((x >> 3) + (y >> 2) * (getWidth() / 8)) * 0x20 + (x & 3) * 8 + (x & 7); + int offset = ((x >> 3) + (y >> 2) * (getWidth() / 8)) * 0x20 + (y & 3) * 8 + (x & 7); u8 *dat = static_cast<u8 *>(getBuffer()) + offset; dat[0] = color.r; break; @@ -325,7 +325,7 @@ GXColor CpuTexture::getColor(u16 x, u16 y) const { case GX_TF_I8: case GX_TF_Z8: { // TODO - int offset = ((x >> 3) + (y >> 2) * (getWidth() / 8)) * 0x20 + (x & 3) * 8 + (x & 7); + int offset = ((x >> 3) + (y >> 2) * (getWidth() / 8)) * 0x20 + (y & 3) * 8 + (x & 7); u8 *dat = static_cast<u8 *>(getBuffer()) + offset; c.a = dat[0]; c.b = dat[0]; |
