本文整理汇总了C++中AssetManager::Shutdown方法的典型用法代码示例。如果您正苦于以下问题:C++ AssetManager::Shutdown方法的具体用法?C++ AssetManager::Shutdown怎么用?C++ AssetManager::Shutdown使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AssetManager
的用法示例。
在下文中一共展示了AssetManager::Shutdown方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
CTimer Timer;
// Set up audio devices
AudioDevice DSP0(0);
// Set up music in sound buffer 0
SoundSample music("go_cart", &DSP0);
// Play the music!
music.Play();
// Initialise control pad 0
if(!pad_init(PAD_0, PAD_INIT_LOCK | PAD_INIT_ANALOGUE | PAD_INIT_PRESSURE))
{
printf("Failed to initialise control pad\n");
pad_cleanup(PAD_0);
exit(0);
}
enable_actuator(0, 1, 1);
// Initialise the VU1 manager class
CVU1MicroProgram VU1MicroCode(&VU_vu1code_start, &VU_vu1code_end);
// Upload the microcode
VU1MicroCode.Upload();
// Register our signal function for every possible signal (i.e. ctrl + c)
for(int sig=0; sig<128; sig++)
signal(sig, sig_handle);
// Set up the DMA packet to clear the screen. We want to clear to blue.
SPS2Manager.InitScreenClear(0, 0x25, 0x50);
// Set Up Camera --------------------------------------------------------------
Pipeline.PositionCamera(Vector4(0.0f, 55.0f, 80.0f, 1.0f), Vector4(0.0f, 40.0f, 0.0f, 1.0f));
// Load in texture and models ----------------------------------------------
// Set up asset loader
AssetManager assetManager;
assetManager.Initialize();
// Terrain texture
CTexture* terrainTexture = assetManager.GetTexture("terrain");
// Set up game manager
GameManager* gameManager = new GameManager;
gameManager->Initialize();
// The main Render loop -------------------------------------------------------
while(g_bLoop)
{
// Process Audio
DSP0.HandleAudio();
VIFDynamicDMA.Fire();
// Update Control Pad
pad_update(PAD_0);
Pipeline.Update(0, 0, 0, 0, 0);
// Logic
g_bLoop = gameManager->Logic();
// Render
SPS2Manager.BeginScene();
// Render terrain
AssetManager::GetSingleton().LoadTexture(terrainTexture);
Matrix4x4 matWorld, matTrans, matScale;
matTrans.Translation(0.0f, -30.0f, 0.0f);
matScale.Scaling(20.0f);
matWorld = matScale * matTrans;
Terrain.SetWorldMatrix(matWorld);
Terrain.Render();
// Render scene
gameManager->Render();
SPS2Manager.EndScene();
// Dump screenshot if requested
if(pad[0].pressed & PAD_R2)SPS2Manager.ScreenShot();
}
// Shutdown Audio
DSP0.Close();
// Shutdown control pad
set_actuator(0, 0, 0);
pad_cleanup(PAD_0);
// Shutdown game manager
gameManager->Shutdown();
// Shutdown asset manager
assetManager.Shutdown();
return 0;
}