From 45bca98b792f8ced1a57ef8c5beed2a90a79d47f Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Mon, 30 Nov 2015 08:47:07 -0500 Subject: switched to 100% new/delete --- src/gameplay.cpp | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) (limited to 'src/gameplay.cpp') diff --git a/src/gameplay.cpp b/src/gameplay.cpp index 6e85b6d..2fd7424 100644 --- a/src/gameplay.cpp +++ b/src/gameplay.cpp @@ -97,28 +97,12 @@ void initEverything(void){ /* * World creation: */ + World *test=new World(); World *playerSpawnHill=new World(); - /* - * Load the saved world if it exists, otherwise generate a new one. - */ - - /*FILE *worldLoad; - if((worldLoad=fopen("world.dat","r"))){ - std::cout<<"Yes"<load(buf); - }else{*/ - test->generate(SCREEN_WIDTH*2); - test->addHole(100,150); - //} + test->generate(SCREEN_WIDTH*2); + test->addHole(100,150); test->setBackground(BG_FOREST); test->addLayer(400); @@ -160,7 +144,7 @@ void initEverything(void){ test->addMob(MS_RABBIT,200,100); test->addMob(MS_BIRD,-500,500); - currentWorld->addObject(SWORD_WOOD, false, NULL, 500,200); + currentWorld->addObject(SWORD_WOOD, false, "", 500,200); currentWorld->addObject(FLASHLIGHT, true, "This looks important, do you want to pick it up?",600,200); /*currentWorld->addObject(DEBUG_ITEM, 500,200); -- cgit v1.2.3