source: Daodan/MSVC/Mariusnet_Defs.h@ 833

Last change on this file since 833 was 589, checked in by gumby, 13 years ago

stuff

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