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

Revert "Use VI.real_height to make copy to RDRAM more safe."

Wrong solution - causes bottom black line when copied image is used as
background.

This reverts commit 2186d12c9230be48b1824aaabbee56f135f54d4d.
This commit is contained in:
Sergey Lipskiy 2015-02-19 15:18:31 +06:00
parent 9a3298eed2
commit 67e26af187

View File

@ -753,7 +753,7 @@ void FrameBufferToRDRAM::CopyToRDRAM( u32 address, bool bSync ) {
u32 *ptr_dst = (u32*)(RDRAM + m_aAddress);
u32 *ptr_src = (u32*)pixelData;
for (u32 y = 0; y <= VI.real_height; ++y) {
for (u32 y = 0; y < VI.height; ++y) {
for (u32 x = 0; x < VI.width; ++x)
ptr_dst[x + y*VI.width] = ptr_src[x + (VI.height - y - 1)*VI.width];
}
@ -761,7 +761,7 @@ void FrameBufferToRDRAM::CopyToRDRAM( u32 address, bool bSync ) {
u16 *ptr_dst = (u16*)(RDRAM + m_aAddress);
RGBA * ptr_src = (RGBA*)pixelData;
for (u32 y = 0; y <= VI.real_height; ++y) {
for (u32 y = 0; y < VI.height; ++y) {
for (u32 x = 0; x < VI.width; ++x) {
const RGBA & c = ptr_src[x + (VI.height - y - 1)*VI.width];
ptr_dst[(x + y*VI.width)^1] = ((c.r>>3)<<11) | ((c.g>>3)<<6) | ((c.b>>3)<<1) | (c.a == 0 ? 0 : 1);
@ -903,7 +903,7 @@ bool DepthBufferToRDRAM::CopyToRDRAM( u32 _address) {
const f32 trans = gSP.viewport.vtrans[2] * 32768.0f;
const u16 * const zLUT = depthBufferList().getZLUT();
for (u32 y = 0; y <= VI.real_height; ++y) {
for (u32 y = 0; y < VI.height; ++y) {
for (u32 x = 0; x < VI.width; ++x) {
f32 z = ptr_src[x + (VI.height - y - 1)*VI.width];
if (z == 1.0f)