ManaPlus
Public Member Functions | Data Fields
CardsList Struct Reference

#include <cardslist.h>

Public Member Functions

 CardsList (const int card0, const int card1, const int card2, const int card3)
 
 CardsList (const int *const cards0)
 
bool isEmpty () const
 

Data Fields

int cards [4]
 

Detailed Description

Definition at line 30 of file cardslist.h.

Constructor & Destructor Documentation

◆ CardsList() [1/2]

CardsList::CardsList ( const int  card0,
const int  card1,
const int  card2,
const int  card3 
)
inline

Definition at line 32 of file cardslist.h.

References cards.

36  {
37  cards[0] = card0;
38  cards[1] = card1;
39  cards[2] = card2;
40  cards[3] = card3;
41  }
int cards[4]
Definition: cardslist.h:67

◆ CardsList() [2/2]

CardsList::CardsList ( const int *const  cards0)
inlineexplicit

Definition at line 43 of file cardslist.h.

References A_DEFAULT_COPY, cards, and maxCards.

44  {
45  if (cards0 != nullptr)
46  {
47  for (int f = 0; f < maxCards; f ++)
48  cards[f] = cards0[f];
49  }
50  else
51  {
52  for (int f = 0; f < maxCards; f ++)
53  cards[f] = 0;
54  }
55  }
int cards[4]
Definition: cardslist.h:67
#define maxCards
Definition: cards.h:24

Member Function Documentation

◆ isEmpty()

bool CardsList::isEmpty ( ) const
inline

Definition at line 59 of file cardslist.h.

References cards.

Referenced by BeingEquipBackend::BeingEquipBackend(), Being::setHairTempSprite(), and Being::setTempSprite().

60  {
61  return cards[0] == 0 &&
62  cards[1] == 0 &&
63  cards[2] == 0 &&
64  cards[3] == 0;
65  }
int cards[4]
Definition: cardslist.h:67

Field Documentation

◆ cards

int CardsList::cards[4]

The documentation for this struct was generated from the following file: