1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Merge pull request #2892 from Laserlicht/highscore_menu

Highscore Menu & end video
This commit is contained in:
Ivan Savenko
2023-09-27 15:48:47 +03:00
committed by GitHub
26 changed files with 728 additions and 39 deletions

View File

@@ -35,6 +35,9 @@ VCMI_LIB_NAMESPACE_END
class CClient;
class CBaseForLobbyApply;
class HighScoreCalculation;
class HighScoreParameter;
// TODO: Add mutex so we can't set CONNECTION_CANCELLED if client already connected, but thread not setup yet
enum class EClientState : ui8
{
@@ -87,6 +90,8 @@ class CServerHandler : public IServerAPI, public LobbyInfo
std::vector<std::string> myNames;
std::shared_ptr<HighScoreCalculation> highScoreCalc;
void threadHandleConnection();
void threadRunServer();
void onServerFinished();
@@ -161,7 +166,7 @@ public:
void startGameplay(VCMI_LIB_WRAP_NAMESPACE(CGameState) * gameState = nullptr);
void endGameplay(bool closeConnection = true, bool restart = false);
void startCampaignScenario(std::shared_ptr<CampaignState> cs = {});
void startCampaignScenario(HighScoreParameter param, std::shared_ptr<CampaignState> cs = {});
void showServerError(const std::string & txt) const;
// TODO: LobbyState must be updated within game so we should always know how many player interfaces our client handle