From 3613588289df6b47ed47d7c45f486fbe0eb5b34c Mon Sep 17 00:00:00 2001 From: KSS <40847080+KSSBrawl@users.noreply.github.com> Date: Thu, 5 Dec 2024 11:11:22 -0600 Subject: [PATCH] Match AnmManager::LoadSprite The torment is over, but at what cost... --- src/AnmManager.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/AnmManager.cpp b/src/AnmManager.cpp index 65ff747e..fbff3edc 100644 --- a/src/AnmManager.cpp +++ b/src/AnmManager.cpp @@ -300,15 +300,14 @@ void AnmManager::LoadSprite(u32 spriteIdx, AnmLoadedSprite *sprite) this->sprites[spriteIdx] = *sprite; this->sprites[spriteIdx].spriteId = this->maybeLoadedSpriteCount++; - // For some reasons, all of thoses use a DIVR, how can we match here? this->sprites[spriteIdx].uvStart.x = - this->sprites[spriteIdx].startPixelInclusive.x / this->sprites[spriteIdx].textureWidth; + this->sprites[spriteIdx].startPixelInclusive.x / (this->sprites[spriteIdx].textureWidth); this->sprites[spriteIdx].uvEnd.x = - this->sprites[spriteIdx].endPixelInclusive.x / this->sprites[spriteIdx].textureWidth; + this->sprites[spriteIdx].endPixelInclusive.x / (this->sprites[spriteIdx].textureWidth); this->sprites[spriteIdx].uvStart.y = - this->sprites[spriteIdx].startPixelInclusive.y / this->sprites[spriteIdx].textureHeight; + this->sprites[spriteIdx].startPixelInclusive.y / (this->sprites[spriteIdx].textureHeight); this->sprites[spriteIdx].uvEnd.y = - this->sprites[spriteIdx].endPixelInclusive.y / this->sprites[spriteIdx].textureHeight; + this->sprites[spriteIdx].endPixelInclusive.y / (this->sprites[spriteIdx].textureHeight); this->sprites[spriteIdx].widthPx = this->sprites[spriteIdx].endPixelInclusive.x - this->sprites[spriteIdx].startPixelInclusive.x;