mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-04 10:03:36 +00:00
Fix bug with line calculation in gDPLoadBlock.
Fixed South Park Rally (All) - Gfx Issue #391 and probably other similar issues.
This commit is contained in:
parent
2a56af9da1
commit
f6be5fd39f
|
@ -625,9 +625,10 @@ void gDPLoadBlock(u32 tile, u32 uls, u32 ult, u32 lrs, u32 dxt)
|
|||
u32 tmemAddr = gDP.loadTile->tmem;
|
||||
|
||||
if (dxt > 0) {
|
||||
u32 line = (2047 + dxt) / dxt;
|
||||
u32 bpl = line << 3;
|
||||
u32 height = bytes / bpl;
|
||||
const u32 widthInQWords = (bytes >> 3);
|
||||
const u32 height = (widthInQWords * dxt) / 2048;
|
||||
const u32 line = widthInQWords / height;
|
||||
const u32 bpl = line << 3;
|
||||
|
||||
for (u32 y = 0; y < height; ++y) {
|
||||
UnswapCopyWrap(RDRAM, address, (u8*)TMEM, tmemAddr << 3, 0xFFF, bpl);
|
||||
|
|
Loading…
Reference in New Issue
Block a user