1
0
forked from 0ad/0ad
0ad/source/simulation/Simulation.h
2004-07-27 21:00:53 +00:00

35 lines
726 B
C++
Executable File

#ifndef _Simulation_H
#define _Simulation_H
class CGame;
class CGameAttributes;
class CWorld;
class CSimulation
{
CGame *m_pGame;
CWorld *m_pWorld;
double m_DeltaTime;
// Temp - Should move to a dynamic interval that can adapt to network
// conditions
const static int SIM_FRAMERATE = 10;
const static int m_SimUpdateInterval=1000/SIM_FRAMERATE;
// Simulate: move the deterministic simulation forward by one interval
void Simulate();
// Interpolate: interpolate a data point for rendering between simulation
// frames.
void Interpolate(double frameTime, double offset);
public:
CSimulation(CGame *pGame);
void Initialize(CGameAttributes *pGameAttributes);
void Update(double frameTime);
};
#endif