Skip to content

Add ConnectionClass and SendQueueType - #75

Open
11EJDE11 wants to merge 4 commits into
Phobos-developers:phobos-devfrom
11EJDE11:add-connectionclass
Open

Add ConnectionClass and SendQueueType#75
11EJDE11 wants to merge 4 commits into
Phobos-developers:phobos-devfrom
11EJDE11:add-connectionclass

Conversation

@11EJDE11

@11EJDE11 11EJDE11 commented Aug 4, 2026

Copy link
Copy Markdown

No description provided.

Comment thread TheirSync.h
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;
};

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 thread IPXGlobalConnClass.h
Comment on lines +12 to +13
COMMAND_AND_CONQUER = 0xaa01,
COMMAND_AND_CONQUER0 = 0xaa00

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread IPXGlobalConnClass.h
{ JMP_THIS(0x5403F0); }

public:
__int16 ProductID;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
__int16 ProductID;
unsigned short ProductID;

Don't use __ types.

Comment thread IPXConnClass.h
Comment on lines +48 to +49
DWORD Immed_Set;
DWORD ID;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
DWORD Immed_Set;
DWORD ID;
int Immed_Set;
int ID;

Comment thread IPXConnClass.h
public:
IPXAddressClass Address;
NetNodeType ImmediateAddress;
PROTECTED_PROPERTY(BYTE, align_5E[0x2]);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a need for all this alignment to excplicitly be here? Applies to everywhere.

Comment thread IPXConnClass.h
CONN_NAME_MAX = 40
};

DEFINE_REFERENCE(WORD, Socket, 0xAA0568)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
DEFINE_REFERENCE(WORD, Socket, 0xAA0568)
DEFINE_REFERENCE(unsigned short, Socket, 0xAA0568)

Comment thread ConnectionClass.h
Comment on lines +108 to +112
int __resends;
int __numlost;
int __percentlost;
int __missedoverall;
int __missedmagic;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
int __resends;
int __numlost;
int __percentlost;
int __missedoverall;
int __missedmagic;
int NumResends;
int NumLost;
int PercentLost;
int MissedOverall;
int MissedMagic;

Comment thread ConnectionClass.h
Comment on lines +51 to +55
struct GlobalHeaderType
{
CommHeaderType Header;
__int16 ProductID;
};

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is technically not a thing, the functions actually pass void* and then cast as necessary

Comment thread CommBufferClass.h
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;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not use DWORD please

Comment thread CommBufferClass.h
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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants