Пример #1
0
VOID
PAL_StartFrame(
VOID
)
/*++
  Purpose:

  Starts a video frame. Called once per video frame.

  Parameters:

  None.

  Return value:

  None.

  --*/
{
	//
	// Run the game logic of one frame
	//
	PAL_GameUpdate(TRUE);
	if (gpGlobals->fEnteringScene)
	{
		return;
	}

	//
	// Update the positions and gestures of party members
	//
	PAL_UpdateParty();

	//
	// Update the scene
	//
	PAL_MakeScene();
	VIDEO_UpdateScreen(NULL);

	if (g_InputState.dwKeyPress & kKeyMenu)
	{
		//
		// Show the in-game menu
		//
		PAL_InGameMenu();
	}
	else if (g_InputState.dwKeyPress & kKeyUseItem)
	{
		//
		// Show the use item menu
		//
		PAL_GameUseItem();
	}
	else if (g_InputState.dwKeyPress & kKeyThrowItem)
	{
		//
		// Show the equipment menu
		//
		PAL_GameEquipItem();
	}
	else if (g_InputState.dwKeyPress & kKeyForce)
	{
		//
		// Show the magic menu
		//
		PAL_InGameMagicMenu();
	}
	else if (g_InputState.dwKeyPress & kKeyStatus)
	{
		//
		// Show the player status
		//
		PAL_PlayerStatus();
	}
	else if (g_InputState.dwKeyPress & kKeySearch)
	{
		//
		// Process search events
		//
		PAL_Search();
	}
	else if (g_InputState.dwKeyPress & kKeyFlee)
	{
		//
		// Quit Game
		//
		if (PAL_ConfirmMenu())
		{
			PAL_PlayMUS(0, FALSE, 2);
			PAL_FadeOut(2);
			PAL_Shutdown();
			exit(0);
		}
	}

	if (--gpGlobals->wChasespeedChangeCycles == 0)
	{
		gpGlobals->wChaseRange = 1;
	}
}
Пример #2
0
VOID
PAL_StartFrame(
   VOID
)
/*++
  Purpose:

    Starts a video frame. Called once per video frame.

  Parameters:

    None.

  Return value:

    None.

--*/
{
   //
   // Run the game logic of one frame
   //
	LoginInfo("PAL_StartFrame\n" );
   PAL_GameUpdate(TRUE);
   if (gpGlobals->fEnteringScene)
   {
      return;
   }

   //
   // Update the positions and gestures of party members
   //
   PAL_UpdateParty();

   //
   // Update the scene
   //
   PAL_MakeScene();
   VIDEO_UpdateScreen(NULL);

   if (g_InputState.dwKeyPress & kKeyMenu)
   {
      //
      // Show the in-game menu
      //
      PAL_InGameMenu();
   }
   else if (g_InputState.dwKeyPress & kKeyUseItem)
   {
      //
      // Show the use item menu
      //
      PAL_GameUseItem();
   }
   else if (g_InputState.dwKeyPress & kKeyStatus)
   {
      //
      // Show the player status
      //
      PAL_PlayerStatus();
   }
   else if (g_InputState.dwKeyPress & kKeySearch)
   {
      //
      // Process search events
      //
      PAL_Search();
   }

   if (--gpGlobals->wChasespeedChangeCycles == 0)
   {
      gpGlobals->wChaseRange = 1;
   }
}