diff options
Diffstat (limited to 'src/inventory.h')
-rw-r--r-- | src/inventory.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/inventory.h b/src/inventory.h index e23f7657..008b7ec4 100644 --- a/src/inventory.h +++ b/src/inventory.h @@ -1,9 +1,8 @@ /* - * Aethyra + * The Mana World * Copyright (C) 2004 The Mana World Development Team * - * This file is part of Aethyra based on original code - * from The Mana World. + * This file is part of The Mana World. * * 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 @@ -25,8 +24,12 @@ class Item; +#ifdef EATHENA_SUPPORT #define INVENTORY_SIZE 102 #define STORAGE_SIZE 301 +#else +#define INVENTORY_SIZE 50 +#endif class Inventory { @@ -34,7 +37,7 @@ class Inventory /** * Constructor. */ - Inventory(int size, int offset); + Inventory(int size, int offset = 0); /** * Destructor. @@ -62,12 +65,12 @@ class Inventory /** * Adds a new item in a free slot. */ - void addItem(int id, int quantity, bool equipment); + void addItem(int id, int quantity, bool equipment = false); /** * Sets the item at the given position. */ - void setItem(int index, int id, int quantity, bool equipment); + void setItem(int index, int id, int quantity, bool equipment = false); /** * Remove a item from the inventory. @@ -109,6 +112,7 @@ class Inventory */ int getInventorySize() const; + static const int NO_SLOT_INDEX = -1; /**< Slot has no index. */ protected: Item **mItems; /**< The holder of items */ int mSize; /**< The max number of inventory items */ |