Monopoly — Portage moderne 0.1.0
Portage moderne C/C++23 du Monopoly de 1999
Loading...
Searching...
No Matches
PieceRuntime.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "DataBanks.hpp"
4#include "PiecePlacement.hpp"
5#include "RuleTypes.hpp"
6#include "SequenceRuntime.hpp"
7
8#include <array>
9#include <cstdint>
10#include <optional>
11
12namespace monopoly::pieces
13{
14 inline constexpr std::uint16_t TokenPriority = 224;
15 inline constexpr std::uint16_t Generic3DPriority = 100;
16 inline constexpr std::uint16_t JailAnimationPriority = 77;
17
19 {
20 std::array<std::optional<data::DataId>, rules::MaxPlayers> idleSequences{};
21 std::optional<data::DataId> movingSequence;
22 std::optional<rules::PlayerNumber> playerMovingOut;
23 std::optional<data::DataId> playerMovingOutSequence;
24 std::optional<rules::PlayerNumber> playerMovingIn;
25 std::optional<data::DataId> playerMovingInSequence;
26 std::optional<data::DataId> jailTokenAnimation;
27 };
28
29 // Stateful equivalent of UDPIECES_GetTokenActualOrientation. The original
30 // deliberately falls back to LastKnownData, not the theoretical board pose.
32 {
33 public:
35 rules::PlayerNumber numberOfPlayers, const TokenRuntimeSources& sources,
36 const sequence::SequenceRuntime& runtime) noexcept;
37
38 private:
39 std::array<TokenPose, rules::MaxPlayers> lastKnown_{};
40 };
41}
fonts::Runtime & runtime
unsigned index
TokenPose locate(rules::PlayerNumber player, rules::PlayerNumber numberOfPlayers, const TokenRuntimeSources &sources, const sequence::SequenceRuntime &runtime) noexcept
constexpr std::uint16_t Generic3DPriority
constexpr std::uint16_t JailAnimationPriority
constexpr std::uint16_t TokenPriority
std::uint8_t PlayerNumber
Definition RuleTypes.hpp:12
constexpr PlayerNumber MaxPlayers
Definition RuleTypes.hpp:14
std::optional< rules::PlayerNumber > playerMovingIn
std::array< std::optional< data::DataId >, rules::MaxPlayers > idleSequences
std::optional< data::DataId > playerMovingInSequence
std::optional< rules::PlayerNumber > playerMovingOut
std::optional< data::DataId > movingSequence
std::optional< data::DataId > jailTokenAnimation
std::optional< data::DataId > playerMovingOutSequence