rodecomp/Source/UI/Text/UIBroadcastBalloon.h
ragnarok-clanker b904d8e567 Decompile 15 functions in Source/UI/Text/UIBroadcastBalloon.h, Source/UI/Text/UIBroadcastBalloon.cpp, ...
Batch #16679 by kyoshi: 1 byte-identical, 14 confirmed by peer review.

- fn_04781 ShutdownCallback::operator(): logic confirmed by peer review
- fn_21435 CGameMode::ShowNoticeBalloon: logic confirmed by peer review
- fn_21618 CGameMode::ProcessWhisper: logic confirmed by peer review
- fn_21658 CGameMode::ReceiveColorBroadcast: logic confirmed by peer review
- fn_21659 CGameMode::ReceiveTaggedBroadcast: logic confirmed by peer review
- fn_21661 CGameMode::ReceiveRefineStatusGraded: logic confirmed by peer review
- fn_21662 CGameMode::ReceiveItemObtainBroadcast: logic confirmed by peer review
- fn_21663 CGameMode::ReceiveRefineBroadcast: logic confirmed by peer review
- fn_21664 CGameMode::ReceiveTradeBroadcast: logic confirmed by peer review
- fn_21665 CGameMode::ReceiveItemBroadcast: logic confirmed by peer review
- fn_21795 CGameMode::ReceiveBroadcastBalloonNotice: logic confirmed by peer review
- fn_21838 CGameMode::ReceiveSpecialBroadcast: logic confirmed by peer review
- fn_22089 CGameMode::ReceiveRefineStatus: logic confirmed by peer review
- fn_22122 CGameMode::ReceiveGradeEnchantBroadcast: logic confirmed by peer review
- fn_22163 CGameMode::ReceiveRateInfo: byte-identical

Peer-reviewed-by: eAthena, Yommy
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
2026-11-11 07:19:06 +00:00

55 lines
1.6 KiB
C++

#ifndef RAGNAROK_SOURCE_UI_TEXT_UIBROADCASTBALLOON_H
#define RAGNAROK_SOURCE_UI_TEXT_UIBROADCASTBALLOON_H
#include "UI/Window/UIWindow.h"
#include <__msvc_chrono.hpp>
#include <cstddef>
#include <cstdint>
#include <list>
#include <map>
#include <string>
struct BroadcastBalloonLine {
/* 0000 */ std::string text;
/* 0018 */ std::uint32_t color;
/* 001C */ std::uint32_t outlineColor;
};
struct BroadcastBalloonMessage {
BroadcastBalloonMessage() : start(), duration(20), fontHeight(12), backgroundColor(0x40000000), width(0), height(0) {
this->start = std::chrono::system_clock::now();
}
/* 0000 */ std::list<BroadcastBalloonLine> lines;
/* 0008 */ std::chrono::system_clock::time_point start;
/* 0010 */ std::chrono::seconds duration;
/* 0018 */ int fontHeight;
/* 001C */ std::uint32_t backgroundColor;
/* 0020 */ int width;
/* 0024 */ int height;
};
class UIBroadcastBalloon : public UIWindow {
public:
UIBroadcastBalloon();
void Paint() override;
bool CanHitTest() override;
void OnProcess() override;
bool GetCustomTransBoxInfo(void* output) override;
void DrawTransBox() override;
void AddMessage(int category, const BroadcastBalloonMessage& message);
protected:
/* 007C */ std::map<int, std::list<BroadcastBalloonMessage>> m_messages;
};
#if defined(_WIN32) && !defined(_WIN64)
static_assert(sizeof(BroadcastBalloonLine) == 0x20);
static_assert(offsetof(BroadcastBalloonMessage, start) == 0x08);
static_assert(offsetof(BroadcastBalloonMessage, height) == 0x24);
static_assert(sizeof(BroadcastBalloonMessage) == 0x28);
#endif
#endif