Changeset View
Changeset View
Standalone View
Standalone View
source/tools/atlas/GameInterface/View.cpp
Show All 34 Lines | |||||
#include "ps/Game.h" | #include "ps/Game.h" | ||||
#include "ps/GameSetup/GameSetup.h" | #include "ps/GameSetup/GameSetup.h" | ||||
#include "ps/World.h" | #include "ps/World.h" | ||||
#include "renderer/Renderer.h" | #include "renderer/Renderer.h" | ||||
#include "simulation2/Simulation2.h" | #include "simulation2/Simulation2.h" | ||||
#include "simulation2/components/ICmpObstructionManager.h" | #include "simulation2/components/ICmpObstructionManager.h" | ||||
#include "simulation2/components/ICmpParticleManager.h" | #include "simulation2/components/ICmpParticleManager.h" | ||||
#include "simulation2/components/ICmpPathfinder.h" | #include "simulation2/components/ICmpPathfinder.h" | ||||
#include "soundmanager/ISoundManager.h" | |||||
extern void (*Atlas_GLSwapBuffers)(void* context); | extern void (*Atlas_GLSwapBuffers)(void* context); | ||||
extern int g_xres, g_yres; | extern int g_xres, g_yres; | ||||
////////////////////////////////////////////////////////////////////////// | ////////////////////////////////////////////////////////////////////////// | ||||
void AtlasView::SetParam(const std::wstring& UNUSED(name), bool UNUSED(value)) | void AtlasView::SetParam(const std::wstring& UNUSED(name), bool UNUSED(value)) | ||||
▲ Show 20 Lines • Show All 155 Lines • ▼ Show 20 Lines | else | ||||
// ourselves) | // ourselves) | ||||
g_Game->Update(actualFrameLength, false); | g_Game->Update(actualFrameLength, false); | ||||
// Interpolate the graphics - we only want to do this once per visual frame, | // Interpolate the graphics - we only want to do this once per visual frame, | ||||
// not in every call to g_Game->Update | // not in every call to g_Game->Update | ||||
g_Game->Interpolate(actualFrameLength, realFrameLength); | g_Game->Interpolate(actualFrameLength, realFrameLength); | ||||
} | } | ||||
// Run sound idle tasks every frame. | |||||
if (g_SoundManager) | |||||
g_SoundManager->IdleTask(); | |||||
// Cinematic motion should be independent of simulation update, so we can | // Cinematic motion should be independent of simulation update, so we can | ||||
// preview the cinematics by themselves | // preview the cinematics by themselves | ||||
g_Game->GetView()->GetCinema()->Update(realFrameLength); | g_Game->GetView()->GetCinema()->Update(realFrameLength); | ||||
} | } | ||||
void AtlasViewGame::Render() | void AtlasViewGame::Render() | ||||
{ | { | ||||
SViewPort vp = { 0, 0, g_xres, g_yres }; | SViewPort vp = { 0, 0, g_xres, g_yres }; | ||||
▲ Show 20 Lines • Show All 289 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator