summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-06-19 23:04:05 +0300
committerAndrei Karas <akaras@inbox.ru>2016-06-20 01:48:03 +0300
commit9dfde677430ab0dc1c11807b2b0d9f76bab353bb (patch)
tree92907f9c9467cf798c2b6fa392df9eefaebf4898 /src/resources
parent8462b9ae346a41a37b2790c3ea5f14f0e783ab71 (diff)
downloadmv-9dfde677430ab0dc1c11807b2b0d9f76bab353bb.tar.gz
mv-9dfde677430ab0dc1c11807b2b0d9f76bab353bb.tar.bz2
mv-9dfde677430ab0dc1c11807b2b0d9f76bab353bb.tar.xz
mv-9dfde677430ab0dc1c11807b2b0d9f76bab353bb.zip
Add support for stored cards with sprites in Being.
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/item/cardslist.h22
1 files changed, 22 insertions, 0 deletions
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];
};