GSdx: GSRendererHW.h and GCC are good friends now.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4963 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
gabest11 2011-11-08 13:12:54 +00:00
parent 54688f1f98
commit 0cf87a943b
1 changed files with 56 additions and 38 deletions

View File

@ -38,6 +38,23 @@ class GSRendererHW : public GSRendererT<Vertex>
int m_upscale_multiplier;
int m_userhacks_skipdraw;
using GSRendererT<Vertex>::m_vt;
using GSRendererT<Vertex>::m_count;
using GSRendererT<Vertex>::m_env;
using GSRendererT<Vertex>::m_context;
using GSRendererT<Vertex>::m_vertices;
using GSRendererT<Vertex>::m_dev;
using GSRendererT<Vertex>::PRIM;
using GSRendererT<Vertex>::m_mem;
using GSRendererT<Vertex>::m_regs;
using GSRendererT<Vertex>::m_perfmon;
using GSRendererT<Vertex>::m_game;
using GSRendererT<Vertex>::s_dump;
using GSRendererT<Vertex>::s_save;
using GSRendererT<Vertex>::s_saven;
using GSRendererT<Vertex>::s_savez;
using GSRendererT<Vertex>::s_n;
#pragma region hacks
typedef bool (GSRendererHW::*OI_Ptr)(GSTexture* rt, GSTexture* ds, GSTextureCache::Source* t);
@ -546,13 +563,14 @@ class GSRendererHW : public GSRendererT<Vertex>
class Hacks
{
template<class T> struct HackEntry
template<class T> class HackEntry
{
public:
CRC::Title title;
CRC::Region region;
T func;
struct HackEntry(CRC::Title t, CRC::Region r, T f)
HackEntry(CRC::Title t, CRC::Region r, T f)
{
title = t;
region = r;
@ -569,7 +587,7 @@ class GSRendererHW : public GSRendererT<Vertex>
CRC::Title title = (CRC::Title)(key & 0xffffff);
CRC::Region region = (CRC::Region)(key >> 24);
for(list<HackEntry<T> >::iterator i = m_tbl.begin(); i != m_tbl.end(); i++)
for(typename list<HackEntry<T> >::iterator i = m_tbl.begin(); i != m_tbl.end(); i++)
{
if(i->title == title && (i->region == CRC::RegionCount || i->region == region))
{
@ -661,12 +679,12 @@ protected:
m_reset = true;
__super::Reset();
GSRendererT<Vertex>::Reset();
}
void VSync(int field)
{
__super::VSync(field);
GSRendererT<Vertex>::VSync(field);
m_tc->IncAge();
m_dev->AgePool();
@ -685,7 +703,7 @@ protected:
{
m_tc->RemoveAll();
__super::ResetDevice();
GSRendererT<Vertex>::ResetDevice();
}
GSTexture* GetOutput(int i)
@ -737,7 +755,7 @@ protected:
void Draw()
{
#ifndef NO_CRC_HACKS
if(IsBadFrame(m_skip, m_userhacks_skipdraw)) return;
if(GSRendererT<Vertex>::IsBadFrame(m_skip, m_userhacks_skipdraw)) return;
#endif
GSDrawingEnvironment& env = m_env;
@ -754,7 +772,7 @@ protected:
TEX0.TBW = context->FRAME.FBW;
TEX0.PSM = context->ZBUF.PSM;
GSTextureCache::Target* ds = m_tc->LookupTarget(TEX0, m_width, m_height, GSTextureCache::DepthStencil, m_context->DepthWrite());
GSTextureCache::Target* ds = m_tc->LookupTarget(TEX0, m_width, m_height, GSTextureCache::DepthStencil, context->DepthWrite());
if(!rt || !ds)
{
@ -836,7 +854,7 @@ protected:
if(context->TEST.ATE && context->TEST.ATST != ATST_ALWAYS)
{
if(TryAlphaTest(fm, zm))
if(GSRendererT<Vertex>::TryAlphaTest(fm, zm))
{
context->TEST.ATST = ATST_ALWAYS;
}
@ -857,20 +875,20 @@ protected:
//
GSVector4i r = GSVector4i(m_vt.m_min.p.xyxy(m_vt.m_max.p)).rintersect(GSVector4i(m_context->scissor.in));
GSVector4i r = GSVector4i(m_vt.m_min.p.xyxy(m_vt.m_max.p)).rintersect(GSVector4i(context->scissor.in));
if(fm != 0xffffffff)
{
rt->m_valid = rt->m_valid.runion(r);
m_tc->InvalidateVideoMem(m_context->offset.fb, r, false);
m_tc->InvalidateVideoMem(context->offset.fb, r, false);
}
if(zm != 0xffffffff)
{
ds->m_valid = ds->m_valid.runion(r);
m_tc->InvalidateVideoMem(m_context->offset.zb, r, false);
m_tc->InvalidateVideoMem(context->offset.zb, r, false);
}
//
@ -965,7 +983,7 @@ public:
void SetGameCRC(uint32 crc, int options)
{
__super::SetGameCRC(crc, options);
GSRendererT<Vertex>::SetGameCRC(crc, options);
m_hacks.SetGame(m_game);