Hi All,
I encounter a small issue using boolean.
Here is my code :
1st part, the main C project :
#include <gl/glut.h>
int argc;
char** argv;
#include "setup.c"
#include "camera.c"
#include "core.c"
int main( int argc, char** argv ){
  Constructor();
  SetDisplayMode( 640, 480 );
  Destructor();
  return 0;
 }
And now, part of setup.c file :
/* Variables globales au fichier lib */
BOOL FullSCREEN;
int WindowID;
/* Procedure d'initialisation de la lib DISPLAY */
void Constructor( void ){
  FullSCREEN = FALSE;
  glutInit( &argc, argv );                                       /* Initialize Glut */
/*  glutDisplayFunc( DisplayFunc ); */
/*  glutReshapeFunc( ReshapeFunc ); */
 }
/* Procedure de la fermeture de la librairie DISPLAY */
void Destructor( void ){
  glutDestroyWindow( WindowID );
 }
/* Cr?ation de la fen?tre d'affichage principale */
void SetDisplayMode( int Width, int Height ){                    /* TO DO : MUST ADDED WITH TO InitDisplayMode */
  /* Open the screen using windowed mode */
  glutInitDisplayMode( GLUT_DOUBLE | GLUT_RGBA );              /* Define display mode properties */
  glutInitWindowSize( Width, Height );
  glutInitWindowPosition( 32, 32 );
  WindowID == glutCreateWindow( "AmiDARK Basic application" ); /* Create the asked window */
  if (FullSCREEN = TRUE){
    glutGameModeString( "640x480:32" );
    glutEnterGameMode();
   }
 }
When I compile the main C file, it compiles correctly but, when I run it, it open a window and jump in fullscreen mode. It shouldn't jump in fullscreeen mode.
if I change in the SetDisplayMode() function, this line :
if (FullSCREEN = TRUE){
with :
if (FullSCREEN = FALSE){
then it run, open a window and quit correctly without using full screen mode...
Why does boolean act this way ? it should work as opposite than this . not ?
Kindest Regards,
Freddix