diff options
| author | fusion32 <marcopuzziello@gmail.com> | 2025-05-20 16:41:03 -0300 |
|---|---|---|
| committer | fusion32 <marcopuzziello@gmail.com> | 2025-05-20 16:41:03 -0300 |
| commit | 42be37f4ad99fc8580415fed89939e305d56193e (patch) | |
| tree | 41303aace3c214f925a43fec6a857f313196e38d /src/connection.hh | |
| parent | 7fe30185df21617cf44100f89db462cd4501050e (diff) | |
| download | game-42be37f4ad99fc8580415fed89939e305d56193e.tar.gz game-42be37f4ad99fc8580415fed89939e305d56193e.zip | |
implement `main.cc`, `shm.cc`, and `time.cc` + overall tweeks
Diffstat (limited to 'src/connection.hh')
| -rw-r--r-- | src/connection.hh | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/src/connection.hh b/src/connection.hh new file mode 100644 index 0000000..724ac91 --- /dev/null +++ b/src/connection.hh @@ -0,0 +1,56 @@ +#ifndef TIBIA_CONNECTION_HH_ +#define TIBIA_CONNECTION_HH_ 1 + +#include "main.hh" +#include "enums.hh" + +struct TConnection; + +struct TKnownCreature { + KNOWNCREATURESTATE State; + uint32 CreatureID; + TKnownCreature *Next; + TConnection *Connection; +}; + +struct TConnection { + uint8 InData[2048]; + int InDataSize; + bool SigIOPending; + bool WaitingForACK; + uint8 OutData[16384]; + uint8 field5_0x4806; + uint8 field6_0x4807; + int NextToSend; + int NextToCommit; + int NextToWrite; + bool Overflow; + bool WillingToSend; + uint8 field12_0x4816; + uint8 field13_0x4817; + TConnection *NextSendingConnection; + uint32 RandomSeed; + CONNECTIONSTATE State; + pid_t PID; + int Socket; + char IPAddress[16]; + // TXTEASymmetricKey SymmetricKey; // TODO + bool ConnectionIsOk; + bool ClosingIsDelayed; + uint8 field23_0x4852; + uint8 field24_0x4853; + uint32 TimeStamp; + uint32 TimeStampAction; + int TerminalType; + int TerminalVersion; + int TerminalOffsetX; + int TerminalOffsetY; + int TerminalWidth; + int TerminalHeight; + uint32 CharacterID; + char Name[31]; + uint8 field35_0x4897; + TKnownCreature KnownCreatureTable[150]; +}; + +#endif // TIBIA_CONNECTION_HH_ |
