Minor fixes

This commit is contained in:
robojumper
2025-03-27 15:51:45 +01:00
parent 811e774678
commit e8d9aae33e
2 changed files with 3 additions and 2 deletions
+2 -2
View File
@@ -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];