mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-07-06 23:15:47 -07:00
Removed a few global variables from Atlas. Added call to srand(time). Restored NotebookEvent in wxJS. Fixed CPU-detection in Valgrind. This was SVN commit r5318.
52 lines
796 B
C++
52 lines
796 B
C++
#ifndef SIMSTATE_INCLUDED
|
|
#define SIMSTATE_INCLUDED
|
|
|
|
#include <set>
|
|
#include <vector>
|
|
|
|
#include "ps/CStr.h"
|
|
#include "maths/Vector3D.h"
|
|
|
|
class CUnit;
|
|
class CEntity;
|
|
|
|
class SimState
|
|
{
|
|
public:
|
|
class Entity
|
|
{
|
|
public:
|
|
static Entity Freeze(CUnit* unit);
|
|
CEntity* Thaw();
|
|
private:
|
|
CStrW templateName;
|
|
int unitID;
|
|
std::set<CStr> selections;
|
|
int playerID;
|
|
CVector3D position;
|
|
float angle;
|
|
};
|
|
|
|
class Nonentity
|
|
{
|
|
public:
|
|
static Nonentity Freeze(CUnit* unit);
|
|
CUnit* Thaw();
|
|
private:
|
|
CStrW actorName;
|
|
int unitID;
|
|
std::set<CStr> selections;
|
|
CVector3D position;
|
|
float angle;
|
|
};
|
|
|
|
static SimState* Freeze(bool onlyEntities);
|
|
void Thaw();
|
|
|
|
private:
|
|
bool onlyEntities;
|
|
std::vector<Entity> entities;
|
|
std::vector<Nonentity> nonentities;
|
|
};
|
|
|
|
#endif // SIMSTATE_INCLUDED
|