iw4x-client/src/Components/Modules/Theatre.hpp

74 lines
1.7 KiB
C++
Raw Normal View History

2016-01-09 14:56:28 -05:00
namespace Components
{
class Theatre : public Component
{
public:
Theatre();
const char* GetName() { return "Theatre"; };
private:
2016-06-30 13:38:48 -04:00
class Container
2016-01-10 06:25:31 -05:00
{
2016-06-30 13:38:48 -04:00
public:
class DemoInfo
2016-01-10 06:25:31 -05:00
{
2016-06-30 13:38:48 -04:00
public:
2016-01-10 06:25:31 -05:00
std::string Name;
std::string Mapname;
std::string Gametype;
std::string Author;
int Length;
std::time_t TimeStamp;
json11::Json to_json() const
{
return json11::Json::object
{
{ "mapname", Mapname },
{ "gametype", Gametype },
{ "author", Author },
{ "length", Length },
{ "timestamp", Utils::VA("%lld", TimeStamp) } //Ugly, but prevents information loss
};
}
};
DemoInfo CurrentInfo;
unsigned int CurrentSelection;
std::vector<DemoInfo> Demos;
};
static Container DemoContainer;
2016-01-09 14:56:28 -05:00
static char BaselineSnapshot[131072];
static int BaselineSnapshotMsgLen;
static int BaselineSnapshotMsgOff;
static void WriteBaseline();
2016-01-24 07:06:52 -05:00
static void StoreBaseline(PBYTE snapshotMsg);
2016-01-09 14:56:28 -05:00
2016-01-10 06:25:31 -05:00
static void LoadDemos();
static void DeleteDemo();
static void PlayDemo();
static unsigned int GetDemoCount();
static const char* GetDemoText(unsigned int item, int column);
static void SelectDemo(unsigned int index);
2016-01-09 14:56:28 -05:00
static void GamestateWriteStub(Game::msg_t* msg, char byte);
static void RecordGamestateStub();
static void BaselineStoreStub();
static void BaselineToFileStub();
static void AdjustTimeDeltaStub();
static void ServerTimedOutStub();
static void UISetActiveMenuStub();
2016-01-10 06:25:31 -05:00
2016-01-10 09:48:49 -05:00
static uint32_t InitCGameStub();
static void MapChangeStub();
static void MapChangeSVStub(char* a1, char* a2);
2016-01-10 06:25:31 -05:00
static void RecordStub(int channel, char* message, char* file);
static void StopRecordStub(int channel, char* message);
2016-01-09 14:56:28 -05:00
};
}