From: Andre` N. C. <ca...@op...> - 2001-05-17 17:04:13
|
Does any one see any errors here? It compiles fine it just doesn't WORK!:( BOOL LeftRight; BOOL TopBottom; BOOL ClickButton(RECT szRectName) { if ((g_x > szRectName.left) && (g_x < szRectName.right)) LeftRight = TRUE; else LeftRight = FALSE; if ((g_y < szRectName.top) && (g_y > szRectName.bottom)) TopBottom = TRUE; else TopBottom = FALSE; if ((LeftRight = TRUE) && (TopBottom = TRUE)) return TRUE; else return FALSE; } |
From: Brasier <br...@Pu...> - 2001-07-08 20:06:49
|
Hi, Can someone PLEASE tell me a website that is HTML (no downloads) that can give me a full a-z tutorial on OPEN GL for the DEV C++ compiler... i have tried nehe.gamedev.net but that is for visual C++ and i am far too new to translate :) Thanks for any info.... Steve.B |
From: Jeethu R. <je...@sa...> - 2001-07-17 05:12:00
|
go to www.gamecoding.co.uk they have a tutorial on OpenGL with DevC++ Regards, Jeethu Rao > -----Original Message----- > From: dev...@li... > [mailto:dev...@li...]On Behalf Of Brasier > Sent: Monday, July 09, 2001 1:37 AM > To: dev...@li... > Subject: [Dev-C++] help please > > > Hi, > > Can someone PLEASE tell me a website that is HTML (no downloads) > that can give me a full a-z tutorial on OPEN GL for the DEV C++ > compiler... > i have tried nehe.gamedev.net but that is for visual C++ and i am > far too new to translate :) > > Thanks for any info.... > > Steve.B > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > http://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
From: Elias P. <eli...@ao...> - 2001-05-17 17:14:30
|
> Does any one see any errors here? It compiles fine it just doesn't WORK!:( > BOOL LeftRight; > BOOL TopBottom; > > BOOL ClickButton(RECT szRectName) > { > if ((g_x > szRectName.left) && (g_x < szRectName.right)) > LeftRight = TRUE; > else LeftRight = FALSE; > > if ((g_y < szRectName.top) && (g_y > szRectName.bottom)) I think you want to swap the < and > in the above line. Elias Pschernig |
From: Andre` N. C. <ca...@op...> - 2001-05-17 17:36:11
|
I did that that was just a unnoticed byproduct. The acctual problem is I cannot get the RECT info into the function. if (ClickButton(exit,340,470,490,510) == TRUE) PostQuitMessage(0); else G.currGameState = GAMESTATE_NMENU; break; } And here is the function: BOOL ClickButton(RECT szRectName,int l,int t,int r,int b) { if ((g_x < szRectName.left) && (g_x > szRectName.right)) LeftRight = TRUE; else LeftRight = FALSE; if ((g_y > szRectName.top) && (g_y < szRectName.bottom)) TopBottom = TRUE; else TopBottom = FALSE; if ((LeftRight = TRUE) && (TopBottom = TRUE)) return TRUE; else return FALSE; } ----- Original Message ----- From: "Elias Pschernig" <eli...@ao...> To: <dev...@li...> Sent: Thursday, May 17, 2001 1:14 PM Subject: Re: [Dev-C++] help please > > Does any one see any errors here? It compiles fine it just doesn't > WORK!:( > > BOOL LeftRight; > > BOOL TopBottom; > > > > BOOL ClickButton(RECT szRectName) > > { > > if ((g_x > szRectName.left) && (g_x < szRectName.right)) > > LeftRight = TRUE; > > else LeftRight = FALSE; > > > > if ((g_y < szRectName.top) && (g_y > szRectName.bottom)) > > I think you want to swap the < and > in the above line. > > Elias Pschernig > > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > http://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |
From: <jos...@ya...> - 2001-05-18 07:34:51
|
Hi, I think the mistake is down there. Check out my correction. --- Andre` Niel Cameron <ca...@op...> escribió: > Does any one see any errors here? It compiles fine it just doesn't > WORK!:( > BOOL LeftRight; > BOOL TopBottom; > > BOOL ClickButton(RECT szRectName) > { > if ((g_x > szRectName.left) && (g_x < szRectName.right)) > LeftRight = TRUE; > else LeftRight = FALSE; > > if ((g_y < szRectName.top) && (g_y > szRectName.bottom)) > TopBottom = TRUE; > else TopBottom = FALSE; > > if ((LeftRight = TRUE) && (TopBottom = TRUE)) If you want to compare you need to use if ((LeftRight == TRUE) && (TopBottom == TRUE)) Otherwise you're just doing an assignment. > return TRUE; > else return FALSE; > } > hth Chemanuel _______________________________________________________________ Do You Yahoo!? Yahoo! Messenger: Comunicación instantánea gratis con tu gente - http://messenger.yahoo.es |
From: Penndragon <pen...@in...> - 2001-05-25 20:22:01
|
MM Andre The prob appears to be in your if statement. Using a single equals = character in an if statement tends to assign a vlale rather than do the = comparison sort. Use two equal signs for the comparison to work. MP Penn ----- Original Message -----=20 From: Andre` Niel Cameron=20 To: dev...@li...=20 Sent: Friday, May 18, 2001 3:06 AM Subject: [Dev-C++] help please Does any one see any errors here? It compiles fine it just doesn't = WORK!:( BOOL LeftRight; BOOL TopBottom; BOOL ClickButton(RECT szRectName) { if ((g_x > szRectName.left) && (g_x < szRectName.right)) LeftRight =3D TRUE; else LeftRight =3D FALSE; if ((g_y < szRectName.top) && (g_y > szRectName.bottom)) TopBottom =3D TRUE;=20 else TopBottom =3D FALSE; if ((LeftRight =3D TRUE) && (TopBottom =3D TRUE)) return TRUE; else return FALSE; } |