From fbefc49c1510d483d5cbd5e4fc3f92255c344841 Mon Sep 17 00:00:00 2001 From: Sergey Lipskiy Date: Sat, 13 Dec 2014 20:23:21 +0600 Subject: [PATCH] Fix bytes calculation in loadblock. Fix Bettle adv racing: incorrect shadow project for map in menu #100 --- gDP.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gDP.cpp b/gDP.cpp index 6f9e24bb..aafb254b 100644 --- a/gDP.cpp +++ b/gDP.cpp @@ -731,7 +731,7 @@ void gDPLoadBlock(u32 tile, u32 uls, u32 ult, u32 lrs, u32 dxt) info.size = gDP.textureImage.size; info.loadType = LOADTYPE_BLOCK; - u32 bytes = (lrs + 1) << gDP.loadTile->size >> 1; + u32 bytes = (gDP.loadTile->lrs - gDP.loadTile->uls + 1) << 3; u32 address = gDP.textureImage.address + ult * gDP.textureImage.bpl + (uls << gDP.textureImage.size >> 1); if ((bytes == 0) ||