GregMiscellaneous: zzogl-pg: Move a few functions into CMemoryTargetMngr.

git-svn-id: http://pcsx2.googlecode.com/svn/branches/GregMiscellaneous@3836 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
arcum42 2010-09-25 13:33:58 +00:00
parent 0f38318fab
commit 8036106b07
2 changed files with 9 additions and 6 deletions

View File

@ -1906,7 +1906,7 @@ inline list<CMemoryTarget>::iterator ZeroGS::CMemoryTargetMngr::DestroyTargetIte
return it; return it;
} }
int MemoryTarget_CompareTarget(list<CMemoryTarget>::iterator& it, const tex0Info& tex0, int clutsize, int nClutOffset) int ZeroGS::CMemoryTargetMngr::CompareTarget(list<CMemoryTarget>::iterator& it, const tex0Info& tex0, int clutsize, int nClutOffset)
{ {
if (PSMT_ISCLUT(it->psm) != PSMT_ISCLUT(tex0.psm)) if (PSMT_ISCLUT(it->psm) != PSMT_ISCLUT(tex0.psm))
{ {
@ -1947,7 +1947,7 @@ int MemoryTarget_CompareTarget(list<CMemoryTarget>::iterator& it, const tex0Info
return 0; return 0;
} }
void MemoryTarget_GetClutVariables(int& nClutOffset, int& clutsize, const tex0Info& tex0) void ZeroGS::CMemoryTargetMngr::GetClutVariables(int& nClutOffset, int& clutsize, const tex0Info& tex0)
{ {
nClutOffset = 0; nClutOffset = 0;
clutsize = 0; clutsize = 0;
@ -1969,7 +1969,7 @@ void MemoryTarget_GetClutVariables(int& nClutOffset, int& clutsize, const tex0In
} }
} }
void MemoryTarget_GetMemAddress(int& start, int& end, const tex0Info& tex0) void ZeroGS::CMemoryTargetMngr::GetMemAddress(int& start, int& end, const tex0Info& tex0)
{ {
int nbStart, nbEnd; int nbStart, nbEnd;
GetRectMemAddress(nbStart, nbEnd, tex0.psm, 0, 0, tex0.tw, tex0.th, tex0.tbp0, tex0.tbw); GetRectMemAddress(nbStart, nbEnd, tex0.psm, 0, 0, tex0.tw, tex0.th, tex0.tbp0, tex0.tbw);
@ -1990,7 +1990,7 @@ ZeroGS::CMemoryTarget* ZeroGS::CMemoryTargetMngr::SearchExistTarget(int start, i
if (it->starty <= start && it->starty + it->height >= end) if (it->starty <= start && it->starty + it->height >= end)
{ {
int res = MemoryTarget_CompareTarget(it, tex0, clutsize, nClutOffset); int res = CompareTarget(it, tex0, clutsize, nClutOffset);
if (res == 1) if (res == 1)
{ {
@ -2099,8 +2099,8 @@ ZeroGS::CMemoryTarget* ZeroGS::CMemoryTargetMngr::GetMemoryTarget(const tex0Info
FUNCLOG FUNCLOG
int start, end, nClutOffset, clutsize; int start, end, nClutOffset, clutsize;
MemoryTarget_GetClutVariables(nClutOffset, clutsize, tex0); GetClutVariables(nClutOffset, clutsize, tex0);
MemoryTarget_GetMemAddress(start, end, tex0); GetMemAddress(start, end, tex0);
ZeroGS::CMemoryTarget* it = SearchExistTarget(start, end, nClutOffset, clutsize, tex0, forcevalidate); ZeroGS::CMemoryTarget* it = SearchExistTarget(start, end, nClutOffset, clutsize, tex0, forcevalidate);

View File

@ -127,6 +127,7 @@ class CMemoryTargetMngr
CMemoryTarget* GetMemoryTarget(const tex0Info& tex0, int forcevalidate); // pcbp is pointer to start of clut CMemoryTarget* GetMemoryTarget(const tex0Info& tex0, int forcevalidate); // pcbp is pointer to start of clut
CMemoryTarget* SearchExistTarget(int start, int end, int nClutOffset, int clutsize, const tex0Info& tex0, int forcevalidate); CMemoryTarget* SearchExistTarget(int start, int end, int nClutOffset, int clutsize, const tex0Info& tex0, int forcevalidate);
CMemoryTarget* ClearedTargetsSearch(int fmt, int widthmult, int channels, int height); CMemoryTarget* ClearedTargetsSearch(int fmt, int widthmult, int channels, int height);
int CompareTarget(list<CMemoryTarget>::iterator& it, const tex0Info& tex0, int clutsize, int nClutOffset);
void Destroy(); // destroy all targs void Destroy(); // destroy all targs
@ -139,6 +140,8 @@ class CMemoryTargetMngr
private: private:
list<CMemoryTarget>::iterator DestroyTargetIter(list<CMemoryTarget>::iterator& it); list<CMemoryTarget>::iterator DestroyTargetIter(list<CMemoryTarget>::iterator& it);
void GetClutVariables(int& nClutOffset, int& clutsize, const tex0Info& tex0);
void GetMemAddress(int& start, int& end, const tex0Info& tex0);
}; };
class CBitwiseTextureMngr class CBitwiseTextureMngr