Monopoly — Portage moderne 0.1.0
Portage moderne C/C++23 du Monopoly de 1999
Loading...
Searching...
No Matches
StatsDeedBarPlayback.hpp
Go to the documentation of this file.
1#pragma once
2
4
5#include <cstddef>
6#include <cstdint>
7#include <expected>
8#include <string>
9#include <vector>
10
11namespace monopoly::statsui
12{
13 inline constexpr data::DataTag DeedOwnerBarBaseTag = 0x00C7;
14 inline constexpr std::uint16_t DeedOwnerBarPriority = 510;
15 inline constexpr int DeedOwnerBarOffsetX = 42;
16 inline constexpr int DeedOwnerBarOffsetY = 13;
17
19 {
20 public:
21 struct Published
22 {
24 std::uint16_t priority{};
25 int x{};
26 int y{};
27 friend bool operator==(const Published&, const Published&) = default;
28 };
29 [[nodiscard]] std::expected<void, std::string> sync(
34
35 void reset() noexcept { current_.clear(); }
37 {
38 return current_.size();
39 }
40
41 private:
42 std::vector<Published> current_;
43 };
44}
unsigned state
unsigned index
std::expected< void, std::string > sync(const State &state, const rules::GameState &gameState, const PlayerPlaybackInputs &inputs, display::Screen2D desiredView, engine::SequencePlayback &playback)
std::size_t objectCount() const noexcept
std::uint32_t DataId
Definition DataBanks.hpp:10
constexpr DataId EmptyDataId
Definition DataBanks.hpp:13
std::uint16_t DataTag
Definition DataBanks.hpp:11
constexpr int DeedOwnerBarOffsetX
constexpr std::uint16_t DeedOwnerBarPriority
constexpr int DeedOwnerBarOffsetY
constexpr data::DataTag DeedOwnerBarBaseTag
friend bool operator==(const Published &, const Published &)=default