/*
- * These variables should be moved into the freeglut global state, but for now,
- * we'll put them here. They are for rendering the freeglut menu items.
+ * These variables are for rendering the freeglut menu items.
+ *
* The choices are fore- and background, with and without h for Highlighting.
* Old GLUT appeared to be system-dependant for its colors (sigh) so we are
* too. These variables should be stuffed into global state and initialized
* via the glutInit*() system.
*/
-
#if TARGET_HOST_WIN32
static float menu_pen_fore [4] = {0.0f, 0.0f, 0.0f, 1.0f};
static float menu_pen_back [4] = {0.85f, 0.85f, 0.85f, 1.0f};
SFG_MenuEntry* menuEntry = NULL;
freeglut_assert_ready;
- freeglut_return_if_fail( fgStructure.Menu != NULL );
- freeglut_return_if_fail( subMenu != NULL );
+ freeglut_return_if_fail( fgStructure.Menu );
+ freeglut_return_if_fail( subMenu );
menuEntry = fghFindMenuEntry( fgStructure.Menu, item );
- freeglut_return_if_fail( menuEntry != NULL );
+ freeglut_return_if_fail( menuEntry );
/*
* We want it to become a sub menu entry, so:
*/
- if( menuEntry->Text != NULL )
+ if( menuEntry->Text )
free( menuEntry->Text );
menuEntry->Text = strdup( label );
freeglut_assert_ready;
freeglut_return_if_fail( fgStructure.Menu );
menuEntry = fghFindMenuEntry( fgStructure.Menu, item );
- freeglut_return_if_fail( menuEntry != NULL );
+ freeglut_return_if_fail( menuEntry );
fgListRemove( &fgStructure.Menu->Entries, &menuEntry->Node );
free( menuEntry->Text );
free( menuEntry );