I keep get an annoying error, now its probably really easy to solve but its late and I can't think.
d:\hardball\projectfiles\hardball\hardball.h(29) : error C2143: syntax error : missing ';' before '*'
d:\hardball\projectfiles\hardball\hardball.h(29) : error C2501: 'CPanel' : missing storage-class or type specifiers
d:\hardball\projectfiles\hardball\hardball.h(29) : error C2501: 'm_pPanel1' : missing storage-class or type specifiers
Which points to this section of code
I don't understand since I am including panel.h where CPanel is defined, CPanel looks like thisCode:#ifndef HARDBALL_H #define HARDBALL_H #include "window.h" #include "direct3d.h" #include "panel.h" #define SafeRelease(pInterface) if(pInterface != NULL) {pInterface->Release(); pInterface=NULL;} #define SafeDelete(pObject) if(pObject != NULL) {delete pObject; pObject=NULL;} class CHardball { public: CHardball(); virtual ~CHardball(); bool Init(CDirect3D* pD3DWindow,CWindow* pWindow,HINSTANCE hInstance); CDirect3D* getD3D(); CWindow* getWindow(); void GameLoop(); protected: bool InitGame(); bool InitD3D(); void RenderText(); void Render2D(); void Render(); void Setup2DCamera(); CWindow* pWindow; CDirect3D* pD3D; CPanel* m_pPanel1; //Here it is DWORD m_dwFrames; DWORD m_dwStartTime; DWORD m_dwEndTime; DWORD m_dwTotalPolygons; }; #endif
[suttle hint]Code:#ifndef PANEL_H #define PANEL_H #include "direct3d.h" #include "hardball.h" #include "window.h" #define PANEL_D3DFVF_CUSTOMVERTEX (D3DFVF_XYZ|D3DFVF_DIFFUSE|D3DFVF_TEX1) class CPanel { public: CPanel(LPDIRECT3DDEVICE8 pD3DDevice, int nWidth, int nHeight, int nScreenWidth, int nScreenHeight, DWORD dwColour = -1); virtual ~CPanel(); bool setTexture(const char *szTextureFilePath, DWORD dwKeyColour = 0); DWORD Render(); void moveTo(int x,int y); protected: bool createVertices(); bool updateVertices(); LPDIRECT3DDEVICE8 m_pD3DDevice; LPDIRECT3DVERTEXBUFFER8 m_pVertexBuffer; LPDIRECT3DTEXTURE8 m_pTexture; int iWidth; int iHeight; int iScreenWidth; int iScreenHeight; DWORD dwColour; struct PANEL_CUSTOMVERTEX { float x, y, z; //Position of vertex DWORD colour; //Colour of vertex float u, v; //Texture coordinates }; }; #endif
I've included the zipped project files should anyone be kind enough to take a look.[/suttle hint]



LinkBack URL
About LinkBacks


