change core width and clut width

This commit is contained in:
Guido Diego Quispe Robles
2024-01-04 22:11:10 -03:00
parent 0c0fcd697f
commit aa21baaaf2
2 changed files with 17 additions and 13 deletions
+11 -11
View File
@@ -65,20 +65,20 @@ void Path3::sendTexture(const Texture* texture,
const RendererCoreTextureBuffers& texBuffers) { const RendererCoreTextureBuffers& texBuffers) {
packet2_reset(texturePacket, false); packet2_reset(texturePacket, false);
int coreWidth = texBuffers.core->width <= 64 ? 64 : texBuffers.core->width; packet2_update(
packet2_update(texturePacket, texturePacket,
draw_texture_transfer(texturePacket->base, texture->core->data, draw_texture_transfer(texturePacket->base, texture->core->data,
texture->getWidth(), texture->getWidth(), texture->getHeight(),
texture->getHeight(), texture->core->psm, texture->core->psm, texBuffers.core->address,
texBuffers.core->address, coreWidth)); texBuffers.core->width));
if (texBuffers.clut != nullptr) { if (texBuffers.clut != nullptr) {
auto* clut = texture->clut; auto* clut = texture->clut;
int clutWidth = texBuffers.clut->width <= 64 ? 64 : texBuffers.clut->width; packet2_update(
packet2_update(texturePacket, texturePacket,
draw_texture_transfer(texturePacket->next, clut->data, draw_texture_transfer(texturePacket->next, clut->data, clut->width,
clut->width, clut->height, clut->psm, clut->height, clut->psm, texBuffers.clut->address,
texBuffers.clut->address, clutWidth)); texBuffers.clut->width));
} }
packet2_chain_open_cnt(texturePacket, 0, 0, 0); packet2_chain_open_cnt(texturePacket, 0, 0, 0);
@@ -58,7 +58,9 @@ texbuffer_t* RendererCoreTextureSender::allocateTextureCore(
auto* result = new texbuffer_t; auto* result = new texbuffer_t;
const auto* core = t_texture->core; const auto* core = t_texture->core;
result->width = t_texture->getWidth(); int coreWidth = core->width <= 64 ? 64 : core->width;
result->width = coreWidth;
result->psm = core->psm; result->psm = core->psm;
result->info.components = core->components; result->info.components = core->components;
@@ -77,7 +79,9 @@ texbuffer_t* RendererCoreTextureSender::allocateTextureClut(
auto* result = new texbuffer_t; auto* result = new texbuffer_t;
const auto* clut = t_texture->clut; const auto* clut = t_texture->clut;
result->width = clut->width; int clutWidth = clut->width <= 64 ? 64 : clut->width;
result->width = clutWidth;
result->psm = clut->psm; result->psm = clut->psm;
result->info.components = clut->components; result->info.components = clut->components;