aboutsummaryrefslogtreecommitdiffstats
path: root/include/inventory.h
diff options
context:
space:
mode:
authordrumsetmonkey <abelleisle@roadrunner.com>2016-01-07 08:33:54 -0500
committerdrumsetmonkey <abelleisle@roadrunner.com>2016-01-07 08:33:54 -0500
commite043a2432c4dacce56a308948188482fb230ff33 (patch)
treeb8809e54bc3c516dabfa8eace3b51a92d5c8fbcd /include/inventory.h
parentc7e3d72f0ef08cb9463cd8960bc29dad40e3bdcb (diff)
parent45edad31559852d306d59b50f380cb79c9f27dcc (diff)
Hey, that's pretty good lighting!
Diffstat (limited to 'include/inventory.h')
-rw-r--r--include/inventory.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/inventory.h b/include/inventory.h
index 31b7d88..b035f91 100644
--- a/include/inventory.h
+++ b/include/inventory.h
@@ -60,6 +60,11 @@ struct item_t{
ITEM_ID id;
} __attribute__((packed));
+typedef struct {
+ unsigned int size;
+ int os;
+ unsigned int sel;
+} __attribute__ ((packed)) InventorySavePacket;
class Inventory {
private:
@@ -87,6 +92,18 @@ public:
void draw(void); // Draws a text list of items in this inventory (should only be called for the player for now)
+ char *save(void){
+ static InventorySavePacket *isp = new InventorySavePacket();
+ isp->size = size;
+ isp->os = os;
+ isp->sel = sel;
+ return (char *)isp;
+ }
+ void load(InventorySavePacket *isp){
+ size = isp->size;
+ os = isp->os;
+ sel = isp->sel;
+ }
};
void itemUse(void *p);