bool ProcessFrame()
{ 
	if(InMenu)
	{
		return true;
	}
	float x, y;
	Gerad.Getxy(x, y);
	if(Gerad.GetWalk())
	{
		if(InInterior)
		{
			if(CheckForExit(x, y))
			{
				int x, y;
				exitLocation->interiors[currentInterior].getxy(x, y);
				y += 20;
				Gerad.Setxy(x, y);
				currentLocation = exitLocation;
				Gerad.SetFront();
				background.load(currentLocation->getName());
				background.loadGLTextures();
				InInterior = false;
				return true;
			}
		}
        interiorLoop(x, y);
	    if(Gerad.GetRight())
		{
	        return GeradMoveRight(x, y);
        }
		else if(Gerad.GetBack())
        {
	        return GeradMoveBack(x, y);
		}
	    else if(Gerad.GetFront())
		{
	        return GeradMoveFront(x, y);
        }
        else if(Gerad.GetLeft())
        {
    	   return GeradMoveLeft(x, y);
        }
	}

  return true;
}
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();
}