Flawed engine, need help getting rid of singleton mania.

Started by
13 comments, last by Mastaba 17 years, 4 months ago
Quote:Original post by Robert Frunzke
Quote:Original post by chimera007
Robert Frunzke, the semi colons are missing cause i did lots of cut and pasting :P, i tried to minimize the code to the maximum.


There are too many semi colons.


Tell him you're talking about the semicolons after "}"'s
[size="2"]I like the Walrus best.
Advertisement
I only see 2 semi-colons after }'s and those are needed, as they are for class declarations.
.
Mauling Monkey: Thanks!!!!!
I will read this again after tomorrow's exam.. but seems it's what I was looking for.

About semicolons.. A compiler can tell you in 1 line what has been said in 5(or so) posts. Please stop.
Working on a fully self-funded project
Quote:Original post by Mastaba
I only see 2 semi-colons after }'s and those are needed, as they are for class declarations.


void DestroyMasterSprite() { SAFE_RELEASE(m_pMasterSprite); };void DestroyDevice() { SAFE_RELEASE(m_pD3dDevice); };void DestroyObject() { SAFE_RELEASE(m_pD3dObject); };D3DPRESENT_PARAMETERS* GetPresentParams() { return m_pd3dpp; };IDirect3DDevice9* GetDevice() { return m_pD3dDevice; };IDirect3D9* GetObject() { return m_pD3dObject; };ID3DXSprite* GetMasterSprite() { return m_pMasterSprite; };bool Start(){ return true; };void Update(){	if (CWindowTask::GetSingletonPtr()->IsActive() == false)		return;	//ClearScene(D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER);	//BeginScene();	//CStateMgrTask::GetSingletonPtr()->RenderState();	//EndScene();	PresentScene();};void Stop(){};;;;;;;;;;;;;;;;

Quote:Original post by Madster
About semicolons.. A compiler can tell you in 1 line what has been said in 5(or so) posts. Please stop.


These ones will not typically not be caught by your compiler without special flags. It's worth pointing out, if only because other programmers find them irksome.
Quote:Original post by MaulingMonkey
Quote:Original post by Mastaba
I only see 2 semi-colons after }'s and those are needed, as they are for class declarations.


void DestroyMasterSprite() { SAFE_RELEASE(m_pMasterSprite); };
void DestroyDevice() { SAFE_RELEASE(m_pD3dDevice); };
void DestroyObject() { SAFE_RELEASE(m_pD3dObject); };
D3DPRESENT_PARAMETERS* GetPresentParams() { return m_pd3dpp; };
IDirect3DDevice9* GetDevice() { return m_pD3dDevice; };
IDirect3D9* GetObject() { return m_pD3dObject; };
ID3DXSprite* GetMasterSprite() { return m_pMasterSprite; };
bool Start(){ return true; };
void Update(){
if (CWindowTask::GetSingletonPtr()->IsActive() == false)
return;

//ClearScene(D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER);
//BeginScene();
//CStateMgrTask::GetSingletonPtr()->RenderState();
//EndScene();
PresentScene();
};
void Stop(){};


Well, that's what I get for looking at the code when I'm half asleep.
.

This topic is closed to new replies.

Advertisement