Example #1
0
void display()
{
   ComposeFrame();
   background.drawGLbackground();
   if (!InMenu)
   {
	   if(text1)
	   {
		   Textbox.draw(0);
		   textPrintf(110/512.0, 420/512.0, font2, "Please save the princess.", color);
	   }
	   else if(text2)
	   {
		   Textbox.draw(0);
		   textPrintf(90/512.0, 420/512.0, font2, "I always knew that old wizard was no good.", color);
	   }
	   drawPeople();
       if(Gerad.GetWalk())
       {
           if(Gerad.GetRight())
           {
               DisplayDirection(0, 1, 2);
           }
           else if(Gerad.GetLeft())
           {
    	       DisplayDirection(3, 4, 5);
           }
           else if(Gerad.GetBack())
           {
	           DisplayDirection(9, 10, 11);
           }
           else if(Gerad.GetFront())
           {
	           DisplayDirection(6, 7, 8);
           }
       }
       else
       {
	       if(Gerad.GetRight())
           {
               DisplayDirection(0, 0, 0);
           }
           else if(Gerad.GetLeft())
           {
	           DisplayDirection(3, 3, 3);
           }
           else if(Gerad.GetBack())
           {
	           DisplayDirection(9, 9, 9);
           }
           else if(Gerad.GetFront())
           {
	           DisplayDirection(6, 6, 6);
           }
	   }
   }
   else
   {
	   inventory.draw();
   }

   glutSwapBuffers();
}