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

Classes

struct  Rect
 

Typedefs

using PropertyMask = std::uint32_t
 
using ActionButtonMask = unsigned int
 

Enumerations

enum class  ActionButtonSlot : int {
  Options = 0 , Trade , General1 , General4 ,
  General2 , General3 , Main , Camera ,
  Status , Count
}
 
enum class  ActionButtonLayout : int { General = 0 , BuyAuction , TaxDecision , Trading }
 

Functions

int propertyIndex (int square) noexcept
 
PropertyMask propertyBit (int square) noexcept
 
int propertyBarOrder (int square) noexcept
 
Rect propertyRect (int square) noexcept
 
std::optional< int > propertyHit (int x, int y, PropertyMask visibleProperties) noexcept
 
int scoreBoxWidth (int numberOfPlayers) noexcept
 
int scoreX (int playerIndex, int numberOfPlayers, int playerWidth) noexcept
 
Rect playerSetupHitRect (int playerIndex, int numberOfPlayers) noexcept
 
Rect actionButtonRect (ActionButtonSlot slot, ActionButtonLayout layout) noexcept
 
std::optional< ActionButtonSlot > actionButtonHit (int x, int y, ActionButtonLayout layout, ActionButtonMask activeSlots) noexcept
 
constexpr Rect bankHitRect () noexcept
 
constexpr ActionButtonMask actionButtonBit (ActionButtonSlot slot) noexcept
 

Variables

constexpr int VirtualWidth = 800
 
constexpr int VirtualHeight = 600
 
constexpr int ScoreY = 560
 
constexpr int ScoreBorder = 2
 
constexpr int BankWidth = 45
 
constexpr int ScoreBoxSmallWidth = 127
 
constexpr int ScoreBoxLargeWidth = 184
 
constexpr ActionButtonMask AllActionButtonSlots
 

Typedef Documentation

◆ ActionButtonMask

◆ PropertyMask

Definition at line 105 of file IBarLayout.hpp.

Enumeration Type Documentation

◆ ActionButtonLayout

Enumerator
General 
BuyAuction 
TaxDecision 
Trading 

Definition at line 38 of file IBarLayout.hpp.

◆ ActionButtonSlot

Enumerator
Options 
Trade 
General1 
General4 
General2 
General3 
Main 
Camera 
Status 
Count 

Definition at line 22 of file IBarLayout.hpp.

Function Documentation

◆ actionButtonBit()

constexpr ActionButtonMask monopoly::ibar::layout::actionButtonBit ( ActionButtonSlot  slot)
constexprnoexcept

Definition at line 118 of file IBarLayout.hpp.

◆ actionButtonHit()

std::optional< ActionButtonSlot > monopoly::ibar::layout::actionButtonHit ( int  x,
int  y,
ActionButtonLayout  layout,
ActionButtonMask  activeSlots 
)
noexcept

Definition at line 240 of file IBarLayout.cpp.

◆ actionButtonRect()

Rect monopoly::ibar::layout::actionButtonRect ( ActionButtonSlot  slot,
ActionButtonLayout  layout 
)
noexcept

Definition at line 177 of file IBarLayout.cpp.

◆ bankHitRect()

constexpr Rect monopoly::ibar::layout::bankHitRect ( )
constexprnoexcept

Definition at line 92 of file IBarLayout.hpp.

◆ playerSetupHitRect()

Rect monopoly::ibar::layout::playerSetupHitRect ( int  playerIndex,
int  numberOfPlayers 
)
noexcept

Definition at line 130 of file IBarLayout.cpp.

◆ propertyBarOrder()

int monopoly::ibar::layout::propertyBarOrder ( int  square)
noexcept

Definition at line 38 of file IBarLayout.cpp.

◆ propertyBit()

PropertyMask monopoly::ibar::layout::propertyBit ( int  square)
noexcept

Definition at line 31 of file IBarLayout.cpp.

◆ propertyHit()

std::optional< int > monopoly::ibar::layout::propertyHit ( int  x,
int  y,
PropertyMask  visibleProperties 
)
noexcept

Definition at line 67 of file IBarLayout.cpp.

◆ propertyIndex()

int monopoly::ibar::layout::propertyIndex ( int  square)
noexcept

Definition at line 23 of file IBarLayout.cpp.

◆ propertyRect()

Rect monopoly::ibar::layout::propertyRect ( int  square)
noexcept

Definition at line 46 of file IBarLayout.cpp.

◆ scoreBoxWidth()

int monopoly::ibar::layout::scoreBoxWidth ( int  numberOfPlayers)
noexcept

Definition at line 80 of file IBarLayout.cpp.

◆ scoreX()

int monopoly::ibar::layout::scoreX ( int  playerIndex,
int  numberOfPlayers,
int  playerWidth 
)
noexcept

Definition at line 90 of file IBarLayout.cpp.

Variable Documentation

◆ AllActionButtonSlots

constexpr ActionButtonMask monopoly::ibar::layout::AllActionButtonSlots
inlineconstexpr
Initial value:
=
(1u << static_cast<unsigned int>(ActionButtonSlot::Count)) - 1u

Definition at line 123 of file IBarLayout.hpp.

◆ BankWidth

constexpr int monopoly::ibar::layout::BankWidth = 45
inlineconstexpr

Definition at line 15 of file IBarLayout.hpp.

◆ ScoreBorder

constexpr int monopoly::ibar::layout::ScoreBorder = 2
inlineconstexpr

Definition at line 13 of file IBarLayout.hpp.

◆ ScoreBoxLargeWidth

constexpr int monopoly::ibar::layout::ScoreBoxLargeWidth = 184
inlineconstexpr

Definition at line 19 of file IBarLayout.hpp.

◆ ScoreBoxSmallWidth

constexpr int monopoly::ibar::layout::ScoreBoxSmallWidth = 127
inlineconstexpr

Definition at line 17 of file IBarLayout.hpp.

◆ ScoreY

constexpr int monopoly::ibar::layout::ScoreY = 560
inlineconstexpr

Definition at line 11 of file IBarLayout.hpp.

◆ VirtualHeight

constexpr int monopoly::ibar::layout::VirtualHeight = 600
inlineconstexpr

Definition at line 9 of file IBarLayout.hpp.

◆ VirtualWidth

constexpr int monopoly::ibar::layout::VirtualWidth = 800
inlineconstexpr

Definition at line 8 of file IBarLayout.hpp.