Add ConnectionClass and SendQueueType - #75
Open
11EJDE11 wants to merge 4 commits into
Open
Conversation
Add TheirSync
This was referenced Aug 5, 2026
ZivDero
requested changes
Aug 15, 2026
Comment on lines
+5
to
+15
| struct TheirSync | ||
| { | ||
| DEFINE_ARRAY_REFERENCE(TheirSync, [8], Array, 0xAFA358) | ||
|
|
||
| int frame; | ||
| int __send; | ||
| int __recv; | ||
| int timing_C; | ||
| int __router_resp; | ||
| int timing_14; | ||
| }; |
There was a problem hiding this comment.
This is how we mapped it in TS.
struct FrameSyncStruct {
int frame; /// other players' frame #
unsigned int sent; // # cmds other player claims to have sent
unsigned int recv; // # cmds actually received from others
unsigned int timing;
FrameSyncStruct(void);
};
FrameSyncStruct::FrameSyncStruct(void)
{
frame = -1;
sent = 0;
recv = 0;
timing = 0;
}
Evidently, there is something new in YR, but please take time to clean up field names and not just dump IDA WIP stuff in.
Comment on lines
+12
to
+13
| COMMAND_AND_CONQUER = 0xaa01, | ||
| COMMAND_AND_CONQUER0 = 0xaa00 |
There was a problem hiding this comment.
Suggested change
| COMMAND_AND_CONQUER = 0xaa01, | |
| COMMAND_AND_CONQUER0 = 0xaa00 | |
| COMMAND_AND_CONQUER4 = 0xaa04, /// YR | |
| COMMAND_AND_CONQUER3 = 0xaa03, /// RA2 | |
| COMMAND_AND_CONQUER2 = 0xaa02, /// TS | |
| COMMAND_AND_CONQUER1 = 0xaa01, | |
| COMMAND_AND_CONQUER0 = 0xaa00 |
| { JMP_THIS(0x5403F0); } | ||
|
|
||
| public: | ||
| __int16 ProductID; |
There was a problem hiding this comment.
Suggested change
| __int16 ProductID; | |
| unsigned short ProductID; |
Don't use __ types.
Comment on lines
+48
to
+49
| DWORD Immed_Set; | ||
| DWORD ID; |
There was a problem hiding this comment.
Suggested change
| DWORD Immed_Set; | |
| DWORD ID; | |
| int Immed_Set; | |
| int ID; |
| public: | ||
| IPXAddressClass Address; | ||
| NetNodeType ImmediateAddress; | ||
| PROTECTED_PROPERTY(BYTE, align_5E[0x2]); |
There was a problem hiding this comment.
Is there a need for all this alignment to excplicitly be here? Applies to everywhere.
| CONN_NAME_MAX = 40 | ||
| }; | ||
|
|
||
| DEFINE_REFERENCE(WORD, Socket, 0xAA0568) |
There was a problem hiding this comment.
Suggested change
| DEFINE_REFERENCE(WORD, Socket, 0xAA0568) | |
| DEFINE_REFERENCE(unsigned short, Socket, 0xAA0568) |
Comment on lines
+108
to
+112
| int __resends; | ||
| int __numlost; | ||
| int __percentlost; | ||
| int __missedoverall; | ||
| int __missedmagic; |
There was a problem hiding this comment.
Suggested change
| int __resends; | |
| int __numlost; | |
| int __percentlost; | |
| int __missedoverall; | |
| int __missedmagic; | |
| int NumResends; | |
| int NumLost; | |
| int PercentLost; | |
| int MissedOverall; | |
| int MissedMagic; |
Comment on lines
+51
to
+55
| struct GlobalHeaderType | ||
| { | ||
| CommHeaderType Header; | ||
| __int16 ProductID; | ||
| }; |
There was a problem hiding this comment.
This is technically not a thing, the functions actually pass void* and then cast as necessary
Comment on lines
+99
to
+111
| DWORD DelaySum; | ||
| DWORD NumDelay; | ||
| DWORD MeanDelay; | ||
| DWORD MaxDelay; | ||
|
|
||
| SendQueueType* SendQueue; | ||
| int SendCount; // number of entries currently queued | ||
| DWORD SendTotal; // total ever added, used as the outgoing packet ID | ||
| int* SendIndex; | ||
|
|
||
| ReceiveQueueType* ReceiveQueue; | ||
| int ReceiveCount; | ||
| DWORD ReceiveTotal; |
| CommHeaderType* Buffer; | ||
| int ExtraLen; // size of the extra data (an IPXAddressClass, for global conns) | ||
| void* ExtraBuffer; | ||
| __int16 Port; // destination port this entry was queued for |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.