Skip to content

Commit

Permalink
Reset member variables in CGraphics constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
botder committed Sep 11, 2019
1 parent 1969b6e commit 05a581e
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 29 deletions.
3 changes: 0 additions & 3 deletions Client/core/Graphics/CGraphics.cpp
Expand Up @@ -44,9 +44,6 @@ CGraphics::CGraphics(CLocalGUI* pGUI)
m_pGUI = pGUI;
memset(m_pDXFonts, 0, sizeof(m_pDXFonts));
memset(m_pBigDXFonts, 0, sizeof(m_pBigDXFonts));
m_pDevice = NULL;
m_pLineInterface = NULL;
m_pDXSprite = NULL;

m_iDebugQueueRefs = 0;
m_iDrawBatchRefCount = 0;
Expand Down
52 changes: 26 additions & 26 deletions Client/core/Graphics/CGraphics.h
Expand Up @@ -212,25 +212,25 @@ class CGraphics : public CGraphicsInterface, public CSingleton<CGraphics>
EDrawModeType m_CurDrawMode;
EBlendModeType m_CurBlendMode;

LPD3DXSPRITE m_pDXSprite;

IDirect3DDevice9* m_pDevice;

CRenderItemManager* m_pRenderItemManager;
CScreenGrabberInterface* m_pScreenGrabber;
CPixelsManagerInterface* m_pPixelsManager;
CTileBatcher* m_pTileBatcher;
CLine3DBatcher* m_pLine3DBatcherPreGUI;
CLine3DBatcher* m_pLine3DBatcherPostGUI;
CMaterialLine3DBatcher* m_pMaterialLine3DBatcherPreGUI;
CMaterialLine3DBatcher* m_pMaterialLine3DBatcherPostGUI;
CPrimitiveBatcher* m_pPrimitiveBatcher;
CPrimitiveMaterialBatcher* m_pPrimitiveMaterialBatcher;
CPrimitive3DBatcher* m_pPrimitive3DBatcherPreGUI;
CPrimitive3DBatcher* m_pPrimitive3DBatcherPostGUI;
CMaterialPrimitive3DBatcher* m_pMaterialPrimitive3DBatcherPreGUI;
CMaterialPrimitive3DBatcher* m_pMaterialPrimitive3DBatcherPostGUI;
CAspectRatioConverter* m_pAspectRatioConverter;
LPD3DXSPRITE m_pDXSprite = nullptr;

IDirect3DDevice9* m_pDevice = nullptr;

CRenderItemManager* m_pRenderItemManager = nullptr;
CScreenGrabberInterface* m_pScreenGrabber = nullptr;
CPixelsManagerInterface* m_pPixelsManager = nullptr;
CTileBatcher* m_pTileBatcher = nullptr;
CLine3DBatcher* m_pLine3DBatcherPreGUI = nullptr;
CLine3DBatcher* m_pLine3DBatcherPostGUI = nullptr;
CMaterialLine3DBatcher* m_pMaterialLine3DBatcherPreGUI = nullptr;
CMaterialLine3DBatcher* m_pMaterialLine3DBatcherPostGUI = nullptr;
CPrimitiveBatcher* m_pPrimitiveBatcher = nullptr;
CPrimitiveMaterialBatcher* m_pPrimitiveMaterialBatcher = nullptr;
CPrimitive3DBatcher* m_pPrimitive3DBatcherPreGUI = nullptr;
CPrimitive3DBatcher* m_pPrimitive3DBatcherPostGUI = nullptr;
CMaterialPrimitive3DBatcher* m_pMaterialPrimitive3DBatcherPreGUI = nullptr;
CMaterialPrimitive3DBatcher* m_pMaterialPrimitive3DBatcherPostGUI = nullptr;
CAspectRatioConverter* m_pAspectRatioConverter = nullptr;

// Fonts
ID3DXFont* m_pDXFonts[NUM_FONTS];
Expand Down Expand Up @@ -351,7 +351,7 @@ class CGraphics : public CGraphicsInterface, public CSingleton<CGraphics>
void RemoveQueueRef(IUnknown* pUnknown);

// Drawing types
struct ID3DXLine* m_pLineInterface;
struct ID3DXLine* m_pLineInterface = nullptr;

enum EMTARenderZone
{
Expand All @@ -361,13 +361,13 @@ class CGraphics : public CGraphicsInterface, public CSingleton<CGraphics>
};

EMTARenderZone m_MTARenderZone;
int m_iOutsideZoneCount;
IDirect3DStateBlock9* m_pSavedStateBlock;
int m_iOutsideZoneCount = 0;
IDirect3DStateBlock9* m_pSavedStateBlock = nullptr;
CElapsedTime m_LastRenderedSceneTimer;
IDirect3DSurface9* m_pSavedFrontBufferData;
CRenderTargetItem* m_pTempBackBufferData;
CTextureItem* m_ProgressSpinnerTexture;
CTextureItem* m_RectangleEdgeTexture;
IDirect3DSurface9* m_pSavedFrontBufferData = nullptr;
CRenderTargetItem* m_pTempBackBufferData = nullptr;
CTextureItem* m_ProgressSpinnerTexture = nullptr;
CTextureItem* m_RectangleEdgeTexture = nullptr;
SString m_strProgressMessage;
CElapsedTime m_FirstDrawnProgressTimer;
CElapsedTime m_LastDrawnProgressTimer;
Expand Down

0 comments on commit 05a581e

Please sign in to comment.