diff options
author | mrb0nk500 <b0nk@b0nk.xyz> | 2023-03-15 17:07:02 -0300 |
---|---|---|
committer | mrb0nk500 <b0nk@b0nk.xyz> | 2023-03-15 17:07:02 -0300 |
commit | d164c4385eeebed9f461a8314f45a227fb0dca20 (patch) | |
tree | a08b927f028ab5b6a940e7a37979fbc42d49c9a1 | |
parent | f43225daeb23e17120d35eb610593475daaeb01e (diff) |
context: Move `packet_class.h`'s structs to the proper position
-rw-r--r-- | context.h | 77 |
1 files changed, 39 insertions, 38 deletions
@@ -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 { |