Etterna 0.75.1
Loading...
Searching...
No Matches
NetProtocol.h
1#pragma once
2
3#include "Etterna/Models/Misc/PlayerStageStats.h"
4#include <string>
5
7struct HighScore;
8class Song;
9
11{
12 public:
13 std::string serverName;
14 int serverVersion{ 0 };
15
16 virtual auto Connect(NetworkSyncManager* /*n*/,
17 unsigned short /*port*/,
18 std::string /*address*/) -> bool
19 {
20 return false;
21 }
22 virtual void close() {}
23 virtual void Update(NetworkSyncManager* n, float fDeltaTime) {}
24 virtual void CreateNewRoom(std::string name,
25 std::string desc,
26 std::string password)
27 {
28 }
29 virtual void SelectUserSong(NetworkSyncManager* n, Song* song) {}
30 virtual void EnterRoom(std::string name, std::string password) {}
31 virtual void LeaveRoom(NetworkSyncManager* n) {}
32
33 virtual void SendChat(const std::string& message, std::string tab, int type) {}
34
35 virtual void ReportHighScore(HighScore* hs, PlayerStageStats& pss) {}
36 virtual void ReportSongOver(NetworkSyncManager* n) {}
37
38 virtual void StartRequest(NetworkSyncManager* n, short position) {}
39
40 virtual void Login(std::string user, std::string pass) {}
41 virtual void Logout() {}
42
43 virtual void OnMusicSelect() {};
44 virtual void OffMusicSelect() {};
45
46 virtual void OnOptions() {};
47 virtual void OffOptions() {};
48
49 virtual void OnEval() {};
50 virtual void OffEval() {};
51
52 virtual void SendMPLeaderboardUpdate(float wife, std::string& jdgstr) {};
53
54 // triggered by button presses in gameplay
55 virtual void ReportReplayInput(NetworkSyncManager* n,
56 bool isPress,
57 int col,
58 int row,
59 float fMusicSeconds,
60 float fNoteOffset,
61 int tapNoteType,
62 int tapNoteSubType) {};
63
64 // triggered by a miss in gameplay
65 virtual void ReportReplayMiss(NetworkSyncManager* n,
66 int col,
67 int row,
68 int tapNoteType,
69 int tapNoteSubType) {};
70
71 // triggered by completing or dropping a hold in gameplay
72 virtual void ReportReplayHold(NetworkSyncManager* n,
73 int col,
74 int row,
75 int subType) {};
76
77 // triggered by hitting a mine in gameplay
78 virtual void ReportReplayMine(NetworkSyncManager* n, int row, int col) {};
79
80 virtual void ReportV2Data(int col, int row, float offset, int tapNoteType) {};
81};
Definition NetProtocol.h:11
Definition NetworkSyncManager.h:82
Contains statistics for one stage of play - either one song, or a whole course.
Definition PlayerStageStats.h:19
Holds all music metadata and steps for one song.
Definition Song.h:65
The high score that is earned by a player.
Definition HighScore.h:18