Monopoly — Portage moderne 0.1.0
Portage moderne C/C++23 du Monopoly de 1999
Loading...
Searching...
No Matches
StatsPlayerPlayback.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "IBarLayout.hpp"
4#include "IBarRuleState.hpp"
6#include "StatsUI.hpp"
7
8#include <cstddef>
9#include <cstdint>
10#include <expected>
11#include <string>
12#include <vector>
13
14namespace monopoly::statsui
15{
16 inline constexpr std::uint16_t PlayerBoxPriority = 500;
17 inline constexpr std::uint16_t PlayerDeedBasePriority = 510;
18 inline constexpr data::DataTag PlayerBoxLargeBaseTag = 0x0349;
19 inline constexpr data::DataTag PlayerBoxSmallBaseTag = 0x034F;
20 inline constexpr data::DataTag PlayerDeedMortgagedBaseTag = 0x05CA;
21 inline constexpr data::DataTag PlayerDeedNormalBaseTag = 0x05E6;
22 inline constexpr int PlayerDeedWidth = 36;
23 inline constexpr int PlayerDeedHeight = 42;
24
34
36 {
37 public:
38 [[nodiscard]] std::expected<void, std::string> sync(
42 void reset() noexcept { current_.clear(); }
43 [[nodiscard]] std::size_t objectCount() const noexcept { return current_.size(); }
44
45 struct Published
46 {
48 std::uint16_t priority{};
49 int x{};
50 int y{};
51 friend bool operator==(const Published&, const Published&) = default;
52 };
53
54 private:
55 std::vector<Published> current_;
56 };
57}
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
std::uint32_t PropertyMask
std::uint8_t PlayerNumber
Definition RuleTypes.hpp:12
constexpr PlayerNumber NobodyPlayer
Definition RuleTypes.hpp:16
constexpr std::uint16_t PlayerBoxPriority
constexpr int PlayerDeedWidth
constexpr int PlayerDeedHeight
constexpr data::DataTag PlayerBoxLargeBaseTag
constexpr data::DataTag PlayerDeedMortgagedBaseTag
constexpr data::DataTag PlayerDeedNormalBaseTag
constexpr std::uint16_t PlayerDeedBasePriority
constexpr data::DataTag PlayerBoxSmallBaseTag
friend bool operator==(const Published &, const Published &)=default