rodecomp/Source/UI/Cooldowns/CooldownState.h
ragnarok-clanker 2800d0fdc0 Maintenance: Add mandatory field offset markers /* XXXX */ and assertions to UI headers
Batch #1065 by ragnarok-clanker: no function's compiled code changes; checked with 92 compiled unit(s), including every includer of Source/UI/Buttons/UIBmpTextButton.h, Source/UI/Chat/ChatNotifications.h, Source/UI/Cooldowns/CooldownDrawing.h, Source/UI/Cooldowns/CooldownState.h, Source/UI/Edit/ItemTagRetirement.h, Source/UI/Layout/SnapRectangle.h, Source/UI/Lists/UIListBoxEx.h, Source/UI/MiniPartyGrid.h, Source/UI/Party/UIAdvenPartyBoardWnd.h, Source/UI/Party/UIRequestJoinPartyMgr.h, Source/UI/Shop/PriceColor.h, Source/UI/Shortcuts/ShortcutCooldowns.h, Source/UI/Shortcuts/ShortcutGrid.h, Source/UI/Text/TextMarkup.h, Source/UI/Text/UITransBalloonText.h, Source/UI/Window/FrameTextCache.h, Source/UI/Window/UIWindow.h, Source/UI/Window/WindowAncestry.h, Source/UI/Window/WindowRegistration.h.
2026-10-27 13:55:58 +00:00

52 lines
1.5 KiB
C++

#ifndef RAGNAROK_SOURCE_UI_COOLDOWNS_COOLDOWNSTATE_H
#define RAGNAROK_SOURCE_UI_COOLDOWNS_COOLDOWNSTATE_H
#include "Render/Primitives/RenderPrimitive.h"
#include <cstddef>
#include <map>
struct CooldownEdge {
/* 0000 */ float origin;
/* 0004 */ float current;
/* 0008 */ int radius;
/* 000C */ unsigned char increasing;
};
struct CooldownClock {
const bool& restricted;
const std::uint32_t& serverTick;
std::uint32_t Now() const;
};
struct CooldownState {
/* 0000 */ std::map<unsigned, CooldownEdge> edges;
/* 0008 */ unsigned segment;
/* 000C */ unsigned vertexCount;
/* 0010 */ float angle;
/* 0014 */ std::uint32_t duration;
/* 0018 */ std::uint32_t start;
/* 001C */ std::uint32_t elapsed;
/* 0020 */ unsigned finalMinute;
/* 0024 */ int reverse;
/* 0028 */ RenderVertex vertices[24];
/* 0328 */ int x;
/* 032C */ int y;
/* 0330 */ int slot;
/* 0334 */ std::uint32_t color;
CooldownState(int slot, int x, int y, std::uint32_t duration, std::uint32_t start, std::uint32_t elapsed, int reverse);
void ClearEdges();
void AddEdge(unsigned segment, float origin, int radius, unsigned char increasing);
float Update(const CooldownClock& clock);
};
static_assert(sizeof(CooldownEdge) == 16);
#if defined(_WIN32) && !defined(_WIN64)
static_assert(offsetof(CooldownEdge, current) == 0x04);
static_assert(offsetof(CooldownEdge, radius) == 0x08);
static_assert(offsetof(CooldownEdge, increasing) == 0x0C);
static_assert(sizeof(CooldownState) == 824);
#endif
#endif