예제 #1
0
void T7RunnerEnginePlugin::OnInitEnginePlugin()
{
  hkvLog::Info("T7RunnerEnginePlugin:OnInitEnginePlugin()");

  VISION_HAVOK_SYNC_STATICS();
  VISION_PLUGIN_ENSURE_LOADED(vHavok);
  VISION_PLUGIN_ENSURE_LOADED(vHavokBehavior);
  VISION_PLUGIN_ENSURE_LOADED(vFmodEnginePlugin);

  Vision::RegisterModule(&g_myComponentModule);
  MyGameManager::GlobalManager().OneTimeInit();
}
예제 #2
0
void VPlayerApp::PreloadPlugins()
{
  VISION_PLUGIN_ENSURE_LOADED(vFmodEnginePlugin);
  VISION_PLUGIN_ENSURE_LOADED(vHavok);

  PreloadHavokPlugins();
  PreloadThirdPartyPlugins();

#if defined(_DLL)
  //Always load the remote input plugin to enable starting the input server from scene scripts
  VISION_PLUGIN_ENSURE_LOADED(vRemoteInput);
#endif
}
예제 #3
0
void VPlayerApp::PreloadThirdPartyPlugins()
{
#if !defined(HK_ANARCHY)
  // Plugins currently not available on Vision Mobile and WinRT
  #if !defined(_VISION_MOBILE) && !defined(_VISION_WINRT) && !defined(_VISION_PSP2)
    VISION_PLUGIN_ENSURE_LOADED(Speedtree5EnginePlugin);
    #pragma message ( "If you do not have a license for SpeedTree, please remove the following library dependencies (and this line): Speedtree5EnginePlugin*.lib" )
  #endif   
#endif // !defined(HK_ANARCHY)

#if (!defined(WIN32) || defined(_VISION_WINRT)) && defined(USE_SCALEFORM)
  VISION_PLUGIN_ENSURE_LOADED(vScaleformPlugin);
  #pragma message ( "If you have a license for Scaleform, please define USE_SCALEFORM and add the following library dependencies: ScaleformEnginePlugin*.lib, gfx_air.lib, gfx_as2, gfx_as3.lib, gfx.lib, gfxexpat.lib, gfxplatform.lib, gfxrender_gl.lib, gfxsound_fmod.lib")
#endif
}
예제 #4
0
bool VAppBase::AppInit()
{
  VASSERT_MSG(m_pAppImpl != NULL, "VAppImpl invalid!");

  // Trigger the user application for possible screen setting changes
  m_pAppImpl->SetupAppConfig(m_appConfig);

  // Set default texture filter mode
  // Note: platform specific code may override this
  Vision::Renderer.SetDefaultTextureFilterMode(FILTER_MIN_MAG_MIP_LINEAR);

  // Setup platform specific stuff
  PlatformInitSettings();
  SetupPlatformRootFileSystem();

  // Setup base data directory and load vision engine plugin which is always required
  SetupBaseDataDirectories();
  VISION_PLUGIN_ENSURE_LOADED(VisionEnginePlugin);

  m_pAppImpl->PreloadPlugins();

  // Initialize engine
  if (!InitEngine())
  { 
    AppInitFailed();
    return false;
  }
  AppInitThreadManager();
  AppAfterEngineInit();
  PlatformMapInput();

  m_pAppImpl->Init();

  return true;
}
예제 #5
0
//============================================================================================================
//  Initialize our plugin.
//============================================================================================================
//  Called when the plugin is loaded
//  We add our component initialize data here
void ProjectEchoWinEnginePlugin::OnInitEnginePlugin()
{
  hkvLog::Info("ProjectEchoWinEnginePlugin:OnInitEnginePlugin()");
  Vision::RegisterModule(&g_myComponentModule);

  
// load plugins if supported
#if defined( HAVOK_PHYSICS_2012_KEYCODE )
  VISION_PLUGIN_ENSURE_LOADED(vHavok);
#endif
#if defined( HAVOK_AI_KEYCODE )
  VISION_PLUGIN_ENSURE_LOADED(vHavokAi);
#endif
#if defined( HAVOK_BEHAVIOR_KEYCODE )
  VISION_PLUGIN_ENSURE_LOADED(vHavokBehavior);
#endif
  
  VISION_PLUGIN_ENSURE_LOADED(vFmodEnginePlugin);

  // In some cases the compiler optimizes away the full class from the plugin since it seems to be dead code. 
  // One workaround to prevent this is to add the following helper macro into the plugin initialization code:
  FORCE_LINKDYNCLASS( MyComponent );

  // [...]

  // Start our component managers and game manager here....
  MyGameManager::GlobalManager().OneTimeInit();
  MyComponent_ComponentManager::GlobalManager().OneTimeInit();
  // [...]

  //---------------------------------------------------------------------------------------------------------
  // register the action module with the vision engine action manager
  // only after that will the action become available in the console.
  //---------------------------------------------------------------------------------------------------------
  VActionManager * pManager = Vision::GetActionManager ();
  pManager->RegisterModule ( &g_myComponentModule );

  // Set to true to open the console at startup and print some data to the display
  Vision::GetConsoleManager()->Show( false );
  pManager->Print( "Welcome to the console!" );
  pManager->Print( "This module is called '%s'", g_myComponentModule.GetName() );
  pManager->Print( "Type in 'help' for a list of all actions" );
  pManager->Print( "Type in 'myAction' to test this projects demo action" );
}
예제 #6
0
void VPlayerApp::PreloadHavokPlugins()
{
#if defined ( HAVOK_AI_KEYCODE )
  VISION_PLUGIN_ENSURE_LOADED(vHavokAi);
#else
  #pragma message ( "No Havok AI Keycode found. If you do not have a license for Havok AI, please remove the following library dependencies (and this line): vHavokAi*.lib, hkaiPathfinding.lib, hkaiInternal.lib, hkaiVisualize.lib, hkaiSpatialAnalysis.lib, hkaiPhysics2012Bridge.lib, as well as any platform-specific hkai* libraries.")
#endif

#if defined ( HAVOK_BEHAVIOR_KEYCODE )
  VISION_PLUGIN_ENSURE_LOADED(vHavokBehavior);
#else
  #pragma message ( "No Havok Behavior Keycode found. If you do not have a license for Havok Behavior, please remove the following library dependencies (and this line): vHavokBehavior*.lib, hkbBehavior.lib, hkbInternal.lib, hkbUtilities.lib, hkbPhysics2012Bridge.lib, hkbScript.lib, as well as any platform-specific hkb* libraries.")
#endif

#if !defined( HK_ANARCHY )
  #if defined ( HAVOK_DESTRUCTION_2012_KEYCODE )
    VISION_PLUGIN_ENSURE_LOADED(vHavokDestruction);
  #else
    #pragma message ( "No Havok Destruction Keycode found. If you do not have a license for Havok Destruction, please remove the following library dependencies (and this line): vHavokDestruction*.lib, hkdDestruction.lib, hkdInternal.lib, hkgpConvexDecomposition.lib, as well as any platform-specific hkd* libraries.")
  #endif

  #if defined ( HAVOK_CLOTH_KEYCODE )
    VISION_PLUGIN_ENSURE_LOADED(vHavokCloth);
  #else
    #pragma message ( "No Havok Cloth Keycode found. If you do not have a license for Havok Cloth, please remove the following library dependencies (and this line): vHavokCloth*.lib, hclCloth.lib, hclInternal.lib, hclSetup.lib, hclAnimationBridge.lib, hclPhysics2012Bridge.lib, as well as any platform-specific hcl* libraries.")
  #endif

  #if defined(WIN32) && !defined( _VISION_WINRT )
    #if defined ( HAVOK_SIMULATION_KEYCODE )
      VISION_PLUGIN_ENSURE_LOADED(vHavokVehicle);
      VISION_PLUGIN_ENSURE_LOADED(vHavokCharacter);
      VISION_PLUGIN_ENSURE_LOADED(SGEnginePlugin);
      VISION_PLUGIN_ENSURE_LOADED(OceanWaterEnginePlugin);
    #else
      #pragma message ( "No Havok Simulation found. If you do not have a license for Havok Simulation, please remove the following library dependencies (and this line): hkmsCharacter.lib, hkmsVehicle.lib, hkmsCommon.lib" )
    #endif
  #endif  
#endif
}