summaryrefslogtreecommitdiff
path: root/include/pso/packet_classes.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/pso/packet_classes.h')
-rw-r--r--include/pso/packet_classes.h94
1 files changed, 90 insertions, 4 deletions
diff --git a/include/pso/packet_classes.h b/include/pso/packet_classes.h
index e0a78bd..d49c49a 100644
--- a/include/pso/packet_classes.h
+++ b/include/pso/packet_classes.h
@@ -25,8 +25,8 @@ struct TPlyText {
};
struct game_command_header {
- u8 command;
- u8 size;
+ char command;
+ char size;
u16 id;
void bswap() {
@@ -44,6 +44,24 @@ struct extended_game_command_header {
};
};
+struct long_game_command {
+ game_command_header header;
+ u8 data[1460-sizeof(game_command_header)];
+
+ void bswap() {
+ header.bswap();
+ };
+};
+
+struct extended_long_game_command {
+ extended_game_command_header header;
+ u8 data[1460-sizeof(extended_game_command_header)];
+
+ void bswap() {
+ header.bswap();
+ };
+};
+
struct game_command {
game_command_header header;
u8 data[1024-sizeof(game_command_header)];
@@ -85,6 +103,53 @@ union game_command_union {
u8 bytes[1024];
};
+union long_game_command_union {
+ struct long_game_command game_cmd;
+ struct extended_long_game_command ext_game_cmd;
+ u8 bytes[1460];
+};
+
+class TCreateGame {
+public:
+ packet_header header;
+ TPlyGuildCardTag tag;
+ char name[16];
+ char password[16];
+ u8 difficulty;
+ u8 battle_mode;
+ u8 challenge_mode;
+ u8 episode;
+public:
+ void bswap() {
+ header.bswap();
+ tag.bswap();
+ };
+};
+
+class TFindUser {
+public:
+ packet_header header;
+ TPlyGuildCardTag tag;
+ u32 target_gc;
+public:
+ void bswap() {
+ header.bswap();
+ tag.bswap();
+ bswap_32(&target_gc);
+ };
+};
+
+class TRoomChange {
+public:
+ packet_header header;
+ TPlyGuildCardTag tag;
+public:
+ void bswap() {
+ header.bswap();
+ tag.bswap();
+ };
+};
+
class TBlockedSenders {
public:
packet_header header;
@@ -275,11 +340,32 @@ public:
};
};
-class TPsoData {
+class TPsoDataBuf {
+public:
+ void recv_pso_data_buf(size_t size) {};
+};
+
+class TPsoDataLong : public TPsoDataBuf {
+public:
+ union {
+ union long_game_command_union pkt;
+ u8 bytes[0x8000];
+ };
+};
+
+class TPsoData : public TPsoDataBuf {
public:
union game_command_union pkt;
+};
+
+class TRecvPsoDataLong {
public:
- void recv_pso_data_buf(size_t size) {};
+ packet_header header;
+ TPsoDataLong data;
+public:
+ void bswap() {
+ header.bswap();
+ };
};
class TRecvPsoData {