diff --git a/engine/src/renderer/core/paths/path3/path3.cpp b/engine/src/renderer/core/paths/path3/path3.cpp index 42c956a..83431a3 100644 --- a/engine/src/renderer/core/paths/path3/path3.cpp +++ b/engine/src/renderer/core/paths/path3/path3.cpp @@ -65,20 +65,20 @@ void Path3::sendTexture(const Texture* texture, const RendererCoreTextureBuffers& texBuffers) { packet2_reset(texturePacket, false); - int coreWidth = texBuffers.core->width <= 64 ? 64 : texBuffers.core->width; - packet2_update(texturePacket, - draw_texture_transfer(texturePacket->base, texture->core->data, - texture->getWidth(), - texture->getHeight(), texture->core->psm, - texBuffers.core->address, coreWidth)); + packet2_update( + texturePacket, + draw_texture_transfer(texturePacket->base, texture->core->data, + texture->getWidth(), texture->getHeight(), + texture->core->psm, texBuffers.core->address, + texBuffers.core->width)); if (texBuffers.clut != nullptr) { auto* clut = texture->clut; - int clutWidth = texBuffers.clut->width <= 64 ? 64 : texBuffers.clut->width; - packet2_update(texturePacket, - draw_texture_transfer(texturePacket->next, clut->data, - clut->width, clut->height, clut->psm, - texBuffers.clut->address, clutWidth)); + packet2_update( + texturePacket, + draw_texture_transfer(texturePacket->next, clut->data, clut->width, + clut->height, clut->psm, texBuffers.clut->address, + texBuffers.clut->width)); } packet2_chain_open_cnt(texturePacket, 0, 0, 0); diff --git a/engine/src/renderer/core/texture/renderer_core_texture_sender.cpp b/engine/src/renderer/core/texture/renderer_core_texture_sender.cpp index 56c90e5..8e94476 100644 --- a/engine/src/renderer/core/texture/renderer_core_texture_sender.cpp +++ b/engine/src/renderer/core/texture/renderer_core_texture_sender.cpp @@ -58,7 +58,9 @@ texbuffer_t* RendererCoreTextureSender::allocateTextureCore( auto* result = new texbuffer_t; 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->info.components = core->components; @@ -77,7 +79,9 @@ texbuffer_t* RendererCoreTextureSender::allocateTextureClut( auto* result = new texbuffer_t; 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->info.components = clut->components;