Monopoly — Portage moderne 0.1.0
Portage moderne C/C++23 du Monopoly de 1999
Loading...
Searching...
No Matches
BoardOwnershipHighlight.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "DataBanks.hpp"
4#include "Display.hpp"
5#include "PieceCamera.hpp"
6#include "RuleTypes.hpp"
9
10#include <array>
11#include <expected>
12#include <optional>
13#include <string>
14
16{
17 inline constexpr std::uint16_t OwnershipPriorityBase = 12;
18 inline constexpr data::DataTag Ownership2DNormalBaseTag = 0x035A;
19 inline constexpr data::DataTag Ownership2DMortgagedBaseTag = 0x0000;
20 inline constexpr data::DataTag Ownership3DMortgagedBaseTag = 0x00E9;
21 inline constexpr data::DataTag Ownership3DNormalBaseTag = 0x00EF;
22 inline constexpr std::uint32_t Ownership2DPerCamera = 168;
23 inline constexpr std::uint32_t OwnershipColours = 6;
24 inline constexpr float Ownership3DScale = 0.10F;
25
26 enum class OwnershipHighlightKind : std::uint8_t
27 {
29 Mesh3D
30 };
31
39
41 std::array<std::optional<OwnershipHighlight>, rules::SquareCount>;
42
43 [[nodiscard]] int ownershipPropertyIndex(int square) noexcept;
44
46 int square) noexcept;
47
48 [[nodiscard]] std::expected<OwnershipHighlightPlan, std::string>
52 bool board3DOn,
54
56 {
57 public:
58 [[nodiscard]] std::expected<void, std::string> sync(
61 void reset() noexcept;
62
63 [[nodiscard]] data::DataId current(std::size_t square) const noexcept
64 { return square < current_.size() ? current_[square] : data::EmptyDataId; }
65
66 private:
67 std::array<data::DataId, rules::SquareCount> current_{};
68 };
69}
decision::EconomicActionPlan plan
unsigned state
unsigned index
data::DataId current(std::size_t square) const noexcept
std::expected< void, std::string > sync(const OwnershipHighlightPlan &plan, engine::SequencePlayback &playback)
constexpr data::DataTag Ownership3DMortgagedBaseTag
constexpr std::uint16_t OwnershipPriorityBase
int ownershipPropertyIndex(int square) noexcept
constexpr data::DataTag Ownership2DNormalBaseTag
constexpr std::uint32_t Ownership2DPerCamera
sequence::Matrix3D ownershipHighlight3DTransform(int square) noexcept
std::expected< OwnershipHighlightPlan, std::string > planOwnershipHighlights(const rules::GameState &state, display::Screen2D view, bool board3DOn, pieces::BoardCameraView camera)
std::array< std::optional< OwnershipHighlight >, rules::SquareCount > OwnershipHighlightPlan
constexpr data::DataTag Ownership2DMortgagedBaseTag
constexpr std::uint32_t OwnershipColours
constexpr data::DataTag Ownership3DNormalBaseTag
std::uint32_t DataId
Definition DataBanks.hpp:10
constexpr DataId EmptyDataId
Definition DataBanks.hpp:13
std::uint16_t DataTag
Definition DataBanks.hpp:11
constexpr std::size_t SquareCount
Definition RuleTypes.hpp:24
Matrix3D identity3D() noexcept