From d164c4385eeebed9f461a8314f45a227fb0dca20 Mon Sep 17 00:00:00 2001 From: mrb0nk500 Date: Wed, 15 Mar 2023 17:07:02 -0300 Subject: context: Move `packet_class.h`'s structs to the proper position --- context.h | 77 ++++++++++++++++++++++++++++++++------------------------------- 1 file changed, 39 insertions(+), 38 deletions(-) diff --git a/context.h b/context.h index a869b7d..24f7b2d 100644 --- a/context.h +++ b/context.h @@ -493,44 +493,6 @@ struct TPlyText { }; }; -struct game_command_header { - u8 command; - u8 size; - u16 id; - - void bswap() { - bswap_16(&id); - }; -}; - -struct extended_game_command_header { - game_command_header header; - u32 size; - - void bswap() { - bswap_16(&header.id); - bswap_32(&size); - }; -}; - -struct game_command { - game_command_header header; - u8 data[1024-sizeof(game_command_header)]; - - void bswap() { - header.bswap(); - }; -}; - -struct extended_game_command { - extended_game_command_header header; - u8 data[1024-sizeof(extended_game_command_header)]; - - void bswap() { - header.bswap(); - }; -}; - TMenuListEntry(GameListEntry, u8 difficulty_tag; u8 num_players; @@ -773,6 +735,45 @@ struct send_buffs { u8 *buff; }; +// pso/packet_classes.h +struct game_command_header { + u8 command; + u8 size; + u16 id; + + void bswap() { + bswap_16(&id); + }; +}; + +struct extended_game_command_header { + game_command_header header; + u32 size; + + void bswap() { + bswap_16(&header.id); + bswap_32(&size); + }; +}; + +struct game_command { + game_command_header header; + u8 data[1024-sizeof(game_command_header)]; + + void bswap() { + header.bswap(); + }; +}; + +struct extended_game_command { + extended_game_command_header header; + u8 data[1024-sizeof(extended_game_command_header)]; + + void bswap() { + header.bswap(); + }; +}; + // pso/TProtocol.h struct packet { union { -- cgit v1.2.3-13-gbd6f