Monopoly — Portage moderne 0.1.0
Portage moderne C/C++23 du Monopoly de 1999
Loading...
Searching...
No Matches
PieceShadowDisplay.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "PieceRuntime.hpp"
4#include "RuleTypes.hpp"
6
7#include <array>
8#include <cstdint>
9#include <expected>
10#include <optional>
11#include <string>
12
13namespace monopoly::pieces
14{
15 inline constexpr data::DataTag ShadowSequenceBaseTag = 0x05CD;
16 inline constexpr std::uint16_t ShadowPriorityBase = Generic3DPriority;
17 inline constexpr float ShadowGroundY = 1.0F;
18
30
32 {
33 std::uint8_t started{};
34 std::uint8_t stopped{};
35 std::uint8_t moved{};
36 };
37
39 {
40 public:
41 [[nodiscard]] std::expected<PieceShadowDisplayUpdate, std::string> sync(
43 const PieceShadowDisplayContext& context,
45
46 void reset() noexcept;
48 rules::PlayerNumber player) const noexcept;
49
50 private:
51 TokenPoseTracker poseTracker_;
52 std::array<data::DataId, rules::MaxPlayers> shown_{};
53 std::array<std::optional<TokenPose>, rules::MaxPlayers> poses_{};
54 };
55}
unsigned state
unsigned index
data::DataId shownSequence(rules::PlayerNumber player) const noexcept
std::expected< PieceShadowDisplayUpdate, std::string > sync(const rules::GameState &state, const PieceShadowDisplayContext &context, engine::SequencePlayback &playback)
std::uint32_t DataId
Definition DataBanks.hpp:10
std::uint16_t DataTag
Definition DataBanks.hpp:11
constexpr std::uint16_t ShadowPriorityBase
constexpr std::uint16_t Generic3DPriority
constexpr data::DataTag ShadowSequenceBaseTag
constexpr float ShadowGroundY
std::uint8_t PlayerNumber
Definition RuleTypes.hpp:12
constexpr PlayerNumber MaxPlayers
Definition RuleTypes.hpp:14
constexpr PlayerNumber NobodyPlayer
Definition RuleTypes.hpp:16
std::optional< rules::PlayerNumber > paddywagonPlayer