From 8462b9ae346a41a37b2790c3ea5f14f0e783ab71 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 19 Jun 2016 22:21:19 +0300 Subject: Add struct for store cards list. --- src/resources/item/cardslist.cpp | 25 +++++++++++++++++++++ src/resources/item/cardslist.h | 48 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+) create mode 100644 src/resources/item/cardslist.cpp create mode 100644 src/resources/item/cardslist.h (limited to 'src/resources') diff --git a/src/resources/item/cardslist.cpp b/src/resources/item/cardslist.cpp new file mode 100644 index 000000000..c26d023b3 --- /dev/null +++ b/src/resources/item/cardslist.cpp @@ -0,0 +1,25 @@ +/* + * The ManaPlus Client + * Copyright (C) 2016 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "resources/item/cardslist.h" + +#include "debug.h" + +CardsList zeroCards(0, 0, 0, 0); diff --git a/src/resources/item/cardslist.h b/src/resources/item/cardslist.h new file mode 100644 index 000000000..f8a7fee3a --- /dev/null +++ b/src/resources/item/cardslist.h @@ -0,0 +1,48 @@ +/* + * The ManaPlus Client + * Copyright (C) 2004-2009 The Mana World Development Team + * Copyright (C) 2009-2010 The Mana Developers + * Copyright (C) 2011-2016 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef RESOURCES_ITEM_CARDSLIST_H +#define RESOURCES_ITEM_CARDSLIST_H + +#include "const/resources/item/cards.h" + +#include "localconsts.h" + +struct CardsList final +{ + CardsList(const int card0, + const int card1, + const int card2, + const int card3) + { + cards[0] = card0; + cards[1] = card1; + cards[2] = card2; + cards[3] = card3; + } + + int cards[maxCards]; +}; + +extern CardsList zeroCards; + +#endif // RESOURCES_ITEM_CARDSLIST_H -- cgit v1.2.3-60-g2f50