2017-01-20 08:36:52 -05:00
|
|
|
#pragma once
|
|
|
|
|
2017-01-19 16:23:59 -05:00
|
|
|
namespace Components
|
|
|
|
{
|
|
|
|
class Theatre : public Component
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
Theatre();
|
|
|
|
|
2017-04-07 15:37:01 -04:00
|
|
|
static void StopRecording();
|
|
|
|
|
2017-01-19 16:23:59 -05:00
|
|
|
private:
|
|
|
|
class DemoInfo
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
std::string name;
|
|
|
|
std::string mapname;
|
|
|
|
std::string gametype;
|
|
|
|
std::string author;
|
|
|
|
int length;
|
|
|
|
std::time_t timeStamp;
|
|
|
|
|
2023-01-03 15:17:46 -05:00
|
|
|
[[nodiscard]] nlohmann::json to_json() const;
|
2017-01-19 16:23:59 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
static DemoInfo CurrentInfo;
|
|
|
|
static unsigned int CurrentSelection;
|
|
|
|
static std::vector<DemoInfo> Demos;
|
|
|
|
|
2023-01-03 15:17:46 -05:00
|
|
|
static Dvar::Var CLAutoRecord;
|
|
|
|
static Dvar::Var CLDemosKeep;
|
|
|
|
|
2017-01-19 16:23:59 -05:00
|
|
|
static char BaselineSnapshot[131072];
|
|
|
|
static int BaselineSnapshotMsgLen;
|
|
|
|
static int BaselineSnapshotMsgOff;
|
|
|
|
|
|
|
|
static void WriteBaseline();
|
|
|
|
static void StoreBaseline(PBYTE snapshotMsg);
|
|
|
|
|
2022-08-24 10:38:14 -04:00
|
|
|
static void LoadDemos([[maybe_unused]] const UIScript::Token& token, [[maybe_unused]] const Game::uiInfo_s* info);
|
|
|
|
static void DeleteDemo([[maybe_unused]] const UIScript::Token& token, [[maybe_unused]] const Game::uiInfo_s* info);
|
|
|
|
static void PlayDemo([[maybe_unused]] const UIScript::Token& token, [[maybe_unused]] const Game::uiInfo_s* info);
|
2017-01-19 16:23:59 -05:00
|
|
|
|
|
|
|
static unsigned int GetDemoCount();
|
|
|
|
static const char* GetDemoText(unsigned int item, int column);
|
|
|
|
static void SelectDemo(unsigned int index);
|
|
|
|
|
|
|
|
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();
|
|
|
|
|
2023-01-03 15:17:46 -05:00
|
|
|
static int CL_FirstSnapshot_Stub();
|
|
|
|
static void SV_SpawnServer_Stub();
|
2017-01-19 16:23:59 -05:00
|
|
|
|
2023-01-04 13:57:32 -05:00
|
|
|
static void CG_CompassDrawPlayerMapLocationSelector_Stub(int localClientNum, Game::CompassType compassType, const Game::rectDef_s* parentRect, const Game::rectDef_s* rect, Game::Material* material, float* color);
|
2023-01-04 12:55:17 -05:00
|
|
|
static void CL_WriteDemoClientArchive_Hk(void(*write)(const void* buffer, int len, int localClientNum), const Game::playerState_s* ps, const float* viewangles, const float* selectedLocation, float selectedLocationAngle, int localClientNum, int index);
|
|
|
|
|
2017-01-19 16:23:59 -05:00
|
|
|
static void RecordStub(int channel, char* message, char* file);
|
|
|
|
static void StopRecordStub(int channel, char* message);
|
|
|
|
};
|
|
|
|
}
|