Monopoly — Portage moderne 0.1.0
Portage moderne C/C++23 du Monopoly de 1999
Loading...
Searching...
No Matches
PiecePlacement.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "DataBanks.hpp"
4
5#include <cstdint>
6#include <optional>
7
8namespace monopoly::pieces
9{
10 struct TokenPose
11 {
12 float x{};
13 float y{};
14 float z{};
15 float yaw{};
16 };
17
19 {
20 float x{};
21 float z{};
22 float yaw{};
23 };
24
25 inline constexpr std::uint8_t BoardSquareCountWithSpecials = 42;
26 inline constexpr std::uint8_t RestingPositionCount = 6;
27
28 enum class RestingIdleCategory : std::uint8_t
29 {
30 GoFreeParking = 0,
31 InJail,
35 };
36
37 [[nodiscard]] std::optional<RestingIdleCategory> restingIdleCategory(
38 std::uint8_t boardSquare) noexcept;
39
40 // Source/monopoly/UDPieces.cpp::UDPIECES_GetTokenOrientation.
41 [[nodiscard]] std::optional<TokenPose> tokenOrientation(
42 std::uint8_t boardSquare) noexcept;
43 // UDPieces token-sequence startup, including the CX0 corner adjustment.
44 [[nodiscard]] std::optional<TokenPose> tokenAnimationStartOrientation(
45 std::uint8_t boardSquare, data::DataId sequenceId) noexcept;
46 // Source/monopoly/UDPieces.cpp::UDPIECES_GetTokenRestingIdleOrientation.
47 [[nodiscard]] std::optional<TokenPose> tokenRestingOrientation(
48 std::uint8_t boardSquare, std::uint8_t restingPosition,
49 std::uint8_t token) noexcept;
50
51 [[nodiscard]] std::optional<BuildingPose> hotelPosition(
52 std::uint8_t boardSquare) noexcept;
53
54 [[nodiscard]] std::optional<BuildingPose> housePosition(
55 std::uint8_t boardSquare, std::uint8_t house) noexcept;
56}
unsigned index
int token
std::uint32_t DataId
Definition DataBanks.hpp:10
std::optional< BuildingPose > housePosition(std::uint8_t boardSquare, std::uint8_t house) noexcept
std::optional< BuildingPose > hotelPosition(std::uint8_t boardSquare) noexcept
constexpr std::uint8_t BoardSquareCountWithSpecials
std::optional< RestingIdleCategory > restingIdleCategory(std::uint8_t boardSquare) noexcept
std::optional< TokenPose > tokenOrientation(std::uint8_t boardSquare) noexcept
constexpr std::uint8_t RestingPositionCount
std::optional< TokenPose > tokenAnimationStartOrientation(std::uint8_t boardSquare, data::DataId sequenceId) noexcept
std::optional< TokenPose > tokenRestingOrientation(std::uint8_t boardSquare, std::uint8_t restingPosition, std::uint8_t token) noexcept