mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 21:30:19 -06:00
Clean up most (99.99%) of the tab/space mismatches in the VideoSoftware project.
Got rid of trailing spaces that were unnecessary too. Also update the license header for this project. We don't use SVN anymore.
This commit is contained in:
@ -12,7 +12,7 @@
|
||||
// A copy of the GPL 2.0 should have been included with the program.
|
||||
// If not, see http://www.gnu.org/licenses/
|
||||
|
||||
// Official SVN repository and contact information can be found at
|
||||
// Official Git repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#include "VideoCommon.h"
|
||||
@ -26,15 +26,15 @@ XFRegisters swxfregs;
|
||||
|
||||
void InitXFMemory()
|
||||
{
|
||||
memset(&swxfregs, 0, sizeof(swxfregs));
|
||||
memset(&swxfregs, 0, sizeof(swxfregs));
|
||||
}
|
||||
|
||||
void XFWritten(u32 transferSize, u32 baseAddress)
|
||||
{
|
||||
u32 topAddress = baseAddress + transferSize;
|
||||
u32 topAddress = baseAddress + transferSize;
|
||||
|
||||
if (baseAddress <= 0x1026 && topAddress >= 0x1020)
|
||||
Clipper::SetViewOffset();
|
||||
if (baseAddress <= 0x1026 && topAddress >= 0x1020)
|
||||
Clipper::SetViewOffset();
|
||||
|
||||
// fix lights so invalid values don't trash the lighting computations
|
||||
if (baseAddress <= 0x067f && topAddress >= 0x0604)
|
||||
@ -63,32 +63,32 @@ void XFWritten(u32 transferSize, u32 baseAddress)
|
||||
|
||||
void SWLoadXFReg(u32 transferSize, u32 baseAddress, u32 *pData)
|
||||
{
|
||||
u32 size = transferSize;
|
||||
u32 size = transferSize;
|
||||
|
||||
// do not allow writes past registers
|
||||
if (baseAddress + transferSize > 0x1058)
|
||||
{
|
||||
INFO_LOG(VIDEO, "xf load exceeds address space: %x %d bytes\n", baseAddress, transferSize);
|
||||
// do not allow writes past registers
|
||||
if (baseAddress + transferSize > 0x1058)
|
||||
{
|
||||
INFO_LOG(VIDEO, "xf load exceeds address space: %x %d bytes\n", baseAddress, transferSize);
|
||||
|
||||
if (baseAddress >= 0x1058)
|
||||
size = 0;
|
||||
else
|
||||
size = 0x1058 - baseAddress;
|
||||
}
|
||||
|
||||
if (size > 0) {
|
||||
memcpy_gc( &((u32*)&swxfregs)[baseAddress], pData, size * 4);
|
||||
XFWritten(transferSize, baseAddress);
|
||||
}
|
||||
if (baseAddress >= 0x1058)
|
||||
size = 0;
|
||||
else
|
||||
size = 0x1058 - baseAddress;
|
||||
}
|
||||
|
||||
if (size > 0)
|
||||
{
|
||||
memcpy_gc( &((u32*)&swxfregs)[baseAddress], pData, size * 4);
|
||||
XFWritten(transferSize, baseAddress);
|
||||
}
|
||||
}
|
||||
|
||||
void SWLoadIndexedXF(u32 val, int array)
|
||||
{
|
||||
int index = val >> 16;
|
||||
int address = val & 0xFFF; //check mask
|
||||
int size = ((val >> 12) & 0xF) + 1;
|
||||
//load stuff from array to address in xf mem
|
||||
int index = val >> 16;
|
||||
int address = val & 0xFFF; //check mask
|
||||
int size = ((val >> 12) & 0xF) + 1;
|
||||
//load stuff from array to address in xf mem
|
||||
|
||||
u32 *pData = (u32*)Memory::GetPointer(arraybases[array] + arraystrides[array]*index);
|
||||
|
||||
|
Reference in New Issue
Block a user