summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormrb0nk500 <b0nk@b0nk.xyz>2023-03-12 11:48:28 -0300
committermrb0nk500 <b0nk@b0nk.xyz>2023-03-12 11:48:28 -0300
commit8a0ac8490951429277e707607975424b6dcd12b8 (patch)
treedabf3098fd2713a87d0e1a065613bd56753429d3
parent0aab853119953c87fe76d23d695c9e0e1c267dd8 (diff)
TProtocol: Rename some of the command handlers to match their names in
PSOv2
-rw-r--r--context.h12
-rw-r--r--include/pso/TProtocol.h12
-rw-r--r--src/pso/TProtocol.cpp30
3 files changed, 27 insertions, 27 deletions
diff --git a/context.h b/context.h
index db476cb..2baecea 100644
--- a/context.h
+++ b/context.h
@@ -206,10 +206,10 @@ typedef long ptrdiff_t;
o(handle_13_recv_download, TRecvDownload &download) \
o(handle_A4_downloadable_quest_menu_packet, void) \
o(handle_A5_downloadable_quest_info_packet, void) \
- o(handle_A6_recv_download_head2, TRecvDownloadHead &download_head) \
- o(handle_A7_recv_download2, TRecvDownload &download) \
+ o(handle_A6_recv_vm_download_head, TRecvDownloadHead &download_head) \
+ o(handle_A7_recv_vm_download, TRecvDownload &download) \
o(unused11, void) \
- o(handle_1F_recv_info_list, int entry_count, GameListEntry *entries, GameListEntry &entry_0) \
+ o(handle_1F_recv_text_list, int entry_count, GameListEntry *entries, GameListEntry &entry_0) \
o(handle_B0_server_message_packet, void) \
o(handle_88_player_arrow_color_list_packet, void) \
o(handle_8A_lobby_name_packet, void) \
@@ -1413,7 +1413,7 @@ public:
// 0x08
void recv_game_list(packet &pkt);
// 0x1F
- void recv_info_list(packet &pkt);
+ void recv_text_list(packet &pkt);
// 0x0E
void recv_start_game(packet &pkt);
// 0x64
@@ -1427,9 +1427,9 @@ public:
// 0x44
void recv_download_head(packet &pkt);
// 0xA6
- void recv_download_head2(packet &pkt);
+ void recv_vm_download_head(packet &pkt);
// 0xA7
- void recv_download2(packet &pkt);
+ void recv_vm_download(packet &pkt);
// 0x13
void recv_download(packet &pkt);
// 0x14
diff --git a/include/pso/TProtocol.h b/include/pso/TProtocol.h
index 699068e..bcc7386 100644
--- a/include/pso/TProtocol.h
+++ b/include/pso/TProtocol.h
@@ -73,10 +73,10 @@ struct packet {
o(handle_13_recv_download, TRecvDownload &download) \
o(handle_A4_downloadable_quest_menu_packet, void) \
o(handle_A5_downloadable_quest_info_packet, void) \
- o(handle_A6_recv_download_head2, TRecvDownloadHead &download_head) \
- o(handle_A7_recv_download2, TRecvDownload &download) \
+ o(handle_A6_recv_vm_download_head, TRecvDownloadHead &download_head) \
+ o(handle_A7_recv_vm_download, TRecvDownload &download) \
o(unused11, void) \
- o(handle_1F_recv_info_list, int entry_count, GameListEntry *entries, GameListEntry &entry_0) \
+ o(handle_1F_recv_text_list, int entry_count, GameListEntry *entries, GameListEntry &entry_0) \
o(handle_B0_server_message_packet, void) \
o(handle_88_player_arrow_color_list_packet, void) \
o(handle_8A_lobby_name_packet, void) \
@@ -173,7 +173,7 @@ public:
// 0x08
void recv_game_list(packet &pkt);
// 0x1F
- void recv_info_list(packet &pkt);
+ void recv_text_list(packet &pkt);
// 0x0E
void recv_start_game(packet &pkt);
// 0x64
@@ -187,9 +187,9 @@ public:
// 0x44
void recv_download_head(packet &pkt);
// 0xA6
- void recv_download_head2(packet &pkt);
+ void recv_vm_download_head(packet &pkt);
// 0xA7
- void recv_download2(packet &pkt);
+ void recv_vm_download(packet &pkt);
// 0x13
void recv_download(packet &pkt);
// 0x14
diff --git a/src/pso/TProtocol.cpp b/src/pso/TProtocol.cpp
index 415f056..19b2672 100644
--- a/src/pso/TProtocol.cpp
+++ b/src/pso/TProtocol.cpp
@@ -49,7 +49,7 @@ void TProtocol::recv_download(packet &pkt) {
send(reinterpret_cast<u8 *>(&tmp2), sizeof(tmp2));
};
-void TProtocol::recv_download2(packet &pkt) {
+void TProtocol::recv_vm_download(packet &pkt) {
TSendDownloadHead tmp2;
TRecvDownload tmp = as(TRecvDownload &, pkt);
tmp.bswap();
@@ -60,14 +60,14 @@ void TProtocol::recv_download2(packet &pkt) {
strncpy(tmp2.filename, tmp.filename, sizeof(tmp2.filename));
tmp2.bswap();
- if (m_recv_handlers.handle_A7_recv_download2 != nullptr) {
- m_recv_handlers.handle_A7_recv_download2(tmp);
+ if (m_recv_handlers.handle_A7_recv_vm_download != nullptr) {
+ m_recv_handlers.handle_A7_recv_vm_download(tmp);
}
send(reinterpret_cast<u8 *>(&tmp2), sizeof(tmp2));
};
-void TProtocol::recv_download_head2(packet &pkt) {
+void TProtocol::recv_vm_download_head(packet &pkt) {
TSendDownloadHead tmp2;
TRecvDownloadHead tmp = as(TRecvDownloadHead &, pkt);
tmp.bswap();
@@ -78,8 +78,8 @@ void TProtocol::recv_download_head2(packet &pkt) {
strncpy(tmp2.filename, tmp.filename, sizeof(tmp2.filename));
tmp2.bswap();
- if (m_recv_handlers.handle_A6_recv_download_head2 != nullptr) {
- m_recv_handlers.handle_A6_recv_download_head2(tmp);
+ if (m_recv_handlers.handle_A6_recv_vm_download_head != nullptr) {
+ m_recv_handlers.handle_A6_recv_vm_download_head(tmp);
}
send(reinterpret_cast<u8 *>(&tmp2), sizeof(tmp2));
@@ -155,9 +155,9 @@ void TProtocol::recv_start_game(packet &pkt) {
};
-void TProtocol::recv_info_list(packet &pkt) {
- typedef TMenuList<GameListEntry, 64, 1> info_list;
- info_list tmp = as(info_list &, pkt);
+void TProtocol::recv_text_list(packet &pkt) {
+ typedef TMenuList<GameListEntry, 64, 1> text_list;
+ text_list tmp = as(text_list &, pkt);
tmp.bswap();
m_entry_count = tmp.header.flags;
@@ -166,8 +166,8 @@ void TProtocol::recv_info_list(packet &pkt) {
m_game_entries[i] = tmp.entries[i];
}
- if (m_recv_handlers.handle_1F_recv_info_list != nullptr) {
- m_recv_handlers.handle_1F_recv_info_list(m_entry_count, m_game_entries, tmp.pad_entries[0]);
+ if (m_recv_handlers.handle_1F_recv_text_list != nullptr) {
+ m_recv_handlers.handle_1F_recv_text_list(m_entry_count, m_game_entries, tmp.pad_entries[0]);
}
};
@@ -279,13 +279,13 @@ int TProtocol::handle_command(struct packet *pkt) {
{ 0x13, &recv_download },
{ 0x14, &recv_upload },
{ 0x11, &recv_message },
- { 0x1F, &recv_info_list },
+ { 0x1F, &recv_text_list },
{ 0x1A, &recv_text },
{ 0x67, &recv_start_lobby2 },
{ 0xA0, &recv_dir_list },
{ 0xA1, &recv_dir_list },
- { 0xA6, &recv_download_head2 },
- { 0xA7, &recv_download2 },
+ { 0xA6, &recv_vm_download_head },
+ { 0xA7, &recv_vm_download },
{ 0xD5, &recv_text },
{ 0, nullptr }
};
@@ -452,7 +452,7 @@ TProtocol::TProtocol(TObject *parent, u16 sub_version, int language, char *seria
m_recv_handlers.unused11 = nullptr;
m_recv_handlers.handle_97_checksum_reply_packet = nullptr;
m_recv_handlers.handle_B0_server_message_packet = nullptr;
- m_recv_handlers.handle_1F_recv_info_list = nullptr;
+ m_recv_handlers.handle_1F_recv_text_list = nullptr;
m_recv_handlers.handle_88_player_arrow_color_list_packet = nullptr;
m_recv_handlers.handle_8A_lobby_name_packet = nullptr;
m_recv_handlers.handle_C5_player_challenge_data_packet = nullptr;