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 31 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 33 of file cardslist.h.

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

References cards.

◆ CardsList() [2/2]

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

Definition at line 44 of file cardslist.h.

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

References cards, and maxCards.

Member Function Documentation

◆ isEmpty()

bool CardsList::isEmpty ( ) const
inline

Definition at line 60 of file cardslist.h.

61  {
62  return cards[0] == 0 &&
63  cards[1] == 0 &&
64  cards[2] == 0 &&
65  cards[3] == 0;
66  }

References cards.

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

Field Documentation

◆ cards

int CardsList::cards[4]

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