From d83b7f3d1f50ee1b164095c0e9d94cc87a44ad8c Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Tue, 2 Feb 2016 08:49:38 -0500 Subject: inventory rewrite --- src/gameplay.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/gameplay.cpp') diff --git a/src/gameplay.cpp b/src/gameplay.cpp index 7c238b4..8e68783 100644 --- a/src/gameplay.cpp +++ b/src/gameplay.cpp @@ -17,7 +17,7 @@ extern std::vectoroptionsMenu; extern void mainLoop(void); void segFault(){ - ((vec2 *)currentWorld + 2934)[10].x = *((unsigned int *)¤tXML) * *((int *)NULL); + (*((int *)NULL))++; } @@ -26,7 +26,7 @@ typedef struct { unsigned int index; } NPCDialog; -std::vector dopt; +std::vector dopt; int commonAIFunc(NPC *speaker){ XMLDocument xml; @@ -66,7 +66,7 @@ int commonAIFunc(NPC *speaker){ if((oxml = exml->FirstChildElement("give"))){ while(oxml){ - player->inv->addItem((ITEM_ID)oxml->UnsignedAttribute("id"),oxml->UnsignedAttribute("count")); + player->inv->addItem(oxml->Attribute("id"),oxml->UnsignedAttribute("count")); oxml = oxml->NextSiblingElement(); } } @@ -77,7 +77,7 @@ int commonAIFunc(NPC *speaker){ if((oxml = exml->FirstChildElement("take"))){ while(oxml){ - player->inv->takeItem((ITEM_ID)oxml->UnsignedAttribute("id"),oxml->UnsignedAttribute("count")); + player->inv->takeItem(oxml->Attribute("id"),oxml->UnsignedAttribute("count")); oxml = oxml->NextSiblingElement(); } } @@ -128,7 +128,7 @@ int commonAIFunc(NPC *speaker){ /* * No options - simply print the text. */ - + ui::dialogBox(speaker->name,"",false,exml->GetText()); ui::waitForDialog(); } -- cgit v1.2.3