bool Game_Main(void)
{
sinput.DInput_Update(); //Update DirectInput to make sure it''s still alive
//if(KEY_DOWN(DIK_ESCAPE)) //Check to see if the user wants to quit
//PostQuitMessage(0);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); //Clear screen and depth buffer
glLoadIdentity(); //Reset the current modelview matrix
//Get in Ortho View
GetClientRect(hwnd,&window); //Get the window''s dimensions
glMatrixMode(GL_PROJECTION); //Select the projection matrix
glPushMatrix(); //Store the projection matrix
glLoadIdentity(); //Reset the projection matrix
glOrtho(0,window.right,0,window.bottom,-1,1); //Set up an ortho screen
glMatrixMode(GL_MODELVIEW); //Select the modelview matrix
// Menu
s3d.RenderMenus();
// FPS
s3d.Output_FPS(0,750, 1.0, 1.0, 1.0);
// Game Title
//s3d.glPrint(425,750,"Unknown Soldier",1.0,0.0,0.0);
// Check Input
s3d.Check_Input();
glMatrixMode(GL_PROJECTION); //Select the projection matrix
glPopMatrix(); //Restore the old projection matrix
glMatrixMode(GL_MODELVIEW); //Select the modelview matrix
SwapBuffers(hdc); //Finally, swap the buffers
return true;
}
Troubles with Particle System...
Hello, I am working on adding the NeHe particle system to my menu class but I am having troubles, it gives me this error...
E:\fps\main.cpp(135) : error C2601: ''Game_Main'' : local function definitions are illegal
E:\fps\main.cpp(181) : error C2601: ''Game_Shutdown'' : local function definitions are illegal
E:\fps\main.cpp(204) : error C2601: ''WinMain'' : local function definitions are illegal
E:\fps\main.cpp(222) : fatal error C1004: unexpected end of file found
here is an example of where it points too... The Game_Main error points here
I''m thinking it has to do with s3d, the engine...so can I not declare local variables in a function in engine.cpp (class declared by engine.h...) or what? I''m baffled by this error!
<- http://www.digitalexplosions.com ->
"Discipline is my sword, faith is my shield
do not dive into uncertainty, and you may live to reap the rewards" - (Unreal Championship)
I''ve never seen this error before, but I must ask if you''re sure about the scope of your variables. Are sinput and s3d declare in the same file as this function or properly "extern"ed?
______________________________________________________________________________________The Phoenix shall arise from the ashes... ThunderHawk -- ¦þ"So. Any n00bs need some pointers? I have a std::vector<n00b*> right here..." - ZahlmanMySite | Forum FAQ | File Formats______________________________________________________________________________________
December 09, 2002 09:17 AM
hey it''s Krisc at school
they are defined as globals in the main.cpp, same file as this function
like this:
they are defined as globals in the main.cpp, same file as this function
like this:
engine s3d;engineinput sinput;

you forgot possibly an ; at the end of a class/struct definition.
you have them all like this?
? all { closed with } ?
"take a look around" - limp bizkit
www.google.com
you have them all like this?
class/struct MyType {};
? all { closed with } ?
"take a look around" - limp bizkit
www.google.com
If that's not the help you're after then you're going to have to explain the problem better than what you have. - joanusdmentia
My Page davepermen.net | My Music on Bandcamp and on Soundcloud
December 09, 2002 09:28 AM
this sux, I cannot find out right now...but the thing is, it worked before I added the particle system...
They are all ended with a }; ...argh...maybe the knowledge base will help...
EDIT 1: ARRRRRRRRRGGGGHHHHHH...this compiler is sometimes so stupid...it is becuase in one of my functions, I forgot a } on a for loop...but its too dumb to say, look, this for loop never ends...durrrr oh well...
<- http://www.digitalexplosions.com ->
"Discipline is my sword, faith is my shield
do not dive into uncertainty, and you may live to reap the rewards" - (Unreal Championship)
[edited by - Krisc on December 9, 2002 6:02:51 PM]
EDIT 1: ARRRRRRRRRGGGGHHHHHH...this compiler is sometimes so stupid...it is becuase in one of my functions, I forgot a } on a for loop...but its too dumb to say, look, this for loop never ends...durrrr oh well...
<- http://www.digitalexplosions.com ->
"Discipline is my sword, faith is my shield
do not dive into uncertainty, and you may live to reap the rewards" - (Unreal Championship)
[edited by - Krisc on December 9, 2002 6:02:51 PM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement