aboutsummaryrefslogtreecommitdiffstats
path: root/src/gameplay.cpp
diff options
context:
space:
mode:
authorClyne Sullivan <tullivan99@gmail.com>2016-02-02 08:49:38 -0500
committerClyne Sullivan <tullivan99@gmail.com>2016-02-02 08:49:38 -0500
commitd83b7f3d1f50ee1b164095c0e9d94cc87a44ad8c (patch)
treed7b76cb1907f781e1eccd1691bc7a622ed27a63c /src/gameplay.cpp
parent32855b564c2a7cd5c1a644dcf7039ab9b69295e4 (diff)
inventory rewrite
Diffstat (limited to 'src/gameplay.cpp')
-rw-r--r--src/gameplay.cpp10
1 files changed, 5 insertions, 5 deletions
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::vector<menuItem>optionsMenu;
extern void mainLoop(void);
void segFault(){
- ((vec2 *)currentWorld + 2934)[10].x = *((unsigned int *)&currentXML) * *((int *)NULL);
+ (*((int *)NULL))++;
}
@@ -26,7 +26,7 @@ typedef struct {
unsigned int index;
} NPCDialog;
-std::vector<XMLElement *> dopt;
+std::vector<XMLElement *> 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();
}