From 9dfde677430ab0dc1c11807b2b0d9f76bab353bb Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 19 Jun 2016 23:04:05 +0300 Subject: Add support for stored cards with sprites in Being. --- src/resources/item/cardslist.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src/resources') diff --git a/src/resources/item/cardslist.h b/src/resources/item/cardslist.h index f8a7fee3a..8da565091 100644 --- a/src/resources/item/cardslist.h +++ b/src/resources/item/cardslist.h @@ -40,6 +40,28 @@ struct CardsList final cards[3] = card3; } + CardsList(const int *const cards0) + { + if (cards0) + { + for (int f = 0; f < maxCards; f ++) + cards[f] = cards0[f]; + } + else + { + for (int f = 0; f < maxCards; f ++) + cards[f] = 0; + } + } + + bool isEmpty() const A_WARN_UNUSED + { + return cards[0] == 0 && + cards[1] == 0 && + cards[2] == 0 && + cards[3] == 0; + } + int cards[maxCards]; }; -- cgit v1.2.3-70-g09d2