本文整理汇总了C++中JObject::GetPath方法的典型用法代码示例。如果您正苦于以下问题:C++ JObject::GetPath方法的具体用法?C++ JObject::GetPath怎么用?C++ JObject::GetPath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JObject
的用法示例。
在下文中一共展示了JObject::GetPath方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Init
bool RBoot::Init( const CommandLine& cmd )
{
import( rb_core );
JCore* m_pCore = new JCore();
m_pCore->SetName( "core" );
if (m_pCore != JCore::s_pInstance)
{
return false;
}
uint32_t hwnd = 0;
const char* pHandle = cmd.GetValue( "window" );
if (pHandle)
{
sscanf( pHandle, "%d", &hwnd );
}
import( rb_draw );
//import( rb_extui );
import( rb_particle );
ImportRenderLib();
import( rb_scene );
import( rb_script_lua );
//import( rb_sound );
//import( rb_texture );
import( rb_ui );
//import( rb_video );
//import( rb_physics );
link_class( ModelViewer );
link_class( TestDriver );
m_pCore->Init();
AddCommonMediaPath();
const char* scriptFile = cmd.GetValue( "script" );
JObject* pRoot = NULL;
if (scriptFile)
{
// find script's media directory and add it
AddScriptMediaPath( scriptFile );
// load script
pRoot = g_pPersistServer->LoadObject( scriptFile );
}
else
{
AddModuleMediaPath();
}
const char* mediaDir = cmd.GetValue( "media" );
g_pFileServer->AddMediaPath( mediaDir );
m_pCore->AddServer( "animserver" );
m_pCore->AddServer( "stringserver" );
m_pCore->AddServer( "windowserver" );
m_pCore->AddServer( c_RenderServerName );
m_pCore->AddServer( "drawserver" );
m_pCore->AddServer( "modelserver" );
m_pCore->AddServer( "particleserver" );
m_pCore->AddServer( "luaserver" );
m_pCore->AddServer( "soundserver" );
m_pCore->AddServer( "physicsserver" );
m_pCore->AddServer( "videoserver" );
g_pWindowServer->SetRootHandle( reinterpret_cast<void*>( hwnd ) );
m_pCore->InitTree();
if (!pRoot)
{
pRoot = g_pPersistServer->LoadObject( "rboot" );
}
if (!pRoot)
{
return false;
}
JString objPath;
pRoot->GetPath( objPath );
m_pCore->SetRootObject( objPath.c_str() );
g_pWindowServer->AddWindow( pRoot );
pRoot->InitTree();
ModelViewer* pModelViewer = obj_cast<ModelViewer>( pRoot );
Path animPath, modelPath;
if (pModelViewer)
{
pModelViewer->SetAnim( cmd.GetValue( "anim" ) );
pModelViewer->SetModel( cmd.GetValue( "model" ) );
}
JDialog* pRootDlg = obj_cast<JDialog>( pRoot );
if (pRootDlg)
{
pRootDlg->Show();
}
//.........这里部分代码省略.........