rodecomp/Source/UI/Cooldowns/CooldownState.h
ragnarok-clanker a47d20f8be Reconstruct readable C++ and organize cohesive source subsystems
Administrative source import: native x86 compilation passed for 423 authored units. Source placement and submission states are migrated separately; this commit does not imply peer acceptance.

Previous head: 35d2a8cb36
Payload SHA256: 592f016d2730c5593bb653aa054c1e5f76a6df72c8f5a09e66f74876e2e33dee
2026-10-25 07:42:41 +00:00

48 lines
1.3 KiB
C++

#ifndef RAGNAROK_SOURCE_UI_COOLDOWNS_COOLDOWNSTATE_H
#define RAGNAROK_SOURCE_UI_COOLDOWNS_COOLDOWNSTATE_H
#include "Render/Primitives/RenderPrimitive.h"
#include <map>
struct CooldownEdge {
float origin;
float current;
int radius;
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(sizeof(CooldownState) == 824);
#endif
#endif