Fixed a compiler warning from pcsx2.

Fixed some bugs I noticed in my gsDummyTransfer() funct; idk if it fixes GT4 since my game isn't running on pcsx2 anymore (its always been a pain for me to get my version to work)
Anyways, going to rewrite the function again using a simpler algorithm thats less likely to messup.


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1835 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
cottonvibes 2009-09-16 23:13:44 +00:00
parent e20883d287
commit 9506d7a38c
2 changed files with 10 additions and 5 deletions

View File

@ -234,6 +234,7 @@ void mtgsThreadObject::Reset()
size += (x) * 16; \ size += (x) * 16; \
if ((pathidx==GIF_PATH_1)&&(pMem>=vuMemEnd)) pMem -= 0x4000; \ if ((pathidx==GIF_PATH_1)&&(pMem>=vuMemEnd)) pMem -= 0x4000; \
} }
#define subVal(x) ((x) ? (x-1) : 0)
__forceinline int mtgsThreadObject::_gifTransferDummy(GIF_PATH pathidx, const u8* pMem, u32 size) __forceinline int mtgsThreadObject::_gifTransferDummy(GIF_PATH pathidx, const u8* pMem, u32 size)
{ {
@ -278,14 +279,15 @@ __forceinline int mtgsThreadObject::_gifTransferDummy(GIF_PATH pathidx, const u8
if (size >= finish) goto endLoop; if (size >= finish) goto endLoop;
} }
if (!hasRegAD) { // Optimization: No Need to Loop if (!hasRegAD) { // Optimization: No Need to Loop
incPmem(numRegs * (path.tag.nloop-1)); incPmem(numRegs * subVal(path.tag.nloop));
break; break;
} }
} }
break; break;
case GIF_FLG_REGLIST: case GIF_FLG_REGLIST:
numRegs = (numRegs + 1) / 2; numRegs = (numRegs + 1) / 2;
incPmem(numRegs * path.tag.nloop); incPmem((numRegs - path.curreg) * path.tag.nloop);
incPmem((numRegs * subVal(path.tag.nloop)));
break; break;
case GIF_FLG_IMAGE: case GIF_FLG_IMAGE:
case GIF_FLG_IMAGE2: case GIF_FLG_IMAGE2:
@ -308,7 +310,10 @@ endLoop:
} }
else path.tag.nloop -= diff; else path.tag.nloop -= diff;
} }
else path.tag.nloop = 0; else {
path.curreg = 0;
path.tag.nloop = 0;
}
if (pathidx == GIF_PATH_3) { if (pathidx == GIF_PATH_3) {
gif->madr += size; gif->madr += size;

View File

@ -149,10 +149,10 @@ void LogOptionsDialog::LogChecked(wxCommandEvent &evt)
// (which would seem bad). // (which would seem bad).
wxCheckBox* checker = wxStaticCast( evt.GetEventObject(), wxCheckBox ); wxCheckBox* checker = wxStaticCast( evt.GetEventObject(), wxCheckBox );
switch( checker->GetId() ) /*switch( checker->GetId() )
{ {
// [TODO] : Implement me! // [TODO] : Implement me!
} }*/
evt.Skip(); evt.Skip();
} }