summaryrefslogtreecommitdiff
path: root/context.h
diff options
context:
space:
mode:
Diffstat (limited to 'context.h')
-rw-r--r--context.h108
1 files changed, 104 insertions, 4 deletions
diff --git a/context.h b/context.h
index cfc430d..fff939a 100644
--- a/context.h
+++ b/context.h
@@ -899,8 +899,8 @@ struct send_buffs {
// pso/packet_classes.h
struct game_command_header {
- u8 command;
- u8 size;
+ char command;
+ char size;
u16 id;
void bswap() {
@@ -918,6 +918,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)];
@@ -973,6 +991,12 @@ 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];
+};
+
// pso/TObject.h
// Enum defs.
enum object_flags {
@@ -1402,6 +1426,47 @@ public:
};
// pso/packet_classes.h
+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 TRegister {
public:
packet_header header;
@@ -1509,11 +1574,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 {
@@ -1833,4 +1919,18 @@ public:
void send_text_list();
// 0x61
void send_chara_data_v2(TPlyCharData &char_data, TPlyChallenge &challenge, TPlyChoiceSearchConfig &choice_search_config, TBlockedSenders &blocked_senders, TPlyText<512> &auto_reply, char *info_board);
+ // 0x98
+ void send_update_chara_data_v2(TPlyCharData &char_data, TPlyChallenge &challenge, TPlyChoiceSearchConfig &choice_search_config, TBlockedSenders &blocked_senders, TPlyText<512> &auto_reply, char *info_board);
+ // 0x60
+ void send_pso_data(game_command &packet, u32 size);
+ // 0x62
+ void send_pso_data2(u32 flags, game_command &packet, u32 size);
+ // 0x6D
+ void send_pso_data_long2(char flags, long_game_command &packet, size_t size);
+ // 0x84
+ void send_room_change(int idx);
+ // 0x40
+ void send_find_user(TPlyGuildCardTag &tag, u32 gc_num);
+ // 0xC1
+ void send_create_game(char *name, char *password, u8 difficulty, u8 battle_mode, u8 challenge_mode, u8 episode);
};