Monopoly — Portage moderne 0.1.0
Portage moderne C/C++23 du Monopoly de 1999
Loading...
Searching...
No Matches
monopoly::pieces Namespace Reference

Classes

struct  BuildingPose
 
struct  InterpolationVec3
 
class  PieceBuildingDisplay
 
struct  PieceBuildingDisplayUpdate
 
struct  PieceIdleAnimation
 
class  PieceIdleDisplay
 
struct  PieceIdleDisplayContext
 
struct  PieceIdleDisplayUpdate
 
class  PieceIdlePlayback
 
struct  PieceIdlePlaybackUpdate
 
class  PieceIdleState
 
struct  PieceIdleTransitionPlan
 
struct  PieceInterpolationPath
 
struct  PieceInterpolationSample
 
class  PieceJailPlayback
 
struct  PieceJailPlaybackUpdate
 
struct  PieceJailRoutePlan
 
class  PieceMoveIngress
 
struct  PieceMoveIngressError
 
struct  PieceMoveIngressResult
 
struct  PieceMoveInstruction
 
struct  PieceMovePlan
 
class  PieceMovePlayback
 
struct  PieceMovePlaybackUpdate
 
struct  PieceMoveSpecialRequest
 
class  PieceShadowDisplay
 
struct  PieceShadowDisplayContext
 
struct  PieceShadowDisplayUpdate
 
struct  TokenPose
 
class  TokenPoseTracker
 
struct  TokenRuntimeSources
 

Enumerations

enum class  BoardCameraView : std::uint8_t {
  TopDownSquare = 0 , TopDownSoccer , TopDownStarWars , ThreeTiles01 ,
  ThreeTiles02 , ThreeTiles03 , ThreeTiles04 , ThreeTiles05 ,
  ThreeTiles06 , ThreeTiles07 , ThreeTiles08 , ThreeTiles09 ,
  ThreeTiles10 , ThreeTiles11 , ThreeTiles12 , CornerGo ,
  CornerJail , CornerFreeParking , CornerGoToJail , FiveTiles01 ,
  FiveTiles02 , FiveTiles03 , FiveTiles04 , FiveTiles05 ,
  FiveTiles06 , FiveTiles07 , FiveTiles08 , FifteenTiles01 ,
  FifteenTiles02 , FifteenTiles03 , FifteenTiles04 , FifteenTiles05 ,
  FifteenTiles06 , FifteenTiles07 , FifteenTiles08 , FifteenTiles09 ,
  FifteenTiles10 , FifteenTiles11 , FifteenTiles12 , Count
}
 
enum class  BoardViewSelectionType : std::uint8_t { RollDice , JailChoice }
 
enum class  PieceIdleTransitionError : std::uint8_t { InvalidPlayer , InvalidSquare , InvalidToken , InvalidProjection }
 
enum class  InterpolationSpeed : std::uint8_t { Linear = 1 , AccelerateInOut = 2 , FastAccelerateFlatMid = 3 }
 
enum class  PieceJailPlanError : std::uint8_t { InvalidSquare , MissingGeometry , TooManyBezierSegments }
 
enum class  PieceMoveIngressErrorCode : std::uint8_t {
  UnsupportedMessage , InvalidPlayer , InvalidGameProjection , Busy ,
  PlannerFailure
}
 
enum class  PieceMoveSpecial : std::uint8_t {
  None , GoToJail , LeaveJail , OffBoardRequiresGameContext ,
  OffBoardBankrupt , OffBoardVictory
}
 
enum class  OffBoardOutcome : std::uint8_t { Bankrupt , Victory }
 
enum class  PieceMovePlanError : std::uint8_t {
  UnsupportedNotification , InvalidToken , InvalidSquare , MissingRandomChoice ,
  AnimationStackOverflow , UnsupportedCornerShape
}
 
enum class  RestingIdleCategory : std::uint8_t {
  GoFreeParking = 0 , InJail , JustVisiting , Property ,
  RailroadUtilityChance
}
 

Functions

BoardCameraView selectAppropriateView (BoardViewSelectionType type, BoardCameraView desired, std::int32_t currentSquare, std::int32_t variable) noexcept
 
BoardCameraView pickCameraFor3Squares (std::int32_t square) noexcept
 
BoardCameraView pickCameraFor5Squares (std::int32_t square) noexcept
 
BoardCameraView pickCameraFor15Squares (std::int32_t square) noexcept
 
BoardCameraView pickGoodCamera (std::int32_t square, std::int32_t distance) noexcept
 
bool addBezierSegment (PieceInterpolationPath &path, std::size_t index, InterpolationVec3 a, InterpolationVec3 b, InterpolationVec3 c, InterpolationVec3 d, float tangentDelta) noexcept
 
bool addBezierSegmentSmooth (PieceInterpolationPath &path, std::size_t index, InterpolationVec3 c, InterpolationVec3 d, float tangentDelta) noexcept
 
PieceInterpolationSample samplePieceInterpolation (const PieceInterpolationPath &path, std::uint64_t tick) noexcept
 
constexpr InterpolationVec3 operator+ (InterpolationVec3 a, InterpolationVec3 b) noexcept
 
constexpr InterpolationVec3 operator- (InterpolationVec3 a, InterpolationVec3 b) noexcept
 
constexpr InterpolationVec3 operator* (InterpolationVec3 a, float s) noexcept
 
constexpr InterpolationVec3 operator* (float s, InterpolationVec3 a) noexcept
 
std::expected< PieceJailRoutePlan, PieceJailPlanError > planPaddyToToken (std::uint8_t tokenSquare, std::uint64_t startTick, std::uint8_t randomBit)
 
std::expected< PieceJailRoutePlan, PieceJailPlanError > planPaddyToJail (std::uint8_t tokenSquare, InterpolationVec3 startLocation, std::uint64_t startTick)
 
std::expected< PieceMovePlan, PieceMovePlanError > planTokenMove (actions::Type notification, std::uint8_t token, std::int32_t before, std::int32_t after, bool animationsEnabled, std::span< const std::uint8_t > randomChoices)
 
std::expected< PieceMovePlan, PieceMovePlanError > planOffBoardMove (std::uint8_t token, std::int32_t before, OffBoardOutcome outcome)
 
std::optional< RestingIdleCategory > restingIdleCategory (std::uint8_t boardSquare) noexcept
 
std::optional< TokenPose > tokenOrientation (std::uint8_t boardSquare) noexcept
 
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
 
std::optional< BuildingPose > hotelPosition (std::uint8_t boardSquare) noexcept
 
std::optional< BuildingPose > housePosition (std::uint8_t boardSquare, std::uint8_t house) noexcept
 

Variables

constexpr data::DataTag HotelMeshTag = 0x0004
 
constexpr data::DataTag HouseMeshTag = 0x0005
 
constexpr std::uint16_t BoardHousingPriority = 55
 
constexpr std::uint8_t HouseSlotCount = 4
 
constexpr float BuildingDisplayScale = 0.10F
 
constexpr data::DataTag PersistentIdleBaseTag = 0x010D
 
constexpr std::uint16_t PersistentIdlePriority = 224
 
constexpr data::DataTag IdleToRestBaseTag = 0x011B
 
constexpr data::DataTag RestToCenterBaseTag = 0x011C
 
constexpr data::DataTag IdleAnimationsPerToken = 0x0063
 
constexpr std::size_t BezierMaxSegments = 10
 
constexpr float BezierTangentDelta = 0.0005F
 
constexpr std::uint16_t JailPlaybackPriority = 77
 
constexpr std::size_t TokenAnimationItemLimit = 12
 
constexpr data::DataTag TokenCornerAnimationBaseTag = 0x00F6
 
constexpr data::DataTag TokenMoveAnimationBaseTag = 0x010D
 
constexpr data::DataTag TokenBackThreeAnimationBaseTag = 0x0118
 
constexpr data::DataTag AnimationsPerToken = 0x0063
 
constexpr std::uint8_t BoardSquareCountWithSpecials = 42
 
constexpr std::uint8_t RestingPositionCount = 6
 
constexpr std::uint16_t TokenPriority = 224
 
constexpr std::uint16_t Generic3DPriority = 100
 
constexpr std::uint16_t JailAnimationPriority = 77
 
constexpr data::DataTag ShadowSequenceBaseTag = 0x05CD
 
constexpr std::uint16_t ShadowPriorityBase = Generic3DPriority
 
constexpr float ShadowGroundY = 1.0F
 

Enumeration Type Documentation

◆ BoardCameraView

enum class monopoly::pieces::BoardCameraView : std::uint8_t
strong
Enumerator
TopDownSquare 
TopDownSoccer 
TopDownStarWars 
ThreeTiles01 
ThreeTiles02 
ThreeTiles03 
ThreeTiles04 
ThreeTiles05 
ThreeTiles06 
ThreeTiles07 
ThreeTiles08 
ThreeTiles09 
ThreeTiles10 
ThreeTiles11 
ThreeTiles12 
CornerGo 
CornerJail 
CornerFreeParking 
CornerGoToJail 
FiveTiles01 
FiveTiles02 
FiveTiles03 
FiveTiles04 
FiveTiles05 
FiveTiles06 
FiveTiles07 
FiveTiles08 
FifteenTiles01 
FifteenTiles02 
FifteenTiles03 
FifteenTiles04 
FifteenTiles05 
FifteenTiles06 
FifteenTiles07 
FifteenTiles08 
FifteenTiles09 
FifteenTiles10 
FifteenTiles11 
FifteenTiles12 
Count 

Definition at line 9 of file PieceCamera.hpp.

◆ BoardViewSelectionType

enum class monopoly::pieces::BoardViewSelectionType : std::uint8_t
strong
Enumerator
RollDice 
JailChoice 

Definition at line 53 of file PieceCamera.hpp.

◆ InterpolationSpeed

enum class monopoly::pieces::InterpolationSpeed : std::uint8_t
strong
Enumerator
Linear 
AccelerateInOut 
FastAccelerateFlatMid 

Definition at line 34 of file PieceInterpolation.hpp.

◆ OffBoardOutcome

enum class monopoly::pieces::OffBoardOutcome : std::uint8_t
strong
Enumerator
Bankrupt 
Victory 

Definition at line 31 of file PieceMovePlan.hpp.

◆ PieceIdleTransitionError

Enumerator
InvalidPlayer 
InvalidSquare 
InvalidToken 
InvalidProjection 

Definition at line 18 of file PieceIdleTransition.hpp.

◆ PieceJailPlanError

enum class monopoly::pieces::PieceJailPlanError : std::uint8_t
strong
Enumerator
InvalidSquare 
MissingGeometry 
TooManyBezierSegments 

Definition at line 11 of file PieceJailPlan.hpp.

◆ PieceMoveIngressErrorCode

Enumerator
UnsupportedMessage 
InvalidPlayer 
InvalidGameProjection 
Busy 
PlannerFailure 

Definition at line 14 of file PieceMoveIngress.hpp.

◆ PieceMovePlanError

enum class monopoly::pieces::PieceMovePlanError : std::uint8_t
strong
Enumerator
UnsupportedNotification 
InvalidToken 
InvalidSquare 
MissingRandomChoice 
AnimationStackOverflow 
UnsupportedCornerShape 

Definition at line 37 of file PieceMovePlan.hpp.

◆ PieceMoveSpecial

enum class monopoly::pieces::PieceMoveSpecial : std::uint8_t
strong
Enumerator
None 
GoToJail 
LeaveJail 
OffBoardRequiresGameContext 
OffBoardBankrupt 
OffBoardVictory 

Definition at line 21 of file PieceMovePlan.hpp.

◆ RestingIdleCategory

enum class monopoly::pieces::RestingIdleCategory : std::uint8_t
strong
Enumerator
GoFreeParking 
InJail 
JustVisiting 
Property 
RailroadUtilityChance 

Definition at line 28 of file PiecePlacement.hpp.

Function Documentation

◆ addBezierSegment()

bool monopoly::pieces::addBezierSegment ( PieceInterpolationPath &  path,
std::size_t  index,
InterpolationVec3  a,
InterpolationVec3  b,
InterpolationVec3  c,
InterpolationVec3  d,
float  tangentDelta 
)
noexcept

Definition at line 46 of file PieceInterpolation.cpp.

◆ addBezierSegmentSmooth()

bool monopoly::pieces::addBezierSegmentSmooth ( PieceInterpolationPath &  path,
std::size_t  index,
InterpolationVec3  c,
InterpolationVec3  d,
float  tangentDelta 
)
noexcept

Definition at line 61 of file PieceInterpolation.cpp.

◆ hotelPosition()

std::optional< BuildingPose > monopoly::pieces::hotelPosition ( std::uint8_t  boardSquare)
noexcept

Definition at line 198 of file PiecePlacement.cpp.

◆ housePosition()

std::optional< BuildingPose > monopoly::pieces::housePosition ( std::uint8_t  boardSquare,
std::uint8_t  house 
)
noexcept

Definition at line 203 of file PiecePlacement.cpp.

◆ operator*() [1/2]

constexpr InterpolationVec3 monopoly::pieces::operator* ( float  s,
InterpolationVec3  a 
)
constexprnoexcept

Definition at line 27 of file PieceInterpolation.hpp.

◆ operator*() [2/2]

constexpr InterpolationVec3 monopoly::pieces::operator* ( InterpolationVec3  a,
float  s 
)
constexprnoexcept

Definition at line 24 of file PieceInterpolation.hpp.

◆ operator+()

constexpr InterpolationVec3 monopoly::pieces::operator+ ( InterpolationVec3  a,
InterpolationVec3  b 
)
constexprnoexcept

Definition at line 18 of file PieceInterpolation.hpp.

◆ operator-()

constexpr InterpolationVec3 monopoly::pieces::operator- ( InterpolationVec3  a,
InterpolationVec3  b 
)
constexprnoexcept

Definition at line 21 of file PieceInterpolation.hpp.

◆ pickCameraFor15Squares()

BoardCameraView monopoly::pieces::pickCameraFor15Squares ( std::int32_t  square)
noexcept

Definition at line 119 of file PieceCamera.cpp.

◆ pickCameraFor3Squares()

BoardCameraView monopoly::pieces::pickCameraFor3Squares ( std::int32_t  square)
noexcept

Definition at line 109 of file PieceCamera.cpp.

◆ pickCameraFor5Squares()

BoardCameraView monopoly::pieces::pickCameraFor5Squares ( std::int32_t  square)
noexcept

Definition at line 114 of file PieceCamera.cpp.

◆ pickGoodCamera()

BoardCameraView monopoly::pieces::pickGoodCamera ( std::int32_t  square,
std::int32_t  distance 
)
noexcept

Definition at line 124 of file PieceCamera.cpp.

◆ planOffBoardMove()

std::expected< PieceMovePlan, PieceMovePlanError > monopoly::pieces::planOffBoardMove ( std::uint8_t  token,
std::int32_t  before,
OffBoardOutcome  outcome 
)

Definition at line 233 of file PieceMovePlan.cpp.

◆ planPaddyToJail()

std::expected< PieceJailRoutePlan, PieceJailPlanError > monopoly::pieces::planPaddyToJail ( std::uint8_t  tokenSquare,
InterpolationVec3  startLocation,
std::uint64_t  startTick 
)

Definition at line 179 of file PieceJailPlan.cpp.

◆ planPaddyToToken()

std::expected< PieceJailRoutePlan, PieceJailPlanError > monopoly::pieces::planPaddyToToken ( std::uint8_t  tokenSquare,
std::uint64_t  startTick,
std::uint8_t  randomBit 
)

Definition at line 47 of file PieceJailPlan.cpp.

◆ planTokenMove()

std::expected< PieceMovePlan, PieceMovePlanError > monopoly::pieces::planTokenMove ( actions::Type  notification,
std::uint8_t  token,
std::int32_t  before,
std::int32_t  after,
bool  animationsEnabled,
std::span< const std::uint8_t >  randomChoices 
)

Definition at line 67 of file PieceMovePlan.cpp.

◆ restingIdleCategory()

std::optional< RestingIdleCategory > monopoly::pieces::restingIdleCategory ( std::uint8_t  boardSquare)
noexcept

Definition at line 62 of file PiecePlacement.cpp.

◆ samplePieceInterpolation()

PieceInterpolationSample monopoly::pieces::samplePieceInterpolation ( const PieceInterpolationPath &  path,
std::uint64_t  tick 
)
noexcept

Definition at line 72 of file PieceInterpolation.cpp.

◆ selectAppropriateView()

BoardCameraView monopoly::pieces::selectAppropriateView ( BoardViewSelectionType  type,
BoardCameraView  desired,
std::int32_t  currentSquare,
std::int32_t  variable 
)
noexcept

Definition at line 76 of file PieceCamera.cpp.

◆ tokenAnimationStartOrientation()

std::optional< TokenPose > monopoly::pieces::tokenAnimationStartOrientation ( std::uint8_t  boardSquare,
data::DataId  sequenceId 
)
noexcept

Definition at line 88 of file PiecePlacement.cpp.

◆ tokenOrientation()

std::optional< TokenPose > monopoly::pieces::tokenOrientation ( std::uint8_t  boardSquare)
noexcept

Definition at line 71 of file PiecePlacement.cpp.

◆ tokenRestingOrientation()

std::optional< TokenPose > monopoly::pieces::tokenRestingOrientation ( std::uint8_t  boardSquare,
std::uint8_t  restingPosition,
std::uint8_t  token 
)
noexcept

Definition at line 114 of file PiecePlacement.cpp.

Variable Documentation

◆ AnimationsPerToken

constexpr data::DataTag monopoly::pieces::AnimationsPerToken = 0x0063
inlineconstexpr

Definition at line 19 of file PieceMovePlan.hpp.

◆ BezierMaxSegments

constexpr std::size_t monopoly::pieces::BezierMaxSegments = 10
inlineconstexpr

Definition at line 31 of file PieceInterpolation.hpp.

◆ BezierTangentDelta

constexpr float monopoly::pieces::BezierTangentDelta = 0.0005F
inlineconstexpr

Definition at line 32 of file PieceInterpolation.hpp.

◆ BoardHousingPriority

constexpr std::uint16_t monopoly::pieces::BoardHousingPriority = 55
inlineconstexpr

Definition at line 16 of file PieceBuildingDisplay.hpp.

◆ BoardSquareCountWithSpecials

constexpr std::uint8_t monopoly::pieces::BoardSquareCountWithSpecials = 42
inlineconstexpr

Definition at line 25 of file PiecePlacement.hpp.

◆ BuildingDisplayScale

constexpr float monopoly::pieces::BuildingDisplayScale = 0.10F
inlineconstexpr

Definition at line 18 of file PieceBuildingDisplay.hpp.

◆ Generic3DPriority

constexpr std::uint16_t monopoly::pieces::Generic3DPriority = 100
inlineconstexpr

Definition at line 15 of file PieceRuntime.hpp.

◆ HotelMeshTag

constexpr data::DataTag monopoly::pieces::HotelMeshTag = 0x0004
inlineconstexpr

Definition at line 14 of file PieceBuildingDisplay.hpp.

◆ HouseMeshTag

constexpr data::DataTag monopoly::pieces::HouseMeshTag = 0x0005
inlineconstexpr

Definition at line 15 of file PieceBuildingDisplay.hpp.

◆ HouseSlotCount

constexpr std::uint8_t monopoly::pieces::HouseSlotCount = 4
inlineconstexpr

Definition at line 17 of file PieceBuildingDisplay.hpp.

◆ IdleAnimationsPerToken

constexpr data::DataTag monopoly::pieces::IdleAnimationsPerToken = 0x0063
inlineconstexpr

Definition at line 16 of file PieceIdleTransition.hpp.

◆ IdleToRestBaseTag

constexpr data::DataTag monopoly::pieces::IdleToRestBaseTag = 0x011B
inlineconstexpr

Definition at line 14 of file PieceIdleTransition.hpp.

◆ JailAnimationPriority

constexpr std::uint16_t monopoly::pieces::JailAnimationPriority = 77
inlineconstexpr

Definition at line 16 of file PieceRuntime.hpp.

◆ JailPlaybackPriority

constexpr std::uint16_t monopoly::pieces::JailPlaybackPriority = 77
inlineconstexpr

Definition at line 15 of file PieceJailPlayback.hpp.

◆ PersistentIdleBaseTag

constexpr data::DataTag monopoly::pieces::PersistentIdleBaseTag = 0x010D
inlineconstexpr

Definition at line 13 of file PieceIdleDisplay.hpp.

◆ PersistentIdlePriority

constexpr std::uint16_t monopoly::pieces::PersistentIdlePriority = 224
inlineconstexpr

Definition at line 14 of file PieceIdleDisplay.hpp.

◆ RestingPositionCount

constexpr std::uint8_t monopoly::pieces::RestingPositionCount = 6
inlineconstexpr

Definition at line 26 of file PiecePlacement.hpp.

◆ RestToCenterBaseTag

constexpr data::DataTag monopoly::pieces::RestToCenterBaseTag = 0x011C
inlineconstexpr

Definition at line 15 of file PieceIdleTransition.hpp.

◆ ShadowGroundY

constexpr float monopoly::pieces::ShadowGroundY = 1.0F
inlineconstexpr

Definition at line 17 of file PieceShadowDisplay.hpp.

◆ ShadowPriorityBase

constexpr std::uint16_t monopoly::pieces::ShadowPriorityBase = Generic3DPriority
inlineconstexpr

Definition at line 16 of file PieceShadowDisplay.hpp.

◆ ShadowSequenceBaseTag

constexpr data::DataTag monopoly::pieces::ShadowSequenceBaseTag = 0x05CD
inlineconstexpr

Definition at line 15 of file PieceShadowDisplay.hpp.

◆ TokenAnimationItemLimit

constexpr std::size_t monopoly::pieces::TokenAnimationItemLimit = 12
inlineconstexpr

Definition at line 15 of file PieceMovePlan.hpp.

◆ TokenBackThreeAnimationBaseTag

constexpr data::DataTag monopoly::pieces::TokenBackThreeAnimationBaseTag = 0x0118
inlineconstexpr

Definition at line 18 of file PieceMovePlan.hpp.

◆ TokenCornerAnimationBaseTag

constexpr data::DataTag monopoly::pieces::TokenCornerAnimationBaseTag = 0x00F6
inlineconstexpr

Definition at line 16 of file PieceMovePlan.hpp.

◆ TokenMoveAnimationBaseTag

constexpr data::DataTag monopoly::pieces::TokenMoveAnimationBaseTag = 0x010D
inlineconstexpr

Definition at line 17 of file PieceMovePlan.hpp.

◆ TokenPriority

constexpr std::uint16_t monopoly::pieces::TokenPriority = 224
inlineconstexpr

Definition at line 14 of file PieceRuntime.hpp.