From 0deef86019dc3d160eeaa5b6091a6b04f919ae07 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Sat, 31 Oct 2026 06:37:28 +0000 Subject: [PATCH] Decompile 3 functions in Source/Client/Mode/GameMode.cpp, Source/Client/Mode/CGameMode.h Batch #7376 by eAthena: 1 byte-identical, 2 confirmed by peer review. - fn_21325 CGameMode::IgnorePacket: byte-identical - fn_21343 CGameMode::RemoveUnknown01A4: logic confirmed by peer review - fn_21364 CGameMode::UpdateReplayActionSpeeds: logic confirmed by peer review Peer-reviewed-by: eAthena, Lumen, Yommy, zindokar Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Client/Mode/CGameMode.h | 5 ++++ Source/Client/Mode/GameMode.cpp | 43 +++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) diff --git a/Source/Client/Mode/CGameMode.h b/Source/Client/Mode/CGameMode.h index b6eb60ab..16df9c65 100644 --- a/Source/Client/Mode/CGameMode.h +++ b/Source/Client/Mode/CGameMode.h @@ -465,6 +465,11 @@ public: void Zc_Start_Capture(const unsigned char* packet); void Zc_Start_Collection(const unsigned char* packet); void Zc_Start_Couple(const unsigned char* packet); + void IgnorePacket(); + void RemoveUnknown01A4(int value); + bool RecordReplayMessage(int message, int value, int first, int second); + void UpdateReplayActionSpeeds(); + struct ReplayTime StopReplayRecording(); void ReceivePacket0AB8(const unsigned char* packet); void ReceivePacket0A29(int value); void ReceiveCashShopBanner(int value1, int value2, int value3); diff --git a/Source/Client/Mode/GameMode.cpp b/Source/Client/Mode/GameMode.cpp index 02f38768..bf7f7d15 100644 --- a/Source/Client/Mode/GameMode.cpp +++ b/Source/Client/Mode/GameMode.cpp @@ -842,3 +842,46 @@ void __stdcall sub_CE8F10(const void* info, const unsigned char* data) { }; recorder.Record(packet.length, &packet, 0x2A, 0); } + +// OFFSET: 0x00CDFAF0 +// FUNCTION: fn_21325 +void CGameMode::IgnorePacket() { +} + +// OFFSET: 0x00CE8EC0 +// FUNCTION: fn_21343 +void CGameMode::RemoveUnknown01A4(int value) { + for (std::list::iterator it = this->unknown_01A4.begin(); it != this->unknown_01A4.end(); ++it) { + if (*it == value) { + this->unknown_01A4.erase(it); + return; + } + } +} + +#pragma pack(push, 1) +struct GameModeMessageRecord { + /* 0000 */ std::uint32_t header; + /* 0004 */ std::uint16_t length; + /* 0006 */ int message; + /* 000A */ int value; + /* 000E */ int first; + /* 0012 */ int second; +}; +#pragma pack(pop) + +static_assert(sizeof(GameModeMessageRecord) == 0x16); + +// OFFSET: 0x00CE8FC0 + +// OFFSET: 0x00CED260 +// FUNCTION: fn_21364 +void CGameMode::UpdateReplayActionSpeeds() { + CPlayer* player = this->scene->player; + player->SetActionSpeed(Replay::Instance().AnimationScale()); + for (CRenderObject* actor : this->scene->actors) { + actor->SetActionSpeed(Replay::Instance().AnimationScale()); + } +} + +// OFFSET: 0x00CF1060