diff options
author | Clyne Sullivan <tullivan99@gmail.com> | 2016-03-21 08:49:48 -0400 |
---|---|---|
committer | Clyne Sullivan <tullivan99@gmail.com> | 2016-03-21 08:49:48 -0400 |
commit | afdbe5de31c9ae1009d36710eb2b1c31ec44a9f5 (patch) | |
tree | 58812c528ea6d4995a6acad83a156c6fd5bd0407 /src/world.cpp | |
parent | 3432a970912dac94d9ba527f10f0354dcc396bf4 (diff) | |
parent | 51c6e601c3d6451294506b72213244e3aee9822f (diff) |
cleaning up ui code
Diffstat (limited to 'src/world.cpp')
-rw-r--r-- | src/world.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/world.cpp b/src/world.cpp index 2c7e06d..1a7322f 100644 --- a/src/world.cpp +++ b/src/world.cpp @@ -220,7 +220,6 @@ World:: Mix_FreeMusic(bgmObj); delete bgTex; - deleteEntities(); } @@ -786,6 +785,7 @@ singleDetect( Entity *e ) */ } else { + if(e->type == STRUCTURET && e->loc.y > 2000){ e->loc.y = worldData[i].groundHeight; e->vel.y = 0; @@ -985,6 +985,7 @@ setToRight( std::string file ) return (toRight = file); } +//what is this clyne why are they differnet World *World:: goWorldLeft( Player *p ) { @@ -1131,9 +1132,11 @@ void World::save(void){ } data.append("dOnE\0"); + std::cout << "Writing to the file" << std::endl; out.write(data.c_str(),data.size()); out.close(); + std::cout << "Done saving" << std::endl; } void World::load(void){ @@ -1536,8 +1539,6 @@ loadWorldFromXMLNoSave( std::string path ) { tmp->addMerchant(0,100); if(vil->FirstChildElement("buy")){ std::cout << "Buy" << std::endl; - //Trade goodMeme(1,"Dank MayMay",1,"Sword"); - //tmp->merchant.back()->trade.push_back(Trade()); }if(vil->FirstChildElement("sell")){ std::cout << "Sell" << std::endl; }if(vil->FirstChildElement("trade")){ @@ -1546,7 +1547,9 @@ loadWorldFromXMLNoSave( std::string path ) { vil->FirstChildElement("trade")->Attribute("item"), vil->FirstChildElement("trade")->IntAttribute("quantity1"), vil->FirstChildElement("trade")->Attribute("item1"))); + tmp->merchant.back()->trade.push_back(Trade(1,"Wood Sword", 420, "Dank MayMay")); } + std::cout << "new trade" << std::endl; strcpy(tmp->merchant.back()->name,"meme"); }else if(!strcmp(vil->Attribute("type"),"trader")){ |