From 62a7f101a775acfaf17dd4214f8816632d10fd05 Mon Sep 17 00:00:00 2001 From: Soren Jorvang Date: Sun, 14 Nov 2010 23:56:26 +0000 Subject: Some compiler warnings and eol-style. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6418 8ced0084-cf51-0410-be5f-012b33b47a6e --- .../Core/VideoCommon/Src/FramebufferManagerBase.h | 184 ++++++++++----------- 1 file changed, 92 insertions(+), 92 deletions(-) (limited to 'Source/Core/VideoCommon/Src/FramebufferManagerBase.h') diff --git a/Source/Core/VideoCommon/Src/FramebufferManagerBase.h b/Source/Core/VideoCommon/Src/FramebufferManagerBase.h index a67346fe7b..14f2af1b51 100644 --- a/Source/Core/VideoCommon/Src/FramebufferManagerBase.h +++ b/Source/Core/VideoCommon/Src/FramebufferManagerBase.h @@ -1,92 +1,92 @@ - -#ifndef _FRAMEBUFFERMANAGER_H -#define _FRAMEBUFFERMANAGER_H - -#include - -#include "VideoCommon.h" - -inline bool addrRangesOverlap(u32 aLower, u32 aUpper, u32 bLower, u32 bUpper) -{ - return !((aLower >= bUpper) || (bLower >= aUpper)); -} - -struct XFBSourceBase -{ - virtual ~XFBSourceBase() {} - - // TODO: only DX9 uses the width/height params - virtual void Draw(const MathUtil::Rectangle &sourcerc, - const MathUtil::Rectangle &drawrc, int width, int height) const = 0; - - virtual void DecodeToTexture(u32 xfbAddr, u32 fbWidth, u32 fbHeight) = 0; - - virtual void CopyEFB() = 0; - - u32 srcAddr; - u32 srcWidth; - u32 srcHeight; - - int texWidth; - int texHeight; - - // TODO: only used by OGL - TargetRectangle sourceRc; -}; - -class FramebufferManagerBase -{ -public: - enum - { - // There may be multiple XFBs in GameCube RAM. This is the maximum number to - // virtualize. - MAX_VIRTUAL_XFB = 8 - }; - - FramebufferManagerBase(); - virtual ~FramebufferManagerBase(); - - static void CopyToXFB(u32 xfbAddr, u32 fbWidth, u32 fbHeight, const EFBRectangle& sourceRc); - static const XFBSourceBase* const* GetXFBSource(u32 xfbAddr, u32 fbWidth, u32 fbHeight, u32 &xfbCount); - -protected: - struct VirtualXFB - { - VirtualXFB() : xfbSource(NULL) {} - - // Address and size in GameCube RAM - u32 xfbAddr; - u32 xfbWidth; - u32 xfbHeight; - - XFBSourceBase *xfbSource; - }; - - typedef std::list VirtualXFBListType; - -private: - virtual XFBSourceBase* CreateXFBSource(unsigned int target_width, unsigned int target_height) = 0; - // TODO: figure out why OGL is different for this guy - virtual void GetTargetSize(unsigned int *width, unsigned int *height, const EFBRectangle& sourceRc) = 0; - - static VirtualXFBListType::iterator FindVirtualXFB(u32 xfbAddr, u32 width, u32 height); - - static void ReplaceVirtualXFB(); - - // TODO: merge these virtual funcs, they are nearly all the same - virtual void CopyToRealXFB(u32 xfbAddr, u32 fbWidth, u32 fbHeight, const EFBRectangle& sourceRc) = 0; - static void CopyToVirtualXFB(u32 xfbAddr, u32 fbWidth, u32 fbHeight, const EFBRectangle& sourceRc); - - static const XFBSourceBase* const* GetRealXFBSource(u32 xfbAddr, u32 fbWidth, u32 fbHeight, u32 &xfbCount); - static const XFBSourceBase* const* GetVirtualXFBSource(u32 xfbAddr, u32 fbWidth, u32 fbHeight, u32 &xfbCount); - - static XFBSourceBase *m_realXFBSource; // Only used in Real XFB mode - static VirtualXFBListType m_virtualXFBList; // Only used in Virtual XFB mode - - static const XFBSourceBase* m_overlappingXFBArray[MAX_VIRTUAL_XFB]; -}; - -extern FramebufferManagerBase *g_framebuffer_manager; - -#endif + +#ifndef _FRAMEBUFFERMANAGER_H +#define _FRAMEBUFFERMANAGER_H + +#include + +#include "VideoCommon.h" + +inline bool addrRangesOverlap(u32 aLower, u32 aUpper, u32 bLower, u32 bUpper) +{ + return !((aLower >= bUpper) || (bLower >= aUpper)); +} + +struct XFBSourceBase +{ + virtual ~XFBSourceBase() {} + + // TODO: only DX9 uses the width/height params + virtual void Draw(const MathUtil::Rectangle &sourcerc, + const MathUtil::Rectangle &drawrc, int width, int height) const = 0; + + virtual void DecodeToTexture(u32 xfbAddr, u32 fbWidth, u32 fbHeight) = 0; + + virtual void CopyEFB() = 0; + + u32 srcAddr; + u32 srcWidth; + u32 srcHeight; + + unsigned int texWidth; + unsigned int texHeight; + + // TODO: only used by OGL + TargetRectangle sourceRc; +}; + +class FramebufferManagerBase +{ +public: + enum + { + // There may be multiple XFBs in GameCube RAM. This is the maximum number to + // virtualize. + MAX_VIRTUAL_XFB = 8 + }; + + FramebufferManagerBase(); + virtual ~FramebufferManagerBase(); + + static void CopyToXFB(u32 xfbAddr, u32 fbWidth, u32 fbHeight, const EFBRectangle& sourceRc); + static const XFBSourceBase* const* GetXFBSource(u32 xfbAddr, u32 fbWidth, u32 fbHeight, u32 &xfbCount); + +protected: + struct VirtualXFB + { + VirtualXFB() : xfbSource(NULL) {} + + // Address and size in GameCube RAM + u32 xfbAddr; + u32 xfbWidth; + u32 xfbHeight; + + XFBSourceBase *xfbSource; + }; + + typedef std::list VirtualXFBListType; + +private: + virtual XFBSourceBase* CreateXFBSource(unsigned int target_width, unsigned int target_height) = 0; + // TODO: figure out why OGL is different for this guy + virtual void GetTargetSize(unsigned int *width, unsigned int *height, const EFBRectangle& sourceRc) = 0; + + static VirtualXFBListType::iterator FindVirtualXFB(u32 xfbAddr, u32 width, u32 height); + + static void ReplaceVirtualXFB(); + + // TODO: merge these virtual funcs, they are nearly all the same + virtual void CopyToRealXFB(u32 xfbAddr, u32 fbWidth, u32 fbHeight, const EFBRectangle& sourceRc) = 0; + static void CopyToVirtualXFB(u32 xfbAddr, u32 fbWidth, u32 fbHeight, const EFBRectangle& sourceRc); + + static const XFBSourceBase* const* GetRealXFBSource(u32 xfbAddr, u32 fbWidth, u32 fbHeight, u32 &xfbCount); + static const XFBSourceBase* const* GetVirtualXFBSource(u32 xfbAddr, u32 fbWidth, u32 fbHeight, u32 &xfbCount); + + static XFBSourceBase *m_realXFBSource; // Only used in Real XFB mode + static VirtualXFBListType m_virtualXFBList; // Only used in Virtual XFB mode + + static const XFBSourceBase* m_overlappingXFBArray[MAX_VIRTUAL_XFB]; +}; + +extern FramebufferManagerBase *g_framebuffer_manager; + +#endif -- cgit v1.2.3