source: Daodan/src/flatline/Mariusnet_Defs.h@ 953

Last change on this file since 953 was 877, checked in by alloc, 11 years ago

Daodan: Moved flatline to subfolder, flatline enabled through patch "flatline"

File size: 4.4 KB
Line 
1#ifndef MARIUSNET_DEFS_H
2#define MARIUSNET_DEFS_H
3
4//to client
5#include "Mariusnet_Public.h"
6enum
7{
8pt_RoomList = 0x0000,
9pt_PlayerList = 0x0001,
10pt_GameList = 0x0002,
11pt_UserLoggedIn = 0x7,//0x0003,
12pt_EncryptionKey = 0x0006,
13pt_LoginInfo = 0x3,//0x0007,
14pt_PlayerInfo = 0x0008,
15pt_PlayerId = 0x0009,
16pt_BlueBarMsg = 0x000A,
17pt_PasswordAck = 0x000C,
18pt_FindResponse = 0x000E,
19pt_BuddyList = 0x000F, // the actual buddy list - i.e. names and such
20pt_OrderList = 0x0010,
21pt_PlayerInfoResponse = 0x0011,
22pt_UpdatePlayerStats = 0x0012,
23pt_UpdateBuddyList = 0x0013, // buddy status - i.e. online/offline
24pt_UpdateOrderList = 0x0014,
25};
26
27//from client
28enum
29{
30pt_PlayerLogin = 0x0064,
31pt_ChatRoomLogin = 0x0065,
32pt_RoomPlayerInfo = 0x0067,
33pt_GameInfo = 0x0068,
34pt_RemoveGame = 0x0069,
35pt_SetPlayerState = 0x006B,
36pt_Password = 0x006D,
37pt_RequestRefresh = 0x006E,
38pt_GamePlayerList = 0x006F, // game start player list
39pt_PlayerScores = 0x0070, // game over player scores
40pt_ResetScoring = 0x0071, // reset metaserver game scoring
41pt_StartGame = 0x0072,
42pt_Localization = 0x0073,
43pt_GameSearchQuery = 0x0074,
44pt_FindPlayer = 0x0075,
45pt_BuddyListQuery = 0x0076, // request a buddy list update
46pt_OrderListQuery = 0x0077,
47pt_UpdateBuddy = 0x0078, // add/remove buddy
48pt_PlayerInfoQuery = 0x0079,
49pt_SetPlayerStats = 0x007A, // change player stats (city/state/profile)
50pt_ChatMessage = 0x00C8,
51pt_WhisperMessage = 0x00C9,
52pt_KeepAlive = 0x00CA,
53pt_SessionKey = 0x00CB,
54};
55
56enum
57{
58ctMyth1 = 0,
59ctMyth2 = 1,
60// ctMyth3 = 2;
61ctMarathon = 3,
62ctMyth1Unified = 4,
63ctMyth2Unified = 5,
64ctMyth3Unified = 6,
65};
66
67
68typedef struct
69{
70 short PacketSignature;// = 0xDEAD;
71 short PacketId;
72 unsigned int PacketSize;
73} marius_header;
74
75typedef struct
76{
77 short Red;
78 short Green;
79 short Blue;
80 short Flags;
81} m_colour;
82
83typedef struct
84{
85 char Icon;
86 char pad;
87 short Flags; // 0=active, 1=inactive, in a game, grayed out, can't see chat
88 m_colour Colors[2];
89 short orderIndex;
90 short clientVersion;
91 char stupid_14byte_pad[14];
92 char Name[112]; // 2 #0 terminated fields - Name, Team Name
93} m_player_info;
94
95typedef struct
96{
97 short Platform; //Windows - 1
98 short MetaVersion; //0
99 char pad[3];
100 char UpdateAppearance; // save player settings on server, change to bits, bit 0=update, bit 1=demo
101 int PlayerId; //0
102 short EncryptionType; //0 - kCRYPT_PLAINTEXT, screw encryption for now
103 short PlayerInfoSize; //40 + strlen(playername) + strlen(plaerteam(
104 char AppName[32]; //MARATHON...later ONI ;)
105 char BuildDate[32]; //_DATE_
106 char BuildTime[32]; //_TIME_
107 char LoginId[32]; //username
108 m_player_info PlayerInfo;
109} m_player_login;
110
111typedef struct
112{
113 short EncryptionType;
114 unsigned char salt[16];
115} m_salt;
116
117typedef struct
118{
119 int one;
120 int two;
121 int three;
122 int zero;
123} m_localization;
124
125typedef struct
126{
127 unsigned char passHash[16];
128} m_password;
129
130typedef struct
131{
132 int userID;
133 short order;
134 short unused;
135 char Token[32];
136
137} m_login_success;
138
139typedef struct
140{
141 int code;
142 char DenialMessage[];
143} m_login_denied;
144
145typedef struct
146{
147 short RoomIndex;
148 short PlayerCount;
149 int IPAddress;
150 short Port;
151 short GameCount;
152 int pad[3];
153} m_room;
154
155typedef struct
156{
157 m_room Rooms[64];
158} m_roomlist;
159
160typedef struct
161{
162 char RoomKey[32];
163 char Name[32];
164} m_chatroom_join;
165
166typedef struct
167{
168 char Message[512];
169} m_motd;
170
171typedef struct
172{
173 m_colour PrimaryColor;
174 m_colour SecondaryColor;
175 int SenderId;
176 int TargetId;
177 char Message[256];
178} m_message;
179
180typedef struct
181{
182 unsigned int gameID;
183 unsigned int ipAddress;
184 unsigned short port;
185 unsigned char verb;
186 unsigned char gameEnable;
187 unsigned int timeRemaining;
188 unsigned int hostPlayerID;
189 unsigned short len;
190 int unused1;
191 int unused2;
192 short pad;
193 m_gamedescription g;
194} m_gameinfo;
195
196typedef struct
197{
198 m_gameinfo* Games;
199} m_gamelist;
200typedef struct
201{
202 marius_header header;
203 union
204 {
205 m_player_login login;
206 m_password password;
207 m_localization localization;
208 m_salt salt;
209 m_login_success login_success;
210 m_login_denied login_denied;
211 m_roomlist roomlist;
212 m_chatroom_join chatroom_join;
213 m_player_info player_info;
214 m_motd motd;
215 m_message message;
216 m_announcegame newgame;
217 m_gamelist gamelist;
218 };
219} marius_packet;
220
221#endif
Note: See TracBrowser for help on using the repository browser.