From: drumsetmonkey Date: Fri, 4 Mar 2016 12:31:12 +0000 (-0500) Subject: Merge branch 'master' of http://github.com/tcsullivan/gamedev X-Git-Url: https://code.bitgloo.com/?a=commitdiff_plain;h=6af8dcbaa41a7db52ff8f6074d2b113ec7eaf12d;p=clyne%2Fgamedev.git Merge branch 'master' of http://github.com/tcsullivan/gamedev --- 6af8dcbaa41a7db52ff8f6074d2b113ec7eaf12d diff --cc src/world.cpp index 32a3153,bef6fc0..e4ce1fd --- a/src/world.cpp +++ b/src/world.cpp @@@ -1467,20 -1434,13 +1435,20 @@@ loadWorldFromXMLNoSave( std::string pat vil->QueryFloatAttribute("x", &spawnx) != XML_NO_ERROR ? randx : spawnx, 100, - (char*)vil->Attribute("texture"), - ptr); + vil->StrAttribute("texture"), + vil->StrAttribute("inside")); tmp->addMerchant(0,100); - if(!strcmp(name,"buy")){ - std::cout << "Buying"; - }else if(!strcmp(name,"sell")){ - std::cout << "Selling"; + if(vil->FirstChildElement("buy")){ + std::cout << "Buy" << std::endl; + /*bs.member = 0; + bs.cost.type = 0; + bs.cost.item = vil->FirstChildElement("buy")->Attribute("item"); + bs.cost.price =vil->FirstChildElement("buy")->IntAttribute("cost");*/ + tmp->merchant.back()->bsinv.push_back({0,"Dank MayMay",420}); + }if(vil->FirstChildElement("sell")){ + std::cout << "Sell" << std::endl; + }if(vil->FirstChildElement("trade")){ + std::cout << "Trade" << std::endl; } strcpy(tmp->merchant.back()->name,"meme");