forked from electronicarts/CnC_Generals_Zero_Hour
-
Notifications
You must be signed in to change notification settings - Fork 185
Expand file tree
/
Copy pathNetCommandMsg.h
More file actions
680 lines (547 loc) · 21.6 KB
/
NetCommandMsg.h
File metadata and controls
680 lines (547 loc) · 21.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
/*
** Command & Conquer Generals Zero Hour(tm)
** Copyright 2025 Electronic Arts Inc.
**
** This program is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation, either version 3 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
////////////////////////////////////////////////////////////////////////////////
// //
// (c) 2001-2003 Electronic Arts Inc. //
// //
////////////////////////////////////////////////////////////////////////////////
//------------------------------------------------------------------------------------
// The CommandMsg class is a linked-list wrapper around GameMessage objects that
// are queued up to execute at a later time
#pragma once
#include "Lib/BaseType.h"
#include "GameNetwork/NetworkDefs.h"
#include "GameNetwork/NetPacketStructs.h"
#include "Common/UnicodeString.h"
class NetCommandRef;
//-----------------------------------------------------------------------------
class NetCommandDataChunk
{
NetCommandDataChunk(const NetCommandDataChunk&) CPP_11(= delete);
void operator=(const NetCommandDataChunk&) CPP_11(= delete);
public:
NetCommandDataChunk(Byte *data, UnsignedInt size)
: m_data(reinterpret_cast<UnsignedByte *>(data))
, m_size(size)
{}
NetCommandDataChunk(UnsignedByte *data, UnsignedInt size)
: m_data(data)
, m_size(size)
{}
NetCommandDataChunk(UnsignedInt size)
: m_data(NEW UnsignedByte[size])
, m_size(size)
{}
~NetCommandDataChunk()
{
delete[] m_data;
}
const UnsignedByte *data() const
{
return m_data;
}
UnsignedByte *data()
{
return m_data;
}
UnsignedInt size() const
{
return m_size;
}
UnsignedByte *release()
{
UnsignedByte *ret = m_data;
m_data = nullptr;
m_size = 0;
return ret;
}
private:
UnsignedByte *m_data;
UnsignedInt m_size;
};
//-----------------------------------------------------------------------------
class NetCommandMsg : public MemoryPoolObject
{
MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE(NetCommandMsg, "NetCommandMsg")
public:
typedef SmallNetPacketCommandBaseSelect Select;
NetCommandMsg();
//virtual ~NetCommandMsg();
UnsignedInt GetTimestamp() { return m_timestamp; }
void SetTimestamp(UnsignedInt timestamp) { m_timestamp = timestamp; }
void setExecutionFrame(UnsignedInt frame) { m_executionFrame = frame; }
void setPlayerID(UnsignedInt playerID) { m_playerID = playerID; }
void setID(UnsignedShort id) { m_id = id; }
UnsignedInt getExecutionFrame() const { return m_executionFrame; }
UnsignedInt getPlayerID() const { return m_playerID; }
UnsignedShort getID() const { return m_id; }
void setNetCommandType(NetCommandType type) { m_commandType = type; }
NetCommandType getNetCommandType() const { return m_commandType; }
virtual Int getSortNumber() const;
virtual size_t getSizeForNetPacket() const = 0;
virtual size_t copyBytesForNetPacket(UnsignedByte* buffer, const NetCommandRef& ref) const = 0;
virtual size_t getSizeForSmallNetPacket(const Select* select = nullptr) const = 0;
virtual size_t copyBytesForSmallNetPacket(UnsignedByte* buffer, const NetCommandRef& ref, const Select* select = nullptr) const = 0;
virtual Select getSmallNetPacketSelect() const = 0;
virtual size_t readMessageData(NetCommandRef& ref, NetPacketBuf buf) const = 0;
void attach();
void detach();
protected:
UnsignedInt m_timestamp;
UnsignedInt m_executionFrame;
UnsignedInt m_playerID;
UnsignedShort m_id;
NetCommandType m_commandType;
Int m_referenceCount;
};
//-----------------------------------------------------------------------------
template<typename NetPacketType, typename SmallNetPacketType>
class NetCommandMsgT : public NetCommandMsg
{
virtual size_t getSizeForNetPacket() const override
{
return NetPacketType::getSize(*this);
}
virtual size_t copyBytesForNetPacket(UnsignedByte* buffer, const NetCommandRef& ref) const override
{
return NetPacketType::copyBytes(buffer, ref);
}
virtual size_t getSizeForSmallNetPacket(const Select* select = nullptr) const override
{
return SmallNetPacketType::getSize(*this, select);
}
virtual size_t copyBytesForSmallNetPacket(UnsignedByte* buffer, const NetCommandRef& ref, const Select* select = nullptr) const override
{
return SmallNetPacketType::copyBytes(buffer, ref, select);
}
virtual size_t readMessageData(NetCommandRef& ref, NetPacketBuf buf) const override
{
return SmallNetPacketType::CommandData::readMessage(ref, buf);
}
};
//-----------------------------------------------------------------------------
/**
* The NetGameCommandMsg is the NetCommandMsg representation of a GameMessage
*/
class NetGameCommandMsg : public NetCommandMsgT<NetPacketGameCommand, SmallNetPacketGameCommand>
{
MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE(NetGameCommandMsg, "NetGameCommandMsg")
public:
NetGameCommandMsg();
NetGameCommandMsg(GameMessage *msg);
//virtual ~NetGameCommandMsg();
GameMessage *constructGameMessage() const;
void addArgument(const GameMessageArgumentDataType type, GameMessageArgumentType arg);
void setGameMessageType(GameMessage::Type type);
virtual Select getSmallNetPacketSelect() const override;
protected:
Int m_numArgs;
Int m_argSize;
GameMessage::Type m_type;
GameMessageArgument *m_argList, *m_argTail;
};
//-----------------------------------------------------------------------------
/**
* The NetAckCommandMsg is the base class for other ack command messages.
*/
class NetAckCommandMsg : public NetCommandMsgT<NetPacketAckCommand, SmallNetPacketAckCommand>
{
protected:
NetAckCommandMsg(NetCommandMsg *msg)
{
m_commandID = msg->getID();
m_originalPlayerID = msg->getPlayerID();
}
NetAckCommandMsg()
{
m_commandID = 0;
m_originalPlayerID = 0;
}
public:
UnsignedShort getCommandID() const;
void setCommandID(UnsignedShort commandID);
UnsignedByte getOriginalPlayerID() const;
void setOriginalPlayerID(UnsignedByte originalPlayerID);
virtual Int getSortNumber() const;
virtual Select getSmallNetPacketSelect() const override;
protected:
UnsignedShort m_commandID;
UnsignedByte m_originalPlayerID;
};
//-----------------------------------------------------------------------------
/**
* The NetAckBothCommandMsg is the NetCommandMsg representation of the combination of a
* stage 1 ack and a stage 2 ack.
*/
class NetAckBothCommandMsg : public NetAckCommandMsg
{
MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE(NetAckBothCommandMsg, "NetAckBothCommandMsg")
public:
NetAckBothCommandMsg(NetCommandMsg *msg);
NetAckBothCommandMsg();
//virtual ~NetAckBothCommandMsg();
};
//-----------------------------------------------------------------------------
/**
* The NetAckStage1CommandMsg is the NetCommandMsg representation of an ack message for the initial
* recipient.
*/
class NetAckStage1CommandMsg : public NetAckCommandMsg
{
MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE(NetAckStage1CommandMsg, "NetAckStage1CommandMsg")
public:
NetAckStage1CommandMsg(NetCommandMsg *msg);
NetAckStage1CommandMsg();
//virtual ~NetAckStage1CommandMsg();
};
//-----------------------------------------------------------------------------
/**
* The NetAckStage2CommandMsg is the NetCommandMsg representation of an ack message for all eventual
* recipients. (when this is returned, all the players in the relay mask have received the packet)
*/
class NetAckStage2CommandMsg : public NetAckCommandMsg
{
MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE(NetAckStage2CommandMsg, "NetAckStage2CommandMsg")
public:
NetAckStage2CommandMsg(NetCommandMsg *msg);
NetAckStage2CommandMsg();
//virtual ~NetAckStage2CommandMsg();
};
//-----------------------------------------------------------------------------
class NetFrameCommandMsg : public NetCommandMsgT<NetPacketFrameCommand, SmallNetPacketFrameCommand>
{
MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE(NetFrameCommandMsg, "NetFrameCommandMsg")
public:
NetFrameCommandMsg();
//virtual ~NetFrameCommandMsg();
void setCommandCount(UnsignedShort commandCount);
UnsignedShort getCommandCount() const;
virtual Select getSmallNetPacketSelect() const override;
protected:
UnsignedShort m_commandCount;
};
//-----------------------------------------------------------------------------
class NetPlayerLeaveCommandMsg : public NetCommandMsgT<NetPacketPlayerLeaveCommand, SmallNetPacketPlayerLeaveCommand>
{
MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE(NetPlayerLeaveCommandMsg, "NetPlayerLeaveCommandMsg")
public:
NetPlayerLeaveCommandMsg();
//virtual ~NetPlayerLeaveCommandMsg();
UnsignedByte getLeavingPlayerID() const;
void setLeavingPlayerID(UnsignedByte id);
virtual Select getSmallNetPacketSelect() const override;
protected:
UnsignedByte m_leavingPlayerID;
};
//-----------------------------------------------------------------------------
class NetRunAheadMetricsCommandMsg : public NetCommandMsgT<NetPacketRunAheadMetricsCommand, SmallNetPacketRunAheadMetricsCommand>
{
MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE(NetRunAheadMetricsCommandMsg, "NetRunAheadMetricsCommandMsg")
public:
NetRunAheadMetricsCommandMsg();
//virtual ~NetRunAheadMetricsCommandMsg();
Real getAverageLatency() const;
void setAverageLatency(Real avgLat);
Int getAverageFps() const;
void setAverageFps(Int fps);
virtual Select getSmallNetPacketSelect() const override;
protected:
Real m_averageLatency;
Int m_averageFps;
};
//-----------------------------------------------------------------------------
class NetRunAheadCommandMsg : public NetCommandMsgT<NetPacketRunAheadCommand, SmallNetPacketRunAheadCommand>
{
MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE(NetRunAheadCommandMsg, "NetRunAheadCommandMsg")
public:
NetRunAheadCommandMsg();
//virtual ~NetRunAheadCommandMsg();
UnsignedShort getRunAhead() const;
void setRunAhead(UnsignedShort runAhead);
UnsignedByte getFrameRate() const;
void setFrameRate(UnsignedByte frameRate);
virtual Select getSmallNetPacketSelect() const override;
protected:
UnsignedShort m_runAhead;
UnsignedByte m_frameRate;
};
//-----------------------------------------------------------------------------
class NetDestroyPlayerCommandMsg : public NetCommandMsgT<NetPacketDestroyPlayerCommand, SmallNetPacketDestroyPlayerCommand>
{
MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE(NetDestroyPlayerCommandMsg, "NetDestroyPlayerCommandMsg")
public:
NetDestroyPlayerCommandMsg();
//virtual ~NetDestroyPlayerCommandMsg();
UnsignedInt getPlayerIndex() const;
void setPlayerIndex(UnsignedInt playerIndex);
virtual Select getSmallNetPacketSelect() const override;
protected:
UnsignedInt m_playerIndex;
};
//-----------------------------------------------------------------------------
class NetKeepAliveCommandMsg : public NetCommandMsgT<NetPacketKeepAliveCommand, SmallNetPacketKeepAliveCommand>
{
MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE(NetKeepAliveCommandMsg, "NetKeepAliveCommandMsg")
public:
NetKeepAliveCommandMsg();
//virtual ~NetKeepAliveCommandMsg();
virtual Select getSmallNetPacketSelect() const override;
};
//-----------------------------------------------------------------------------
class NetDisconnectKeepAliveCommandMsg : public NetCommandMsgT<NetPacketDisconnectKeepAliveCommand, SmallNetPacketDisconnectKeepAliveCommand>
{
MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE(NetDisconnectKeepAliveCommandMsg, "NetDisconnectKeepAliveCommandMsg")
public:
NetDisconnectKeepAliveCommandMsg();
//virtual ~NetDisconnectKeepAliveCommandMsg();
virtual Select getSmallNetPacketSelect() const override;
};
//-----------------------------------------------------------------------------
class NetDisconnectPlayerCommandMsg : public NetCommandMsgT<NetPacketDisconnectPlayerCommand, SmallNetPacketDisconnectPlayerCommand>
{
MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE(NetDisconnectPlayerCommandMsg, "NetDisconnectPlayerCommandMsg")
public:
NetDisconnectPlayerCommandMsg();
//virtual ~NetDisconnectPlayerCommandMsg();
UnsignedByte getDisconnectSlot() const;
void setDisconnectSlot(UnsignedByte slot);
UnsignedInt getDisconnectFrame() const;
void setDisconnectFrame(UnsignedInt frame);
virtual Select getSmallNetPacketSelect() const override;
protected:
UnsignedByte m_disconnectSlot;
UnsignedInt m_disconnectFrame;
};
//-----------------------------------------------------------------------------
class NetPacketRouterQueryCommandMsg : public NetCommandMsgT<NetPacketRouterQueryCommand, SmallNetPacketRouterQueryCommand>
{
MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE(NetPacketRouterQueryCommandMsg, "NetPacketRouterQueryCommandMsg")
public:
NetPacketRouterQueryCommandMsg();
//virtual ~NetPacketRouterQueryCommandMsg();
virtual Select getSmallNetPacketSelect() const override;
};
//-----------------------------------------------------------------------------
class NetPacketRouterAckCommandMsg : public NetCommandMsgT<NetPacketRouterAckCommand, SmallNetPacketRouterAckCommand>
{
MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE(NetPacketRouterAckCommandMsg, "NetPacketRouterAckCommandMsg")
public:
NetPacketRouterAckCommandMsg();
//virtual ~NetPacketRouterAckCommandMsg();
virtual Select getSmallNetPacketSelect() const override;
};
//-----------------------------------------------------------------------------
class NetDisconnectChatCommandMsg : public NetCommandMsgT<NetPacketDisconnectChatCommand, SmallNetPacketDisconnectChatCommand>
{
MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE(NetDisconnectChatCommandMsg, "NetDisconnectChatCommandMsg")
public:
NetDisconnectChatCommandMsg();
//virtual ~NetDisconnectChatCommandMsg();
UnicodeString getText() const;
void setText(UnicodeString text);
virtual Select getSmallNetPacketSelect() const override;
protected:
UnicodeString m_text;
};
//-----------------------------------------------------------------------------
class NetChatCommandMsg : public NetCommandMsgT<NetPacketChatCommand, SmallNetPacketChatCommand>
{
MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE(NetChatCommandMsg, "NetChatCommandMsg")
public:
NetChatCommandMsg();
//virtual ~NetChatCommandMsg();
UnicodeString getText() const;
void setText(UnicodeString text);
Int getPlayerMask() const;
void setPlayerMask( Int playerMask );
virtual Select getSmallNetPacketSelect() const override;
protected:
UnicodeString m_text;
Int m_playerMask;
};
//-----------------------------------------------------------------------------
class NetDisconnectVoteCommandMsg : public NetCommandMsgT<NetPacketDisconnectVoteCommand, SmallNetPacketDisconnectVoteCommand>
{
MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE(NetDisconnectVoteCommandMsg, "NetDisconnectVoteCommandMsg")
public:
NetDisconnectVoteCommandMsg();
//virtual ~NetDisconnectVoteCommandMsg();
UnsignedByte getSlot() const;
void setSlot(UnsignedByte slot);
UnsignedInt getVoteFrame() const;
void setVoteFrame(UnsignedInt voteFrame);
virtual Select getSmallNetPacketSelect() const override;
protected:
UnsignedByte m_slot;
UnsignedInt m_voteFrame;
};
//-----------------------------------------------------------------------------
class NetProgressCommandMsg: public NetCommandMsgT<NetPacketProgressCommand, SmallNetPacketProgressCommand>
{
MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE(NetProgressCommandMsg, "NetProgressCommandMsg")
public:
NetProgressCommandMsg();
//virtual ~NetProgressCommandMsg();
UnsignedByte getPercentage() const;
void setPercentage( UnsignedByte percent );
virtual Select getSmallNetPacketSelect() const override;
protected:
UnsignedByte m_percent;
};
//-----------------------------------------------------------------------------
class NetWrapperCommandMsg : public NetCommandMsgT<NetPacketWrapperCommand, SmallNetPacketWrapperCommand>
{
MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE(NetWrapperCommandMsg, "NetWrapperCommandMsg")
public:
NetWrapperCommandMsg();
//virtual ~NetWrapperCommandMsg();
const UnsignedByte * getData() const;
UnsignedByte * getData();
void setData(NetCommandDataChunk &dataChunk);
UnsignedInt getChunkNumber() const;
void setChunkNumber(UnsignedInt chunkNumber);
UnsignedInt getNumChunks() const;
void setNumChunks(UnsignedInt numChunks);
UnsignedInt getDataLength() const;
UnsignedInt getTotalDataLength() const;
void setTotalDataLength(UnsignedInt totalDataLength);
UnsignedInt getDataOffset() const;
void setDataOffset(UnsignedInt offset);
UnsignedShort getWrappedCommandID() const;
void setWrappedCommandID(UnsignedShort wrappedCommandID);
virtual Select getSmallNetPacketSelect() const override;
private:
UnsignedByte *m_data;
// using UnsignedInt's so we can send around files of effectively unlimited size easily
UnsignedInt m_dataLength;
UnsignedInt m_dataOffset;
UnsignedInt m_totalDataLength;
UnsignedInt m_chunkNumber;
UnsignedInt m_numChunks;
UnsignedShort m_wrappedCommandID;
};
//-----------------------------------------------------------------------------
class NetFileCommandMsg : public NetCommandMsgT<NetPacketFileCommand, SmallNetPacketFileCommand>
{
MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE(NetFileCommandMsg, "NetFileCommandMsg")
public:
NetFileCommandMsg();
//virtual ~NetFileCommandMsg();
AsciiString getRealFilename() const;
void setRealFilename(AsciiString filename);
AsciiString getPortableFilename() const { return m_portableFilename; }
void setPortableFilename(AsciiString filename) { m_portableFilename = filename; }
UnsignedInt getFileLength() const;
const UnsignedByte * getFileData() const;
UnsignedByte * getFileData();
void setFileData(NetCommandDataChunk &dataChunk);
virtual Select getSmallNetPacketSelect() const override;
protected:
AsciiString m_portableFilename;
UnsignedByte *m_data;
UnsignedInt m_dataLength;
};
//-----------------------------------------------------------------------------
class NetFileAnnounceCommandMsg : public NetCommandMsgT<NetPacketFileAnnounceCommand, SmallNetPacketFileAnnounceCommand>
{
MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE(NetFileAnnounceCommandMsg, "NetFileAnnounceCommandMsg")
public:
NetFileAnnounceCommandMsg();
//virtual ~NetFileAnnounceCommandMsg();
AsciiString getRealFilename() const;
void setRealFilename(AsciiString filename);
AsciiString getPortableFilename() const { return m_portableFilename; }
void setPortableFilename(AsciiString filename) { m_portableFilename = filename; }
UnsignedShort getFileID() const;
void setFileID(UnsignedShort fileID);
UnsignedByte getPlayerMask() const;
void setPlayerMask(UnsignedByte playerMask);
virtual Select getSmallNetPacketSelect() const override;
protected:
AsciiString m_portableFilename;
UnsignedShort m_fileID;
UnsignedByte m_playerMask;
};
//-----------------------------------------------------------------------------
class NetFileProgressCommandMsg : public NetCommandMsgT<NetPacketFileProgressCommand, SmallNetPacketFileProgressCommand>
{
MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE(NetFileProgressCommandMsg, "NetFileProgressCommandMsg")
public:
NetFileProgressCommandMsg();
//virtual ~NetFileProgressCommandMsg();
UnsignedShort getFileID() const;
void setFileID(UnsignedShort val);
Int getProgress() const;
void setProgress(Int val);
virtual Select getSmallNetPacketSelect() const override;
protected:
UnsignedShort m_fileID;
Int m_progress;
};
//-----------------------------------------------------------------------------
class NetDisconnectFrameCommandMsg : public NetCommandMsgT<NetPacketDisconnectFrameCommand, SmallNetPacketDisconnectFrameCommand>
{
MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE(NetDisconnectFrameCommandMsg, "NetDisconnectFrameCommandMsg")
public:
NetDisconnectFrameCommandMsg();
UnsignedInt getDisconnectFrame() const;
void setDisconnectFrame(UnsignedInt disconnectFrame);
virtual Select getSmallNetPacketSelect() const override;
protected:
UnsignedInt m_disconnectFrame;
};
//-----------------------------------------------------------------------------
class NetDisconnectScreenOffCommandMsg : public NetCommandMsgT<NetPacketDisconnectScreenOffCommand, SmallNetPacketDisconnectScreenOffCommand>
{
MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE(NetDisconnectScreenOffCommandMsg, "NetDisconnectScreenOffCommandMsg")
public:
NetDisconnectScreenOffCommandMsg();
UnsignedInt getNewFrame() const;
void setNewFrame(UnsignedInt newFrame);
virtual Select getSmallNetPacketSelect() const override;
protected:
UnsignedInt m_newFrame;
};
//-----------------------------------------------------------------------------
class NetFrameResendRequestCommandMsg : public NetCommandMsgT<NetPacketFrameResendRequestCommand, SmallNetPacketFrameResendRequestCommand>
{
MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE(NetFrameResendRequestCommandMsg, "NetFrameResendRequestCommandMsg")
public:
NetFrameResendRequestCommandMsg();
UnsignedInt getFrameToResend() const;
void setFrameToResend(UnsignedInt frame);
virtual Select getSmallNetPacketSelect() const override;
protected:
UnsignedInt m_frameToResend;
};
class NetLoadCompleteCommandMsg : public NetCommandMsgT<NetPacketLoadCompleteCommand, SmallNetPacketLoadCompleteCommand>
{
MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE(NetLoadCompleteCommandMsg, "NetLoadCompleteCommandMsg")
public:
NetLoadCompleteCommandMsg();
//virtual ~NetLoadCompleteCommandMsg();
virtual Select getSmallNetPacketSelect() const override;
};
class NetTimeOutGameStartCommandMsg : public NetCommandMsgT<NetPacketTimeOutGameStartCommand, SmallNetPacketTimeOutGameStartCommand>
{
MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE(NetTimeOutGameStartCommandMsg, "NetTimeOutGameStartCommandMsg")
public:
NetTimeOutGameStartCommandMsg();
//virtual ~NetTimeOutGameStartCommandMsg();
virtual Select getSmallNetPacketSelect() const override;
};