1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-07 03:13:49 +00:00

Fix texture address calculation in texturedRectBGCopy.

Fixed warp in Yoshi Story.
This commit is contained in:
Sergey Lipskiy 2015-02-19 13:02:57 +06:00
parent 2da470cf3a
commit 9a3298eed2

View File

@ -965,9 +965,9 @@ bool texturedRectBGCopy(const OGLRender::TexturedRectParams & _params)
const u32 uly = (u32)_params.uly;
const u32 lry = flry;
u8 * texaddr = RDRAM + gSP.textureTile[0]->imageAddress + tex_width*(u32)_params.ult + (u32)_params.uls;
u8 * texaddr = RDRAM + gDP.loadInfo[gSP.textureTile[0]->tmem].texAddress + tex_width*(u32)_params.ult + (u32)_params.uls;
u8 * fbaddr = RDRAM + gDP.colorImage.address + (u32)_params.ulx;
LOG(LOG_VERBOSE, "memrect (%d, %d, %d, %d), ci_width: %d texaddr: 0x%08lx fbaddr: 0x%08lx\n", (u32)_params.ulx, uly, (u32)_params.lrx, lry, gDP.colorImage.width, gSP.textureTile[0]->imageAddress + tex_width*(u32)_params.ult + (u32)_params.uls, gDP.colorImage.address + (u32)_params.ulx);
// LOG(LOG_VERBOSE, "memrect (%d, %d, %d, %d), ci_width: %d texaddr: 0x%08lx fbaddr: 0x%08lx\n", (u32)_params.ulx, uly, (u32)_params.lrx, lry, gDP.colorImage.width, gSP.textureTile[0]->imageAddress + tex_width*(u32)_params.ult + (u32)_params.uls, gDP.colorImage.address + (u32)_params.ulx);
for (u32 y = uly; y < lry; ++y) {
u8 *src = texaddr + (y - uly) * tex_width;